/* QuikTech — shared design system */

/* ---- Tokens ---- */
:root {
  --bg: #0B0E14;
  --surface: #12161F;
  --surface-2: #171C27;
  --grid-line: rgba(255,255,255,0.035);
  --border: #232A38;
  --border-soft: #1B2130;
  --text: #E5E9F0;
  --text-muted: #7C8798;
  --text-dim: #4B5568;
  --accent: #5EEAD4;
  --accent-dim: #2D5F58;
  --amber: #F5A623;
  --red: #F0665C;
  --font-display: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--accent-dim); color: var(--text); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 200;
  background: var(--accent); color: var(--bg);
  padding: 10px 18px; border-radius: 0 0 8px 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  text-decoration: none; transition: top .12s ease;
}
.skip-link:focus { top: 0; }

/* ---- Focus ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
textarea:focus-visible, input[type=text]:focus-visible, select:focus-visible { outline: none; }

/* ---- Layout ---- */
.wrap         { max-width: 1080px; margin: 0 auto; padding: 48px 24px 96px; }
.wrap--narrow { max-width: 780px;  margin: 0 auto; padding: 48px 24px 96px; }

/* ---- Tool nav breadcrumb ---- */
.tool-nav { margin-bottom: 36px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 12px; color: var(--text-muted);
  text-decoration: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px;
  transition: border-color .15s, color .15s;
}
.back-link:hover { color: var(--accent); border-color: var(--accent-dim); text-decoration: none; }

/* ---- Hub header ---- */
header { margin-bottom: 40px; }
.eyebrow {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}

/* ---- Tool page hero ---- */
.tool-hero { margin-bottom: 28px; }
.tool-hero .eyebrow { margin-bottom: 8px; }
.tool-hero .eyebrow::before { display: none; }

h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.01em; margin-bottom: 10px;
}
.tool-hero h1 { font-size: clamp(20px, 3.5vw, 30px); margin-bottom: 8px; }
.sub { color: var(--text-muted); font-size: 15px; max-width: 560px; line-height: 1.6; }
.tool-hero .sub { font-size: 14px; }

/* ---- Terminal search ---- */
.terminal {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft); background: var(--surface-2);
}
.dot { width: 9px; height: 9px; border-radius: 50%; opacity: 0.7; }
.dot.r { background: #F0665C; }
.dot.y { background: #F5A623; }
.dot.g { background: #5EEAD4; }
.terminal-title { margin-left: 8px; font-family: var(--font-display); font-size: 11px; color: var(--text-dim); }
.terminal-input-row {
  display: flex; align-items: center; padding: 14px 18px; gap: 10px;
  font-family: var(--font-display); font-size: 15px;
}
.prompt-char { color: var(--accent); }
#search {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font-display); font-size: 15px; caret-color: var(--accent);
}
#search:focus { outline: none; }
#search::placeholder { color: var(--text-dim); }
.cursor-blink { width: 8px; height: 18px; background: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- Category filter ---- */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cat-btn {
  font-family: var(--font-display); font-size: 12px; padding: 7px 13px; min-height: 36px;
  border-radius: 20px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); cursor: pointer; transition: all .15s ease;
  display: inline-flex; align-items: center;
}
.cat-btn:hover { border-color: var(--accent-dim); color: var(--text); }
.cat-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ---- Grid + Cards ---- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px; margin-top: 28px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; text-decoration: none; display: block; color: inherit;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  position: relative; overflow: hidden;
}
.card:hover,
.card:focus-visible {
  border-color: var(--accent-dim); transform: translateY(-2px); background: var(--surface-2);
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.card .glyph { font-family: var(--font-display); font-size: 20px; color: var(--accent); margin-bottom: 12px; display: inline-block; }
.card .card-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: block; }
.card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.card .cat-tag {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--font-display); font-size: 9px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .06em;
}
.empty { color: var(--text-muted); font-family: var(--font-display); font-size: 13px; padding: 40px 0; text-align: center; }

/* ---- Recently used chips ---- */
.recent-section { margin-top: 24px; }
.recent-label {
  font-family: var(--font-display); font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim); margin-bottom: 8px;
}
.recent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-chip {
  font-family: var(--font-display); font-size: 11px; color: var(--accent);
  background: var(--surface); border: 1px solid var(--accent-dim);
  border-radius: 6px; padding: 5px 10px; text-decoration: none; transition: background .12s;
}
.recent-chip:hover { background: var(--accent-dim); }

