/* Diplomatic Week 2026 registration. Brand palette from the identity PDF. */

@font-face { font-family: "Bodoni Moda"; font-weight: 500; font-display: swap; src: url("fonts/bodoni-moda-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 700; font-display: swap; src: url("fonts/bodoni-moda-latin-700-normal.woff2") format("woff2"); }
@font-face {
    font-family: "Source Sans 3"; font-weight: 200 900; font-display: swap;
    src: url("fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Source Sans 3"; font-weight: 200 900; font-display: swap;
    src: url("fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #002d72; --navy-700: #0a3a85; --navy-900: #001f50; --navy-50: #e8eef8;
    --aqua: #00afc8; --aqua-700: #00798c; --aqua-50: #e6f7fa;
    --orange: #ff4b00; --orange-700: #c93a00; --orange-50: #fff0ea;
    --gold: #e6a500; --gold-700: #8a6200; --gold-50: #fdf4dc;
    --ink: #1b2a41; --muted: #55657d; --line: #d5deea; --wash: #f3f6fa;
    --display: "Bodoni Moda", Georgia, serif;
    --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: .75rem;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--wash); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
main { flex: 1; padding-block: 2rem 4rem; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 700; color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
p { margin: 0 0 .9rem; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.wrap { width: 100%; max-width: 64rem; margin-inline: auto; padding-inline: 1rem; }
.narrow { max-width: 46rem; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .5rem 1rem; border-radius: .25rem; background: #fff; }
.skip:focus { top: 1rem; }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--muted); }

/* ---------- Header and footer ---------- */
.site-header { background: var(--navy); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; padding-block: .4rem; }
.logo { display: block; height: 4.75rem; width: auto; }
.header-meta { margin: 0; margin-left: auto; text-align: right; font-size: .875rem; line-height: 1.35; color: rgba(255, 255, 255, .82); }
.header-meta strong { display: block; color: #fff; font-size: 1rem; }
.is-plain .header-meta { margin-inline: auto; text-align: center; }
.stripe { height: .35rem; background: linear-gradient(90deg, var(--orange), var(--gold), var(--aqua)); }
@media (max-width: 479px) { .header-meta span, .header-meta { font-size: .8rem; } .header-meta { max-width: 11rem; } .logo { height: 3.75rem; } }
.site-footer { padding-block: 1.75rem; background: var(--navy-900); color: rgba(255, 255, 255, .82); font-size: .9rem; }
.footer-row { display: flex; flex-direction: column; gap: .35rem; }
.footer-row p { margin: 0; }
.site-footer a { color: #fff; font-weight: 600; text-decoration-color: var(--gold); }
@media (min-width: 640px) { .footer-row { flex-direction: row; justify-content: space-between; } }

/* ---------- Home ---------- */
.hero { text-align: center; padding-block: .5rem 2rem; }
.hero-logo { display: block; width: min(15rem, 62%); height: auto; margin: 0 auto 1.25rem; }
.lede { max-width: 38rem; margin: .75rem auto 0; font-size: 1.15rem; color: var(--muted); }
.lede.left { margin-inline: 0; }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.25rem 0 0; }
.portals { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.1rem; }
@media (min-width: 700px) { .portals { grid-template-columns: 1fr 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0, 31, 80, .06); }
.portal { --tint: var(--navy-50); --tone: var(--navy); position: relative; display: flex; flex-direction: column; height: 100%; padding: 1.6rem 1.5rem 1.4rem; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.portal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: .35rem; background: var(--tone); }
.portal:hover { transform: translateY(-2px); border-color: var(--tone); box-shadow: 0 8px 20px rgba(0, 31, 80, .12); }
.accent-aqua { --tint: var(--aqua-50); --tone: var(--aqua); --ink-tone: var(--aqua-700); }
.accent-gold { --tint: var(--gold-50); --tone: var(--gold); --ink-tone: var(--gold-700); }
.accent-orange { --tint: var(--orange-50); --tone: var(--orange); --ink-tone: var(--orange-700); }
.portal-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: .9rem; border-radius: .6rem; background: var(--tint); color: var(--ink-tone, var(--navy)); }
.portal h2 { font-size: 1.5rem; }
.portal p { margin: .5rem 0 0; color: var(--muted); }
.portal .portal-meta { flex: 1; margin: .75rem 0 1.1rem; font-size: .9rem; color: var(--ink); }
.go { font-weight: 700; color: var(--navy); }
.portal:hover .go { text-decoration: underline; }

/* ---------- Form page ---------- */
.back { display: inline-block; margin-bottom: 1rem; font-size: .95rem; font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }
.needs { margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-left: .3rem solid var(--aqua); border-radius: 0 var(--radius) var(--radius) 0; background: #fff; }
.needs h2 { margin-bottom: .4rem; font-family: var(--sans); font-size: 1rem; color: var(--ink); }
.needs-time { margin-left: .5rem; font-weight: 400; color: var(--muted); }
.needs ul { margin: 0; padding-left: 1.25rem; }
.form { margin-top: 1.75rem; display: grid; gap: 1.25rem; counter-reset: step; }
.form > [data-show-if] { display: contents; }
.section { margin: 0; padding: 1.25rem; min-width: 0; counter-increment: step; }
.section-head { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: 1.35rem; }
.section-head .hint { margin: .25rem 0 0; }
.step { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-top: .05rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; }
.step::before { content: counter(step); }
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .section { padding: 1.75rem; }
    .grid { grid-template-columns: 1fr 1fr; }
    .field:not(.half), .grid > [data-show-if] { grid-column: 1 / -1; }
}
.field { min-width: 0; }
.label { display: block; margin-bottom: .35rem; font-size: .95rem; font-weight: 600; }
.req { color: var(--orange-700); }
.control { display: block; width: 100%; min-height: 2.9rem; padding: .6rem .85rem; font: inherit; color: var(--ink); background: #fff; border: 1px solid #98a8bf; border-radius: .45rem; }
.control:hover { border-color: var(--navy); }
.control:focus { border-color: var(--navy); outline: 3px solid rgba(0, 175, 200, .45); outline-offset: 0; }
.control[aria-invalid="true"], .control:user-invalid { border-color: var(--orange-700); box-shadow: 0 0 0 1px var(--orange-700); }
textarea.control { min-height: 6.5rem; resize: vertical; }
input[type="file"].control { padding: .5rem; cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: .75rem; padding: .45rem .9rem; border: 0; border-radius: .3rem; background: var(--navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.hint { margin: .35rem 0 0; font-size: .9rem; color: var(--muted); }
.error { margin: .4rem 0 0; font-size: .9rem; font-weight: 600; color: var(--orange-700); }
.error::before { content: "\26A0\FE0E\00a0"; }  /* a warning mark, so errors never rely on colour alone */
.preview { display: block; margin-top: .75rem; height: 9rem; width: auto; border: 1px solid var(--line); border-radius: .45rem; object-fit: cover; }
.check { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--aqua-50); font-size: .95rem; cursor: pointer; }
.check input { flex: none; width: 1.4rem; height: 1.4rem; margin-top: .1rem; accent-color: var(--navy); }

.alert { margin-top: 1.5rem; padding: 1rem 1.25rem; border: 1px solid rgba(201, 58, 0, .45); border-left-width: .35rem; border-radius: .5rem; background: var(--orange-50); }
.alert-title { margin: 0 0 .4rem; font-weight: 700; color: var(--orange-700); }
.alert ul { margin: 0; padding-left: 1.25rem; font-size: .95rem; }
.alert a { color: var(--orange-700); font-weight: 600; }
.alert-note { margin: .6rem 0 0; font-size: .9rem; color: var(--muted); }

/* Footer actions */
.form-foot { display: flex; flex-direction: column-reverse; gap: .9rem; padding-top: 1.25rem; }
.form-foot p { margin: 0; }
.actions { display: flex; flex-direction: column-reverse; gap: .65rem; }
@media (min-width: 640px) {
    .form-foot { flex-direction: row; align-items: center; justify-content: space-between; }
    .actions { flex-direction: row; justify-content: flex-end; }
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.7rem; border: 1px solid transparent; border-radius: .45rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: #fff; color: var(--navy); border-color: #98a8bf; }
.btn-ghost:hover { background: var(--wash); border-color: var(--navy); }

/* ---------- Guided steps (added by app.js; without it every section is shown) ---------- */
.js form[data-stepper]:not(.is-stepper) .section:not(:first-of-type) { display: none; }
.is-stepper .section { display: none; }
.is-stepper .section.is-current { display: block; }
.is-stepper .step::before { content: attr(data-n); }
.progress { margin-bottom: .25rem; }
.progress-text { margin: 0 0 .5rem; font-size: .95rem; color: var(--muted); }
.progress-text strong { color: var(--ink); }
.progress-bar { display: flex; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.progress-bar li { flex: 1; height: .4rem; border-radius: .2rem; background: var(--line); }
.progress-bar .is-done { background: var(--navy); }
.progress-bar .is-current { background: var(--orange); }
.progress-bar .has-error { background: var(--orange-700); outline: 2px solid var(--orange-700); outline-offset: 1px; }
.section-head h2:focus { outline: none; }

/* ---------- Messages ---------- */
.message { max-width: 40rem; margin: 1rem auto 0; padding: 2.25rem 1.5rem; text-align: center; }
.message h1 { margin-bottom: .6rem; }
.eyebrow { margin: 0 0 .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--orange-700); }
.tick { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--aqua-50); color: var(--navy); }
.big-id { margin: 0; font-family: var(--display); font-size: 2.6rem; font-weight: 700; letter-spacing: .08em; color: var(--navy); }
.notice { margin: 1.25rem 0; padding: .8rem 1rem; border-radius: .45rem; background: var(--gold-50); font-size: .95rem; }
.notice.ok { background: var(--aqua-50); }

.narrow-form { max-width: 22rem; margin: 1.5rem auto 0; text-align: left; }
.narrow-form .btn { width: 100%; }
.narrow-form .small { text-align: center; margin: 0; }

/* Maintenance switch */
.banner { padding: .6rem 1rem; background: var(--gold); color: #1b1300; font-size: .95rem; text-align: center; }
.banner a { color: #1b1300; font-weight: 700; }
.status { display: inline-block; margin: .25rem 0 1rem; padding: .35rem 1rem; border-radius: 2rem; font-size: 1.05rem; }
.status.is-on { background: var(--orange-50); color: var(--orange-700); border: 1px solid var(--orange-700); }
.status.is-off { background: var(--aqua-50); color: var(--aqua-700); border: 1px solid var(--aqua-700); }
.btn-warn { background: var(--orange-700); color: #fff; }
.btn-warn:hover { background: #a62f00; }
.maintenance-admin form { margin: 1.25rem 0; }

.settings { width: 100%; margin: 1rem 0; border-collapse: collapse; text-align: left; font-size: .95rem; }
.settings th, .settings td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.settings th { width: 45%; font-weight: 600; color: var(--muted); }
code { word-break: break-word; }

/* Confirmation emails */
.wide { max-width: 64rem; margin-inline: auto; }
.confirmations { max-width: none; text-align: left; }
.confirmations h1, .confirmations .eyebrow { text-align: left; }
.inline-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1rem 0; }
.inline-form .control { width: auto; }
.records { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .9rem; }
.records th, .records td { padding: .5rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.records th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.records td:nth-child(6) { word-break: break-all; }
.records input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); }
.pill { display: inline-block; padding: .1rem .6rem; border-radius: 1rem; font-size: .8rem; font-weight: 700; }
.pill-sent { background: var(--aqua-50); color: var(--aqua-700); }
.pill-failed { background: var(--orange-50); color: var(--orange-700); }
.pill-unknown { background: var(--gold-50); color: var(--gold-700); }
@media (max-width: 40rem) { .records { display: block; overflow-x: auto; } }
