/* Homepage: Tile Hall.
   One whole-tile grid (--t). Panels sit on grout seams; JS snaps their heights to whole tiles. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext.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: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.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: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.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: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.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 {
  --glaze: #fbfbf9;       /* tile ground */
  --white: #ffffff;       /* raised tile */
  --grout: #e3e1dc;       /* seams */
  --grout-2: #f0d2bd;     /* seams inside the orange scene */
  --ink: #1a1a1a;
  --ink-2: #57544e;       /* secondary text, 7:1 on glaze */
  --orange: #ff6100;      /* brand, the only pigment */
  --orange-deep: #e05400; /* hover */
  --orange-ink: #a33e00;  /* orange as text, 5.9:1 on glaze */
  --wash: #fff1e6;        /* orange wash ground */
  --wash-2: #ffd9bf;
  --orange-2: #ff7a28;     /* the logo's lighter orange: what Human + AI adds to the scene */
  --blank: #8a8780;       /* dashed blank-tile line */
  --rule: #f5c4a2;        /* quiet frame line: orange thinned with glaze */
  --glaze-glass: rgb(251 251 249 / .62);   /* glaze over the tile floor: panels let the grid show through */
  --wash-glass: rgb(255 241 230 / .78);    /* wash over the tile floor */
  --grout-glass: rgb(120 90 60 / .12);     /* grout drawn over the scene's painted tiles */

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --t: 60px;              /* one tile */
  --bar: var(--t);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
  accent-color: var(--orange);
}

@media (max-width: 79.9375em) { :root { --t: 48px; } }
@media (max-width: 43.6875em)  { :root { --t: 32px; --bar: calc(var(--t) * 2); } }

:root {
  --c-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg%3E%3Cpath d='M1 17A16 16 0 0 1 17 1' fill='none' stroke='%23f5c4a2' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
  --c-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg transform='matrix(-1 0 0 1 28 0)'%3E%3Cpath d='M1 17A16 16 0 0 1 17 1' fill='none' stroke='%23f5c4a2' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
  --c-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg transform='matrix(1 0 0 -1 0 28)'%3E%3Cpath d='M1 17A16 16 0 0 1 17 1' fill='none' stroke='%23f5c4a2' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
  --c-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg transform='matrix(-1 0 0 -1 28 28)'%3E%3Cpath d='M1 17A16 16 0 0 1 17 1' fill='none' stroke='%23f5c4a2' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 0h16v16H0z M3.5 8.3l3 3 6-6.6' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E");
  --corners: var(--c-tl) top 12px left 12px / 20px no-repeat, var(--c-tr) top 12px right 12px / 20px no-repeat, var(--c-bl) bottom 12px left 12px / 20px no-repeat, var(--c-br) bottom 12px right 12px / 20px no-repeat;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + var(--t));
  scrollbar-color: var(--orange) var(--glaze);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--glaze);
  /* grout seams, centred so the hall (an even number of tiles) sits on them */
  background-image:
    linear-gradient(var(--grout) 1px, transparent 1px),
    linear-gradient(90deg, var(--grout) 1px, transparent 1px);
  background-size: var(--t) var(--t);
  background-position: calc(50% + var(--t) / 2) 0;
  caret-color: var(--orange);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 { font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(1.875rem, 3.2vw, 2.75rem); }
h3 { font-size: 1.3125rem; letter-spacing: -.01em; line-height: 1.2; }
p, li, dd { text-wrap: pretty; }
code { font-family: var(--mono); font-size: .9em; }

.defs { position: absolute; }

