/* The iceberg guide (job-search-iceberg.astro, issue #718), loaded after legal.css and guide.css. The page is a dive:
   the hero sits above the water with the resume as the iceberg's tip, then the guide's reading column sits inside the
   iceberg, which widens all the way down while the sea round it darkens, and the five layers get their own ice and a
   depth card in the colour of the water at their depth. The story bank rests on the seabed. Everything that moves waits
   for the .motion class (none for anyone who asks for less motion), and the page reads in full without any of it.
   iceberg.js keeps the depth gauge in step with the scroll and runs the polish toy. Decorative loops keep going, like the
   rest of the site. The scribbled notes, handwritten in the Instagram carousel, are Figtree italic here, tilted. */

:root {
  --sky-top: #d9eeff;
  /* The sea, from just under the surface to the seabed. The layers' depth cards use the same blues (LAYERS in the page). */
  --sea-0: #2a86d6;
  --sea-deep: #081a40;
  --sand: #f2d894;
}
.scribble { font-family: var(--font-sans); font-style: italic; font-weight: 600; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }

/* ---- Above the water: the title, then the tip, the coach in its mask and the waves ---- */
.berg-hero { position: relative; background: linear-gradient(var(--canvas), var(--sky-top) 240px); }
.berg-hero-copy { position: relative; z-index: 5; display: flex; flex-direction: column; gap: 18px; padding-top: 36px; }
.berg-hero h1 { max-width: 920px; font-weight: 700; font-size: clamp(42px, 6.4vw, 76px); line-height: 1; letter-spacing: -0.03em; }
.berg-hero .p-hero-lede { max-width: 640px; }
.surface { position: relative; height: 300px; margin-top: 8px; }
/* The tip's base is exactly as wide as the iceberg's top under the water (--tip on .berg), so the two meet at the waterline. */
.tip { position: absolute; z-index: 4; left: 50%; bottom: 0; width: min(560px, 56%); height: 250px; transform: translateX(-50%); }
.tip-shape { width: 100%; height: 100%; overflow: visible; }
.tip-label { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: 0.2em; text-transform: uppercase; }
.twinkle { position: absolute; width: 26px; height: 26px; overflow: visible; }
.motion .twinkle { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(0.55) rotate(0deg); opacity: 0.5; } 50% { transform: scale(1.1) rotate(25deg); opacity: 1; } }
.surface .bit { z-index: 1; }

/* The coach floats on the water left of the tip. Tapping it (legal.js) cheers and changes its line. */
.surface .p-hero-art { position: absolute; z-index: 1; left: max(2%, calc(50% - min(280px, 28%) - 250px)); bottom: -30px; width: 210px; height: 230px; min-height: 0; flex: none; display: block; }
.surface .p-hero-bubble { top: 0; left: 46px; right: auto; max-width: none; padding: 10px 16px; font-size: 20px; white-space: nowrap; }
.surface .p-hero-coach { position: absolute; left: 34px; bottom: 0; margin: 0; width: 120px; height: 120px; }
.surface .tap-me { left: auto; right: 0; bottom: 64px; }
.diver-dot { transform-box: fill-box; animation: dot-bounce 3.15s ease-in-out infinite; }
.diver-dot:nth-of-type(2) { animation-delay: 0.12s; }
.diver-dot:nth-of-type(3) { animation-delay: 0.24s; }

