:root {
  color-scheme: light dark;
  --ink: #171816;
  --muted: #65675f;
  --paper: #f7f6f1;
  --surface: #ffffff;
  --soft: #eeece3;
  --line: #d9d6ca;
  --accent: #6756d8;
  --accent-deep: #4d3eb7;
  --success: #17613d;
  --warning: #7a4b00;
  --danger: #9a3028;
  --radius: 18px;
  --shadow: 0 18px 60px rgb(41 38 29 / 10%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, rgb(123 106 231 / 16%), transparent 36rem),
    var(--paper);
  line-height: 1.55;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-deep); }

button,
input { font: inherit; }

button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.62; }

/* The skip link is clipped to nothing until keyboard focus, not moved above the viewport: a full-page capture paints the area above the viewport, so a moved link shows there. */
.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 0.5rem;
}
.skip-link:not(:focus-visible) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Text read by assistive technology but not drawn, such as the version that completes a link's accessible name. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.site-header,
.account-nav,
.site-footer,
.page-section {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark { color: var(--accent); font-size: 0.9rem; }

.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav > a:not(.button),
.site-footer a { color: var(--muted); text-decoration: none; }

.site-footer {
  display: flex;
  min-height: 130px;
  margin-top: 5rem;
  padding-block: 2rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.page-section { padding-block: clamp(3rem, 8vw, 7rem); }
.page-section.narrow { max-width: 760px; }
.section-muted { position: relative; }
/* The muted band runs the full width of the window behind a centred section.
   `calc(50% - 50vw)` reaches each window edge exactly, where a negative
   viewport inset reached half a window past it and let the page scroll
   sideways. */
.section-muted::before {
  position: absolute;
  z-index: -1;
  inset: 1.5rem calc(50% - 50vw);
  content: "";
  background: rgb(255 255 255 / 45%);
  border-block: 1px solid var(--line);
}

.hero { max-width: 940px; text-align: center; }
.hero h1 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}
.hero-copy,
.lede {
  max-width: 680px;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-heading { margin-bottom: 2rem; }
.page-heading h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.page-heading .lede { margin-inline: 0; }

.hero .button-row { justify-content: center; margin-top: 2rem; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.button-row form { margin: 0; }
/* A status where a control would be ("Sales opening soon"): plain text, so it never looks pressable. */
.hero-note { color: var(--muted); font-weight: 700; }

.button {
  display: inline-flex;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.button-primary { color: white; background: var(--accent); }
.button-primary:hover { color: white; background: var(--accent-deep); }
.button-secondary,
.button-social { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button-small { min-height: 36px; padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.button-wide { width: 100%; }
.link-button {
  padding: 0;
  color: var(--accent-deep);
  background: none;
  border: 0;
  font-weight: 680;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.pricing-card {
  display: grid;
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.price { margin: 0; font-size: clamp(2.7rem, 8vw, 5rem); font-weight: 760; letter-spacing: -0.055em; }
.price span { font-size: 1rem; letter-spacing: 0; }
.price-note { margin: -0.5rem 0 0; color: var(--muted); }
.feature-list { display: grid; margin: 0; padding: 0; gap: 0.5rem; list-style: none; }
.feature-list li::before { margin-right: 0.6rem; color: var(--success); content: "✓"; }

.faq { margin-top: 5rem; }
.faq details { padding: 1rem 0; border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: var(--muted); }

.prose { font-size: 1.04rem; }
.prose h2 { margin: 2.5rem 0 0.5rem; letter-spacing: -0.02em; }
.prose p { color: #454740; }
.prose address { padding: 1rem; white-space: pre-line; background: var(--soft); border-radius: 0.7rem; font-style: normal; }
.contact-card { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.fine-print { color: var(--muted); font-size: 0.9rem; }

.status-slot:empty { display: none; }
.status-banner {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1rem;
  color: #30312d;
  background: #ebe9fa;
  border: 1px solid #cbc5f3;
  border-radius: 0.7rem;
}
.status-success { color: var(--success); background: #e5f3ea; border-color: #b7d9c3; }
.status-warning { color: var(--warning); background: #fff3d4; border-color: #e7ce93; }
.status-danger { color: var(--danger); background: #fae7e4; border-color: #edc1bb; }
.checkout-status .status-banner { margin: 1rem 0 0; }
.checkout-action { display: grid; justify-items: start; }

.auth-shell { width: min(480px, calc(100% - 2rem)); min-height: 65vh; margin: 0 auto; padding: 4rem 0; }
.auth-card { padding: clamp(1.4rem, 5vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card .page-heading h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
.social-buttons { display: grid; gap: 0.7rem; }
.divider { display: flex; margin: 1.5rem 0; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.8rem; }
.divider::before,
.divider::after { height: 1px; flex: 1; content: ""; background: var(--line); }

label { display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 680; }
input[type="email"],
input[type="password"],
input[type="text"],
input:not([type]) {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}
input:focus { outline: 3px solid rgb(103 86 216 / 22%); border-color: var(--accent); }
.auth-card form,
.stack-form { display: grid; gap: 1rem; }
/* As tall empty as with one line in it, so the card does not move when a message appears. */
.form-error { min-height: 1.45em; line-height: 1.45; margin: 0; color: var(--danger); font-size: 0.9rem; }
.form-error[data-tone="success"] { color: var(--success); }
.terms-line,
.auth-link,
.auth-switch { color: var(--muted); font-size: 0.9rem; text-align: center; }
/* A link kept on one line has one line's box; a link wrapped across two reads as overlapping the line under it. */
.terms-line a { white-space: nowrap; }
.turnstile-wrap { min-height: 65px; }

.account-nav {
  display: flex;
  padding-block: 0.8rem;
  justify-content: space-between;
  border-block: 1px solid var(--line);
}
.account-nav div { display: flex; gap: 1.25rem; }
.account-nav a { padding-bottom: 0.2rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.account-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.account-page { min-height: 55vh; }
.license-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.license-card,
.settings-section,
.key-panel,
.empty-state,
.summary-link {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}
.license-card-heading,
.license-detail-heading,
.key-panel,
.summary-link,
.linked-list > div,
.preference-row,
.download-list li,
.release-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.license-card h2,
.settings-section h2,
.key-panel h2 { margin: 0; font-size: 1.1rem; }
.status-pill { display: inline-flex; padding: 0.25rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 760; }
.status-active { color: var(--success); background: #e5f3ea; }
.status-lapsed { color: var(--warning); background: #fff3d4; }
.status-revoked { color: var(--danger); background: #fae7e4; }
.status-neutral { color: var(--muted); background: #efede8; }
.danger-copy { color: var(--danger); }
.muted-copy { color: var(--muted); }
.summary-link { margin-top: 1rem; text-decoration: none; }
.summary-link span:first-child { display: grid; }
.summary-link small { color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 2rem; }
.detail-list { display: grid; margin: 2rem 0; gap: 0; }
.detail-list > div { display: flex; padding: 0.9rem 0; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: right; }
.key-panel { margin-bottom: 1.5rem; }
.key-panel code { display: inline-block; margin-top: 0.4rem; overflow-wrap: anywhere; }
.key-panel { flex-wrap: wrap; }
.key-message { min-height: 1.45em; flex-basis: 100%; margin: 0; line-height: 1.45; color: var(--muted); font-size: 0.9rem; }
.key-message[data-tone="success"] { color: var(--success); }
.key-message[data-tone="danger"] { color: var(--danger); }

.settings-section { margin-bottom: 1rem; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.inline-form { display: grid; margin-top: 1rem; grid-template-columns: 1fr auto; align-items: end; gap: 0.75rem; }
.linked-list { display: grid; margin-top: 1rem; gap: 0.8rem; }
.linked-list > div { min-height: 42px; border-bottom: 1px solid var(--line); }
/* Centred like every other row, so the Save button sits level with the switch's label. */
.preference-row { margin-top: 1rem; }
.linked-provider { display: inline-flex; align-items: center; gap: 0.6rem; }
.banner-with-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.banner-with-action > :last-child { flex-shrink: 0; white-space: nowrap; }
.banner-with-action time { white-space: nowrap; }
.settings-section .banner-with-action { margin: 1rem 0 0; }
.preference-row label { display: flex; align-items: start; gap: 0.65rem; font-weight: 500; }

.download-list,
.release-list { margin: 0; padding: 0; list-style: none; }
.download-list li,
.release-list li { padding: 1rem 0; border-top: 1px solid var(--line); }
.download-list li > div,
.release-list li > div { display: grid; }
.download-list time,
.release-list time { color: var(--muted); font-size: 0.9rem; }
.locked-label { color: var(--warning); font-size: 0.9rem; }
.centered { text-align: center; }
.centered .page-heading h1,
.centered .lede { margin-inline: auto; }
.error-code { margin: 0; color: var(--accent); font-size: 5rem; font-weight: 800; line-height: 1; }

@media (max-width: 720px) {
  .site-header { align-items: flex-start; padding-block: 1rem; }
  .site-nav { flex-wrap: wrap; justify-content: flex-end; gap: 0.7rem; font-size: 0.85rem; }
  .site-footer,
  .license-detail-heading,
  .key-panel,
  .preference-row { align-items: flex-start; flex-direction: column; }
  .account-nav { overflow-x: auto; gap: 1.5rem; }
  .account-nav div { gap: 1rem; }
  .inline-form { grid-template-columns: 1fr; }
  .banner-with-action { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background 140ms ease, border-color 140ms ease, transform 140ms ease; }
  .button:hover { transform: translateY(-1px); }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f1e9;
    --muted: #aaa99f;
    --paper: #171816;
    --surface: #20211f;
    --soft: #292a27;
    --line: #3a3b36;
    --accent: #9688f1;
    --accent-deep: #b3a9fa;
    --success: #8ed5ac;
    --warning: #f0c36e;
    --danger: #f09b92;
    --shadow: 0 18px 60px rgb(0 0 0 / 28%);
  }
  .prose p { color: #cfcec6; }
  .status-banner { color: #e6e2ff; background: #302d49; border-color: #514a7e; }
  .status-success { color: #b7efcd; background: #173627; border-color: #285c40; }
  .status-warning { color: #f4d79d; background: #3b301c; border-color: #64502a; }
  .status-danger { color: #fac0ba; background: #422521; border-color: #704039; }
  .status-active { color: #b7efcd; background: #173627; }
  .status-lapsed { color: #f4d79d; background: #3b301c; }
  .status-revoked { color: #fac0ba; background: #422521; }
  .status-neutral { color: var(--muted); background: rgb(255 255 255 / 6%); }
  .section-muted::before { background: rgb(255 255 255 / 2%); }
}
