/* ==========================================================================
   BASE STYLE SHEET
   One file for the whole site. Part 1 (brand colours, fonts and a few "feel"
   settings) and Part 10 (project-specific styles) are the only parts that
   change between clients. Everything else uses the Part 1 values and should
   stay the same. Styles used only by the style guide page are in a <style>
   block in style-guide.njk, not here.
   ========================================================================== */


/* ==========================================================================
   PART 1: BRAND (change these per client)
   Colours are taken from the badge (Media/ovlr-badge.png), darkened where
   needed so text passes 4.5:1.
   ========================================================================== */

/* Fonts are self-hosted, so nothing loads from Google. The url()s use ../fonts/
   (src/css/ beside src/fonts/). Each family has a latin file and a
   latin-ext file; the browser downloads latin-ext only if a page needs it. */
@font-face{font-family:"Alfa Slab One";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/alfa-slab-one-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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/source-serif-4-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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:italic;font-weight:400;font-display:swap;src:url("../fonts/source-serif-4-latin-400-italic.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}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/source-serif-4-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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Alfa Slab One";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/alfa-slab-one-latin-ext-400-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 Serif 4";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/source-serif-4-latin-ext-400-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 Serif 4";font-style:italic;font-weight:400;font-display:swap;src:url("../fonts/source-serif-4-latin-ext-400-italic.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 Serif 4";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/source-serif-4-latin-ext-700-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}


:root{
  /* Core colours */
  --ink:#2a2a1c;          /* main text, dark sections: the badge outline */
  --paper:#f4e4c4;        /* page background: the badge's cream sky */
  --accent:#eaa73e;       /* main accent: highlights. The badge sun. Light enough for text on ink */
  --accent-2:#3f4a28;     /* second accent: Land Rover green. Links, focus rings, big feature sections */
  --on-accent:#2a2a1c;    /* text that sits on --accent */
  --on-accent-2:#f4e4c4;  /* text that sits on --accent-2 */

  /* Supporting colours */
  --muted:#5c5a40;        /* secondary text on paper */
  --line:#c9b78f;         /* faint rules and borders on paper */
  --ink-muted:#b9b49a;    /* secondary text on ink */
  --ink-line:#4a4a36;     /* rules on ink */
  --white:#fffaf0;        /* warm white: cards, form fields, text on ink */
  --disabled-bg:#d9cdb0;  /* greyed-out buttons */
  --disabled-text:#5c5a40;

  /* Status colours: bright bars plus a pale tint, always with a word as well */
  --ok:#4a7c3a;   --ok-tint:#dfeccf;
  --warn:#d47c34; --warn-tint:#f9e1c4;   /* the badge orange */
  --bad:#b3261e;  --bad-tint:#f6d9d3;
  --info-tint:#e4e6cc;
  --bad-text:#8f1d17;     /* red used for words on paper */

  /* Fonts */
  --font-display:"Alfa Slab One","Rockwell","Rockwell Extra Bold",Georgia,serif;
  --font-body:"Source Serif 4",Georgia,"Times New Roman",serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;

  /* Feel */
  --radius:6px;           /* boxes: lightly rounded, like the badge */
  --radius-pill:6px;      /* buttons and tags: lightly rounded rectangles, not pills */
  --border:3px;           /* the heavy border used on cards and inputs */

  /* Font weights. Alfa Slab One has one weight (400), so headings must not ask
     for bold or the browser fakes it. Source Serif 4 files: 400, 400 italic, 700. */
  --weight-display:400;   /* headings */
  --weight-bold:700;      /* bold text, buttons, labels */
}


/* ==========================================================================
   PART 2: SHARED SCALES (the same everywhere)
   ========================================================================== */

:root{
  --space-xs:.25rem; --space-sm:.5rem; --space-md:1rem; --space-lg:1.5rem;
  --space-xl:2rem;   --space-2xl:3rem; --space-3xl:5rem;
  --wrap:1100px;
  --measure:34em;         /* comfortable line length for reading */
}


/* ==========================================================================
   PART 3: BASE
   ========================================================================== */

*,*::before,*::after{box-sizing:border-box}
/* The hidden attribute always wins, even over a component that sets display. */
[hidden]{display:none !important}
*{margin:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{font:400 18px/1.6 var(--font-body);color:var(--ink);background:var(--paper);min-height:100vh;display:flex;flex-direction:column}
main{flex:1}
img,svg{max-width:100%;height:auto;display:block}
a{color:var(--accent-2);text-underline-offset:.2em}
a:hover{text-decoration-thickness:3px}
/* Outside links: a small arrow, added at build with "(opens in a new tab)"
   for screen readers (eleventy.config.js). It takes the link's colour. */
.ext-icon{display:inline-block;width:.62em;height:.62em;margin-left:.18em;vertical-align:.02em;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:4px solid var(--accent-2);outline-offset:4px}
/* Gold rings on dark backgrounds. The footer and the video consent panel are
   dark without the .on-dark class, so they are named here. */
.on-dark :focus-visible,.on-accent-2 :focus-visible,.on-accent :focus-visible,footer :focus-visible,.video-consent :focus-visible{outline-color:var(--accent)}
.on-accent :focus-visible{outline-color:var(--ink)}
::selection{background:var(--accent);color:var(--ink)}

.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
section{padding:var(--space-3xl) 0}
.skip{position:absolute;left:-999px;top:0;background:var(--accent);color:var(--ink);padding:12px 20px;font-weight:var(--weight-bold);z-index:100}
.skip:focus{left:0}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Section colour themes */
.on-dark{background:var(--ink);color:var(--white)}
.on-accent-2{background:var(--accent-2);color:var(--on-accent-2)}
.on-accent{background:var(--accent);color:var(--on-accent)}
/* On a page too short to fill the screen, main is stretched taller than its
   content. This colours that leftover strip so it runs into the footer
   rather than showing as a band of paper. Set it to match the last section. */
.page-ink{background:var(--ink)}
/* :where() keeps these rules weak so buttons and tags can set their own colours */
.on-dark :where(a),.on-accent-2 :where(a){color:var(--accent)}
.on-accent :where(a){color:var(--ink)}


/* ==========================================================================
   PART 4: TYPOGRAPHY
   Weights come from --weight-display and --weight-bold in Part 1.
   ========================================================================== */

h1,h2,h3,h4{font-family:var(--font-display);font-weight:var(--weight-display);letter-spacing:-.01em;line-height:1.05}
h1{font-size:clamp(42px,8.6vw,114px)}
h2{font-size:clamp(34px,6vw,72px);margin-bottom:var(--space-lg)}
h3{font-size:clamp(26px,3.4vw,38px);margin-bottom:var(--space-md)}
h4{font-size:clamp(20px,2.4vw,26px);margin-bottom:var(--space-sm);letter-spacing:0}
.on-dark h2,.on-accent-2 h2{color:var(--accent)}
.lead{font-size:clamp(19px,2.2vw,24px);line-height:1.5;max-width:var(--measure)}
.small{font-size:15px;color:var(--muted)}
.on-dark .small,.on-accent-2 .small{color:var(--ink-muted)}
.on-accent-2 .small{color:var(--white)}
.on-accent .small,.on-accent .crumbs{color:var(--ink)}
.on-dark .crumbs,.on-accent-2 .crumbs{color:var(--ink-muted)}
.eyebrow{font:var(--weight-bold) 14px/1 var(--font-body);letter-spacing:.12em;text-transform:uppercase;margin-bottom:var(--space-md)}
strong,b{font-weight:var(--weight-bold)}
p+p{margin-top:1.1em}


/* ==========================================================================
   PART 5: BUTTONS
   ========================================================================== */

.btn{display:inline-block;font:var(--weight-bold) 18px/1.2 var(--font-body);text-decoration:none;padding:16px 28px;border:var(--border) solid var(--ink);border-radius:var(--radius-pill);background:var(--ink);color:var(--accent);cursor:pointer;overflow-wrap:anywhere}
.btn:hover{background:var(--accent-2);border-color:var(--accent-2);color:var(--on-accent-2);text-decoration:none}
.btn-outline{background:transparent;color:var(--ink)}
.btn-outline:hover{background:var(--ink);border-color:var(--ink);color:var(--accent)}
.btn-accent{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn-accent:hover{background:var(--white);border-color:var(--white);color:var(--ink)}
.btn-small{font-size:15px;padding:10px 20px}
.btn[disabled],.btn[aria-disabled=true]{background:var(--disabled-bg);border-color:var(--disabled-bg);color:var(--disabled-text);cursor:not-allowed;pointer-events:none}
/* on dark or accent-2 sections, buttons flip */
.on-dark .btn,.on-accent-2 .btn{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.on-dark .btn:hover,.on-accent-2 .btn:hover{background:var(--white);border-color:var(--white);color:var(--ink)}
.on-dark .btn-outline,.on-accent-2 .btn-outline{background:transparent;color:var(--white);border-color:var(--white)}
.on-dark .btn-outline:hover,.on-accent-2 .btn-outline:hover{background:var(--white);color:var(--ink)}
.on-accent .btn:hover{background:var(--accent-2);border-color:var(--accent-2);color:var(--on-accent-2)}
.btn-row{display:flex;flex-wrap:wrap;gap:var(--space-md);align-items:center}


/* ==========================================================================
   PART 6: NAVIGATION AND FOOTER
   ========================================================================== */

.bar{background:var(--ink);padding:16px 0}
.bar .wrap{display:flex;align-items:center;gap:var(--space-lg);flex-wrap:wrap}
.bar .brand{display:flex;align-items:center;gap:14px;text-decoration:none}
.bar .brand img{height:34px;width:auto}
.bar .brand svg{height:34px;width:auto;fill:var(--accent)}
.bar .brand span{font:var(--weight-display) 22px/1 var(--font-display);letter-spacing:0;color:var(--white);white-space:nowrap}
.bar nav{margin-left:auto}
.bar nav ul{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:var(--space-sm) var(--space-lg)}
.bar nav a{color:var(--accent);font-weight:var(--weight-bold);font-size:16px;text-decoration:none;padding:6px 0;border-bottom:3px solid transparent}
.bar nav a:hover{color:var(--white);border-bottom-color:var(--white)}
.bar nav a[aria-current=page]{color:var(--white);border-bottom-color:var(--accent)}
/* Sticky variant. Pages that have their own sticky sub-nav (the style
   guide) leave it off so the two don't stack on top of each other. */
.bar-sticky{position:sticky;top:0;z-index:10}
/* Jump links and keyboard focus stop below a sticky header, not under it. */
html:has(.bar-sticky){scroll-padding-top:6rem}

/* Menu button: only on narrow screens, and only with JavaScript (the html.js
   class is set in the <head>; js/nav.js opens and closes the menu). Without
   JavaScript the menu just wraps under the name, as on any other width. */
.nav-toggle{display:none;align-items:center;gap:8px;margin:0;padding:5px 12px;background:transparent;color:var(--accent);border:2px solid var(--accent);border-radius:var(--radius-pill);font:var(--weight-bold) 16px/1 var(--font-body);cursor:pointer}
.nav-toggle:hover{color:var(--white);border-color:var(--white)}
.nav-toggle svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}
.nav-toggle-close,.nav-toggle[aria-expanded=true] .nav-toggle-open{display:none}
.nav-toggle[aria-expanded=true] .nav-toggle-close{display:inline}
@media (max-width:760px){
  .js .bar .nav-toggle{display:inline-flex}
  .js .bar nav{margin-left:auto;width:auto}
  .js .bar .wrap{flex-wrap:nowrap}
  .js .bar nav ul{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:flex-end;gap:0;padding:var(--space-xs) 24px var(--space-md);background:var(--ink);border-top:1px solid var(--ink-line);box-shadow:0 12px 20px rgb(0 0 0 / .25)}
  .js .bar.menu-open nav ul{display:flex}
  .js .bar nav ul a{display:inline-block;padding:12px 0;font-size:18px}
  .js .bar:not(.bar-sticky){position:relative}
  /* Without JavaScript the menu wraps to two more rows: too tall to pin. */
  html:not(.js) .bar-sticky{position:static}
}
/* Name and Menu button side by side on a phone: a slightly smaller name,
   and on the narrowest screens the button keeps its icon and drops the word
   (still read out by screen readers). */
@media (max-width:440px){
  .bar .wrap{gap:var(--space-sm)}
  .bar .brand{gap:10px}
  .bar .brand span{font-size:19px}
}
@media (max-width:374px){
  .js .nav-toggle span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .nav-toggle{padding:5px 8px}
}

.crumbs{font-size:15px;color:var(--muted)}
.crumbs ol{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:var(--space-sm)}
.crumbs li+li::before{content:"/";margin-right:var(--space-sm)}

footer{background:var(--ink);color:var(--ink-muted);font-size:14px;padding:0 0 32px}
footer .inner{border-top:1px solid var(--ink-line);padding-top:24px}
footer a{color:var(--ink-muted)}
footer a:hover{color:var(--white)}


/* ==========================================================================
   PART 7: FORMS
   ========================================================================== */

.field{margin-bottom:var(--space-lg)}
label,legend{display:block;font-weight:var(--weight-bold);margin-bottom:var(--space-sm)}
.hint{display:block;font-size:15px;color:var(--muted);margin:-.25rem 0 var(--space-sm)}
input,textarea,select{font:400 18px/1.4 var(--font-body);color:var(--ink);background:var(--white);border:var(--border) solid var(--ink);border-radius:var(--radius);padding:12px 14px;width:100%;max-width:36em}
textarea{min-height:9em;resize:vertical}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline:4px solid var(--accent-2);outline-offset:2px}
input::placeholder,textarea::placeholder{color:var(--muted)}
input[type=checkbox],input[type=radio]{width:1.4em;height:1.4em;accent-color:var(--accent-2);vertical-align:middle;margin-right:var(--space-sm)}
.check{display:flex;align-items:center;font-weight:400}
.field-error input{border-color:var(--bad)}
.error-text{color:var(--bad-text);font-weight:var(--weight-bold);margin-top:var(--space-sm)}
.error-text::before{content:"Problem: "}
fieldset{border:0;padding:0}


/* ==========================================================================
   PART 8: COMPONENTS
   ========================================================================== */

/* Two columns side by side, stacking on a phone (Part 11). */
.cols{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:start}
/* Sits the shorter column against the middle of the taller one. */
.cols-middle{align-items:center}

/* Tags */
.tags{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:var(--space-sm)}
.tag{display:inline-block;font:var(--weight-bold) 14px/1 var(--font-body);padding:8px 14px;border-radius:var(--radius-pill);background:var(--accent);color:var(--on-accent);text-decoration:none}
a.tag:hover{background:var(--ink);color:var(--accent)}
/* tags on accent flip to ink so they stay visible */
.on-accent .tag{background:var(--ink);color:var(--accent)}
.on-accent a.tag:hover{background:var(--accent-2);color:var(--on-accent-2)}
.on-accent .tag-outline{background:transparent;color:var(--ink);border-color:var(--ink)}
.tag-outline{background:transparent;border:2px solid var(--ink);color:var(--ink);padding:6px 12px}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--space-lg)}
.card{background:var(--white);border:var(--border) solid var(--ink);border-radius:var(--radius);padding:var(--space-lg);display:flex;flex-direction:column;gap:var(--space-sm)}
.card h3,.card h4{margin-bottom:0}
.card a{color:inherit}
.card .more{margin-top:auto;font-weight:var(--weight-bold)}
.card-accent{background:var(--accent)}
.card-accent-2{background:var(--accent-2);color:var(--on-accent-2)}
.card-accent-2 h3,.card-accent-2 h4{color:var(--accent)}
.card-link:hover{box-shadow:8px 8px 0 var(--ink);transform:translate(-4px,-4px)}
@media (prefers-reduced-motion:no-preference){.card-link{transition:box-shadow .15s,transform .15s}}

/* Alerts: always carry a word as well as colour */
.alert{border:var(--border) solid var(--ink);padding:var(--space-md) var(--space-lg) var(--space-md) calc(var(--space-lg) + 12px);background:var(--white);border-radius:var(--radius)}
.alert strong:first-child{display:block;margin-bottom:var(--space-xs)}
.alert-ok{box-shadow:inset 12px 0 0 var(--ok);background:var(--ok-tint)}
.alert-warn{box-shadow:inset 12px 0 0 var(--warn);background:var(--warn-tint)}
.alert-bad{box-shadow:inset 12px 0 0 var(--bad);background:var(--bad-tint)}
.alert-info{box-shadow:inset 12px 0 0 var(--accent-2);background:var(--info-tint)}
.alerts{display:grid;gap:var(--space-md);max-width:var(--measure)}

/* Side note */
.note{border-left:12px solid var(--accent-2);padding:4px 0 4px 24px}
/* A heading in a note belongs to the paragraph under it, so the space sits
   above the heading rather than below it. */
.note h3{margin-top:var(--space-xl);margin-bottom:var(--space-sm)}
.note>h3:first-child{margin-top:0}

/* Tables */
.table-wrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;min-width:30em}
th,td{text-align:left;padding:12px 16px;border-bottom:2px solid var(--line);vertical-align:top}
th{font-weight:var(--weight-bold)}
thead th{border-bottom:var(--border) solid var(--ink)}

