/* Syntalume shared subpage chrome.
   Every standalone page (account, purchase-success, legal, docs landers…)
   links ONLY this stylesheet and reuses the canonical chrome:

   <nav class="nav" aria-label="Primary navigation">
     <div class="nav-inner">
       <a class="brand" href="/" aria-label="Syntalume home"><img class="brand-lockup brand-lockup-on-dark" src="/assets/brand/syntalume-lockup-reversed.svg" width="149" height="29" alt="" /><img class="brand-lockup brand-lockup-on-light" src="/assets/brand/syntalume-lockup-primary.svg" width="149" height="29" alt="" /></a>
       <div class="nav-links">
         <a href="/#themes">Atmospheres</a>
         <a href="/#system">Features</a>
         <a href="/#faq">FAQ</a>
       </div>
       <div class="nav-actions"><a class="text-link" href="https://github.com/bertrandmbanwi/auralis-support#readme">Docs</a></div>
     </div>
   </nav>
   …
   <footer> — copy the .footer-grid block from account.html (same product and
   support links as index.html; marketplace URLs must not change).

   Skin: dark by default; light follows the SYSTEM preference via
   @media (prefers-color-scheme: light). Subpages have no skin toggle —
   only index.html carries the [data-skin] JS toggle. Tokens mirror
   css/site.css and scripts/audit.js SKINS; keep the three in sync. */

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

@font-face {
  font-family: 'Syntalume Product Icons';
  src: url('../fonts/auralis-product-icons.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  --page: #050506;
  --surface: #0c0d0e;
  --surface-raised: #111315;
  --ink: #f4f1eb;
  --muted: #aaa69e;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #72ead3;
  --accent-ink: #03120f;
  --cta: #72ead3;
  --cta-ink: #03120f;
  --cyan: #64d8d1;
  --coral: #ff7772;
  --green: #95cb54;
  --info: #64d8d1;
  --danger: #ff7772;
  --ok: #95cb54;
  --display: 'Manrope', system-ui, sans-serif;
  --brand: 'Manrope', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --page: #f1ece5;
    --surface: #faf7f2;
    --surface-raised: #ffffff;
    --ink: #302a25;
    --muted: #675f58;
    --line: rgba(48, 42, 37, 0.16);
    --accent: #b83b14;
    --accent-ink: #ffffff;
    --cta: #006f63;
    --cta-ink: #ffffff;
    --info: #00615c;
    --danger: #a72c17;
    --ok: #3f6b14;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  letter-spacing: 0;
}

/* Display-mode classes (flex/grid) must not defeat the hidden attribute —
   the portal steps and banners toggle entirely through [hidden]. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
summary {
  font: inherit;
}

button,
summary {
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid #64d8d1;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
}

.policy-content h2:not(:first-child) { margin-top: 28px; }
.policy-content p { margin-top: 12px; }

.eyebrow,
.footer-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.08;
}

h1 {
  font-size: 44px;
  font-weight: 520;
}

h2 {
  font-size: 22px;
  font-weight: 620;
}

h3 {
  font-size: 18px;
  font-weight: 640;
}

/* Product icon font (subset used by subpages) */
.ai {
  display: inline-block;
  flex: 0 0 auto;
  font-family: 'Syntalume Product Icons';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  speak: never;
}

.ai-arrow-right::before { content: '\ea04'; }
.ai-check::before { content: '\ea0f'; }
.ai-verified::before { content: '\ea0e'; }
.ai-copy::before { content: '\ea1e'; }
.ai-shield::before { content: '\ea4f'; }
.ai-account::before { content: '\ea3d'; }
.ai-clock::before { content: '\ea6a'; }
.ai-close::before { content: '\ea6d'; }

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  border-color: color-mix(in srgb, var(--cta) 60%, transparent);
  background: var(--cta);
  color: var(--cta-ink);
}

.button-primary:hover {
  box-shadow: 0 10px 30px color-mix(in srgb, var(--cta) 24%, transparent);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--muted);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.button-danger {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  color: var(--danger);
}

.button-danger:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.button-small {
  min-height: 36px;
  padding: 7px 15px;
  font-size: 12px;
}

.text-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--ink);
}

