/* Myles Barker · Interactive CV
   Visual identity: warm paper, night-sky ink and three "planet" colours.
   1 terracotta = packaging data · 2 teal = recyclability and study · 3 amber = recruitment.
   Motion is short, finite and switched off under prefers-reduced-motion. */

:root {
  color-scheme: light;
  --paper: #f6f2ea;
  --paper-deep: #efe9dd;
  --surface: #fffdf8;
  --ink: #18203a;
  --ink-soft: #2c3554;
  --muted: #535a6e;
  --line: #e0d8c8;
  --line-strong: #cfc5b1;

  --accent: #a8401d;
  --accent-hover: #8c3315;
  --focus: #1f5f8b;

  --p1: #c8572f;  --p1-soft: #f7e3d8;
  --p2: #2f7a72;  --p2-soft: #dcefeb;
  --p3: #c7922b;  --p3-soft: #f6ead0;
  --red: #c8102e; --red-soft: #f8dde1;

  --before: #fbf1df;
  --before-ink: #7a4a07;
  --flag: #f8dcb4;
  --after: #e3f1ed;
  --after-ink: #1d5a53;

  --radius: 1.25rem;
  --radius-sm: .7rem;
  --shadow: 0 1px 2px #18203a0d, 0 14px 40px -18px #18203a2e;
  --shadow-lift: 0 2px 4px #18203a12, 0 22px 50px -20px #18203a40;

  --body-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono-font: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--body-font); overflow-x: hidden; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2 { font-family: var(--display-font); font-weight: 400; letter-spacing: -.03em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h3 { font-size: 1.22rem; letter-spacing: -.015em; line-height: 1.25; }
p { color: var(--muted); }
a { color: var(--accent); text-underline-offset: .2em; }
button { font: inherit; }
code { font-family: var(--mono-font); font-size: .92em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: .25rem; }
main:focus { outline: none; }
main { overflow-x: clip; }
[hidden], .print-email { display: none !important; }

.shell { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: .75rem; left: .75rem; padding: .65rem 1rem; z-index: 3; background: var(--surface); color: var(--ink); border-radius: .5rem; box-shadow: var(--shadow); }

.eyebrow, .section-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-kicker { display: flex; align-items: center; gap: .6rem; margin-bottom: .85rem; color: var(--accent); font-family: var(--body-font); line-height: 1.3; }
.section-kicker::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; }