/* Pagination */
.pager{display:flex;justify-content:space-between;gap:var(--space-md);flex-wrap:wrap}


/* ==========================================================================
   PART 9: BLOG / PROSE
   ========================================================================== */

.prose{font-size:clamp(19px,2.1vw,22px)}
.prose>*{max-width:var(--measure)}
.prose>*+*{margin-top:1.1em}
.prose h2{font-size:clamp(30px,4.4vw,48px);margin:2em 0 .6em}
.prose h3{font-size:clamp(24px,3vw,32px);margin:1.8em 0 .5em}
.prose h2+*,.prose h3+*{margin-top:0}
.prose ul,.prose ol{padding-left:1.4em}
.prose li+li{margin-top:.4em}
.prose blockquote{border-left:12px solid var(--accent);padding:4px 0 4px 24px;font-size:1.15em;font-weight:var(--weight-bold)}
.prose blockquote footer{background:none;padding:0;margin-top:var(--space-sm);font-size:.8em;font-weight:400;color:var(--muted)}
.prose hr{border:0;border-top:var(--border) solid var(--ink);margin:2.5em 0}
.prose figure{max-width:none}
.prose figure img{border:var(--border) solid var(--ink);width:100%}
/* A photograph narrower than the column keeps its own size, not stretched.
   The figure shortcode adds the class to anything under 700px wide. */