.support-link {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-link:hover {
  color: var(--ink);
}

/* --- Header ------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 62px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.nav-inner {
  width: min(1180px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.brand-lockup {
  width: 149px;
  height: auto;
  transition: transform 220ms var(--ease-out);
}

.brand-lockup-on-light {
  display: none;
}

.brand:hover .brand-lockup {
  transform: translateY(-1px) scale(1.015);
}

@media (prefers-color-scheme: light) {
  .brand-lockup-on-dark {
    display: none;
  }

  .brand-lockup-on-light {
    display: block;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Page scaffolding ---------------------------------------------------- */

.subpage-main {
  padding: 64px 0 96px;
}

.subpage-shell {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
}

.page-head {
  margin-bottom: 36px;
}

.page-head h1 {
  margin: 10px 0 14px;
}

.page-lede {
  max-width: 56ch;
  color: var(--muted);
  font-size: 17px;
}

.panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.panel + .panel {
  margin-top: 20px;
}

.step-title {
  margin-bottom: 6px;
}

.step-note {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

/* --- Forms --------------------------------------------------------------- */

.field {
  display: grid;
  gap: 6px;
  margin: 18px 0;
}

.field label {
  font-size: 14px;
  font-weight: 650;
}

.field input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 16px;
}

.field input:focus-visible {
  border-color: var(--cyan);
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.form-error {
  min-height: 1.4em;
  margin-top: 12px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

/* --- Notices and status states ------------------------------------------- */

.sandbox-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 12px 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 65%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 13px;
}

.sandbox-banner strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.notice {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
}

.notice p {
  max-width: 62ch;
}

.notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.notice-info {
  border-left-color: var(--info);
}

.notice-ok {
  border-left-color: var(--ok);
}

.notice-danger {
  border-left-color: var(--danger);
}

.notice-title {
  font-weight: 680;
}

.loading-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: subpage-spin 800ms linear infinite;
}

@keyframes subpage-spin {
  to { transform: rotate(360deg); }
}

/* --- License cards -------------------------------------------------------- */

.licenses-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.licenses-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.license-list {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.license-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.license-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.license-card-head h3 {
  margin-right: auto;
}

.badge {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-ok {
  border-color: color-mix(in srgb, var(--ok) 55%, transparent);
  color: var(--ok);
}

.badge-info {
  border-color: color-mix(in srgb, var(--info) 55%, transparent);
  color: var(--info);
}

.badge-danger {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  color: var(--danger);
}

.license-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 20px;
  margin: 0 0 18px;
}

.license-meta div {
  display: grid;
  gap: 2px;
}

.license-meta dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.license-meta dd {
  margin: 0;
  font-size: 14px;
}

.key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.license-key {
  flex: 1 1 240px;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.copy-feedback {
  min-height: 1.4em;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.license-notice {
  margin-top: 16px;
}

.device-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.device-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  text-transform: uppercase;
}

.device-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.device-table tr:last-child td {
  border-bottom: 0;
}

.device-confirm {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.device-status {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.card-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* --- Ordered next steps (purchase-success) -------------------------------- */

.next-steps {
  display: grid;
  gap: 16px;
  margin: 26px 0;
  padding-left: 0;
  list-style: none;
  counter-reset: next-step;
}

.next-steps li {
  position: relative;
  padding: 20px 22px 20px 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  counter-increment: next-step;
}

.next-steps li::before {
  content: counter(next-step, decimal-leading-zero);
  position: absolute;
  top: 22px;
  left: 22px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
}

.next-steps h2 {
  margin-bottom: 4px;
}

.next-steps p {
  color: var(--muted);
  font-size: 14px;
  max-width: 60ch;
}

.next-steps a {
  color: var(--ink);
}

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

footer {
  padding: 56px 0 34px;
  border-top: 1px solid var(--line);
  background: var(--page);
  color: var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 54px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-label {
  margin-bottom: 8px;
}

.footer-column a {
  font-size: 13px;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--accent);
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 700px) {
  h1 {
    font-size: 34px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .nav-inner {
    gap: 12px;
  }

  .subpage-main {
    padding: 44px 0 72px;
  }

  .panel,
  .license-card {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .copyright {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spinner {
    animation: none;
  }
}
