.footer-tools {display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:8px 16px}
.login-form>.text-link {justify-self:start;font-size:14px}

.setup-layout {
  --rail-top:#204687; --rail-bottom:#112d63; --rail-ink:#f8fbff; --rail-muted:#c2d5f3;
  --rail-line:#ffffff31; --rail-active:#ffffff1c; --rail-mark:#eef5ff; --rail-mark-text:#20458b;
  --setup-halo:#e8f0ff; --setup-shell-shadow:#1c376214; --setup-readiness:#f0f5ff;
  min-height:100vh;
  background:radial-gradient(ellipse at 50% 0%,var(--setup-halo),transparent 43%),var(--bg);
}
[data-theme="obsidian"] .setup-layout {
  --rail-top:#27214e; --rail-bottom:#191630; --rail-ink:#f3eeff; --rail-muted:#c7bddf;
  --rail-line:#bfadff37; --rail-active:#bca7ff1e; --rail-mark:#cab7fb; --rail-mark-text:#2b2047;
  --setup-halo:#221c39; --setup-shell-shadow:#0004; --setup-readiness:#1d2138;
}
[data-theme="paper"] .setup-layout {
  --rail-top:#85443b; --rail-bottom:#6a342d; --rail-ink:#fff9f3; --rail-muted:#f3dcd2;
  --rail-line:#ffebcc40; --rail-active:#fff5ea25; --rail-mark:#fff4e5; --rail-mark-text:#7b3d34;
  --setup-halo:#f0e6d9; --setup-shell-shadow:#5b3c2912; --setup-readiness:#f8eee4;
}

.setup-topbar {background:var(--surface);border-bottom:1px solid var(--line)}
.setup-topbar>div,.setup-main {width:min(1120px,calc(100% - 64px));margin-inline:auto}
.setup-topbar>div {display:flex;justify-content:space-between;align-items:center;min-height:66px;gap:12px}
.setup-top-actions {display:flex;align-items:center;gap:14px}
html[data-theme] .setup-topbar .brand {margin:0;padding:0;height:auto;color:var(--text)}
.setup-topbar .brand small {color:var(--muted)}
.setup-top-actions>.btn {min-height:35px;font-size:13px}
.setup-preview {color:var(--muted);font-size:13px;white-space:nowrap;border-right:1px solid var(--line);padding-right:13px}
.setup-main {padding-top:37px;padding-bottom:42px}
.setup-heading {margin-bottom:21px}
.setup-heading h1 {font-size:clamp(32px,3.1vw,44px);line-height:1.12;letter-spacing:-.048em;font-weight:760}
.setup-heading p {color:var(--muted);font-size:15px;line-height:1.55;margin-top:9px}