.prose figure.figure-small img{width:auto;max-width:100%}
/* A figure's photo links to its full-size copy, which the lightbox opens. */
.prose figure>a{display:block}
.prose figure.figure-small>a{display:inline-block;max-width:100%;vertical-align:top}
.prose figcaption{font-size:15px;color:var(--muted);margin-top:var(--space-sm);max-width:var(--measure)}
code,kbd{font:400 .88em var(--font-mono);background:var(--white);border:1px solid var(--line);padding:.1em .4em;border-radius:4px}
pre{background:var(--ink);color:var(--white);padding:var(--space-lg);overflow-x:auto;font:400 15px/1.6 var(--font-mono);border-radius:var(--radius)}
pre code{background:none;border:0;padding:0;font-size:inherit}

/* Post header and list */
.post-meta{margin-bottom:var(--space-sm);font-size:15px;color:var(--muted);display:flex;flex-wrap:wrap;gap:var(--space-xs) var(--space-md)}
.post-meta .tags{margin-left:0}
.post-list{list-style:none;padding:0;border-top:var(--border) solid var(--ink)}
.post-list>li{padding:var(--space-lg) 0;border-bottom:2px solid var(--line)}
.post-list h3{margin-bottom:var(--space-sm)}
.post-list h3 a{color:inherit;text-decoration:none}
.post-list h3 a:hover{text-decoration:underline;text-decoration-thickness:6px;text-decoration-color:var(--accent-2)}
.author{display:flex;gap:var(--space-lg);align-items:flex-start;border-top:var(--border) solid var(--ink);padding-top:var(--space-lg)}


