/* ============================================================
   techtuate "Flow" page layer for tool pages and articles.
   Load AFTER /assets/flow.css on every tool page, /vs/ page and article.
   It provides:
   - the page frame: .tt-main, .tt-backlink, .page-head, .tool-ui (the glass
     panel the tool lives in), .tt-section (about / FAQ blocks), .cross-compare
   - shared components: .btn (.alt = yellow primary, .ghost), .callout, .cta,
     .section-head, .pill, .compare tables, .prose articles, form controls,
     #copy-flash toast
   - token names the tools' own CSS uses (--ink, --bg, --field, --line,
     --yellow-*, --font-*, --r-*), set to dark Flow values.
   The home page and /card-reader/ are built on flow.css alone.
   See docs/design-system.md.
   ============================================================ */

:root {
  /* old token names, dark values */
  --bg:        #06050a;               /* page / text-on-yellow */
  --bg-soft:   rgba(255,255,255,.045);
  --bg-card:   rgba(22,18,34,.6);
  --field:     rgba(8,6,14,.55);      /* inputs, textareas, wells */
  --ink:       #ece8f4;
  --ink-mute:  #b3acc2;
  --ink-dim:   #8d879c;
  --line:      rgba(255,255,255,.09);
  --line-bold: rgba(255,255,255,.2);

  --yellow:      #ffd60a;
  --yellow-soft: rgba(255,214,10,.22);
  --yellow-deep: #f5c400;
  --yellow-wash: rgba(255,214,10,.07);

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
}

/* ---------- page frame ---------- */
.tt-main { padding: clamp(20px, 4vw, 56px) clamp(16px, 6vw, 96px) 40px; max-width: 1400px; width: 100%; margin: 0 auto; }
.tt-main.narrow { max-width: 980px; }
.tt-backlink {
  display: inline-block; margin-bottom: clamp(16px, 3vw, 34px);
  font-family: var(--f-mono); font-size: 12.5px; color: var(--muted);
}
.tt-backlink:hover { color: var(--accent); }
.page-head {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 22px 72px; align-items: end; margin-bottom: clamp(22px, 4vw, 48px);
}
.page-head h1 {
  margin: 0; color: var(--text);
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(44px, 6.4vw, 96px); line-height: .94; letter-spacing: -0.05em;
  text-wrap: balance;
}
.page-head h1 .serif { color: var(--accent); }
.page-head .lede { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; font-weight: 300; color: var(--text-2); text-wrap: pretty; }
.page-head .eyebrow { grid-column: 1 / -1; margin: 0 0 -6px; }
@media (max-width: 640px) { .page-head .lede { font-size: 16px; } }

/* The tool itself sits in one glass panel. */
.tool-ui {
  border-radius: 32px; padding: clamp(18px, 2.6vw, 34px);
  background: rgba(20,16,32,.55); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  color: var(--ink);
}
@media (max-width: 480px) { .tool-ui { border-radius: 24px; padding: 16px 14px; } }

.tt-section { margin-top: clamp(48px, 7vw, 96px); max-width: 820px; }
.tt-section > p, .tt-section li { font-size: 16px; line-height: 1.7; font-weight: 300; color: var(--text-3); }
.tt-section a, .tt-main .cross-compare a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,214,10,.5); text-underline-offset: 4px; }
.tt-section a:hover { color: var(--accent); }
.cross-compare { font-family: var(--f-mono) !important; font-size: 12px !important; color: var(--faint) !important; margin-top: 18px; }
.cross-compare a { color: var(--muted) !important; text-decoration: none !important; }
.cross-compare a:hover { color: var(--accent) !important; }

/* ---------- old shared components ---------- */
.tt-main h2, .tt-main h3, .tt-main h4 { font-family: var(--f-display); color: var(--text); letter-spacing: -0.025em; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 0; border: 0;
}
.section-head h2 { margin: 0; font-size: clamp(24px, 2.4vw, 30px); font-weight: 500; }
.section-head .count { font-family: var(--f-mono); font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--text);
  font-family: var(--f-body); font-size: 15px; font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer; box-shadow: none;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--accent); background: transparent; color: #fff; transform: none; box-shadow: none; }
.btn:active { transform: none; box-shadow: none; }
.btn.alt, .btn.primary, .btn.yellow, .btn-primary {
  background: var(--accent); border-color: var(--accent); color: #06050a; font-weight: 600;
}
.btn.alt:hover, .btn.primary:hover, .btn.yellow:hover, .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #06050a; }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.2); }
.btn.ghost:hover { border-color: var(--accent); background: transparent; color: #fff; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  font-size: 13px; color: var(--text-2); box-shadow: none;
}
.pill.solid, .pill.yellow { background: rgba(255,214,10,.12); border-color: rgba(255,214,10,.4); color: var(--accent); }

.callout {
  margin: 20px 0; padding: 16px 20px; border-radius: 20px;
  border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--text-2);
  box-shadow: none;
}
.callout.yellow, .callout.wash { background: rgba(255,214,10,.07); border-color: rgba(255,214,10,.28); }
.callout h4 { margin: 0 0 6px; font-family: var(--f-display); font-size: 17px; font-weight: 500; color: var(--text); }
.callout p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.callout a { color: var(--accent); }

