:root {
  --bg: #F4F6FA;
  --bg-2: #E9EEF6;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --surface-3: #EEF2F8;
  --field: #FAFBFD;
  --border: #E1E6EF;
  --border-strong: #CDD5E1;
  --text: #0A0E15;
  --text-2: #4A5568;
  --text-3: #6B7588;
  --dim: #98A2B3;
  --accent: #2F6FE0;
  --accent-btn: #2F6FE0;
  --accent-btn-hover: #2560C9;
  --on-accent: #FFFFFF;
  --accent-50: #E8F0FE;
  --accent-100: #C9DAFB;
  --accent-ring: rgba(47, 111, 224, .18);
  --eyebrow-bg: #EEF4FF;
  --success: #067647;
  --success-50: #ECFDF3;
  --success-200: #ABEFC6;
  --warning: #B54708;
  --warning-50: #FFFAEB;
  --warning-200: #FEDF89;
  --danger: #D92D20;
  --danger-50: #FEF3F2;
  --danger-200: #FECDCA;
  --deco-1: #DCE3EE;
  --deco-2: #CFE5E3;
  --logo-light: #FFFFFF;
  --logo-dark: #0A0E15;
  --toast-bg: #0A0E15;
  --toast-fg: #EEF1F6;
  --shadow-xs: 0 1px 2px rgba(10, 14, 21, .04);
  --shadow-sm: 0 1px 2px rgba(10, 14, 21, .04), 0 8px 24px -16px rgba(10, 14, 21, .18);
  --shadow-lg: 0 16px 40px -12px rgba(10, 14, 21, .25);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0E15; --bg-2: #0E1422; --surface: #121824; --surface-2: #0F1520; --surface-3: #182031; --field: #070A10;
    --border: #1E2533; --border-strong: #263042; --text: #EEF1F6; --text-2: #A3ACBC; --text-3: #7D879A; --dim: #4C566A;
    --accent: #6EA8FE; --accent-btn: #2F6FE0; --accent-btn-hover: #3B7CEB; --on-accent: #FFFFFF; --accent-50: #13274A; --accent-100: #22355A;
    --accent-ring: rgba(110, 168, 254, .25); --eyebrow-bg: #0F1A2E;
    --success: #5FD1A0; --success-50: #10302A; --success-200: #1C4D3D; --warning: #F2B866; --warning-50: #33260F; --warning-200: #5A4419;
    --danger: #F97066; --danger-50: #2E1513; --danger-200: #5E2621; --deco-1: #1C2638; --deco-2: #173A3E;
    --logo-light: #F2F4F7; --logo-dark: #05080D; --toast-bg: #EEF1F6; --toast-fg: #0A0E15;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 18px 44px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0E15; --bg-2: #0E1422; --surface: #121824; --surface-2: #0F1520; --surface-3: #182031; --field: #070A10;
  --border: #1E2533; --border-strong: #263042; --text: #EEF1F6; --text-2: #A3ACBC; --text-3: #7D879A; --dim: #4C566A;
  --accent: #6EA8FE; --accent-btn: #2F6FE0; --accent-btn-hover: #3B7CEB; --on-accent: #FFFFFF; --accent-50: #13274A; --accent-100: #22355A;
  --accent-ring: rgba(110, 168, 254, .25); --eyebrow-bg: #0F1A2E;
  --success: #5FD1A0; --success-50: #10302A; --success-200: #1C4D3D; --warning: #F2B866; --warning-50: #33260F; --warning-200: #5A4419;
  --danger: #F97066; --danger-50: #2E1513; --danger-200: #5E2621; --deco-1: #1C2638; --deco-2: #173A3E;
  --logo-light: #F2F4F7; --logo-dark: #05080D; --toast-bg: #EEF1F6; --toast-fg: #0A0E15;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 18px 44px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-2); }
body { margin: 0; min-height: 100vh; background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%) fixed; color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.deco { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }
.deco path { fill: none; stroke-width: 1.5; }
.deco .d1 { stroke: var(--deco-1); }
.deco .d2 { stroke: var(--deco-2); }

.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1200px; height: 64px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.mark { width: 29px; height: 23px; border: 2px solid var(--accent); border-radius: 6px; display: flex; align-items: flex-end; padding: 0 0 4px 5px; flex: none; }
.mark i { width: 9px; height: 2px; border-radius: 2px; background: var(--accent); }
.topbar-sep { width: 1px; height: 20px; background: var(--border-strong); }
.topbar-title { color: var(--text-2); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 13px; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.theme-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-xs); }
.theme-btn:hover { color: var(--text); border-color: var(--border-strong); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}

