:root {
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --canvas: #f5f7fa;
    --panel: #ffffff;
    --nav: #111827;
    --lime: #b8f24b;
    --lime-deep: #6d980d;
    --blue: #3157d5;
    --red: #d92d20;
    --amber: #b54708;
    --radius: 18px;
    --shadow: 0 16px 48px rgba(16, 24, 40, .08);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

body {
    margin: 0;
    min-height: 100vh;
}

button,
input,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.installer-body {
    background:
        radial-gradient(circle at 15% 5%, rgba(184, 242, 75, .17), transparent 28rem),
        radial-gradient(circle at 90% 15%, rgba(49, 87, 213, .12), transparent 30rem),
        #f3f5f8;
}

.installer-shell {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.installer-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.installer-brand {
    margin-bottom: 20px;
}

.installer-brand > div > strong,
.installer-brand > div > span,
.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.installer-brand strong {
    font-size: 17px;
}

.installer-brand > div > span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--lime);
    color: #172306;
    font-size: 20px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07);
}

.installer-card {
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid rgba(228, 231, 236, .8);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}

.installer-card-narrow {
    width: min(520px, 100%);
    margin: 70px auto 0;
}

.step-line {
    display: grid;
    width: 100%;
    margin: 0 0 34px;
    padding: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
}

.step-item {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    flex-direction: column;
    gap: 8px;
}

.step-item:not(:last-child)::after {
    position: absolute;
    z-index: 0;
    top: 14px;
    right: calc(-50% + 22px);
    left: calc(50% + 22px);
    height: 1px;
    background: var(--line);
    content: "";
}

.step-item.complete:not(:last-child)::after {
    background: #98a2b3;
}

.step {
    position: relative;
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: #98a2b3;
    font-size: 12px;
    font-weight: 800;
}