.planet { display: inline-block; flex: none; width: .95rem; height: .95rem; border-radius: 50%; }
.planet.p1 { background: var(--p1); box-shadow: 0 0 0 4px var(--p1-soft); }
.planet.p2 { background: var(--p2); box-shadow: 0 0 0 4px var(--p2-soft); }
.planet.p3 { background: var(--p3); box-shadow: 0 0 0 4px var(--p3-soft); }
.planet.p-red { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.planet.p-ink { background: var(--ink); box-shadow: 0 0 0 4px #18203a1f; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); background: #f6f2eaf0; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--ink); color: var(--paper); font: 600 .78rem/1 var(--body-font); letter-spacing: .04em;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px #f6f2ea55;
}
nav { display: flex; gap: clamp(.25rem, 1.6vw, 1.25rem); }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .55rem; border-radius: .6rem; color: var(--ink-soft); font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
nav a:hover { background: var(--paper-deep); color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: .65rem; }

/* Buttons */
.button, .demo-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem;
  padding: .62rem 1.15rem; border: 1px solid transparent; border-radius: 999px; text-decoration: none;
  font-size: .92rem; font-weight: 650; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.primary { background: var(--ink); color: var(--paper); }
.primary:hover { background: var(--accent); }
.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.secondary:hover { border-color: var(--ink-soft); }
.button span[aria-hidden] { display: inline-block; transition: transform .2s ease; }

/* Hero: short, with a starfield and one long orbit behind the name */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 1fr); align-items: end;
  gap: clamp(1.5rem, 5vw, 4.5rem); padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -2rem -40vw 0 -40vw; pointer-events: none;
  background:
    radial-gradient(circle at 8% 22%, #18203a40 0 1px, transparent 1.6px),
    radial-gradient(circle at 23% 78%, #18203a30 0 1px, transparent 1.6px),
    radial-gradient(circle at 41% 12%, #18203a38 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 57% 64%, #18203a2a 0 1px, transparent 1.6px),
    radial-gradient(circle at 71% 30%, #18203a40 0 1.3px, transparent 1.8px),
    radial-gradient(circle at 86% 82%, #18203a30 0 1px, transparent 1.6px),
    radial-gradient(circle at 93% 15%, #18203a38 0 1px, transparent 1.6px);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; left: -12%; right: -18%; top: 18%; height: 70%;
  border: 1px dashed var(--line-strong); border-radius: 50%; transform: rotate(-6deg); pointer-events: none;
}
.hero h1 { font-size: clamp(3.3rem, 9vw, 7.4rem); letter-spacing: -.045em; }
.location { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1rem; color: var(--ink-soft); }
.location::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--p2); box-shadow: 0 0 0 4px var(--p2-soft); }
.hero-role { color: var(--ink); margin-top: 1rem; max-width: 30ch; font-family: var(--display-font); font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.2; letter-spacing: -.015em; }
.hero-intro { margin-top: .9rem; max-width: 46ch; font-size: 1.04rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.hero-links .primary:hover span[aria-hidden] { transform: translateY(2px); }

/* The full stop is a small planet with a moon */
.full-stop { position: relative; display: inline-block; color: var(--p1); }
.full-stop::before {
  content: ""; position: absolute; left: 50%; bottom: .14em; width: .52em; height: .17em;
  border: 2px solid var(--p1); border-radius: 50%; opacity: .45; transform: translate(-50%, 50%) rotate(-14deg); pointer-events: none;
}
.full-stop::after {
  content: ""; position: absolute; left: calc(50% + .2em); bottom: .14em; width: .075em; height: .075em; min-width: 5px; min-height: 5px;
  border-radius: 50%; background: var(--p2); transform: translate(-50%, 50%); pointer-events: none;
}

.now-card { position: relative; padding: 1.25rem 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.now-card h2 { display: flex; align-items: center; gap: .5rem; color: var(--accent); font: 700 .74rem/1.3 var(--body-font); letter-spacing: .12em; }
.now-card h2::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 4px #2fa36b29; }
.now-card dl { margin: .8rem 0 0; }
.now-card dl div { padding-block: .6rem; border-top: 1px solid var(--line); }
.now-card dt { display: flex; align-items: center; gap: .6rem; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.now-card dt .planet { width: .6rem; height: .6rem; box-shadow: none; }
.now-card dd { margin: .15rem 0 0 1.2rem; color: var(--ink); font-size: .95rem; }

/* Sections */
.section-space { padding-block: clamp(2.75rem, 6.4vw, 5.25rem); }
.section-heading { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); max-width: 46rem; }
.section-heading p:not(.section-kicker) { margin-top: .75rem; }
.work-section, .about-section { border-block: 1px solid var(--line); background: var(--paper-deep); }
.work-section .section-space { padding-top: clamp(2rem, 5vw, 4.5rem); }
.legend { display: inline-block; }

mark.flag, mark.fixed { padding: .05em .3em; border-radius: .3em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.flag { background: var(--flag); color: var(--before-ink); }
mark.fixed { background: var(--p2-soft); color: var(--after-ink); box-shadow: inset 0 -2px 0 #2f7a7255; }
mark code { color: inherit; white-space: pre; }

/* Work examples */
.demo { display: flex; flex-direction: column; min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.demo-kicker { display: flex; align-items: center; gap: .65rem; color: var(--ink-soft); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.demo-kicker .planet { width: .7rem; height: .7rem; box-shadow: none; }
.demo-heading h3 { margin-top: .7rem; font-family: var(--display-font); font-size: 1.5rem; font-weight: 400; }
.demo-heading p:not(.demo-kicker) { margin-top: .4rem; font-size: .93rem; }
.demo-heading p strong { color: var(--ink); }
.demo-body { flex: 1; margin-block: 1rem; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }

/* Featured walkthrough */
.demo-featured {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(1rem, 4vw, 3rem); align-items: start;
  margin-bottom: 1rem; padding: clamp(1.2rem, 3vw, 2rem); border-color: var(--line-strong); box-shadow: var(--shadow-lift);
}
.demo-featured .demo-heading h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; }
.demo-featured .demo-body { margin: 0; min-width: 0; }

.step-list, .cleaning-stages { margin: 0; padding: 0; list-style: none; }
.step-list { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-bottom: .85rem; counter-reset: none; }
.step-list li { position: relative; min-width: 0; }
.step-list li + li::before { content: ""; position: absolute; top: 50%; right: 100%; width: .45rem; height: 2px; background: var(--line-strong); }
.step-list .button {
  width: 100%; min-height: 44px; padding: .5rem .4rem; border-radius: .8rem; font-size: .84rem;
  background: var(--paper); color: var(--muted); border-color: var(--line);
}
.step-list .button:hover { color: var(--ink); border-color: var(--ink-soft); }
.step-list li:has(~ li [aria-current="step"]) .button { background: var(--p2-soft); color: var(--after-ink); border-color: #bcdcd5; }
.step-list .button { position: relative; white-space: nowrap; }
.step-list li:has(~ li [aria-current="step"]) .button::after {
  content: "✓"; position: absolute; top: -.45rem; right: -.3rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem;
  border-radius: 50%; background: var(--p2); color: white; font-size: .66rem; font-weight: 800; box-shadow: 0 0 0 2px var(--surface);
}
.demo-body:has(.step-list li:last-child [aria-current="step"]) [data-step-next]::after { content: "↺"; }
.demo-outcome { display: flex; gap: .5rem; align-items: baseline; margin-top: 1.1rem !important; padding: .65rem .8rem; border-radius: .7rem; background: var(--after); color: var(--after-ink) !important; font-size: .88rem !important; }
.demo-outcome strong { color: var(--ink); font-family: var(--display-font); font-size: 1.25rem; font-weight: 400; white-space: nowrap; }
.step-list li:has(~ li [aria-current="step"]) + li::before,
.step-list li:has(~ li [aria-current="step"])::before { background: var(--p2); }
.step-list li:has([aria-current="step"])::before { background: var(--p2); }
.step-list li:first-child::before { display: none; }
.step-list [aria-current="step"] { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 6px 16px -8px #18203a80; }
.step-list [aria-current="step"]:hover { color: var(--paper); }

.cleaning-panel { padding: .9rem 1rem 1rem; }
.cleaning-panel table { font-size: .92rem; }
.cleaning-panel td, .cleaning-panel th { padding: .5rem .4rem; }
.cleaning-panel caption, .cleaning-stages caption { font-size: .9rem; }
.cleaning-panel .result-note, .cleaning-stages .result-note { position: relative; padding-left: 2.3rem; }
.cleaning-panel .result-note::before, .cleaning-stages .result-note::before {
  content: "i"; position: absolute; left: .65rem; top: .6rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem;
  border-radius: 50%; background: var(--p2); color: white; font: italic 700 .72rem/1 var(--display-font);
}
.cleaning-panel[data-state="before"] .result-note { color: var(--before-ink); border-left-color: var(--p3); }
.cleaning-panel[data-state="before"] .result-note::before, .cleaning-stages [data-state="before"] .result-note::before { background: var(--p3); content: "!"; font-style: normal; }
.cleaning-panel tbody tr:last-child td:last-child mark { white-space: nowrap; }

.step-actions { display: flex; gap: .5rem; margin-top: .85rem; }
.step-actions > button { flex: 1 1 0; min-height: 48px; }
.step-actions [data-step-next]::after { content: "→"; transition: transform .2s ease; }
.step-actions [data-step-next]:hover::after { transform: translateX(3px); }
.step-actions [aria-disabled="true"] { opacity: .45; cursor: default; }
.step-actions [aria-disabled="true"]:hover { border-color: var(--line-strong); }

/* No-JS: the four stages read as a numbered sequence */
.cleaning-stages { display: grid; gap: .75rem; counter-reset: stage; }
.cleaning-stages > li { counter-increment: stage; }
.cleaning-stages .panel-label::before { content: counter(stage) ". "; color: var(--accent); }

/* Before / after panels */
.demo-state { position: relative; padding: .8rem .85rem .85rem; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: .86rem; transition: background-color .25s ease, border-color .25s ease; }
.demo-state[data-state="before"] { background: var(--before); border-color: #efdcb9; }
.demo-state[data-state="after"] { background: var(--after); border-color: #c5e0d9; }
.demo-state + .demo-state:not([hidden]) { margin-top: .6rem; }
.demo-state[hidden] + .demo-state { margin-top: 0; }
.state-tag { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .5rem; padding: .12rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.state-tag::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
[data-state="before"] .state-tag { background: #f5e2bf; color: var(--before-ink); }
[data-state="after"] .state-tag { background: #c9e5de; color: var(--after-ink); }

.demo-button { justify-content: space-between; width: 100%; padding-inline: 1.1rem; background: var(--ink); color: var(--paper); text-align: left; }
.demo-button:hover { background: var(--accent); }
.demo-button > span:last-child { font-size: 1.05rem; }
.demo-button[aria-expanded="true"] { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.demo-button[aria-expanded="true"]:hover { background: var(--paper); border-color: var(--ink-soft); }

table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
caption, .panel-label { margin-bottom: .4rem; text-align: left; color: var(--ink); font-size: .86rem; font-weight: 700; }
td, th { padding: .34rem .25rem; border-bottom: 1px solid #18203a14; vertical-align: top; }
th { color: var(--muted); font-size: .74rem; font-weight: 650; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
.record-list, .plain-list { margin: 0; }
.record-list div { padding-block: .4rem; border-bottom: 1px solid #18203a14; }
.record-list div:last-child { border-bottom: 0; }
.record-list dt { font-weight: 650; color: var(--ink); }
.record-list dd { margin: 0; color: var(--muted); }
.plain-list { padding-left: 1.1rem; color: var(--ink-soft); }
.plain-list li + li { margin-top: .3rem; }
.result-note { margin-top: .7rem; padding: .55rem .7rem; border-radius: .5rem; background: var(--surface); color: var(--after-ink); border-left: 3px solid var(--p2); }
.result-note strong { color: var(--ink); }

/* In numbers */
.numbers { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.number-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.number-list li { padding: 1.3rem 1.25rem 1.4rem; background: var(--surface); }
.number-list strong { display: block; font: 400 clamp(2.6rem, 5vw, 3.6rem)/1 var(--display-font); letter-spacing: -.04em; color: var(--ink); }
.number-list li:nth-child(1) strong { color: var(--p1); }
.number-list li:nth-child(2) strong { color: var(--accent); }
.number-list li:nth-child(3) strong { color: var(--p2); }
.number-list li:nth-child(4) strong { color: #94660f; }
.number-list span { display: block; margin-top: .55rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* Career trajectory */
.trajectory { margin-bottom: 1.5rem; }
.traj-track { display: flex; gap: 3px; height: 2.4rem; }
.traj-seg { position: relative; display: flex; align-items: center; flex: 0 0 calc(var(--w) * 1% - 2px); min-width: 0; padding-inline: .6rem; border-radius: .55rem; font-size: .74rem; white-space: nowrap; }
.traj-seg b { font-weight: 700; letter-spacing: .02em; }
.seg-arc { background: var(--p3-soft); color: #6b4a08; padding-inline: .35rem; }
.seg-osp { background: #efd9a8; color: #5e4106; }
.seg-wp { background: var(--p1); color: white; }
.seg-wp::after { content: ""; position: absolute; right: .6rem; width: .55rem; height: .55rem; border-radius: 50%; background: white; box-shadow: 0 0 0 4px #ffffff40; }
.traj-years { position: relative; height: 1.4rem; margin-top: .35rem; }
.traj-years span { position: absolute; left: calc(var(--at) * 1%); font-size: .72rem; font-weight: 650; color: var(--muted); padding-left: .4rem; border-left: 1px solid var(--line-strong); line-height: 1.4rem; }

/* Experience timeline */
.timeline { position: relative; }
.role { position: relative; display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr); gap: clamp(1.25rem, 4vw, 4rem); padding: 1.75rem 0 1.75rem 2.25rem; }
.role::before { content: ""; position: absolute; left: .45rem; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.role:first-child::before { top: 2.2rem; }
.role:last-child::before { bottom: auto; height: 2.2rem; }
.role::after { content: ""; position: absolute; left: 0; top: 1.95rem; width: .95rem; height: .95rem; border-radius: 50%; background: var(--p3-soft); border: 2px solid var(--p3); }
.role-current::after { background: var(--p1); border-color: var(--p1); box-shadow: 0 0 0 5px var(--p1-soft); }
.role + .role { border-top: 1px solid var(--line); }
.current-badge { display: inline-block; margin-bottom: .5rem; padding: .14rem .6rem; border-radius: 999px; background: var(--p1-soft); color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.role-meta .eyebrow { color: var(--muted); }
.role-meta h3 { margin-block: .3rem .15rem; font-family: var(--display-font); font-size: 1.9rem; font-weight: 400; letter-spacing: -.02em; }
.role-meta > p:last-child { font-size: .94rem; color: var(--ink-soft); }
.role-detail > p { color: var(--ink-soft); }
.role-detail ul { margin: .7rem 0 0; padding-left: 1.2rem; }
.role-detail li { margin-top: .45rem; padding-left: .2rem; color: var(--muted); }
.role-detail li::marker { color: var(--p1); }

/* About and the interests orbit */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.about-copy > p:not(.section-kicker) { max-width: 52ch; margin-top: .9rem; font-size: 1.04rem; }
.skills-panel { margin-top: 1.5rem; padding: 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.skills-panel h3 { font-family: var(--display-font); font-size: 1.5rem; font-weight: 400; }
.skills { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.skills li { padding: .3rem .75rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; color: var(--ink-soft); }

.interests { position: relative; }
.interests figcaption { position: absolute; top: 0; left: 0; color: var(--accent); }
.system { position: relative; aspect-ratio: 1; max-width: 34rem; margin-inline: auto; }
.system-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.system-rings .ring { fill: none; stroke: #bfb39b; stroke-width: 1.2; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.system-rings .core { fill: var(--ink); }
.system-rings .core-label { fill: var(--paper); font: 600 15px var(--body-font); letter-spacing: .06em; }
.system-rings .stars circle { fill: var(--ink-soft); opacity: .4; }
.moons { margin: 0; padding: 0; list-style: none; }
.moon {
  position: absolute; display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: start;
  width: max-content; max-width: 12.5rem; padding: .55rem .75rem .6rem .6rem; border: 1px solid var(--line); border-radius: .9rem;
  background: #fffdf8f2; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.moon:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.moon .planet { grid-row: span 2; margin-top: .3rem; width: .8rem; height: .8rem; }
.moon strong { font-size: .92rem; line-height: 1.3; }
.moon > span:last-child { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.m-astro  { left: 52%; top: 22%; }
.m-travel { left: 2%;  top: 9%; }
.m-saints { left: 0; top: 42%; }
.m-study  { right: 0; top: 54%; }
.m-build  { left: 12%; top: 76%; }

/* Contact */
.contact {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  margin-block: clamp(2.5rem, 6vw, 4.5rem); padding: clamp(1.75rem, 5vw, 3.25rem);
  border: 1px solid var(--line-strong); border-radius: calc(var(--radius) + .5rem);
  background: linear-gradient(120deg, var(--p1-soft), var(--surface) 85%);
}
.contact::before, .contact::after { content: ""; position: absolute; border: 1px dashed #a8401d55; border-radius: 50%; pointer-events: none; }
.contact::before { width: 26rem; height: 26rem; right: -9rem; top: -13rem; }
.contact::after { width: 16rem; height: 16rem; right: -4rem; top: -8rem; border-style: solid; border-color: #a8401d26; }
.contact > * { position: relative; }
.contact.section-space { padding-block: clamp(1.75rem, 5vw, 3.25rem); }
.contact p { margin-top: .7rem; max-width: 40ch; }
.contact .contact-address { margin-top: .4rem; font-family: var(--mono-font); font-size: .95rem; word-break: break-all; }
.contact .secondary { background: var(--surface); }
.contact .primary:hover span[aria-hidden] { transform: translate(2px, -2px); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.15rem; color: var(--muted); font-size: .88rem; }
.footer-inner a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy > * { animation: appear .5s cubic-bezier(.2,.7,.3,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .05s; }
  .hero-copy > :nth-child(3) { animation-delay: .1s; }
  .hero-copy > :nth-child(4) { animation-delay: .15s; }
  .hero-copy > :nth-child(5) { animation-delay: .2s; }
  .now-card { animation: appear .5s .25s cubic-bezier(.2,.7,.3,1) both; }

  /* The moon circles the full stop three times, then rests */
  .full-stop::after { animation: moon-x 2.4s ease-in-out 6 alternate, moon-y 2.4s ease-in-out -1.2s 6 alternate; }

  .system-rings .ring { animation: drift 30s linear 2; }
  .system-rings .r2 { animation-direction: reverse; }

  /* Walkthrough: each step reads as a change, not a page swap */
  .cleaning-panel.is-entering tbody tr { animation: row-in .32s cubic-bezier(.2,.7,.3,1) both; }
  .cleaning-panel.is-entering tbody tr:nth-child(2) { animation-delay: .05s; }
  .cleaning-panel.is-entering tbody tr:nth-child(3) { animation-delay: .1s; }
  .cleaning-panel.is-entering tbody tr:nth-child(4) { animation-delay: .15s; }
  .cleaning-panel.is-entering mark.fixed {
    background-image: linear-gradient(#bfe0d8, #bfe0d8); background-repeat: no-repeat;
    animation: sweep .6s .2s ease-out both;
  }
  .cleaning-panel.is-entering mark.flag { animation: blink-flag .9s .25s ease-out both; }
  .cleaning-panel.is-entering .result-note { animation: appear .35s .2s ease-out both; }
  .demo-state.is-entering:not(.cleaning-panel) { animation: reveal .24s cubic-bezier(.2,.7,.3,1); }
  .button:active, .demo-button:active { transform: translateY(1px); }

  @keyframes appear { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
  @keyframes reveal { from { opacity: 0; transform: translateY(.35rem) scale(.99); } to { opacity: 1; transform: none; } }
  @keyframes row-in { from { opacity: 0; transform: translateX(-.4rem); } to { opacity: 1; transform: none; } }
  @keyframes sweep { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
  @keyframes blink-flag { 0%, 100% { box-shadow: 0 0 0 0 #c7922b00; } 35% { box-shadow: 0 0 0 4px #c7922b55; } }
  @keyframes moon-x { from { left: calc(50% - .24em); } to { left: calc(50% + .24em); } }
  @keyframes moon-y { from { bottom: .07em; } to { bottom: .21em; } }
  @keyframes drift { to { stroke-dashoffset: -180; } }
}
/* Reduced motion: instant change plus a brief colour cue */
@media (prefers-reduced-motion: reduce) {
  .demo-state.is-entering { animation: cue .4s linear; }
  @keyframes cue { from { box-shadow: 0 0 0 3px var(--p2); } to { box-shadow: 0 0 0 0 transparent; } }
}

/* Tablet */
@media (max-width: 58rem) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .now-card { max-width: 34rem; }
  .demo-featured { grid-template-columns: 1fr; }
  .number-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .system { max-width: 30rem; }
}
/* Phone */
@media (max-width: 42rem) {
  html { scroll-padding-top: 6.75rem; }
  .shell { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: 0; min-height: 0; padding-block: .55rem 0; }
  .site-header nav { width: 100%; margin-inline: -.55rem; gap: 0; }
  nav a { min-height: 2.75rem; font-size: .88rem; }
  .hero { gap: 0; padding-block: 1.6rem 1.25rem; }
  .hero h1 { font-size: clamp(2.7rem, 13.5vw, 4.4rem); }
  .hero-role { margin-top: .7rem; font-size: 1.25rem; }
  .hero-intro { font-size: .98rem; }
  .hero-links { margin-top: 1.1rem; gap: .45rem; }
  .hero-links .button { min-height: 2.75rem; padding-inline: .95rem; }
  .now-card { display: none; }
  .work-section .section-space { padding-top: 1.75rem; }
  .section-heading { margin-bottom: 1rem; }
  .demo-featured { padding: 1rem; }
  .step-list .button { font-size: .78rem; padding-inline: .2rem; }
  .cleaning-panel { padding: .75rem; }
  .cleaning-panel table { font-size: .86rem; }
  .demo-grid { grid-template-columns: 1fr; }
  .number-list li { padding: 1rem; }
  .role { grid-template-columns: 1fr; gap: .75rem; padding-left: 1.9rem; }
  .role-meta h3 { font-size: 1.6rem; }
  .traj-track { height: 2.1rem; }
  .traj-seg { font-size: .68rem; }
  .traj-years span:first-child { display: none; }
  /* The orbit becomes a list with a small solar-system header */
  .interests figcaption { position: static; margin-bottom: .75rem; }
  .system { aspect-ratio: auto; max-width: none; }
  .system-rings { position: relative; display: block; width: 11rem; height: 11rem; margin: -.5rem auto .5rem; }
  .system-rings .core-label { font-size: 26px; }
  .moons { display: grid; gap: .5rem; }
  .moon { position: static; width: auto; max-width: none; }
  .contact { align-items: flex-start; flex-direction: column; margin-inline: 1rem; width: auto; }
}
@media (max-width: 22rem) {
  .brand { font-size: .95rem; }
  nav a { padding-inline: .45rem; font-size: .84rem; }
  .demo { padding: 1rem; }
  .number-list { grid-template-columns: 1fr; }
  .step-list .button { font-size: .74rem; }
}

/* Print: a clean one-colour CV */
@media print {
  @page { margin: 15mm; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body { background: white; color: #1b1f2c; font-size: 10pt; }
  .shell { width: 100%; }
  .site-header, .site-footer, .work-section, .hero-links, .now-card, .skip-link, .trajectory, .interests, .section-kicker, .hero::before, .hero::after { display: none !important; }
  .hero, .section-space, .role { display: block; padding-block: .6rem; }
  .hero h1 { font-size: 32pt; }
  .full-stop { color: inherit; }
  .full-stop::before, .full-stop::after { display: none; }
  h2 { font-size: 20pt; }
  .hero-role { font-size: 14pt; max-width: none; }
  .hero-intro, .about-copy > p { max-width: none; font-size: 10pt; }
  .numbers { padding: .4rem 0; break-inside: avoid; }
  .number-list { border: 0; background: none; gap: .4rem 1rem; }
  .number-list li { padding: 0; background: none; }
  .number-list strong { font-size: 18pt; color: inherit !important; }
  .number-list span { font-size: 9pt; margin-top: .1rem; }
  .role { padding-left: 0; }
  .role::before, .role::after, .location::before { display: none; }
  .current-badge { padding: 0; background: none; }
  .role-meta h3 { font-size: 14pt; }
  .role-detail { margin-top: .3rem; }
  .role, .skills-panel, .contact { break-inside: avoid; }
  .section-heading { margin-bottom: .5rem; }
  .about-section { background: none; border: 0; }
  .about-grid { display: block; }
  .skills-panel { padding: .6rem 0 0; border: 0; box-shadow: none; }
  .skills li { background: transparent; border: 1px solid #ccc; }
  .contact { display: block; margin: 0; padding: .6rem 0; background: none; color: inherit; border: 0; border-radius: 0; }
  .contact::before, .contact::after { display: none; }
  .contact .actions { display: none; }
  .contact .contact-address a { color: #1b1f2c; text-decoration: none; }
}
/* ==========================================================================
   03 · Projects (Claude, ticket 06)
   Two live-site cards with real screenshots, then two interactive demos.
   ========================================================================== */
.projects .section-heading { max-width: 48rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.ram-project, .booking-project { grid-column: 1 / -1; }

/* Live site cards: each borrows its client's colours */
.site-card {
  --brand: var(--ink); --brand-soft: var(--paper-deep); --brand-ink: var(--ink);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .25s ease, transform .25s ease;
}
.site-hookd { --brand: #a53a5b; --brand-soft: #fde6e8; --brand-ink: #8a2f4c; }
.site-dk    { --brand: #1d4ed8; --brand-soft: #dde6fb; --brand-ink: #1a3fae; }
.site-preview {
  position: relative; aspect-ratio: 16 / 10; padding: 1.25rem 1.25rem 0; overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, #ffffff99 0 3rem, transparent 3.1rem),
    linear-gradient(160deg, var(--brand-soft), #fffdf8 120%);
}
.site-dk .site-preview { background: radial-gradient(circle at 15% 85%, #ffffff55 0 4rem, transparent 4.1rem), linear-gradient(160deg, #2a5be6, #1a3fae); }
.browser { position: relative; width: 84%; border-radius: .7rem .7rem 0 0; overflow: hidden; background: white; box-shadow: 0 18px 40px -18px #18203a80; transition: transform .35s cubic-bezier(.2,.7,.3,1); }
.browser-bar { display: flex; align-items: center; gap: .3rem; height: 1.55rem; padding-inline: .6rem; background: #f1ece3; border-bottom: 1px solid #e3dccf; }
.browser-bar i { width: .45rem; height: .45rem; border-radius: 50%; background: #d4cbbb; }
.browser-bar b { margin-left: .5rem; padding: .05rem .6rem; border-radius: 99px; background: white; color: var(--muted); font: 600 .62rem/1.5 var(--body-font); letter-spacing: .02em; }
.browser img { display: block; width: 100%; height: auto; }
.handset {
  position: absolute; right: 1.1rem; bottom: -1.6rem; width: 25%; padding: .3rem; border-radius: 1.1rem; background: #1b1e27;
  box-shadow: 0 20px 40px -14px #18203a99; transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.handset img { display: block; width: 100%; height: auto; border-radius: .85rem; }
.site-body { display: flex; flex: 1; flex-direction: column; gap: .4rem; padding: 1.25rem 1.35rem 1.35rem; border-top: 3px solid var(--brand); }
.site-kicker { color: var(--brand-ink); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.site-body h3 { font-family: var(--display-font); font-size: 1.75rem; font-weight: 400; letter-spacing: -.02em; }
.site-hookd h3 { font-style: italic; color: var(--brand-ink); }
.site-dk h3 { font-family: var(--body-font); font-weight: 750; font-size: 1.55rem; letter-spacing: -.01em; color: var(--brand-ink); }
.site-body > p:not(.site-kicker) { font-size: .95rem; }
.site-button { align-self: flex-start; margin-top: auto; translate: 0 .35rem; background: var(--brand); color: white; }
.site-button:hover { background: var(--brand-ink); }
.site-button span[aria-hidden] { transition: transform .2s ease; }
.site-card:hover { box-shadow: var(--shadow-lift); }

/* Shared demo bits */
.project-controls { display: grid; gap: .35rem; margin-block: 1rem .75rem; }
.project-controls label { color: var(--ink); font-weight: 700; font-size: .86rem; }
.project-controls select {
  width: 100%; min-height: 46px; padding: .5rem 2.4rem .5rem .8rem; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line-strong); border-radius: .8rem; color: var(--ink); font: 600 .95rem/1.3 var(--body-font);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2318203a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .9rem center;
  cursor: pointer;
}
.project-controls select:hover { border-color: var(--ink-soft); }
.project-footnote { margin-top: .85rem; font-size: .82rem; }

/* RAM assessment */
.ram-project { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr); gap: clamp(1rem, 3vw, 2.25rem); align-items: start; padding: clamp(1.2rem, 3vw, 2rem); }
.ram-project .project-footnote, .ram-project [role="status"] { grid-column: 1 / -1; margin-top: 0; }
.ram-project .demo-heading h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; }
.ram-scale { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.ram-scale li {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem .25rem .3rem; border: 1px solid var(--line);
  border-radius: 99px; background: var(--paper); color: var(--muted); font-size: .78rem; font-weight: 650; opacity: .7;
  transition: opacity .2s ease, background-color .2s ease, border-color .2s ease;
}
.ram-scale span { display: grid; place-items: center; width: 1.2rem; height: 1.2rem; color: white; font-size: .7rem; font-weight: 800; }
.r-green span  { background: #2e7d4f; border-radius: 50%; }
.r-amber span  { background: #b7791f; clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: .3rem; font-size: .62rem; line-height: 1; }
.r-red span    { background: #b42318; border-radius: .2rem; }
.r-review span { position: relative; isolation: isolate; }
.r-review span::before { content: ""; position: absolute; inset: .17rem; z-index: -1; background: #4a5578; border-radius: .15rem; transform: rotate(45deg); }
.ram-project:has([data-rating="green"]:not([hidden])) .r-green,
.ram-project:has([data-rating="amber"]:not([hidden])) .r-amber,
.ram-project:has([data-rating="red"]:not([hidden])) .r-red,
.ram-project:has([data-rating="review"]:not([hidden])) .r-review { opacity: 1; background: var(--surface); border-color: var(--ink-soft); color: var(--ink); box-shadow: 0 4px 12px -6px #18203a55; }

.ram-cases { margin: 0; }
.ram-case {
  --tone: #2e7d4f; --tone-soft: #e2f1e8; --tone-line: #bfe0cb;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-areas: "verdict evidence" "reason evidence" "stages stages";
  gap: .5rem 1rem; padding: 1.1rem 1.15rem 1.2rem; font-size: .92rem;
}
.ram-case.demo-state { background: var(--tone-soft); border: 1px solid var(--tone-line); }
.ram-case[data-rating="amber"]  { --tone: #b7791f; --tone-soft: #fbf1df; --tone-line: #efd9ae; }
.ram-case[data-rating="red"]    { --tone: #b42318; --tone-soft: #fbe7e4; --tone-line: #f1c4bd; }
.ram-case[data-rating="review"] { --tone: #4a5578; --tone-soft: #eceff6; --tone-line: #cfd5e5; }
.ram-verdict { grid-area: verdict; display: flex; align-items: center; gap: .7rem; }
.ram-verdict h4 { font: 400 clamp(1.45rem, 2.6vw, 1.85rem)/1.1 var(--display-font); letter-spacing: -.02em; color: var(--ink); }
.ram-badge { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; background: var(--tone); color: white; font-weight: 800; font-size: 1.05rem; }
[data-rating="green"] .ram-badge  { border-radius: 50%; }
[data-rating="amber"] .ram-badge  { clip-path: polygon(50% 3%, 100% 95%, 0 95%); padding-top: .55rem; width: 2.6rem; }
[data-rating="red"] .ram-badge    { border-radius: .45rem; }
[data-rating="review"] .ram-badge { position: relative; isolation: isolate; background: none; }
[data-rating="review"] .ram-badge::before { content: ""; position: absolute; inset: .3rem; z-index: -1; background: var(--tone); border-radius: .3rem; transform: rotate(45deg); }
.ram-reason { grid-area: reason; color: var(--ink-soft); max-width: 46ch; }
.ram-evidence { grid-area: evidence; align-self: start; margin: 0; padding: .75rem .85rem; border-radius: .8rem; background: var(--surface); border: 1px dashed var(--tone-line); }
.ram-evidence dt { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ram-evidence dd { margin: .2rem 0 0; color: var(--ink); font-weight: 650; line-height: 1.35; }
.ram-stages { grid-area: stages; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.ram-stages li { position: relative; display: grid; gap: .1rem; padding: .55rem .55rem .5rem; border-radius: .6rem; background: var(--surface); border-top: 3px solid var(--line-strong); min-width: 0; }
.stage-name { color: var(--ink); font-size: .76rem; font-weight: 700; overflow-wrap: anywhere; }
.stage-state { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .74rem; }
.stage-state::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--line-strong); }
[data-stage="pass"] { border-top-color: #2e7d4f; }
[data-stage="pass"] .stage-state::before { background: #2e7d4f; }
[data-stage="flag"] { border-top-color: #b7791f; background: #fff7e8; }
[data-stage="flag"] .stage-state { color: #7a4a07; font-weight: 700; }
[data-stage="flag"] .stage-state::before { background: #b7791f; border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
[data-stage="hold"] { border-top-color: #4a5578; border-top-style: dashed; }
[data-stage="hold"] .stage-state { color: #333c5a; font-weight: 700; }
[data-stage="hold"] .stage-state::before { background: #4a5578; border-radius: 1px; transform: rotate(45deg); }
[data-stage="stop"] { border-top-color: #b42318; background: #fff3f1; }
[data-stage="stop"] .stage-state { color: #8f1c13; font-weight: 700; }
[data-stage="stop"] .stage-state::before { background: #b42318; border-radius: 1px; }
[data-stage="skip"] { background: repeating-linear-gradient(135deg, #fffdf8 0 6px, #f3efe7 6px 12px); }
[data-stage="skip"] .stage-name { color: var(--muted); }
[data-stage="skip"] .stage-state::before { background: transparent; border: 1.5px solid var(--line-strong); }

/* Recruitment CRM */
.booking-project { padding: clamp(1.2rem, 3vw, 2rem); }



/* Weekly calendar: client position stays pinned while days scroll */
.calendar-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin-top: .5rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); scroll-snap-type: x proximity; }
.calendar-scroll:focus-visible { outline-offset: 2px; }
.calendar-table { min-width: 44rem; border-collapse: separate; border-spacing: 0; }
.calendar-table caption { padding: .8rem .9rem .3rem; font-size: .86rem; }
.calendar-table th, .calendar-table td { padding: .55rem .45rem; border-bottom: 1px solid var(--line); }
.calendar-table tbody tr:last-child > * { border-bottom: 0; }
.calendar-table thead th { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.calendar-table thead th:nth-child(7), .calendar-table thead th:nth-child(8) { color: var(--accent); }
.calendar-table th:first-child {
  position: sticky; left: 0; z-index: 1; width: 11rem; min-width: 11rem; padding-left: .9rem; text-align: left; background: var(--surface);
  box-shadow: 1px 0 0 var(--line), 8px 0 12px -10px #18203a40;
}
.calendar-table tbody th { color: var(--ink); font-size: .86rem; line-height: 1.3; }
.calendar-client { display: block; margin-top: .1rem; color: var(--muted); font-size: .74rem; font-weight: 500; }
.calendar-table td { position: relative; min-width: 4.4rem; scroll-snap-align: start; text-align: center; white-space: nowrap; font-size: .86rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink-soft); background: none; border-left: 0; border-right: 0; border-top: 0; }
.calendar-table td::before {
  content: ""; position: absolute; left: .45rem; right: .45rem; bottom: .3rem; height: .3rem; border-radius: 99px;
  background: linear-gradient(90deg, var(--p2) calc(var(--fill, 0) * 100%), #e7e1d5 0);
}
.calendar-table td[data-full] { background: var(--p2-soft); color: var(--after-ink); }
.calendar-table td[data-full]::after { content: "Full"; display: block; margin-top: -.1rem; margin-bottom: .2rem; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p2); }
.calendar-table td[data-full]::before { background: var(--p2); }
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .55rem; font-size: .78rem; }
.legend-bar { width: 2.2rem; height: .3rem; border-radius: 99px; background: linear-gradient(90deg, var(--p2) 65%, #e7e1d5 0); }
.legend-full { margin-left: .5rem; padding: .05rem .4rem; border-radius: .3rem; background: var(--p2-soft); color: var(--p2); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-hint, .calendar-title { display: none; }

/* Roster: filters, table and pages */
.booking-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 .75rem; margin-top: 1.4rem; padding: .3rem 1rem .1rem; border-radius: .9rem; background: var(--paper); border: 1px solid var(--line); }
.filters-title { flex: 1 0 100%; margin-top: .75rem; color: var(--ink); font: 400 1.2rem/1.2 var(--display-font); }
.booking-filters > .project-controls { flex: 1 1 11rem; margin-block: .6rem .8rem; }
.booking-table.demo-state { margin-top: .75rem; padding: .3rem .8rem .5rem; background: var(--surface); border: 1px solid var(--line); }
.booking-table caption { padding-top: .5rem; }
.booking-table th, .booking-table td { padding: .55rem .4rem; font-size: .88rem; vertical-align: middle; }
.booking-table tbody th { font-family: var(--mono-font); font-size: .82rem; color: var(--ink-soft); }
.booking-table tbody td:nth-child(3) { white-space: nowrap; }
.booking-table tbody tr td:nth-child(3)::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .4rem; border-radius: 50%; background: var(--line-strong); vertical-align: .05em; }
.booking-table tr[data-status="Booked"] td:nth-child(3) { color: var(--after-ink); font-weight: 650; }
.booking-table tr[data-status="Booked"] td:nth-child(3)::before { background: var(--p2); }
.booking-table tr[data-status="Eligible"] td:nth-child(3)::before { background: transparent; border: 2px solid var(--p2); width: .45rem; height: .45rem; }
.booking-table tr[data-status="Checks pending"] td:nth-child(3) { color: var(--before-ink); white-space: normal; }
.booking-table tr[data-status="Checks pending"] td:nth-child(3)::before { background: var(--p3); border-radius: 1px; transform: rotate(45deg); }
.booking-table tr[data-status="Waitlisted"] td:nth-child(3) { color: var(--muted); }
.booking-table tr[data-status="Waitlisted"] td:nth-child(3)::before { background: transparent; border: 2px dashed #8a8f9e; width: .45rem; height: .45rem; }
.booking-table tr[data-full-week] td:last-child { color: var(--accent); font-weight: 700; }
.booking-pages { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; margin-top: .75rem; }
.booking-pages .button { min-height: 46px; padding-inline: .9rem; }
.booking-pages span#booking-page { text-align: center; color: var(--ink); font-size: .88rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-pages [aria-disabled="true"] { opacity: .4; cursor: default; }
.booking-pages [aria-disabled="true"]:hover { border-color: var(--line-strong); }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .site-card:hover .browser { transform: translateY(-4px); }
  .site-card:hover .handset { transform: translateY(-10px) rotate(-2deg); }
  .site-button:hover span[aria-hidden] { transform: translate(2px, -2px); }
  .ram-case:not([hidden]) { animation: appear .3s cubic-bezier(.2,.7,.3,1) both; }
  .ram-case:not([hidden]) .ram-stages li { animation: appear .3s cubic-bezier(.2,.7,.3,1) both; }
  .ram-case:not([hidden]) .ram-stages li:nth-child(2) { animation-delay: .05s; }
  .ram-case:not([hidden]) .ram-stages li:nth-child(3) { animation-delay: .1s; }
  .ram-case:not([hidden]) .ram-stages li:nth-child(4) { animation-delay: .15s; }
  .ram-case:not([hidden]) .ram-stages li:nth-child(5) { animation-delay: .2s; }
  .calendar-table td::before { animation: fill-in .6s cubic-bezier(.2,.7,.3,1) both; }
  @keyframes fill-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
}

/* Tablet */
@media (max-width: 58rem) {
  .ram-project { grid-template-columns: 1fr; }
}
/* Phone */
@media (max-width: 42rem) {
  .nav-long { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .site-preview { padding: 1rem 1rem 0; }
  .handset { right: .8rem; width: 27%; }
  .site-body h3 { font-size: 1.55rem; }
  .ram-project, .booking-project { padding: 1rem; }
  .ram-case { grid-template-columns: 1fr; grid-template-areas: "verdict" "evidence" "reason" "stages"; padding: 1rem; }
  .ram-stages { grid-template-columns: 1fr; gap: 0; padding-left: .2rem; }
  .ram-stages li { grid-template-columns: 1fr auto; align-items: center; padding: .5rem .7rem; border-top: 0; border-left: 3px solid var(--line-strong); border-radius: 0; }
  .ram-stages li:first-child { border-radius: .5rem .5rem 0 0; }
  .ram-stages li:last-child { border-radius: 0 0 .5rem .5rem; }
  .ram-stages li + li { box-shadow: inset 0 1px 0 var(--line); }
  [data-stage="pass"] { border-left-color: #2e7d4f; }
  [data-stage="flag"] { border-left-color: #b7791f; }
  [data-stage="hold"] { border-left-color: #4a5578; border-left-style: dashed; }
  [data-stage="stop"] { border-left-color: #b42318; }
  .stage-name { font-size: .84rem; }
  .stage-state { font-size: .8rem; }
  .calendar-hint { display: flex; align-items: center; gap: .4rem; margin-top: .6rem; font-size: .8rem; }
  .calendar-hint::before { content: "↔"; font-weight: 800; color: var(--accent); }
  .calendar-table { min-width: 38rem; }
  .calendar-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .calendar-title { display: block; margin-top: .6rem; color: var(--ink); font-size: .86rem; font-weight: 700; }
  .calendar-table th:first-child { width: 8.4rem; min-width: 8.4rem; padding-left: .7rem; }
  .calendar-table tbody th { font-size: .8rem; }
  .calendar-client { font-size: .7rem; }
  .calendar-table td { min-width: 4rem; font-size: .8rem; }
  .booking-filters { padding-inline: .8rem; }
  /* Roster rows become compact cards; headings stay in the DOM for screen readers */
  .booking-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .booking-table.demo-state { padding: .25rem .6rem .4rem; }
  .booking-table table, .booking-table tbody { display: block; }
  .booking-table caption { display: block; }
  .booking-table tbody tr { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "id status" "role role" "days days"; gap: .1rem .6rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); }
  .booking-table tbody tr:last-child { border-bottom: 0; }
  .booking-table tbody tr > * { display: block; padding: 0; border: 0; font-size: .86rem; }
  .booking-table tbody th { grid-area: id; }
  .booking-table tbody td:nth-child(2) { grid-area: role; color: var(--ink); font-weight: 600; }
  .booking-table tbody td:nth-child(3) { grid-area: status; justify-self: end; text-align: right; white-space: normal; }
  .booking-table tbody td:nth-child(4) { grid-area: days; color: var(--muted); font-size: .82rem; }
  .booking-table tbody td:nth-child(4)::before { content: "Days · "; font-weight: 600; }
  .booking-pages .button { padding-inline: .75rem; }
}

/* --------------------------------------------------------------------------
   Recruitment CRM simulation: an app-style temp desk (Claude, ticket 06 rework)
   -------------------------------------------------------------------------- */
.crm .crm-head .demo-heading h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; }
.crm-app { margin-top: 1.2rem; border: 1px solid var(--line-strong); border-radius: 1.1rem; overflow: hidden; background: #fbf8f2; box-shadow: 0 1px 0 #ffffff inset, var(--shadow); }
.crm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem .9rem; background: var(--ink); color: var(--paper); }
.crm-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; color: var(--paper); font-weight: 700; }
.crm-logo { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: .45rem; background: var(--p3); color: var(--ink); font: 800 .85rem/1 var(--body-font); }
.crm-week { color: #c9c6be; font-size: .8rem; font-weight: 500; }
.crm-controls { display: flex; gap: .45rem; }
.crm-controls .button { min-height: 44px; }
.crm-controls .primary { background: var(--paper); color: var(--ink); }
.crm-controls .primary:hover { background: var(--p3-soft); }
.crm-controls .secondary { background: transparent; color: var(--paper); border-color: #f6f2ea59; }
.crm-controls .secondary:hover { border-color: var(--paper); }
.crm-controls :focus-visible { outline-color: #9fd0f5; }
.crm-play-icon { width: .8rem; height: .8rem; background: currentColor; clip-path: polygon(10% 0, 100% 50%, 10% 100%); }
[data-play="playing"] .crm-play-icon { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
[data-play="done"] .crm-play-icon { clip-path: none; background: none; width: auto; height: auto; }
[data-play="done"] .crm-play-icon::before { content: "↺"; font-weight: 800; }
[data-play="idle"] #crm-play { box-shadow: 0 0 0 0 #c7922b88; }

.crm-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; margin: 0; padding: .8rem .9rem 0; list-style: none; }
.crm-stages li { position: relative; }
.crm-stages li + li::before { content: ""; position: absolute; top: 50%; right: 100%; width: .4rem; height: 2px; background: var(--line-strong); }
.crm-stages li[data-done]::before, .crm-stages li[data-done] + li::before { background: var(--p2); }
.crm-stages button {
  display: flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; min-height: 44px; padding: .4rem .5rem;
  border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); color: var(--muted); font-size: .86rem; font-weight: 650; cursor: pointer;
}
.crm-stages button:hover { color: var(--ink); border-color: var(--ink-soft); }
.crm-stages b { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--paper-deep); color: var(--ink-soft); font-size: .74rem; }
.crm-stages li[data-done] button { background: var(--p2-soft); border-color: #bcdcd5; color: var(--after-ink); }
.crm-stages li[data-done] b { background: var(--p2); color: white; font-size: 0; }
.crm-stages li[data-done] b::before { content: "✓"; font-size: .74rem; }
.crm-stages [aria-current="step"] { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 6px 16px -8px #18203a80; }
.crm-stages [aria-current="step"] b { background: var(--paper); color: var(--ink); }
.crm-stages li[data-done] [aria-current="step"] { background: var(--ink); color: var(--paper); }

.crm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; margin: .8rem .9rem 0; }
.crm-kpis > div { --c: var(--ink-soft); padding: .5rem .65rem .45rem; border-radius: .7rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); min-width: 0; }
.kpi-compliant { --c: var(--p2) !important; } .kpi-pending { --c: var(--p3) !important; } .kpi-unsuitable { --c: #9a9488 !important; }
.kpi-workers { --c: var(--p1) !important; } .kpi-fill { --c: var(--accent) !important; }
.crm-kpis dt { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-kpis dd { margin: .05rem 0 0; color: var(--ink); font: 400 1.6rem/1.15 var(--display-font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.crm-kpis small { color: var(--muted); font: 600 .78rem var(--body-font); letter-spacing: 0; }

.crm-stage { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: .8rem; padding: .8rem .9rem .9rem; align-items: start; }
.crm-canvas, .crm-feed { min-width: 0; }
.crm-canvas > section { min-width: 0; padding: .85rem .9rem .9rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); }
.crm-canvas-title { color: var(--ink); font: 400 1.2rem/1.2 var(--display-font); }
.crm-canvas-note { margin-top: .15rem; font-size: .84rem; }

.pool-grid { display: grid; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 3px; margin-top: .7rem; }
.dot { aspect-ratio: 1; border-radius: 50%; background: #e4ddcf; transition: background-color .25s ease, opacity .35s ease, box-shadow .35s ease, transform .25s ease; }
.dot.ok { background: var(--p2); }
.dot.wait { background: var(--p3); border-radius: 22%; transform: scale(.88); }
.dot.no { background: #a8a296; transform: scale(.55); }
.pool-grid.is-matching .dot:not(.avail) { opacity: .22; }
.pool-grid.is-matching .dot.avail { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--p1); }
.pool-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .75rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .76rem; }
.pool-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.pool-legend li::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: #e4ddcf; }
.lg-compliant::before { background: var(--p2) !important; }
.lg-pending::before { background: var(--p3) !important; border-radius: 22% !important; }
.lg-unsuitable::before { background: #a8a296 !important; transform: scale(.6); }
.lg-available::before { background: var(--p2) !important; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--p1); }
.lg-offered::before { background: var(--surface) !important; border: 1.5px dashed var(--ink-soft); }
.lg-confirmed::before { background: var(--p2) !important; }
.lg-awaiting::before { background: var(--p3-soft) !important; border: 1.5px solid var(--p3); }
.lg-open::before { border-radius: .2rem !important; background: repeating-linear-gradient(135deg, #f8d7d1 0 3px, #fff 3px 6px) !important; border: 1.5px dashed #b42318; }

/* Shift schedule */
.crm .calendar-scroll { scroll-snap-type: none; }
.schedule-table { min-width: 40rem; }
.schedule-table th:first-child { width: 9.5rem; min-width: 9.5rem; }
.order-role { display: block; color: var(--ink); font-weight: 700; }
.order-time { display: inline-block; margin-top: .2rem; padding: .05rem .4rem; border-radius: .3rem; background: var(--paper-deep); color: var(--ink-soft); font: 600 .7rem var(--mono-font); }
.schedule-table td { min-width: 0; vertical-align: top; padding: .55rem .3rem .8rem; }
.open-note { display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.schedule-table td .cell-count { display: block; font-size: .8rem; }
.cell-people { display: flex; justify-content: center; margin-top: .35rem; min-height: 1.4rem; }
.chip { display: grid; place-items: center; flex: none; width: 1.25rem; height: 1.25rem; margin-left: -.22rem; border-radius: 50%; font: 700 .52rem/1 var(--body-font); letter-spacing: -.03em; box-shadow: 0 0 0 2px var(--surface); }
.chip:first-child { margin-left: 0; }
.chip.offered { background: #eef0f5; color: var(--ink-soft); border: 1.5px dashed #8a90a6; }
.chip.confirmed { background: var(--p2); color: white; }
.chip.awaiting { background: var(--p3-soft); color: #6b4a08; border: 1.5px solid var(--p3); }
.chip.more { background: var(--paper-deep); color: var(--ink-soft); font-size: .58rem; }
.schedule-table td.closed { background: repeating-linear-gradient(135deg, transparent 0 6px, #f1ece3 6px 12px); color: #b0a99b; }
.schedule-table td.closed::before { display: none; }
.schedule-table td[data-open] { background: repeating-linear-gradient(135deg, #fdecea 0 6px, #fff8f6 6px 12px); color: #8f1c13; box-shadow: inset 0 0 0 1.5px #e7a49a; }
.schedule-table td[data-open] .cell-count { font-weight: 800; }
.schedule-table td[data-open]::before { background: linear-gradient(90deg, #b42318 calc(var(--fill, 0) * 100%), #f3d2cc 0); }
.schedule-table td[data-full]::after { content: none; }
.schedule-legend { margin-top: .6rem; }

/* Activity feed */
.crm-feed { padding: .8rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--paper); min-height: 100%; }
.crm-feed h4 { display: flex; align-items: center; gap: .45rem; color: var(--ink); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.crm-feed h4::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #9a9488; }
[data-play="playing"] .crm-feed h4::before { background: #2fa36b; box-shadow: 0 0 0 4px #2fa36b29; }
#crm-feed { display: grid; gap: .45rem; margin: .65rem 0 0; padding: 0; list-style: none; }
#crm-feed li { padding: .55rem .65rem; border-radius: .65rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); font-size: .8rem; line-height: 1.4; color: var(--ink-soft); }
#crm-feed li p { margin: 0; color: inherit; }
#crm-feed li p + p { margin-top: .2rem; }
#crm-feed b { color: var(--ink); }
#crm-feed p > span { color: var(--muted); }
#crm-feed .feed-idle { border-left-color: var(--line-strong); color: var(--muted); }
#crm-feed .feed-screen { border-left-color: var(--p2); }
#crm-feed .feed-order { border-left-color: var(--p1); }
#crm-feed .feed-book { border-left-color: var(--ink-soft); }
#crm-feed .feed-reply { border-left-color: var(--p2); }
#crm-feed .feed-alert { border-left-color: #b42318; background: #fff6f4; }
#crm-feed .feed-done { border-left-color: var(--p2); background: var(--p2-soft); }
.checks { display: flex; flex-wrap: wrap; gap: .2rem; }
.check { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .35rem; border-radius: .3rem; background: var(--after); color: var(--after-ink); font-size: .68rem; font-weight: 600; }
.check.ok::before { content: "✓"; font-weight: 800; }
.check.wait { background: var(--before); color: var(--before-ink); }
.check.wait::before { content: "…"; font-weight: 800; }
.check.no { background: #f1ece3; color: #6b6458; }
.check.no::before { content: "✕"; font-weight: 800; }
.verdict { font-weight: 700; }
.v-ok { color: var(--after-ink) !important; } .v-wait { color: var(--before-ink) !important; } .v-no { color: #6b6458 !important; }

/* Candidate records */
.crm-roster { padding: 0 .9rem .9rem; }
.crm-roster .booking-filters { margin-top: .2rem; background: var(--surface); }
.crm .booking-table tbody tr td:nth-child(3)::before { content: none; }
.crm .booking-table tbody th { font-family: var(--body-font); }
.crm .booking-table tbody th { display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; align-items: center; }
.cand-avatar { grid-row: span 2; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--paper-deep); color: var(--ink-soft); font-size: .66rem; font-weight: 800; }
.cand-name { color: var(--ink); font-size: .86rem; font-weight: 700; line-height: 1.2; }
.cand-id { color: var(--muted); font: 500 .72rem var(--mono-font); }
.crm .booking-table td .calendar-client { font-size: .74rem; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 99px; background: #f1ece3; color: var(--ink-soft); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
tr[data-status="Confirmed"] .pill { background: var(--p2-soft); color: var(--after-ink); }
tr[data-status="Confirmed"] .cand-avatar { background: var(--p2); color: white; }
tr[data-status="Awaiting reply"] .pill { background: var(--p3-soft); color: #6b4a08; }
tr[data-status="Awaiting reply"] .cand-avatar { background: var(--p3-soft); color: #6b4a08; box-shadow: inset 0 0 0 1.5px var(--p3); }
tr[data-status="Available, not booked"] .pill { background: var(--surface); color: var(--after-ink); box-shadow: inset 0 0 0 1.5px #9cc9bf; }
tr[data-status="Checks pending"] .pill { background: var(--before); color: var(--before-ink); }
tr[data-status="Checks pending"] .pill::before { border-radius: 1px; transform: rotate(45deg); }
tr[data-status="Not suitable"] .pill { color: #6b6458; }
tr[data-status="Not suitable"] .pill::before { background: none; border: 1.5px solid currentColor; width: .35rem; height: .35rem; }
tr[data-status="Not available this week"] .pill { color: var(--muted); }
tr[data-status="Not available this week"] .pill::before { background: none; border: 1.5px dashed currentColor; width: .35rem; height: .35rem; }

@media (prefers-reduced-motion: no-preference) {
  .dot.pop { animation: dot-pop .4s cubic-bezier(.3,1.6,.5,1) both; }
  .schedule-table td.ping { animation: cell-ping .5s ease-out; }
  .schedule-table td.ping .chip:last-child { animation: dot-pop .35s cubic-bezier(.3,1.6,.5,1) both; }
  #crm-feed .is-new { animation: feed-in .3s cubic-bezier(.2,.7,.3,1) both; }
  .crm-schedule:not([hidden]), .crm-pool:not([hidden]) { animation: appear .35s cubic-bezier(.2,.7,.3,1) both; }
  [data-play="idle"] #crm-play { animation: nudge 2.4s ease-in-out 3; }
  @keyframes dot-pop { from { transform: scale(.2); } }
  @keyframes cell-ping { 0% { background-color: #dcefebcc; } 100% { background-color: transparent; } }
  @keyframes feed-in { from { opacity: 0; transform: translateY(-.4rem); } to { opacity: 1; transform: none; } }
  @keyframes nudge { 0%, 70%, 100% { box-shadow: 0 0 0 0 #c7922b00; } 35% { box-shadow: 0 0 0 6px #c7922b55; } }
}

@media (max-width: 58rem) {
  .crm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm-stage { grid-template-columns: 1fr; }
  #crm-feed { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
}
@media (max-width: 42rem) {
  .crm-app { margin-inline: -.35rem; border-radius: .9rem; }
  .crm-bar { padding: .65rem .7rem; }
  .crm-controls { width: 100%; }
  .crm-controls .button { flex: 1; padding-inline: .6rem; }
  .crm-stages { gap: .3rem; padding: .7rem .7rem 0; }
  .crm-stages li + li::before { width: .3rem; }
  .crm-stages button { flex-direction: column; gap: .15rem; padding: .35rem .2rem; font-size: .74rem; }
  .crm-kpis { margin-inline: .7rem; gap: .3rem; }
  .crm-kpis > div { padding: .4rem .5rem .35rem; }
  .crm-kpis dt { min-height: 2.3em; font-size: .6rem; letter-spacing: .03em; line-height: 1.15; white-space: normal; }
  .crm-kpis dd { font-size: 1.3rem; }
  .crm-kpis small { font-size: .68rem; }
  .crm-stage { padding: .7rem; gap: .6rem; }
  .crm-canvas > section { padding: .7rem; }
  .pool-grid { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
  .schedule-table { min-width: 40rem; }
  .schedule-table th:first-child { width: 8.6rem; min-width: 8.6rem; }
  #crm-feed { grid-template-columns: 1fr; }
  #crm-feed li:nth-child(n+4) { display: none; }
  .crm-roster { padding: 0 .7rem .7rem; }
  .crm .booking-table tbody td:nth-child(4)::before { content: none; }
  .crm .booking-table tbody th { grid-template-columns: auto 1fr; }
}

/* CRM: six-step booking process (Claude) */
.sample-tag { display: inline-block; margin-left: .35rem; padding: .05rem .5rem; border-radius: 99px; background: var(--paper-deep); border: 1px solid var(--line); color: var(--muted); font: 700 .66rem/1.5 var(--body-font); letter-spacing: .08em; text-transform: uppercase; vertical-align: .12em; }
.pool-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem; }
.pool-count { color: var(--muted); font-size: .84rem; }
.pool-count b { color: var(--ink); font: 400 1.35rem var(--display-font); font-variant-numeric: tabular-nums; }
.crm-pool .pool-grid { margin-top: .8rem; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 3px; }
.crm-schedule .calendar-scroll { margin-top: .7rem; }
.lbl-short { display: none; }

/* Applicant dots */
.dot.called { background: #5b6584; }
.dot.noans { background: transparent; box-shadow: inset 0 0 0 1.5px #b9b2a4; }
.dot.withdrew { background: #b9b2a4; transform: scale(.55); }
.dot.signed { background: var(--p2); }
.dot.rejected { background: #a8a296; transform: scale(.55); border-radius: 2px; }

/* Outcome bars */
.outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-top: 1rem; }
.oc-title { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .45rem; color: var(--ink); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.oc-big { font: 400 1.6rem/1 var(--display-font); letter-spacing: -.02em; text-transform: none; color: var(--ink); }
.oc-big.v-ok { color: var(--after-ink); }
.oc-empty { color: var(--muted); }
.outcome-bars { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.outcome-bars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 2.2rem; align-items: center; gap: .55rem; font-size: .8rem; }
.ob-label { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-track { height: .55rem; border-radius: 99px; background: #f1ece3; overflow: hidden; }
.ob-track i { display: block; height: 100%; border-radius: 99px; background: var(--ink-soft); transition: width .3s ease; }
.outcome-bars b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.ob-ok i { background: var(--p2); }
.ob-muted i { background: #b9b2a4; }
.ob-board i { background: #5b6584; }
.ob-cv i { background: #8a8478; }
.ob-int i { background: var(--p3); }

/* Activity column */
.rec-head { display: flex; align-items: center; gap: .55rem; }
.rec-head > span:last-child { display: grid; }
.rec-head b { font-size: .9rem; }
.rec-head span span { color: var(--muted); font-size: .74rem; }
.rec-avatar { display: grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: .72rem; font-weight: 800; }
#crm-feed .feed-record { padding: .75rem .8rem; border-left-color: var(--p2); box-shadow: 0 10px 24px -18px #18203a66; }
#crm-feed .feed-record .verdict { margin-top: .5rem; padding: .3rem .5rem; border-radius: .4rem; background: var(--paper); }
.rec-steps { display: grid; gap: .3rem; margin: .55rem 0 0; padding: 0; list-style: none; }
#crm-feed .rec-steps li { position: relative; display: grid; gap: .1rem; padding: .35rem .5rem .35rem 1.55rem; border: 0; border-radius: .45rem; background: var(--paper); box-shadow: none; font-size: .76rem; }
#crm-feed .rec-steps li::before { content: "✓"; position: absolute; left: .45rem; top: .4rem; display: grid; place-items: center; width: .8rem; height: .8rem; border-radius: 50%; background: var(--p2); color: white; font-size: .55rem; font-weight: 900; }
#crm-feed .rec-steps li.no::before { content: "✕"; background: #8a8478; }
.st-name { color: var(--ink); font-weight: 700; }
.st-detail { color: var(--muted); }
.rec-checks { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .55rem !important; }
.check:not(.ok):not(.wait):not(.no) { background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.call-line { display: flex; align-items: center; gap: .45rem; margin-top: .5rem !important; color: var(--ink) !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.call-icon { width: .9rem; height: .9rem; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 4px #2fa36b29; }
.v-muted { color: var(--muted) !important; }
#crm-feed .feed-client { border-left-color: var(--p1); }
#crm-feed .feed-msg { border-left-color: var(--p2); background: var(--surface); }
.msg-to { color: var(--muted) !important; font-size: .72rem; }
.msg { position: relative; margin-top: .35rem !important; padding: .5rem .65rem; border-radius: .8rem .8rem .8rem .2rem; background: var(--p2-soft); color: var(--ink) !important; }
#crm-feed .feed-idle { color: var(--ink-soft); }
#crm-feed .feed-idle .checks { margin-top: .4rem; }

/* Schedule: client approval and booking states */
.order-status:empty { display: none; }
.order-status { display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; padding: .08rem .45rem; border-radius: 99px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.order-status.pending { background: var(--before); color: var(--before-ink); }
.order-status.approved { background: var(--p2-soft); color: var(--after-ink); }
.order-status.approved::before { content: "✓"; }
.chip.details { background: var(--surface); color: var(--after-ink); border: 1.5px solid var(--p2); }
.lg-details::before { background: var(--surface) !important; border: 1.5px solid var(--p2); }

.crm-kpis .kpi-a { --c: #5b6584 !important; } .crm-kpis .kpi-b { --c: var(--ink-soft) !important; } .crm-kpis .kpi-c { --c: var(--p2) !important; }
.crm-kpis .kpi-d { --c: var(--p3) !important; } .crm-kpis .kpi-e { --c: var(--p1) !important; } .crm-kpis .kpi-f { --c: var(--accent) !important; }

@media (prefers-reduced-motion: no-preference) {
  #crm-feed .feed-record.is-new .rec-steps li, #crm-feed .feed-record.is-new > .verdict, #crm-feed .feed-record.is-new .check { animation: tick-in .25s ease-out both; animation-delay: calc(var(--i, 0) * 110ms); }
  .call-icon { animation: ring 1s ease-in-out infinite alternate; }
  [data-play="paused"] .call-icon, [data-play="done"] .call-icon, [data-play="idle"] .call-icon { animation: none; }
  .order-status.approved { animation: dot-pop .35s cubic-bezier(.3,1.6,.5,1) both; }
  @keyframes tick-in { from { opacity: 0; transform: translateX(-.35rem); } to { opacity: 1; transform: none; } }
  @keyframes ring { to { box-shadow: 0 0 0 7px #2fa36b14; } }
}
@media (max-width: 58rem) {
  .outcomes { grid-template-columns: 1fr; }
}
@media (max-width: 42rem) {
  .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lbl-short { display: inline; }
  .crm-stages button { font-size: .66rem; padding-inline: .05rem; }
  .crm-stages b { width: 1.2rem; height: 1.2rem; }
  .crm-pool .pool-grid { grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
  .outcome-bars li { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 2rem; font-size: .74rem; }
  .pool-count b { font-size: 1.15rem; }
}

/* Candidate record statuses for the six-step process */
tr[data-status="Booked"] .pill { background: var(--p2-soft); color: var(--after-ink); }
tr[data-status="Booked"] .cand-avatar { background: var(--p2); color: white; }
tr[data-status="Kept on file"] .pill { background: var(--surface); color: var(--after-ink); box-shadow: inset 0 0 0 1.5px #9cc9bf; }
tr[data-status="Compliance pending"] .pill { background: var(--before); color: var(--before-ink); }
tr[data-status="Compliance pending"] .pill::before { border-radius: 1px; transform: rotate(45deg); }
tr[data-status="Rejected"] .pill { color: #6b6458; }
tr[data-status="Rejected"] .pill::before { background: none; border: 1.5px solid currentColor; width: .35rem; height: .35rem; }
tr[data-status="Withdrew"] .pill, tr[data-status="No answer"] .pill { color: var(--muted); }
tr[data-status="Withdrew"] .pill::before, tr[data-status="No answer"] .pill::before { background: none; border: 1.5px dashed currentColor; width: .35rem; height: .35rem; }

/* Open bookings strip and week reconciliation */
.crm-orders { margin: .8rem .9rem 0; padding: .7rem .8rem .75rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
.orders-title { color: var(--ink-soft); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.orders-title b { color: var(--accent); font: 400 1.25rem var(--display-font); letter-spacing: 0; text-transform: none; }
.order-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.order-list li { display: grid; gap: .1rem; padding: .45rem .55rem; border-radius: .6rem; background: var(--paper); border: 1px solid var(--line); transition: background-color .3s ease, border-color .3s ease; }
.order-list li[data-full] { background: var(--p2-soft); border-color: #bcdcd5; }
.ol-role { color: var(--ink); font-size: .82rem; font-weight: 700; line-height: 1.2; }
.ol-client { color: var(--muted); font-size: .7rem; }
.ol-fill { height: .35rem; margin-top: .25rem; border-radius: 99px; background: #e9e3d7; overflow: hidden; }
.ol-fill i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--p2); transition: width .3s ease; }
.ol-count { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.ol-count b { color: var(--ink); }
.order-list li[data-full] .ol-count::after { content: " ✓"; color: var(--p2); font-weight: 800; }

.recon { margin-bottom: .8rem; }
.recon-scroll { margin-top: .5rem; }
.recon-title { color: var(--ink); font: 400 1.15rem/1.2 var(--display-font); }
.recon-table { width: 100%; min-width: 46rem; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.recon-table caption { padding: .75rem .9rem .35rem; color: var(--ink); font: 400 1.15rem/1.2 var(--display-font); text-align: left; }
.recon-table th, .recon-table td { padding: .5rem .55rem; border-bottom: 1px solid var(--line); font-size: .84rem; text-align: right; white-space: nowrap; }
.recon-table thead th { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: normal; vertical-align: bottom; }
.recon-table th:first-child { position: sticky; left: 0; z-index: 1; padding-left: .9rem; background: var(--surface); text-align: left; color: var(--ink); box-shadow: 1px 0 0 var(--line); }
.recon-table thead th:first-child { color: var(--muted); }
.recon-table .rc-shift { background: #f4faf8; color: var(--after-ink); font-weight: 700; }
.recon-table .rc-app { color: var(--ink); font-weight: 800; box-shadow: inset 1px 0 0 var(--line-strong), inset -1px 0 0 var(--line-strong); }
.recon-table tfoot th, .recon-table tfoot td { border-bottom: 0; border-top: 2px solid var(--ink-soft); font-weight: 800; color: var(--ink); }
.recon-table tfoot .rc-shift { color: var(--after-ink); }
tr[data-status="Talent pool"] .pill { background: var(--surface); color: var(--after-ink); box-shadow: inset 0 0 0 1.5px #9cc9bf; }
@media (max-width: 58rem) {
  .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  .crm-orders { margin-inline: .7rem; padding: .55rem .6rem .6rem; }
  .ol-role { font-size: .76rem; }
  .ol-client { display: none; }
  .recon-table { min-width: 40rem; }
  .recon-table th:first-child { min-width: 7.5rem; white-space: normal; }
}

@media print { .projects { display: none !important; } }