.shell { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 44px max(20px, env(safe-area-inset-right, 0px)) 120px max(20px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 48px; align-items: start; }
.aside { position: sticky; top: 108px; display: flex; flex-direction: column; gap: 24px; }
.aside-label { font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: .02em; margin: 0 0 4px; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.step-btn { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 6px; align-items: center; text-align: left; background: none; border: 1px solid transparent; border-radius: 10px; padding: 9px 10px; cursor: pointer; color: var(--text-2); }
.step-btn:hover:not(:disabled) { background: var(--surface); border-color: var(--border); }
.step-btn:disabled { cursor: default; opacity: .6; }
.step-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.step-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-mark { width: 18px; height: 18px; display: grid; place-items: center; }
.step-mark svg { width: 14px; height: 14px; stroke: var(--success); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
li.current .step-btn { background: var(--surface); border-color: var(--border); box-shadow: inset 3px 0 0 var(--accent), var(--shadow-xs); color: var(--text); }
li.current .step-n { color: var(--accent); }
li.current .step-title { font-weight: 600; }
li.done .step-n { color: var(--text-3); }
li.done .step-title { color: var(--text); }
li.flag .step-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.trust { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); box-shadow: var(--shadow-xs); }
.trust-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--success); }
.trust b { color: var(--text); font-weight: 600; font-size: 14px; }

.mbar { display: none; }

.card { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 4px 0 8px; }
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--eyebrow-bg); border: 1px solid var(--accent-100); border-radius: 999px; padding: 5px 12px; font-variant-numeric: tabular-nums; }
.hero h1 { margin: 0; font-size: 38px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.lede { margin: 0; color: var(--text-2); font-size: 16px; max-width: 62ch; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 14px 24px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.panel-title { margin: 0; font-size: 15px; font-weight: 600; }
.panel-desc { margin: 2px 0 0; font-size: 13px; color: var(--text-3); font-weight: 400; }
.panel-tag { font-family: var(--mono); font-size: 12px; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.panel-tag.ok { color: var(--success); }
.enc { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--success); white-space: nowrap; }
.enc svg.i { width: 13px; height: 13px; }
.panel-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.notice svg.i { margin-top: 2px; }
.notice.warning { background: var(--warning-50); border-color: var(--warning-200); color: var(--warning); }
.notice.danger { background: var(--danger-50); border-color: var(--danger-200); color: var(--danger); }
.notice.info { background: var(--accent-50); border-color: var(--accent-100); color: var(--accent); }
.notice.success { background: var(--success-50); border-color: var(--success-200); color: var(--success); }
.notice b { font-weight: 600; }
.notice .n-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.notice .n-text { color: var(--text-2); }
.notice ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); }
.notice button.linkish { background: none; border: 0; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

.field { display: grid; grid-template-columns: 210px minmax(0, 1fr) 92px; gap: 6px 20px; align-items: start; padding: 16px 24px; border-top: 1px solid var(--border); }
.panel-head + .field { border-top: 0; }
.f-label { display: flex; flex-direction: column; gap: 3px; padding-top: 9px; min-width: 0; }
.label { font-weight: 500; color: var(--text); }
.help { font-size: 12.5px; color: var(--text-3); margin: 0; line-height: 1.45; }
.f-control { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pill { justify-self: end; margin-top: 8px; width: 92px; text-align: center; font-size: 12px; font-weight: 500; padding: 3px 0; border-radius: 999px; }
.pill.req { background: var(--accent-50); color: var(--accent); }
.pill.opt { background: var(--surface-3); color: var(--text-3); }
.pill.done { background: var(--success-50); color: var(--success); }
.err { font-size: 13px; color: var(--danger); margin: 0; display: flex; align-items: center; gap: 6px; }
.err svg.i { width: 14px; height: 14px; }

.input, .textarea { width: 100%; min-height: 40px; background: var(--field); border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 12px; color: var(--text); font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
.textarea { min-height: 88px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: .75; }
.input:hover, .textarea:hover { border-color: var(--dim); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); background: var(--surface); }
.invalid .input, .invalid .textarea, .invalid .secret, .invalid .upload, .invalid .confirm { border-color: var(--danger); }
.input.mono { font-family: var(--mono); font-size: 13px; }
.affix { position: relative; display: flex; align-items: center; }
.affix .pre { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; display: flex; }
.affix .input { padding-left: 38px; }

.secret { display: flex; align-items: center; background: var(--field); border: 1px solid var(--border-strong); border-radius: 9px; transition: border-color .15s, box-shadow .15s; }
.secret:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.secret .pre { padding: 0 4px 0 12px; color: var(--text-3); display: flex; }
.secret input { flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; color: var(--text); font-family: var(--mono); font-size: 13px; padding: 0 8px; outline: none; }
.secret input::placeholder { font-family: var(--mono); color: var(--text-3); opacity: .75; font-size: 12.5px; }
.secret .eye { height: 38px; padding: 0 12px; background: none; border: 0; border-left: 1px solid var(--border); color: var(--text-3); cursor: pointer; display: flex; align-items: center; }
.secret .eye:hover { color: var(--text); }
.secret .eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0 9px 9px 0; }
.sent { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-family: var(--mono); font-size: 12px; padding-right: 10px; white-space: nowrap; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box { height: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--field); transition: border-color .15s, background .15s, box-shadow .15s; }
.choice:hover .choice-box { border-color: var(--dim); }
.choice input:checked + .choice-box { border-color: var(--accent); background: var(--accent-50); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 4px var(--accent-ring); border-color: var(--accent); }
.mono-tile { min-width: 44px; height: 30px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; flex: none; }
.choice-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.choice-title { font-weight: 600; color: var(--text); }
.choice-desc { font-size: 12.5px; color: var(--text-3); }
.choice-mark { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); flex: none; display: grid; place-items: center; margin-top: 1px; transition: all .15s; }
.choice input[type=checkbox] + .choice-box .choice-mark { border-radius: 5px; }
.choice-mark svg { width: 11px; height: 11px; stroke: #FFFFFF; stroke-width: 3; fill: none; opacity: 0; }
.choice input[type=radio]:checked + .choice-box .choice-mark { border: 5px solid var(--accent); }
.choice input[type=checkbox]:checked + .choice-box .choice-mark { border-color: var(--accent-btn); background: var(--accent-btn); }
.choice input[type=checkbox]:checked + .choice-box .choice-mark svg { opacity: 1; }

.confirm { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer; background: var(--field); }
.confirm input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent-btn); flex: none; cursor: pointer; }

