:root {
  color-scheme: dark;
  --bg: #0b1022; --bg-deep: #070b18; --surface: #151e38;
  --surface-strong: #10182d; --surface-soft: #1b2846;
  --text: #edf5ff; --text-strong: #fff; --muted: #b7c8e0; --muted-soft: #a0b5d1;
  --accent: #53cbf3; --accent-strong: #91dfff; --accent-deep: #5478ff;
  --accent-soft: rgba(83,203,243,.14); --accent-glow: rgba(83,203,243,.25);
  --border: #344460; --border-strong: #516783; --radius-xl: 24px; --radius-lg: 20px;
}
body.app-surface { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.app-surface *, .app-surface *::before, .app-surface *::after { box-sizing: border-box; }
.app-surface [hidden] { display: none !important; }
.app-surface a { color: var(--accent); }
.app-header { border-bottom: 1px solid var(--border); background: var(--surface-strong); }
.app-header-inner, .app-content, .app-footer { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.app-header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-block: 18px; }
.app-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; color: var(--text) !important; }
.app-brand img { width: 38px; height: 38px; border-radius: 10px; }
.app-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); }
.app-nav [aria-current='page'] { background: var(--accent-soft); color: var(--accent); }
.app-content { padding-block: 36px 64px; }
.app-content h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.035em; }
.app-content h2 { font-size: 1.35rem; line-height: 1.3; margin: 0 0 12px; }
.app-content p { color: var(--muted); max-width: 65ch; }
.app-eyebrow { color: var(--accent) !important; font-weight: 700; margin-bottom: 10px; }
.app-button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; min-height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text) !important; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.app-button.primary { background: var(--accent); color: #092138 !important; border-color: transparent; }
.app-button.danger { background: #b22b40; border-color: #e66477; color: white !important; }
.app-button:disabled { opacity: .5; cursor: default; }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.app-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.app-feature-grid, .catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 20px; margin-block: 24px; }
.catalog-card { display: flex; flex-direction: column; gap: 12px; min-height: 235px; }
.catalog-card .app-button { align-self: flex-start; margin-top: auto; }
.catalog-card p { margin: 0; }
.catalog-chip { width: fit-content; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: .875rem; }
.catalog-controls { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.catalog-controls label, .app-form label { display: grid; gap: 6px; flex: 1; font-weight: 600; }
.app-surface input, .app-surface select { font: inherit; min-height: 46px; width: 100%; padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; }
.app-form { display: grid; gap: 18px; max-width: 480px; }
.app-form input[type='checkbox'] { width: 22px; min-height: 22px; }
.app-form .check-label { display: flex; align-items: flex-start; gap: 12px; }
.app-status { min-height: 1.6em; }
.app-status.error { color: #ffb6c1; }
.app-callout { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 32px; background: linear-gradient(110deg, #152665, #152740); }
.app-callout p { margin-bottom: 0; }
.app-footer { display: flex; flex-wrap: wrap; gap: 20px; padding-block: 24px; border-top: 1px solid var(--border); }
.app-surface dialog { color: var(--text); background: var(--surface); width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--border-strong); border-radius: 20px; padding: 28px; }
.app-surface dialog::backdrop { background: #000b; }
.app-surface :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.app-skip { position: absolute; top: -100px; left: 16px; padding: 10px; background: var(--surface); z-index: 100; }
.app-skip:focus { top: 12px; }
/* Carry the native palette and typography onto the existing home/account surfaces. */
body.landing-page, body.account-page { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); }
.landing-page h1, .landing-page h2, .landing-page h3, .account-page h1, .account-page h2 { font-family: inherit; }
.landing-page .hero-title em { color: var(--accent); font-style: normal; }
.landing-page .hero-title { font-size: clamp(2.6rem, 5.5vw, 4.75rem); }
.landing-page .hero-banner { border-radius: 20px; }
.landing-page .button--primary, .account-page .button--primary { background: var(--accent); color: #092138; }
@media (max-width: 600px) {
  .app-header-inner, .app-content, .app-footer { width: calc(100% - 28px); }
  .app-nav { width: 100%; justify-content: space-between; gap: 4px; font-size: .875rem; }
  .app-nav a { padding: 10px 8px; }
  .app-panel { padding: 20px; }
}

.landing-page::before, .account-page::before { background: radial-gradient(ellipse at 15% 20%, rgba(17,31,162,.22), transparent 60%); animation: none; }
.landing-page .button--primary, .account-page .button--primary { box-shadow: none; text-shadow: none; }
.landing-page .hero-banner { flex-wrap: wrap; }
.landing-page .hero-banner__meta { flex: 1 1 480px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.landing-page .hero-banner__meta > .eyebrow { flex-basis: 100%; text-align: right; }
.account-page #accountDeletionTitle { color: #ffb6c1; }
@media (max-width: 600px) { .landing-page .hero-banner__meta { justify-content: flex-start; } .landing-page .hero-banner__meta > .eyebrow { text-align: left; } }
