/* KeyRota site — dark, fast, no frameworks. */
:root {
  --bg: #090b10;
  --bg-2: #0e1118;
  --surface: #131722;
  --surface-2: #1a1f2c;
  --border: #252b3b;
  --border-strong: #343c52;
  --text: #e9ecf3;
  --muted: #9aa3b7;
  --faint: #6b7489;
  --accent: #f5b942;
  --accent-2: #ff7a3d;
  --accent-ink: #1a1204;
  --cool: #63c7ff;
  --ok: #3ddc84;
  --warn: #ffcc4d;
  --danger: #ff6464;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1000px 520px at 85% -120px, rgba(255, 122, 61, .13), transparent 60%),
    radial-gradient(900px 500px at -10% 0, rgba(99, 199, 255, .08), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
kbd {
  background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: .05em .4em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 11, 16, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(37, 43, 59, .7);
}
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); text-decoration: none; }
.nav .btn { margin-left: 6px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer;
}
@media (max-width: 760px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav { display: none; }
  .js .nav.open {
    display: flex; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; gap: 2px;
  }
  .js .nav.open a { padding: 12px; }
  .js .nav.open .btn { margin: 8px 0 0; }
  .nav { flex-wrap: wrap; }
}

/* --- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 11px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease, opacity .12s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 8px 26px rgba(255, 122, 61, .25); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-small { padding: 8px 14px; font-size: .9rem; border-radius: 9px; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 100, 100, .4); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- sections ------------------------------------------------------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* --- hero --------------------------------------------------------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; gap: 48px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .btn-row { margin: 28px 0 18px; }
.hero-note { color: var(--faint); font-size: .92rem; }

/* plaque mock-up */
.plaque-demo {
  position: relative; border-radius: 20px; padding: 26px; background: linear-gradient(160deg, #161b27, #0d1018);
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.plaque-demo::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 90%;
  background: radial-gradient(closest-side, rgba(245, 185, 66, .18), transparent); pointer-events: none;
}
.plaque-title { display: flex; justify-content: space-between; color: var(--faint); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.plaque-row { display: grid; grid-template-columns: 88px 1fr; gap: 18px; align-items: center; }
.slot {
  width: 88px; height: 88px; border-radius: 14px; display: grid; place-items: center; position: relative;
  background: linear-gradient(145deg, #2c2f3a, #171a22); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 185, 66, .12), inset 0 0 22px rgba(245, 185, 66, .25);
  font: 800 1.6rem var(--mono); color: var(--accent);
}
.slot small { position: absolute; right: 6px; bottom: 4px; font: 700 .72rem var(--font); color: var(--text); background: rgba(0, 0, 0, .55); padding: 1px 5px; border-radius: 5px; }
.plaque-label { font-weight: 700; font-size: 1.05rem; }
.plaque-sub { color: var(--muted); font-size: .9rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.card-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; font-size: .82rem; }
.card-mini b { display: block; font-size: .92rem; }
.card-mini .tag { color: var(--faint); }
.card-mini.on { border-color: rgba(61, 220, 132, .45); }
.card-mini.on .tag { color: var(--ok); }
.plaque-foot { margin-top: 16px; display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: .8rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* --- grids & cards -------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.card .muted { font-size: .97rem; }
.icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(245, 185, 66, .1); color: var(--accent); border: 1px solid rgba(245, 185, 66, .25);
}
.icon svg { width: 22px; height: 22px; }
.step-num { font: 800 .85rem var(--mono); color: var(--accent); letter-spacing: .1em; margin-bottom: 10px; display: block; }

/* screenshots */
.shots { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shots figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-2); }
.shots figcaption { padding: 12px 16px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--border); }

/* callouts */
.callout { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--border-strong); background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { border-color: rgba(255, 204, 77, .45); background: linear-gradient(0deg, rgba(255, 204, 77, .06), rgba(255, 204, 77, .06)), var(--surface); }
.callout-warn strong:first-child { color: var(--warn); }
.callout-danger { border-color: rgba(255, 100, 100, .45); background: linear-gradient(0deg, rgba(255, 100, 100, .07), rgba(255, 100, 100, .07)), var(--surface); }
.callout-ok { border-color: rgba(61, 220, 132, .4); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 1.4rem; color: var(--muted); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 16px; color: var(--muted); }
.faq details.risk { border-color: rgba(255, 204, 77, .45); }
.faq details.risk summary { color: var(--warn); }

/* pricing */
.plans { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 860px) { .plans { grid-template-columns: 1.15fr .85fr; } }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border-color: rgba(245, 185, 66, .55); box-shadow: 0 0 0 1px rgba(245, 185, 66, .25), var(--shadow); }
.plan .badge { position: absolute; top: 18px; right: 18px; }
.price { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; }
.checklist { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(61, 220, 132, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%233ddc84'%3E%3Cpath d='M8.1 13.4 4.7 10l-1.2 1.2 4.6 4.6 9.4-9.4-1.2-1.2z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.plan .btn { margin-top: auto; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--muted); }
.badge-accent { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; }
.badge-ok { color: var(--ok); border-color: rgba(61, 220, 132, .45); background: rgba(61, 220, 132, .08); }
.badge-warn { color: var(--warn); border-color: rgba(255, 204, 77, .45); background: rgba(255, 204, 77, .08); }
.badge-danger { color: var(--danger); border-color: rgba(255, 100, 100, .45); background: rgba(255, 100, 100, .08); }

/* download / code */
.cmd {
  display: flex; align-items: stretch; gap: 0; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden;
  background: #06080c; margin: 14px 0;
}
.cmd code { flex: 1; padding: 14px 16px; color: #d7f0ff; overflow-x: auto; white-space: nowrap; }
.cmd code::before { content: "$ "; color: var(--faint); }
.cmd button { border: 0; border-left: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 .9rem var(--font); padding: 0 16px; cursor: pointer; }
.cmd button:hover { background: var(--border); }
ol.steps { padding-left: 1.3em; margin: 0 0 1em; display: grid; gap: 8px; }
ol.steps li::marker { color: var(--accent); font-weight: 700; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .92rem; margin: 14px 0; }
.meta dt { color: var(--faint); }
.meta dd { margin: 0; word-break: break-all; }
.meta dd code { font-size: .85rem; color: var(--muted); }
.anchor-target { scroll-margin-top: 84px; }

/* account */
.panel { max-width: 560px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.input {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg-2); color: var(--text); font: 1rem var(--font);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 185, 66, .2); }
.input.code { font: 700 1.5rem var(--mono); letter-spacing: .35em; text-align: center; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: .95rem; border: 1px solid var(--border-strong); background: var(--surface-2); }
.alert[hidden] { display: none; }
.alert-error { border-color: rgba(255, 100, 100, .5); color: #ffd0d0; background: rgba(255, 100, 100, .08); }
.alert-ok { border-color: rgba(61, 220, 132, .45); color: #c9f7dc; background: rgba(61, 220, 132, .07); }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 8px 18px; margin: 16px 0; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
.devices { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.devices li { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; }
.devices .dev-name { font-weight: 650; }
.devices .dev-meta { color: var(--faint); font-size: .85rem; }
.account-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .account-grid { grid-template-columns: 1fr 1fr; } }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--faint); font-size: .9rem; margin-top: 40px; }
.site-footer .container { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-footer .container { grid-template-columns: 1.4fr 1fr; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }
.disclaimer { max-width: 620px; }

/* utilities */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 24px; }
.stack > * + * { margin-top: 16px; }
.cta-band { background: linear-gradient(135deg, rgba(245, 185, 66, .12), rgba(255, 122, 61, .07)); border: 1px solid rgba(245, 185, 66, .3); border-radius: 20px; padding: 36px 28px; display: grid; gap: 16px; align-items: center; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; padding: 44px; } }
.cta-band h2 { margin-bottom: 6px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.btn-row-center { justify-content: center; }
.center .lead { margin-left: auto; margin-right: auto; }
/* let long commands / hashes scroll or wrap instead of widening grid cells */
.grid > *, .plans > *, .account-grid > *, .hero-grid > * { min-width: 0; }
.cmd code { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: manual; -webkit-hyphens: manual; }
p code, li code, dd code { overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* keys */
.key-options { margin-bottom: 20px; }
.key-options .price { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.price-note { font-size: 1.35rem; color: var(--muted); }
.input-key { font: 600 1.15rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.input-key::placeholder { text-transform: none; color: var(--faint); letter-spacing: .04em; }
@media (max-width: 420px) { .input-key { font-size: .9rem; letter-spacing: 0; padding: 13px 10px; } }

/* Compact landing and installation guide. */
.hero-note { color: var(--muted); }
.app-preview { width: 100%; height: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.compact-head { margin-bottom: 24px; }
.site-footer .container.compact-footer { grid-template-columns: 1fr; gap: 18px; }
.compact-footer .footer-links { align-items: center; gap: 12px 24px; }
.compact-footer [data-support] { color: var(--muted); }
.guide { max-width: 880px; }
.setup-list { margin: 0; padding: 0; list-style: none; counter-reset: setup; }
.setup-list > li { position: relative; padding: 0 0 28px 54px; counter-increment: setup; }
.setup-list > li::before { content: counter(setup); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-weight: 700; }
.setup-list h2, .guide-update h2 { font-size: 1.35rem; margin-bottom: 12px; }
.guide-update { padding: 24px; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.plain-list { padding-left: 20px; display: grid; gap: 8px; }
.manual-download { max-width: none; }
.key-options { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 880px; }
.key-options .plan { gap: 18px; }
@media (max-width: 600px) {
  .hero { padding: 40px 0; }
  .hero-grid { gap: 28px; }
  .section { padding: 40px 0; }
  .section-tight { padding: 32px 0; }
  .setup-list > li { padding-left: 42px; }
  .setup-list > li::before { width: 28px; height: 28px; }
  .key-options { grid-template-columns: 1fr; }
  .cmd { flex-direction: column; }
  .cmd code { white-space: normal; overflow-wrap: anywhere; }
  .cmd button { min-height: 44px; border-left: 0; border-top: 1px solid var(--border-strong); }
  .compact-footer .footer-links { align-items: flex-start; }
}

/* Log data page (profiles). */
.profiles-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.profiles-head h2 { font-size: 1.35rem; margin-bottom: 0; }
.profile-classes { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .profile-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.profile-class { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.profile-class h3 { margin-bottom: 12px; }
.profile-specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.profile-specs li { padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-2); }
.profile-spec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.profile-spec-name { font-weight: 650; }
.profile-spec-meta { margin: 4px 0 0; color: var(--faint); font-size: .88rem; }