.cta {
  margin: 40px 0; padding: clamp(22px, 3vw, 34px); border-radius: 28px; text-align: left;
  background: rgba(20,16,32,.6); border: 1px solid rgba(255,214,10,.3); color: var(--text);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.cta h3 { margin: 0 0 8px; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; color: var(--text); }
.cta p { margin: 0 0 18px; color: var(--text-2); }
.cta .btn { background: var(--accent); border-color: var(--accent); color: #06050a; font-weight: 600; box-shadow: none; }
.cta .btn:hover { background: var(--accent-hover); box-shadow: none; }

/* comparison table */
.compare-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); background: rgba(12,10,20,.55); margin: 22px 0 32px; }
.compare-wrap .compare { margin: 0; }
.compare { width: 100%; border-collapse: collapse; margin: 22px 0 32px; font-size: 14.5px; color: var(--text-2); }
.compare thead th {
  text-align: left; padding: 12px 14px; background: rgba(255,255,255,.04);
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line-2);
}
.compare thead th.us { background: rgba(255,214,10,.12); color: var(--accent); }
.compare tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody td.us { background: rgba(255,214,10,.06); color: var(--text); font-weight: 500; }
.compare tbody td.metric { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.compare .yes::before { content: "\2713  "; color: var(--local); font-weight: 700; }
.compare .no::before { content: "\2717  "; color: var(--faint); }
.compare a { color: var(--text); }

/* long-form articles (/vs/*, /why-free/, /free-pdf-editor/) */
.prose { max-width: 760px; color: var(--text-2); }
.prose h1 {
  margin: 0 0 14px; color: var(--text);
  font-family: var(--f-display); font-weight: 300; font-size: clamp(42px, 6vw, 84px);
  line-height: .96; letter-spacing: -0.05em; text-wrap: balance;
}
.prose h1 .serif { color: var(--accent); }
.prose h2 { margin: 44px 0 14px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; line-height: 1.15; }
.prose h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 500; }
.prose p, .prose ul, .prose ol { font-size: 17px; line-height: 1.7; font-weight: 300; color: var(--text-2); }
.prose p { margin: 0 0 16px; }
.prose p.lede { font-size: 19px; color: var(--text); margin-bottom: 24px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 500; color: var(--text); }
.prose a { color: var(--text); font-weight: 400; text-decoration: underline; text-decoration-color: rgba(255,214,10,.55); text-underline-offset: 4px; border: 0; }
.prose a:hover { color: var(--accent); background: none; }
.prose a.btn { text-decoration: none; }
.prose .cta a.btn, .prose .btn.alt, .prose .btn.primary { color: #06050a; }
.prose blockquote {
  margin: 24px 0; padding: 16px 20px; border-radius: 18px;
  background: rgba(255,214,10,.06); border: 0; border-left: 3px solid var(--accent);
  font-size: 16px; color: var(--text);
}
.prose code, .tt-main code {
  font-family: var(--f-mono); font-size: .9em; padding: 1px 6px; border-radius: 6px;
  background: rgba(255,255,255,.07); color: var(--text);
}
.prose .byline { font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin-bottom: 30px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 16px; }

/* ---------- form controls inside tools ---------- */
.tt-main input[type="text"], .tt-main input[type="number"], .tt-main input[type="url"],
.tt-main input[type="email"], .tt-main input[type="tel"], .tt-main input[type="search"],
.tt-main input[type="password"], .tt-main input:not([type]), .tt-main select, .tt-main textarea {
  background-color: var(--field); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: none; font-family: inherit;
}
.tt-main textarea { font-family: inherit; }
.tt-main textarea.mono, .tt-main .code textarea { font-family: var(--f-mono); }
.tt-main input:focus, .tt-main select:focus, .tt-main textarea:focus {
  outline: none; border-color: rgba(255,214,10,.6); box-shadow: 0 0 0 3px rgba(255,214,10,.12);
}
.tt-main select option { background: #16121f; color: var(--text); }
.tt-main input[type="checkbox"], .tt-main input[type="radio"], .tt-main input[type="range"] { accent-color: var(--accent); }
.tt-main input[type="color"] { border-radius: 10px; border: 1px solid var(--line-2); background: transparent; }
.tt-main input::placeholder, .tt-main textarea::placeholder { color: var(--faint); }
.tt-main label { color: var(--text-2); }
.tt-main hr { border: 0; border-top: 1px solid var(--line); }
.tt-main table { color: var(--text-2); }
.tt-main kbd {
  font-family: var(--f-mono); font-size: .85em; padding: 1px 6px; border-radius: 5px;
  background: rgba(255,255,255,.1); color: var(--text); border: 0; box-shadow: none;
}
.tt-main ::-webkit-scrollbar { width: 10px; height: 10px; }
.tt-main ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
.tt-main ::-webkit-scrollbar-track { background: transparent; }

/* old toast */
#copy-flash {
  position: fixed; bottom: 28px; left: 50%; z-index: 200;
  transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  padding: 11px 20px; border-radius: 999px;
  background: var(--accent); color: #06050a; font-family: var(--f-body); font-weight: 600; font-size: 14.5px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7);
  transition: opacity .25s, transform .25s;
}
#copy-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* FAQ eyebrow spacing when it follows the about text */
.tt-section .faq { margin-top: 8px; }

/* comparison tables built as div.compare > table, and CTA headings inside articles */
.prose .cta h3 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
.prose div.compare { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); background: rgba(12,10,20,.55); }
.prose div.compare > table { width: 100%; border-collapse: collapse; }
