/* myGov – Government of the Free Republic of Verdis
   Follows the GOV.UK design language (structure, spacing, focus states, components)
   with a Verdis identity: river-teal brand stripe, shield emblem and Public Sans. */

@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/public-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/public-sans-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/public-sans-latin-400-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/public-sans-latin-700-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0b0c0c;
  --secondary-text: #505a5f;
  --brand: #00594f;          /* Verdis river teal */
  --brand-dark: #003d36;
  --brand-tint: #e6f0ee;
  --link: #1d70b8;
  --link-visited: #4c2c92;
  --link-hover: #003078;
  --focus: #ffdd00;
  --button: #00703c;
  --button-shadow: #002d18;
  --error: #d4351c;
  --success: #00703c;
  --border: #b1b4b6;
  --input-border: #0b0c0c;
  --light-grey: #f3f2f1;
  --mid-grey: #e6e8e8;
  --white: #ffffff;
  --font: "Public Sans", Arial, Helvetica, sans-serif;
  /* Overridden by the theme from Admin > Settings > Branding */
  --header-bg: #0b0c0c;
  --header-text: #ffffff;
  --header-muted: #c9cccc;
  --button-hover: #005a30;
  --brand-line: #c4d9d5;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--light-grey); overflow-y: scroll; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.25;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
@media (min-width: 40.0625em) { body { font-size: 1.1875rem; line-height: 1.3158; } }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin-top: 0; font-weight: 700; }
.heading-xl { font-size: 2rem; line-height: 1.09; margin-bottom: 30px; letter-spacing: -0.01em; }
.heading-l { font-size: 1.5rem; line-height: 1.04; margin-bottom: 20px; }
.heading-m { font-size: 1.125rem; line-height: 1.11; margin-bottom: 15px; }
.heading-s { font-size: 1rem; line-height: 1.25; margin-bottom: 15px; }
@media (min-width: 40.0625em) {
  .heading-xl { font-size: 3rem; line-height: 1.04; margin-bottom: 50px; }
  .heading-l { font-size: 2.25rem; line-height: 1.11; margin-bottom: 30px; }
  .heading-m { font-size: 1.5rem; line-height: 1.25; margin-bottom: 20px; }
  .heading-s { font-size: 1.1875rem; line-height: 1.3158; margin-bottom: 20px; }
}
.caption-l { display: block; color: var(--secondary-text); font-size: 1.125rem; margin-bottom: 5px; }
.caption-m { display: block; color: var(--secondary-text); font-size: 1rem; margin-bottom: 5px; }
@media (min-width: 40.0625em) { .caption-l { font-size: 1.5rem; } .caption-m { font-size: 1.1875rem; } }
.body, p { margin-top: 0; margin-bottom: 15px; }
@media (min-width: 40.0625em) { .body, p { margin-bottom: 20px; } }
.body-l { font-size: 1.125rem; line-height: 1.33; margin: 0 0 20px; }
@media (min-width: 40.0625em) { .body-l { font-size: 1.5rem; line-height: 1.25; margin-bottom: 30px; } }
.body-s { font-size: 0.875rem; line-height: 1.43; }
@media (min-width: 40.0625em) { .body-s { font-size: 1rem; line-height: 1.25; } }
.secondary { color: var(--secondary-text); }
strong, b { font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--light-grey); padding: 0 4px; }

.link, main a:not(.button):not(.service-card__link):not(.back-link), .footer__link {
  color: var(--link); text-decoration: underline; text-decoration-thickness: max(1px, .0625rem); text-underline-offset: .1578em; }
main a:not(.button):visited { color: var(--link-visited); }
main a:not(.button):hover { color: var(--link-hover); text-decoration-thickness: max(3px, .1875rem); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid transparent; color: var(--ink) !important; background-color: var(--focus) !important;
  box-shadow: 0 -2px var(--focus), 0 4px var(--ink) !important; text-decoration: none !important; }

.list { margin: 0 0 20px; padding: 0; list-style: none; }
.list > li { margin-bottom: 5px; }
.list--bullet { padding-left: 20px; list-style: disc; }
.list--number { padding-left: 20px; list-style: decimal; }
.list--spaced > li { margin-bottom: 15px; }