.skip {
  position: absolute; left: 1rem; top: -10rem; z-index: 50;
  background: var(--ink); color: var(--glaze); padding: .75rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---------- mode visibility ---------- */
html:not(.no-js)[data-mode="human"] .ai-only,
html:not(.no-js)[data-mode="human"] .for-ai,
html:not(.no-js)[data-mode="ai"] .for-human { display: none !important; }
.no-js [data-switch], .no-js .mode-note, .no-js .cartouche > span { display: none; }

/* ---------- placeholders: blank tiles awaiting their painter ---------- */
.ph {
  outline: 2px dashed var(--blank);
  outline-offset: 2px;
  background: var(--white);
  padding: 0 .25em;
}
.ph-mark {
  display: inline-flex; align-items: center;
  border: 2px dashed var(--blank);
  background: var(--white);
  padding: .15em .6em;
}

/* ---------- small parts ---------- */
.tag {
  display: inline-block;
  font: 700 .75rem/1 var(--mono);
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--ink);
  background: var(--orange);
  padding: .3em .45em .25em;
  vertical-align: .15em;
  font-style: normal;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: .6rem 1.25rem;
  background: var(--orange);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--orange);
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
  white-space: nowrap;
  max-width: 100%;
}
.btn:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding: .85rem 1.75rem; font-size: 1.125rem; }

/* ---------- the mode switch ---------- */
.mode-switch {
  display: inline-flex;
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--mono);
}
.mode-switch button {
  font: 700 .9375rem/1 var(--mono);
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: .9rem 1.15rem;
  min-height: 48px;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.mode-switch button + button { border-left: 2px solid var(--ink); }
.mode-switch button:hover { background: var(--wash); }
.mode-switch button[aria-checked="true"] { background: var(--orange); }
.mode-switch button:focus-visible { outline-offset: -6px; outline-width: 2px; }
.mode-switch.mini button { padding: .5rem .7rem; min-height: 36px; font-size: .8125rem; }

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--glaze);
  border-bottom: 1px solid var(--rule);
}
.bar-in {
  min-height: calc(var(--bar) - 1px); /* the bar's 1px rule completes the tile; grows only when visitors enlarge text */
  width: var(--hall);
  margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem;
}
.wordmark {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; text-decoration: none;   /* set like the h3s: tight, so a mixed-case name reads as one word-shape */
  flex: 0 1 auto; min-width: 0;   /* a long real name gives way before Email us does */
}
.nav { display: flex; gap: 1.75rem; margin-left: auto; font-size: .9375rem; }
.nav a { text-decoration: none; padding: .5rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="true"] { border-bottom-color: var(--orange); }
.bar .mode-switch { margin-left: auto; }
.nav + .mode-switch { margin-left: 0; }
.bar .btn { min-height: 40px; padding: .45rem 1rem; flex: none; }

/* ---------- spacer course under the header and above the footer ---------- */
.frieze {
  /* an empty course of tiles: spacing only, no ornament */
  height: var(--t);
}

/* ---------- the hall ---------- */
:root { --hall: calc(var(--t) * 22); }
@media (max-width: 86.1875em) { :root { --hall: round(down, calc(100vw - var(--t) * 2), calc(var(--t) * 2)); } }
@media (max-width: 43.6875em)  { :root { --hall: round(down, calc(100vw - 24px), calc(var(--t) * 2)); } }

.hall {
  width: var(--hall);
  margin-inline: auto;
  padding-block: 0 var(--t);
  display: grid;
  row-gap: var(--t);
}
.course { display: grid; column-gap: var(--t); row-gap: var(--t); }

.panel {
  position: relative;
  background: var(--corners), var(--glaze-glass);
  border: 1px solid var(--rule);
  padding: calc(var(--t) * .75);
}

/* hero */
.hero-course {
  grid-template-columns: minmax(0, 1fr) calc(var(--t) * 8);
  grid-template-areas: "panel scene" "index scene";
}
.hero {
  grid-area: panel;
  border-color: var(--orange);
  padding: calc(var(--t) * .6) calc(var(--t) * .75);
  display: flex; flex-direction: column; justify-content: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  line-height: .98;
  max-width: 11ch;
}
.lede { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); margin: 1rem 0 1.4rem; max-width: 38ch; text-wrap: balance; }
.mode-note { margin-top: .75rem; font-size: .9375rem; color: var(--ink-2); max-width: 46ch; }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.25rem; }
.addr { font-weight: 700; font-size: 1.125rem; text-decoration: none; }