/* The waterline: two rows of waves drifting at different speeds, over the coach and under the iceberg. */
.waves { position: absolute; z-index: 2; left: 0; right: 0; bottom: -14px; height: 28px; pointer-events: none; }
.waves span { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='28' viewBox='0 0 160 28'%3E%3Cpath d='M0 14 Q20 6 40 14 T80 14 T120 14 T160 14 V28 H0 Z' fill='%232a86d6'/%3E%3Cpath d='M0 14 Q20 6 40 14 T80 14 T120 14 T160 14' fill='none' stroke='%23ffffff' stroke-width='3'/%3E%3C/svg%3E") 0 0 / 160px 28px repeat-x; }
.waves span:first-child { top: -5px; opacity: 0.5; background-position-x: 60px; }
.motion .waves span:first-child { animation: waves 11s linear infinite reverse; }
.motion .waves span:last-child { animation: waves 7s linear infinite; }
@keyframes waves { from { background-position-x: 0; } to { background-position-x: 160px; } }

/* ---- The dive: the sea darkens all the way down; light rays near the top, sea life in the margins ---- */
.dive {
  position: relative;
  background: linear-gradient(to bottom, var(--sea-0) 0, #1f6fbf 14%, #1a5ca6 32%, #164a8c 50%, #113872 68%, #0c2657 84%, var(--sea-deep) 100%);
}
.rays { position: absolute; left: 0; right: 0; top: 0; height: 1100px; overflow: hidden; pointer-events: none; }
.rays span { position: absolute; top: -60px; width: 120px; height: 1160px; background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)); transform: skewX(-18deg); transform-origin: top; }
.rays span:nth-child(1) { left: 7%; }
.rays span:nth-child(2) { left: 21%; width: 56px; }
.rays span:nth-child(3) { right: 9%; width: 90px; }
.motion .rays span { animation: sway 8s ease-in-out infinite alternate; }
.motion .rays span:nth-child(2) { animation-delay: -3s; }
.motion .rays span:nth-child(3) { animation-delay: -5s; }
@keyframes sway { from { transform: skewX(-20deg); opacity: 1; } to { transform: skewX(-9deg); opacity: 0.55; } }

/* Swimmers (SEA, CARD_SWIMS and MAP_SWIMS in the page): each crosses its box and comes round again, bobbing as it
   goes. In the open sea they pass behind the iceberg, so you see them in the margins either side; behind each depth card
   they're faint white shapes; in the map, small fish in the water. Fish face left, so the ones going right are flipped.
   Only with motion: without it they'd sit still at the edge. */
