:root {
    color-scheme: light;
    --canvas: #f7f8f4;
    --ink: #202e29;
    --muted: #647069;
    --green: #315e48;
    --green-dark: #244a37;
    --line: #dde3da;
    --danger: #a23d36;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { display: block; flex-shrink: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 4px;
}
::selection { background: #d9e6d3; color: var(--ink); }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; top: 12px; left: 12px; z-index: 5; padding: 12px 20px; border-radius: 8px; color: white; background: var(--ink); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 20px; color: var(--muted); }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 174px; height: auto; }
.brand span { padding-left: 20px; border-left: 1px solid var(--line); font-size: 10px; line-height: 1.7; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.back-link svg { width: 16px; height: 16px; }
.auth-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: center;
    gap: clamp(40px, 8vw, 128px);
    padding: 48px 54px;
}
.auth-intro { max-width: 470px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 24px; color: var(--green); font-size: 10px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #315e480d; flex-shrink: 0; }
h1 { margin: 0; font-size: clamp(38px, 4vw, 55px); line-height: 1.12; font-weight: 550; letter-spacing: -.05em; }
h1 span { color: var(--green); }
.intro-description { max-width: 390px; margin: 23px 0 0; font-size: 14px; line-height: 1.85; color: var(--muted); }
.intro-note { display: flex; align-items: flex-start; gap: 12px; max-width: 370px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.note-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; border: 1px solid #e0e7da; background: #eef2e9; color: var(--green); }
.note-icon svg { width: 19px; height: 19px; }
.intro-note strong { font-size: 12px; font-weight: 600; }
.intro-note p { margin: 5px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
.intro-meta { display: flex; gap: 24px; margin-top: 38px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.auth-card {
    width: 100%;
    min-width: 0;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: 0 20px 50px -30px #263a2938, 0 2px 6px #263a2904;
}
.card-heading { margin-bottom: 24px; }
.card-kicker { margin: 0 0 12px !important; font-size: 9px !important; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--green) !important; }
.card-heading h2 { margin: 0; font-size: 26px; font-weight: 550; line-height: 1.2; letter-spacing: -.04em; }
.card-heading > p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.auth-form { display: grid; gap: 17px; }
.field { min-width: 0; }
.field > label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 550; }
.input-wrap { position: relative; }
.field-input { display: block; width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #d9dfd5; border-radius: 7px; background: #fcfdfa; color: var(--ink); font-size: 14px; line-height: 1.5; transition: border-color .2s, box-shadow .2s; }
.field-input::placeholder { color: #7d857f; font-size: 12px; }
.field-input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px #315e480d; outline: none; }
.field-input[aria-invalid="true"] { border-color: var(--danger); }
.field-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #a23d3612; }
.password-input { padding-right: 82px; }
.password-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; min-width: 70px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: var(--green); font-size: 10px; font-weight: 600; }
.password-toggle:hover { background: #eef2e9; }
.field-hint, .field-error { margin: 7px 0 0; font-size: 11px; line-height: 1.6; }
.field-hint { color: var(--muted); }
.field-error { color: var(--danger); }
.form-options { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 11px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; cursor: pointer; }
.checkbox-label input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--green); flex-shrink: 0; cursor: pointer; }
.submit-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 47px; padding: 12px 16px; border: 1px solid var(--green); border-radius: 7px; background: var(--green); color: white; font-size: 12px; font-weight: 600; line-height: 1.5; transition: background .2s, transform .2s; }
.submit-button svg { width: 16px; height: 16px; }
.submit-button:hover:not(:disabled) { background: var(--green-dark); transform: translateY(-1px); }
.submit-button:disabled { opacity: .55; cursor: not-allowed; }
.form-footnote { margin: 19px 0 0; padding-top: 18px; border-top: 1px solid #e7ebe2; font-size: 11px; line-height: 1.8; text-align: center; color: var(--muted); }
.form-footnote a { font-weight: 500; }
.notice { margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 7px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.notice-success { color: var(--green-dark); background: #eff5ec; border-color: #d8e5d1; }
.notice-error { color: #8d3932; background: #fcf3f1; border-color: #eedbd6; }
.password-guidance { padding: 12px 14px; border: 1px solid #e4e9df; border-radius: 7px; background: #f8faf5; }
.guidance-heading { display: flex; align-items: center; gap: 10px; min-height: 20px; font-size: 11px; cursor: pointer; list-style: none; }
.guidance-heading::-webkit-details-marker { display: none; }
.guidance-heading::after { content: ''; width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); margin: -3px 2px 0 0; flex-shrink: 0; }
.password-guidance[open] .guidance-heading { margin-bottom: 12px; }
.password-guidance[open] .guidance-heading::after { transform: rotate(225deg); margin-top: 3px; }
.guidance-heading strong { font-weight: 550; flex: 1; }
.guidance-heading output { color: var(--muted); font-variant-numeric: tabular-nums; }
.criteria-meter { height: 3px; margin-bottom: 11px; overflow: hidden; border-radius: 3px; background: #e1e7db; }
.criteria-meter span { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s; }
.password-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 10px; line-height: 1.6; }
.password-rules li::before { content: '\2013'; display: inline-block; width: 14px; }
.password-rules li[data-valid="true"] { color: var(--green-dark); }
.password-rules li[data-valid="true"]::before { content: '\2713'; }
.password-rules li:last-child { grid-column: 1 / -1; }
.rule-symbols { font-family: inherit; overflow-wrap: anywhere; }
.match-feedback { min-height: 18px; margin: -8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.match-feedback[data-match="true"] { color: var(--green); }
.match-feedback[data-match="false"] { color: var(--danger); }
.signout-form { margin-top: 16px; text-align: center; }
.text-button { min-height: 32px; padding: 5px 8px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.text-button:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 20px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.7; }
.site-footer p { margin: 0; }
.footer-meta { display: flex; align-items: center; gap: 16px; }
.version { padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.auth-compact .auth-main { padding-block: 24px; }
.auth-compact .auth-card { padding: 26px; }
.auth-compact .card-heading { margin-bottom: 20px; }
.auth-compact .card-heading h2 { font-size: 24px; }
.auth-compact .auth-form { gap: 13px; }

@media (max-width: 1100px) {
    .auth-main { padding-inline: 0; gap: 48px; }
}
@media (max-width: 800px) {
    .shell { width: calc(100% - 48px); }
    .site-header { min-height: 80px; }
    .brand span { display: none; }
    .auth-main { grid-template-columns: minmax(0, 440px); justify-content: center; padding-block: 36px; }
    .auth-intro { display: none; }
    .site-footer { font-size: 9px; }
    .footer-meta > span:first-child { display: none; }
}
@media (max-width: 480px) {
    .shell { width: calc(100% - 32px); }
    .site-header { min-height: 72px; }
    .brand img { width: 140px; }
    .auth-main { padding-block: 24px; }
    .auth-card { padding: 23px 20px; border-radius: 12px; }
    .auth-compact .auth-card { padding: 23px 20px; }
    .card-heading h2 { font-size: 24px; }
    .field-input { font-size: 16px; }
    .password-rules { column-gap: 8px; }
    .site-footer { padding-block: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
