@charset "UTF-8";
:root {
    --bg: #f7f4ee;
    --paper: #fffdf8;
    --ink: #201a16;
    --muted: #645a51;
    --line: #ded4c8;
    --dark: #16120f;
    --soft: #efe7dc;
    --accent: #8a633a;
    --accent-dark: #5f4227;
    --white: #ffffff;
    --shadow: 0 18px 42px rgba(32, 26, 22, .09);
    --radius-lg: 24px;
    --radius-md: 16px;
    --max: 1120px;
    --error: #8c3030;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 16px/1.62 Georgia, "Times New Roman", serif; background: var(--bg); color: var(--ink); }
a { color: var(--accent-dark); text-underline-offset: 4px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.topbar { background: var(--dark); color: rgba(255,255,255,.88); font-size: .92rem; padding: .55rem 1rem; }
.topbar-inner { max-width: var(--max); margin: auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar a { color: rgba(255,255,255,.95); text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247,244,238,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1320px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem; }
.brand { text-decoration: none; font-weight: 700; letter-spacing: .02em; color: var(--ink); flex-shrink: 0; }
.brand small { display: block; font-size: .77rem; color: var(--muted); font-weight: 400; margin-top: .08rem; }
.portal-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 1.3rem; }
.portal-nav > a { color: var(--muted); font-size: .94rem; text-decoration: none; }
.portal-nav > a:hover, .portal-nav > a[aria-current=page] { color: var(--ink); }
.portal-nav form { margin: 0; }
.portal-nav .logout-button, .portal-nav .return-link { border: 1px solid var(--accent-dark); border-radius: 999px; background: transparent; color: var(--accent-dark); padding: .52rem .82rem; min-height: 40px; font-size: .94rem; font-weight: 400; }
.portal-nav .return-link { border-color: var(--line); background: var(--paper); }
.portal-surface { flex: 1; }
.portal-access .portal-surface { background: linear-gradient(135deg, var(--paper) 0%, var(--soft) 100%); border-bottom: 1px solid var(--line); }
.main { padding-block: 3.2rem 4rem; }
h1, h2, h3 { line-height: 1.13; margin: 0 0 1rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 3.7vw, 3rem); max-width: 980px; letter-spacing: -.044em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.03em; }
h3 { font-size: 1.18rem; letter-spacing: -.012em; }
p { margin: 0 0 1rem; }
.eyebrow { display: block; color: var(--accent-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .11em; font-weight: 700; margin-bottom: 1rem; }
.lead { font-size: clamp(1.05rem, 1.45vw, 1.23rem); color: var(--muted); max-width: 820px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .75rem 1rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; font-weight: 700; font-size: .96rem; transition: background .18s ease, border-color .18s ease; cursor: pointer; background: var(--accent-dark); color: var(--white); }
button:hover, .button:hover { background: var(--ink); color: var(--white); }
button:disabled { opacity: .5; cursor: default; }
.secondary { border-color: var(--line); background: rgba(255,255,255,.58); color: var(--ink); }
.secondary:hover { background: var(--soft); color: var(--ink); }
.text-button { border: 0; background: none; color: var(--accent-dark); padding: .2rem 0; min-height: 0; font-weight: 400; }
.text-button:hover { background: none; color: var(--ink); text-decoration: underline; }
.danger, .text-button.danger { color: var(--error); }
.card { background: var(--paper); border: 1px solid rgba(138,99,58,.20); border-radius: var(--radius-lg); box-shadow: none; padding: 1.5rem; min-width: 0; }
.auth-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(310px,.95fr); gap: 3rem; align-items: center; padding-block: 1rem; }
.intro h1 { font-size: clamp(2.6rem, 4.8vw, 3.9rem); line-height: 1.13; margin-bottom: 1.5rem; }
.intro .lead { max-width: 510px; }
.intro-note { display: flex; gap: 1rem; max-width: 450px; margin-top: 2rem; color: var(--muted); font-size: .94rem; }
.mini-line { height: 1px; min-width: 32px; background: var(--accent); margin-top: .8rem; }
.auth-card { padding: 2rem; box-shadow: var(--shadow); }
.auth-card h2 { font-size: clamp(1.65rem, 2.7vw, 2.1rem); }
.auth-card > p:not(.eyebrow) { color: var(--muted); }
.auth-card .small { margin: 1.5rem 0 0; }
.stack { display: grid; gap: 1rem; }
.stack > button { justify-self: start; }
.auth-card .stack > button { width: 100%; }
label { font-weight: 700; font-size: .94rem; display: block; }
input:not([type=checkbox]):not([type=hidden]), textarea, select { display: block; width: 100%; margin-top: .4rem; border: 1px solid var(--line); border-radius: 12px; padding: .78rem .8rem; background: var(--white); color: var(--ink); min-height: 46px; }
textarea { min-height: 110px; resize: vertical; }
.subtle-link { font-size: .9rem; display: block; margin-top: 1.3rem; }
.small, small { font-size: .84rem; }
small { display: block; }
.muted { color: var(--muted); }
.narrow { max-width: 590px; margin: 0 auto; padding: 2rem; }
.narrow h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.notice { color: var(--accent-dark); padding: .85rem 1rem; margin-bottom: 1.75rem; border: 1px solid rgba(138,99,58,.23); background: rgba(138,99,58,.11); border-radius: 14px; }
.notice p { margin: .5rem 0 .75rem; }
.notice ul { margin: .5rem 0 0; }
.error { color: var(--error); border-color: #dfb8b5; background: #fbefed; }
.demo-notice { font-size: .75rem; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: .75rem; margin-bottom: 1.75rem; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.page-heading p:not(.eyebrow) { color: var(--muted); margin: 0; }
.count { border: 1px solid var(--line); padding: .5rem 1rem; border-radius: 999px; white-space: nowrap; font-size: .9rem; }
.case-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.case-card { display: flex; flex-direction: column; min-height: 280px; }
.card-top, .card-bottom { display: flex; justify-content: space-between; align-items: center; gap: .85rem; }
.card-top { margin-bottom: 1.5rem; }
.status { display: inline-block; font-size: .8rem; color: var(--accent-dark); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; }
.case-card h2 a { text-decoration: none; }
.case-summary { font-size: .96rem; color: var(--muted); flex: 1; }
.card-bottom { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: .75rem; flex-wrap: wrap; }
.arrow-link { font-size: .9rem; font-weight: 700; text-decoration: none; }
.bottom-note { margin: 2rem 0 0; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: .94rem; text-decoration: none; }
.summary-card { margin-bottom: 1.75rem; }
.two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; align-items: start; }
.section-title { margin: 2.2rem 0 1.25rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.two-columns .section-title { margin-top: .5rem; }
.timeline { display: grid; gap: 1rem; }
.timeline .eyebrow { margin-bottom: .6rem; }
.timeline p:last-child { margin: 0; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.document { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.document:first-child { padding-top: 0; }
.document:last-child { border: 0; padding-bottom: 0; }
.document > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.document strong { font-size: .96rem; display: block; }
.document small, .document span { display: block; margin-top: .25rem; color: var(--muted); }
.download { font-size: .84rem; white-space: nowrap; }
details { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
summary { cursor: pointer; color: var(--accent-dark); font-size: .94rem; font-weight: 700; margin-bottom: 1rem; }
.qr { margin-block: 1.25rem; background: var(--white); display: inline-block; padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--line); max-width: 100%; }
.qr svg { display: block; max-width: 100%; height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; background: var(--soft); padding: 1rem; border-radius: 12px; margin-bottom: 1.25rem; }
.recovery-codes code { overflow-wrap: anywhere; }
.copy-row { display: flex; align-items: center; gap: .85rem; }
.copy-row input { margin: 0; }
.copy-row button { white-space: nowrap; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .85rem; min-width: 0; }
legend { font-size: .94rem; font-weight: 700; padding-inline: .3rem; }
.client-options { max-height: 155px; overflow: auto; }
.check { display: flex; gap: .6rem; align-items: start; font-weight: 400; margin-block: .4rem; }
.check input { margin: .3rem 0 0; accent-color: var(--accent-dark); }
.check span { min-width: 0; overflow-wrap: anywhere; }
.check small { color: var(--muted); }
.table-wrap { overflow: auto; padding: .6rem 1.5rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { color: var(--accent-dark); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
td, th { border-bottom: 1px solid var(--line); padding: 1.25rem .6rem; }
tr:last-child td { border: 0; }
td small { color: var(--muted); margin-top: .25rem; }
.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.actions a { font-size: .84rem; }
.actions form { margin: 0; }
.small-button { padding: .4rem .75rem; min-height: 36px; font-size: .84rem; }
.upload-form { max-width: 650px; }
.upload-form p { margin: 0; }
.document-list { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 1.75rem; }
.portal-footer { background: var(--dark); color: rgba(255,255,255,.78); padding: 2.5rem 0; }
.footer-inner { display: grid; grid-template-columns: 1.15fr .85fr .7fr; gap: 2rem; }
.portal-footer a { display: block; color: rgba(255,255,255,.92); text-decoration: none; margin-bottom: .45rem; overflow-wrap: anywhere; }
.portal-footer h3 { color: var(--white); margin-bottom: .6rem; }
.portal-footer p { color: rgba(255,255,255,.78); }
.footer-registration { font-size: .9rem; margin-bottom: 0; }
.legal { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.58); font-size: .9rem; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--dark); color: var(--white); padding: .75rem 1rem; z-index: 99; }
.skip:focus { left: 0; }
@media (max-width: 900px) {
    .auth-layout, .case-grid, .two-columns, .footer-inner { grid-template-columns: 1fr; }
    .auth-layout { gap: 2rem; }
    .auth-card { max-width: 590px; width: 100%; }
    .intro h1 br { display: none; }
    .intro-note { display: none; }
    .intro .lead { max-width: 680px; }
    .footer-inner { gap: 1.5rem; }
}
@media (max-width: 600px) {
    .header-inner { flex-wrap: wrap; gap: .8rem; }
    .portal-nav { width: 100%; justify-content: flex-start; gap: 1.25rem; }
    .portal-access .portal-nav { width: auto; margin-left: auto; }
    .main { padding-block: 2rem 2.5rem; }
    .intro h1 { font-size: clamp(2rem, 8.5vw, 2.8rem); }
    .auth-card, .narrow { padding: 1.5rem; }
    .card { padding: 1.25rem; }
    .page-heading { align-items: flex-start; flex-wrap: wrap; }
    .page-heading .count { display: none; }
    .page-heading > .button { font-size: .84rem; }
    .copy-row { flex-direction: column; align-items: stretch; }
    .document { align-items: flex-start; flex-wrap: wrap; }
    .table-wrap { padding: .3rem .75rem; }
    .recovery-codes { grid-template-columns: 1fr; }
    .portal-footer { padding-block: 2rem; }
}
@media (max-width: 520px) {
    .topbar { padding-block: .45rem; }
    .topbar-inner { justify-content: center; gap: .2rem; text-align: center; }
    .topbar-inner > span:first-child { display: none; }
    .topbar-inner > span:last-child { font-size: .86rem; }
}