.swimmers, .card-swim { display: none; }
.motion .swimmers { display: block; position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.motion .card-swim { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.card-swim:not(.map-swim) { --fish: rgba(255, 255, 255, 0.16); --fish-line: rgba(255, 255, 255, 0.38); --fish-eye: rgba(255, 255, 255, 0.5); --whale: rgba(255, 255, 255, 0.1); }
.motion .map-swim { top: 92px; }
.swim { position: absolute; left: 0; width: 100%; height: 1px; animation: cross var(--dur) linear var(--delay) infinite; }
.swim.rtl { animation-direction: reverse; }
/* An open-sea swimmer that keeps to one side: its box runs from the window edge to 60px behind the iceberg, which is
   190px wider at the seabed than at its shoulder (--bot and --top on .berg), so deeper boxes are wider (--t, how far down). */
.swim.side-l, .swim.side-r { width: max(80px, calc(50% - 380px - 190px * var(--t, 0))); }
.swim.side-r { left: auto; right: 0; }
@keyframes cross { from { transform: translateX(calc(-1 * var(--w) - 30px)); } to { transform: translateX(calc(100% + 30px)); } }
.swim-body { position: absolute; overflow: visible; animation: fishbob 1.7s ease-in-out infinite alternate; }
.swim:not(.rtl) .swim-body { scale: -1 1; }
@keyframes fishbob { from { translate: 0 -3px; } to { translate: 0 3px; } }
/* Below 1024px the sea round the iceberg is a sliver, so the open-sea swimmers stay away; the cards and map keep theirs. */
@media (max-width: 1023px) { .motion .swimmers { display: none; } }

/* A jellyfish and an anglerfish keep to the margins on wide screens. */
.critters { display: none; }
@media (min-width: 1200px) {
  .critters { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
  .critters > * { position: absolute; }
  .jelly, .angler { left: max(12px, calc(50% - 690px)); }
  .jelly { width: 54px; height: 82px; margin-left: 60px; }
  .angler { width: 96px; height: 70px; }
}
.motion .jelly { animation: jelly 4.5s ease-in-out infinite; }
@keyframes jelly { 0%, 100% { transform: translateY(0) scaleY(1); } 40% { transform: translateY(-26px) scaleY(0.9); } }
.motion .angler { animation: drift-slow 6s ease-in-out infinite; }
@keyframes drift-slow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, -8px); } }
.angler .lure { transform-box: fill-box; transform-origin: center; }
.motion .angler .lure { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 2px #ffc933); transform: scale(1); } 50% { filter: drop-shadow(0 0 10px #ffe48a); transform: scale(1.25); } }

/* The coach dives in the left margin on wide screens, once the coach on the surface is behind you, tilting nose down
   going down and nose up coming back (iceberg.js sets data-dir on .dive), and lands on the sand by the treasure chest:
   the rail ends at the foot of the seabed scene. */
.rail { display: none; position: absolute; z-index: 4; top: 340px; bottom: 14px; left: max(16px, calc(50% - 620px)); width: 110px; pointer-events: none; }
.diver { position: sticky; top: 42vh; width: 96px; height: 96px; }
.diver-coach { width: 96px; height: 96px; overflow: visible; transform: rotate(10deg); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.dive[data-dir="up"] .diver-coach { transform: rotate(-16deg) translateY(-6px); }
.dive[data-dir="still"] .diver-coach { transform: rotate(0deg); }
.motion .diver { animation: bob 2.6s ease-in-out infinite; }
.bubbles { position: absolute; left: 78px; top: 2px; width: 1px; height: 1px; }
.bubbles i { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 50%; opacity: 0; }
.motion .bubbles i { animation: rise 2.8s ease-in infinite; }
.bubbles i:nth-child(2) { width: 7px; height: 7px; animation-delay: 0.7s; }
.bubbles i:nth-child(3) { width: 12px; height: 12px; animation-delay: 1.4s; }
.bubbles i:nth-child(4) { width: 6px; height: 6px; animation-delay: 2.1s; }
@keyframes rise { 0% { transform: translate(0, 0) scale(0.5); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-14px, -130px) scale(1.15); opacity: 0; } }
@media (min-width: 1280px) {
  .rail { display: block; }
  .seabed .diver-landed { display: none; }
}

/* ---- The iceberg: one shape from the waterline to the seabed. --tip is half its width at the waterline (the tip's
   base), --top its inset at the shoulder, where the reading column starts, and --bot its inset on the seabed. An ink
   copy a little bigger sits behind for the outline. The reading column always fits inside. ---- */
.berg { position: relative; z-index: 3; --tip: min(280px, 28%); --top: max(12px, calc(50% - 440px)); --bot: max(12px, calc(50% - 630px)); --shoulder: 190px; }
.berg::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  clip-path: polygon(calc(50% - var(--tip) - 3px) 0, calc(50% + var(--tip) + 3px) 0, calc(100% - var(--top) + 3px) var(--shoulder), calc(100% - var(--bot) + 3px) 100%, calc(var(--bot) - 3px) 100%, calc(var(--top) - 3px) var(--shoulder));
}
.legal.berg-body {
  position: relative; padding: 0; background: #f3f9ff;
  clip-path: polygon(calc(50% - var(--tip)) 0, calc(50% + var(--tip)) 0, calc(100% - var(--top)) var(--shoulder), calc(100% - var(--bot)) 100%, var(--bot) 100%, var(--top) var(--shoulder));
}
.berg-body .col { max-width: var(--read); margin: 0 auto; padding-inline: 30px; box-sizing: content-box; }
.berg-body .col > p, .berg-body .col > ul, .berg-body .col > ol { max-width: 68ch; }

