/*
 * Arrive design system.
 *
 * One file, no build step. Every colour, space and component class lives here
 * so there is exactly one place to change how the product looks.
 *
 * Concept: "two places, one path". Warm West African indigo and textile
 * geometry meeting the steady, institutional trust of a serious civic tool.
 * Light first, warm throughout, calm at every size.
 */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */

@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/fraunces-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/fraunces-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fraunces';
    src: url('/fonts/fraunces-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
    /* Surfaces */
    --sand: #FBF7F0;
    --sand-deep: #F3EBDD;
    --surface: #FFFFFF;
    --border: #E9DFD0;
    --border-strong: #D9C9B0;

    /* Text */
    --ink: #231C15;
    --ink-soft: #5B5046;

    /* Indigo, the anchor colour */
    --indigo: #1E3A5F;
    --indigo-deep: #14283F;
    --indigo-lift: #2A5385;
    --on-indigo: #F6F1E8;

    /* Accents */
    --ochre: #E0A33E;
    --ochre-deep: #96661A;
    --terracotta: #C1622F;
    --green: #2E6B4F;
    --green-soft: #EAF3EE;
    --clay: #A8382B;
    --clay-soft: #FBEDEA;
    --ochre-soft: #FCF3E1;

    /* Type */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --step--1: 15px;
    --step-0: 17px;
    --step-1: 20px;
    --step-2: 24px;
    --step-3: 29px;
    --step-4: 35px;
    --step-5: 42px;

    /* Space, 4px grid */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;
    --s-9: 88px;

    /* Shape */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    /* Depth, warm tinted, always two layers */
    --shadow-sm: 0 1px 2px rgba(35, 28, 21, 0.05), 0 1px 3px rgba(35, 28, 21, 0.04);
    --shadow-md: 0 2px 4px rgba(35, 28, 21, 0.05), 0 8px 20px rgba(35, 28, 21, 0.07);
    --shadow-lg: 0 4px 8px rgba(35, 28, 21, 0.06), 0 20px 48px rgba(35, 28, 21, 0.12);

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fast: 140ms;
    --slow: 320ms;

    /* Measure */
    --shell: 1120px;
    --prose: 68ch;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--sand);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.6;
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;

    /* Short pages still put the footer on the floor, never halfway up. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 var(--s-3) 0;
    text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p {
    margin: 0 0 var(--s-4) 0;
}

a {
    color: var(--indigo);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--indigo-lift);
}

img {
    max-width: 100%;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--s-6) 0;
}

::selection {
    background-color: var(--ochre);
    color: var(--ink);
}

:focus-visible {
    outline: 3px solid var(--ochre);
    outline-offset: 2px;
    border-radius: var(--s-1);
}

/* Hidden by clipping rather than by an offscreen offset: a negative `left` puts
   it 9999px outside the page in RTL and drags the whole document sideways. */
.skip-link {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    z-index: 100;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    background-color: var(--indigo);
    color: var(--on-indigo);
    padding: var(--s-3) var(--s-4);
    border-end-end-radius: var(--radius-sm);
}

.skip-link:focus {
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.shell {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding-left: var(--s-4);
    padding-right: var(--s-4);
}

@media (min-width: 720px) {
    .shell {
        padding-left: var(--s-6);
        padding-right: var(--s-6);
    }
}

.page {
    padding-top: var(--s-6);
    padding-bottom: var(--s-8);
}

.prose {
    max-width: var(--prose);
}

/* The signed-out column: forms read better narrow. */
.shell.page-narrow {
    max-width: 34rem;
}

.prose p,
.prose li {
    font-size: var(--step-0);
}

.stack > * + * {
    margin-top: var(--s-5);
}

.stack-tight > * + * {
    margin-top: var(--s-3);
}

.section {
    margin-top: var(--s-7);
}

.section:first-child {
    margin-top: 0;
}

/* minmax(0, 1fr) everywhere a grid holds cards: an auto track is sized by its
   longest item and will happily push a phone into horizontal scroll. */
.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
}

@media (min-width: 720px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
}

@media (min-width: 960px) {
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
}

.band {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--s-7) 0;
}

.band-dark {
    background-color: var(--indigo-deep);
    color: var(--on-indigo);
    padding: var(--s-7) 0;
}

.band-dark h1,
.band-dark h2,
.band-dark h3 {
    color: var(--on-indigo);
}

.band-dark a:not(.btn) {
    color: var(--ochre);
}

/* --------------------------------------------------------------------------
   5. Type helpers
   -------------------------------------------------------------------------- */