.setup-columns {
  display:grid;grid-template-columns:minmax(233px,1fr) minmax(0,2.94fr);align-items:stretch;
  background:var(--surface);border:1px solid var(--line);border-radius:19px;overflow:hidden;
  box-shadow:0 16px 45px var(--setup-shell-shadow);
}
.setup-progress {
  color:var(--rail-ink);min-width:0;padding:27px 18px;position:relative;overflow:hidden;
  background:linear-gradient(155deg,var(--rail-top),var(--rail-bottom) 75%);
}
.setup-progress::after {
  content:"";position:absolute;right:-92px;bottom:-119px;width:230px;height:230px;transform:rotate(37deg);
  border:1px solid var(--rail-line);border-radius:26%;box-shadow:0 0 0 24px #ffffff06,0 0 0 50px #ffffff05;pointer-events:none;
}
.setup-rail-heading {position:relative;z-index:1;display:flex;align-items:center;gap:11px;padding:0 9px 18px;border-bottom:1px solid var(--rail-line);margin-bottom:12px}
.setup-rail-heading h2 {font-size:16px;letter-spacing:.01em}
.setup-rail-mark {
  display:grid;place-items:center;width:35px;height:35px;flex:none;font-size:20px;
  background:var(--rail-active);border:1px solid var(--rail-line);border-radius:9px;color:var(--rail-ink);
}
[data-theme="jade"] .setup-rail-mark {--icon-row:100%}
.setup-progress ol {list-style:none;margin:0;padding:0;position:relative;z-index:1}
.setup-progress ol::before {content:"";position:absolute;top:26px;bottom:36px;left:27px;width:1px;background:var(--rail-line)}
.setup-progress li {position:relative;border-radius:9px}
.install-step-control {
  display:flex;align-items:flex-start;gap:11px;width:100%;min-height:60px;padding:10px 10px;
  border:1px solid transparent;border-radius:inherit;text-align:left;color:inherit;
}
.setup-progress li.current .install-step-control {background:var(--rail-active);border-color:var(--rail-line)}
button.install-step-control:hover {background:var(--rail-active)}
button.install-step-control:focus-visible {outline:2px solid var(--rail-mark);outline-offset:-2px}
.step-mark {
  position:relative;display:grid;place-items:center;flex:none;width:31px;height:31px;
  border:1px solid var(--rail-line);border-radius:50%;background:var(--rail-bottom);font-size:13px;font-weight:720;color:var(--rail-muted);
}
.current .step-mark {background:var(--rail-mark);border-color:var(--rail-mark);color:var(--rail-mark-text)}
.finished .step-mark {background:var(--rail-mark);border-color:var(--rail-mark);color:var(--rail-mark-text)}
.step-warning .step-mark {background:#ffedc5;border-color:#ffedc5;color:#854717}
.step-label {display:grid;gap:4px;min-width:0;padding-top:2px}
.step-label strong {font-size:14px;line-height:1.25;font-weight:710}
.step-label>span {color:var(--rail-muted);font-size:13px;line-height:1.4}
[data-theme="jade"] .finished .step-mark {--icon-row:33.333333%;font-size:14px}

.setup-card {--setup-pad:32px;min-width:0;min-height:546px;display:flex;flex-direction:column}
.setup-card-header,.setup-card-footer {display:flex;justify-content:space-between;align-items:center;gap:12px;padding-inline:var(--setup-pad)}
.setup-card-header {min-height:95px;padding-block:23px;border-bottom:1px solid var(--line)}
.setup-card-header h2,.setup-result h2 {font-size:24px;line-height:1.28;letter-spacing:-.033em}
.setup-card-header p,.setup-result p {color:var(--muted);font-size:14px;line-height:1.55;margin-top:5px}
.setup-form {display:flex;flex:1;flex-direction:column;min-width:0}
.setup-card-body {flex:1;padding:24px var(--setup-pad);min-width:0}
.setup-card-body .form-grid {gap:17px 18px}
.setup-card-body .field :is(input,select):not([type="file"]) {min-height:43px}
.setup-card-body .form-section+.form-section {margin-top:23px;padding-top:21px}
.setup-card-footer {min-height:73px;padding-block:15px;border-top:1px solid var(--line);background:var(--layer)}
.setup-card-footer .btn {min-height:40px;min-width:92px;padding-inline:13px}
.setup-card-footer .btn:only-child {margin-left:auto}
.setup-card-footer .btn.ghost {background:transparent}
.setup-card-footer .btn.ghost:hover {background:var(--surface)}

.setup-readiness {
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;
  padding:13px 14px;background:var(--setup-readiness);border:1px solid var(--line);border-radius:12px;
}
.setup-readiness-mark {
  width:41px;height:41px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);
  border-radius:9px;color:var(--accent);font-size:21px;
}
[data-theme="jade"] .setup-readiness-mark {--icon-row:33.333333%}
.setup-readiness strong {font-size:15px;line-height:1.4}
.setup-readiness p {color:var(--muted);font-size:13px;line-height:1.45;margin-top:3px}
.setup-readiness-total {display:flex;align-items:baseline;gap:3px;color:var(--muted);font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}
.setup-readiness-total b {color:var(--accent);font-size:26px;font-weight:760;letter-spacing:-.04em}
.setup-readiness.readiness-warning {background:var(--warn-bg)}
.setup-readiness.readiness-warning .setup-readiness-total b {color:var(--warn)}
.setup-check-panel {border:1px solid var(--line);border-radius:10px;margin-top:16px;overflow:hidden}
.setup-checks {padding:0;margin:0;list-style:none}
.setup-check-line {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(70px,auto) 58px;align-items:center;gap:12px;
  padding:8px 14px;min-height:38px;border-bottom:1px solid var(--line);
}
.setup-check-line>div {min-width:0;display:grid;grid-template-columns:minmax(128px,.43fr) minmax(0,1fr);align-items:baseline;gap:11px}
.setup-check-head {min-height:35px;color:var(--muted);background:var(--layer);font-size:13px;font-weight:700}
.setup-check-line:last-child:not(.setup-check-head) {border-bottom:0}
.setup-check-line strong {font-size:14px}
.setup-checks li>div>span,.check-detail {font-size:13px;color:var(--muted)}
.setup-check-line>:nth-child(2) {text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.setup-check-line>:last-child {justify-self:end}
.setup-check-state {display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:640;white-space:nowrap}
.setup-check-state::before {content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.setup-check-state.good {color:var(--good)}
.setup-check-state.optional {color:var(--warn)}
.setup-check-state.bad {color:var(--bad)}
.setup-notice {padding:10px 13px;border-radius:8px;margin:16px 0 0;background:var(--layer);border:1px solid var(--line);color:var(--muted);font-size:13px;line-height:1.55}
.setup-notice.danger {margin:0 0 14px;background:var(--bad-bg);border-color:color-mix(in srgb,var(--bad) 20%,var(--line));color:var(--bad)}
.setup-readiness+.setup-notice.danger {margin:13px 0 0}
.setup-notice.caution {background:var(--warn-bg);border-color:color-mix(in srgb,var(--warn) 19%,var(--line));color:var(--warn)}
.setup-password-error {margin:14px 0 0}
.setup-form [aria-invalid="true"] {border-color:var(--bad)}
.setup-review {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 19px;margin:0}
.setup-review>div {border-bottom:1px solid var(--line);padding:12px 0;min-width:0}
.setup-review dt {font-size:13px;color:var(--muted);margin-bottom:4px}
.setup-review dd {font-size:14px;font-weight:640;overflow-wrap:anywhere}

.setup-finish:only-child {grid-column:1/-1;min-height:0}
.setup-result {display:flex;align-items:center;gap:13px;padding:25px var(--setup-pad);border-bottom:1px solid var(--line)}
.setup-result-mark {display:grid;place-items:center;width:47px;height:47px;flex:none;border-radius:11px;color:var(--good);background:var(--good-bg);font-size:21px}
[data-theme="jade"] .setup-result-mark {--icon-row:33.333333%}
.setup-finish:only-child .setup-result {border-bottom:0}

@media (max-width:850px) {
  .setup-topbar>div,.setup-main {width:calc(100% - 36px)}
  .setup-main {padding-top:27px}
  .setup-columns {grid-template-columns:minmax(0,1fr);border-radius:15px}
  .setup-progress {padding:12px}
  .setup-progress::after,.setup-rail-heading,.setup-progress ol::before {display:none}
  .setup-progress ol {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
  .install-step-control {min-height:0;height:100%;padding:7px 6px;gap:6px;align-items:center}
  .step-label {padding:0}
  .step-label>span {display:none}
  .setup-card {min-height:0}
}
@media (max-width:550px) {
  .setup-topbar>div,.setup-main {width:calc(100% - 24px)}
  .setup-topbar>div {min-height:59px;gap:6px}
  .setup-topbar .brand {gap:6px}
  .setup-topbar .brand strong {font-size:15px}
  .setup-topbar .brand small {display:none}
  .setup-topbar .brand-mark {width:29px;height:29px}
  .setup-top-actions {gap:4px}
  .setup-top-actions .theme-label,.setup-top-actions .segments .icon,.setup-top-actions .preview-theme .icon {display:none}
  .setup-top-actions>.btn {min-height:31px;padding:4px 7px;font-size:12px}
  .setup-top-actions .segments button {padding-inline:3px;font-size:12px}
  .setup-top-actions .preview-theme summary {padding-inline:4px;font-size:13px}
  .setup-top-actions .theme-select {gap:0}
  .setup-preview {font-size:11px;padding-right:5px}
  .setup-heading {margin-bottom:16px}
  .setup-heading p {font-size:14px}
  .setup-progress {padding:8px}
  .install-step-control {flex-direction:column;text-align:center;gap:5px;padding:6px 1px;justify-content:flex-start}
  .step-mark {width:23px;height:23px;font-size:12px}
  .step-label strong {font-size:12px}
  .setup-card {--setup-pad:14px}
  .setup-card-header,.setup-card-body,.setup-result {padding-block:16px}
  .setup-card-header {min-height:0}
  .setup-card-header h2,.setup-result h2 {font-size:21px}
  .setup-card-header p,.setup-result p {font-size:13px}
  .setup-readiness {grid-template-columns:auto minmax(0,1fr);padding:10px;gap:7px 9px}
  .setup-readiness-mark {width:33px;height:33px;font-size:18px}
  .setup-readiness-total {grid-column:2}
  .setup-readiness-total b {font-size:20px}
  .setup-check-line {gap:7px;padding:7px 9px;grid-template-columns:minmax(0,1fr) auto 53px}
  .setup-check-line>div {grid-template-columns:minmax(0,1fr);gap:3px}
  .setup-check-head>div>span:nth-child(2) {display:none}
  .setup-checks li>div>span,.check-detail,.setup-check-state {font-size:12px}
}
@media (max-width:355px) {
  .setup-top-actions .setup-preview {border-right:0;padding:0}
  .setup-topbar .brand-mark {width:24px;height:24px}
  .setup-topbar .brand strong {font-size:13px}
  .setup-top-actions>.btn {font-size:11px;padding-inline:4px}
  .step-label strong {font-size:11px}
}


.setup-layout {--surface:var(--panel);--layer:var(--panel-2);--text:var(--txt);--on-accent:#fff;--bad-bg:#fdeef1;--good:#087353;--good-bg:#e8f7f1;--warn-bg:#fff3e2;--quiet:var(--muted);--accent-hi:var(--trend-accent)}
.setup-layout .brand {border:0;margin:0;padding:0}
.setup-layout .setup-stage {min-width:0;display:flex;flex-direction:column}
.setup-layout .setup-form {display:block}
.setup-layout .setup-form[data-enhanced] {display:flex}
.setup-layout .setup-form[data-enhanced] .setup-stage:not([hidden]) {flex:1}
.setup-layout .setup-form .setup-card-footer {justify-content:space-between}
.setup-layout .setup-card-footer .btn {display:inline-flex;justify-content:center}
.setup-layout .setup-card-body .field {margin:0}
.setup-layout .install-step-control {cursor:default}
.setup-layout button.install-step-control {cursor:pointer}
.setup-layout .step-label {line-height:1.35}
.setup-layout .host-note {padding:0 var(--setup-pad);margin-bottom:13px}
.setup-layout .setup-finish {min-height:0}
.setup-layout .setup-finish .setup-card-footer {justify-content:flex-end}
.setup-layout .setup-readiness p {margin-bottom:0}
.setup-layout .setup-card-body .form-fields {gap:16px}
.setup-layout .setup-recipient code {overflow-wrap:anywhere}
.setup-layout .setup-top-actions .btn {color:var(--txt-2)}
.setup-layout [data-install-summary] {overflow-wrap:anywhere}
.setup-layout .setup-password-error {margin-bottom:0}
@media(max-width:550px) {
    .setup-layout .setup-card {--setup-pad:14px}
}

