:root {
  color-scheme: light dark;
  --canvas: #f3f5fa;
  --surface: #fff;
  --ink: #1a2033;
  --muted: #555f76;
  --line: #dce1ed;
  --accent: #5136b1;
  --accent-strong: #42298f;
  --wash: #ede8fd;
  --ok: #14583e;
  --ok-bg: #e6f4ec;
  --error: #9c2a43;
  --error-bg: #fbeef1;
  font: 16px/1.5 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #131625;
    --surface: #1c2134;
    --ink: #f2f1fc;
    --muted: #bdc3da;
    --line: #393f59;
    --accent: #d4c7ff;
    --accent-strong: #e1d8ff;
    --wash: #342853;
    --ok: #a7ecc8;
    --ok-bg: #1d3c36;
    --error: #ffc2ce;
    --error-bg: #482737;
  }
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 720; line-height: 1.04; letter-spacing: -.06em; }
h2 { font-size: clamp(1.42rem, 3vw, 1.85rem); line-height: 1.15; letter-spacing: -.04em; }
h3 { font-size: 1.05rem; line-height: 1.35; }
p { color: var(--muted); }
.page { width: min(1110px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar, .brand, .header-actions, .language, .title-row { display: flex; align-items: center; }
.bar { justify-content: space-between; gap: .75rem; min-height: 72px; }
.brand { color: var(--ink); text-decoration: none; gap: .62rem; }
.brand strong { letter-spacing: -.035em; font-size: 1.13rem; }
.mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; background: #5034b7; color: #fff; font-weight: 800; }
.brand-section { border-inline-start: 1px solid var(--line); padding-inline-start: .62rem; color: var(--muted); font-size: .88rem; }
.header-actions { gap: .75rem; flex-wrap: wrap; }
.language { gap: .25rem; }
.language a { padding: .38rem .55rem; border-radius: .55rem; font-size: .84rem; text-decoration: none; }
.language a[aria-current] { background: var(--wash); color: var(--accent); font-weight: 700; }
.access { max-width: 930px; min-height: 60vh; padding: 5rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5.5rem); align-items: start; }
.welcome { padding: 1.5rem 0; }
.welcome p, .intro p { margin-top: 1rem; font-size: 1.1rem; max-width: 36ch; overflow-wrap: anywhere; }
.dashboard { padding-top: 3.25rem; }
.intro { border-bottom: 1px solid var(--line); padding-bottom: 2rem; }
.account-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: min(5vw, 52px); margin-top: 1.5rem; }
.section-nav { position: sticky; top: 1.25rem; display: grid; gap: .35rem; padding: .6rem 0; }
.section-nav a { font-weight: 600; text-decoration: none; padding: .6rem .8rem; border-radius: .65rem; }
.section-nav a:hover, .section-nav a:focus-visible { background: var(--wash); }
.panels { display: grid; gap: 1rem; min-width: 0; }
.panel { padding: clamp(1.2rem, 4vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1.15rem; overflow-wrap: anywhere; }
.panel > * + * { margin-top: 1rem; }
form { display: grid; gap: .85rem; justify-items: start; }
form label { display: grid; gap: .36rem; width: 100%; font-size: .91rem; font-weight: 650; }
input:not([type=hidden]) { color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: .55rem; width: 100%; max-width: 44rem; min-height: 45px; padding: .5rem .75rem; }
input.key { font-family: ui-monospace, monospace; }
button { min-height: 42px; border-radius: .6rem; padding: .5rem .85rem; cursor: pointer; font-weight: 650; }
.primary { border: 1px solid var(--accent); background: var(--accent); color: var(--surface); }
.primary:hover { background: var(--accent-strong); }
.quiet { color: var(--accent); background: var(--surface); border: 1px solid var(--line); }
.quiet:hover { background: var(--wash); }
.panel:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.identity { margin-bottom: 0; }
.identity dt { font-weight: 650; font-size: .91rem; }
.identity dd { margin: .25rem 0 0; }
.status { display: inline-block; border-radius: 99px; padding: .2rem .55rem; font-size: .79rem; font-weight: 650; color: var(--muted); background: var(--canvas); }
.status.active, .feedback.success { background: var(--ok-bg); color: var(--ok); }
.hint { font-size: .93rem; }
.feedback { padding: .7rem .85rem; border-radius: .55rem; }
.feedback.error { background: var(--error-bg); color: var(--error); }
.security-section { border-top: 1px solid var(--line); padding-top: 1rem; }
.security-section > * + *, .security-section form + form { margin-top: .8rem; }
.title-row { justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; width: 100%; }
.service-list { padding: 0; list-style: none; }
.service-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); padding: .65rem 0; }
.service-list small { display: block; color: var(--muted); }
.footer { margin-top: 2rem; border-top: 1px solid var(--line); padding-block: 1.1rem 2rem; font-size: .9rem; }
.skip { position: fixed; top: -100px; left: 1rem; background: var(--surface); padding: .5rem; z-index: 1; }
.skip:focus { top: .5rem; }
@media (max-width: 720px) {
  .page { width: calc(100% - 32px); }
  .access, .account-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .access { padding: 2rem 0; }
  .dashboard { padding-top: 2rem; }
  .section-nav { position: static; display: flex; flex-wrap: wrap; padding: 0; }
  .section-nav a { padding: .4rem .5rem; }
}
@media (max-width: 460px) {
  .brand-section { display: none; }
  .fields { grid-template-columns: 1fr; }
}
