/*
 * Resident Portal — Version 2 ("Gabay") design layer.
 * Loaded last by layouts/portal.blade.php only, so every rule here is portal-scoped.
 * Anabu green theme: the greens and gold are drawn from the barangay seal (not an officially mandated palette).
 * Blue is kept only for information and in-progress states so statuses stay distinguishable.
 */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:wght@500;700&family=Atkinson+Hyperlegible+Next:ital,wght@0,400;0,700;1,400&family=Manrope:wght@700;800&display=swap');

:root {
    --v2-green-50: #eef5f0;
    --v2-green-100: #dcebe0;
    --v2-green-200: #a9d2b6;
    --v2-green-600: #17663a;
    --v2-green-700: #0f5130;
    --v2-forest-950: #13281c;
    --v2-gold: #c9a24a;
    --v2-seal-ring: var(--v2-green-600);
    --v2-on-dark: #d3dfd7;
    --v2-on-dark-muted: #a9bcaf;

    --v2-page: #f7faf8;
    --v2-subtle: #edf3ef;
    --v2-card: #fff;
    --v2-ink: #102018;
    --v2-muted: #4b5d53;
    --v2-line: #d6e0d9;
    --v2-line-strong: #76857b;
    --v2-brand: var(--v2-green-600);
    --v2-brand-strong: var(--v2-green-700);
    --v2-brand-subtle: var(--v2-green-100);
    --v2-brand-tint: var(--v2-green-50);
    --v2-brand-fill: var(--v2-green-600);
    --v2-brand-fill-strong: var(--v2-green-700);
    --v2-header: var(--v2-card);
    --v2-elevated: var(--v2-card);
    --v2-line-elevated: var(--v2-line);
    --v2-input: var(--v2-card);
    --v2-info: #1d5c99;
    --v2-info-subtle: #eaf2fb;
    --v2-info-line: #bcd3ec;
    --v2-on-brand: #fff;
    --v2-success: #087a43;
    --v2-success-subtle: #e3f3ea;
    --v2-warning: #6b4800;
    --v2-warning-subtle: #fbf3e1;
    --v2-danger: #9d2c25;
    --v2-danger-subtle: #fbeeec;
    --v2-shadow: 0 1px 2px rgba(16, 32, 24, .06), 0 6px 18px rgba(16, 32, 24, .07);

    --v2-font-body: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
    --v2-font-display: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    --v2-font-mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --v2-text: 16px;
    --v2-text-sm: 15px;
    --v2-control-height: 48px;
    --v2-radius: 10px;
    --v2-radius-lg: 14px;
    --v2-focus: 0 0 0 2px var(--v2-card), 0 0 0 5px var(--v2-brand);
    --v2-content: 1200px;

    /* Earlier portal layers read these names; pointing them at V2 keeps untouched pages consistent. */
    --civic-font-body: var(--v2-font-body);
    --civic-font-display: var(--v2-font-display);
    --civic-control-height: var(--v2-control-height);
    --civic-control-radius: 8px;
    --civic-panel-radius: var(--v2-radius);
    --civic-control-font-size: var(--v2-text-sm);
    --mono: var(--v2-font-mono);
}

body:not(.dark-mode), body.dark-mode {
    --civic-page: var(--v2-page);
    --civic-card: var(--v2-card);
    --civic-soft: var(--v2-subtle);
    --civic-ink: var(--v2-ink);
    --civic-muted: var(--v2-muted);
    --civic-line: var(--v2-line);
    --civic-blue: var(--v2-brand);
    --civic-blue-strong: var(--v2-brand-strong);
    --civic-blue-soft: var(--v2-brand-subtle);
    --civic-green: var(--v2-success);
    --civic-green-soft: var(--v2-success-subtle);
    --navy: var(--v2-ink);
    --navy-deep: var(--v2-forest-950);
    --navy-tint: var(--v2-brand-tint);
    --navy-line: var(--v2-brand-subtle);
    --shadow-sm: var(--v2-shadow);
    --band: var(--v2-forest-950);
    --band-line: rgba(255, 255, 255, .16);
    --civic-shadow: var(--v2-shadow);
    --bg: var(--v2-page);
    --surface: var(--v2-card);
    --surface-alt: var(--v2-subtle);
    --line: var(--v2-line);
    --line-strong: var(--v2-line-strong);
    --ink: var(--v2-ink);
    --ink-soft: var(--v2-muted);
    --muted: var(--v2-muted);
    --green: var(--v2-brand);
    --green-dark: var(--v2-brand-strong);
    --button: var(--v2-brand);
    --button-hover: var(--v2-brand-strong);
    --button-active: var(--v2-brand-strong);
    --focus: var(--v2-brand);
    background: var(--v2-page);
    color: var(--v2-ink);
    font-family: var(--v2-font-body);
    font-size: var(--v2-text);
    line-height: 1.6;
}

body.dark-mode {
    /* Neutral surface levels: page < band < header < card < elevated; inputs sit below their card. Green is only for fills, links and accents. */
    --v2-forest-950: #0b0f0d;
    --v2-page: #121715;
    --v2-subtle: #181f1c;
    --v2-header: #1f2824;
    --v2-card: #222b28;
    --v2-elevated: #303b36;
    --v2-input: #171d1a;
    --v2-ink: #eaf0ec;
    --v2-muted: #b3beb8;
    --v2-line: #3e4b45;
    --v2-line-elevated: #52605a;
    --v2-line-strong: #7f8d86;
    --v2-brand: #9edbb5;
    --v2-brand-strong: #c4ecd3;
    --v2-brand-subtle: #1e3a2b;
    --v2-brand-tint: #2c3832;
    --v2-brand-fill: #17663a;
    --v2-brand-fill-strong: #1f7a49;
    --v2-info: #9cc7f5;
    --v2-info-subtle: #132a42;
    --v2-info-line: #2b4a6b;
    --v2-on-brand: #fff;
    --v2-success: #6fd3a0;
    --v2-success-subtle: #123628;
    --v2-warning: #f0c96a;
    --v2-warning-subtle: #3a2d0c;
    --v2-danger: #f2a49c;
    --v2-danger-subtle: #3d1a17;
    --v2-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .35);
}

/* Typography and base elements */
.site-main :is(p, li, dd, dt, label, td, th) { font-size: inherit; }
h1, h2, h3, h4 { font-family: var(--v2-font-display); color: var(--v2-ink); letter-spacing: -.02em; line-height: 1.2; }
.site-main a:not(.btn) { color: var(--v2-brand); text-underline-offset: 3px; }
.site-main a:not(.btn):hover { color: var(--v2-brand-strong); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--v2-brand); outline-offset: 2px; }
.gov-bar :focus-visible, .site-footer :focus-visible { outline-color: var(--v2-green-200); }
.small, .muted.small, .form-note { font-size: var(--v2-text-sm); }