/* Shallow water: the ice is bluer just under the surface, with a nudge to keep going. */
.zone.shallow { padding: 30px 0 80px; background: linear-gradient(#c9e5fd, #f3f9ff 360px); }
.scroll-cue { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; height: calc(var(--shoulder) - 10px); margin: 0; color: var(--ink); }
.scroll-cue .scribble { font-size: 21px; transform: rotate(-3deg); }
.scroll-cue .icon { width: 26px; height: 26px; stroke-width: 2.5; }
.motion .scroll-cue .icon { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.zone .short { margin-top: 0; }

/* ---- Section 1: polish the tip (iceberg.js saves a new version on each press) ---- */
.polish { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px 28px; align-items: center; margin-top: 24px; padding: 22px 24px; border: 2px solid var(--ink); border-radius: var(--radius-chunky); background: var(--sky-soft); box-shadow: var(--shadow-chunky); }
.polish-stage { position: relative; }
.polish-tip { width: 100%; height: auto; overflow: visible; }
.polish-tip text { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: 0.16em; fill: var(--ink); }
.shine { position: absolute; width: 24px; height: 24px; overflow: visible; opacity: 0; }
.polish.shined .shine { animation: shine 0.8s ease-out both; }
.polish.shined .shine:nth-of-type(2) { animation-delay: 0.08s; }
.polish.shined .shine:nth-of-type(3) { animation-delay: 0.16s; }
.polish.shined .shine:nth-of-type(4) { animation-delay: 0.24s; }
@keyframes shine { 0% { opacity: 0; transform: scale(0.2) rotate(0deg); } 40% { opacity: 1; transform: scale(1.2) rotate(30deg); } 100% { opacity: 0; transform: scale(0.6) rotate(60deg); } }
.motion .polish.shined .polish-tip { animation: wiggle 0.5s ease-in-out; }
.legal section .polish-file { margin: 0; font-style: italic; font-weight: 600; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.polish-side .btn { margin-top: 12px; }
.legal section .polish-note { margin-top: 10px; min-height: 1.5em; font-size: 15px; color: var(--ink-soft); }
html:not(.js) [data-polish-btn] { display: none; }

/* ---- Section 2: 108 days as 108 squares, filling in as they scroll into view ---- */
.days { margin: 22px 0 0; padding: 18px; border: 2px solid var(--ink); border-radius: var(--radius-chunky); background: var(--paper); box-shadow: var(--shadow-chunky-sm); }
.day-grid { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 5px; }
.day { position: relative; aspect-ratio: 1; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--sky); }
.day:first-child::after { content: ""; position: absolute; left: 2px; top: 2px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--tomato); }
.motion .days .day { background: var(--canvas); transition: background-color 0.25s ease calc(var(--i) * 14ms); }
.motion .days.in .day { background: var(--sky); }
.days figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

/* ---- Section 3: the map, the five layers as an iceberg in the sea, each a link down to its layer ---- */
.map { position: relative; margin-top: 24px; padding: 26px 22px 28px; border: 2px solid var(--ink); border-radius: 18px; background: linear-gradient(var(--sky-top) 0 92px, var(--sea-0) 92px, #0c2657); box-shadow: var(--shadow-chunky); overflow: hidden; }
.legal section .map-tip { position: relative; width: 170px; height: 66px; margin: 0 auto; }
.map-tip::before { content: ""; position: absolute; inset: -4px -5px 0; background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.map-tip::after { content: ""; position: absolute; inset: 0; background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.map-tip span { position: absolute; z-index: 1; left: 0; right: 0; bottom: 7px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.legal section .map-layers { list-style: none; margin: 0; padding: 0; display: grid; justify-items: center; }
.legal section .map-layers li { width: var(--w); margin: -2px 0 0; }
.map-layers a { position: relative; display: block; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ice); color: var(--ink); text-align: center; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.map-layers a strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.2; }
.map-layers a span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--ink-soft); }
.map-layers li:last-child a strong { color: var(--violet-dark); }
@media (hover: hover) { .map-layers a:hover { z-index: 1; transform: translateY(-3px); box-shadow: var(--shadow-chunky); } }
.map-layers a:active { transform: translate(2px, 2px); }
.legal section .map-note { position: absolute; left: 18px; top: 16px; margin: 0; transform: rotate(-8deg); font-size: 21px; }

/* ---- The layers: each has its own ice, a jagged top edge over the ice above it, and a depth card in the colour of
   the sea at its depth (--ice, --prev and --water come from the page's LAYERS) ---- */
.legal section.layer { position: relative; margin: 0; padding: 72px 0 76px; background: var(--ice); scroll-margin-top: 0; }
.layer::before, .layer::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; pointer-events: none; }
.layer::before {
  background: var(--prev);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='18' viewBox='0 0 140 18'%3E%3Cpolygon points='0,0 140,0 140,11 122,4 98,12 74,3 50,11 26,5 0,11'/%3E%3C/svg%3E") 0 0 / 140px 18px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='18' viewBox='0 0 140 18'%3E%3Cpolygon points='0,0 140,0 140,11 122,4 98,12 74,3 50,11 26,5 0,11'/%3E%3C/svg%3E") 0 0 / 140px 18px repeat-x;
}
.layer::after {
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='18' viewBox='0 0 140 18'%3E%3Cpolyline points='0,11 26,5 50,11 74,3 98,12 122,4 140,11' fill='none' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / 140px 18px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='18' viewBox='0 0 140 18'%3E%3Cpolyline points='0,11 26,5 50,11 74,3 98,12 122,4 140,11' fill='none' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 0 0 / 140px 18px repeat-x;
}
.layer-bottom { padding-bottom: 96px; }

.depth-card {
  position: relative; overflow: hidden; padding: 20px 24px 24px; border: 2px solid var(--ink); border-radius: 18px;
  background: var(--water); color: #fff; box-shadow: var(--shadow-chunky-lg);
}
/* A shaft of light through the water. */
.depth-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(112deg, transparent 52%, rgba(255, 255, 255, 0.1) 52% 66%, transparent 66%); }
.depth-card > * { position: relative; }
.depth-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "eyebrow scribble dial"; align-items: center; gap: 4px 16px; }
.depth-eyebrow { grid-area: eyebrow; font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; }
.depth-card .scribble { grid-area: scribble; justify-self: end; color: var(--sun); transform: rotate(-3deg); }
.depth-card .dial { grid-area: dial; width: 58px; height: 58px; overflow: visible; }
.dial .needle { transform-box: view-box; transform-origin: 32px 32px; }
.motion .depth-card .needle { animation: jitter 3.4s ease-in-out infinite; }
@keyframes jitter { 0%, 100% { rotate: 0deg; } 30% { rotate: 6deg; } 60% { rotate: -3deg; } }
.legal section .depth-card h2 { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: #fff; }
.legal section .depth-line { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.15; letter-spacing: -0.01em; color: #fff; }
.layer .col > p:first-of-type { margin-top: 26px; }

/* What YapApply does at this layer. */
.legal section .in-app { display: flex; align-items: flex-start; gap: 12px; max-width: none; margin-top: 24px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--radius-chunky); background: var(--violet-soft); }
.in-app .icon { flex: none; margin-top: 4px; color: var(--violet); }

/* Interview prep: three story cards fan out as they scroll in. */
.cards-fan { position: relative; height: 158px; margin: 26px 0 6px; }
.fan-card {
  position: absolute; left: 50%; top: 14px; width: 150px; height: 104px; margin-left: -75px; border: 2px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow-chunky-sm);
  background: #fff linear-gradient(var(--violet) 0 0) 16px 24px / 96px 4px no-repeat; transform-origin: 50% 130%; transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s;
}
.fan-card::after { content: ""; position: absolute; left: 14px; top: 38px; width: 110px; height: 24px; background: linear-gradient(var(--violet) 0 0) 0 0 / 80px 4px no-repeat, linear-gradient(var(--violet) 0 0) 0 16px / 104px 4px no-repeat; opacity: 0.6; }
.fan-card:nth-child(1) { transform: translateX(-74px) rotate(-14deg); }
.fan-card:nth-child(2) { transform: rotate(-2deg); }
.fan-card:nth-child(3) { background-color: var(--sun); transform: translateX(74px) rotate(11deg); }
.motion .cards-fan:not(.in) .fan-card { transform: none; }
.fan-note { position: absolute; right: 0; bottom: 0; transform: rotate(-4deg); }

