/* Tess Brading portfolio
   Layout idea: a paper-cut "happy place" sets the mood up top; everything below is
   built from the same handful of tokens, so choosing a place re-themes the whole site. */
:root {
  --bg: #f3f6ea; --surface: #ffffff; --ink: #27193a; --ink-soft: #594c6d; --line: #d5dbc4;
  --a1: #c42d61; --a1-ink: #ffffff;         /* primary accent: buttons, links */
  --a2: #f2b233; --a3: #2e8b6a; --a4: #4f9bd9; /* supporting colours: scene, covers, tags */
  --sky-1: #cfe9f5; --sky-2: #f6f3d7;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, "Segoe UI", sans-serif;
  --scale: 1; --radius: 22px; --radius-s: 12px; --gutter: clamp(16px, 4vw, 40px); --max: 1180px;
  --shadow: 0 1px 0 color-mix(in srgb, var(--ink) 12%, transparent), 0 14px 30px -18px color-mix(in srgb, var(--ink) 45%, transparent);
  color-scheme: light;
}
:root[data-place="shore"] {
  --bg: #ecf5f6; --surface: #ffffff; --ink: #14324a; --ink-soft: #45607a; --line: #c7dde0;
  --a1: #0b7281; --a1-ink: #ffffff; --a2: #f3c260; --a3: #e9735c; --a4: #4b9fd4;
  --sky-1: #bfe6ef; --sky-2: #fdf1d3;
}
:root[data-place="sunset"] {
  --bg: #fbeee6; --surface: #fffaf6; --ink: #38162f; --ink-soft: #6b4660; --line: #ecd3c5;
  --a1: #8a2f86; --a1-ink: #ffffff; --a2: #f6a437; --a3: #d9502f; --a4: #e8607a;
  --sky-1: #f9b98a; --sky-2: #fde5b8;
}
:root[data-place="night"] {
  --bg: #171329; --surface: #221c3a; --ink: #f3efff; --ink-soft: #bcb3d9; --line: #3b3261;
  --a1: #ffbd59; --a1-ink: #1b1430; --a2: #ffd97a; --a3: #55c9a0; --a4: #7fb4ff;
  --sky-1: #1c1740; --sky-2: #3a2b66;
  color-scheme: dark;
}
:root[data-text="l"] { --scale: 1.125; }
:root[data-text="xl"] { --scale: 1.25; }
:root[data-spacing="wide"] body { letter-spacing: 0.04em; word-spacing: 0.12em; line-height: 1.85; }

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(106.25% * var(--scale)); scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.6;
  transition: background-color .5s, color .5s; overflow-x: hidden; }
