:root {
    color-scheme: light;
    --ink: #15251f;
    --muted: #607169;
    --line: #dce6e1;
    --surface: #ffffff;
    --brand: #087a5b;
    --brand-dark: #075b45;
    --soft: #eef8f4;
    --danger: #a12e3b;
    font-family: Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 20% 10%, #dff5eb 0, transparent 35%), linear-gradient(145deg, #f7faf8, #edf3f0); }
a { color: var(--brand-dark); }
button, input { font: inherit; }
.identity-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.identity-card { width: min(100%, 620px); background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid rgba(255,255,255,.8); border-radius: 26px; box-shadow: 0 24px 70px rgba(24,55,43,.13); padding: clamp(24px, 6vw, 48px); }
.identity-card.compact { text-align: center; max-width: 500px; }
.identity-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 42px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand span:last-child { display: grid; gap: 3px; }
.brand small { color: var(--muted); font-size: 11px; }
.brand-mark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--brand); color: white; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 9px 25px rgba(8,122,91,.25); }
nav { display: flex; gap: 14px; align-items: center; font-size: 13px; }
nav a { text-decoration: none; }
.link-button, .text-button { border: 0; background: none; color: var(--brand-dark); cursor: pointer; padding: 4px; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 13px; margin: 0 0 8px; }
h1 { font-size: clamp(27px, 5vw, 38px); margin: 0 0 12px; letter-spacing: -.04em; }
h2 { font-size: 19px; margin: 0 0 14px; }
.lede { color: var(--muted); line-height: 1.9; margin: 0 0 28px; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: #fbfdfc; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(8,122,91,.12); }
.primary-button, .secondary-button { min-height: 48px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary-button { border: 0; color: white; background: var(--brand); box-shadow: 0 9px 20px rgba(8,122,91,.18); }
.primary-button:hover { background: var(--brand-dark); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.secondary-button { color: var(--brand-dark); border: 1px solid var(--line); background: white; }
.button-link { width: 100%; }
.secondary-action { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.text-button { margin-top: 18px; text-decoration: underline; }
.notice { padding: 13px 15px; border-radius: 12px; margin: -18px 0 24px; background: var(--soft); color: var(--brand-dark); line-height: 1.7; }
.notice.error { background: #fff0f1; color: var(--danger); }
.context-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 28px 0; }
.context-grid div { border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: #fbfdfc; display: grid; gap: 8px; }
.context-grid small { color: var(--muted); }
.context-grid strong { overflow-wrap: anywhere; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions > * { flex: 1; }
.secret-panel, .recovery-panel { margin-top: 26px; padding: 20px; background: var(--soft); border-radius: 17px; }
.secret-panel code { display: block; overflow-wrap: anywhere; padding: 12px; margin-bottom: 12px; background: white; border: 1px dashed var(--brand); border-radius: 10px; text-align: left; }
.secret-panel > a { display: inline-block; margin-bottom: 20px; }
.recovery-panel ol { columns: 2; padding: 0 22px; line-height: 2; }
.security-events { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.security-events ul { display: grid; gap: 10px; list-style: none; padding: 0; margin: 14px 0 0; }
.security-events li { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfc; }
.security-events li small { color: var(--muted); direction: ltr; text-align: right; }
.security-events li button { grid-row: 1 / span 2; grid-column: 2; border: 0; border-radius: 9px; padding: 7px 9px; color: var(--brand-dark); background: var(--soft); cursor: pointer; }
.event-empty { color: var(--muted); font-size: 13px; }
.key-rotation-panel { margin-top: 22px; padding: 20px; border: 1px solid #e8c86f; border-radius: 17px; background: #fff9e8; }
.key-rotation-panel p { color: var(--muted); line-height: 1.8; }
[hidden] { display: none !important; }

@media (max-width: 600px) {
    .identity-card { border-radius: 20px; padding: 24px 20px; }
    .identity-header { align-items: flex-start; margin-bottom: 32px; }
    .brand small { display: none; }
    nav { gap: 9px; }
    .context-grid { grid-template-columns: 1fr; }
    .recovery-panel ol { columns: 1; }
}