.display {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.015em;
    font-size: var(--step-5);
    margin: 0 0 var(--s-4) 0;
    text-wrap: balance;
}

@media (min-width: 720px) {
    .display { font-size: 56px; }
    h1 { font-size: var(--step-5); }
    h2 { font-size: var(--step-4); }
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--ochre-deep);
    margin: 0 0 var(--s-3) 0;
}

.band-dark .eyebrow,
.hero .eyebrow {
    color: var(--ochre);
}

.lede {
    font-size: var(--step-1);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: var(--prose);
}

.band-dark .lede {
    color: rgba(246, 241, 232, 0.86);
}

.muted {
    color: var(--ink-soft);
}

.small {
    font-size: var(--step--1);
    line-height: 1.55;
}

.hint {
    color: var(--ink-soft);
    font-size: var(--step--1);
    margin: calc(-1 * var(--s-2)) 0 var(--s-4) 0;
}

.error {
    color: var(--clay);
    font-size: var(--step--1);
    font-weight: 600;
    margin: calc(-1 * var(--s-2)) 0 var(--s-4) 0;
}

.stat {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 64px;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin: 0;
}

@media (min-width: 720px) {
    .stat { font-size: 84px; }
}

/* --------------------------------------------------------------------------
   6. Weave motif
   -------------------------------------------------------------------------- */

.weave {
    display: block;
    width: 100%;
    height: 14px;
    color: var(--ochre);
}

.weave-divider {
    margin: var(--s-6) 0;
    opacity: 0.55;
}

.weave-hero {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 22px;
    opacity: 0.28;
    color: var(--ochre);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. Header
   -------------------------------------------------------------------------- */

.site-header {
    background-color: var(--sand);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.site-header__inner {
    position: relative; /* the language panel hangs off this, not off the toggle,
                           so it can never be pushed off a 390px screen */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    min-height: 68px;
    padding-top: var(--s-3);
    padding-bottom: var(--s-3);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step-2);
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
}

.wordmark__mark {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background-color: var(--indigo);
    color: var(--ochre);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wordmark__mark svg {
    width: 18px;
    height: 18px;
    display: block;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Translated labels are longer than the English ones ("Se déconnecter"), so the
   header has to be allowed to take a second row rather than push the page wide. */
.site-header__inner {
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   8. Language switcher
   -------------------------------------------------------------------------- */

.langswitch {
    position: static;
}

.langswitch__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 48px;
    padding: 0 var(--s-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background-color: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.langswitch__toggle::-webkit-details-marker {
    display: none;
}

.langswitch__toggle:hover {
    border-color: var(--indigo);
    box-shadow: var(--shadow-sm);
}

.langswitch__toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--indigo);
}

.langswitch__chev {
    width: 12px !important;
    height: 12px !important;
    flex: 0 0 12px !important;
    color: var(--ink-soft) !important;
    transition: transform var(--fast) var(--ease);
}

.langswitch[open] .langswitch__chev {
    transform: rotate(180deg);
}

.langswitch__panel {
    position: absolute;
    inset-inline-end: var(--s-4);
    top: calc(100% - var(--s-1));
    z-index: 50;
    width: min(320px, calc(100vw - 32px));
    max-height: min(70vh, 460px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--s-3);
}

@media (min-width: 720px) {
    .langswitch__panel {
        inset-inline-end: var(--s-6);
    }
}

.langswitch__group {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: var(--s-3) var(--s-3) var(--s-2);
    margin: 0;
}

.langswitch__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    min-height: 48px;
    padding: var(--s-2) var(--s-3);
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    font-size: var(--step-0);
}

.langswitch__option:hover {
    background-color: var(--sand-deep);
    color: var(--ink);
}

.langswitch__option[aria-current='true'] {
    background-color: var(--indigo);
    color: var(--on-indigo);
    font-weight: 600;
}

.langswitch__tick {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.langswitch__note {
    border-top: 1px solid var(--border);
    margin-top: var(--s-3);
    padding: var(--s-3) var(--s-3) var(--s-1);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   9. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 52px;
    padding: var(--s-3) var(--s-5);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease),
        box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--indigo);
    color: var(--on-indigo);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--indigo-lift);
    color: var(--on-indigo);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--indigo);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background-color: var(--sand-deep);
    border-color: var(--indigo);
    color: var(--indigo);
}

.btn-quiet {
    background-color: transparent;
    color: var(--ink-soft);
    border-color: transparent;
    min-height: 48px;
    padding: var(--s-2) var(--s-3);
    font-size: var(--step--1);
}