/* ---- Tool box (tool page container) ---- */
.tool-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; margin-bottom: 24px;
}

/* ---- Form elements ---- */
label {
  display: block; font-family: var(--font-display); font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px;
}
textarea, input[type=text], select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-display); font-size: 13px;
  padding: 12px; border-radius: 8px; outline: none; resize: vertical;
}
textarea:focus, input[type=text]:focus, select:focus { border-color: var(--accent-dim); }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.btn {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent);
  padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: opacity .15s;
}
.btn:hover { opacity: 0.8; }
.btn.ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.output-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; font-family: var(--font-display); font-size: 13px; white-space: pre-wrap;
  word-break: break-word; min-height: 46px; color: var(--text);
}
.error-text { color: var(--red); font-size: 12.5px; margin-top: 6px; font-family: var(--font-display); }
.error-text:not(:empty)::before { content: '✕ '; }
.ok-text { color: var(--accent); font-size: 12.5px; margin-top: 6px; font-family: var(--font-display); }
.ok-text:not(:empty)::before { content: '✓ '; }
.muted-note { color: var(--text-muted); font-size: 12px; margin-top: 10px; line-height: 1.6; }
.swatch { width: 100%; height: 60px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 14px; }
.list-item { font-family: var(--font-display); font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--border-soft); color: var(--text-muted); }
.list-item:last-child { border-bottom: none; }
.highlight { background: var(--accent-dim); color: var(--accent); border-radius: 3px; padding: 0 1px; }
mark.group { background: rgba(245,166,35,0.25); color: var(--amber); border-radius: 3px; padding: 0 1px; }

/* ---- Tips / usage section ---- */
.tool-tips {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 24px;
}
.tool-tips h2 {
  font-family: var(--font-display); font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 14px;
}
.tool-tips p { font-size: 14px; color: var(--text-muted); line-height: 1.75; margin-bottom: 10px; }
.tool-tips p:last-child { margin-bottom: 0; }
.tool-tips strong { color: var(--text); font-weight: 600; }
.tool-tips code {
  font-family: var(--font-display); font-size: 11.5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; color: var(--accent);
}
.tool-tips a { color: var(--accent); text-decoration: none; }
.tool-tips a:hover { text-decoration: underline; }
.warn-note { font-size: 13px; color: var(--amber); border-left: 2px solid var(--amber); padding-left: 12px; margin-top: 8px; line-height: 1.6; }
.warn-note strong { color: var(--amber); }

/* ---- FAQ ---- */
.faq { margin-top: 72px; }
.faq-eyebrow { font-family: var(--font-display); font-size: 11px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; margin-bottom: 10px; }
.faq > h2 { font-family: var(--font-display); font-size: clamp(18px, 3vw, 26px); font-weight: 700; margin-bottom: 24px; }
details { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; overflow: hidden; transition: border-color .15s; }
details[open] { border-color: var(--accent-dim); }
summary { padding: 16px 20px; cursor: pointer; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ''; }
.faq-icon { color: var(--accent); font-size: 22px; line-height: 1; flex-shrink: 0; transition: transform .2s ease; font-weight: 300; }
details[open] .faq-icon { transform: rotate(45deg); }
.faq-body { padding: 14px 20px 18px; border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--text-muted); line-height: 1.75; }
.faq-body p { margin-bottom: 10px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body strong { color: var(--text); font-weight: 600; }
.faq-body code { font-family: var(--font-display); font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--accent); }
.faq-body a { color: var(--accent); text-decoration: none; }
.faq-body a:hover { text-decoration: underline; }
.faq-warn { font-size: 13px; color: var(--amber); border-left: 2px solid var(--amber); padding-left: 12px; margin-top: 10px; }
.faq-warn strong { color: var(--amber); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border-soft); margin-top: 40px;
  padding: 28px 24px 40px; text-align: center;
  font-family: var(--font-display); font-size: 11px; color: var(--text-muted); letter-spacing: .06em;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 14px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy a { color: var(--text-muted); text-decoration: none; }
.footer-copy a:hover { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .wrap, .wrap--narrow { padding: 32px 16px 64px; }
  .tool-box, .tool-tips { padding: 16px; }
}
