/* CelestiaWise design system. 2026 editorial, premium, calm. */
:root {
  --ink: #15131c;
  --ink-soft: #413c52;
  --muted: #6b6578;
  --line: #e4dfea;
  --line-strong: #cfc8d8;
  --paper: #faf8f5;
  --paper-2: #ffffff;
  --surface: #ffffff;
  --night: #161326;
  --night-2: #221b3a;
  --gold: #b08a4f;
  --gold-soft: #c9a86a;
  --violet: #6d5aa6;
  --plum: #4a2f5e;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(20,16,32,.04), 0 8px 28px rgba(20,16,32,.06);
  --shadow-soft: 0 1px 2px rgba(20,16,32,.04), 0 2px 10px rgba(20,16,32,.05);
  --maxw: 1120px;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #efe9f2; --ink-soft: #cfc6da; --muted: #9b93ab;
    --line: #2d2740; --line-strong: #3b3353;
    --paper: #100d1a; --paper-2: #16121f; --surface: #1a1528;
    --night: #0c0a16; --night-2: #1a142c;
    --gold: #cfa968; --gold-soft: #d9b878;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
    --shadow-soft: 0 1px 2px rgba(0,0,0,.35), 0 2px 12px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --ink: #efe9f2; --ink-soft: #cfc6da; --muted: #9b93ab;
  --line: #2d2740; --line-strong: #3b3353;
  --paper: #100d1a; --paper-2: #16121f; --surface: #1a1528;
  --night: #0c0a16; --night-2: #1a142c;
  --gold: #cfa968; --gold-soft: #d9b878;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } body { font-size: 16px; } }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 560; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); }
.eyebrow { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.1) blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-size: 1.28rem; font-weight: 580; letter-spacing: -.01em; }
.brand .mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: .95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.lang-switch { font-size: .9rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; }
.lang-switch:hover { color: var(--ink); border-color: var(--gold); }
.nav-cta { font-weight: 560; }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* Buttons: rectangular, small radius. Not pills. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-sans); font-size: 1rem; font-weight: 560; padding: 13px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); background: #000; }
:root[data-theme="dark"] .btn-primary, :root:not([data-theme="light"]) .btn-primary { }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #231a0d; }
.btn-gold:hover { transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
/* Icon-only buttons are perfect circles */
.btn-icon { padding: 0; min-height: 0; width: 42px; height: 42px; aspect-ratio: 1; border-radius: 50%; }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 70% -10%, var(--night-2), var(--night) 60%); color: #efe9f2; }
.hero .wrap { padding-block: 92px 104px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-eye { color: var(--gold-soft); }
.hero h1 { color: #fbf8f3; font-size: clamp(2.1rem, 4.2vw, 3.4rem); margin: 14px 0 18px; max-width: 16ch; }
.hero p { color: #d5cde2; font-size: 1.12rem; max-width: 46ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 1; }
.hero-sky { width: 100%; height: 100%; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 64px 72px; } .hero-visual { max-width: 340px; margin: 8px auto 0; } }

/* Sections */
.section { padding-block: 80px; }
.section-tight { padding-block: 56px; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* Feature grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft); }
.card h3 { font-size: 1.22rem; margin: 14px 0 8px; }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.card .ico { width: 34px; height: 34px; color: var(--gold); }

/* Form */
.tool { padding-block: 64px 96px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); max-width: 720px; margin-inline: auto; }
.form-card h2 { font-size: 1.5rem; margin: 0 0 6px; }
.form-hint { color: var(--muted); font-size: .92rem; margin: 0 0 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.cw-field { display: flex; flex-direction: column; gap: 6px; }
.cw-field.col-2 { grid-column: 1 / -1; }
.cw-field label { font-size: .86rem; font-weight: 560; color: var(--ink-soft); letter-spacing: .01em; }
.cw-field input[type="text"], .cw-field input[type="date"], .cw-field input[type="time"] {
  font-family: var(--font-sans); font-size: 1rem; color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cw-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.cw-field.has-error input { border-color: #c0514f; box-shadow: 0 0 0 3px rgba(192,81,79,.16); }
.cw-field .help { font-size: .82rem; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg label { display: inline-flex; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { padding: 10px 16px; font-size: .92rem; color: var(--ink-soft); cursor: pointer; border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.form-foot { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-foot .note { font-size: .86rem; color: var(--muted); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 22px; } }

/* Autocomplete */
.ac { position: relative; }
.ac ul { list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; z-index: 30; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 260px; overflow: auto; }
.ac li { padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: .95rem; }
.ac li:hover, .ac li.is-active { background: color-mix(in srgb, var(--gold) 14%, transparent); }

/* Report */
#cw-report { max-width: 820px; margin: 40px auto 0; }
.rp { display: flex; flex-direction: column; gap: 10px; }
.rp-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-soft); }
.rp-h2 { font-size: 1.5rem; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rp-h3 { font-size: 1.12rem; margin: 0 0 8px; }
.rp-lead { font-size: 1.15rem; color: var(--ink); font-family: var(--font-serif); margin: 0 0 12px; }
.rp-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rp-note { color: var(--ink-soft); font-size: .96rem; }
.rp-fine { color: var(--muted); font-size: .88rem; }
.rp-sub { color: var(--ink-soft); margin: 8px 0; }
.rp-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; margin: 14px 0; background: var(--paper-2); }
.rp-kw { color: var(--gold); font-size: .9rem; text-transform: lowercase; letter-spacing: .02em; margin: 8px 0 0; }
.rp-num { color: var(--gold); font-family: var(--font-serif); }
.rp-dist { color: var(--ink-soft); font-size: .95rem; margin: 14px 0; }
.rp-table-wrap { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.rp-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.rp-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.rp-aspects { margin: 8px 0; padding-left: 20px; }
.rp-aspects li { margin: 5px 0; color: var(--ink-soft); }
.rp-aspects li strong { color: var(--ink); }
.rp-year { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 12px 0; background: var(--paper-2); }
.rp-q { color: var(--ink-soft); padding-left: 20px; }
.rp-q li { margin: 8px 0; }
.rp-disclaimer { color: var(--muted); font-size: .88rem; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.rp-steps { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.rp-error { color: #b5423f; text-align: center; padding: 24px; }

/* Pills (labels) */
.pill { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 5px; vertical-align: middle; margin-right: 6px; }
.pill-data { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.pill-read { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.pill-prob { background: color-mix(in srgb, var(--plum) 18%, transparent); color: color-mix(in srgb, var(--plum) 72%, var(--ink)); }
.pill-missing { background: rgba(190,140,40,.16); color: #9a7324; }

.cw-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 44px; color: var(--muted); font-size: .9rem; margin-top: 40px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--gold); }

/* Print */
@media print {
  .site-head, .site-foot, .cw-actions, .tool-intro, form { display: none !important; }
  body { background: #fff; }
  .rp-section { break-inside: avoid; box-shadow: none; border-color: #ddd; }
}