/* Buttons and form controls: 48px targets and 16px labels */
.btn { min-height: var(--v2-control-height); padding: 10px 20px; border-radius: 8px; font: 700 var(--v2-text-sm)/1.3 var(--v2-font-body); letter-spacing: 0; }
.btn-small { min-height: 44px; padding: 8px 16px; }
.btn-green, .btn-primary { background: var(--v2-brand-fill); border-color: var(--v2-brand-fill); color: var(--v2-on-brand); }
.btn-green:hover, .btn-primary:hover { background: var(--v2-brand-fill-strong); border-color: var(--v2-brand-fill-strong); color: var(--v2-on-brand); }
.btn-outline, body.dark-mode .site-main .btn-outline { background: var(--v2-card); border: 2px solid var(--v2-line-strong); color: var(--v2-ink); }
.btn-outline:hover, body.dark-mode .site-main .btn-outline:hover { background: var(--v2-brand-tint); border-color: var(--v2-brand); color: var(--v2-ink); }
.btn:disabled, .btn[disabled] { opacity: 1; background: var(--v2-subtle); border-color: var(--v2-line); color: var(--v2-muted); cursor: not-allowed; }
.btn-link { min-height: 44px; font-size: inherit; color: var(--v2-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.form-label { font-size: var(--v2-text-sm); font-weight: 700; color: var(--v2-ink); }
.form-input, body.dark-mode .form-input { min-height: var(--v2-control-height); padding: 10px 14px; border: 2px solid var(--v2-line-strong); border-radius: 8px; background: var(--v2-input); color: var(--v2-ink); font: 400 var(--v2-text)/1.4 var(--v2-font-body); }
.form-input:focus { border-color: var(--v2-brand); outline: 3px solid var(--v2-brand); outline-offset: 1px; }
.form-input[readonly] { border-style: solid; border-color: var(--v2-line); background: var(--v2-subtle); color: var(--v2-ink); }
.field-error { color: var(--v2-danger); font-weight: 700; font-size: var(--v2-text-sm); }
.checkbox-row { align-items: flex-start; gap: 12px; }
.checkbox-row input[type="checkbox"] { flex: 0 0 auto; width: 24px; height: 24px; margin-top: 2px; accent-color: var(--v2-brand); }
.alert { border-radius: var(--v2-radius); font-size: var(--v2-text-sm); }
.alert-blue { background: var(--v2-info-subtle); border-color: var(--v2-info-line); color: var(--v2-ink); }
.alert-green { background: var(--v2-success-subtle); border-color: var(--v2-success); color: var(--v2-ink); }
.alert-red { background: var(--v2-danger-subtle); border-color: var(--v2-danger); color: var(--v2-ink); }
.tag-unconfirmed, .unconfirmed .tag-unconfirmed { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid #c79a3a; border-radius: 999px; background: var(--v2-warning-subtle); color: var(--v2-warning); font-size: 14px; font-weight: 700; line-height: 1.5; vertical-align: baseline; }
body.dark-mode .tag-unconfirmed { border-color: #8a6a22; }
.unconfirmed { padding: 12px 16px; border-left: 4px solid #c79a3a; border-radius: 0 8px 8px 0; background: var(--v2-warning-subtle); color: var(--v2-ink); }

/* Government bar and header: the official site's identity (navy GOVPH bar, green line, seal, white header), with calmer spacing */
.gov-bar, body.dark-mode .gov-bar { background: var(--v2-forest-950); border-bottom: 3px solid var(--v2-gold); color: var(--v2-on-dark); }
.gov-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--v2-content); min-height: 40px; margin: 0 auto; padding: 2px 24px; }
.gov-identity { display: flex; align-items: center; gap: 10px; color: var(--v2-on-dark); font-size: 13px; }
.gov-identity strong { color: #fff; font-size: 12px; letter-spacing: .08em; }
.gov-identity > span { color: var(--v2-on-dark-muted); }
.gov-identity > span[aria-hidden] { color: #6f8a78; }
.gov-actions { display: flex; align-items: center; gap: 8px; }
.portal-language-toggle { display: inline-flex; align-items: center; gap: 2px; }
.portal-language-toggle > span { color: #6f8a78; }
.portal-language-toggle button { min-height: 36px; padding: 0 8px; border: 0; background: transparent; color: var(--v2-on-dark); font: 600 14px/1 var(--v2-font-body); cursor: pointer; }
.portal-language-toggle button:hover { color: #fff; }
.portal-language-toggle button[aria-pressed="true"] { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.gov-bar :focus-visible { outline-color: var(--v2-green-200); }

.site-header, body.dark-mode .site-header { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--v2-line); background: var(--v2-card); box-shadow: none; }
.site-header-inner { display: flex; align-items: center; gap: 20px; max-width: var(--v2-content); min-height: 76px; margin: 0 auto; padding: 8px 24px; }
.site-brand { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; margin-right: auto; color: var(--v2-ink); text-decoration: none; }
.site-brand img, body.dark-mode .site-brand img { width: 52px; height: 52px; padding: 3px; border: 2px solid var(--v2-seal-ring); border-radius: 50%; background: #fff; object-fit: contain; }
.site-brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.site-brand-text .site-brand-portal { order: -1; color: var(--v2-brand); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.site-brand-text strong { color: var(--v2-ink); font: 800 17px/1.25 var(--v2-font-display); }
.site-brand-text > span:not(.site-brand-portal) { display: block; color: var(--v2-muted); font-size: 13px; }
.site-nav, body.dark-mode .site-nav { background: transparent; border: 0; box-shadow: none; }
.site-nav-list a, body.dark-mode .site-nav-list a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--v2-ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.site-nav-list a::after { display: none; }
.site-nav-list a:hover, .site-nav-list a:focus-visible, body.dark-mode .site-nav-list a:hover { background: var(--v2-brand-tint); color: var(--v2-brand-strong); }
.site-nav-list a[aria-current="page"], body.dark-mode .site-nav-list a[aria-current="page"] { background: var(--v2-brand-subtle); color: var(--v2-brand-strong); box-shadow: none; }
.site-nav-account a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--v2-brand); font-size: 15px; font-weight: 600; text-decoration: none; }
.site-nav-account a:not(.btn):hover { background: var(--v2-brand-tint); }
.site-nav-account .btn, .site-nav-account .btn:not(.btn-link) { min-height: 42px; padding: 0 16px; border-radius: 8px; font-size: 15px; font-weight: 600; }
.site-nav-account .btn-green:hover { transform: none; box-shadow: none; }

/* Account menu: the resident's name is the only entry to account pages */
.rp-account-menu { position: relative; flex: 0 0 auto; }
.rp-account-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; border: 1px solid var(--v2-line-strong); border-radius: 999px; background: var(--v2-card); color: var(--v2-ink); font: 600 15px/1 var(--v2-font-body); cursor: pointer; }
.rp-account-button:hover, .rp-account-button[aria-expanded="true"] { border-color: var(--v2-brand); background: var(--v2-brand-tint); }
.rp-account-button > svg:first-child, .rp-account-button > img { width: 34px; height: 34px; border-radius: 50%; background: var(--v2-brand-subtle); color: var(--v2-brand-strong); object-fit: cover; }
.rp-account-button > svg:first-child { padding: 7px; box-sizing: border-box; }
.rp-account-chevron { width: 16px; height: 16px; color: var(--v2-muted); transition: transform .15s ease; }
.rp-account-button[aria-expanded="true"] .rp-account-chevron { transform: rotate(180deg); }
.rp-account-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; display: grid; min-width: 220px; margin: 0; padding: 6px; border: 1px solid var(--v2-line); border-radius: 12px; background: var(--v2-card); list-style: none; box-shadow: 0 12px 32px rgba(19, 40, 28, .16); }
.rp-account-list[hidden] { display: none; }
.rp-account-list :is(a, button) { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--v2-ink); font: 500 15px/1.2 var(--v2-font-body); text-align: left; text-decoration: none; cursor: pointer; }
.site-header .rp-account-list a { color: var(--v2-ink); text-decoration: none; }
.rp-account-list :is(a, button):hover, .rp-account-list :is(a, button):focus-visible { background: var(--v2-brand-tint); color: var(--v2-brand-strong); }
.rp-account-list a[aria-current="page"] { font-weight: 700; color: var(--v2-brand-strong); }
.rp-account-separator { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--v2-line); }
.rp-account-separator button { color: var(--v2-danger); }
.menu-toggle.btn, body.dark-mode .menu-toggle.btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--v2-line-strong); border-radius: 8px; background: var(--v2-card); color: var(--v2-ink); font-size: 15px; }

@media (min-width: 1100px) {
    .menu-toggle.btn, .nav-collapsible .menu-toggle { display: none; }
    .site-nav, body.nav-collapsible .site-nav:not(.is-open) { position: static; display: block; max-height: none; border-top: 0; opacity: 1; visibility: visible; }
    .site-nav-inner, .site-nav ul.site-nav-list, .site-nav ul.site-nav-account { display: flex; flex-direction: row; align-items: center; gap: 4px; padding: 0; border: 0; }
    .site-nav-inner { gap: 16px; }
    .site-nav-list a { border-bottom: 0; }
    .site-nav ul.site-nav-account { padding-left: 16px; border-left: 1px solid var(--v2-line); }
    .site-nav-account li { flex: 0 0 auto; }
    /* Home page: the header sits on the hall photo until the visitor scrolls. */
    body.has-hero-header:not(.hero-header-scrolled) .site-header .site-nav { background: transparent; }
    body.has-hero-header:not(.hero-header-scrolled) .site-header .site-nav .site-nav-list a, body.has-hero-header:not(.hero-header-scrolled) .site-header .site-nav .site-nav-account a:not(.btn) { color: #fff; }
    body.has-hero-header:not(.hero-header-scrolled) .site-nav ul.site-nav-account { border-left-color: rgba(255, 255, 255, .3); }
}
@media (max-width: 1099.98px) {
    .site-header-inner { position: relative; gap: 10px; }
    .menu-toggle.btn { display: inline-flex; order: 3; }
    .rp-account-menu { order: 2; }
    .site-nav, body.dark-mode .site-nav { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; border-top: 1px solid var(--v2-line); background: var(--v2-card); }
    .site-nav-inner { display: grid; gap: 12px; max-width: var(--v2-content); margin: 0 auto; padding: 12px 24px 20px; }
    .site-nav ul.site-nav-list, .site-nav ul.site-nav-account { display: grid; gap: 4px; padding: 0; }
    .site-nav-list a, body.dark-mode .site-nav-list a { min-height: 48px; padding: 0 14px; border-bottom: 0; font-size: 16px; }
    .site-nav ul.site-nav-account { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--v2-line); }
    .site-nav-account a:not(.btn), .site-nav-account .btn { justify-content: center; width: 100%; min-height: 48px; border: 1px solid var(--v2-line-strong); }
    .site-nav.is-open { box-shadow: 0 12px 24px rgba(19, 40, 28, .14); }
}
body.has-hero-header:not(.hero-header-scrolled) .rp-account-button { border-color: rgba(255, 255, 255, .6); background: rgba(19, 40, 28, .25); color: #fff; }
body.has-hero-header:not(.hero-header-scrolled) .rp-account-chevron { color: #fff; }
@media (max-width: 640px) {
    .gov-bar-inner { padding-inline: 16px; }
    .gov-identity > span:not(:first-child) { display: none; }
    .site-header-inner { min-height: 68px; padding: 8px 16px; }
    .site-brand { flex: 1 1 auto; min-width: 0; gap: 10px; }
    .site-brand img, body.dark-mode .site-brand img { width: 44px; height: 44px; }
    .site-brand-text { min-width: 0; }
    .site-brand-text strong { font-size: 16px; overflow-wrap: anywhere; }
    .site-brand-text > span:not(.site-brand-portal) { display: none; }
    .rp-account-name { display: none; }
    .rp-account-button { padding: 4px 8px 4px 4px; }
    .menu-toggle .menu-label-closed, .menu-toggle .menu-label-open { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .site-header .menu-toggle { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
    .site-nav-inner { padding-inline: 16px; }
}

/* Page frame: titles sit on the page, not in a white band (Figma C1, C3, A3) */
.container { max-width: var(--v2-content); padding: 8px 24px 72px; }
.page-band, body.dark-mode .page-band { border: 0; background: transparent; }
.page-band-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; max-width: var(--v2-content); margin: 0 auto; padding: 36px 24px 24px; }
.page-band-text { max-width: 760px; }
.page-band h1 { margin: 0; font-size: clamp(30px, 3.2vw, 40px); color: var(--v2-ink); }
.page-band-lead, .page-band-lead p { margin: 8px 0 0; color: var(--v2-muted); font-size: var(--v2-text); }
.page-band-actions { display: flex; flex-wrap: wrap; gap: 12px; min-width: 0; }
.page-band-actions .btn { width: auto; }
.page-band-compact h1 { color: var(--v2-brand-strong); font-size: 24px; }
.page-band-below { max-width: var(--v2-content); margin: 0 auto; padding: 0 24px 8px; }
.v2-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; font-weight: 700; color: var(--v2-brand); text-underline-offset: 3px; }
.v2-back span[aria-hidden] { font-size: 24px; line-height: 1; }
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; }
.jump-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--v2-line); border-radius: 999px; background: var(--v2-card); color: var(--v2-brand-strong); font-weight: 700; text-decoration: none; }
.jump-links a:hover { border-color: var(--v2-brand); }
.card, .panel, body.dark-mode .card, body.dark-mode .panel { border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-card); box-shadow: var(--v2-shadow); }
.card-header h2 { font-size: 24px; }
.card-header p { color: var(--v2-muted); }
.eyebrow, .v2-eyebrow, .v2-page-eyebrow { margin: 0 0 6px; color: var(--v2-brand-strong); font-size: var(--v2-text-sm); font-weight: 700; letter-spacing: 0; text-transform: none; }
.v2-section-title { margin: 8px 0 12px; font-size: 21px; }
.v2-label { margin: 0 0 10px; color: var(--v2-muted); font: 700 var(--v2-text-sm)/1.3 var(--v2-font-body); letter-spacing: 0; }