.hero-index {
  grid-area: index;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  min-height: var(--t);
  border: 1px solid var(--rule);
  background: var(--white);
}
.hero-index a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: 0 1.1rem;
  font-weight: 700; text-decoration: none; line-height: 1.2;
}
.hero-index a + a { border-left: 1px solid var(--grout-2); }
.hero-index a::after {
  content: ""; flex: none; width: 14px; height: 14px; background: var(--orange-ink);
  -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat;
}
.hero-index a:hover { background: var(--wash); }
.hero-index .tag { margin-left: auto; }

.scene {
  grid-area: scene;
  display: flex; flex-direction: column;
  min-height: 0;
}
.tiles {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--t));
  grid-auto-rows: var(--t);
  overflow: hidden;
  background: var(--white);
  outline: 1px solid var(--grout-2);
}
.tile { position: relative; background: var(--white); }
.tile svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.tile .lay { position: absolute; inset: 0; transition: clip-path .7s var(--ease); transition-delay: var(--d, 0ms); }
.tile .lay-h { clip-path: inset(0 0 0 0); }
.tile .lay-a { clip-path: inset(0 0 100% 0); }
[data-mode="ai"] .tile .lay-h { clip-path: inset(100% 0 0 0); }
[data-mode="ai"] .tile .lay-a { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .tile .lay { transition: none; } }

.cartouche {
  flex: none;
  height: calc(var(--t) * 2);
  margin-top: 0;
  border: 1px solid var(--rule);
  border-top: 0;
  background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  font-weight: 800; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase;
}
.cartouche small { font-size: .9375rem; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--ink-2); }

/* panel heads */
.panel-head { max-width: 46rem; }
.panel-head > p { margin-top: .75rem; color: var(--ink-2); font-size: 1.125rem; }

/* services: one panel, three bays on the seams */
.bays {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: calc(var(--t) * .75);
  border-top: 1px solid var(--rule);
}
.bay { padding: 1.5rem 1.75rem 1.75rem 0; display: flex; flex-direction: column; gap: .85rem; }
.bay + .bay { padding-left: 1.75rem; border-left: 1px solid var(--grout); }
.bay h3 { font-size: clamp(1.375rem, 2vw, 1.625rem); }
.ai-line { font-size: .9688rem; padding: .75rem .9rem; background: var(--wash); border: 1px solid var(--wash-2); }
.ai-line .tag { margin-right: .35rem; }
.more { margin-top: auto; padding-top: .5rem; font-weight: 700; }
.policy {
  margin-top: 1.25rem; padding: 1rem 1.25rem;
  background: var(--white); border: 2px solid var(--grout);
}

/* stewardship: the deepened panel */
.steward {
  background: var(--corners), var(--wash-glass);
  border-color: var(--orange);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--t);
  align-items: start;
}
.steward .panel-head { grid-row: span 3; }
.tagline { font-size: clamp(1.375rem, 2.2vw, 1.75rem) !important; font-weight: 800; color: var(--ink) !important; letter-spacing: -.01em; }
.steward .aside { font-size: 1rem !important; border-top: 1px solid var(--wash-2); padding-top: .75rem; margin-top: 1.25rem !important; }
.stages, .steps { list-style: none; padding: 0; counter-reset: n; display: grid; gap: 0; }
.stages li, .steps li {
  counter-increment: n;
  display: grid; grid-template-columns: calc(var(--t) * 1) minmax(0, 1fr); column-gap: 1.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--wash-2);
}
.stages li:first-child, .steps li:first-child { border-top: 0; padding-top: 0; }
.stages li::before, .steps li::before {
  content: counter(n);
  grid-row: span 2;
  width: var(--t); height: var(--t);
  display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--rule);
  font-weight: 800; font-size: 1.5rem; color: var(--orange-ink);
}
.stages h3, .steps h3 { align-self: end; }
.stages p, .steps p { margin-top: .3rem; color: var(--ink-2); }
.steward .enter { grid-column: 2; margin-top: .25rem; font-weight: 700; }
.steward .btn { grid-column: 2; justify-self: start; margin-top: 1rem; }

/* how + review */
.how-course { grid-template-columns: minmax(0, 1fr) calc(var(--t) * 10); }
.how h2 { margin-bottom: calc(var(--t) * .6); }
.steps li { border-top-color: var(--grout); }