.step-item.active .step {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.step-label {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.step-item.active .step-label {
    color: var(--ink);
}

.installer-heading {
    max-width: 680px;
    margin-bottom: 24px;
}

.installer-heading h1,
.page-header h1 {
    margin: 6px 0 10px;
    letter-spacing: -.04em;
}

.installer-heading h1 {
    font-size: clamp(28px, 4.5vw, 38px);
}

.installer-heading p:last-child,
.page-description {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.eyebrow {
    margin: 0;
    color: var(--lime-deep);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .15em;
}

.requirement-focus {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid;
    border-radius: var(--radius);
}

.requirement-focus.is-blocked {
    border-color: #fecdca;
    background: #fff6f5;
}

.requirement-focus.is-ready {
    border-color: #b7eb8f;
    background: #f6ffed;
}

.status-orb {
    display: grid;
    flex: 0 0 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
}

.requirement-detail {
    min-width: 0;
    flex: 1;
}

.requirement-focus strong {
    display: block;
    margin: 2px 0 7px;
    font-size: 18px;
}

.requirement-focus p {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--muted);
    font: 12px/1.6 "SFMono-Regular", Consolas, monospace;
}

.inline-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 16px 0 0;
}

.inline-status div {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.inline-status dt {
    color: var(--muted);
}

.inline-status dd {
    margin: 0;
    font-weight: 800;
}

.command-guide {
    margin: 18px 0;
    padding: 20px;
    border-radius: var(--radius);
    background: #111827;
    color: #e5e7eb;
}

.command-guide > strong {
    color: #fff;
}

.command-guide pre {
    overflow-x: auto;
    margin: 12px 0;
    padding: 14px 16px;
    border: 1px solid #344054;
    border-radius: 10px;
    background: #0b1220;
    color: var(--lime);
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.command-guide p {
    margin: 0;
    color: #98a2b3;
    font-size: 13px;
    line-height: 1.6;
}

.requirements {
    margin: 34px 0;
}

.requirements h2,
.panel h2 {
    margin: 3px 0 18px;
    font-size: 20px;
    letter-spacing: -.02em;
}

.requirement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #344054;
    font-size: 13px;
}

.requirement-item .pass {
    color: #4b7c0f;
    font-weight: 900;
}

.requirement-item .fail {
    color: var(--red);
    font-weight: 900;
}

.form-stack {
    display: grid;
    gap: 20px;
}

.form-stack fieldset {
    min-width: 0;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.form-stack legend {
    padding: 0 10px;
    font-size: 15px;
    font-weight: 800;
}

.form-stack legend span {
    margin-right: 8px;
    color: var(--lime-deep);
    font-size: 11px;
}

.form-grid {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field > span,
.check-field {
    color: #344054;
    font-size: 13px;
    font-weight: 750;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}

.field input {
    height: 46px;
    padding: 0 13px;
}

.field textarea {
    padding: 12px 13px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: #7f9ae9;
    box-shadow: 0 0 0 4px rgba(49, 87, 213, .1);
}

.field small,
.muted-copy {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.field-span-2 {
    grid-column: span 2;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.button-primary {
    background: var(--ink);
    color: #fff;
}

.button-primary:hover {
    background: #27364f;
}

.button-secondary {
    border: 1px solid var(--line);
    background: #fff;
    color: #344054;
}

.button-danger {
    background: var(--red);
    color: #fff;
}

.button-block {
    width: 100%;
}

.alert {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.alert-danger {
    border-color: #fecdca;
    background: #fff6f5;
    color: #912018;
}

.alert-success {
    border-color: #b7eb8f;
    background: #f6ffed;
    color: #335d08;
}

.alert-warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #854a0e;
}

.alert.compact {
    margin-top: 18px;
}

.installer-footer {
    padding: 22px 0;
    color: #98a2b3;
    text-align: center;
    font-size: 11px;
}

.back-link {
    display: block;
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #98a2b3;
    font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
}

.form-message {
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.field-error {
    color: var(--red) !important;
    font-weight: 700;
}

.recovery-login {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.recovery-login summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.recovery-login .form-stack {
    margin-top: 16px;
}

.login-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 26px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.login-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #62a316;
    box-shadow: 0 0 0 4px rgba(98, 163, 22, .12);
}

.danger-text {
    color: var(--red) !important;
}

.confirmation-field {
    padding: 18px;
    border: 1px solid #fda29b;
    border-radius: 12px;
    background: #fff6f5;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 28px 20px 22px;
    background: var(--nav);
    color: #fff;
}

.sidebar-brand {
    padding: 0 8px 30px;
}

.sidebar-brand small {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 10px;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 10px;
    color: #98a2b3;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-nav a span {
    color: #667085;
    font: 10px "SFMono-Regular", monospace;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.sidebar-nav a.active span {
    color: var(--lime);
}

.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 18px 8px 0;
    border-top: 1px solid #344054;
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
}

.sidebar-user-link {
    min-width: 0;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
}

.sidebar-user-link:hover,
.sidebar-user-link:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, .08);
}

.sidebar-user strong {
    font-size: 13px;
}

.sidebar-user span {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 11px;
}

.link-button {
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 750;
}

.sidebar .link-button {
    color: #98a2b3;
}

.security-grid {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.security-panel {
    display: grid;
    gap: 20px;
}

.security-panel-wide {
    grid-column: span 2;
}

.security-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.security-panel-header h2 {
    margin: 4px 0 0;
}

.security-index {
    color: var(--lime-deep);
    font: 800 10px "SFMono-Regular", monospace;
    letter-spacing: .08em;
}

.security-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #f2f4f7;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.security-badge.is-on {
    background: #ecfdf3;
    color: #027a48;
}

.otp-setup {
    display: grid;
    align-items: center;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 24px;
}

.otp-qr {
    display: grid;
    width: 214px;
    height: 214px;
    place-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.otp-qr svg {
    width: 192px;
    height: 192px;
}

.inline-form {
    display: inline-flex;
}

.recovery-code-box {
    padding: 18px;
    border: 1px solid #d7edab;
    border-radius: 12px;
    background: #f8fde9;
}

.recovery-code-box > strong {
    font-size: 13px;
}

.recovery-code-box > p {
    margin: 7px 0 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.recovery-codes code {
    padding: 8px 10px;
    border: 1px solid #d7edab;
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-size: 11px;
}

.security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.passkey-register {
    display: grid;
    align-items: end;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.passkey-list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
}

.passkey-item + .passkey-item {
    border-top: 1px solid var(--line);
}

.passkey-item strong,
.passkey-item span {
    display: block;
}

.passkey-item strong {
    font-size: 13px;
}

.passkey-item span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.passkey-list .empty-state {
    padding: 28px 18px;
    font-size: 13px;
}

.content {
    width: 100%;
    max-width: 1500px;
    padding: 44px clamp(24px, 4vw, 64px) 70px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: clamp(28px, 4vw, 40px);
}

.hero-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 30px;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-status.online {
    background: linear-gradient(125deg, #182315, #253d19);
}

.hero-status.offline {
    background: linear-gradient(125deg, #3e1713, #6b211a);
}

.hero-status > div:first-child {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-status p {
    margin: 0 0 5px;
    color: var(--lime);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .15em;
}

.hero-status h2 {
    margin: 0 0 7px;
    font-size: clamp(20px, 3vw, 28px);
}

.hero-status span:not(.live-pulse) {
    color: #cbd5c6;
    font-size: 12px;
}

.live-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 8px rgba(184, 242, 75, .12);
}

.protocol-badge {
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #d4f99c;
    font: 10px "SFMono-Regular", monospace;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card,
.panel {
    border: 1px solid var(--line);
    background: var(--panel);
}

.metric-card {
    min-height: 150px;
    padding: 22px;
    border-radius: 15px;
}

.metric-card strong,
.metric-card small,
.metric-label {
    display: block;
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.metric-card strong {
    margin: 18px 0 4px;
    font-size: 38px;
    letter-spacing: -.05em;
}

.metric-card small {
    color: #98a2b3;
}

.metric-accent {
    border-color: #d7edab;
    background: #f8fde9;
}

.two-column,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.panel {
    padding: 25px;
    border-radius: var(--radius);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.endpoint-list {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.endpoint-list > div {
    display: flex;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.endpoint-type {
    display: grid;
    flex: 0 0 42px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: #eef4ff;
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
}

.endpoint-list strong,
.endpoint-list p {
    display: block;
    margin: 0;
}

.endpoint-list strong {
    font-size: 13px;
}

.endpoint-list p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.text-link {
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.port-list {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.port-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: #fff;
    font-size: 12px;
}

.port-list div + div {
    border-top: 1px solid var(--line);
}

.port-list span {
    font-family: "SFMono-Regular", monospace;
}

.port-list .muted {
    background: #f9fafb;
    color: #98a2b3;
}

.table-panel {
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    background: #f9fafb;
    color: var(--muted);
    text-align: left;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

td {
    padding: 17px 18px;
    border-bottom: 1px solid #f0f1f3;
    color: #344054;
    vertical-align: middle;
}

td strong,
td small {
    display: block;
}

td small {
    max-width: 240px;
    margin-top: 4px;
    overflow: hidden;
    color: #98a2b3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.status-pill.live {
    background: #ecfdf3;
    color: #027a48;
}

.status-pill.stopped {
    background: #f2f4f7;
    color: #667085;
}

.copy-button {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
    background: #fff;
    color: #475467;
    font-size: 10px;
    font-weight: 800;
}

.empty-state {
    padding: 54px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 16px;
}

.empty-state p {
    margin: 0;
}

.keys-layout {
    grid-template-columns: minmax(320px, .8fr) minmax(400px, 1.2fr);
}

.endpoint-code {
    margin: 16px 0;
}

.endpoint-code span,
.endpoint-code code {
    display: block;
}

.endpoint-code span {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}

.endpoint-code code {
    overflow-x: auto;
    padding: 13px;
    border: 1px solid #344054;
    border-radius: 10px;
    background: #111827;
    color: var(--lime);
    font-size: 11px;
    line-height: 1.6;
    white-space: nowrap;
}

.key-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-value code {
    display: block;
    max-width: 250px;
    overflow: hidden;
    color: #475467;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.settings-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
}

.action-name {
    font-family: "SFMono-Regular", monospace;
    font-weight: 700;
}

.context-code {
    display: block;
    max-width: 340px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

nav[role="navigation"] {
    padding: 16px;
}

nav[role="navigation"] > div:first-child {
    display: none;
}

nav[role="navigation"] a,
nav[role="navigation"] span {
    font-size: 12px;
}

@media (max-width: 1050px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column,
    .settings-grid,
    .keys-layout,
    .security-grid {
        grid-template-columns: 1fr;
    }

    .security-panel-wide {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 16px;
    }

    .sidebar-brand {
        padding: 0 4px 14px;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sidebar-nav a {
        flex: 0 0 auto;
        padding: 10px;
    }

    .sidebar-user {
        margin-top: 12px;
    }

    .content {
        padding: 28px 16px 50px;
    }

    .form-grid,
    .requirement-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .hero-status {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .otp-setup,
    .passkey-register {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .otp-qr {
        margin: 0 auto;
    }

    .passkey-item {
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .installer-shell {
        width: min(100% - 20px, 880px);
        padding: 16px 0;
    }

    .installer-card {
        padding: 22px 16px;
        border-radius: 18px;
    }

    .installer-brand {
        margin-bottom: 14px;
    }

    .installer-card-narrow {
        margin-top: 20px;
    }

    .step-line {
        margin-bottom: 26px;
    }

    .step-label {
        font-size: 10px;
    }

    .installer-heading h1 {
        font-size: 28px;
    }

    .installer-heading p:last-child {
        font-size: 14px;
        line-height: 1.65;
    }

    .requirement-focus {
        gap: 12px;
        padding: 16px 14px;
    }

    .status-orb {
        flex-basis: 32px;
        height: 32px;
    }

    .requirement-focus strong {
        font-size: 16px;
    }

    .inline-status {
        gap: 8px 16px;
    }

    .command-guide {
        padding: 17px 14px;
    }

    .command-guide pre {
        padding: 13px;
        font-size: 12px;
    }

    .form-stack fieldset {
        padding: 18px 14px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .recovery-codes {
        grid-template-columns: 1fr;
    }

    .passkey-item {
        flex-direction: column;
    }
}
