/* CatchTeX website - shared styles (light + dark). System fonts only: no font downloads, no third-party requests. */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --panel: #ffffff;
  --text: #16202e;
  --text-2: #4f5b6b;
  --muted: #7a8595;
  --line: #e2e7ef;
  --brand: #1f4fa8;
  --brand-2: #256ad6;
  --brand-ink: #ffffff;
  --accent: #ffca28;
  --code-bg: #0f1726;
  --code-text: #dbe4f3;
  --code-key: #7fb2ff;
  --code-str: #ffd866;
  --code-com: #7d8aa0;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --maxw: 1440px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1219;
    --bg-soft: #121925;
    --panel: #161e2b;
    --text: #e6ebf2;
    --text-2: #aab4c3;
    --muted: #7f8a9b;
    --line: #253043;
    --brand: #4c8dff;
    --brand-2: #6aa1ff;
    --brand-ink: #0b1220;
    --code-bg: #0a0f18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --ok: #4cc38a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "Cascadia Code", "Cascadia Mono", Consolas, "SF Mono", monospace; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 64px); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--brand-ink); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-radius: 10px; font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }

/* hero */
.hero { padding: 72px 0 56px; background:
  radial-gradient(1200px 400px at 80% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent),
  var(--bg); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -.02em; }
h1 .hl { background: linear-gradient(transparent 64%, color-mix(in srgb, var(--accent) 65%, transparent) 64%); }
@media (prefers-color-scheme: dark) { h1 .hl { background: linear-gradient(transparent 70%, color-mix(in srgb, var(--accent) 35%, transparent) 70%); } }
.lead { font-size: 1.15rem; color: var(--text-2); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { color: var(--muted); font-size: .88rem; margin-top: 14px; }

/* demo window */
.demo {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.chips { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.chip { font-size: .72rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.demo-body { display: grid; grid-template-columns: 1fr; }
.demo-src { padding: 18px 18px 8px; position: relative; }
.demo-src .snip { border: 2px dashed var(--brand); border-radius: 6px; padding: 10px 12px; font-family: "Times New Roman", Times, serif; }
.demo-src .cap { font-size: .85rem; margin-bottom: 6px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.paper-table th, .paper-table td { padding: 3px 8px; text-align: center; }
.paper-table thead tr:first-child th { border-top: 1.5px solid currentColor; }
.paper-table thead tr:last-child th { border-bottom: 1px solid currentColor; }
.paper-table tbody tr:last-child td { border-bottom: 1.5px solid currentColor; }
.paper-table td:first-child, .paper-table th:first-child { text-align: left; }
.arrow { text-align: center; color: var(--muted); font-size: .8rem; padding: 4px 0; }
pre.code {
  margin: 0; background: var(--code-bg); color: var(--code-text); padding: 16px 18px;
  font-size: .8rem; line-height: 1.55; overflow-x: auto;
}
.code .k { color: var(--code-key); } .code .s { color: var(--code-str); } .code .c { color: var(--code-com); }

/* sections */
section { padding: 72px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 36px; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 10px; letter-spacing: -.01em; line-height: 1.2; }
.section-head p { color: var(--text-2); margin: 0; font-size: 1.05rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: s; content: counter(s); display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #1b1b1b;
  font-weight: 700; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--text-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card .ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 12px; }
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card .to { font-family: "Cascadia Code", Consolas, "SF Mono", monospace; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-2); font-size: .95rem; }

.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 40px; }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; } }
.why > div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.why svg { width: 22px; height: 22px; color: var(--ok); margin-top: 3px; }
.why h3 { margin: 0 0 2px; font-size: 1.05rem; }
.why p { margin: 0; color: var(--text-2); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 340px)); gap: 20px; justify-content: center; align-items: stretch; }
@media (max-width: 1180px) { .plans { grid-template-columns: repeat(2, minmax(0, 420px)); } }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan h3 { margin: 0; font-size: 1.2rem; }
.price { font-size: 2.4rem; font-weight: 700; margin: 10px 0 2px; letter-spacing: -.02em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan .sub { color: var(--text-2); margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; color: var(--text-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .btn { justify-content: center; }
/* Prices by country (script at the end of index.html): <html class="in"> = visitor in India */
.cur-inr { display: none; }
html.in .cur-usd { display: none; }
html.in span.cur-inr { display: inline; }
html.in li.cur-inr { display: list-item; }
.note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 18px; }

/* download */
.download { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 820px) { .download { grid-template-columns: 1fr; } }
.spec { width: 100%; border-collapse: collapse; }
.spec td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec td:first-child { color: var(--muted); width: 42%; padding-right: 12px; }
.callout { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 10px; padding: 14px 16px; font-size: .93rem; color: var(--text); margin-top: 18px; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-2); margin: 10px 0 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }

/* legal pages */
.legal { max-width: 780px; margin: 0 auto; padding: 48px 16px 72px; }
.legal h1 { font-size: 2rem; }
.legal .muted { color: var(--muted); }
.legal h2 { font-size: 1.2rem; margin-top: 2em; }
.legal table { border-collapse: collapse; width: 100%; font-size: .95em; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.legal pre.eula { white-space: pre-wrap; font-size: .9rem; line-height: 1.55; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 20px; color: var(--text); }

/* download page + sign-up forms (growth tracker 1.9) */
.dl-hero { padding: 56px 0 64px; }
.dl-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 920px) { .dl-grid { grid-template-columns: 1fr; gap: 32px; } }
.signup { margin: 8px 0 0; }
.signup label { display: block; font-weight: 600; margin-bottom: 8px; }
.signup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup-row input { flex: 1 1 240px; min-width: 0; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.signup-row input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.signup-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .signup-row .btn { flex: 1 1 100%; justify-content: center; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.direct { margin: 18px 0 22px; color: var(--text-2); }
.dl-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dl-link svg { width: 18px; height: 18px; }
code.hash { font-size: .78rem; word-break: break-all; }
button.btn { font-family: inherit; }

/* Founder licence card (tracker 1.28) */
.plan-tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }

/* guide pages (tracker 2.1) */
.guide { max-width: 860px; margin: 0 auto; padding: 40px 16px 72px; }
.guide .crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.guide .crumbs a { color: var(--muted); }
.guide h1 { margin-bottom: 14px; }
.guide h2 { font-size: 1.45rem; margin: 2em 0 .6em; }
.guide .lead { margin-bottom: 8px; }
.guide .updated { color: var(--muted); font-size: .85rem; margin: 0 0 28px; }
.guide p, .guide li { color: var(--text-2); }
.guide li { margin: 6px 0; }
.guide li b, .guide p b { color: var(--text); }
.guide .demo { margin: 8px 0 10px; }
.guide .fine { font-size: .85rem; color: var(--muted); }
.steps-list { padding-left: 1.3em; }
.steps-list li { margin: 10px 0; padding-left: 4px; }
.table-wrap { overflow-x: auto; margin: 0 -2px; }
table.cmp { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 620px; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--line); }
table.cmp thead th { color: var(--text); border-bottom: 2px solid var(--line); }
table.cmp tbody th { color: var(--text); font-weight: 600; width: 22%; }
table.cmp td { color: var(--text-2); }
table.cmp.two { min-width: 0; }
@media (max-width: 520px) { table.cmp.two th, table.cmp.two td { padding: 8px 6px; font-size: .85rem; } }
.guide details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.guide summary { cursor: pointer; font-weight: 600; color: var(--text); }
.cta-box { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.cta-box h2 { margin: 0 0 4px !important; font-size: 1.3rem !important; }
.cta-box p { margin: 0; }
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.guide-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); }
.guide-card:hover { border-color: var(--brand); text-decoration: none; }
.guide-card h2 { font-size: 1.1rem !important; margin: 0 0 6px !important; }
.guide-card p { margin: 0; font-size: .95rem; }