.section-break { margin: 0; border: 0; }
.section-break--m { margin: 20px 0; }
.section-break--l { margin: 30px 0; }
@media (min-width: 40.0625em) { .section-break--l { margin: 50px 0; } }
.section-break--visible { border-bottom: 1px solid var(--border); }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important; }

/* ---------- Layout ---------- */
.width-container { max-width: 960px; margin: 0 15px; }
@media (min-width: 40.0625em) { .width-container { margin: 0 30px; } }
@media (min-width: 1020px) { .width-container { margin: 0 auto; } }
.width-container--wide { max-width: 1200px; }
@media (min-width: 1260px) { .width-container--wide { margin: 0 auto; } }
.main { display: block; padding-top: 20px; padding-bottom: 30px; outline: none; }
@media (min-width: 40.0625em) { .main { padding-top: 40px; padding-bottom: 60px; } }
.grid-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.grid-col { padding: 0 15px; width: 100%; }
@media (min-width: 40.0625em) {
  .grid-col--two-thirds { width: 66.6667%; }
  .grid-col--one-third { width: 33.3333%; }
  .grid-col--half { width: 50%; }
  .grid-col--three-quarters { width: 75%; }
  .grid-col--one-quarter { width: 25%; }
}
.measure { max-width: 40em; }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; padding: 10px 15px; background: var(--focus); color: var(--ink); z-index: 100; text-decoration: underline; }
.skip-link:focus { left: 0; }

/* ---------- Official banner ---------- */
.official { background: var(--light-grey); font-size: 0.875rem; border-bottom: 1px solid var(--mid-grey); }
.official__details > summary { list-style: none; }
.official__details > summary::-webkit-details-marker { display: none; }
.official__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; cursor: pointer; }
.official__flag-bg { fill: var(--brand); }
.official__flag--image { width: auto; max-width: 32px; object-fit: contain; }
.official__flag { width: 18px; height: 12px; flex: none; outline: 1px solid rgba(0,0,0,.1); }
.official__toggle { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
.official__toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform .15s ease; }
.official__details[open] .official__toggle::after { transform: translateY(0) rotate(-135deg); }
.official__content { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0 16px; max-width: 40em; }
.official__icon { width: 28px; height: 32px; flex: none; color: var(--brand); }
.official__body { margin: 0; font-size: 1rem; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .official__toggle::after { transition: none; } }

/* ---------- Header ---------- */
.header { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--header-bg); }
.header__container { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding: 14px 0 12px; }
.header__home { display: inline-flex; align-items: center; gap: 10px; color: var(--header-text); text-decoration: none; margin-right: auto; }
.header__home:hover .header__wordmark { text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: 3px; }
.header__emblem { width: 34px; height: 39px; color: var(--header-text); flex: none; }
.header__logo { display: block; width: auto; max-width: 260px; height: 44px; object-fit: contain; }
.header__logo--s { height: 32px; } .header__logo--l { height: 60px; }
.header__wordmark { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.header__strapline { order: 3; width: 100%; font-size: 0.875rem; color: var(--header-muted); }
@media (min-width: 48.0625em) { .header__strapline { order: 0; width: auto; border-left: 1px solid var(--header-muted); padding-left: 16px; margin-right: auto; } .header__home { margin-right: 0; } }
.header__account-list { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.header__account-link { color: var(--header-text); font-family: inherit; font-size: 1rem; font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.header__account-link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .15em; }
.header__signout { margin: 0; display: inline; }
.header__count { display: inline-block; min-width: 1.5em; padding: 1px 6px; margin-left: 2px; border-radius: 999px; background: var(--focus); color: var(--ink); font-size: 0.8125rem; text-align: center; }
.brand-stripe { height: 8px; background: var(--brand); }

/* ---------- Service navigation ---------- */
.service-nav { background: var(--brand-tint); border-bottom: 1px solid var(--brand-line); }
.service-nav__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; column-gap: 28px; }
.service-nav__item { position: relative; padding: 12px 0; }
.service-nav__link { color: var(--brand-dark); font-weight: 700; text-decoration: none; font-size: 1rem; }
.service-nav__link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .15em; }
.service-nav__item--active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--brand); }

