/* Chittu - chittu.happycoders.in
   Tokens from design/tokens.json (dark). No external fonts, no analytics, no cookies. */

:root {
  --bg: #0B1328;
  --window: #111C36;
  --surface: #14213D;
  --raised: #1C2B4D;
  --border: #24314F;
  --border-strong: #2E3D60;
  --text: #EEF0F4;
  --text-2: #8E99B0;
  --accent: #F2A541;
  --accent-text: #14213D;
  --success: #3DBA82;
  --paper: #FAF7F2;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-drop: 16px;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }

.num, table, .result, .stat { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* 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(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.wordmark { font-weight: 800; letter-spacing: -0.045em; font-size: 24px; line-height: 1; }
.nav { display: none; gap: 24px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--text); }
@media (min-width: 860px) { .nav { display: flex; } }

/* Buttons ---------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 20px;
  border-radius: var(--radius-control);
  font: 800 15px/1.2 var(--font);
  text-decoration: none; cursor: pointer; border: 0;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 94%, white); }
.btn-secondary { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 700; }
.btn-secondary:hover { background: var(--border-strong); }
.btn-small { min-height: 38px; padding: 8px 14px; font-size: 14px; }

/* Type ------------------------------------------------------------------------------- */

.label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 12px; }
h1 { font-size: clamp(36px, 6vw, 58px); line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 20px; }
h1 .accent { color: var(--accent); }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 14px; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; margin: 0 0 10px; }
.lede { font-size: 18px; color: var(--text-2); max-width: 640px; margin: 0 0 28px; }
.caption { font-size: 13px; font-weight: 600; color: var(--text-2); }
p { margin: 0 0 14px; }

section { padding: 72px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }
@media (min-width: 720px) { section { padding: 96px 0; } }

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

.hero { padding-top: 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero .caption + .caption { margin-top: 4px; }

.result {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 22px;
}
.result-line { font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 18px; }
.result-line .saved { color: var(--success); }
.bars { display: grid; grid-template-columns: 56px 1fr 72px; gap: 8px 12px; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.bars .val { text-align: right; color: var(--text); }
.track { height: 9px; border-radius: 9999px; background: var(--border-strong); }
.after { height: 9px; border-radius: 9999px; background: var(--accent); }
.rows { margin-top: 18px; border-radius: var(--radius-control); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr 70px 64px; gap: 10px; padding: 11px 14px; font-size: 13px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .size { color: var(--text-2); text-align: right; }
.row .delta { text-align: right; font-weight: 700; }
.row .delta.saved { color: var(--success); }
.row .delta.kept { color: var(--text-2); }
.mock-note { margin-top: 10px; }

/* Cards ------------------------------------------------------------------------------ */

.grid-3 { display: grid; gap: 16px; }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 24px;
}
.card ul { margin: 0 0 14px; padding-left: 18px; color: var(--text-2); }
.card li { margin-bottom: 6px; }
.card li strong, .card p strong { color: var(--text); }
.card p { color: var(--text-2); }
.card .tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: 6px; padding: 3px 8px; margin-bottom: 14px; }

.strip { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 860px) { .strip { grid-template-columns: repeat(3, 1fr); } }
.strip div { border-left: 2px solid var(--border-strong); padding-left: 14px; color: var(--text-2); font-size: 15px; }
.strip strong { color: var(--text); display: block; margin-bottom: 4px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; background: var(--raised); padding: 1px 6px; border-radius: 4px; }

/* Extension tabs (no JavaScript: radio + labels) ------------------------------------- */

.tabs { margin-top: 8px; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tab-list { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-list label { padding: 8px 14px; border-radius: var(--radius-control); font-size: 14px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.panel { display: none; }
#t-page:checked ~ .tab-list label[for="t-page"],
#t-site:checked ~ .tab-list label[for="t-site"],
#t-local:checked ~ .tab-list label[for="t-local"] { background: var(--border-strong); color: var(--text); }
#t-page:focus-visible ~ .tab-list label[for="t-page"],
#t-site:focus-visible ~ .tab-list label[for="t-site"],
#t-local:focus-visible ~ .tab-list label[for="t-local"] { outline: 2px solid var(--accent); outline-offset: 2px; }
#t-page:checked ~ .panels .p-page,
#t-site:checked ~ .panels .p-site,
#t-local:checked ~ .panels .p-local { display: block; }
.ext-stat { margin-top: 16px; padding: 14px; border-radius: var(--radius-control); background: var(--raised); font-size: 14px; }
.ext-stat .saved { color: var(--success); font-weight: 700; }

/* Tables ----------------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; }
thead th { border-top: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); background: var(--surface); }
td { color: var(--text-2); }
td:first-child { color: var(--text); font-weight: 700; }
.no { color: var(--text-2); opacity: 0.6; }

.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts li { padding-left: 22px; position: relative; color: var(--text-2); }
.facts li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: var(--border-strong); }

/* Download --------------------------------------------------------------------------- */

.downloads { display: grid; gap: 12px; margin-top: 8px; }
@media (min-width: 720px) { .downloads { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .downloads { grid-template-columns: repeat(4, 1fr); } }
.store {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px;
  border-radius: var(--radius-card); background: var(--raised); box-shadow: inset 0 0 0 1px var(--border-strong);
  text-decoration: none; transition: background-color 150ms ease-out;
}
a.store:hover { background: var(--border-strong); }
.store .small { font-size: 12px; font-weight: 600; color: var(--text-2); }
.store .big { font-size: 17px; font-weight: 800; }
.store .soon { font-size: 12px; font-weight: 700; color: var(--text-2); margin-top: 6px; }
.store[aria-disabled="true"] { opacity: 0.75; cursor: default; }
.download-notes { margin-top: 18px; display: grid; gap: 4px; }

/* FAQ -------------------------------------------------------------------------------- */

.faq { max-width: 820px; }
details { border-top: 1px solid var(--border); }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { list-style: none; cursor: pointer; padding: 18px 32px 18px 0; font-weight: 700; font-size: 17px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 22px; color: var(--text-2); }
details[open] summary::after { content: "−"; }
details p { color: var(--text-2); padding-bottom: 6px; }

/* Footer ----------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); background: var(--window); padding: 48px 0 28px; font-size: 14px; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr 1.6fr; } }
.site-footer h4 { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--text-2); display: grid; gap: 6px; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--text-2); font-size: 13px; }

/* Legal pages ------------------------------------------------------------------------ */

.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); }
.legal h2 { font-size: 22px; letter-spacing: -0.01em; margin-top: 40px; }
.legal p, .legal li { color: var(--text-2); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 22px; margin: 24px 0 8px; }
.legal .toc ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.legal .toc a { color: var(--text); }