.btn-quiet:hover {
    background-color: var(--sand-deep);
    color: var(--ink);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-ochre {
    background-color: var(--ochre);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.btn-ochre:hover {
    background-color: #EFB75B;
    color: var(--ink);
    box-shadow: var(--shadow-md);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
}

/* --------------------------------------------------------------------------
   10. Cards
   -------------------------------------------------------------------------- */

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--s-5);
    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: var(--s-4);
}

.card-flush {
    padding: 0;
    overflow: hidden;
}

.card-quiet {
    background-color: transparent;
    border-style: dashed;
    box-shadow: none;
}

.card > :last-child {
    margin-bottom: 0;
}

.card__title {
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 600;
    margin: 0 0 var(--s-2) 0;
}

/* Numbered step cards on the home page */
.step-card {
    position: relative;
    padding-top: var(--s-6);
}

.step-card__num {
    position: absolute;
    top: calc(-1 * var(--s-4));
    inset-inline-start: var(--s-5);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background-color: var(--indigo);
    color: var(--ochre);
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   11. Badges
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-deadline {
    background-color: var(--clay-soft);
    color: var(--clay);
    border-color: rgba(168, 56, 43, 0.28);
}

/* "Waiting on: ..." can name two or three tasks, so this one has to wrap. */
.badge-blocked {
    background-color: var(--sand-deep);
    color: var(--ink-soft);
    border-color: var(--border-strong);
    white-space: normal;
    text-align: start;
    max-width: 100%;
}

.badge-done {
    background-color: var(--green-soft);
    color: var(--green);
    border-color: rgba(46, 107, 79, 0.28);
}

.badge-phase {
    background-color: rgba(30, 58, 95, 0.08);
    color: var(--indigo);
    border-color: rgba(30, 58, 95, 0.2);
}

.badge-official {
    background-color: var(--green-soft);
    color: var(--green);
    border-color: rgba(46, 107, 79, 0.28);
}

/* --------------------------------------------------------------------------
   12. Progress
   -------------------------------------------------------------------------- */

.progress {
    background-color: var(--sand-deep);
    border-radius: var(--radius-pill);
    height: 14px;
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background-image: linear-gradient(90deg, var(--green) 0%, #3E8A66 100%);
    transition: width var(--slow) var(--ease);
}

.progress-lg {
    height: 20px;
}

.progress-on-dark {
    background-color: rgba(246, 241, 232, 0.18);
}

.progress-on-dark .progress__fill {
    background-image: linear-gradient(90deg, var(--ochre) 0%, #F2C475 100%);
}

.phase-meter {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-size: var(--step--1);
    color: var(--ink-soft);
}

.phase-meter .progress {
    flex: 1;
    height: 10px;
}

/* --------------------------------------------------------------------------
   13. Section headings
   -------------------------------------------------------------------------- */

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-bottom: var(--s-4);
    padding-bottom: var(--s-3);
    border-bottom: 1px solid var(--border);
}

.section-heading__title {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 600;
    margin: 0;
}

.section-heading__meta {
    font-size: var(--step--1);
    color: var(--ink-soft);
    margin: 0;
}

/* --------------------------------------------------------------------------
   14. Callouts
   -------------------------------------------------------------------------- */

.callout {
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--indigo);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    padding: var(--s-4) var(--s-5);
}

.callout > :last-child {
    margin-bottom: 0;
}

.callout__title {
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: 700;
    margin: 0 0 var(--s-2) 0;
}

.callout-info {
    border-inline-start-color: var(--indigo);
    background-color: rgba(30, 58, 95, 0.04);
}

.callout-warn {
    border-inline-start-color: var(--ochre);
    background-color: var(--ochre-soft);
    border-color: rgba(224, 163, 62, 0.4);
}

.callout-deadline {
    border-inline-start-color: var(--clay);
    background-color: var(--clay-soft);
    border-color: rgba(168, 56, 43, 0.3);
}

.callout-deadline .callout__title {
    color: var(--clay);
}

.callout-quiet {
    border-inline-start-color: var(--border-strong);
    background-color: var(--sand-deep);
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   15. Flash messages
   -------------------------------------------------------------------------- */

.flash {
    border-radius: var(--radius);
    padding: var(--s-4) var(--s-5);
    margin-bottom: var(--s-5);
    border: 1px solid var(--border);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
}

.flash-status {
    background-color: var(--green-soft);
    border-color: rgba(46, 107, 79, 0.35);
    color: var(--green);
    font-weight: 600;
}

.flash > :last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   16. Forms
   -------------------------------------------------------------------------- */

label {
    display: block;
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--s-2);
}

input[type='text'],
input[type='email'],
input[type='date'],
input[type='number'],
select,
textarea {
    width: 100%;
    min-height: 52px;
    font-family: var(--font-body);
    font-size: var(--step-0);
    color: var(--ink);
    background-color: var(--surface);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    margin-bottom: var(--s-4);
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235B5046' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--s-4) center;
    background-size: 16px;
    padding-inline-end: var(--s-7);
}

[dir='rtl'] select {
    background-position: left var(--s-4) center;
}

textarea {
    min-height: 120px;
    line-height: 1.6;
}

input[type='checkbox'] {
    width: 24px;
    height: 24px;
    accent-color: var(--indigo);
    flex: 0 0 24px;
    margin: 0;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
    min-height: 48px;
}

.checkbox-row label {
    margin: 0;
    font-weight: 400;
    font-size: var(--step-0);
}

.field {
    margin-bottom: var(--s-5);
}

.field > :last-child {
    margin-bottom: 0;
}

.copy-field {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
   17. Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: var(--indigo-deep);
    color: var(--on-indigo);
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    /* Dark enough for AA text on any photograph, light enough that you can still
       see the people in it. Weighted to the text side rather than flat. */
    background:
        linear-gradient(100deg, rgba(20, 40, 63, 0.92) 0%, rgba(20, 40, 63, 0.78) 45%, rgba(20, 40, 63, 0.42) 100%),
        linear-gradient(180deg, rgba(20, 40, 63, 0.35) 0%, rgba(20, 40, 63, 0.55) 100%);
}

.hero__inner {
    padding-top: var(--s-8);
    padding-bottom: var(--s-8);
    position: relative;
}

@media (min-width: 960px) {
    .hero__inner {
        padding-top: var(--s-9);
        padding-bottom: var(--s-9);
        max-width: 46rem;
    }
}

.hero h1,
.hero .display {
    color: var(--on-indigo);
}

.hero .lede {
    color: rgba(246, 241, 232, 0.88);
}

/* The Pexels licence asks for visible credit, so this has to stay readable. */
.hero__credit {
    position: absolute;
    inset-inline-end: var(--s-4);
    bottom: var(--s-5);
    margin: 0;
    font-size: 12px;
    color: rgba(255, 252, 246, 0.96);
    background-color: rgba(12, 24, 38, 0.74);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.hero__credit a {
    color: rgba(246, 241, 232, 0.95);
}

/* Compact hero used on inner pages */
.hero-slim .hero__inner {
    padding-top: var(--s-7);
    padding-bottom: var(--s-7);
}

/* Light page header, no photo */
.page-head {
    padding-top: var(--s-7);
    padding-bottom: var(--s-5);
    border-bottom: 1px solid var(--border);
    background-color: var(--surface);
}

/* --------------------------------------------------------------------------
   18. Progress hero band (dashboard)
   -------------------------------------------------------------------------- */

.progress-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
    align-items: center;
}

@media (min-width: 720px) {
    .progress-hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
        gap: var(--s-7);
    }
}