/* ---------- Site-wide notice (admin controlled) ---------- */
.site-notice { padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,.1); }
.site-notice__title { margin: 0 0 4px; font-weight: 700; font-size: 1.1875rem; }
.site-notice__body p:last-child, .site-notice__body .list:last-child { margin-bottom: 0; }
.site-notice--info { background: #1d70b8; color: var(--white); }
.site-notice--success { background: #00703c; color: var(--white); }
.site-notice--warning { background: var(--focus); color: var(--ink); }
.site-notice--critical { background: var(--error); color: var(--white); }
.site-notice--info a, .site-notice--success a, .site-notice--critical a { color: var(--white) !important; }

/* ---------- Hero (home) ---------- */
.hero { background: var(--brand); color: var(--white); padding: 30px 0 36px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; opacity: .22;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26'%3E%3Cpath d='M0 14c15-12 30 12 45 0s30 12 45 0 30 12 30 0' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") repeat-x bottom; }
@media (min-width: 40.0625em) { .hero { padding: 50px 0 60px; } }
.hero__title { font-size: 2.5rem; line-height: 1; margin: 0 0 16px; letter-spacing: -0.03em; }
@media (min-width: 40.0625em) { .hero__title { font-size: 4.5rem; margin-bottom: 24px; } }
.hero__intro { font-size: 1.1875rem; line-height: 1.35; max-width: 32em; margin: 0 0 24px; }
@media (min-width: 40.0625em) { .hero__intro { font-size: 1.5rem; line-height: 1.3; } }
.hero__actions { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.hero__link { color: var(--white); font-weight: 700; }
.hero__link:hover { text-decoration-thickness: 3px; }

/* ---------- Buttons ---------- */
.button { -webkit-appearance: none; appearance: none; display: inline-block; position: relative; margin: 0 0 22px; padding: 8px 12px 7px;
  border: 2px solid transparent; border-radius: 0; color: var(--white); background: var(--button); box-shadow: 0 2px 0 var(--button-shadow);
  font-family: inherit; font-weight: 400; font-size: 1rem; line-height: 1.1875; text-align: center; text-decoration: none; cursor: pointer; vertical-align: top; }
@media (min-width: 40.0625em) { .button { font-size: 1.1875rem; margin-bottom: 32px; } }
.button:link, .button:visited, .button:hover, .button:active { color: var(--white); text-decoration: none; }
.button:hover { background: var(--button-hover); }
.button:active { top: 2px; box-shadow: none; }
.button:focus-visible { border-color: var(--focus) !important; outline: 3px solid transparent; background: var(--focus) !important; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--focus), 0 2px 0 var(--ink) !important; }
.button--secondary { background: var(--light-grey); box-shadow: 0 2px 0 #929191; color: var(--ink) !important; }
.button--secondary:hover { background: #dbdad9; }
.button--warning { background: var(--error); box-shadow: 0 2px 0 #55150b; }
.button--warning:hover { background: #aa2a16; }
.button--inverse { background: var(--white); color: var(--brand-dark) !important; box-shadow: 0 2px 0 #144e81; margin-bottom: 0; }
.button--inverse:hover { background: var(--brand-tint); }
.button--start { font-size: 1.125rem; font-weight: 700; padding: 10px 16px 9px; display: inline-flex; align-items: center; gap: 10px; }
@media (min-width: 40.0625em) { .button--start { font-size: 1.5rem; } }
.button--start svg { width: 16px; height: 18px; flex: none; }
.button--small { font-size: 1rem; padding: 6px 10px 5px; margin-bottom: 10px; }
.button-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 15px; }
.button-group .button { margin-bottom: 15px; }
.button-group > .link, .button-group > a:not(.button) { margin-bottom: 15px; }
.button-link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
@media (min-width: 40.0625em) { .form-group { margin-bottom: 30px; } }
.form-group .form-group:last-of-type { margin-bottom: 0; }
.form-group--error { padding-left: 15px; border-left: 5px solid var(--error); }
.form-group--error .form-group { padding: 0; border: 0; }
.label { display: block; margin-bottom: 5px; font-weight: 400; }
.form-group > .label, .date-input__label { font-weight: 400; }
.form-group > label.label:first-child { font-weight: 700; }
.hint { display: block; margin-bottom: 15px; color: var(--secondary-text); }
.label + .hint { margin-top: -5px; }
.error-message { display: block; margin: 0 0 15px; color: var(--error); font-weight: 700; }
.fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fieldset__legend { display: table; max-width: 100%; margin-bottom: 10px; padding: 0; white-space: normal; }
.fieldset__legend--s { font-weight: 700; }
.fieldset__legend--m { font-weight: 700; font-size: 1.125rem; margin-bottom: 15px; }
@media (min-width: 40.0625em) { .fieldset__legend--m { font-size: 1.5rem; } }
.fieldset__legend--l { font-weight: 700; font-size: 1.5rem; margin-bottom: 15px; }
@media (min-width: 40.0625em) { .fieldset__legend--l { font-size: 2.25rem; } }
.fieldset__heading { margin: 0; font-size: inherit; font-weight: inherit; }

.input, .select, .textarea { font-family: inherit; font-size: 1rem; line-height: 1.25; color: var(--ink); background: var(--white);
  border: 2px solid var(--input-border); border-radius: 0; -webkit-appearance: none; appearance: none; }
@media (min-width: 40.0625em) { .input, .select, .textarea { font-size: 1.1875rem; } }
.input { width: 100%; height: 2.5rem; padding: 5px; }
.textarea { display: block; width: 100%; min-height: 40px; padding: 5px; resize: vertical; margin-bottom: 0; }
.textarea--code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; }
.select { min-width: 11.5em; max-width: 100%; height: 2.5rem; padding: 5px 34px 5px 5px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230b0c0c' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; box-shadow: inset 0 0 0 2px; }
.input--error, .select--error, .textarea--error { border-color: var(--error); }
.input--error:focus, .textarea--error:focus { border-color: var(--ink); }
.input--w2 { max-width: 5.4ex; } .input--w4 { max-width: 9ex; } .input--w10 { max-width: 23ex; } .input--w20 { max-width: 41ex; } .input--w30 { max-width: 59ex; }
.input__wrapper { display: flex; }
.input__wrapper .input { flex: 0 1 auto; }
.input__suffix { display: flex; align-items: center; padding: 0 8px; min-width: 2.5rem; height: 2.5rem; border: 2px solid var(--input-border); border-left: 0; background: var(--light-grey); white-space: nowrap; font-weight: 700; }
.date-input { display: flex; gap: 20px; }
.date-input__label { display: block; }
.file-upload { font-family: inherit; font-size: 1rem; max-width: 100%; padding: 5px 0; }
.file-upload:focus { outline: 3px solid var(--focus); box-shadow: inset 0 0 0 4px var(--ink); }
.file-upload--error { border: 2px solid var(--error); padding: 5px; }
.photo-preview { display: block; max-width: 200px; margin-top: 15px; border: 1px solid var(--border); }
.photo-preview--saved { margin: 0; }
.captcha-image { display: block; border: 1px solid var(--border); margin-bottom: 8px; }

.radios__item, .checkboxes__item { position: relative; display: flex; flex-wrap: wrap; margin-bottom: 10px; min-height: 40px; }
.radios__item:last-child, .checkboxes__item:last-child { margin-bottom: 0; }
.radios--inline { display: flex; flex-wrap: wrap; gap: 0 20px; }
.radios__input, .checkboxes__input { position: absolute; z-index: 1; top: -2px; left: -2px; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.radios__label, .checkboxes__label { display: inline-block; margin-bottom: 0; padding: 8px 15px 5px 12px; cursor: pointer; touch-action: manipulation; align-self: center; max-width: calc(100% - 40px); }
.radios__label::before, .checkboxes__label::before { content: ""; box-sizing: border-box; position: absolute; top: 0; left: 0; width: 40px; height: 40px; border: 2px solid currentColor; background: var(--white); }
.radios__label::before { border-radius: 50%; }
.radios__label, .checkboxes__label { padding-left: 52px; margin-left: -40px; }
.radios__item::before, .checkboxes__item::before { content: ""; display: block; width: 40px; flex: none; }
.radios__label::after { content: ""; position: absolute; top: 10px; left: 10px; width: 0; height: 0; border: 10px solid currentColor; border-radius: 50%; opacity: 0; background: currentColor; }
.checkboxes__label::after { content: ""; box-sizing: border-box; position: absolute; top: 11px; left: 9px; width: 23px; height: 12px; transform: rotate(-45deg);
  border: solid; border-width: 0 0 5px 5px; border-top-color: transparent; opacity: 0; background: transparent; }
.radios__input:checked + .radios__label::after, .checkboxes__input:checked + .checkboxes__label::after { opacity: 1; }
.radios__input:focus + .radios__label::before { border-width: 4px; outline: 3px solid transparent; box-shadow: 0 0 0 4px var(--focus); }
.checkboxes__input:focus + .checkboxes__label::before { border-width: 4px; outline: 3px solid transparent; box-shadow: 0 0 0 3px var(--focus); }
.radios__hint, .checkboxes__hint { display: block; width: 100%; padding-left: 52px; margin: -2px 0 0; margin-left: -0px; }
.radios__item .radios__hint, .checkboxes__item .checkboxes__hint { padding-left: 52px; margin-top: 0; }
.radios--small .radios__item { margin-bottom: 8px; }

/* ---------- Error summary ---------- */
.error-summary { padding: 15px; margin-bottom: 30px; border: 5px solid var(--error); }
@media (min-width: 40.0625em) { .error-summary { padding: 20px; margin-bottom: 50px; } }
.error-summary:focus { outline: 3px solid var(--focus); }
.error-summary__title { margin: 0 0 15px; font-size: 1.125rem; }
@media (min-width: 40.0625em) { .error-summary__title { font-size: 1.5rem; margin-bottom: 20px; } }
.error-summary__list { margin: 0; }
.error-summary__list a { color: var(--error) !important; font-weight: 700; }
.error-summary__list li { font-weight: 700; color: var(--error); }

/* ---------- Notifications (flash) ---------- */
.notification { margin-bottom: 30px; border: 5px solid #1d70b8; background: #1d70b8; }
.notification--success { border-color: var(--success); background: var(--success); }
.notification--error { border-color: var(--error); background: var(--error); }
.notification__header { padding: 2px 15px 5px; }
.notification__title { margin: 0; color: var(--white); font-size: 1rem; font-weight: 700; }
.notification__content { padding: 15px; background: var(--white); }
.notification__heading { margin: 0; font-weight: 700; font-size: 1.125rem; }
@media (min-width: 40.0625em) { .notification__heading { font-size: 1.5rem; line-height: 1.25; } }

/* ---------- Panels, inset, warning, details ---------- */
.panel { margin-bottom: 20px; padding: 35px; border: 5px solid transparent; text-align: center; }
.panel--confirmation { color: var(--white); background: var(--success); }
.panel__title { margin: 0 0 20px; font-size: 2rem; line-height: 1.09; }
@media (min-width: 40.0625em) { .panel__title { font-size: 3rem; } }
.panel__body { font-size: 1.5rem; }
.inset-text { padding: 15px; margin: 20px 0; border-left: 10px solid var(--border); clear: both; }
.inset-text > :last-child { margin-bottom: 0; }
.inset-text--brand { border-left-color: var(--brand); background: var(--brand-tint); }
.warning-text { position: relative; display: flex; gap: 15px; align-items: flex-start; margin-bottom: 20px; padding: 10px 0; }
.warning-text__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border: 3px solid var(--ink);
  border-radius: 50%; background: var(--ink); color: var(--white); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.warning-text__text { padding-top: 4px; }
.details { margin-bottom: 20px; }
.details__summary { display: inline-block; color: var(--link); cursor: pointer; padding-left: 25px; position: relative; }
.details__summary::before { content: ""; position: absolute; left: 0; top: 50%; margin-top: -7px; border-style: solid; border-width: 7px 0 7px 12.124px; border-color: transparent; border-left-color: inherit; }
.details[open] > .details__summary::before { border-width: 12.124px 7px 0 7px; border-color: transparent; border-top-color: inherit; margin-top: -5px; }
.details__summary { list-style: none; } .details__summary::-webkit-details-marker { display: none; }
.details__text-label { text-decoration: underline; text-underline-offset: .15em; }
.details__text { padding: 15px 15px 15px 20px; border-left: 5px solid var(--border); margin-top: 10px; }
.details__text > :last-child { margin-bottom: 0; }

/* ---------- Tags ---------- */
.tag { display: inline-block; padding: 2px 8px 3px; font-size: 1rem; font-weight: 400; line-height: 1.25; max-width: 100%; overflow-wrap: break-word; color: #0c2d4a; background: #bbd4ea; }
.tag--grey { color: #282d30; background: #e5e6e7; }
.tag--green { color: #005a30; background: #cce2d8; }
.tag--turquoise { color: #10403c; background: #d4ecea; }
.tag--blue { color: #0c2d4a; background: #bbd4ea; }
.tag--purple { color: #3d2375; background: #dbd5e9; }
.tag--yellow { color: #594d00; background: #fff7bf; }
.tag--red { color: #2a0b06; background: #f4cdc6; }
.tag--orange { color: #6e3619; background: #fcd6c3; }

/* ---------- Summary list ---------- */
.summary-list { margin: 0 0 20px; }
@media (min-width: 40.0625em) { .summary-list { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 30px; } }
.summary-list__row { border-bottom: 1px solid var(--border); margin-bottom: 15px; }
@media (min-width: 40.0625em) { .summary-list__row { display: table-row; margin-bottom: 0; } }
.summary-list__key, .summary-list__value, .summary-list__actions { margin: 0; }
@media (min-width: 40.0625em) { .summary-list__key, .summary-list__value, .summary-list__actions { display: table-cell; padding: 10px 20px 10px 0; vertical-align: top; } }
.summary-list__key { font-weight: 700; margin-bottom: 5px; }
@media (min-width: 40.0625em) { .summary-list__key { width: 35%; } }
.summary-list__value { margin-bottom: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.summary-list__actions { margin-bottom: 15px; }
@media (min-width: 40.0625em) { .summary-list__actions { width: 20%; padding-right: 0; text-align: right; } .summary-list__value { margin-bottom: 0; } }
.summary-list__locked { color: var(--secondary-text); font-size: 1rem; }

.summary-card { margin-bottom: 30px; border: 1px solid var(--border); }
.summary-card__title-wrapper { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 15px; padding: 12px 20px; background: var(--light-grey); border-bottom: 1px solid transparent; }
.summary-card__title { margin: 0; font-size: 1.1875rem; }
.summary-card__content { padding: 15px 20px 0; }
.summary-card__content > .summary-list { margin-bottom: 0; }
.summary-card__content > .summary-list .summary-list__row:last-child { border-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; margin-bottom: 20px; }
.table { width: 100%; border-spacing: 0; border-collapse: collapse; margin-bottom: 20px; font-size: 1rem; }
.table__caption { font-weight: 700; text-align: left; margin-bottom: 10px; font-size: 1.1875rem; }
.table th, .table td { padding: 10px 20px 10px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-weight: 700; }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table--compact th, .table--compact td { padding-top: 6px; padding-bottom: 6px; font-size: 0.9375rem; }
.table__num { text-align: right !important; font-variant-numeric: tabular-nums; }

/* ---------- Back link, breadcrumbs, pagination ---------- */
.back-link { display: inline-block; position: relative; margin-top: 15px; margin-bottom: 0; padding-left: 14px; font-size: 1rem; color: var(--ink); text-decoration: underline; text-underline-offset: .1em; }
.back-link::before { content: ""; position: absolute; left: 3px; top: 50%; width: 7px; height: 7px; border: solid; border-width: 1px 0 0 1px; transform: translateY(-50%) rotate(-45deg); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 20px 0 40px; }
.pagination__info { color: var(--secondary-text); }

/* ---------- Service lists (home / services) ---------- */
.service-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 0 30px; }
@media (min-width: 40.0625em) { .service-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .service-list--three { grid-template-columns: repeat(3, 1fr); } }
.service-list__item { border-top: 1px solid var(--border); padding: 18px 0 22px; }
.service-list__title { font-size: 1.1875rem; margin: 0 0 6px; }
.service-list__title a { font-weight: 700; }
.service-list__text { margin: 0; color: var(--secondary-text); }
.service-list__meta { margin: 8px 0 0; font-size: 1rem; }
.home-section { padding: 10px 0 20px; }
.home-section + .home-section { border-top: 4px solid var(--brand); padding-top: 30px; }

/* ---------- Application tracker (step by step) ---------- */
.tracker { list-style: none; margin: 0 0 40px; padding: 0; position: relative; }
.tracker__step { position: relative; padding: 0 0 22px 52px; min-height: 34px; }
.tracker__step::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.tracker__step:last-child::before { display: none; }
.tracker__marker { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); background: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9375rem; color: var(--secondary-text); }
.tracker__label { display: block; padding-top: 5px; font-weight: 700; color: var(--secondary-text); }
.tracker__date { display: block; font-size: 1rem; color: var(--secondary-text); margin-top: 2px; }
.tracker__step--done::before { background: var(--brand); }
.tracker__step--done .tracker__marker { background: var(--brand); border-color: var(--brand); color: var(--white); }
.tracker__step--done .tracker__label { color: var(--ink); }
.tracker__step--current .tracker__marker { border-color: var(--brand); border-width: 4px; color: var(--brand); background: var(--brand-tint); }
.tracker__step--current .tracker__label { color: var(--ink); }
.tracker__now { display: inline-block; margin-left: 8px; font-weight: 400; font-size: 0.875rem; padding: 1px 6px; background: var(--brand-tint); color: var(--brand-dark); }

.timeline { list-style: none; margin: 0 0 30px; padding: 0; border-left: 2px solid var(--border); }
.timeline__item { padding: 0 0 18px 20px; position: relative; }
.timeline__item::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--brand); }
.timeline__item--internal::before { border-color: #f47738; }
.timeline__title { font-weight: 700; margin: 0; }
.timeline__meta { margin: 2px 0 6px; font-size: 1rem; color: var(--secondary-text); }
.timeline__body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Ticket thread ---------- */
.thread { list-style: none; margin: 0 0 30px; padding: 0; }
.message { margin-bottom: 20px; padding: 15px 20px; border: 1px solid var(--border); border-left-width: 6px; }
.message--staff { border-left-color: var(--brand); background: #f8fbfa; }
.message--citizen { border-left-color: var(--link); }
.message--internal { border-left-color: #f47738; background: #fff7f0; }
.message__meta { margin: 0 0 8px; font-size: 1rem; color: var(--secondary-text); }
.message__body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Admin ---------- */
.admin-nav { margin-top: 20px; border-bottom: 1px solid var(--border); }
.admin-nav__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; gap: 0 4px; }
.admin-nav__item { margin-bottom: -1px; }
.admin-nav__link { display: block; padding: 10px 14px 9px; color: var(--link); text-decoration: underline; text-underline-offset: .15em; border: 1px solid transparent; font-size: 1rem; }
.admin-nav__link:visited { color: var(--link); }
.admin-nav__item--active .admin-nav__link { color: var(--ink); text-decoration: none; background: var(--white); border-color: var(--border); border-bottom-color: var(--white); font-weight: 700; }
.sub-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 30px; padding: 0; list-style: none; font-size: 1rem; }
.sub-nav a[aria-current] { font-weight: 700; color: var(--ink) !important; text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-bottom: 40px; }
.stat { display: block; padding: 18px 20px; border: 1px solid var(--border); border-top: 5px solid var(--brand); text-decoration: none !important; color: var(--ink) !important; }
.stat:hover { background: var(--brand-tint); }
.stat__number { display: block; font-size: 2.5rem; font-weight: 700; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat__label { display: block; font-size: 1rem; color: var(--secondary-text); }
.stat--alert { border-top-color: var(--error); }
.filters { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: flex-end; padding: 15px 15px 0; margin-bottom: 25px; background: var(--light-grey); }
.filters .form-group { margin-bottom: 15px; }
.filters .button { margin-bottom: 15px; }
.action-box { padding: 20px 20px 1px; margin-bottom: 25px; border: 1px solid var(--border); }
.action-box > h2, .action-box > h3 { margin-bottom: 15px; }
.action-box--danger { border-color: var(--error); border-left-width: 5px; }
.repeat-row { padding: 15px 15px 0; margin-bottom: 15px; border: 1px solid var(--border); background: #fafafa; }
.repeat-row--new { border-style: dashed; background: var(--white); }
.audit-details { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; color: var(--secondary-text); overflow-wrap: anywhere; max-width: 28em; }
.preview-box { padding: 20px; border: 2px dashed var(--border); margin-bottom: 30px; }
.inline-form { display: inline; margin: 0; }
.id-thumb { display: block; max-width: 280px; border: 1px solid var(--border); margin-bottom: 10px; }

/* ---------- Footer ---------- */
.footer { padding: 25px 0 20px; font-size: 0.875rem; color: var(--ink); background: var(--light-grey); border-top: 1px solid var(--border); position: relative; }
.footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 6px; background: var(--brand); }
@media (min-width: 40.0625em) { .footer { padding: 40px 0 25px; font-size: 1rem; } }
.footer__meta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 20px 30px; }
.footer__meta-item--grow { flex: 1 1 340px; }
.footer__inline-list { margin: 0 0 15px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 15px; }
.footer__text p { margin-bottom: 10px; }
.footer__crest { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 200px; }
.footer__emblem { width: 52px; height: 60px; color: var(--brand); }
.footer__logo { display: block; max-width: 180px; height: 56px; width: auto; object-fit: contain; }

/* ---------- Print ---------- */
@media print {
  .official, .header__account, .service-nav, .admin-nav, .footer, .skip-link, .button, form { display: none !important; }
  .header { background: none; color: #000; } .header__emblem { color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 90%; }
}

/* ---------- Charts (server-rendered SVG) ---------- */
.chart-wrap { width: 100%; overflow-x: auto; margin-bottom: 30px; border: 1px solid var(--border); padding: 10px 10px 4px; }
.chart { display: block; width: 100%; min-width: 560px; height: auto; font-family: var(--font); }
.chart__grid { stroke: var(--mid-grey); stroke-width: 1; }
.chart__axis { fill: var(--secondary-text); font-size: 13px; }
.chart__value { fill: var(--ink); font-size: 13px; font-weight: 700; }
.chart__line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart__line--0 { stroke: var(--brand); }
.chart__line--1 { stroke: #1d70b8; stroke-dasharray: 6 5; }
.chart__area { fill: var(--brand); opacity: .08; }
.chart__bar { fill: var(--brand); }
.chart-legend { display: flex; gap: 20px; list-style: none; margin: 4px 0 6px; padding: 0 0 0 46px; font-size: 0.875rem; }
.chart-legend__item::before { content: ""; display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 3px solid var(--brand); }
.chart-legend__item--1::before { border-top: 3px dashed #1d70b8; }
.bar-cell { display: block; width: 100%; min-width: 80px; height: 8px; margin-top: 4px; }
.bar-cell__track { fill: var(--mid-grey); }
.bar-cell__bar { fill: var(--brand); }
.bar-col { width: 30%; }
.transcript { margin: 0; padding: 12px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--light-grey); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875rem; line-height: 1.5; }

/* ---------- Branding ---------- */
.preview-bar { background: #f47738; color: var(--ink); padding: 8px 0; font-weight: 700; }
.preview-bar a { color: var(--ink); }
input[type="color"].input { width: 4.5rem; padding: 2px; cursor: pointer; }
.colour-row { display: flex; flex-wrap: wrap; gap: 0 30px; }
.colour-row .form-group { min-width: 10rem; }
.brand-sample { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 20px; background: var(--header-bg); color: var(--header-text); border-bottom: 8px solid var(--brand); }
.brand-sample .header__wordmark { color: var(--header-text); }
.brand-sample--light { background: var(--light-grey); color: var(--ink); border-bottom-color: var(--border); }
.favicon-sample { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.favicon-sample img { border: 1px solid var(--border); background: var(--white); }
.favicon-sample__small { width: 32px; height: 32px; } .favicon-sample__large { width: 90px; height: 90px; border-radius: 18px; }
.swatches { display: flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.swatch { display: inline-block; width: 18px; height: 18px; border: 1px solid rgba(0,0,0,.25); }
.flag-sample { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.flag-sample__large { height: 60px; width: auto; max-width: 140px; border: 1px solid var(--border); }
.flag-sample__actual { height: 12px; width: auto; max-width: 32px; outline: 1px solid rgba(0,0,0,.1); }