/* Footer: the official navy footer with its brand, services, help and government links, spaced for easier scanning */
.site-footer, body.dark-mode .site-footer { margin-top: 0; border-top: 4px solid var(--v2-gold); background: var(--v2-forest-950); color: var(--v2-on-dark); }
.site-footer-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); gap: 40px; max-width: var(--v2-content); margin: 0 auto; padding: 48px 24px 36px; }
.site-footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.site-footer-brand img { flex: 0 0 auto; width: 56px; height: 56px; padding: 3px; border: 2px solid var(--v2-seal-ring); border-radius: 50%; background: #fff; object-fit: contain; }
.site-footer .site-footer-brand h2 { margin: 0 0 4px; padding: 0; border: 0; font: 800 18px/1.3 var(--v2-font-display); letter-spacing: -.01em; }
.site-footer h2 { margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid rgba(201, 162, 74, .55); color: #fff; font: 700 15px/1.3 var(--v2-font-display); letter-spacing: .01em; }
.site-footer :is(p, li) { margin: 0 0 10px; color: var(--v2-on-dark); font-size: 15px; line-height: 1.55; }
.site-footer-facts { display: grid; gap: 10px; margin: 0 0 6px; }
.site-footer-facts dt { margin: 0; color: var(--v2-on-dark-muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.site-footer-facts dd { margin: 2px 0 0; color: var(--v2-on-dark); font-size: 15px; line-height: 1.5; }
.site-footer-facts dd a { display: inline; min-height: 0; font-weight: 700; }
.site-footer .site-footer-note { color: var(--v2-on-dark-muted); font-size: 14px; }
.site-footer ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer ul li { margin: 0; }
.site-footer a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer a[aria-current="page"] { font-weight: 700; text-decoration-color: #fff; }
.site-footer :focus-visible { outline-color: var(--v2-green-200); }
.site-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; max-width: var(--v2-content); margin: 0 auto; padding: 18px 24px 28px; border-top: 1px solid rgba(255, 255, 255, .14); }
.site-footer-base p { margin: 0; color: var(--v2-on-dark-muted); font-size: 14px; }
.site-footer-base p:first-child { color: var(--v2-on-dark); font-weight: 700; }
@media (max-width: 960px) { .site-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
@media (max-width: 600px) {
    .site-footer-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 36px 16px 28px; }
    .site-footer-base { padding-inline: 16px; }
}

/* Status: every state has a word, an icon and a colour */
.status, .v2-status {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 34px; padding: 4px 12px 4px 10px;
    border: 1px solid currentColor; border-radius: 999px;
    background: var(--v2-subtle); color: var(--v2-muted);
    font: 700 var(--v2-text-sm)/1.25 var(--v2-font-body); white-space: nowrap;
}
.status::before, .v2-status::before {
    content: ""; flex: 0 0 18px; width: 18px; height: 18px; border: 0; border-radius: 0; transform: none;
    background: currentColor;
    -webkit-mask: var(--v2-status-icon) center / contain no-repeat; mask: var(--v2-status-icon) center / contain no-repeat;
}
.status, .v2-status, [data-status="pending"] { --v2-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
[data-status="pending"] { background: var(--v2-info-subtle); color: var(--v2-info); }
[data-status="processing"] { --v2-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M12 3a9 9 0 0 1 0 18z' fill='black'/%3E%3C/svg%3E"); background: var(--v2-info-subtle); color: var(--v2-info); }
[data-status="approved"] { --v2-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background: var(--v2-info-subtle); color: var(--v2-info); }
[data-status="ready_for_release"] { --v2-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='black'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background: var(--v2-success-subtle); color: var(--v2-success); }
[data-status="released"] { --v2-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M4 8l8-4 8 4v8l-8 4-8-4z'/%3E%3Cpath d='M4 8l8 4 8-4M12 12v8'/%3E%3C/svg%3E"); background: var(--v2-subtle); color: var(--v2-muted); }
[data-status="rejected"] { --v2-status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 9l6 6M15 9l-6 6'/%3E%3C/svg%3E"); background: var(--v2-danger-subtle); color: var(--v2-danger); }

/* Home (Figma A1 signed in, A2 guest) */
.v2-hero { background: var(--v2-forest-950); color: #fff; }
.v2-hero-inner { max-width: var(--v2-content); margin: 0 auto; padding: 44px 24px 56px; }
.v2-hero-greeting { margin: 0 0 8px; color: var(--v2-on-dark); font-size: 19px; }
.v2-hero h1 { margin: 0; color: #fff; font-size: clamp(30px, 3.6vw, 40px); }
.v2-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
.v2-home-guest { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
.v2-home-guest > :not(.v2-tasks):not(.v2-login-card) { grid-column: 1 / -1; }
.v2-home-guest .v2-tasks { grid-template-columns: minmax(0, 1fr); align-content: start; }
.v2-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.v2-task {
    position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 18px; align-content: center;
    min-height: 124px; padding: 22px 56px 22px 20px; border: 2px solid var(--v2-line-strong); border-radius: var(--v2-radius-lg);
    background: var(--v2-card); color: var(--v2-ink); text-decoration: none; transition: border-color .15s ease, background-color .15s ease;
}
.site-main a.v2-task { color: var(--v2-ink); text-decoration: none; }
.v2-task:hover, .v2-task:focus-visible { border-color: var(--v2-brand); background: var(--v2-brand-tint); }
.v2-task::after { content: ""; position: absolute; top: 50%; right: 22px; width: 22px; height: 22px; margin-top: -11px; background: var(--v2-brand-fill); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.v2-task-icon { grid-row: 1 / span 3; align-self: center; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--v2-brand-subtle); color: var(--v2-brand-strong); }
.v2-task-icon svg { width: 28px; height: 28px; }
.v2-task-title { font: 800 21px/1.25 var(--v2-font-display); }
.v2-task-text { color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-task-primary, .site-main a.v2-task-primary { border-color: var(--v2-brand-fill); background: var(--v2-brand-fill); color: var(--v2-on-brand); }
.v2-task-primary:hover, .v2-task-primary:focus-visible { border-color: var(--v2-brand-strong); background: var(--v2-brand-strong); }
.v2-task-primary .v2-task-icon { background: #fff; color: var(--v2-green-700); }
.v2-task-primary .v2-task-text { color: var(--v2-on-brand); }
.v2-task-primary::after { background: var(--v2-on-brand); }
.v2-task .v2-status { justify-self: start; margin-top: 6px; }
.v2-login-card { display: grid; gap: 14px; align-content: start; padding: 28px 32px; }
.v2-login-card h2 { margin: 0; font-size: 23px; }
.v2-login-card p { margin: 0 0 6px; color: var(--v2-muted); }
.v2-login-card .btn { width: 100%; }
.v2-callout { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; padding: 18px 20px; border-radius: var(--v2-radius); background: var(--v2-subtle); color: var(--v2-ink); }
.v2-callout > div > :first-child { margin-top: 0; }
.v2-callout > div > :last-child, .v2-callout > p:last-child { margin-bottom: 0; }
.v2-callout h2, .v2-callout h3 { margin: 0 0 4px; font: 700 var(--v2-text)/1.35 var(--v2-font-body); letter-spacing: 0; }
.v2-callout p { margin: 0; }
.v2-callout-icon { width: 24px; height: 24px; color: var(--v2-ink); }
p.v2-callout { display: block; }
.v2-callout-warning { border: 1px solid #e7cf9b; background: var(--v2-warning-subtle); }
.v2-callout-warning .v2-callout-icon, .v2-callout-warning strong { color: var(--v2-warning); }
.v2-more h2 { margin: 8px 0 16px; font-size: 23px; }
.v2-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.v2-link-grid a { display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 14px; min-height: 68px; height: 100%; padding: 12px 18px; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-card); color: var(--v2-ink); font-weight: 700; text-decoration: none; box-sizing: border-box; }
.site-main .v2-link-grid a { color: var(--v2-ink); text-decoration: none; }
.v2-link-grid a::after { content: "\203A"; color: var(--v2-ink); font-size: 26px; line-height: 1; }
.v2-link-grid a:hover { border-color: var(--v2-brand); background: var(--v2-brand-tint); }
.v2-link-grid svg { width: 24px; height: 24px; color: var(--v2-brand-strong); }
.v2-card { padding: 24px; border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg); background: var(--v2-card); box-shadow: none; }
.v2-card > h2 { margin: 0 0 12px; font-size: 21px; }
.v2-card > :last-child { margin-bottom: 0; }
.v2-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.v2-card-head h2 { margin: 0; font-size: 21px; }
.v2-card-info { border-color: var(--v2-info-line); background: var(--v2-info-subtle); }
.v2-list { display: grid; gap: 8px; margin: 0; padding-left: 22px; }
.v2-links { list-style: none; margin: 0; padding: 0; }
.v2-links li + li { border-top: 1px solid var(--v2-line); }
.v2-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; font-weight: 700; text-decoration: none; }
.v2-links a::after { content: "\203A"; font-size: 26px; line-height: 1; }
.v2-links-icon a { justify-content: flex-start; color: var(--v2-ink); }
.site-main .v2-links-icon a { color: var(--v2-ink); }
.v2-links-icon a::after { margin-left: auto; }
.v2-links-icon svg { width: 24px; height: 24px; color: var(--v2-brand-strong); }
.v2-announcements { list-style: none; margin: 0; padding: 0; }
.v2-announcements li { padding: 14px 0; border-top: 1px solid var(--v2-line); }
.v2-announcements li:first-child { padding-top: 0; border-top: 0; }
.v2-announcements time { display: block; color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-announcements h3 { margin: 2px 0 4px; font-size: 18px; }
.v2-announcements p { margin: 0; color: var(--v2-muted); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 960px) {
    .v2-home-guest { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    .v2-hero-inner { padding: 28px 16px 34px; }
    .v2-hero-greeting { font-size: 17px; }
    .v2-home { gap: 24px; padding-top: 24px; }
    .v2-tasks { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .v2-task { min-height: 0; padding: 18px 48px 18px 16px; grid-template-columns: 48px minmax(0, 1fr); gap: 2px 14px; }
    .v2-task-icon { width: 48px; height: 48px; }
    .v2-task-title { font-size: 19px; }
    .v2-card, .v2-login-card { padding: 18px; }
    .v2-link-grid { grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-card); }
    .v2-link-grid li + li a { border-top: 1px solid var(--v2-line); }
    .v2-link-grid a { min-height: 60px; border: 0; border-radius: 0; }
}

/* Request flow: step panel beside the form on desktop, a progress bar on phones */
.request-layout.v2-request { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; max-width: none; }
.v2-request-aside { position: sticky; top: 104px; display: grid; gap: 16px; }
.v2-request-aside[hidden] { display: none; }
.v2-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.v2-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; color: var(--v2-muted); }
.v2-steps li::before { content: attr(data-step); display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--v2-line-strong); border-radius: 50%; background: var(--v2-card); color: var(--v2-muted); font: 700 15px/1 var(--v2-font-body); }
.v2-steps li.is-done { color: var(--v2-ink); }
.v2-steps li.is-done::before { content: "\2713"; border-color: var(--v2-brand-fill); background: var(--v2-brand-fill); color: var(--v2-on-brand); }
.v2-steps li.is-current { color: var(--v2-ink); font-weight: 700; }
.v2-steps li.is-current::before { border-color: var(--v2-brand); background: var(--v2-brand-subtle); color: var(--v2-brand-strong); }
.v2-steps .v2-step-now { display: block; color: var(--v2-brand-strong); font-size: 14px; font-weight: 700; }
.v2-summary { margin: 0; display: grid; gap: 0; }
.v2-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--v2-line); }
.v2-summary > div:first-child { border-top: 0; padding-top: 0; }
.v2-summary dt { color: var(--v2-muted); }
.v2-summary dd { margin: 0; font-weight: 700; text-align: right; }
.v2-summary-note { margin: 10px 0 0; color: var(--v2-muted); font-size: var(--v2-text-sm); }
.steps .progress-steps { display: none; }
.steps-summary { margin: 0 0 12px; color: var(--v2-brand-strong); font-weight: 700; }
.v2-progress { height: 8px; margin: 0 0 20px; border-radius: 999px; background: var(--v2-subtle); overflow: hidden; }
.v2-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--v2-brand-fill); }
.cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cert-btn, body.dark-mode .cert-btn { grid-template-columns: 28px minmax(0, 1fr); align-items: start; column-gap: 14px; min-height: 88px; padding: 16px 18px; border: 2px solid var(--v2-line-strong); border-radius: var(--v2-radius); background: var(--v2-card); color: var(--v2-ink); }
.cert-btn::before { content: ""; grid-column: 1; grid-row: 1 / span 4; width: 24px; height: 24px; margin-top: 2px; border: 2px solid var(--v2-line-strong); border-radius: 50%; background: var(--v2-card); box-sizing: border-box; }
.cert-btn :is(.label, .fee, .cert-validity, .cert-selected) { grid-column: 2; }
.cert-btn .label { font-size: 18px; font-weight: 700; line-height: 1.3; }
.cert-btn .fee, .cert-btn .cert-validity { color: var(--v2-muted); font-size: var(--v2-text-sm); }
.cert-btn .cert-check { display: none; }
.cert-btn:hover { border-color: var(--v2-brand); background: var(--v2-brand-tint); transform: none; box-shadow: none; }
.cert-btn.selected { border-color: var(--v2-brand); background: var(--v2-brand-tint); box-shadow: inset 0 0 0 1px var(--v2-brand); }
.cert-btn.selected::before { border: 7px solid var(--v2-brand); }
.cert-btn .cert-selected { color: var(--v2-brand-strong); }
.v2-terms-summary { margin: 0 0 18px; padding: 18px 20px; border-radius: var(--v2-radius); background: var(--v2-brand-tint); }
.v2-terms-summary h3 { margin: 0 0 10px; font-size: 19px; }
.tnc-box { max-height: 320px; padding: 18px 20px; border: 2px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-card); font-size: var(--v2-text-sm); }
.tnc-scroll-notice { font-size: var(--v2-text-sm); }
.upload-box { min-height: 120px; border: 2px dashed var(--v2-line-strong); border-radius: var(--v2-radius); background: var(--v2-subtle); color: var(--v2-ink); font-size: var(--v2-text-sm); }
.upload-box:hover, .upload-box.is-dragover { border-color: var(--v2-brand); background: var(--v2-brand-tint); }
.summary-list { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 0; margin: 0; }
.summary-list :is(dt, dd) { margin: 0; padding: 12px 0; border-top: 1px solid var(--v2-line); }
.summary-list dt { color: var(--v2-muted); }
.summary-list dd { font-weight: 700; overflow-wrap: anywhere; }
.confirm-ticket { border: 2px solid var(--v2-brand); border-radius: var(--v2-radius); background: var(--v2-brand-tint); }
.confirm-code, .v2-ref { font-family: var(--v2-font-mono); font-weight: 700; letter-spacing: .04em; }
.confirm-code { font-size: clamp(24px, 4vw, 32px); color: var(--v2-ink); }
#toast-wrap .toast { font-size: var(--v2-text-sm); }

@media (max-width: 960px) {
    .request-layout.v2-request { grid-template-columns: minmax(0, 1fr); }
    .v2-request-aside { display: none; }
}
@media (min-width: 961px) {
    .v2-progress { display: none; }
}
@media (max-width: 640px) {
    .cert-grid { grid-template-columns: minmax(0, 1fr); }
    .summary-list { grid-template-columns: minmax(0, 1fr); }
    .summary-list dd { padding-top: 0; border-top: 0; }
}

/* My requests (Figma C1: one row per request, details on the status page) */
.request-table { overflow: hidden; border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg); background: var(--v2-card); }
.request-table-head, .request-item { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(120px, 1fr) minmax(170px, 1.2fr) 96px; align-items: center; gap: 16px; padding: 0 24px; }
.request-table-head { min-height: 48px; border-bottom: 1px solid var(--v2-line); background: var(--v2-subtle); color: var(--v2-muted); font-size: var(--v2-text-sm); font-weight: 700; }
.request-list { display: block; list-style: none; margin: 0; padding: 0; }
.request-item, body.dark-mode .request-item { position: relative; min-height: 88px; padding-block: 16px; border: 0; border-left: 0; border-radius: 0; background: transparent; box-shadow: none; }
.request-item + .request-item { border-top: 1px solid var(--v2-line); }
.request-item:hover { background: var(--v2-brand-tint); }
.request-row-document h2 { margin: 0; font-size: 19px; }
.request-row-document h2 a { color: var(--v2-ink); text-decoration: none; }
.request-row-document h2 a::after { content: ""; position: absolute; inset: 0; }
.request-row-document h2 a:focus-visible { outline: 0; }
.request-item:focus-within { box-shadow: inset 0 0 0 3px var(--v2-brand); }
.request-row-reference { margin: 2px 0 0; font-family: var(--v2-font-mono); font-weight: 700; color: var(--v2-muted); }
.request-row-hint { margin: 4px 0 0; color: var(--v2-brand-strong); font-size: var(--v2-text-sm); font-weight: 700; }
.request-item.is-ready .request-row-hint { color: var(--v2-success); }
.request-item.is-rejected .request-row-hint { color: var(--v2-danger); }
.request-row-date { margin: 0; }
.request-row-label { display: none; }
.request-row-status .status { margin: 0; }
.request-row-link { justify-self: end; color: var(--v2-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.list-caption { margin: 0 0 12px; color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-empty { display: grid; gap: 10px; justify-items: start; max-width: 640px; }
.v2-empty h2, .v2-empty p { margin: 0; }
@media (max-width: 760px) {
    .request-table-head { display: none; }
    .request-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "doc doc" "date status"; gap: 10px 12px; padding: 16px; }
    .request-row-document { grid-area: doc; }
    .request-row-date { grid-area: date; color: var(--v2-muted); font-size: var(--v2-text-sm); }
    .request-row-label { display: inline; }
    .request-row-status { grid-area: status; }
    .request-row-link { display: none; }
    .request-row-document h2 { padding-right: 24px; }
    .request-row-document h2 a::before { content: "\203A"; position: absolute; top: 14px; right: 16px; color: var(--v2-brand); font-size: 28px; }
}

/* Request status page (Figma C3) */
.v2-ref-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 0; }
.v2-ref-row .v2-ref { color: var(--v2-ink); font-size: 19px; }
.v2-submitted { margin: 2px 0 0; color: var(--v2-muted); }
.v2-tracker { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.v2-tracker-main, .v2-tracker-aside { display: grid; gap: 22px; align-content: start; min-width: 0; }
.v2-tracker-state p { margin: 12px 0 0; font-size: var(--v2-text); }
.v2-collect { border: 2px solid var(--v2-success); background: var(--v2-success-subtle); }
.v2-collect h2 { margin: 0 0 16px; }
.v2-collect-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.v2-collect-steps svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--v2-success); }
.v2-collect-steps p { margin: 0 0 6px; }
.v2-details { display: grid; margin: 0; padding-block: 8px; }
.v2-details > div { padding: 12px 0; border-top: 1px solid var(--v2-line); }
.v2-details > div:first-child { border-top: 0; }
.v2-details dt { color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-details dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.v2-btn-icon { display: inline-flex; align-items: center; gap: 10px; }
.v2-btn-icon svg, .v2-account-card .btn svg { width: 22px; height: 22px; }
.v2-stages { position: relative; display: grid; gap: 0; list-style: none; margin: 0 0 14px; padding: 0; }
.v2-stages li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 14px; min-height: 52px; padding-bottom: 8px; color: var(--v2-muted); }
.v2-stages li:not(:last-child)::after { content: ""; position: absolute; top: 32px; bottom: -2px; left: 15px; width: 2px; background: var(--v2-line-strong); }
.v2-stages li.is-done:not(:last-child)::after { background: var(--v2-brand-fill); }
.v2-stages li::before { content: ""; display: block; width: 32px; height: 32px; border: 2px solid var(--v2-line-strong); border-radius: 50%; background: var(--v2-card); box-sizing: border-box; }
.v2-stages li > span { padding-top: 4px; }
.v2-stages li.is-done { color: var(--v2-ink); }
.v2-stages li.is-done::before { border-color: var(--v2-brand-fill); background: var(--v2-brand-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 18px no-repeat; }
body.dark-mode .v2-stages li.is-done::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23031737' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
.v2-stages li.is-current { color: var(--v2-ink); font-weight: 700; }
.v2-stages li.is-current::before { border: 2px solid var(--v2-brand); background: radial-gradient(circle, var(--v2-brand) 0 6px, var(--v2-card) 7px); }
.v2-stages li.is-current[data-stage="ready_for_release"]::before { border-color: var(--v2-success); background: radial-gradient(circle, var(--v2-success) 0 6px, var(--v2-card) 7px); }
.v2-stages li.is-stopped::before { border-color: var(--v2-danger); background: var(--v2-danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M8 8l8 8M16 8l-8 8'/%3E%3C/svg%3E") center / 16px no-repeat; }
.v2-stage-name { margin-right: 8px; }
.v2-chip { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--v2-brand-subtle); color: var(--v2-brand-strong); font-size: 14px; font-weight: 700; }
.v2-stage-note { display: block; margin-top: 4px; color: var(--v2-muted); font-size: var(--v2-text-sm); font-weight: 400; }
@media (max-width: 960px) {
    .v2-tracker { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
    .v2-collect-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .v2-collect-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 12px; }
    .v2-collect-steps svg { grid-row: 1 / span 2; margin: 0; }
}

/* Help page: hotlines and the Barangay Hall details moved here from the home page */
.v2-hotlines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-hotlines li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 16px 18px; border: 1px solid var(--v2-line); border-left: 5px solid var(--v2-danger); border-radius: var(--v2-radius); background: var(--v2-card); }
.v2-hotlines a { min-height: 44px; display: inline-flex; align-items: center; font: 800 21px/1.2 var(--v2-font-display); white-space: nowrap; }
.office-section.v2-office { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 0; padding: 0; border: 0; }
.v2-office .office-details, .v2-office .office-map { min-height: 0; border-radius: var(--v2-radius); }
.v2-office .office-map iframe { min-height: 320px; }
@media (max-width: 760px) {
    .v2-hotlines, .office-section.v2-office { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
    .gov-bar-inner { padding-inline: 16px; }
    .site-header-inner { min-height: 68px; }
    .container { padding: 4px 16px 56px; }
    .page-band-inner { padding: 24px 16px 18px; }
    .request-item { padding: 16px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .v2-task, .screen.active { transition: none; animation: none; }
}

/* Tracker notes keep the staff's own line breaks without adding blank lines from the markup */
.v2-card-remarks { border-left: 5px solid var(--v2-brand); background: var(--v2-brand-tint); }
.v2-card-rejected { border-left: 5px solid var(--v2-danger); background: var(--v2-danger-subtle); }
.v2-card-remarks p, .v2-card-rejected p:first-of-type { white-space: pre-line; overflow-wrap: anywhere; }

/* Request flow aligned with Figma B1-B7: no card frame, a question per step, compact options */
.v2-request .screen > .card, body.dark-mode .v2-request .screen > .card { border: 0; background: transparent; box-shadow: none; }
.v2-request .screen > .card > .card-header { padding: 0 0 18px; border: 0; background: transparent; }
.v2-request .screen > .card > .card-header h2 { margin: 0 0 6px; font-size: clamp(26px, 2.6vw, 32px); }
.v2-request .screen > .card > :is(.card-body, form) { padding: 0; }
.v2-request .btn-row, .v2-request .btn-row-split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: none; margin-top: 28px; }
.v2-request .btn-row > .btn { width: auto; min-width: 140px; height: auto; }
.v2-request .btn-row > .btn:only-child { margin-left: auto; }
.v2-request #screen-terms .btn-row > .btn { width: 100%; }
.steps-summary { margin: 0 0 8px; color: var(--v2-muted); font-size: var(--v2-text-sm); font-weight: 700; }
.cert-btn, body.dark-mode .cert-btn { grid-template-columns: 28px auto minmax(0, 1fr) auto; align-items: center; column-gap: 0; min-height: 84px; padding: 16px 18px; }
.cert-btn::before { grid-column: 1; grid-row: 1 / span 2; margin: 0 14px 0 0; }
.cert-btn .label { grid-column: 2 / 4; grid-row: 1; }
.cert-btn .fee { grid-column: 2; grid-row: 2; white-space: nowrap; }
.cert-btn .cert-validity { display: block; grid-column: 3; grid-row: 2; }
.cert-btn .cert-validity::before { content: "·"; margin: 0 8px; }
.cert-btn .cert-selected { grid-column: 4; grid-row: 1 / span 2; align-self: center; margin-left: 12px; font-size: var(--v2-text-sm); }
.cert-btn.selected .cert-selected { display: block; }
.v2-request .v2-callout-warning { margin: 4px 0 0; }
.v2-request .v2-callout-warning p { margin: 0; }
#doc-selected-info { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v2-steps { position: relative; gap: 6px; }
.v2-steps li { position: relative; }
.v2-steps li:not(:last-child)::after { content: ""; position: absolute; top: 34px; bottom: -8px; left: 15px; width: 2px; background: var(--v2-line-strong); }
.v2-steps li.is-done:not(:last-child)::after { background: var(--v2-brand-fill); }
.v2-steps .v2-step-now { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--v2-brand-subtle); font-size: 14px; }
.v2-steps .v2-step-now[hidden] { display: none; }

/* Sign-in, registration and password pages: one form column and one help panel */
.auth-layout.v2-form-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 32px; align-items: start; }
.v2-form-card, body.dark-mode .v2-form-card { border: 1px solid var(--v2-line); border-radius: var(--v2-radius-lg); box-shadow: none; }
.v2-form-card > .card-body, .v2-form-card > form.card-body { padding: 32px; }
.v2-form-card .form-group { margin-bottom: 22px; }
.v2-form-card .btn-full { width: 100%; }
.v2-label-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.v2-label-row a { font-size: var(--v2-text-sm); font-weight: 700; }
.resident-remember { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0 0 22px; font-size: var(--v2-text-sm); }
.resident-remember input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--v2-brand); }
.v2-secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-secure-note svg { width: 18px; height: 18px; }
.v2-side-panel { display: grid; gap: 18px; padding: 26px; }
.v2-side-panel > h2, .v2-side-panel section > h2 { margin: 0; font-size: 21px; }
.v2-side-panel section { display: grid; gap: 6px; }
.v2-side-panel section + section { padding-top: 18px; border-top: 1px solid var(--v2-line); }
.v2-side-panel :is(p, ul) { margin: 0; }
.v2-path { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-subtle); }
.v2-path h3 { margin: 0; font-size: 18px; }
.v2-path p { margin: 0; color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-checklist { margin: 0 0 24px; }
.v2-form-card .progress-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: v2step; }
.v2-form-card .progress-steps li { position: relative; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; color: var(--v2-muted); font-size: 14px; text-align: center; counter-increment: v2step; }
.v2-form-card .progress-steps li::before { content: counter(v2step); display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--v2-line-strong); border-radius: 50%; background: var(--v2-card); color: var(--v2-muted); font: 700 15px/1 var(--v2-font-body); }
.v2-form-card .progress-steps li::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: var(--v2-line-strong); transform: none; }
.v2-form-card .progress-steps li:last-child::after { display: none; }
.v2-form-card .progress-steps li.done { color: var(--v2-ink); }
.v2-form-card .progress-steps li.done::before { content: "\2713"; border-color: var(--v2-brand-fill); background: var(--v2-brand-fill); color: var(--v2-on-brand); }
.v2-form-card .progress-steps li.done::after { background: var(--v2-brand-fill); }
.v2-form-card .progress-steps li[aria-current="step"] { color: var(--v2-ink); font-weight: 700; }
.v2-form-card .progress-steps li[aria-current="step"]::before { border-color: var(--v2-brand); background: var(--v2-brand-subtle); color: var(--v2-brand-strong); }
.step-count { margin: 0; color: var(--v2-brand-strong); font-size: var(--v2-text-sm); font-weight: 700; letter-spacing: 0; text-transform: none; }
.registration-step-title { margin: 4px 0 6px; font-size: clamp(24px, 2.4vw, 30px); }
.step-guidance { margin: 0 0 22px; padding: 0; border: 0; color: var(--v2-muted); }
.registration-path-option { margin: 0 0 26px; padding: 16px 18px; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-subtle); }
.registration-path-option p { font-size: var(--v2-text-sm); }
.v2-form-card details.more { margin-top: 24px; padding: 14px 18px; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); }
.v2-form-card details.more summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--v2-brand); cursor: pointer; }
.v2-form-card .next-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--v2-line); color: var(--v2-muted); font-size: var(--v2-text-sm); }
.v2-form-card .auth-links { margin-top: 22px; font-size: var(--v2-text-sm); }
.v2-form-card.narrow { max-width: 760px; }
.new-resident-layout.v2-form-page { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
@media (max-width: 960px) {
    .auth-layout.v2-form-page, .new-resident-layout.v2-form-page { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .v2-form-card > .card-body, .v2-form-card > form.card-body { padding: 20px 18px; }
    .v2-side-panel { padding: 20px 18px; }
    .v2-form-card .progress-steps li { font-size: 0; }
    .v2-form-card .progress-steps li[aria-current="step"] { font-size: 13px; }
}

/* Account hub (Figma A3) and profile */
.v2-account { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
.v2-account-card { display: grid; justify-items: start; gap: 10px; padding: 28px; }
.v2-account-card h2 { margin: 6px 0 0; font-size: 23px; }
.v2-account-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 8px; }
.v2-avatar { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--v2-brand-subtle); color: var(--v2-brand-strong); object-fit: cover; }
.v2-avatar svg { width: 34px; height: 34px; }
.v2-avatar-large { width: 96px; height: 96px; }
.v2-menu-list { padding: 0 24px; }
.v2-profile.profile-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.v2-profile .stack { display: grid; gap: 22px; }
.v2-record-head { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--v2-line); }
.v2-record-head h2 { margin: 0; font-size: 23px; }
.record-lock { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--v2-muted); font-size: var(--v2-text-sm); font-weight: 700; }
.record-lock svg { width: 18px; height: 18px; }
.v2-profile .v2-card h2 { font-size: 21px; }
.v2-profile .numbered-list { display: grid; gap: 8px; padding-left: 22px; }
@media (max-width: 860px) {
    .v2-account, .v2-profile.profile-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* Help page */
.requirements-intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 20px; }
.requirements-intro .v2-callout h3 { margin-bottom: 8px; }
.requirements-intro .plain-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; list-style: disc; }
.service-table { border: 0; background: transparent; }
.service-list-head { display: none; }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.service-item, body.dark-mode .service-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name action" "fee action" "valid action"; align-items: center; gap: 2px 16px; padding: 16px 18px; border: 2px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-card); }
.service-item h3 { grid-area: name; margin: 0; font-size: 18px; }
.service-item .service-fee { grid-area: fee; margin: 0; color: var(--v2-ink); font-weight: 700; }
.service-item .service-validity { grid-area: valid; margin: 0; color: var(--v2-muted); font-size: var(--v2-text-sm); }
.service-item .btn { grid-area: action; width: auto; min-width: 110px; }
.section { margin-top: 44px; }
.section-first { margin-top: 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 26px; }
.section-head p { margin: 0; color: var(--v2-muted); }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.two-column > .v2-card h3 { margin: 0 0 10px; font-size: 20px; }
.office-list, .info-list { margin: 0; }
.info-list > div, .office-list { display: grid; gap: 2px; }
.info-list > div { padding: 10px 0; border-top: 1px solid var(--v2-line); }
.info-list dt, .office-list dt { color: var(--v2-muted); font-size: var(--v2-text-sm); }
.info-list dd, .office-list dd { margin: 0 0 8px; font-weight: 700; }
@media (max-width: 760px) {
    .service-list, .two-column { grid-template-columns: minmax(0, 1fr); }
    .service-item { grid-template-areas: "name" "fee" "valid" "action"; grid-template-columns: minmax(0, 1fr); }
    .service-item .btn { justify-self: start; margin-top: 10px; }
}

