/* AstroNirnay Developer Portal: same brand as astronirnay.com (saffron + gold on ivory, Sora headings, pill buttons). */
:root {
  --saffron: #C84B00; --saffron-hover: #A33D00; --gold: #D4A017; --ink: #2C1A0E; --ivory: #FBFAF8; --white: #fff;
  --ink-soft: rgba(44, 26, 14, .72); --muted: rgba(44, 26, 14, .56);
  --bg: var(--ivory); --card: #fff; --line: rgba(44, 26, 14, .10); --line-soft: rgba(44, 26, 14, .06);
  --soft: #F6F1E8; --saffron-soft: rgba(200, 75, 0, .08); --gold-soft: rgba(212, 160, 23, .14);
  --ok: #2E7D4F; --ok-bg: #E8F4EC; --err: #B23A2E; --err-bg: rgba(178, 58, 46, .08); --warn-bg: #FFF4DC; --warn-line: #EBCB7A;
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(44, 26, 14, .07); --shadow-lg: 0 18px 46px rgba(44, 26, 14, .14);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
a { color: var(--saffron); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--saffron-hover); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: 2.4rem; font-weight: 700; } h2 { font-size: 1.7rem; font-weight: 700; } h3 { font-size: 1.02rem; font-weight: 600; }
code, pre { font-family: var(--font-mono); font-size: .86em; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid rgba(200, 75, 0, .35); outline-offset: 2px; border-radius: 8px; }