img, svg, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; text-wrap: balance; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
p { margin: 0; }
a { color: var(--a1); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { text-decoration-style: wavy; }
:focus-visible { outline: 3px solid var(--a4); outline-offset: 3px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eyebrow { font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.stack { display: grid; gap: 1rem; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { display: grid; gap: .8rem; margin-bottom: clamp(28px, 4vw, 48px); max-width: 780px; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.25em; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--a1); color: var(--a1-ink); font-weight: 700; text-decoration: none; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.small { padding: .5em .95em; font-size: .92rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.chip { display: inline-flex; align-items: center; gap: .4em; padding: .28em .8em; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.arrow { display: inline-block; transition: transform .2s; }
a:hover .arrow, .card:hover .arrow { transform: translateX(5px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; padding-block: 12px; }
.site-header .bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 18px; border-radius: 999px; border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .5em; margin-right: auto; white-space: nowrap; }
.brand .dot { width: 16px; height: 16px; border-radius: 50% 50% 50% 6px; background: var(--a2); border: 2px solid var(--ink); transition: transform .4s; }
.brand:hover .dot { transform: rotate(180deg) scale(1.15); }
.nav { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .45em .85em; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; }
.nav a:hover { background: color-mix(in srgb, var(--a2) 35%, transparent); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.icon-btn { display: inline-flex; align-items: center; gap: .45em; padding: .45em .9em; border-radius: 999px; border: 2px solid var(--ink); background: var(--a2); color: #27193a; font-weight: 700; font-size: .92rem; }
.menu-btn { display: none; background: var(--surface); color: var(--ink); }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 2px); flex-direction: column; gap: 4px; padding: 12px;
    background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: .8em 1em; font-size: 1.05rem; }
  .icon-btn .label { display: none; }
}

/* Comfort panel */
.comfort { position: fixed; z-index: 60; right: var(--gutter); top: 84px; width: min(340px, calc(100% - 2 * var(--gutter))); padding: 20px; border-radius: var(--radius);
  border: 2px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); display: grid; gap: 16px; }
.comfort[hidden] { display: none; }
/* Compact panel that never exceeds the window: it scrolls inside itself when it has to */
.comfort { top: 78px; width: min(330px, calc(100% - 2 * var(--gutter))); padding: 12px 14px; gap: 9px; font-size: .84rem; line-height: 1.3;
  max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; overscroll-behavior: contain; }
.comfort h2 { font-size: 1.02rem; }
.comfort .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comfort .stackrow { display: grid; gap: 5px; }
.comfort small { display: block; font-size: .76rem; font-weight: 400; color: var(--ink-soft); }
.comfort .seg { gap: 4px; }
.comfort .row .seg { flex: none; flex-wrap: nowrap; }
.comfort .seg-grid { display: grid; grid-template-columns: 1fr 1fr; }
.comfort .seg button { min-height: 32px; padding: .2em .65em; font-size: .8rem; border-radius: 9px; border-width: 1.5px; border-color: var(--ink-soft); }
.comfort .mini { width: 30px; height: 30px; }
.seg button:disabled { opacity: .55; cursor: default; }
.comfort fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.comfort legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; padding: .5em .7em; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); font-weight: 600; font-size: .9rem; min-height: 44px; }
.seg button[aria-pressed="true"] { border-color: var(--ink); background: var(--a2); color: #27193a; }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1.5px solid currentColor; vertical-align: -2px; margin-right: 4px; }

/* Hero and scene */
.hero { padding-top: clamp(20px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 .swash { color: var(--a1); display: inline-block; position: relative; }
.hero h1 .swash::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.06em; height: .16em; border-radius: 99px; background: var(--a2); z-index: -1; transform: rotate(-1.2deg); }
.hero-copy { display: grid; gap: 22px; }
.scene-card { position: relative; border-radius: 34px; border: 2px solid var(--ink); overflow: hidden; box-shadow: 8px 8px 0 var(--ink); background: var(--sky-2); }
.scene { width: 100%; height: auto; aspect-ratio: 5 / 4; touch-action: manipulation; cursor: copy; display: block; }
.scene .layer { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.scene .l1 { transform: translate(calc(var(--px, 0) * 5px), calc(var(--py, 0) * 3px)); }
.scene .l2 { transform: translate(calc(var(--px, 0) * 11px), calc(var(--py, 0) * 5px)); }
.scene .l3 { transform: translate(calc(var(--px, 0) * 20px), calc(var(--py, 0) * 8px)); }
.scene [data-only] { opacity: 0; transition: opacity .6s; }
:root:not([data-place]) .scene [data-only~="meadow"], :root[data-place="meadow"] .scene [data-only~="meadow"],
:root[data-place="shore"] .scene [data-only~="shore"], :root[data-place="sunset"] .scene [data-only~="sunset"],
:root[data-place="night"] .scene [data-only~="night"] { opacity: 1; }
.scene .sun { transition: transform 1s cubic-bezier(.3, 1.4, .5, 1), fill .5s; transform-box: fill-box; transform-origin: center; }
:root[data-place="sunset"] .scene .sun { transform: translate(-150px, 150px) scale(1.7); }
:root[data-place="shore"] .scene .sun { transform: translate(-40px, 20px) scale(1.1); }
:root[data-place="night"] .scene .sun { transform: translate(10px, -10px) scale(.8); fill: #fff6d6; }
.scene * { transition: fill .5s, stroke .5s; }
.planted { transform-box: fill-box; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) .planted { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
  :root:not([data-motion="off"]) .sway { animation: sway 6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
  :root:not([data-motion="off"]) .drift { animation: drift 26s linear infinite alternate; }
  :root:not([data-motion="off"]) .twinkle { animation: twinkle 3s ease-in-out infinite alternate; }
}
@keyframes pop { from { transform: scale(0) rotate(-20deg); } }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes drift { from { transform: translateX(-18px); } to { transform: translateX(26px); } }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
.scene-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-top: 2px solid var(--ink); background: var(--surface); }
.scene-bar .q { font-family: var(--font-display); font-weight: 700; margin-right: auto; }
.place-btn { padding: .4em .8em; min-height: 40px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg); font-weight: 600; font-size: .9rem; }
.place-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--a2); color: #27193a; }
.scene-note { margin-top: 14px; font-size: .92rem; color: var(--ink-soft); max-width: 52ch; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Marquee of recognition */
.kudos { border-block: 2px solid var(--ink); background: var(--surface); }
.kudos ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; }
.kudos li { padding: 22px var(--gutter); display: grid; gap: 4px; border-left: 2px solid var(--line); }
.kudos li:first-child { border-left: 0; }
.kudos strong { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.15; }
.kudos span { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 700px) { .kudos li { border-left: 0; border-top: 2px solid var(--line); } .kudos li:first-child { border-top: 0; } }

/* Practice strands */
.strands { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.strand { position: relative; display: grid; gap: 12px; align-content: start; padding: 26px; border-radius: var(--radius); border: 2px solid var(--ink);
  background: var(--surface); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.strand:nth-child(1) { --tone: var(--a3); } .strand:nth-child(2) { --tone: var(--a1); } .strand:nth-child(3) { --tone: var(--a4); }
.strand::before { content: ""; width: 54px; height: 54px; border-radius: 50% 50% 50% 12px; background: var(--tone); border: 2px solid var(--ink); transition: border-radius .4s, transform .4s; }
.strand:nth-child(2)::before { border-radius: 14px; transform: rotate(8deg); }
.strand:nth-child(3)::before { border-radius: 50%; }
.strand:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; }
.strand:hover::before { border-radius: 50%; transform: rotate(-12deg) scale(1.08); }
.strand p { color: var(--ink-soft); }
.strand .more { font-weight: 700; color: var(--a1); }

/* Project cards and covers */
.cover { position: relative; aspect-ratio: 16 / 10; border-radius: calc(var(--radius) - 6px); overflow: hidden; border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--tone, var(--a2)) 30%, var(--surface)); }
.cover svg.motif { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.motif .m1 { fill: var(--tone); } .motif .m2 { fill: var(--ink); } .motif .m3 { fill: var(--surface); } .motif .m4 { fill: var(--a2); }
.motif .ms { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.card .motif > * { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: center; }
.card:hover .motif > :nth-child(odd) { transform: translateY(-6px) rotate(4deg); }
.card:hover .motif > :nth-child(even) { transform: translateY(5px) rotate(-3deg); }
.tone-a1 { --tone: var(--a1); } .tone-a2 { --tone: var(--a2); } .tone-a3 { --tone: var(--a3); } .tone-a4 { --tone: var(--a4); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.card { position: relative; display: grid; gap: 14px; align-content: start; padding: 14px 14px 20px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface);
  transition: transform .2s, box-shadow .2s; }
.card:hover, .card:focus-within { transform: translateY(-4px) rotate(-.4deg); box-shadow: 7px 7px 0 var(--ink); }
.card-body { display: grid; gap: 8px; padding-inline: 8px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card .kicker { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); display: flex; gap: .6em; align-items: center; }
.badge { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15em .6em; border-radius: 6px; background: var(--a2); color: #27193a; border: 1.5px solid var(--ink); }
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(16px, 2.5vw, 28px); }
.feature:nth-child(even) .cover { order: 2; }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.08; }
.feature .card-body { gap: 14px; }
.features { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature:nth-child(even) .cover { order: 0; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root:not([data-motion="off"]):not([data-scroll="off"]) .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}
@keyframes rise { from { transform: translateY(40px) rotate(1.2deg) scale(.97); } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; align-items: center; }
.filter { padding: .55em 1em; min-height: 44px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); font-weight: 700; font-size: .95rem; transition: transform .15s; }
.filter:hover { transform: translateY(-2px); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filter .n { opacity: .65; font-weight: 600; margin-left: .3em; }
.count { margin-left: auto; color: var(--ink-soft); font-size: .92rem; }
[data-item][hidden] { display: none; }

/* Playground teaser and callouts */
.callout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: 34px; border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--a2) 45%, var(--surface)); box-shadow: 8px 8px 0 var(--ink); }
:root[data-place="night"] .callout { background: color-mix(in srgb, var(--a4) 22%, var(--surface)); }
.callout p { max-width: 58ch; }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }
.about { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.portrait { aspect-ratio: 1; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; border: 2px solid var(--ink); overflow: hidden; background: color-mix(in srgb, var(--a4) 40%, var(--surface)); box-shadow: 8px 8px 0 var(--a2); position: relative; }
.portrait img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.portrait .initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 4rem; }
@media (max-width: 700px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 220px; } }