/* Announcements archive */
.portal-announcement-archive { display: grid; gap: 18px; max-width: 860px; margin: 0; }
.portal-announcement-card.v2-card { padding: 26px 28px; box-shadow: none; }
.portal-announcement-date { margin: 0; color: var(--v2-brand-strong); font-size: var(--v2-text-sm) !important; font-weight: 700; }
.portal-announcement-card h2 { margin: 6px 0 12px; font-size: 23px; }
.portal-announcement-body { color: var(--v2-ink); font-size: var(--v2-text); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-announcement-image { display: block; max-width: 100%; max-height: 460px; margin: 4px 0 14px; border-radius: var(--v2-radius); object-fit: contain; }
.portal-announcement-empty { padding: 26px; border: 1px dashed var(--v2-line-strong); border-radius: var(--v2-radius-lg); }

/* Certificate verification (opened from a QR code, often by someone other than the resident) */
.v2-verify { display: grid; gap: 22px; max-width: 760px; }
.v2-verify-result { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: center; padding: 24px; border: 2px solid var(--v2-success); border-radius: var(--v2-radius-lg); background: var(--v2-success-subtle); }
.v2-verify-result[data-result="expired"] { border-color: #c79a3a; background: var(--v2-warning-subtle); }
.v2-verify-result h2 { margin: 0 0 4px; font-size: 24px; }
.v2-verify-result p { margin: 0; }
.v2-verify-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--v2-success); color: #fff; }
.v2-verify-result[data-result="expired"] .v2-verify-icon { background: var(--v2-warning); }
.v2-verify-result[data-result="revoked"] { border-color: var(--v2-danger); background: var(--v2-danger-subtle); }
.v2-verify-result[data-result="revoked"] .v2-verify-icon { background: var(--v2-danger); }
body.dark-mode .v2-verify-icon { color: var(--v2-forest-950); }
.v2-verify-icon svg { width: 30px; height: 30px; }
.v2-verify .v2-details { padding: 8px 24px; }
.new-resident-secondary-actions a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--v2-text-sm); }
.request-item.is-ready, .request-item.is-rejected, body.dark-mode .request-item.is-ready, body.dark-mode .request-item.is-rejected { border-left: 0; background: transparent; box-shadow: none; color: var(--v2-ink); }
.request-item.is-ready:hover, .request-item.is-rejected:hover { background: var(--v2-brand-tint); }
.site-main .request-row-document h2 a { color: var(--v2-ink); text-decoration: none; }
.site-main .request-row-document h2 a:hover { color: var(--v2-brand-strong); text-decoration: underline; }
.request-item, body.dark-mode .request-item { color: var(--v2-ink); }
.site-footer ul { gap: 2px; }
.site-footer ul a, .site-footer p a { display: inline-flex; align-items: center; min-height: 36px; padding: 0; }
.site-footer p:has(> a) { margin-bottom: 2px; }

/* Request page: holds staff placed on document requests, with the staff message and dates. */
.alert-yellow { background: var(--v2-warning-subtle); border-color: #c79a3a; color: var(--v2-ink); }
body.dark-mode .alert-yellow { border-color: #8a6a22; }
.request-holds { margin-bottom: 20px; }
.request-holds h2 { margin: 0 0 6px; font-size: var(--v2-text-md, 1.05rem); }
.request-holds ul { margin: 0; padding-left: 20px; }
.request-holds li + li { margin-top: 10px; }
.request-holds p { margin: 4px 0 0; }
/* Home: the national 8888 complaint channel, set apart from emergency hotlines and barangay incident reports. */
.complaint-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 22px 24px; border: 1px solid var(--v2-line); border-radius: var(--v2-radius); background: var(--v2-card); }
.complaint-section > div:first-child { flex: 1 1 420px; }
.complaint-section h2 { margin: 2px 0 6px; }
.complaint-section p { margin: 0; }
.complaint-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.complaint-actions a[href^="tel:"] { font-size: 1.25rem; font-weight: 800; }