/* top bar */
.topbar { background: rgba(251, 250, 248, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 52px; width: auto; display: block; background: var(--ivory); }
.brand .tag { font-family: var(--font-head); font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); border: 1px solid rgba(200, 75, 0, .35); border-radius: 999px; padding: 3px 10px; background: var(--saffron-soft); white-space: nowrap; }
.topnav { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.topnav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.topnav a:hover, .topnav a.active { color: var(--saffron); background: var(--saffron-soft); }
.topnav a.btn { color: #fff; background: var(--saffron); padding: 10px 20px; margin-left: 6px; }
.topnav a.btn:hover { color: #fff; background: var(--saffron-hover); }
.topnav form { margin: 0; }
.chip { background: var(--gold-soft); border: 1px solid rgba(212, 160, 23, .45); border-radius: 999px; padding: 6px 14px; font-weight: 800; color: var(--ink) !important; text-decoration: none; font-variant-numeric: tabular-nums; }
.chip:hover { background: rgba(212, 160, 23, .24) !important; }
.chip.low { background: var(--warn-bg); border-color: var(--warn-line); }
@media (max-width: 720px) { .brand .tag { display: none; } .topnav a:not(.btn):not(.chip) { display: none; } .topnav a.btn { padding: 9px 16px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--saffron); border-radius: 999px; padding: 12px 24px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; background: var(--saffron); color: #fff; box-shadow: 0 8px 22px rgba(200, 75, 0, .18); transition: all .18s ease; }
.btn:hover { background: var(--saffron-hover); border-color: var(--saffron-hover); color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.outline { background: transparent; border-color: var(--line); color: var(--ink); box-shadow: none; }
.btn.outline:hover { color: var(--saffron); border-color: var(--saffron); background: var(--saffron-soft); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 8px 22px rgba(212, 160, 23, .25); }
.btn.gold:hover { background: #E2B02B; border-color: #E2B02B; color: var(--ink); }
.btn.small { padding: 7px 16px; font-size: .85rem; box-shadow: none; }
.btn.large { padding: 15px 30px; font-size: 16px; }
.btn.danger { background: #fff; border-color: rgba(178, 58, 46, .4); color: var(--err); box-shadow: none; }
.btn.danger:hover { background: var(--err); border-color: var(--err); color: #fff; }
.btn.link { background: none; border: none; padding: 8px 12px; color: var(--ink-soft); font-weight: 600; box-shadow: none; }
.btn.link:hover { color: var(--saffron); background: var(--saffron-soft); transform: none; }

/* hero (home) */
.hero { position: relative; overflow: hidden; padding: 76px 0 70px; background:
  radial-gradient(900px 420px at 85% -10%, rgba(212, 160, 23, .20), transparent 60%),
  radial-gradient(700px 380px at 5% 0%, rgba(200, 75, 0, .12), transparent 60%), var(--ivory); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero h1 { font-size: 3.1rem; font-weight: 800; letter-spacing: -.035em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--saffron), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 560px; margin: 0 0 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.hero .trust span::before { content: "✓"; color: var(--saffron); font-weight: 800; margin-right: 6px; }
.eyebrow { display: inline-block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 700; color: var(--saffron); background: var(--saffron-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 2.3rem; } .hero { padding: 48px 0 44px; } }

/* terminal-style code card */
.term { background: #20120A; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid rgba(255, 255, 255, .06); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #5a4636; display: block; }
.term-bar i:nth-child(1) { background: #C84B00; } .term-bar i:nth-child(2) { background: #D4A017; } .term-bar i:nth-child(3) { background: #6a8f5b; }
.term-bar span { margin-left: auto; color: rgba(255, 255, 255, .45); font-size: .75rem; font-family: var(--font-mono); }
.term pre { margin: 0; padding: 18px 20px; color: #F4E8D4; overflow: auto; line-height: 1.65; font-size: .82rem; }
.term pre .k { color: #E8A24A; } .term pre .s { color: #A8D08D; } .term pre .c { color: #8c7a68; } .term pre .n { color: #F4B183; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -34px; position: relative; z-index: 2; }
.stats > div { padding: 22px 24px; border-right: 1px solid var(--line-soft); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--font-head); font-size: 1.7rem; letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: .84rem; font-weight: 600; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); } }

/* sections */
.section { padding: 72px 0; }
.section.alt { background: var(--soft); }
.section.dark { background: var(--ink); color: #fff; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head p { color: var(--ink-soft); font-size: 1.04rem; margin: 0; }
.section.dark .section-head p { color: rgba(255, 255, 255, .7); }
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 920px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } h1 { font-size: 1.9rem; } .section { padding: 48px 0; } }
@media (max-width: 580px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* feature cards */
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: all .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(200, 75, 0, .25); }
.feature .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--saffron-soft), var(--gold-soft)); margin-bottom: 14px; color: var(--saffron); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* endpoint list */
.endpoints { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ep { display: grid; grid-template-columns: 74px minmax(0, 1.1fr) minmax(0, 1.6fr) 84px; gap: 14px; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--line-soft); }
.ep:last-child { border-bottom: 0; }
.ep:hover { background: var(--ivory); }
.ep .verb { font-family: var(--font-mono); font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-align: center; background: var(--saffron-soft); color: var(--saffron); }
.ep .verb.get { background: var(--gold-soft); color: #8A6508; }
.ep code { background: none; padding: 0; font-weight: 600; color: var(--ink); word-break: break-all; }
.ep .what { color: var(--ink-soft); font-size: .9rem; }
.ep .cost { text-align: right; font-weight: 800; font-family: var(--font-head); }
.ep .cost small { display: block; font-family: var(--font-body); font-weight: 600; color: var(--muted); font-size: .68rem; }
@media (max-width: 820px) { .ep { grid-template-columns: 60px 1fr 64px; } .ep .what { grid-column: 2 / 4; grid-row: 2; } }

/* pricing packs */
.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.pack { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.pack:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pack.featured { padding: 27px 23px 23px; border: 2px solid var(--saffron); box-shadow: var(--shadow-lg); background: linear-gradient(180deg, #FFF8F2 0%, #fff 38%); }
.pack .flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--saffron); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
.pack-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.pack-top h3 { margin: 0; font-size: 1.05rem; }
.pack .save { background: var(--ok-bg); color: var(--ok); border: 1px solid #BFE0CB; font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pack .price { font-family: var(--font-head); font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; margin: 14px 0 4px; line-height: 1.1; }
.pack .price small { font-family: var(--font-body); font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.pack .total { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.pack .total span { font-family: var(--font-body); font-weight: 600; color: var(--ink-soft); font-size: .92rem; }
.pack .rate { color: var(--saffron); font-weight: 700; font-size: .84rem; margin-top: 2px; }
.kv { margin: 20px 0 24px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: .88rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pack .btn { margin-top: auto; width: 100%; }
@media (max-width: 1000px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; } }
@media (max-width: 560px) { .packs { grid-template-columns: 1fr; } }

/* steps */
.steps { counter-reset: s; display: grid; gap: 14px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--saffron); color: #fff; font-family: var(--font-head); font-weight: 700; display: grid; place-items: center; }
.step b { display: block; font-family: var(--font-head); margin-bottom: 2px; }
.step span { color: var(--ink-soft); font-size: .92rem; }

/* faq */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 10px; }
.faq details[open] { box-shadow: var(--shadow); border-color: rgba(200, 75, 0, .25); }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--saffron); font-size: 1.3rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

/* call-to-action band */
.band { background: linear-gradient(120deg, var(--ink) 0%, #4a2a12 100%); color: #fff; border-radius: 28px; padding: 46px 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 160, 23, .35), transparent 70%); }
.band h2 { color: #fff; margin-bottom: 6px; } .band p { margin: 0; color: rgba(255, 255, 255, .72); }
.band .btn { position: relative; z-index: 1; }

/* cards, forms, tables (app + auth) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 10px rgba(44, 26, 14, .03); }
.card h3 { margin-bottom: 6px; }
.stat { font-family: var(--font-head); font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.stat small { font-family: var(--font-body); font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; display: block; margin-top: 4px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: .88rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select { width: 100%; padding: 12px 14px; border: 1px solid rgba(44, 26, 14, .18); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(200, 75, 0, .12); }
input[type=radio], input[type=checkbox] { accent-color: var(--saffron); }
.field-error { color: var(--err); font-size: .85rem; margin-top: 5px; font-weight: 600; }
.form-card { max-width: 480px; margin: 48px auto; padding: 34px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.form-card h1 { font-size: 1.7rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tbody tr:hover { background: var(--ivory); }
.table tbody tr:last-child td { border-bottom: 0; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--ivory); font-weight: 700; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.pos { color: var(--ok); font-weight: 800; } .neg { color: var(--err); font-weight: 800; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--ink-soft); }
.badge.ok { background: var(--ok-bg); border-color: #BFE0CB; color: var(--ok); } .badge.off { background: #F1ECE4; color: var(--muted); }
.flash { padding: 13px 18px; border-radius: 14px; margin: 18px 0; font-weight: 600; border: 1px solid transparent; }
.flash.success { background: var(--ok-bg); color: var(--ok); border-color: #BFE0CB; } .flash.error { background: var(--err-bg); color: var(--err); border-color: rgba(178, 58, 46, .25); } .flash.info { background: var(--warn-bg); border-color: var(--warn-line); }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 14px; padding: 14px 18px; margin: 14px 0; }
.keybox { background: #20120A; color: #F4E8D4; border-radius: 12px; padding: 14px 16px; word-break: break-all; font-family: var(--font-mono); font-size: .9rem; margin: 10px 0; }
pre.code { background: #20120A; color: #F4E8D4; border-radius: 14px; padding: 16px 18px; overflow: auto; line-height: 1.6; margin: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.spacer { height: 18px; }

/* app shell */
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 32px; padding: 30px 0 60px; }
.side { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: 0 2px 10px rgba(44, 26, 14, .03); }
.side a { text-decoration: none; padding: 10px 14px; border-radius: 12px; color: var(--ink-soft); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.side a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.side a:hover { background: var(--saffron-soft); color: var(--saffron); }
.side a.active { background: var(--ink); color: #fff; }
.side a.active svg { opacity: 1; color: var(--gold); }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; } .side { position: static; flex-direction: row; overflow-x: auto; padding: 6px; border-radius: 999px; } .side a { white-space: nowrap; padding: 8px 14px; } .side a svg { display: none; } }
.footer { border-top: 1px solid var(--line); background: #fff; padding: 40px 0 34px; color: var(--muted); font-size: .88rem; }
.footer .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.footer a:hover { color: var(--saffron); }
.footer .fine { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .85rem; background: #fff; }
.pill:hover { border-color: var(--saffron); color: var(--saffron); }
.pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-title { font-size: 1.7rem; margin-bottom: 4px; }

/* mobile safety: grid children may shrink, code blocks scroll inside their card */
.hero-grid > *, .grid > *, .packs > * { min-width: 0; }
.term { max-width: 100%; }
@media (max-width: 920px) { .stats { margin-top: 0; } }