.progress-hero__stat {
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
    color: var(--ochre);
}

.progress-hero__stat .stat {
    color: var(--ochre);
}

.progress-hero__pct {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   19. Task cards
   -------------------------------------------------------------------------- */

.task-card {
    display: flex;
    gap: var(--s-4);
    align-items: flex-start;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--s-4);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.task-card__thumb {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
    background-color: var(--sand-deep);
}

@media (min-width: 720px) {
    .task-card__thumb {
        width: 116px;
        height: 116px;
        flex-basis: 116px;
    }
}

.task-card__body {
    flex: 1;
    min-width: 0;
}

.task-card__title {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
    text-decoration: none;
    margin: 0 0 var(--s-2) 0;
}

.task-card__title:hover {
    color: var(--indigo);
    text-decoration: underline;
}

.task-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--step--1);
    color: var(--ink-soft);
    margin: 0;
}

.task-card__action {
    flex: 0 0 auto;
}

.task-card--blocked {
    background-color: transparent;
    border-style: dashed;
    box-shadow: none;
}

.task-card--blocked .task-card__title {
    color: var(--ink-soft);
}

.task-card--blocked .task-card__thumb {
    filter: saturate(0.35);
    opacity: 0.65;
}

.task-card--done .task-card__title {
    color: var(--ink-soft);
    text-decoration: line-through;
    text-decoration-color: var(--border-strong);
}