.review { display: flex; flex-direction: column; gap: 1rem; background-color: var(--white); }
.review-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; font: 500 .8125rem/1.3 var(--mono); }
.review-head .file { min-width: 0; overflow-wrap: anywhere; }
.illus { border: 1px solid var(--ink); padding: .25em .5em; font-weight: 700; }
.diff { font: .8125rem/1.7 var(--mono); border: 1px solid var(--grout); overflow-x: auto;
  display: grid; grid-template-columns: auto; }   /* every row as wide as the longest line, so tints and + markers scroll with the code */
.dl { position: relative; display: grid; grid-template-columns: 3ch 6ch 1fr; column-gap: 1ch; padding: 0 .75rem; white-space: pre; align-items: center; }
.dl span { color: var(--ink-2); text-align: right; }
.dl code { font-size: inherit; }
.dl.del { background: var(--glaze); }
.dl.del code { text-decoration: line-through; text-decoration-color: var(--ink-2); color: var(--ink-2); }
.dl.add { background: var(--wash); }
.dl.add code::before { content: "+"; position: absolute; margin-left: -1.1ch; color: var(--orange-ink); }
.dl code { grid-column: 3; }
.dl .tag { grid-column: 2; grid-row: 1; justify-self: start; }
.comment { border-left: 0; border: 1px solid var(--grout); padding: .9rem 1rem; font-size: .9375rem; background: var(--glaze); }
.comment .who { font: 500 .8125rem/1.4 var(--mono); color: var(--ink-2); margin-bottom: .35rem; }
.comment .who strong { color: var(--ink); }

/* examples: one illustrative piece of work per service, behind tabs; every panel shares one cell so switching never changes the height */
.ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; }
.ex-head .illus { font: 700 .8125rem/1.3 var(--mono); }
.ex-tabs { display: flex; flex-wrap: wrap; column-gap: 1.25rem; border-bottom: 1px solid var(--grout); }
.ex-tabs button {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0; margin-bottom: -1px;
  font: 700 .9375rem/1.2 var(--sans); color: var(--ink-2); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
}
.ex-tabs button:hover { color: var(--ink); }
.ex-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.ex-tabs button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.ex-stack { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.ex-panel { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; gap: .75rem; visibility: hidden; }
.ex-panel.on { visibility: visible; }
.no-js .ex-tabs { display: none; }
.no-js .ex-stack { gap: 2rem; }
.no-js .ex-panel { grid-area: auto; visibility: visible; }
.ex-cap { margin-top: auto; padding-top: .25rem; font-size: .9375rem; color: var(--ink-2); }
.doc { border: 1px solid var(--grout); background: var(--white); }
.doc-head { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .9rem; border-bottom: 1px solid var(--grout); background: var(--glaze); font: 500 .8125rem/1.4 var(--mono); color: var(--ink-2); }
.doc-head span:first-child { color: var(--ink); }
.doc .diff { border: 0; }
.doc-body { padding: .85rem 1rem; font-size: .9375rem; list-style: none; margin: 0; }
.rec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1rem; }
.rec dt { font-weight: 700; }
.rec dd { margin: 0; color: var(--ink-2); }
.plan { margin: 0; padding-left: 1.2rem; }
.checks li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: .65rem; align-items: start; padding: .4rem 0; border-top: 1px solid var(--grout); }
.checks li:first-child { border-top: 0; padding-top: 0; }
.checks li:last-child { padding-bottom: 0; }
.checks li::before { content: ""; width: 1rem; height: 1rem; margin-top: .2rem; background: var(--orange); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
.ticket-title { font-weight: 800; font-size: 1.125rem; }
.meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin-top: .6rem; }
.meta dt { color: var(--ink-2); }
.meta dd { margin: 0; font-weight: 700; }
.status { font: 700 .75rem/1 var(--mono); padding: .3em .5em; border: 1px solid var(--ink); }
.findings li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .75rem; padding: .35rem 0; }
.findings li:first-child { padding-top: 0; }
.findings li:last-child { padding-bottom: 0; }
.sev { font: 700 .75rem/1.6 var(--mono); color: var(--orange-ink); text-transform: uppercase; }

