:root {
    color-scheme: light;
    --ink: #122033;
    --muted: #5e6d7e;
    --line: #d9e1ea;
    --paper: #ffffff;
    --surface: #f4f7fa;
    --brand: #006d77;
    --brand-dark: #0b3440;
    --accent: #e4a84b;
    --danger: #a62b2b;
    --success: #17704a;
}

/* Metrifind integrated experience 1.4 */
:root {
    --mf-navy: #071d31;
    --mf-navy-2: #0b2d3d;
    --mf-teal: #007f86;
    --mf-teal-bright: #0ca0a2;
    --mf-mint: #dff5f0;
    --mf-gold: #dfa83e;
    --mf-cloud: #f3f7f8;
    --mf-slate: #607082;
    --mf-shadow: 0 24px 70px rgba(6, 36, 48, .12);
}

html { scroll-behavior: smooth; }
body { background: #f5f8f9; }
.public-body { background: #fff; }
.brand-logo { width: 44px; height: 44px; border: 0; border-radius: 9px; }
.brand { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.brand strong { font-weight: 800; }
.button { border-radius: 7px; box-shadow: none; font-weight: 750; letter-spacing: -.01em; }
.button:hover { transform: translateY(-1px); }

/* Public navigation */
.public-header {
    position: relative;
    z-index: 20;
    min-height: 84px;
    padding: 16px clamp(24px, 6vw, 96px);
    border: 0;
    background: rgba(255,255,255,.97);
}
.public-header .brand { min-width: 210px; }
.public-header .public-nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
.public-header .public-nav a { color: #294052; text-decoration: none; font-size: 14px; font-weight: 650; }
.public-header .public-nav a:hover { color: var(--mf-teal); }
.public-header .public-nav .nav-login { margin-left: 10px; }
.public-header .public-nav .nav-cta { color: #fff; padding: 12px 19px; background: var(--mf-teal); }
.public-nav-toggle, .nav-toggle { display: none; border: 0; background: transparent; cursor: pointer; }
.public-nav-toggle > span:not(.visually-hidden), .nav-toggle > span:not(.visually-hidden) { display: block; width: 23px; height: 2px; margin: 5px; border-radius: 2px; background: currentColor; }
.public-page-main { width: 100%; max-width: none; padding: 0; margin: 0; }

/* Landing hero */
.landing-hero {
    min-height: 690px;
    display: grid;
    grid-template-columns: minmax(390px, .88fr) minmax(540px, 1.12fr);
    align-items: center;
    gap: clamp(30px, 6vw, 90px);
    padding: 76px max(24px, calc((100vw - 1380px)/2));
    overflow: hidden;
    background:
        radial-gradient(circle at 77% 25%, rgba(10,157,160,.16), transparent 29%),
        linear-gradient(125deg, #f7fbfb 0%, #fff 46%, #edf7f5 100%);
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow { color: var(--mf-teal); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.landing-hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.landing-hero .eyebrow span { width: 28px; height: 2px; background: var(--mf-gold); }
.landing-hero h1 { margin: 18px 0 22px; color: var(--mf-navy); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(48px, 5.3vw, 78px); line-height: .98; letter-spacing: -.045em; }
.landing-hero h1 em { color: var(--mf-teal); font-style: normal; }
.hero-lead { max-width: 650px; color: #506477; font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 25px; margin-top: 32px; }
.button-large { padding: 16px 22px; font-size: 16px; background: var(--mf-teal); }
.button-large span { margin-left: 16px; }
.text-link { color: var(--mf-navy); font-size: 14px; font-weight: 750; text-decoration: none; }
.text-link span { color: var(--mf-teal); margin-left: 7px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; color: #627283; font-size: 12px; font-weight: 650; }
.hero-trust span { color: var(--mf-teal); margin-right: 6px; }
.report-window { position: relative; min-width: 640px; border: 1px solid #d7e4e6; border-radius: 11px; overflow: hidden; background: #fff; box-shadow: var(--mf-shadow); transform: rotate(-.6deg); }
.report-window::before { content: ''; position: absolute; inset: -18px 18px 18px -18px; z-index: -1; border-radius: 18px; background: rgba(12,160,162,.08); }
.window-bar { height: 37px; display: flex; align-items: center; gap: 6px; padding: 0 15px; border-bottom: 1px solid #e2e8eb; background: #f7f9fa; }
.window-bar > span { width: 8px; height: 8px; border-radius: 50%; background: #c6d1d6; }
.window-bar small { margin: auto; color: #85919b; font-size: 10px; }
.report-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid #e5ecee; }
.report-preview-head div { display: grid; gap: 4px; }
.report-preview-head small { color: var(--mf-teal); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.report-preview-head strong { color: var(--mf-navy); font-size: 12px; }
.report-preview-head button { padding: 9px 11px; border: 0; border-radius: 5px; color: #fff; background: var(--mf-teal); font-size: 9px; font-weight: 700; }
.report-preview-body { display: grid; grid-template-columns: 1fr 190px; min-height: 390px; background: #edf2f3; }
.preview-paper { margin: 20px; padding: 34px 37px; background: #fff; box-shadow: 0 4px 18px rgba(21,45,58,.1); color: #3b4650; font-family: Georgia, serif; font-size: 12px; line-height: 1.95; }
.preview-paper > small { color: #7c8992; font-family: sans-serif; font-size: 7px; font-weight: 700; letter-spacing: .15em; }
.preview-paper h3 { color: var(--mf-navy); font-size: 18px; }
.preview-paper mark { padding: 2px 0; color: inherit; }
.source-one { background: #b8ede5; border-bottom: 2px solid #18a99c; }
.source-two { background: #ffe5ad; border-bottom: 2px solid #dfa83e; }
.preview-score { padding: 24px 17px; border-left: 1px solid #dce6e8; background: #fff; }
.score-ring { width: 94px; height: 94px; display: grid; align-content: center; justify-items: center; margin: 0 auto 27px; border: 8px solid #d7f0ec; border-top-color: var(--mf-teal); border-radius: 50%; }
.score-ring strong { color: var(--mf-navy); font-size: 24px; }
.score-ring span { color: var(--mf-slate); font-size: 8px; text-transform: uppercase; }
.source-row { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 7px; padding: 12px 0; border-top: 1px solid #edf1f2; font-size: 8px; }
.source-row i, .evidence-bars i { width: 6px; height: 28px; border-radius: 3px; background: var(--mf-teal); }
.source-row i.two, .evidence-bars i.two { background: var(--mf-gold); }
.source-row i.three, .evidence-bars i.three { background: #788bba; }
.source-row span { display: grid; color: #697886; }
.source-row b { color: var(--mf-navy); }

.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 max(24px, calc((100vw - 1280px)/2)); background: var(--mf-navy); }
.proof-strip div { display: grid; gap: 5px; padding: 30px 38px; border-right: 1px solid rgba(255,255,255,.12); }
.proof-strip strong { color: #fff; font-family: Georgia, serif; font-size: 29px; }
.proof-strip span { color: #9fb1bd; font-size: 11px; }
.landing-section { padding: 108px max(24px, calc((100vw - 1240px)/2)); }
.section-heading { max-width: 730px; margin: 0 auto 54px; text-align: center; }
.section-heading h2, .reports-section h2, .trust-section h2, .final-cta h2 { margin: 13px 0 18px; color: var(--mf-navy); font-family: Georgia, serif; font-size: clamp(37px, 4vw, 52px); line-height: 1.1; letter-spacing: -.03em; }
.section-heading > p:last-child, .reports-section > div > p, .trust-section > div > p, .final-cta > p { color: var(--mf-slate); line-height: 1.75; }
.method-section { background: #fff; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-grid article { position: relative; padding: 38px; border: 1px solid #e0e9eb; border-radius: 9px; background: #fbfdfd; }
.step-grid article > span { position: absolute; top: 24px; right: 28px; color: #d6e2e4; font-family: Georgia, serif; font-size: 30px; }
.step-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 50%; color: var(--mf-teal); background: var(--mf-mint); font-size: 25px; }
.step-grid h3, .report-tabs h3, .audience-grid h3 { color: var(--mf-navy); font-size: 19px; }
.step-grid p, .report-tabs p, .audience-grid p { color: var(--mf-slate); font-size: 14px; line-height: 1.7; }
.reports-section { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 95px; background: var(--mf-cloud); }
.report-feature-copy { max-width: 620px; }
.report-tabs { display: grid; gap: 13px; margin-top: 32px; }
.report-tabs article { display: grid; grid-template-columns: 8px 1fr; gap: 19px; padding: 20px 22px; border: 1px solid #dce7e9; border-radius: 8px; background: #fff; }
.report-tabs i { border-radius: 5px; background: var(--mf-teal); }
.report-tabs i.gold { background: var(--mf-gold); }
.report-tabs h3, .report-tabs p { margin: 0 0 5px; }
.evidence-card { padding: 30px; border-radius: 12px; background: #fff; box-shadow: var(--mf-shadow); }
.evidence-card-head { display: flex; justify-content: space-between; align-items: end; padding-bottom: 23px; border-bottom: 1px solid #e4eaec; }
.evidence-card-head span { color: var(--mf-navy); font-weight: 750; }
.evidence-card-head strong { color: var(--mf-teal); font-size: 43px; }
.evidence-bars { padding: 10px 0; }
.evidence-bars p { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 15px 0; border-bottom: 1px solid #edf1f2; color: var(--mf-slate); font-size: 13px; }
.evidence-bars p span { display: flex; align-items: center; gap: 12px; }
.evidence-bars i { display: inline-block; height: 23px; }
.evidence-bars b { color: var(--mf-navy); }
.evidence-note { display: flex; gap: 13px; margin-top: 14px; padding: 17px; border-radius: 7px; background: #eef8f5; }
.evidence-note > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--mf-teal); }
.evidence-note p { display: grid; gap: 3px; margin: 0; color: var(--mf-slate); font-size: 12px; }
.evidence-note strong { color: var(--mf-navy); }
.audiences-section { background: #fff; }
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.audience-grid article { min-height: 280px; display: flex; flex-direction: column; padding: 34px; border: 1px solid #dee7e9; border-radius: 8px; }
.audience-grid article > span { color: var(--mf-teal); font-size: 12px; font-weight: 800; }
.audience-grid article a { margin-top: auto; color: var(--mf-teal); font-size: 13px; font-weight: 750; text-decoration: none; }
.audience-grid article.featured { border-color: var(--mf-navy); color: #fff; background: var(--mf-navy); }
.audience-grid .featured h3 { color: #fff; }
.audience-grid .featured p { color: #b6c4ce; }
.audience-grid .featured a, .audience-grid .featured > span { color: #7dd8ce; }
.trust-section { display: grid; grid-template-columns: 1fr .8fr; gap: 90px; padding: 100px max(24px, calc((100vw - 1180px)/2)); color: #fff; background: linear-gradient(125deg, var(--mf-navy), #0a3b48); }
.trust-section h2 { color: #fff; }
.trust-section > div > p { color: #b8c7d0; }
.button-light { margin-top: 20px; color: var(--mf-navy); background: #fff; }
.trust-section ul { margin: 0; padding: 0; list-style: none; }
.trust-section li { display: flex; gap: 16px; padding: 21px 0; border-bottom: 1px solid rgba(255,255,255,.13); }
.trust-section li > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--mf-navy); background: #70d5c9; }
.trust-section li div { display: grid; gap: 5px; }
.trust-section li small { color: #aec0ca; line-height: 1.5; }
.final-cta { padding: 100px 24px; text-align: center; background: #eef7f5; }
.final-cta > p { max-width: 600px; margin-left: auto; margin-right: auto; }
.final-cta .hero-actions { justify-content: center; }

/* Signed-in product shell */
.app-body { overflow-x: hidden; background: #f4f7f8; }
.app-frame { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.app-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px 20px; color: #c0ccd3; background: var(--mf-navy); }
.app-brand { padding: 0 7px 23px; color: #fff; }
.app-brand .brand-logo { width: 38px; height: 38px; }
.app-nav { display: grid; gap: 3px; margin-top: 12px; }
.app-nav p { margin: 22px 12px 7px; color: #6f8997; font-size: 9px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.app-nav a { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 6px; color: #b9c8d0; font-size: 13px; font-weight: 650; text-decoration: none; }
.app-nav a > span { width: 18px; color: #72909d; text-align: center; font-size: 17px; }
.app-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.app-nav a.is-active { color: #fff; background: var(--mf-teal); }
.app-nav a.is-active > span { color: #fff; }
.sidebar-assurance { display: flex; gap: 10px; margin-top: auto; padding: 16px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(255,255,255,.04); }
.sidebar-assurance > span { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--mf-navy); background: #68cfc3; font-size: 11px; }
.sidebar-assurance div { display: grid; gap: 4px; }
.sidebar-assurance strong { color: #e6eff2; font-size: 11px; }
.sidebar-assurance small { color: #8199a5; font-size: 9px; line-height: 1.45; }
.app-stage { min-width: 0; }
.app-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(24px, 4vw, 55px); border-bottom: 1px solid #dce5e7; background: #fff; }
.topbar-context { display: grid; gap: 2px; }
.topbar-context strong { color: var(--mf-navy); font-size: 13px; }
.topbar-context span { color: #86949e; font-size: 10px; }
.account-chip { display: flex; align-items: center; gap: 10px; }
.account-chip > span:nth-child(2) { display: grid; min-width: 100px; }
.account-chip strong { color: var(--mf-navy); font-size: 11px; }
.account-chip small { color: #83919b; font-size: 9px; }
.account-chip > a { padding-left: 10px; border-left: 1px solid #dfe6e8; color: var(--mf-teal); font-size: 10px; font-weight: 700; text-decoration: none; }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--mf-teal); font-size: 12px; font-weight: 800; }
.app-main { width: auto; max-width: 1500px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 58px) 70px; }
.app-main .dashboard-heading { position: relative; margin-bottom: 18px; padding: 0; border: 0; }
.app-main .dashboard-heading h1 { margin: 7px 0 9px; color: var(--mf-navy); font-family: Georgia, serif; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.03em; }
.app-main .dashboard-heading > p:last-child { max-width: 780px; color: var(--mf-slate); line-height: 1.6; }
.app-main .dashboard-actions { display: flex; justify-content: flex-end; margin: -62px 0 34px; }
.app-main .account-summary { gap: 16px; margin: 34px 0; }
.app-main .account-summary > div { padding: 24px; border: 1px solid #dce6e8; border-radius: 8px; background: #fff; box-shadow: 0 7px 20px rgba(13,47,58,.035); }
.app-main .account-summary span { color: #83919c; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.app-main .account-summary strong { color: var(--mf-navy); font-size: 16px; }
.app-main .unframed-section, .app-main .document-layout > div, .app-main .document-upload-form, .app-main .member-layout > div, .app-main .invite-panel { border: 1px solid #dce6e8; border-radius: 9px; background: #fff; }
.app-main .unframed-section { padding: 30px; }
.app-main .document-layout { align-items: start; gap: 22px; }
.app-main .document-layout > div { min-width: 0; padding: 27px; }
.app-main .document-upload-form { position: sticky; top: 94px; padding: 27px; box-shadow: 0 10px 35px rgba(7,29,49,.06); }
.app-main .document-layout h2, .app-main .member-layout h2 { margin-top: 0; color: var(--mf-navy); font-family: Georgia, serif; }
.app-main .table-wrap { border: 1px solid #e0e7e9; border-radius: 7px; }
.app-main table { margin: 0; }
.app-main th { color: #72828d; background: #f0f5f6; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.app-main td { color: #4f606c; font-size: 12px; }
.app-main td strong, .app-main .document-title-link { color: var(--mf-navy); }
.app-main td small { margin-top: 5px; color: #89969f; line-height: 1.45; }
.app-main .status-label { border-radius: 999px; font-size: 9px; font-weight: 750; }
.app-main input, .app-main select, .app-main textarea { border-radius: 6px; border-color: #ccdadd; background: #fbfdfd; }
.app-main input:focus, .app-main select:focus, .app-main textarea:focus { outline: 3px solid rgba(0,127,134,.12); border-color: var(--mf-teal); }
.app-main .member-layout { gap: 22px; }
.app-main .member-layout > div, .app-main .invite-panel { padding: 27px; }

/* Public footer and forms */
.public-footer { display: grid; grid-template-columns: 1.6fr .7fr .7fr; gap: 40px; padding: 58px max(24px, calc((100vw - 1240px)/2)) 28px; color: #9aabb6; background: #061727; }
.public-footer .footer-brand { color: #fff; }
.public-footer .footer-brand > span { display: grid; gap: 4px; }
.public-footer .footer-brand small { color: #7f96a3; font-size: 10px; }
.public-footer nav { display: grid; align-content: start; justify-items: start; gap: 10px; }
.public-footer nav strong { margin-bottom: 5px; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.public-footer nav a { color: #94a7b1; font-size: 12px; text-decoration: none; }
.footer-bottom { grid-column: 1 / -1; margin: 20px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 10px; }
.public-body .form-shell { margin-top: 65px; margin-bottom: 90px; border: 1px solid #dce6e8; border-radius: 10px; box-shadow: 0 20px 55px rgba(7,29,49,.08); }

@media (max-width: 1100px) {
    .landing-hero { grid-template-columns: 1fr; padding-top: 60px; }
    .hero-copy { max-width: 760px; }
    .report-window { min-width: 0; width: min(800px, 96vw); }
    .reports-section { gap: 45px; }
    .app-frame { grid-template-columns: 220px minmax(0, 1fr); }
    .app-main .document-layout, .app-main .member-layout { grid-template-columns: 1fr; }
    .app-main .document-upload-form { position: static; }
}

@media (max-width: 900px) {
    .public-header { min-height: 70px; padding: 12px 20px; }
    .public-nav-toggle, .nav-toggle { display: block; }
    .public-header .public-nav { position: absolute; top: 69px; left: 0; right: 0; display: none; align-items: stretch; padding: 18px 24px 26px; border-bottom: 1px solid #dce6e8; background: #fff; box-shadow: 0 18px 30px rgba(7,29,49,.1); }
    .public-menu-open .public-header .public-nav { display: grid; }
    .public-header .public-nav .nav-login { margin-left: 0; }
    .landing-hero { min-height: auto; padding: 55px 24px 75px; }
    .proof-strip { grid-template-columns: repeat(2, 1fr); padding: 0; }
    .step-grid, .audience-grid { grid-template-columns: 1fr; }
    .reports-section, .trust-section { grid-template-columns: 1fr; }
    .app-frame { display: block; }
    .app-sidebar { position: fixed; left: 0; z-index: 50; width: 252px; transform: translateX(-102%); transition: transform .2s ease; }
    .sidebar-open .app-sidebar { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.22); }
    .nav-toggle { padding: 0; color: var(--mf-navy); }
    .topbar-context { margin-right: auto; }
}

@media (max-width: 640px) {
    .landing-hero h1 { font-size: 44px; }
    .hero-lead { font-size: 16px; }
    .report-window { transform: none; }
    .report-preview-body { grid-template-columns: 1fr; }
    .preview-score { display: grid; grid-template-columns: 90px 1fr; border-top: 1px solid #dce6e8; border-left: 0; }
    .score-ring { grid-row: 1 / 4; width: 74px; height: 74px; border-width: 6px; }
    .score-ring strong { font-size: 19px; }
    .preview-paper { margin: 10px; padding: 24px; }
    .proof-strip { grid-template-columns: 1fr 1fr; }
    .proof-strip div { padding: 22px; }
    .landing-section { padding: 75px 20px; }
    .step-grid article { padding: 28px; }
    .trust-section { padding: 75px 24px; }
    .public-footer { grid-template-columns: 1fr 1fr; }
    .footer-identity { grid-column: 1 / -1; }
    .app-topbar { height: 64px; padding: 0 16px; }
    .topbar-context span, .account-chip > span:nth-child(2) { display: none; }
    .account-chip > a { padding-left: 7px; }
    .app-main { padding: 28px 16px 55px; }
    .app-main .dashboard-actions { justify-content: flex-start; margin: 18px 0 28px; }
    .app-main .account-summary { grid-template-columns: 1fr; }
    .app-main .document-layout > div, .app-main .document-upload-form, .app-main .member-layout > div, .app-main .invite-panel, .app-main .unframed-section { padding: 20px; }
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--surface);
}

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

a {
    color: inherit;
}

.site-header,
.admin-header {
    min-height: 72px;
    padding: 14px clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 18px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--brand-dark);
    color: var(--paper);
    font-weight: 800;
    border-bottom: 4px solid var(--accent);
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #fff;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    width: 34px;
    height: 34px;
    object-fit: cover;
    background: #fff;
}

.audit-actions,
.audit-summary {
    display: grid;
    gap: 18px;
    margin: 28px 0;
}

.audit-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 24px;
    border: 1px solid var(--line);
    background: #fff;
}

.audit-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.audit-summary article {
    padding: 20px;
    border: 1px solid var(--line);
    background: #fff;
}

.audit-summary span,
.audit-summary strong {
    display: block;
}

.audit-summary strong {
    margin-top: 8px;
    font-size: 2rem;
}

.audit-meta,
.certification-meta {
    color: var(--muted);
    font-size: .9rem;
}

.certification-panel {
    margin-top: 20px;
    padding: 22px;
    border-left: 3px solid var(--gold);
    background: #fff;
}

.certification-panel h3 {
    margin: 4px 0 8px;
}

.certification-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 10px;
}

.certification-stats div {
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.certification-stats dt,
.certification-stats dd {
    margin: 0;
}

.certification-stats dd {
    margin-top: 5px;
    font-size: 1.45rem;
    font-weight: 800;
}

@media (max-width: 760px) {
    .audit-actions,
    .audit-summary,
    .certification-stats {
        grid-template-columns: 1fr;
    }
}

.button {
    min-height: 42px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--brand);
    color: var(--paper);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-secondary {
    border-color: var(--line);
    background: var(--paper);
    color: var(--ink);
}

.foundation-shell {
    min-height: calc(100vh - 73px);
    display: grid;
    place-items: center;
    padding: 40px 20px;
}

.foundation-intro {
    width: min(760px, 100%);
    padding: clamp(28px, 6vw, 64px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 6px solid var(--brand);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.status-line {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
    font-weight: 750;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--success);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-panel {
    width: min(460px, 100%);
    padding: 34px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 5px solid var(--brand);
}

.auth-panel .brand {
    margin-bottom: 32px;
}

label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #b9c5d2;
    border-radius: 5px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9c5d2;
    border-radius: 5px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

select {
    min-height: 46px;
}

input:focus {
    outline: 3px solid rgba(0, 109, 119, 0.16);
    border-color: var(--brand);
}

form .button {
    width: 100%;
    margin-top: 24px;
}

.alert {
    margin: 18px 0;
    padding: 12px 14px;
    border-left: 4px solid var(--danger);
    background: #fff1f1;
    color: #741f1f;
}

.alert-success {
    border-color: var(--success);
    background: #edf9f3;
    color: #14543a;
}

.public-nav,
.site-footer nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.public-main {
    width: min(1160px, calc(100% - 40px));
    min-height: calc(100vh - 145px);
    margin: 0 auto;
    padding: 48px 0 64px;
}

.site-footer {
    min-height: 72px;
    padding: 18px clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--brand-dark);
    color: var(--paper);
}

.form-shell,
.message-shell {
    width: min(820px, 100%);
    margin: 0 auto;
}

.compact-form,
.message-shell {
    width: min(560px, 100%);
}

.form-shell > form,
.compact-form > form {
    margin-top: 28px;
    padding-top: 8px;
}

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

.choice-fieldset {
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border: 0;
}

.choice-fieldset legend {
    width: 100%;
    margin-bottom: 10px;
    font-weight: 800;
}

.choice-option {
    min-height: 82px;
    margin: 0;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.choice-option input,
.consent-option input {
    width: 18px;
    min-height: 18px;
    margin: 2px 0 0;
}

.choice-option span,
.choice-option small {
    display: block;
}

.choice-option small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.4;
}

.institution-fields {
    margin: 30px 0;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.optional {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.consent-option {
    margin-top: 22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.form-links,
.hero-actions,
.admin-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.form-links {
    justify-content: space-between;
}

.dashboard-heading {
    margin-bottom: 32px;
}

.account-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.account-summary > div {
    min-height: 116px;
    padding: 22px;
    border-right: 1px solid var(--line);
}

.account-summary > div:last-child {
    border-right: 0;
}

.account-summary span,
.account-summary strong {
    display: block;
}

.account-summary span {
    margin-bottom: 10px;
    color: var(--muted);
}

.good-status {
    color: var(--success);
}

.unframed-section,
.policy-page {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.policy-page {
    width: min(820px, 100%);
    margin: 0 auto;
    border-top: 0;
}

.policy-page h2 {
    margin-top: 34px;
}

.detail-list {
    margin: 24px 0;
    border-top: 1px solid var(--line);
}

.detail-list > div {
    display: grid;
    grid-template-columns: minmax(150px, 0.35fr) 1fr;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list dt {
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
}

.review-request {
    margin: 28px 0;
    padding: 18px;
    border-left: 4px solid var(--accent);
    background: #fff8ea;
}

.response-form {
    width: min(680px, 100%);
}

.member-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr);
    gap: 28px;
    align-items: start;
}

.invite-panel {
    padding: 22px;
    background: var(--paper);
    border: 1px solid var(--line);
}

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

.inline-action-form .button {
    width: auto;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    font-size: 13px;
}

.member-access-form {
    display: grid;
    grid-template-columns: minmax(112px, 1fr) minmax(100px, 0.8fr);
    gap: 7px;
    min-width: 230px;
}

.member-access-form select {
    min-height: 36px;
    padding: 5px 7px;
    font-size: 13px;
}

.member-access-form .button {
    width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 6px 10px;
    grid-column: 1 / -1;
    font-size: 13px;
}

.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-main {
    width: min(1160px, calc(100% - 40px));
    margin: 42px auto;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.narrow-main {
    max-width: 760px;
}

.filter-nav {
    margin: 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-nav a {
    padding: 8px 11px;
    border: 1px solid var(--line);
    background: var(--paper);
    text-decoration: none;
}

.table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
}

th,
td {
    padding: 14px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #eaf0f4;
    font-size: 13px;
}

td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.status-label {
    display: inline-block;
    padding: 4px 7px;
    background: #eef2f5;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.status-pending_review {
    background: #fff3d8;
    color: #774d00;
}

.status-information_requested {
    background: #eaf0f4;
    color: #29475c;
}

.status-approved {
    background: #e8f7ef;
    color: #145a3b;
}

.status-rejected {
    background: #fdecec;
    color: #812727;
}

.status-active,
.status-accepted {
    background: #e8f7ef;
    color: #145a3b;
}

.status-analysis_pending,
.status-ready_for_extraction {
    background: #e8f7ef;
    color: #145a3b;
}

.status-extraction_pending,
.status-extraction_unavailable,
.status-security_screening {
    background: #fff3d8;
    color: #774d00;
}

.status-failed,
.status-deleted,
.status-retention_expired {
    background: #fdecec;
    color: #812727;
}

.status-suspended,
.status-revoked,
.status-expired {
    background: #fdecec;
    color: #812727;
}

.empty-state {
    padding: 36px 0;
    color: var(--muted);
}

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 42px;
    align-items: start;
}

.review-form {
    padding: 22px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.system-item {
    min-height: 150px;
    padding: 22px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.system-item strong {
    display: block;
    margin-bottom: 12px;
    font-size: 18px;
}

.system-item span {
    color: var(--success);
    font-weight: 700;
}

.document-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 34px;
    align-items: start;
    margin-top: 30px;
}

.document-upload-form {
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.document-upload-form input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.field-help { color: var(--muted); font-size: 13px; }

.consent-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.55;
}

.consent-row input { margin-top: 4px; }
.inline-control-form { display: flex; gap: 7px; min-width: 230px; }

.small-button,
.text-button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.small-button { padding: 7px 10px; background: var(--ink); color: #fff; }
.text-button { padding: 0; background: transparent; text-decoration: underline; }
.danger-text { color: #9f2424; }

.document-title-link {
    color: var(--ink);
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.document-workspace-heading h1 {
    max-width: 980px;
    overflow-wrap: anywhere;
}

.document-workspace-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 36px;
}

.document-workspace-summary > div {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--line);
}

.document-workspace-summary > div:last-child { border-right: 0; }
.document-workspace-summary span,
.document-workspace-summary small,
.workspace-actions small { display: block; color: var(--muted); }
.document-workspace-summary strong { display: block; margin-top: 8px; overflow-wrap: anywhere; }

.workspace-band {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 42px;
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
}

.processing-timeline {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
}

.processing-timeline li {
    position: relative;
    min-height: 62px;
    padding: 0 0 24px 38px;
    color: var(--muted);
}

.processing-timeline li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 15px;
    height: 15px;
    border: 2px solid var(--line);
    background: #fff;
}

.processing-timeline li::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 22px;
    bottom: 2px;
    width: 1px;
    background: var(--line);
}

.processing-timeline li:last-child::after { display: none; }
.processing-timeline li strong,
.processing-timeline li span { display: block; }
.processing-timeline li strong { color: var(--ink); margin-bottom: 5px; }
.processing-timeline .is-complete::before { background: #157a57; border-color: #157a57; }
.processing-timeline .is-current::before { background: var(--accent); border-color: var(--accent); }
.processing-timeline .needs-attention::before { background: #e6a135; border-color: #e6a135; }

.workspace-actions {
    align-self: start;
    border-left: 3px solid var(--accent);
    padding: 8px 0 8px 24px;
}

.workspace-actions .button { display: inline-block; margin: 12px 0; }
.report-foundation { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.source-admin-layout {
    display: grid;
    grid-template-columns: minmax(340px, .75fr) minmax(0, 1.25fr);
    gap: 34px;
    align-items: start;
    margin-top: 30px;
}

.source-form label { margin-top: 14px; }
.source-form textarea { resize: vertical; }

.similarity-result {
    display: inline-flex;
    flex-direction: column;
    min-width: 170px;
    padding: 18px 22px;
    margin: 8px 0 16px;
    border-left: 4px solid var(--accent);
    background: var(--paper);
}
.similarity-result strong { font-size: 42px; line-height: 1; color: var(--ink); }
.similarity-result span { margin-top: 7px; color: var(--muted); font-weight: 700; }
.calculation-record { margin: 24px 0; border-top: 1px solid var(--line); }
.calculation-record div { display: grid; grid-template-columns: 145px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.calculation-record dt { font-weight: 700; }
.calculation-record dd { margin: 0; color: var(--muted); }
.matched-source-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.matched-source-list article > div:first-child span,
.matched-source-list article > div:first-child strong,
.source-share span { display: block; }
.matched-source-list article > div:first-child span { color: var(--muted); font-size: 13px; }
.matched-source-list article > div:first-child strong { margin: 4px 0; }
.source-share { text-align: right; }
.matched-source-list details { grid-column: 1 / -1; }
.matched-source-list blockquote { margin: 12px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: #fff; color: var(--muted); }

.service-access-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-top: 22px;
}

.dashboard-actions { margin: 24px 0; }

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

.summary-card {
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    background: #fff;
}

.summary-card h2 { margin: 0; font-size: 17px; }
.summary-card small { display: block; color: var(--muted); }
.metric-value { margin: 16px 0 7px; font-size: 30px; line-height: 1; font-weight: 800; color: var(--ink); }

.corpus-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    margin: 28px 0 38px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.similarity-report {
    padding: 42px 0;
    border-bottom: 1px solid var(--line);
}

.report-overview {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(130px, .75fr)) minmax(170px, 1fr);
    margin: 20px 0 32px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.report-overview > div {
    min-width: 0;
    padding: 21px 20px;
    border-right: 1px solid var(--line);
}

.report-overview > div:last-child { border-right: 0; }
.report-score { border-top: 4px solid var(--accent); }
.report-score strong { display: block; font-size: 42px; line-height: 1; }
.report-score span,
.report-stat span,
.report-status small { display: block; margin-top: 7px; color: var(--muted); }
.report-stat strong { display: block; font-size: 25px; }
.report-status .status-dot { display: inline-block; margin-right: 7px; }

.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.report-toolbar strong,
.report-toolbar span { display: block; }
.report-toolbar span { margin-top: 3px; color: var(--muted); font-size: 14px; }

.report-review-layout {
    display: grid;
    grid-template-columns: 48px minmax(420px, 1.55fr) minmax(300px, .85fr);
    min-height: 680px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.evidence-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.evidence-map-track {
    position: relative;
    width: 8px;
    flex: 1;
    min-height: 520px;
    background: #e8edf2;
}

.evidence-map-marker {
    position: absolute;
    top: var(--map-position);
    left: 50%;
    width: 22px;
    height: 8px;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(18, 32, 51, .35);
    cursor: pointer;
}

.highlight-reading-canvas {
    min-width: 0;
    border-right: 1px solid var(--line);
}

.reading-canvas-heading,
.evidence-drawer-heading {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--line);
}

.reading-canvas-heading span,
.reading-canvas-heading strong,
.evidence-drawer-heading span,
.evidence-drawer-heading strong { display: block; }
.reading-canvas-heading span,
.evidence-drawer-heading span { color: var(--muted); font-size: 13px; }
.reading-canvas-heading > span { white-space: nowrap; }
.match-key { display: inline-block; width: 18px; height: 10px; margin-right: 5px; background: #f4d98d; }

.highlighted-document {
    max-height: 780px;
    overflow: auto;
    padding: 34px clamp(24px, 4vw, 52px) 60px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.85;
    color: #202b37;
}

.match-highlight {
    position: relative;
    padding: 2px 1px;
    border-radius: 2px;
    color: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    cursor: pointer;
    transition: opacity 160ms ease, box-shadow 160ms ease;
}

.match-highlight sup {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    margin-left: 3px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font: 700 10px/1 Inter, sans-serif;
    vertical-align: super;
}

.source-tone-1 { background-color: #bfe8df; }
.source-tone-2 { background-color: #f5d58a; }
.source-tone-3 { background-color: #bcd8f5; }
.source-tone-4 { background-color: #f1b7a7; }
.source-tone-5 { background-color: #d7c7f2; }
.source-tone-6 { background-color: #cbdc9d; }
.match-highlight.is-muted,
.source-evidence-row.is-muted { opacity: .2; }
.match-highlight.is-active { box-shadow: 0 0 0 2px var(--ink); }

.source-evidence-drawer {
    min-width: 0;
    max-height: 850px;
    overflow: auto;
}

.source-evidence-row {
    border-bottom: 1px solid var(--line);
    transition: opacity 160ms ease, background 160ms ease;
}
.source-evidence-row.is-active { background: #f8fafb; }
.source-select {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: start;
    padding: 17px 18px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.source-select strong,
.source-select small { display: block; overflow-wrap: anywhere; }
.source-select small { margin-top: 5px; color: var(--muted); }
.source-number {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(18, 32, 51, .22);
    border-radius: 50%;
    font-weight: 800;
}
.source-contribution { text-align: right; white-space: nowrap; }
.source-evidence-detail { padding: 0 18px 18px 63px; color: var(--muted); font-size: 14px; }
.source-evidence-detail > a,
.source-evidence-detail > span { display: block; margin-top: 5px; }
.source-evidence-detail details { margin-top: 12px; }
.source-evidence-detail blockquote { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: #fff; }
.method-disclosure { margin-top: 24px; }
.method-disclosure > summary { cursor: pointer; font-weight: 800; }
.no-match-report { padding: 34px 0; }
.ai-report-boundary { padding: 38px 0; }

@media (max-width: 700px) {
    .site-header,
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .admin-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .public-nav,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid,
    .choice-fieldset,
    .account-summary,
    .review-layout,
    .member-layout {
        grid-template-columns: 1fr;
    }

    .document-layout {
        grid-template-columns: 1fr;
    }

    .source-admin-layout { grid-template-columns: 1fr; }

    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .corpus-control { grid-template-columns: 1fr; }

    .report-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-overview > div { border-bottom: 1px solid var(--line); }
    .report-overview > div:nth-child(2n) { border-right: 0; }
    .report-overview > div:last-child { grid-column: 1 / -1; }
    .report-toolbar { align-items: flex-start; flex-direction: column; }
    .report-review-layout { grid-template-columns: 32px minmax(0, 1fr); min-height: 0; }
    .highlight-reading-canvas { border-right: 0; }
    .source-evidence-drawer { grid-column: 1 / -1; max-height: none; border-top: 1px solid var(--line); }
    .evidence-map { padding-inline: 6px; }
    .highlighted-document { max-height: 640px; padding: 26px 20px 44px; font-size: 16px; }
    .reading-canvas-heading { align-items: flex-start; flex-direction: column; }

    .document-workspace-summary,
    .workspace-band,
    .report-foundation {
        grid-template-columns: 1fr;
    }

    .document-workspace-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .account-summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .account-summary > div:last-child {
        border-bottom: 0;
    }

    .detail-list > div {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .calculation-record div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 430px) {
    .summary-grid { grid-template-columns: 1fr; }
}

/* Final cascade guards: these intentionally follow the legacy component layer. */
.public-body .public-page-main { width: 100%; max-width: none; padding: 0; margin: 0; }
.app-sidebar .app-brand { color: #fff; }
.app-body .app-main { width: auto; max-width: 1500px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 58px) 70px; }
.public-header.site-header { padding: 16px clamp(24px, 6vw, 96px); }
.landing-hero .hero-actions, .final-cta .hero-actions { justify-content: flex-start; }
.final-cta .hero-actions { justify-content: center; }
.landing-hero .button, .final-cta .button { color: #fff; background: var(--mf-teal); }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.library-heading .eyebrow { margin: 0 0 5px; }
.library-heading h2 { margin: 0; }
.library-search { width: min(260px, 100%); margin: 0; }
.library-search input { margin: 0; padding-left: 14px; }
tr[hidden] { display: none; }
.admin-header { color: #fff; border: 0; background: var(--mf-navy); }
.admin-header .brand, .admin-header .admin-nav a, .admin-header .admin-nav span { color: #fff; }
.admin-header .brand-mark { border-color: var(--mf-gold); background: var(--mf-teal); }
.admin-main { padding-top: 42px; }
.admin-main > h1 { color: var(--mf-navy); font-family: Georgia, serif; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.03em; }
@media (max-width: 900px) {
    .public-header.site-header { padding: 12px 20px; }
    .app-body .app-main { padding: 34px 22px 60px; }
}
@media (max-width: 640px) {
    .app-body .app-main { padding: 28px 16px 55px; }
    .library-heading { align-items: stretch; flex-direction: column; }
    .library-search { width: 100%; }
}