.task-card--deadline {
    border-color: rgba(168, 56, 43, 0.35);
    border-inline-start: 4px solid var(--clay);
}

/* Compact list row, used inside phase sections */
.task-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
}

/* Two abreast on a wide screen. A single column of full width rows on a 1440
   monitor is the scaffold look we are getting away from. */
@media (min-width: 1000px) {
    .task-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s-4);
    }
}

/* The round done control */
.tick {
    width: 48px;
    height: 48px;
    min-height: 48px;
    flex: 0 0 48px;
    padding: 0;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-strong);
    background-color: var(--surface);
    color: var(--green);
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease),
        transform var(--fast) var(--ease);
}

.tick:hover {
    border-color: var(--green);
    background-color: var(--green-soft);
    transform: scale(1.05);
}

.tick svg {
    width: 22px;
    height: 22px;
}

.tick--done {
    border-color: var(--green);
    background-color: var(--green);
    color: var(--surface);
    cursor: default;
}

.tick--blocked {
    border-style: dashed;
    color: var(--ink-soft);
    cursor: default;
}

/* --------------------------------------------------------------------------
   20. Task detail
   -------------------------------------------------------------------------- */

.task-hero {
    position: relative;
    background-color: var(--indigo-deep);
}

.task-hero__img {
    width: 100%;
    height: clamp(180px, 34vw, 340px);
    object-fit: cover;
    display: block;
    opacity: 0.9;
}

.task-hero__credit {
    position: absolute;
    inset-inline-end: var(--s-3);
    bottom: var(--s-2);
    margin: 0;
    font-size: 11px;
    color: rgba(255, 252, 246, 0.95);
    background-color: rgba(12, 24, 38, 0.74);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.task-hero__credit a {
    color: rgba(246, 241, 232, 0.9);
}

/* Reading column plus a companion rail, so a wide screen does not leave the
   right half of a task page empty. */
.task-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
    align-items: start;
}

@media (min-width: 1000px) {
    .task-layout {
        grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
        gap: var(--s-7);
    }

    .task-layout__aside {
        position: sticky;
        top: 92px;
    }
}

.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0 0 var(--s-5) 0;
    max-width: var(--prose);
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-inline-start: 46px;
    margin-bottom: var(--s-4);
    font-size: var(--step-0);
    line-height: 1.6;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: -2px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-pill);
    background-color: var(--sand-deep);
    border: 1px solid var(--border-strong);
    color: var(--indigo);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.link-list li + li {
    border-top: 1px solid var(--border);
    margin-top: var(--s-3);
    padding-top: var(--s-3);
}

.link-list a {
    font-weight: 600;
    word-break: break-word;
}

.controls-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
    align-items: start;
}

@media (min-width: 720px) {
    .controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   21. Translation notice
   -------------------------------------------------------------------------- */

.translation-notice {
    display: flex;
    gap: var(--s-3);
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    padding: var(--s-4);
    margin-bottom: var(--s-5);
}

.translation-notice__icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--ink-soft);
    margin-top: 2px;
}

.translation-notice__body {
    flex: 1;
    min-width: 0;
    font-size: var(--step--1);
    line-height: 1.55;
    color: var(--ink-soft);
}

.translation-notice__body p {
    margin: 0 0 var(--s-2) 0;
}

.translation-notice__body > :last-child {
    margin-bottom: 0;
}

.translation-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    align-items: center;
}

.translation-notice__actions a,
.translation-notice__report {
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--indigo);
}

.translation-notice__report {
    background: none;
    border: 0;
    padding: 0;
    min-height: 44px;
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.translation-notice--prominent {
    border-color: rgba(224, 163, 62, 0.5);
    background-color: var(--ochre-soft);
}

.translation-notice--prominent .translation-notice__icon {
    color: var(--ochre-deep);
}

.translation-notice--prominent .translation-notice__body {
    color: var(--ink);
}

.translation-notice__confirm {
    font-weight: 600;
    color: var(--ochre-deep);
}

/* --------------------------------------------------------------------------
   22. Media credit
   -------------------------------------------------------------------------- */

.media-credit {
    font-size: 12px;
    color: var(--ink-soft);
    margin: var(--s-2) 0 0 0;
}

.media-credit a {
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   23. Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background-color: var(--indigo-deep);
    color: rgba(246, 241, 232, 0.78);
}

.site-footer__weave {
    color: var(--ochre);
    opacity: 0.7;
    height: 10px;
}

.site-footer__inner {
    padding-top: var(--s-7);
    padding-bottom: var(--s-7);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
}

@media (min-width: 720px) {
    .site-footer__inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--s-7);
    }
}