/* demo video and guide figures (tracker 1.18) */
.video-wrap { max-width: 1040px; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: #0f1f45; }
.video-wrap video { display: block; width: 100%; height: auto; }
.shot { margin: 8px 0 18px; }
.shot img, .shot video { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.shot figcaption { color: var(--muted); font-size: .85rem; margin-top: 8px; text-align: center; }

/* 2026-10 refresh: wider layout, audiences, institutes, help page */
@media (max-width: 1100px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px)  { .why { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stats > div { padding: 22px 24px; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-size: 1.6rem; letter-spacing: -.01em; color: var(--brand); }
.stats span { color: var(--text-2); font-size: .95rem; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .audiences { grid-template-columns: 1fr; } }
.aud { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.aud .tag { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.aud h3 { margin: 0 0 8px; font-size: 1.25rem; }
.aud p { color: var(--text-2); margin: 0 0 14px; }
.aud ul { margin: 0 0 20px; padding-left: 18px; color: var(--text-2); }
.aud ul li { margin: 4px 0; }
.aud .btn { margin-top: auto; align-self: flex-start; }
.inst { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .inst { grid-template-columns: 1fr; gap: 24px; } }
.inst table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inst th, .inst td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.inst tr:last-child td { border-bottom: 0; }
.inst th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.help-steps { counter-reset: h; list-style: none; padding: 0; }
.help-steps li { counter-increment: h; position: relative; padding: 0 0 22px 48px; }
.help-steps li::before { content: counter(h); position: absolute; left: 0; top: -2px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--accent); color: #1b1b1b; font-weight: 700; display: grid; place-items: center; }
.help-steps img { border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