/* contact */
.contact, .cta {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "copy topics" "addr btn"; align-content: center;
  column-gap: var(--t); row-gap: 1.5rem;
  border-color: var(--orange);
}
/* The button leads; the address is the quieter fallback, on the same line as the button.
   The snap's extra height splits above and below the content, never between the topics and the button. */
.contact-act { display: contents; }
.contact-copy { grid-area: copy; }
.topics { grid-area: topics; }
.contact-act .btn { grid-area: btn; justify-self: start; align-self: center; }
.addr-row { grid-area: addr; align-self: center; }
.contact-copy p { margin-top: .9rem; font-size: 1.125rem; color: var(--ink-2); max-width: 30ch; }
.topics { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.topics legend { font-weight: 700; margin-bottom: .6rem; padding: 0; }
.topics label {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .5rem .9rem;
  border: 2px solid var(--grout); background: var(--white);
  cursor: pointer; font-size: .9688rem;
}
.topics label:hover { border-color: var(--orange); }
.topics label:has(input:checked) { border-color: var(--orange); background: var(--wash); }
.topics input { width: 1.05rem; height: 1.05rem; margin: 0; }
.topics label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.addr-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.addr-big { font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
.copy {
  font: 700 .875rem/1 var(--sans);
  min-height: 44px; padding: .6rem .9rem;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--grout); cursor: pointer;
}
.copy:hover { border-color: var(--orange); background: var(--wash); }
.copy:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.copied { font-size: .9375rem; font-weight: 700; color: var(--ink-2); min-width: 6ch; }

/* footer */
.foot { margin-top: 0; }
.foot-in {
  width: var(--hall); margin-inline: auto;
  padding: calc(var(--t) * .5) 0 var(--t);
  display: grid; gap: .6rem;
  font-size: .9375rem; color: var(--ink-2);
}
.foot-in .ph { justify-self: start; }

/* ---------- recomposition by whole tiles ---------- */
@media (max-width: 79.9375em) {
  .nav { gap: 1.25rem; }
  .bays { grid-template-columns: minmax(0, 1fr); }
  .bay, .bay + .bay { padding: 1.4rem 0; border-left: 0; }
  .bay + .bay { border-top: 1px solid var(--grout); }
  .how-course { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 56.25em) and (max-width: 79.9375em) {
  .bays { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bay { padding: 1.4rem 1.25rem 1.4rem 0; }
  .bay + .bay { padding: 1.4rem 1.25rem; border-left: 1px solid var(--grout); border-top: 0; }
  .bay:last-child { padding-right: 0; }
}
/* beside the scene the index is too narrow for four labels: with the AI entry it takes two tile rows of two */
@media (min-width: 68.75em) and (max-width: 89.9375em) {
  [data-mode="ai"] .hero-index { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: calc(var(--t) - 1px); }   /* two rows plus the 1px frame make exactly two tiles */
  [data-mode="ai"] .hero-index a:nth-child(odd) { border-left: 0; }
  [data-mode="ai"] .hero-index a:nth-child(n+3) { border-top: 1px solid var(--grout-2); }
}
@media (max-width: 68.6875em) {
  .nav { display: none; }
  .hero-course { grid-template-columns: minmax(0, 1fr); grid-template-areas: "panel" "index" "scene"; }
  .scene { height: calc(var(--t) * 7); }
  .steward { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .contact, .cta { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "topics" "btn" "addr"; }
  .steward .panel-head { grid-row: auto; }
  .steward .enter, .steward .btn { grid-column: 1; }
}
@media (max-width: 43.6875em) {
  body { font-size: 1rem; }
  .bar-in { gap: .75rem; }
  .wordmark { font-size: 1rem; }
  .bar .btn { min-height: 44px; }
  .bar [data-switch] { display: none; }   /* phones: the header keeps Email us; the mode is set by the hero switch */
  .panel { padding: 1.5rem 1.25rem; }
  .hero { padding: 1.75rem 1.4rem; }
  .lede { margin: 1rem 0 1.4rem; }
  .mode-switch button { padding: .85rem .9rem; font-size: .875rem; }
  .hero-index { grid-auto-flow: row; grid-auto-rows: minmax(calc(var(--t) * 1.5), auto); min-height: 0; }   /* 48px rows for touch; snap stretches them to the tile */
  .btn-lg { width: 100%; white-space: normal; text-align: center; text-wrap: balance; padding-inline: 1rem; }
  .hero-index a + a { border-left: 0; border-top: 1px solid var(--grout-2); }
  .scene { height: calc(var(--t) * 9); }
  .cartouche { font-size: 1rem; }
  .stages li, .steps li { grid-template-columns: calc(var(--t) * 1.25) minmax(0, 1fr); column-gap: 1rem; }
  .stages li::before, .steps li::before { width: calc(var(--t) * 1.25); height: calc(var(--t) * 1.25); margin-left: 0; font-size: 1.25rem; }
}

/* fixes after first look */
[hidden] { display: none !important; }
.hero .mode-switch { align-self: flex-start; }
.tiles { flex: 1 1 0; min-height: 0; }
.wordmark { margin-right: auto; }
.nav { margin-left: 0; }
.bar .mode-switch, .nav + .mode-switch { margin-left: 0; }
.cartouche { padding: .75rem 1rem; }
.diff { padding: .5rem 0; background: var(--white); }
.dl { padding-block: .1rem; }
.review { font-size: 1rem; }
.diff { font-size: .875rem; }

/* cartouche: the scene's caption, a plain tile course in the quiet rule */
.cartouche > * { position: relative; }
.cartouche > span { color: var(--orange-ink); }

/* AI-only content sets in with a wash; it lifts out instantly */
@keyframes glaze-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.glaze-in { animation: glaze-in .6s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .glaze-in { animation: none; } }

/* ---------- logo ---------- */
.wordmark { display: inline-flex; align-items: center; gap: .6rem; }
.wordmark .logo { width: calc(var(--t) * 2 / 3); height: calc(var(--t) * 2 / 3); flex: none; }
.wordmark span { min-width: 0; line-height: 1.1; text-wrap: balance; }   /* wraps to two lines inside the bar's tile, never under the button */
.wordmark.ph-mark { border: 0; padding: 0; }
.wordmark.ph-mark span { border: 2px dashed var(--blank); padding: .1rem .5rem; }

/* ---------- scene art: one pattern per page (see site.js), styled at their source; <use> clones inherit these ---------- */
.tile::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--grout-glass); pointer-events: none; }   /* grout over the painted waves, as on real tiles */
.art .wave { fill: none; stroke: var(--orange); stroke-width: 6; }
.art .wave-ai { fill: none; stroke: var(--orange-2); stroke-width: 6; }
.art .knot { fill: var(--orange); }
.art .knot-ai { fill: var(--orange-2); }
.art .ring { fill: none; stroke: var(--orange); stroke-width: 6; }
.art .wave, .art .wave-ai { stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 43.6875em) {
  /* phones: labels sit above their text, and the panel sizes to the visible example only */
  .rec { grid-template-columns: minmax(0, 1fr); row-gap: .15rem; }
  .rec dd + dt { margin-top: .55rem; }
  .doc-head { flex-wrap: wrap; row-gap: 0; }
  .ex-panel { display: none; }
  .ex-panel.on { display: flex; }
}

/* links out to the service pages */
.ex-cap a { font-weight: 700; white-space: nowrap; margin-left: .25rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: .4rem; font-weight: 700; color: var(--ink); }
.hero-index a::after { transform: rotate(-90deg); }   /* leads to a page now, not down the page */
@media (max-width: 43.6875em) {
  .foot-nav { row-gap: 0; }
  .foot-nav a { padding-block: .6875rem; }   /* 44px touch rows */
}
/* phones with enlarged text: 20em is 320px at the default size but 640px at 200% text, so ordinary phones never see this; it lets the last nowrap pieces wrap */
@media (max-width: 20em) {
  .ex-cap a, .ph { white-space: normal; overflow-wrap: anywhere; }
  .topics label { flex-wrap: wrap; }
  h1, h2, h3 { hyphens: auto; overflow-wrap: break-word; }
  .hero-index a, .others a { flex-wrap: wrap; }
  .btn { white-space: normal; text-align: center; }
}