.upload { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--field); position: relative; transition: border-color .15s, background .15s; }
.upload.over { border-color: var(--accent); background: var(--accent-50); }
.upload.has { border-style: solid; }
.upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload.has input[type=file] { display: none; }
.preview { width: 96px; height: 60px; border-radius: 9px; display: grid; place-items: center; padding: 8px; flex: none; border: 1px solid var(--border); overflow: hidden; }
.preview.light { background: var(--logo-light); }
.preview.dark { background: var(--logo-dark); }
.preview.empty { background: var(--surface); color: var(--text-3); }
.preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.up-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.up-text b { font-weight: 600; color: var(--accent); }
.up-text b span { color: var(--text-3); font-weight: 400; }
.up-text > span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-text .fname { color: var(--text); font-weight: 500; font-size: 14px; font-family: var(--mono); font-size: 13px; }
.up-actions { display: flex; gap: 6px; position: relative; z-index: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-xs); transition: background .15s, border-color .15s, color .15s, transform .05s; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--dim); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn.primary { background: var(--accent-btn); border-color: var(--accent-btn); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-btn-hover); border-color: var(--accent-btn-hover); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.foot-meta { color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.foot-meta .pn { font-family: var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.foot-actions { display: flex; gap: 8px; }

.table-wrap { overflow-x: auto; }
.dns { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.dns th { text-align: left; font-family: var(--mono); font-weight: 400; color: var(--text-3); padding: 10px 24px; border-bottom: 1px solid var(--border); font-size: 12px; }
.dns td { padding: 12px 24px; border-top: 1px solid var(--border); vertical-align: middle; }
.dns tr:nth-child(2) td { border-top: 0; }
.dns .code { font-family: var(--mono); font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 4px; }
.dns .code.target { color: var(--accent); }
.dns .muted { color: var(--text-3); font-size: 12px; display: block; margin-top: 1px; }
.copy-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text-3); display: inline-grid; place-items: center; cursor: pointer; }
.copy-btn:hover { background: var(--surface-3); color: var(--text); }
.copy-btn:focus-visible { outline: 2px solid var(--accent); }
.copy-btn svg.i { width: 14px; height: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--success); }
.status.no { color: var(--text-3); }
.status.warn { color: var(--warning); }
.dns-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }
.tip { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); padding: 14px 24px; border-top: 1px solid var(--border); }
.tip svg.i { color: var(--accent); margin-top: 2px; }
.tip b { color: var(--text); font-weight: 600; }
.tip code { font-family: var(--mono); font-size: 12px; color: var(--text); }