/* Case study */
.case-hero { padding-block: clamp(24px, 5vw, 56px) 0; display: grid; gap: 28px; }
.case-hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); }
.case-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.facts { display: grid; gap: 0; margin: 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.facts dt { font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding-top: .15em; }
.facts dd { margin: 0; }
.highlights { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.highlights li { padding: .5em 1em; border-radius: 14px; border: 2px solid var(--ink); background: color-mix(in srgb, var(--tone) 28%, var(--surface)); font-weight: 600; font-size: .95rem; }
.case-cover { aspect-ratio: 21 / 9; border-radius: 34px; box-shadow: 8px 8px 0 var(--ink); }
@media (max-width: 760px) { .case-top { grid-template-columns: 1fr; } .case-cover { aspect-ratio: 16 / 10; } }
.case-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 100px; display: grid; gap: 4px; list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: .5em .9em; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; border: 2px solid transparent; }
.toc a:hover { border-color: var(--line); }
.toc a.active { background: var(--ink); color: var(--bg); }
@media (max-width: 860px) {
  .case-body { grid-template-columns: 1fr; }
  .toc { position: sticky; top: 76px; z-index: 5; display: flex; overflow-x: auto; padding: 6px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; }
  .toc a { white-space: nowrap; }
}
.case-section { padding-bottom: clamp(40px, 6vw, 72px); display: grid; gap: 22px; }
.case-section > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); display: flex; align-items: center; gap: .5em; }
.case-section > h2::before { content: ""; width: .7em; height: .7em; border-radius: 50% 50% 50% 4px; background: var(--tone); border: 2px solid var(--ink); flex: none; }
.prose { display: grid; gap: 1em; max-width: 68ch; }
.prose h3 { margin-top: .9em; font-size: 1.3rem; }
.prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: .5em; }
.prose li::marker { color: var(--a1); }
.todo-note { padding: 14px 16px; border-radius: var(--radius-s); border: 2px dashed var(--ink-soft); background: color-mix(in srgb, var(--a2) 18%, var(--surface)); font-size: .95rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; background: color-mix(in srgb, var(--ink) 9%, transparent); padding: .1em .35em; border-radius: 6px; overflow-wrap: anywhere; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.shot { display: block; width: 100%; padding: 0; border: 2px solid var(--ink); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); position: relative; aspect-ratio: 4 / 3; transition: transform .2s, box-shadow .2s; }
.shot:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 5px 5px 0 var(--ink); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot.wide { aspect-ratio: auto; }
.shot.wide img { height: auto; }
.missing { display: grid; place-items: center; text-align: center; gap: 4px; padding: 14px; aspect-ratio: 4 / 3; border: 2px dashed var(--ink-soft); border-radius: var(--radius-s);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--tone, var(--a2)) 16%, transparent) 14px 28px); color: var(--ink-soft); font-size: .82rem; }
.missing b { color: var(--ink); font-size: .9rem; }
.missing small { overflow-wrap: anywhere; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.media-card { display: grid; gap: 10px; text-align: left; padding: 10px 10px 14px; border-radius: var(--radius-s); border: 2px solid var(--ink); background: var(--surface); width: 100%; transition: transform .2s, box-shadow .2s; }
.media-card:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 var(--ink); }
.media-card .cover { aspect-ratio: 16 / 9; border-radius: 8px; }
.media-card .play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: var(--a2); border: 2px solid #27193a; display: grid; place-items: center; }
.media-card .play::after { content: ""; border-left: 16px solid #27193a; border-block: 10px solid transparent; margin-left: 4px; }
.media-card b { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.2; }
.media-card span { font-size: .88rem; color: var(--ink-soft); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 2px solid var(--ink); padding-block: 28px; }
.pager a { display: grid; gap: 2px; text-decoration: none; color: var(--ink); padding: 14px 18px; border-radius: var(--radius-s); }
.pager a:hover { background: var(--surface); }
.pager a:last-child { text-align: right; }
.pager small { color: var(--ink-soft); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; }
.pager b { font-family: var(--font-display); font-size: 1.2rem; }

/* Dialogs */
dialog.viewer { border: 2px solid var(--ink); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--ink); width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 10px 10px 0 var(--ink); }
dialog.viewer::backdrop { background: color-mix(in srgb, #1b1430 72%, transparent); }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 2px solid var(--ink); }
.viewer-bar b { margin-right: auto; font-family: var(--font-display); }
.viewer-stage { background: #120e20; display: grid; place-items: center; }
.viewer-stage img { max-height: calc(100dvh - 140px); width: auto; }
.viewer-stage video { width: 100%; max-height: calc(100dvh - 140px); }
.viewer-stage iframe { width: 100%; height: min(72dvh, 720px); border: 0; background: #fff; }
.viewer-cap { padding: 10px 18px; font-size: .9rem; color: var(--ink-soft); }
.viewer-cap:empty { display: none; }

/* Forms */
.form { display: grid; gap: 16px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field input, .field textarea, .field select { padding: .75em .9em; border-radius: var(--radius-s); border: 2px solid var(--ink); background: var(--surface); width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.form-status { font-weight: 600; min-height: 1.5em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.lock { display: grid; gap: 18px; padding: clamp(22px, 4vw, 40px); border-radius: 34px; border: 2px solid var(--ink); background: var(--surface); box-shadow: 8px 8px 0 var(--ink); max-width: 620px; }
.lock .row { display: flex; gap: 10px; flex-wrap: wrap; }
.lock input { flex: 1 1 200px; padding: .75em .9em; border-radius: 999px; border: 2px solid var(--ink); background: var(--bg); }

/* Theme Studio: a working model of the Rise CSS Customizer editor beside a mock lesson */
.studio { display: grid; grid-template-columns: minmax(0, 410px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .studio { grid-template-columns: 1fr; } }
.mini { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--ink); background: var(--surface); font-weight: 700; display: grid; place-items: center; }
.mini:disabled { opacity: .35; cursor: default; }

/* The editor keeps its own fixed look (it models a real product), whatever place the site is set to */
.rce { --c-chrome: #0A2A2E; --c-chrome-fg: #E7EFEF; --c-mu: #A9B8BA; --c-ground: #CBD7D9; --c-plate: #fff; --c-tint: #ECF1F1; --c-rule: #C2D0D2; --c-rule2: #7C9597;
  --c-ink: #061A1B; --c-soft: #454E4E; --c-teal: #134B50; --c-plum: #7A2C47; --c-amber: #DE8618;
  border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--c-ground); color: var(--c-ink);
  font-size: .88rem; line-height: 1.45; letter-spacing: 0; word-spacing: 0; box-shadow: 8px 8px 0 var(--ink); position: relative; color-scheme: light; }
.rce :focus-visible { outline: 3px solid var(--c-amber); outline-offset: 2px; border-radius: 4px; }
.rce-head { background: var(--c-chrome); color: var(--c-chrome-fg); padding: 14px 16px 10px; display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.rce-head b { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.rce-head span { color: var(--c-mu); font-size: .8rem; }
.rce-head .rce-ver { font-family: ui-monospace, Consolas, monospace; font-size: .7rem; border: 1px solid var(--c-mu); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.rce-tabs { background: var(--c-chrome); display: flex; gap: 2px; padding: 0 8px; overflow-x: auto; scrollbar-width: thin; }
.rce-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--c-mu); padding: 10px 9px; font-size: .82rem; font-weight: 600; white-space: nowrap; min-height: 44px; }
.rce-tabs button:hover { color: var(--c-chrome-fg); }
.rce-tabs button[aria-selected="true"] { color: var(--c-chrome-fg); border-bottom-color: var(--c-amber); }
.rce-status { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--c-tint); border-bottom: 1px solid var(--c-rule); font-size: .8rem; }
.rce-dot { width: 9px; height: 9px; border-radius: 50%; background: #2e8b57; flex: none; }
.rce-status.is-preview .rce-dot { background: var(--c-amber); }
.rce-status #rce-status { flex: 1; }
.rce-q { background: var(--c-plate); border: 1px solid var(--c-rule2); border-radius: 7px; padding: 4px 10px; font-size: .78rem; font-weight: 600; min-height: 32px; color: var(--c-ink); }
.rce-q:disabled { opacity: .45; cursor: default; }
.rce-main { padding: 12px; display: grid; gap: 12px; max-height: min(620px, calc(100vh - 340px)); min-height: 220px; overflow-y: auto; }
@media (min-width: 981px) { .rce { position: sticky; top: 96px; } }
@media (max-width: 980px) { .rce-main { max-height: 460px; } }
.rce-plate { background: var(--c-plate); border-radius: 10px; padding: 14px; display: grid; gap: 10px; box-shadow: 0 1px 2px #0000000f, 0 8px 18px #0000000d; }
.rce-main, .rce-plate, .rce-layer, .rce-layers, .rce-themes { grid-template-columns: minmax(0, 1fr); }
.rce-layer-top > span:nth-child(2) { min-width: 0; }
.rce-main > div { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.rce-eyebrow { font-family: ui-monospace, Consolas, monospace; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-soft); }
.rce h3 { font-size: 1.05rem; letter-spacing: 0; color: var(--c-ink); }
.rce h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-soft); margin-top: 6px; }
.rce-help { font-size: .78rem; color: var(--c-soft); }
.rce-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.rce-row label { font-size: .85rem; }
.rce-colour { display: flex; gap: 6px; align-items: center; }
.rce-colour input[type="color"] { width: 38px; height: 32px; padding: 1px; border: 1px solid var(--c-rule2); border-radius: 6px; background: #fff; }
.rce-colour code { font-size: .74rem; min-width: 5.2em; color: var(--c-soft); }
.rce-check { display: flex; gap: 8px; align-items: start; font-size: .85rem; min-height: 28px; }
.rce-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--c-teal); flex: none; }
.rce-sub { margin-left: 25px; display: grid; gap: 6px; }
.rce-slider { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: .82rem; }
.rce-slider input[type="range"] { width: 100%; accent-color: var(--c-teal); }
.rce-slider output { font-family: ui-monospace, Consolas, monospace; font-size: .76rem; min-width: 3.4em; text-align: right; }
.rce select { padding: 5px 8px; border: 1px solid var(--c-rule2); border-radius: 6px; background: #fff; font-size: .82rem; max-width: 100%; min-height: 32px; }
.rce-tag { font-family: ui-monospace, Consolas, monospace; font-size: .66rem; border-radius: 99px; padding: 1px 7px; border: 1px solid currentColor; white-space: nowrap; }
.rce-tag.rec { color: #1d5b33; } .rce-tag.adj { color: var(--c-plum); } .rce-tag.type { color: var(--c-teal); }
.rce-report { display: grid; gap: 4px; margin-top: 4px; }
.rce-report li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; font-size: .78rem; padding: 5px 6px; border-radius: 6px; background: var(--c-tint); }
.rce-report ul, .rce-layers, .rce-themes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rce-sw { width: 26px; height: 22px; border-radius: 5px; border: 1px solid var(--c-rule2); display: grid; place-items: center; font-weight: 700; font-size: .78rem; }
.rce-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: end; }
.rce-b { font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.rce-b.ok { background: #d9efdf; color: #14502a; } .rce-b.no { background: #f6dada; color: #7c1d1d; }
.rce-layers, .rce-themes { gap: 8px; }
.rce-layer { background: var(--c-plate); border: 1px solid var(--c-rule); border-left: 4px solid var(--c-teal); border-radius: 8px; padding: 9px 10px; display: grid; gap: 6px; }
.rce-layer.off { border-left-color: var(--c-rule2); } .rce-layer.off .rce-layer-name { color: var(--c-soft); text-decoration: line-through; }
.rce-layer-top { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.rce-layer-top input { width: 17px; height: 17px; accent-color: var(--c-teal); }
.rce-layer-name { font-weight: 700; font-size: .88rem; }
.rce-layer-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .72rem; color: var(--c-soft); }
.rce-layer-btns { display: flex; gap: 4px; }
.rce-layer details summary { font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--c-teal); }
.rce pre { margin: 6px 0 0; padding: 9px 10px; background: var(--c-chrome); color: var(--c-chrome-fg); border-radius: 6px; font-size: .72rem; line-height: 1.5; overflow-x: auto; max-height: 190px; }
.rce-theme { background: var(--c-plate); border: 1px solid var(--c-rule); border-radius: 8px; padding: 9px 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.rce-theme i { display: flex; } .rce-theme i span { width: 14px; height: 26px; display: block; border: 1px solid #0002; }
.rce-theme i span:first-child { border-radius: 5px 0 0 5px; } .rce-theme i span:last-child { border-radius: 0 5px 5px 0; }
.rce-theme b { display: block; font-size: .86rem; } .rce-theme small { color: var(--c-soft); font-size: .74rem; }
.rce-empty { font-size: .82rem; color: var(--c-soft); padding: 6px 2px; }
.rce-action { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--c-plate); border-top: 1px solid var(--c-rule); }
.rce-action span { flex: 1; font-size: .76rem; color: var(--c-soft); }
.rce-go { background: var(--c-teal); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: .86rem; min-height: 40px; }
.rce-go:hover { background: #0e3a3e; }
.rce-toast { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); background: var(--c-chrome); color: var(--c-chrome-fg); padding: 7px 14px; border-radius: 99px; font-size: .8rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s; white-space: nowrap; }
.rce-toast.show { opacity: 1; }

.mock-frame { border: 2px solid var(--ink); border-radius: var(--radius); overflow: clip; box-shadow: 8px 8px 0 var(--ink); background: #fff; position: relative; }
.mock-chrome { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 2px solid var(--ink); background: var(--bg); align-items: center; font-size: .82rem; color: var(--ink-soft); }
.mock-chrome i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); display: block; }
.mock-chrome span { margin-left: 8px; }
/* The mock lesson is styled only through its own variables, the same way Rise is themed.
   These are its untouched defaults; the editor's layers override them on the element. */
.rl { --color-theme: #2d6cdf; --color-theme-contrast: #ffffff; --m-btn-bg: #2d6cdf; --m-btn-ink: #ffffff; --m-link: #1f58c0;
  --m-bg-light: #ffffff; --m-bg-gray: #f5f5f5; --m-bg-dark: #313537; --m-text-light: #313537; --m-text-dark: #ffffff;
  --m-sub-light: #313537; --m-sub-dark: #ffffff; --m-card: #ffffff; --m-text-card: #313537;
  --m-btn-radius: 5px; --m-card-radius: 0px; --m-image-radius: 0px; --m-icon-radius: 50px; --m-shadow: 0 1px 3px rgba(0, 0, 0, .14);
  --font-family-head: "Segoe UI", system-ui, sans-serif; --m-head-weight: 700; --m-h2-size: 32px;
  --m-sub-family: "Segoe UI", system-ui, sans-serif; --m-sub-weight: 700;
  --font-family-body: "Segoe UI", system-ui, sans-serif; --m-body-size: 17px; --font-family-ui: "Segoe UI", system-ui, sans-serif; --m-ui-weight: 700;
  font-family: var(--font-family-body); font-size: var(--m-body-size); line-height: 1.55; letter-spacing: 0; word-spacing: 0; color-scheme: light; }
.rl-block { padding: 30px clamp(18px, 4vw, 44px); display: grid; gap: 14px; transition: background-color .3s, color .3s; }
.rl-light { background: var(--m-bg-light); color: var(--m-text-light); --sub: var(--m-sub-light); }
.rl-gray { background: var(--m-bg-gray); color: var(--m-text-light); --sub: var(--m-sub-light); }
.rl-dark { background: var(--m-bg-dark); color: var(--m-text-dark); --sub: var(--m-sub-dark); }
.rl-kicker { font-family: var(--font-family-ui); font-size: .78em; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.rl .rl-h2 { font-family: var(--font-family-head); font-weight: var(--m-head-weight); font-size: var(--m-h2-size); line-height: 1.15; letter-spacing: 0; margin: 0; color: inherit; }
.rl .rl-h3 { font-family: var(--m-sub-family); font-weight: var(--m-sub-weight); font-size: 22px; line-height: 1.2; letter-spacing: 0; margin: 0; color: var(--sub); }
.rl a { color: var(--m-link); }
.rl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rl-steps li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.rl-chip { width: 34px; height: 34px; display: grid; place-items: center; background: var(--color-theme); color: var(--color-theme-contrast); border-radius: var(--m-icon-radius); font-family: var(--font-family-ui); font-weight: 700; font-size: 15px; transition: border-radius .3s, background-color .3s; }
.rl-split { grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 560px) { .rl-split { grid-template-columns: 1fr; } }
.rl-img { border-radius: var(--m-image-radius); overflow: hidden; transition: border-radius .3s; }
.rl-img svg { width: 100%; height: auto; }
.rl-card { background: var(--m-card); color: var(--m-text-card); border-radius: var(--m-card-radius); box-shadow: var(--m-shadow); border: 1px solid rgba(0, 0, 0, .14); overflow: hidden; transition: border-radius .3s, box-shadow .3s; }
.rl-card details + details { border-top: 1px solid rgba(0, 0, 0, .14); }
.rl-card summary { padding: 13px 16px; font-family: var(--font-family-ui); font-weight: 700; cursor: pointer; }
.rl-card summary::marker { color: var(--color-theme); }
.rl-card details p { padding: 0 16px 14px; }
.rl-quiz { padding: 20px; display: grid; gap: 14px; }
.rl-quiz fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.rl-quiz legend { padding: 0; margin-bottom: 10px; font-family: var(--m-sub-family); font-weight: var(--m-sub-weight); font-size: 19px; line-height: 1.25; }
.rl-quiz label { display: flex; gap: 10px; align-items: center; padding: 10px 13px; border: 1px solid rgba(0, 0, 0, .25); border-radius: min(var(--m-card-radius), 14px); cursor: pointer; }
.rl-quiz label:has(input:checked) { border-color: var(--color-theme); box-shadow: inset 0 0 0 1.5px var(--color-theme); }
.rl-quiz input { accent-color: var(--color-theme); width: 18px; height: 18px; flex: none; }
.rl-btn { background: var(--m-btn-bg); color: var(--m-btn-ink); border: 0; border-radius: var(--m-btn-radius); padding: .8em 1.7em; font-family: var(--font-family-ui); font-weight: var(--m-ui-weight); font-size: 15px; letter-spacing: .04em; width: fit-content; min-height: 44px; transition: background-color .3s, border-radius .3s; }
.rl-feedback { font-weight: 700; min-height: 1.5em; }
.rl-toggle { position: sticky; bottom: 14px; margin: -58px 14px 14px auto; width: fit-content; display: flex; align-items: center; gap: 8px; background: #fff; color: #1a1a1a; border: 1px solid #0003; border-radius: 99px; padding: 5px 6px 5px 12px; font-size: .78rem; font-weight: 700; box-shadow: 0 4px 14px #0003; }
.rl-toggle button { border: 0; border-radius: 99px; padding: 5px 12px; font-size: .78rem; font-weight: 700; min-height: 32px; background: #134B50; color: #fff; }
.rl-toggle button[aria-pressed="false"] { background: #5b6566; }

/* Resume */
.resume { display: grid; gap: 40px; max-width: 900px; }
.resume .header-name { font-size: clamp(2.2rem, 6vw, 4rem); }
.resume .header-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--a1); margin-top: 10px; }
.resume .summary { font-size: 1.12rem; color: var(--ink-soft); max-width: 70ch; }
.resume .section { padding: 0; display: grid; gap: 18px; }
.resume .section-label { font-size: 1.5rem; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.competency-grid, .tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.competency-card, .tech-group { padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--radius-s); background: var(--surface); display: grid; gap: 6px; align-content: start; }
.competency-card h4, .tech-group h4 { font-size: 1.05rem; }
.competency-card p, .tech-group p { font-size: .93rem; color: var(--ink-soft); }
.role { display: grid; gap: 8px; padding: 18px 0; border-bottom: 1.5px solid var(--line); }
.role-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; }
.role-title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.role-period { font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.role-org { font-weight: 700; color: var(--a1); }
.achievements { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--ink-soft); }
.edu-item { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1.5px solid var(--line); }
.edu-degree { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.edu-meta { color: var(--ink-soft); font-weight: 600; }
.awards { display: flex; flex-wrap: wrap; gap: 8px; }
.award-tag { padding: .3em .8em; border-radius: 999px; border: 2px solid var(--ink); background: var(--a2); color: #27193a; font-weight: 700; font-size: .85rem; }

/* Footer */
.site-footer { border-top: 2px solid var(--ink); margin-top: clamp(40px, 8vw, 96px); padding-block: 36px; background: var(--surface); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 0; }
.site-footer small { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
:root[data-scroll="off"] { scroll-behavior: auto; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media print { .site-header, .site-footer, .comfort, .btn-row { display: none !important; } body { background: #fff; color: #000; } }

/* Scene paint (kept as classes so every colour follows the chosen place) */
.s-ink { stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.f-star { fill: #fff6d6; }
.f-cloud { fill: #ffffff; opacity: .9; }
.hill-far { fill: color-mix(in srgb, var(--a3) 45%, var(--sky-2)); }
.hill-mid { fill: color-mix(in srgb, var(--a3) 75%, var(--sky-2)); }
.sea { fill: var(--a4); }
.wave { fill: none; stroke: #ffffff; stroke-width: 3; stroke-linecap: round; opacity: .8; }
.trunk { fill: color-mix(in srgb, var(--ink) 55%, var(--a2)); }
.leaf { fill: var(--a3); }
.leaf2 { fill: color-mix(in srgb, var(--a3) 70%, var(--a2)); }
.rope { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.window { fill: var(--a4); }
.ground { fill: color-mix(in srgb, var(--a3) 88%, var(--ink)); }
:root[data-place="shore"] .ground { fill: color-mix(in srgb, var(--a2) 70%, #ffffff); }
:root[data-place="shore"] .leaf { fill: #2e8b6a; } :root[data-place="shore"] .leaf2 { fill: #58a86f; }
:root[data-place="sunset"] .leaf { fill: #7a2c5e; } :root[data-place="sunset"] .leaf2 { fill: #a83c58; }
:root[data-place="sunset"] .hill-far { fill: #e58a6a; } :root[data-place="sunset"] .hill-mid { fill: #c75a4c; } :root[data-place="sunset"] .ground { fill: #5a1f45; }
:root[data-place="night"] .leaf { fill: #2b6b63; } :root[data-place="night"] .leaf2 { fill: #36806f; }
:root[data-place="night"] .hill-far { fill: #2c2558; } :root[data-place="night"] .hill-mid { fill: #241d49; } :root[data-place="night"] .ground { fill: #1a2f3f; }
:root[data-place="night"] .window { fill: #ffd97a; filter: drop-shadow(0 0 8px #ffd97a); }
:root[data-place="night"] .s-ink, :root[data-place="night"] .rope { stroke: #0e0a1c; }
[hidden] { display: none !important; }
.icon-btn { min-height: 44px; } .icon-btn svg { flex: none; }
.case-body > * { min-width: 0; } .toc { max-width: 100%; }

/* High contrast: plain backgrounds, pure ink, strong borders. Applies over any colour theme;
   the dark theme gets a dark high-contrast version. */
:root[data-contrast="high"] { --bg: #ffffff; --surface: #ffffff; --ink: #000000; --ink-soft: #1c1c1c; --line: #000000;
  --a1: #7a0036; --a1-ink: #ffffff; --a2: #ffd23f; --a3: #00573a; --a4: #003f8f; --sky-1: #ffffff; --sky-2: #ffffff; }
:root[data-contrast="high"][data-place="night"] { --bg: #000000; --surface: #000000; --ink: #ffffff; --ink-soft: #ededed; --line: #ffffff;
  --a1: #ffd400; --a1-ink: #000000; --a2: #ffd400; --a3: #7dffcf; --a4: #9cc7ff; --sky-1: #000000; --sky-2: #000000; }
:root[data-contrast="high"] a { text-decoration: underline; }
:root[data-contrast="high"] :focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
:root[data-contrast="high"] .eyebrow, :root[data-contrast="high"] .lede { color: var(--ink); }
