:root {
  color-scheme: light;
  --navy: #142b45;
  --navy-soft: #203c5c;
  --ink: #1c2a39;
  --muted: #667584;
  --border: #dce4eb;
  --canvas: #f4f7fa;
  --white: #fff;
  --amber: #8a421b;
  --amber-bg: #fff4e4;
  --green: #28634b;
  --green-bg: #e9f4ed;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); min-height: 100vh; }
button, a { font: inherit; }
.skip-link { position: fixed; top: -50px; left: 1rem; z-index: 10; background: white; padding: .75rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: .75rem; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: .75rem clamp(1rem, 3vw, 2.5rem); color: white; background: var(--navy); box-shadow: 0 3px 14px #152d4514; }
.brand-lockup { display: flex; align-items: center; gap: .75rem; }
.brand-lockup strong { display: block; font-size: 1.15rem; letter-spacing: .01em; }
.brand-lockup span { display: block; margin-top: .15rem; color: #bdccda; font-size: .8rem; }
.environment { display: flex; align-items: center; gap: .55rem; color: #d7e0e8; font-size: .72rem; font-weight: 750; letter-spacing: .09em; }
.environment-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #eebc5e; box-shadow: 0 0 0 4px #eebc5e22; }
.menu-toggle { display: none; color: white; background: transparent; border: 1px solid #ffffff5c; border-radius: .55rem; padding: .6rem .8rem; }
.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); max-width: 1440px; min-height: calc(100vh - 120px); margin: 0 auto; }
.sidebar { display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem 1rem; border-right: 1px solid var(--border); background: #fbfcfd; }
.nav-item { display: flex; align-items: center; gap: .8rem; padding: .78rem .85rem; color: #526172; text-decoration: none; border-radius: .65rem; font-size: .92rem; font-weight: 650; }
.nav-item span { width: 1.2rem; color: #8190a0; font-size: 1.1rem; text-align: center; }
.nav-item:hover, .nav-item.active { color: var(--navy); background: #eaf0f5; }
.nav-item.active span { color: var(--navy); }
.sidebar-note { margin-top: auto; padding: 1rem .8rem .35rem; color: var(--muted); border-top: 1px solid var(--border); font-size: .78rem; line-height: 1.45; }
.sidebar-note strong, .sidebar-note span { display: block; }
.sidebar-note strong { margin-bottom: .3rem; color: var(--ink); }
.main-content { min-width: 0; padding: clamp(1.25rem, 3.5vw, 3rem); }
.page-section { max-width: 1120px; margin: 0 auto; }
.hidden { display: none !important; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.55rem; }
.eyebrow { margin: 0 0 .55rem; color: #61768a; font-size: .7rem; font-weight: 800; letter-spacing: .13em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .45rem; color: var(--ink); font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: .35rem; font-size: 1.1rem; letter-spacing: -.015em; }
.lead { margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.pill, .tag { display: inline-flex; align-items: center; width: max-content; border-radius: 99px; padding: .5rem .8rem; color: #42596f; background: #eaf0f4; font-size: .8rem; font-weight: 750; white-space: nowrap; }
.notice { display: flex; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: .9rem; }
.notice-amber { color: #693820; background: var(--amber-bg); border: 1px solid #f3dfbf; }
.notice-icon { display: grid; flex: 0 0 1.7rem; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; color: white; background: #af602e; font-size: .95rem; font-weight: 900; }
.notice strong { display: block; margin: .05rem 0 .3rem; font-size: .95rem; }
.notice p { margin: 0; color: #805438; font-size: .86rem; line-height: 1.55; }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin: 1rem 0; }
.status-card { display: flex; flex-direction: column; min-height: 132px; padding: 1.05rem; border: 1px solid var(--border); border-radius: .85rem; background: var(--white); box-shadow: 0 5px 16px #182c3c08; }
.status-label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.status-card strong { margin: .55rem 0 .35rem; font-size: 1.15rem; }
.status-card > span:last-child { color: #7a8794; font-size: .75rem; line-height: 1.4; }
.status-pending { color: #91631f; }
.panel { margin-top: 1rem; padding: clamp(1rem, 2vw, 1.45rem); border: 1px solid var(--border); border-radius: .9rem; background: var(--white); box-shadow: 0 5px 20px #182c3c08; }
.vault-status { padding: .75rem .9rem; color: #354b5f; border-radius: .65rem; background: #edf3f7; font-weight: 700; line-height: 1.45; }
.vault-status[data-state="authorized"], .vault-status[data-state="ready-empty"] { color: var(--green); background: var(--green-bg); }
.vault-status[data-state="locked"], .vault-status[data-state="copy-locked"], .vault-status[data-state="core-error"] { color: #793b26; background: #fff0e9; }
.vault-form, .vault-step { display: grid; gap: .75rem; margin-top: .9rem; }
.vault-form p, .vault-step p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.vault-form label { color: #33495e; font-size: .83rem; font-weight: 750; }
.vault-form label.checkbox-label { display: flex; align-items: flex-start; gap: .55rem; font-weight: 650; }
.vault-form input[type="checkbox"] { width: 1.1rem; min-height: 1.1rem; margin: .1rem 0 0; accent-color: var(--navy); }
.vault-form input { width: 100%; min-height: 46px; padding: .7rem .8rem; color: var(--ink); border: 1px solid #c9d4df; border-radius: .55rem; background: white; font: inherit; }
.vault-form input:focus { outline: 3px solid #6b9db744; border-color: #4b7f9d; }
.vault-form button, .vault-step button { justify-self: start; min-height: 44px; padding: .68rem 1rem; color: white; border: 0; border-radius: .55rem; background: var(--navy); font-weight: 750; cursor: pointer; }
.vault-form button:hover, .vault-step button:hover { background: var(--navy-soft); }
.vault-form .button-download { justify-self: start; min-height: 44px; padding: .68rem 1rem; color: white; border-radius: .55rem; background: #386d52; font-weight: 750; text-decoration: none; }
.vault-form .button-download:hover { background: #2d5943; }
.backup-panel { margin-bottom: 1rem; }
.backup-panel h2 { margin-top: 0; }
.vault-step h3 { margin: .2rem 0 0; font-size: 1rem; }
.vault-step code { display: block; overflow-wrap: anywhere; padding: .8rem; color: #183149; border-radius: .55rem; background: #f0f4f7; font-size: .78rem; line-height: 1.5; user-select: all; }
.vault-step details { display: grid; gap: .5rem; color: var(--muted); font-size: .82rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.vault-step button.button-secondary { color: var(--navy); border: 1px solid var(--border); background: #edf2f6; }
.vault-step button.button-secondary:hover { background: #e3eaf0; }
.synthetic-result { overflow: auto; margin: .25rem 0 0; padding: .8rem; color: #32485c; border-radius: .55rem; background: #f4f7f9; font-size: .78rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .95rem; border-bottom: 1px solid #edf1f4; }
.panel-heading .eyebrow { margin-bottom: .35rem; }
.component-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.component-list li { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .95rem .15rem; border-bottom: 1px solid #eef2f5; }
.component-list li:last-child { border-bottom: 0; }
.component-list li > div strong, .component-list li > div span { display: block; }
.component-list li > div strong { margin-bottom: .2rem; font-size: .88rem; }
.component-list li > div span { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.check { display: grid; width: 1.25rem; height: 1.25rem; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-bg); font-size: .8rem; font-weight: 900; }
.pending-dot { width: .6rem; height: .6rem; margin-left: .33rem; border-radius: 50%; background: #ddaa4b; }
.component-state { border-radius: 99px; padding: .35rem .6rem; font-size: .69rem; font-weight: 750; white-space: nowrap; }
.component-state.done { color: var(--green); background: var(--green-bg); }
.component-state.pending { color: #8a5b1b; background: #fff1d8; }
.footnote { margin: 1rem .1rem 0; color: #74818e; font-size: .75rem; line-height: 1.5; }
.security-explanation p, .plain-list { max-width: 76ch; color: #526171; font-size: .92rem; line-height: 1.65; }
.security-explanation h2, .panel > h2 { margin-bottom: .9rem; }
.inline-warning { margin-top: 1rem; padding: .9rem 1rem; border-left: 3px solid #d8a54a; color: #765321; background: #fff9ec; font-size: .85rem; line-height: 1.55; }
.plain-list { padding-left: 1.25rem; }
.plain-list li { margin: .55rem 0; }
.pending-copy { margin: 1rem 0 0; padding-top: .9rem; color: #835c27; border-top: 1px solid #edf1f4; font-size: .84rem; line-height: 1.5; }
.footer { max-width: 1440px; margin: 0 auto; padding: 1.2rem clamp(1rem, 3vw, 2.5rem); color: #7a8794; border-top: 1px solid var(--border); font-size: .75rem; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-content { padding: 1.5rem; }
}
@media (max-width: 640px) {
  .topbar { min-height: 64px; gap: .55rem; padding: .65rem 1rem; }
  .brand-lockup strong { white-space: nowrap; font-size: 1.05rem; }
  .environment { max-width: 110px; overflow: hidden; font-size: .52rem; letter-spacing: .04em; white-space: nowrap; }
  .menu-toggle { display: inline-flex; }
  .app-shell { display: block; min-height: calc(100vh - 110px); }
  .sidebar { display: none; position: absolute; top: 64px; right: 0; left: 0; z-index: 4; padding: .75rem 1rem; border: 0; border-bottom: 1px solid var(--border); box-shadow: 0 12px 20px #1b30431c; }
  .sidebar.open { display: flex; }
  .sidebar-note { margin-top: .4rem; }
  .main-content { padding: 1.15rem .9rem 1.5rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .pill { padding: .4rem .7rem; }
  .status-grid { gap: .65rem; }
  .status-card { min-height: 120px; padding: .85rem; }
  .status-card strong { font-size: 1.05rem; }
  .notice { gap: .7rem; padding: .95rem; }
  .notice p { font-size: .82rem; }
  .panel { padding: 1rem .9rem; }
  .component-list li { grid-template-columns: 1.2rem minmax(0, 1fr); gap: .65rem; }
  .component-state { grid-column: 2; justify-self: start; margin-top: -.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
