/* TidyTalk site. Same tokens as the extension: ink, paper, indigo, and the highlighter. */
:root {
  --paper: #f7f8fa;
  --surface: #ffffff;
  --ink: #1b2330;
  --muted: #5d6878;
  --line: #e3e6eb;
  --wash: #eef2f8;
  --accent: #3446b8;
  --accent-ink: #ffffff;
  --mark: #f6de50;
  --mark-soft: rgba(246, 222, 80, 0.78);
  --radius-lg: 18px;
  --radius-sm: 8px;
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #12151b;
    --surface: #181c23;
    --ink: #e6e9ee;
    --muted: #9aa3b0;
    --line: #2b313b;
    --wash: #222936;
    --accent: #8ea0ff;
    --accent-ink: #10142a;
    --mark-soft: rgba(214, 188, 52, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 21px/1 var(--display);
  letter-spacing: -0.02em;
}

.brand svg { flex: none; }

.top nav { display: flex; gap: 22px; align-items: center; font-size: 15.5px; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .top nav a:not(.btn) { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 16px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.top nav .btn { color: var(--accent-ink); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  padding: 56px 0 88px;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 32px 0 64px; }
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.05; margin: 0; }

h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 800;
  max-width: 11ch;
}

.lede {
  margin: 22px 0 30px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { font-size: 14.5px; color: var(--muted); }

/* The memorable thing: the product's own search, with the highlighter. */
.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -40px rgba(20, 30, 60, 0.45);
  overflow: hidden;
}

.demo-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
}

.demo-field svg { color: var(--muted); flex: none; }
.demo-query { min-height: 1.4em; }
.demo-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.demo-chips { display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.demo-chips span { padding: 3px 10px; border-radius: 6px; }
.demo-chips .on { background: var(--wash); color: var(--ink); font-weight: 700; }

.demo ol { list-style: none; margin: 0; padding: 6px 0; }
.demo li { padding: 13px 20px; }
.demo li.sel { background: var(--wash); box-shadow: inset 3px 0 0 var(--accent); }
.demo .t { display: block; font-weight: 700; font-size: 16px; }
.demo .m { display: block; font-size: 13.5px; color: var(--muted); }
.demo .s { display: block; margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--line); font-size: 15px; line-height: 1.5; }

mark {
  color: inherit;
  background: linear-gradient(transparent 38%, var(--mark-soft) 38%, var(--mark-soft) 94%, transparent 94%) no-repeat;
  background-size: 100% 100%;
  border-radius: 2px;
  padding: 0 1px;
}

.demo.animate mark { background-size: 0% 100%; transition: background-size 380ms ease-out; }
.demo.animate.lit mark { background-size: 100% 100%; }
.demo.animate li { opacity: 0; transform: translateY(4px); transition: opacity 260ms ease-out, transform 260ms ease-out; }
.demo.animate.shown li { opacity: 1; transform: none; }
.demo.animate.shown li:nth-child(2) { transition-delay: 70ms; }
.demo.animate.shown li:nth-child(3) { transition-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
  .demo-caret { animation: none; }
  .demo.animate mark, .demo.animate li { transition: none; }
}

/* ---------- Sections ---------- */

section { padding: 72px 0; border-top: 1px solid var(--line); }

h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; max-width: 20ch; }
.section-intro { color: var(--muted); max-width: 56ch; margin: 14px 0 0; font-size: 18px; }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 0; margin: 40px 0 0; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font: 700 17px/1 var(--display);
}
.steps h3 { font-size: 21px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* Features: alternating text and small product snippets */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
  margin-top: 56px;
}
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature h3 { font-size: 27px; margin-bottom: 10px; }
.feature p { margin: 0; color: var(--muted); max-width: 46ch; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 20px; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
}

.snippet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  font-size: 15px;
}

.tree { list-style: none; margin: 0; padding: 0; }
.tree li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; }
.tree li.sub { padding-left: 30px; }
.tree li.here { background: var(--wash); box-shadow: inset 3px 0 0 var(--accent); font-weight: 700; }
.tree .n { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 400; }

.composer { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--muted); }
.composer b { color: var(--ink); font-weight: 400; }
.picker { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.picker div { padding: 10px 14px; }
.picker div + div { border-top: 1px solid var(--line); }
.picker .sel { background: var(--wash); box-shadow: inset 3px 0 0 var(--accent); }
.picker small { display: block; color: var(--muted); }
.blank { background: var(--wash); border-radius: 4px; padding: 0 5px; color: var(--ink); }

.files { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.files li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.files li:last-child { border-bottom: 0; }

/* Privacy */
.privacy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; margin-top: 36px; }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; gap: 28px; } }
.privacy h3 { font-size: 20px; margin-bottom: 10px; }
.privacy ul { margin: 0; padding-left: 20px; color: var(--muted); }
.privacy li { margin-bottom: 6px; }
.privacy .stays { border-left: 4px solid var(--mark); padding-left: 20px; }
.privacy .leaves { border-left: 4px solid var(--line); padding-left: 20px; }

/* Pricing */
.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 40px; max-width: 860px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.plan.pro { border: 2px solid var(--accent); }
.plan h3 { font-size: 24px; }
.price { margin: 14px 0 4px; font: 800 44px/1 var(--display); letter-spacing: -0.03em; }
.price small { font: 400 17px var(--body); color: var(--muted); letter-spacing: 0; }
.plan .alt { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.plan ul { margin: 0 0 22px; padding-left: 20px; }
.plan li { margin-bottom: 7px; }

/* FAQ */
.faq { margin-top: 32px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style-position: outside; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); }

/* ---------- Document pages (policies, support) ---------- */

.doc { max-width: 720px; padding: 32px 0 80px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); max-width: none; }
.doc .updated { color: var(--muted); margin: 12px 0 36px; }
.doc h2 { font-size: 25px; margin: 40px 0 10px; max-width: none; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15.5px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; }
.note { background: var(--wash); border-radius: 10px; padding: 14px 16px; }

/* Support form */
.contact { display: grid; gap: 8px; max-width: 560px; margin: 28px 0 8px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.contact label { font-weight: 700; font-size: 15px; margin-top: 6px; }
.contact input, .contact select, .contact textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; }
.contact textarea { resize: vertical; min-height: 140px; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact .btn { justify-self: start; margin-top: 10px; }
.contact .btn:disabled { opacity: 0.6; cursor: default; }
.contact .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { margin: 4px 0 0; min-height: 1.5em; color: var(--muted); }
.contact-status[data-kind='ok'] { color: #1f7a3a; }
.contact-status[data-kind='error'] { color: #b42318; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .contact-status[data-kind='ok'] { color: #75d39a; }
  :root:not([data-theme='light']) .contact-status[data-kind='error'] { color: #fda29b; }
}