.site-footer .wordmark {
    color: var(--on-indigo);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    list-style: none;
    margin: 0 0 var(--s-4) 0;
    padding: 0;
}

.site-footer__links a {
    color: var(--on-indigo);
    font-weight: 600;
    font-size: var(--step--1);
}

.site-footer__note {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 var(--s-3) 0;
    color: rgba(246, 241, 232, 0.72);
    max-width: 48ch;
}

.site-footer__note a {
    color: var(--ochre);
}

/* --------------------------------------------------------------------------
   24. Utilities
   -------------------------------------------------------------------------- */

.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;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }

.center { text-align: center; }

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
}

/* Gentle entrance for the hero copy. One orchestrated moment, nothing else. */
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.rise {
    animation: rise 520ms var(--ease) both;
}

.rise-2 { animation-delay: 90ms; }
.rise-3 { animation-delay: 180ms; }

/* Separator between the one tap Google button and the email fallback on the
   sign in page. Both routes are offered plainly, because plenty of people
   arriving here have no Google account at all. */
.oauth-or {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    margin: var(--s-4) 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.oauth-or::before,
.oauth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --------------------------------------------------------------------------
   25. Assistant

   The concierge panel. Sits inside the ordinary page rhythm rather than
   floating over it: a chat bubble in the corner reads as a sales widget, and
   this is a civic tool. Logical properties throughout so Arabic reads right.
   -------------------------------------------------------------------------- */

.concierge {
    margin-top: var(--s-8);
}

.concierge__panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: var(--s-5);
}

.concierge__thread {
    margin-bottom: var(--s-5);
}

.concierge__question {
    background-color: var(--sand-deep);
    border-radius: var(--radius);
    padding: var(--s-3) var(--s-4);
    margin: 0 0 var(--s-4) 0;
    color: var(--ink);
}

.concierge__who {
    display: block;
    font-size: var(--step--1);
    color: var(--ink-soft);
    margin-bottom: var(--s-1);
}

.concierge__answer {
    border-inline-start: 4px solid var(--indigo);
    padding-inline-start: var(--s-4);
    max-width: var(--prose);
}

.concierge__answer p {
    margin: 0 0 var(--s-3) 0;
}

.concierge__answer > :last-child {
    margin-bottom: 0;
}

/* Showing the working. Every answer names the steps it came from and links
   the agency that sets the rule, so the assistant moves people towards the
   authority rather than standing in for it. */
.concierge__sources {
    border-top: 1px solid var(--border);
    padding-top: var(--s-4);
    margin-bottom: var(--s-5);
}

.concierge__sources-title {
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 var(--s-3) 0;
}

.concierge__source {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--s-3) var(--s-4);
    margin-bottom: var(--s-3);
}

.concierge__source:last-child {
    margin-bottom: 0;
}

.concierge__source-title {
    display: block;
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    min-height: 28px;
}

a.concierge__source-title {
    text-decoration: none;
}

a.concierge__source-title:hover,
a.concierge__source-title:focus-visible {
    color: var(--indigo);
    text-decoration: underline;
}

.concierge__source-meta {
    margin: var(--s-2) 0 0 0;
}

.concierge__links {
    list-style: none;
    margin: var(--s-2) 0 0 0;
    padding: 0;
    font-size: var(--step--1);
}

.concierge__links li {
    margin-bottom: var(--s-1);
}

/* 48px targets: this is read on a phone, often one handed, often by someone
   tired. Nothing here should need a careful tap. */
.concierge__links a {
    display: inline-block;
    min-height: 48px;
    line-height: 48px;
}

.concierge__form textarea {
    margin-bottom: var(--s-2);
}

.concierge__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    margin-top: var(--s-3);
}

.concierge__clear {
    margin-top: var(--s-3);
}

.concierge__honesty {
    display: flex;
    gap: var(--s-3);
    align-items: flex-start;
    border-top: 1px solid var(--border);
    margin-top: var(--s-5);
    padding-top: var(--s-4);
    font-size: var(--step--1);
    line-height: 1.55;
    color: var(--ink-soft);
}

.concierge__honesty-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--ochre-deep);
    margin-top: 2px;
}

.concierge__honesty p {
    margin: 0 0 var(--s-2) 0;
}

@media (max-width: 640px) {
    .concierge__panel {
        padding: var(--s-4);
    }
}