/* ==========================================================================
   PART 10: PROJECT-SPECIFIC STYLES
   Anything only this project needs (a hero, a contact block, artwork, a
   back-to-top button and so on). Build it from the Part 1 tokens and the
   Part 2 scales, and add it to the style guide page as well.
   ========================================================================== */

/* Home intro. Sits at the top of page 1 of the post archive only. Use it
   with .on-accent-2. The map pattern (the same file as the post hero) fades in
   from the right behind the badge, so the heading and text sit on plain
   green. On a phone it fades in downwards from the top instead. */
.hero{position:relative;overflow:hidden;padding:var(--space-3xl) 0}
.hero::before{content:"";position:absolute;inset:0;background:url("../img/contours.svg") 100% 0/960px 600px;-webkit-mask-image:linear-gradient(to left,#000 10%,transparent 75%);mask-image:linear-gradient(to left,#000 10%,transparent 75%);pointer-events:none}
.hero .wrap{position:relative;display:grid;grid-template-columns:1fr auto;gap:var(--space-2xl);align-items:center}
.hero img{width:clamp(140px,22vw,260px);height:auto}
.hero .lead{margin-top:var(--space-lg)}

/* Category filter: tags that link to the category archives. The page you are
   on is shown inverted, and carries aria-current. */
.tag[aria-current=page]{background:var(--ink);color:var(--accent)}
.filter{margin-bottom:var(--space-xl)}

/* Post list rows with a picture. The picture takes half the row. The picture is
   decoration (the title is the link), so it is hidden from screen readers and
   left out of the tab order. Even rows swap sides: picture on the right, text
   on the left and right-aligned. The swap is done with CSS order, so the
   reading and tab order in the HTML stay the same. */
.post-list>li.has-thumb{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-xl);align-items:center}
.post-list>li.has-thumb:nth-child(even) .post-thumb{order:2}
.post-list>li.has-thumb:nth-child(even){text-align:right}
.post-list>li.has-thumb:nth-child(even) .post-meta,.post-list>li.has-thumb:nth-child(even) .tags{justify-content:flex-end}
.post-thumb{display:block;aspect-ratio:3/2;background:var(--line);border:var(--border) solid var(--ink);border-radius:var(--radius);overflow:hidden}
.post-thumb img{width:100%;height:100%;object-fit:cover}
/* Fallback for the few posts with no photograph: the badge on green. */
.post-thumb-empty{display:grid;place-items:center;background:var(--accent-2)}
.post-thumb-empty img{width:42%;height:auto;object-fit:contain}
.post-list .post-meta .cat{font-weight:var(--weight-bold);text-transform:uppercase;letter-spacing:.08em;font-size:13px}

/* Post hero. A green panel with a faint map pattern: gentle contour lines and
   three Byway lines in the Ordnance Survey style (img/contours.svg,
   referenced as ../img/, which is src/img/). The
   featured photograph sits on the right and fades in from the left with a
   mask. The title and meta stay on the plain green, clear of the photograph,
   so their contrast never depends on the picture. The photo is content, so it
   needs real alt text. With no photograph, the badge takes its place. Always
   use it together with .on-accent-2, which makes links and focus rings gold
   (the default green would vanish on green). */
.post-hero{position:relative;overflow:hidden;display:flex;align-items:center;min-height:clamp(360px,44vw,540px);padding:var(--space-3xl) 0;background:var(--accent-2) url("../img/contours.svg") 0 0/960px 600px;color:var(--on-accent-2)}
.post-hero .wrap{position:relative;width:100%;display:flex;flex-direction:column}
.post-hero-img{position:absolute;top:0;right:0;width:58%;height:100%;object-fit:cover;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 45%);mask-image:linear-gradient(to right,transparent 0,#000 45%)}
.post-hero-text{position:relative;max-width:min(34em,42%)}
.post-hero h1{font-size:clamp(34px,5vw,68px);margin-bottom:var(--space-md)}
.post-hero .post-meta{color:var(--on-accent-2);margin-bottom:var(--space-md)}
.post-hero-badge{position:absolute;right:24px;top:50%;transform:translateY(-50%);width:clamp(120px,18vw,230px);height:auto}

/* Photo gallery: a grid of thumbnails, each linking to the full-size photo.
   Works without JavaScript. Used after the text, at full width. */
.gallery{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:var(--space-sm)}
/* Two across on a phone rather than one: the 180px minimum would give a single
   column of big thumbnails and a very long scroll. The thumb preset's sizes
   (45vw) assume two. */
@media (max-width:559px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
.gallery a{display:block;aspect-ratio:4/3;border:var(--border) solid var(--ink);border-radius:var(--radius);overflow:hidden;background:var(--line)}
.gallery img{width:100%;height:100%;object-fit:cover}
@media (prefers-reduced-motion:no-preference){.gallery img{transition:transform .2s}}
.gallery a:hover img{transform:scale(1.05)}
/* Inside .prose the list rules would indent the grid and push every
   thumbnail after the first down, so they are undone here. */
.prose .gallery{max-width:none;padding-left:0}
.prose .gallery li+li{margin-top:0}

/* Video: a 16:9 frame for the privacy-enhanced YouTube embed. */
.video{aspect-ratio:16/9;border:var(--border) solid var(--ink);border-radius:var(--radius);overflow:hidden;background:var(--ink);color:var(--white)}
.video iframe{display:block;width:100%;height:100%;border:0}

/* Video consent: the two-click player. Until the visitor presses Play, the frame
   holds only this panel and makes no request to YouTube (so the poster must be
   a local image, never a YouTube thumbnail). Pressing Play swaps the panel for
   the youtube-nocookie.com iframe. */
.video{position:relative}
.video-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.35}
.video-consent{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-sm);padding:var(--space-md);text-align:center}
.video-consent p{margin:0;max-width:34em}
.video-consent .btn{margin-top:var(--space-xs);background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.video-consent a{color:var(--accent)}
.prose .video{max-width:none}

/* Newer and older post, at the foot of a post. */
.post-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-lg);border-top:var(--border) solid var(--ink);padding-top:var(--space-lg)}
.post-nav a{display:block;color:inherit;text-decoration:none}
.post-nav .label{display:block;margin-bottom:var(--space-xs);font:var(--weight-bold) 13px/1 var(--font-body);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.post-nav .title{font:var(--weight-display) clamp(20px,2.4vw,28px)/1.1 var(--font-display)}
.post-nav a:hover .title{text-decoration:underline;text-decoration-thickness:4px;text-decoration-color:var(--accent-2)}
.post-nav .next{grid-column:2;text-align:right}

/* Tyre tracks: two parallel rows of chevron lugs crossing a gold .on-accent band
   from the bottom, about half way across, to the top right. Drawn for this site
   (not traced from any tyre). Used only on the Vehicles index and single vehicle
   titles. Content must sit above it, hence the .wrap rule. */
.tracks{position:relative;overflow:hidden}
.tracks::before{content:"";position:absolute;inset:0;background:url("../img/tracks.svg") right center/cover no-repeat;pointer-events:none}
.tracks>*{position:relative}

/* Byway trail: a faint line of dashes and crosses (the Ordnance Survey byway
   symbol) wandering across a green .on-accent-2 band. Used only on category
   and tag archive titles. It fades out on the left, where the title is. */
.trail{position:relative;overflow:hidden}
.trail::before{content:"";position:absolute;inset:0;background:url("../img/byway.svg") right center/cover no-repeat;-webkit-mask-image:linear-gradient(to right,transparent 30%,#000 62%);mask-image:linear-gradient(to right,transparent 30%,#000 62%);pointer-events:none}
.trail>*{position:relative}

/* Team members: a big photo with a name and a few words, side by side. Further
   photos sit underneath as small thumbnails. Every second member flips sides, as
   the post list does on Home. Stacks on a phone, photo first. */
.members>*+*{margin-top:var(--space-3xl)}
.member{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-2xl);align-items:start}
.member:nth-child(even) .member-photos{order:2}
.member-photos figure{margin:0}
.member-photos figure>a{display:block;border-radius:var(--radius)}
.member-photos figure img{width:100%;aspect-ratio:4/5;object-fit:cover;border:var(--border) solid var(--ink);border-radius:var(--radius)}
.member-photos figcaption{font-size:15px;color:var(--muted);margin-top:var(--space-sm)}
.member-photos .gallery{margin-top:var(--space-sm);grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}
.member h2{margin-bottom:var(--space-md)}
.member-text>*+*{margin-top:1em}

/* Vehicle cards: the index of vehicles. A two-column grid of whole-card links,
   each a photo, the vehicle's nickname in big slab type, and its model below.
   With an odd number of vehicles the last card spans the full width, so the
   grid never ends on a lonely half row. The page title above it is a gold
   .on-accent band, so this page looks different from Home (green) at a glance. */
.vehicle-grid{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-xl)}
.vehicle-grid>li:last-child:nth-child(odd){grid-column:1/-1}
.vehicle{display:flex;flex-direction:column;height:100%;background:var(--white);border:var(--border) solid var(--ink);border-radius:var(--radius);overflow:hidden;color:inherit;text-decoration:none}
.vehicle:hover{box-shadow:8px 8px 0 var(--ink);transform:translate(-4px,-4px)}
@media (prefers-reduced-motion:no-preference){.vehicle{transition:box-shadow .15s,transform .15s}}
.vehicle-photo{display:block;aspect-ratio:3/2;background:var(--line);border-bottom:var(--border) solid var(--ink)}
.vehicle-photo img{width:100%;height:100%;object-fit:cover}
.vehicle-grid>li:last-child:nth-child(odd) .vehicle-photo{aspect-ratio:21/9}
.vehicle-body{padding:var(--space-lg)}
.vehicle h2{font-size:clamp(30px,4vw,48px);margin-bottom:var(--space-xs)}
.vehicle .model{margin:0;color:var(--muted)}

/* Excursion crew: who went on a trip and in which vehicles, between a post's
   lead paragraph and its text. A white card with a gold title strip, like a
   logbook page. People are outlined tags (they are not links: the team has no
   author pages). Vehicles link to their own pages, each with a small photo,
   the nickname in slab type and the model below. Two columns, stacking on a
   phone. Comes from crew and vehicles in the post's front matter. */
.crew{margin:var(--space-xl) 0;border:var(--border) solid var(--ink);border-radius:var(--radius);background:var(--white);overflow:hidden}
.crew-head{background:var(--accent);color:var(--on-accent);border-bottom:var(--border) solid var(--ink);padding:var(--space-sm) var(--space-lg)}
.crew-head h2{font-size:clamp(22px,2.6vw,28px);margin:0}
.crew-body{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:var(--space-lg) var(--space-xl);padding:var(--space-lg)}
.crew h3{font:var(--weight-bold) 13px/1 var(--font-body);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 var(--space-md)}
.crew-vehicles{list-style:none;padding:0;display:grid;gap:var(--space-md)}
.crew-vehicles a{display:flex;align-items:center;gap:var(--space-md);color:inherit;text-decoration:none}
.crew-vehicles img{flex:none;width:64px;height:64px;object-fit:cover;border:2px solid var(--ink);border-radius:var(--radius);background:var(--accent-2)}
.crew-vehicles .nick{display:block;font:var(--weight-display) 22px/1.1 var(--font-display)}
.crew-vehicles .model{display:block;font-size:15px;color:var(--muted)}
.crew-vehicles a:hover .nick{text-decoration:underline;text-decoration-thickness:3px;text-decoration-color:var(--accent-2)}
/* Space between the lead, the crew card and the post text when they are
   separate blocks. */
.prose+.prose{margin-top:1.1em}

/* Footer credit, on the right of the footer line. Drops below the copyright
   line, still on the right, when there is no room beside it. */
footer .inner{display:flex;flex-wrap:wrap;gap:var(--space-sm) var(--space-xl)}
.footer-credit{margin:0 0 0 auto}

/* Page count between the Newer and Older buttons */
.pager .small{align-self:center}

@media (max-width:860px){
  .post-hero{display:block;min-height:0;padding:0 0 var(--space-xl)}
  .post-hero-img{position:static;display:block;width:100%;height:auto;aspect-ratio:16/9;-webkit-mask-image:linear-gradient(to bottom,#000 55%,transparent);mask-image:linear-gradient(to bottom,#000 55%,transparent)}
  .post-hero-text{max-width:none;padding-top:var(--space-md)}
  .post-hero-badge{position:static;transform:none;width:120px;order:-1;margin:var(--space-xl) 0 var(--space-md)}
}
@media (max-width:760px){
  .trail::before{-webkit-mask-image:linear-gradient(to right,transparent 48%,#000 72%);mask-image:linear-gradient(to right,transparent 48%,#000 72%)}
  /* One track is enough on a phone: hide the left-hand one. */
  .tracks::before{-webkit-mask-image:linear-gradient(to right,transparent 28%,#000 31%);mask-image:linear-gradient(to right,transparent 28%,#000 31%)}
  .video-consent{gap:var(--space-xs);padding:var(--space-sm);font-size:14px}
  .video-consent .btn{padding:10px 20px;font-size:16px}
  .member{grid-template-columns:1fr;gap:var(--space-lg)}
  .member:nth-child(even) .member-photos{order:0}
  .vehicle-grid{grid-template-columns:1fr;gap:var(--space-lg)}
  .vehicle-grid>li:last-child:nth-child(odd) .vehicle-photo{aspect-ratio:3/2}
}
@media (max-width:560px){
  .post-nav{grid-template-columns:1fr}
  .post-nav .next{grid-column:auto;text-align:left}
}

@media (max-width:760px){
  .hero::before{-webkit-mask-image:linear-gradient(to bottom,#000 10%,transparent 70%);mask-image:linear-gradient(to bottom,#000 10%,transparent 70%)}
  .hero .wrap{grid-template-columns:1fr}
  .hero img{width:140px;order:-1}
  .post-list>li.has-thumb{grid-template-columns:1fr;gap:var(--space-md)}
  .post-list>li.has-thumb:nth-child(even){text-align:left}
  .post-list>li.has-thumb:nth-child(even) .post-meta,.post-list>li.has-thumb:nth-child(even) .tags{justify-content:flex-start}
  .post-list>li.has-thumb:nth-child(even) .post-thumb{order:0}
  .post-thumb{aspect-ratio:16/9}
}


/* ==========================================================================
   PART 11: SMALL SCREENS
   ========================================================================== */

@media (max-width:760px){
  body{font-size:17px}
  section{padding:var(--space-2xl) 0}
  .bar nav{margin-left:0;width:100%}
  .cols{grid-template-columns:1fr;gap:40px}
}
@media (max-width:339px){.bar .brand span{display:none}}