/* Follow-up: a paper plane flies its dotted path (a CSS motion path) to the "due today" email. */
.flight { position: relative; height: 140px; margin: 24px 0 6px; }
.flight-path { position: absolute; left: 0; top: 0; width: 300px; height: 110px; overflow: visible; }
.flight-plane { position: absolute; left: 270px; top: 6px; width: 34px; height: 34px; overflow: visible; }
.motion .flight-plane { left: 0; top: 0; offset-path: path("M14 96 C76 30 140 20 184 58 S262 96 288 22"); offset-rotate: auto 45deg; offset-anchor: 50% 50%; animation: glide 5.5s ease-in-out infinite; }
@keyframes glide { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 80% { offset-distance: 100%; opacity: 1; } 90%, 100% { offset-distance: 100%; opacity: 0; } }
.due-chip { position: absolute; right: 0; bottom: 6px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: var(--shadow-chunky); font-family: var(--font-display); font-weight: 800; font-size: 17px; transform: rotate(-2deg); }
.due-chip .icon { color: var(--violet); }
.motion .due-chip { animation: ping 5.5s ease-in-out infinite; }
@keyframes ping { 0%, 76%, 100% { transform: rotate(-2deg) scale(1); } 82% { transform: rotate(2deg) scale(1.08); } 88% { transform: rotate(-2deg) scale(1); } }