.kv { margin: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.kv dt, .kv dd { padding: 10px 24px; border-top: 1px solid var(--border); margin: 0; font-size: 13px; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.kv .thumb { height: 34px; max-width: 130px; border-radius: 6px; border: 1px solid var(--border); padding: 4px; object-fit: contain; vertical-align: middle; }
.kv .thumb.dark { background: var(--logo-dark); }
.kv .thumb.light { background: var(--logo-light); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.chip.ok { background: var(--success-50); color: var(--success); }
.chip.no { background: var(--danger-50); color: var(--danger); }
.chip svg.i { width: 12px; height: 12px; }
.turnstile { min-height: 65px; }

.done-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 32px 0 8px; }
.done-hero h1 { margin: 6px 0 0; font-size: 48px; line-height: 1.05; font-weight: 700; letter-spacing: -.03em; }
.done-hero p { margin: 0; color: var(--text-2); font-size: 16px; max-width: 52ch; }
.done-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--success-50); color: var(--success); display: grid; place-items: center; border: 1px solid var(--success-200); }
.done-ic svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 20px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-xs); }
.stat .sv { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--accent); }
.stat .sl { font-size: 13px; color: var(--text-3); text-align: left; }
.next-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.next-step { border-top: 3px solid var(--accent); padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.next-step .sn { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.next-step b { font-size: 16px; font-weight: 600; }
.next-step span { font-size: 13px; color: var(--text-3); }
.edit-link { display: flex; flex-direction: column; gap: 8px; }
.edit-link .row { display: flex; gap: 8px; }
.edit-link .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }

.loading { padding: 80px 0; display: grid; place-items: center; color: var(--text-3); gap: 12px; }
.loading .spin { width: 24px; height: 24px; border-width: 2.5px; border-color: var(--border-strong); border-right-color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(12px); opacity: 0; background: var(--toast-bg); color: var(--toast-fg); padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.rise > * { animation: rise .45s ease-out both; }
.rise > *:nth-child(2) { animation-delay: .04s; }
.rise > *:nth-child(3) { animation-delay: .08s; }
.rise > *:nth-child(4) { animation-delay: .12s; }
.rise > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 20px; }
  .aside { display: none; }
  .mbar { display: flex; flex-direction: column; gap: 10px; }
  .mbar-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--text-3); }
  .mbar-row b { color: var(--text); font-weight: 600; font-size: 14px; }
  .mbar-row span { font-family: var(--mono); font-size: 12px; }
  .segments { display: grid; gap: 4px; }
  .segments i { height: 4px; border-radius: 4px; background: var(--border-strong); }
  .segments i.on { background: var(--accent); }
  .topbar-title, .topbar-sep { display: none; }
}
@media (max-width: 680px) {
  .hero h1 { font-size: 28px; }
  .lede { font-size: 15px; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
  .field { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; gap: 8px 12px; }
  .f-label { padding-top: 0; }
  .pill { margin-top: 0; width: auto; padding: 2px 10px; grid-column: 2; grid-row: 1; }
  .f-control { grid-column: 1 / -1; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt, .kv dd { padding-left: 16px; padding-right: 16px; }
  .kv dd { border-top: 0; padding-top: 0; }
  .dns th, .dns td, .dns-foot, .tip { padding-left: 16px; padding-right: 16px; }
  .foot { bottom: max(10px, env(safe-area-inset-bottom, 0px)); padding: 10px; }
  .foot-meta { display: none; }
  .foot-actions { width: 100%; }
  .foot-actions .btn { flex: 1; }
  .next-steps { grid-template-columns: minmax(0, 1fr); }
  .done-hero h1 { font-size: 34px; }
  .topbar-right .hide-sm { display: none; }
  .upload { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
