:root {
  color-scheme: dark;
  --ink: #f7f8f8;
  --muted: #b9c5c8;
  --night: #0b1113;
  --panel: #111a1d;
  --line: #3b4c50;
  --teal: #48d2bd;
  --yellow: #f4c64d;
  --red: #ef5a52;
  --blue: #70a5e8;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--ink); font: 17px/1.5 system-ui, sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { min-height: 44px; padding: 8px 14px; border: 1px solid #607176; border-radius: 5px; background: #172326; color: var(--ink); cursor: pointer; }
button:hover, button:focus-visible { border-color: var(--yellow); outline: none; }
button:disabled { cursor: not-allowed; opacity: .55; }
button.primary, [aria-selected="true"] { border-color: var(--teal); background: #173632; }
input, textarea { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #607176; border-radius: 4px; background: #080d0f; color: var(--ink); }
input:focus, textarea:focus { border-color: var(--teal); outline: 2px solid rgba(72, 210, 189, .3); }
label { display: grid; gap: 5px; color: var(--muted); font-weight: 650; }
h1, h2 { line-height: 1.15; }
h1 { margin: 5px 0 8px; font-size: clamp(2rem, 8vw, 3.5rem); }
h2 { margin: 0; font-size: 1.25rem; }
.skip { position: absolute; top: -80px; left: 12px; z-index: 5; padding: 10px; background: var(--yellow); color: #111; }
.skip:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: #0d1517; }
.header-inner, .page-main { width: min(960px, calc(100% - 28px)); margin: 0 auto; }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 850; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.language { display: flex; gap: 4px; }
.language button { min-width: 48px; padding: 6px; }
.page-main { padding: 30px 0 60px; }
.page-heading { margin-bottom: 24px; }
.eyebrow { margin: 0; color: var(--yellow); font: 750 .82rem/1.4 ui-monospace, monospace; text-transform: uppercase; }
.status { min-height: 1.5em; margin: 0; color: var(--muted); }
.status.error { color: #ff9a94; }
.status.success { color: #7ce5ce; }
.auth-tabs, .section-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.form-panel, .section-panel { border-top: 3px solid var(--teal); background: var(--panel); padding: 20px; }
.form-panel { display: grid; max-width: 620px; gap: 16px; }
.form-panel[hidden], .section-panel[hidden], [hidden] { display: none !important; }
.consent { grid-template-columns: 24px 1fr; align-items: start; font-weight: 500; }
.consent input { width: 20px; min-height: 20px; margin-top: 3px; }
.identity-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 0; border-block: 1px solid var(--line); }
.identity-strip div { display: grid; color: var(--muted); }
.identity-strip strong { overflow-wrap: anywhere; color: var(--ink); font-size: 1.2rem; }
.identity-strip code { color: var(--yellow); }
.handoff-panel { display: grid; gap: 14px; margin-bottom: 22px; padding: 18px; border: 2px solid var(--yellow); background: #111a1d; }
.handoff-panel p { margin: 0; }
.handoff-panel dl { display: grid; gap: 8px; margin: 0; }
.handoff-panel dl div { display: grid; grid-template-columns: minmax(130px, .45fr) 1fr; gap: 12px; }
.handoff-panel dt { color: var(--muted); font-weight: 700; }
.handoff-panel dd { margin: 0; overflow-wrap: anywhere; }
.handoff-panel code { color: var(--yellow); font: 850 1.35rem/1.2 ui-monospace, monospace; }
.section-panel { display: grid; gap: 26px; }
.section-panel section { display: grid; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-heading, .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.compact-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.item-list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 0; border-bottom: 1px solid #2d3b3e; }
.item-main { display: grid; min-width: 0; }
.item-main strong, .item-main span { overflow-wrap: anywhere; }
.item-main span, .empty { color: var(--muted); font-size: .88rem; }
.danger { border-left: 4px solid var(--red); padding-left: 14px; }
dialog { width: min(620px, calc(100% - 28px)); padding: 0; border: 1px solid #66777b; border-radius: 6px; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .76); }
.secret-dialog { display: grid; gap: 14px; padding: 20px; }
.secret-dialog textarea { min-height: 230px; resize: vertical; font: 700 .9rem/1.45 ui-monospace, monospace; }
.section-panel section:last-child { padding-bottom: 0; border-bottom: 0; }
.section-heading, .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.compact-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 12px; max-width: 620px; }
.item-list { display: grid; gap: 7px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px 10px; border-left: 3px solid var(--blue); background: #0c1315; }
.item-main { display: grid; min-width: 0; }
.item-main strong, .item-main span { overflow-wrap: anywhere; }
.item-main span { color: var(--muted); font: 650 .79rem/1.4 ui-monospace, monospace; }
.empty { color: var(--muted); }
.danger { border-left: 3px solid var(--red); padding-left: 14px; }
dialog { width: min(660px, calc(100% - 28px)); border: 1px solid var(--yellow); border-radius: 6px; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .75); }
.secret-dialog { display: grid; gap: 14px; }
.secret-dialog textarea { min-height: 230px; resize: vertical; font: 700 .9rem/1.45 ui-monospace, monospace; }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .page-main { padding-top: 22px; }
  .identity-strip { grid-template-columns: 1fr auto; }
  .identity-strip code { grid-column: 1 / -1; grid-row: 2; }
  .compact-form { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; }
  .item button { justify-self: start; }
  .identity-strip { grid-template-columns: 1fr; align-items: start; }
  .identity-strip code { overflow-wrap: anywhere; }
  .identity-strip button { justify-self: start; }
  .handoff-panel dl div { grid-template-columns: 1fr; gap: 2px; }
}