/* Tracker: a board in the app's statuses, with one job hopping from Saved to Offer. */
.board { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius-chunky); background: var(--sky-soft); box-shadow: var(--shadow-chunky); }
.board-col { display: flex; flex-direction: column; gap: 8px; min-height: 160px; padding: 0 10px 14px; }
.board-col + .board-col { border-left: 2px solid var(--ink); }
.board-head { margin: 0 -10px 4px; padding: 8px 4px; border-bottom: 2px solid var(--ink); background: #fff; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap; }
.board-card, .board-hopper { height: 36px; border: 2px solid var(--ink); border-radius: 8px; background: #fff linear-gradient(#b9a4ff 0 0) 10px 9px / 60% 4px no-repeat; }
.board-card::after, .board-hopper::after { content: ""; display: block; margin: 19px 0 0 10px; width: 40%; height: 4px; background: #b9a4ff; }
.board-hopper { position: absolute; left: 10px; top: 94px; width: calc(25% - 20px); background-color: var(--sun); box-shadow: var(--shadow-chunky-sm); }
.motion .board-hopper { animation: hop 8s cubic-bezier(0.5, 0, 0.3, 1) infinite; }
@keyframes hop {
  0%, 16% { transform: translateX(0); opacity: 1; }
  24%, 40% { transform: translateX(calc(100% + 22px)); }
  48%, 64% { transform: translateX(calc(200% + 44px)); }
  72% { transform: translateX(calc(300% + 66px)) scale(1); }
  76% { transform: translateX(calc(300% + 66px)) scale(1.12) rotate(-4deg); }
  80%, 90% { transform: translateX(calc(300% + 66px)) scale(1); opacity: 1; }
  95% { transform: translateX(calc(300% + 66px)); opacity: 0; }
  96% { transform: translateX(0); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Targets: a route with three pins, and the 3.5x beside it. */
.route { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 20px; align-items: center; margin-top: 24px; }
.route-map { position: relative; aspect-ratio: 2 / 1; border: 2px solid var(--ink); border-radius: var(--radius-chunky); background-color: #fff; background-image: radial-gradient(rgba(23, 19, 43, 0.12) 1.5px, transparent 1.7px); background-size: 20px 20px; box-shadow: var(--shadow-chunky); }
.route-map > svg:first-child { position: absolute; left: 4%; top: 8%; width: 92%; height: 84%; overflow: visible; }
.pin { position: absolute; width: 26px; height: 34px; overflow: visible; translate: -50% -100%; }
.motion .pin { animation: pin-bounce 2.6s ease-in-out infinite; }
@keyframes pin-bounce { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-10px); } 80% { transform: translateY(0); } 86% { transform: translateY(-4px); } }
.legal section .route-stat { margin: 0; padding: 18px; border: 2px solid var(--ink); border-radius: var(--radius-chunky); background: var(--sun); box-shadow: var(--shadow-chunky); transform: rotate(2deg); }
.route-stat strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 58px; line-height: 1; letter-spacing: -0.02em; }
.route-stat span { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; line-height: 1.35; }

/* Story bank: the "what a good story has" cards show a number, and the story starters are tilted cards. */
.kind .promise-icon { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.legal section .starters { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin-top: 14px; padding: 0; }
.legal section .starter { margin: 0; min-height: 100px; padding: 16px 16px 18px; border: 2px solid var(--ink); border-radius: 12px; background: var(--tone); box-shadow: var(--shadow-chunky-sm); font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.3; transform: rotate(var(--tilt, 0deg)); transition: transform 0.2s ease, box-shadow 0.2s ease; }
@media (hover: hover) { .legal section .starter:hover { transform: rotate(0deg) translateY(-3px); box-shadow: var(--shadow-chunky); } }

/* ---- The seabed: sand, the treasure chest of stories, and the way back up ---- */
.seabed { position: relative; z-index: 3; padding: 34px 0 0; border-top: 3px solid var(--ink); border-bottom: 2px solid var(--ink); background-color: var(--sand); background-image: radial-gradient(rgba(23, 19, 43, 0.14) 1.6px, transparent 1.8px); background-size: 26px 26px; }
.seabed-scene { position: relative; height: 190px; margin-top: -10px; }
.chest { position: absolute; left: max(96px, calc(50% - 480px)); bottom: 6px; width: 190px; height: 142px; }
.chest svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.chest-glow { position: absolute; left: 50%; top: 20%; width: 170px; height: 120px; margin-left: -85px; border-radius: 50%; background: radial-gradient(rgba(255, 221, 102, 0.9), rgba(255, 221, 102, 0) 70%); }
.motion .chest-glow { animation: glow-pulse 2.4s ease-in-out infinite; }
@keyframes glow-pulse { 0%, 100% { opacity: 0.55; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.12); } }
.chest-cards { transform-box: fill-box; transform-origin: 50% 100%; }
.motion .chest-cards { animation: peek 3.2s ease-in-out infinite; }
@keyframes peek { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.diver-landed { position: absolute; left: max(10px, calc(50% - 600px)); bottom: 10px; overflow: visible; }
.motion .diver-landed { animation: bob 2.6s ease-in-out infinite; }
.weed { position: absolute; bottom: 0; width: 34px; height: 120px; overflow: visible; transform-origin: 50% 100%; }
.weed-short { height: 80px; }
.motion .weed { animation: weed 3.6s ease-in-out infinite; }
@keyframes weed { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.crab { position: absolute; right: 22%; bottom: 8px; width: 62px; height: 40px; overflow: visible; }
.motion .crab { animation: scuttle 7s ease-in-out infinite; }
@keyframes scuttle { 0%, 100% { transform: translateX(0); } 45%, 55% { transform: translateX(-70px); } }
.seabed-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 var(--gutter); text-align: center; }
.seabed-copy .scribble { font-size: 24px; text-wrap: balance; }
.seabed-copy p { margin: 0; }
.seabed-depth .depth-eyebrow { color: var(--ink-soft); }
.seabed-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }

/* ---- The depth gauge, bottom right while you're under the water ---- */
.depth-hud {
  position: fixed; z-index: 50; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 2px solid var(--ink); border-radius: 16px;
  background: var(--paper); box-shadow: var(--shadow-chunky); pointer-events: none; opacity: 0; translate: 0 24px; transition: opacity 0.3s ease, translate 0.3s ease;
}
.depth-hud.on { opacity: 1; translate: 0 0; }
/* Where it would cover the reading column, it shows only while you scroll (iceberg.js adds .resting after a pause). */
.depth-hud.on.resting { opacity: 0; translate: 0 24px; transition-duration: 0.6s; }
.depth-hud .dial { width: 50px; height: 50px; overflow: visible; }
.hud-needle { transform-box: view-box; transform-origin: 32px 32px; transform: rotate(-120deg); transition: transform 0.2s linear; }
.hud-text { display: grid; line-height: 1.1; }
.hud-label { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.hud-metres { font-family: var(--font-display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.hud-layer { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* ---- After the dive ---- */
.after-dive { padding-top: 8px; }
/* Ken, 29 October: this guide ends without the list of other guides. Its call to action takes the reading column's width
   from guide.css, like every guide's (#721). */

/* ---- Narrower screens ---- */
@media (max-width: 760px) {
  .route { grid-template-columns: minmax(0, 1fr); }
  .legal section .route-stat { justify-self: start; max-width: 280px; }
}
@media (max-width: 640px) {
  .surface { height: 230px; }
  .tip { height: 178px; }
  .tip-label { bottom: 18px; font-size: 13px; letter-spacing: 0.16em; }
  .twinkle { width: 20px; height: 20px; }
  .surface .p-hero-art { left: 0; bottom: -22px; width: 150px; height: 190px; }
  .surface .p-hero-bubble { left: 8px; padding: 8px 12px; font-size: 17px; }
  .surface .p-hero-coach { left: 6px; width: 84px; height: 84px; }
  .surface .tap-me { right: auto; left: 0; bottom: auto; top: -38px; }
  .berg { --shoulder: 130px; }
  .berg-body .col { padding-inline: 28px; }
  .zone.shallow { padding-top: 22px; }
  .scroll-cue .scribble { font-size: 18px; }
  .polish { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .polish-stage { width: 190px; margin: 0 auto; }
  .day-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
  .days { padding: 14px; }
  .map { padding: 22px 12px 22px; background: linear-gradient(var(--sky-top) 0 84px, var(--sea-0) 84px, #0c2657); }
  .legal section .map-tip { width: 140px; height: 62px; }
  .legal section .map-layers li { width: calc(66% + (var(--w) - 60%) * 0.85); }
  .map-layers a { padding: 10px 10px; }
  .map-layers a strong { font-size: 17px; }
  .map-layers a span { font-size: 13px; }
  .legal section .map-note { left: 12px; top: 10px; font-size: 17px; }
  .motion .map-swim { top: 84px; }
  .legal section.layer { padding: 56px 0 60px; }
  .depth-card { padding: 16px 16px 20px; }
  .depth-meta { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "eyebrow dial" "scribble dial"; }
  .depth-card .scribble { justify-self: start; font-size: 18px; }
  .depth-card .dial { width: 50px; height: 50px; }
  .cards-fan { height: 190px; }
  .fan-card { width: 120px; height: 86px; margin-left: -60px; }
  .fan-card:nth-child(1) { transform: translateX(-56px) rotate(-14deg); }
  .fan-card:nth-child(3) { transform: translateX(56px) rotate(11deg); }
  .fan-note { left: 0; right: 0; text-align: center; font-size: 18px; }
  .flight { height: auto; }
  .flight-path { position: relative; display: block; width: 300px; max-width: 100%; }
  .due-chip { position: relative; right: auto; bottom: auto; margin-top: 8px; }
  .board-col { min-height: 140px; padding: 0 5px 10px; gap: 6px; }
  .board-head { margin: 0 -5px 4px; padding: 8px 1px; font-size: 11px; letter-spacing: -0.01em; }
  .board-hopper { left: 5px; top: 90px; width: calc(25% - 10px); }
  @keyframes hop {
    0%, 16% { transform: translateX(0); opacity: 1; }
    24%, 40% { transform: translateX(calc(100% + 12px)); }
    48%, 64% { transform: translateX(calc(200% + 24px)); }
    72% { transform: translateX(calc(300% + 36px)) scale(1); }
    76% { transform: translateX(calc(300% + 36px)) scale(1.12) rotate(-4deg); }
    80%, 90% { transform: translateX(calc(300% + 36px)) scale(1); opacity: 1; }
    95% { transform: translateX(calc(300% + 36px)); opacity: 0; }
    96% { transform: translateX(0); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }
  .seabed-scene { height: 170px; margin-top: 4px; }
  .chest { left: 50%; width: 150px; height: 112px; margin-left: -40px; }
  .diver-landed { left: 12px; width: 70px; height: 70px; }
  .weed:first-child { display: none; }
  .crab { display: none; }
  .seabed-copy .scribble { font-size: 20px; }
  .depth-hud { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); gap: 8px; padding: 6px 12px 6px 6px; }
  .depth-hud .dial { width: 38px; height: 38px; }
  .hud-metres { font-size: 19px; }
  .hud-layer { display: none; }
}
