/* Every color and font is set here, so the look is easy to change. */
:root {
  --bg: #ffffff;
  --surface: #f1f4f5;
  --surface-2: #e1e8ea;
  --paper: #ffffff;
  --ink: #14181a;
  --muted: #566067;
  --line: #8b979c;
  --accent: #0b6f85;
  --accent-dk: #084f5f;
  --accent-ink: #ffffff;
  --logo: #7cdbe9;
  --soft: #e3f5f8;
  --soft-2: #cdebf0;
  --dot: #c3ced2;
  --review: #ffe98a;
  --review-ink: #14181a;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  --margin: clamp(16px, 2.2vw, 40px);
  --r-lg: 24px;
  --r-md: 14px;
  --r-sm: 8px;
  --lift: 0 1px 2px rgba(20, 24, 26, .10), 0 14px 34px rgba(20, 24, 26, .13);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--sans); }
a { color: inherit; text-underline-offset: .22em; transition: color .2s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; }
h1 { line-height: .98; }
h1 em { font-style: italic; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* Draft-only notes, removed before publishing */
.draft-note { margin: 0; padding: 7px var(--margin); background: var(--review); color: var(--review-ink); font-size: .875rem; }
.todo { margin: 16px 0 0; padding: 14px 16px; background: var(--review); color: var(--review-ink); font-size: .9375rem; }
.guess { background: var(--review); color: var(--review-ink); padding: 0 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.visual-spot { display: flex; align-items: center; justify-content: center; min-height: 240px; margin-top: 20px; padding: 16px; background: var(--review); color: var(--review-ink); text-align: center; font-size: .9375rem; }

/* Top bar */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.skip:focus { left: var(--margin); color: var(--accent-ink); }
.site-head { position: sticky; top: 0; z-index: 50; }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.site-nav { background: var(--bg); transition: box-shadow .2s; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; padding: 16px var(--margin); }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { display: block; width: 104px; height: 43px; }
.brand span { font: 400 1.5rem/1.1 var(--serif); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-nav li a { display: inline-block; padding: 9px 14px; border-radius: 999px; text-decoration: none; transition: background .2s, color .2s; }
.site-nav li a:hover { background: var(--soft); color: var(--ink); }
.site-nav.scrolled { box-shadow: 0 1px 0 rgba(20, 24, 26, .1), 0 6px 18px rgba(20, 24, 26, .06); }
:root { --nav-h: 76px; }
html { scroll-padding-top: calc(var(--nav-h) + 12px); }
.site-nav li a[aria-current="page"] { background: var(--soft-2); color: var(--ink); font-weight: 600; }
.site-nav li:last-child a { background: var(--accent); color: var(--accent-ink); }
.site-nav li:last-child a:hover { background: var(--accent-dk); }

/* Breadcrumb above a page title */
.crumbs { margin-bottom: 18px; font-size: .875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; opacity: .78; }
.crumbs li + li::before { content: "/"; margin: 0 10px; opacity: .5; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.crumbs a:hover { text-decoration-thickness: 2px; }
.crumbs [aria-current="page"] { opacity: 1; }

/* One project, two parts: case study and password-protected workflows */
.proj-sub { margin: 6px 0 0; font-size: 1.1875rem; opacity: .8; }
.proj-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; padding: 0; list-style: none; }
.proj-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); font-size: .95rem; text-decoration: none; transition: background .2s; }
.proj-tabs a:hover { background: var(--surface); }
.proj-tabs a[aria-current="page"] { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 600; }
.proj-tabs svg, .part2 svg { width: 15px; height: 15px; flex: none; }
.part2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 24px; padding: 22px 26px; border-radius: var(--r-lg); background: var(--soft); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease); }
.part2:hover { transform: translateY(-2px); }
.part2 small { display: block; font-size: .875rem; opacity: .75; }
.part2 b { font: 400 clamp(1.5rem, 2.4vw, 2.125rem)/1.15 var(--serif); }
.part2 .lock { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Buttons: square, flat, one shape everywhere */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-weight: 500; text-decoration: none; transition: background .2s, color .2s, transform .2s var(--ease); }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button::after { content: "→"; transition: transform .25s var(--ease); }
.button:hover { background: var(--accent-dk); color: var(--accent-ink); transform: translateY(-2px); }
.button:hover::after { transform: translateX(4px); }
.button:active { transform: translateY(0); }

/* Home: one sentence, then a design canvas. Every project is a whole frame on it, joined by flow lines.
   The dial (and the scroll) turns the tangle into one clean flow. */
.home { padding: 0 var(--margin); }
.hero h1 { padding: clamp(12px, 2.4vh, 32px) 0 clamp(20px, 3.4vh, 40px); font-size: clamp(2.125rem, 6.3vw, 7.75rem); text-wrap: balance; }
.home { display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - var(--nav-h) - 360px); }
.hero-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px 32px; align-items: start; padding-bottom: clamp(24px, 4vh, 44px); }
.lead { grid-column: 1 / 9; margin: 0; font-size: clamp(1.1875rem, 1.7vw, 1.625rem); line-height: 1.45; }
.doors { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.door { display: block; padding: 18px 20px 20px; border-radius: var(--r-md); background: var(--soft); color: var(--ink); text-decoration: none; transition: background .25s, color .25s, transform .25s var(--ease); }
.door h2 { font-size: clamp(1.75rem, 2.4vw, 2.625rem); line-height: 1.05; }
.door h2::after { content: " →"; display: inline-block; margin-left: .2em; transition: transform .25s var(--ease); }
.door:hover h2::after { transform: translateX(6px); }
.door p { margin: 8px 0 0; font-size: 1rem; line-height: 1.4; }
.door.primary { background: var(--accent); color: var(--accent-ink); }
.door:hover { background: var(--soft-2); color: var(--ink); transform: translateY(-3px); }
.door.primary:hover { background: var(--accent-dk); color: var(--accent-ink); }
.door:active { transform: translateY(0); }

.canvas { --mess: 0; --amp: 1; border-radius: var(--r-lg); background-color: var(--surface); background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.4px); background-size: 22px 22px; }
.toolbar { position: sticky; top: calc(var(--nav-h) + 12px); z-index: 5; display: flex; align-items: center; gap: 8px 24px; margin: 0 14px; padding: 8px 20px; border-radius: var(--r-md); background: var(--paper); box-shadow: var(--lift); transform: translateY(14px); }
.untangle-wrap { position: relative; flex: 1 1 200px; height: 60px; overflow: hidden; container-type: size; }
.untangle { position: absolute; left: 50%; top: 50%; width: 100cqh; height: 100cqw; transform: translate(-50%, -50%) rotate(-90deg); display: block; }
.untangle path { vector-effect: non-scaling-stroke; }
.untangle .tangle { fill: none; stroke: var(--ink); stroke-opacity: .6; stroke-width: 1.2; }
.untangle .straight { fill: none; stroke: var(--accent); stroke-width: 4; }
.dial { flex: 0 1 520px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.dial label { font: 400 1.5rem/1.2 var(--serif); white-space: nowrap; }
.dial-row { flex: 1 1 240px; display: flex; align-items: center; gap: 12px; font-size: .875rem; }
.dial input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--accent); cursor: grab; }
.dial input:active { cursor: grabbing; }

.board { --fh: clamp(150px, 17vw, 270px); position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: clamp(36px, 4.6vw, 76px) clamp(30px, 4.4vw, 72px); padding: clamp(56px, 6vw, 96px) clamp(24px, 4vw, 64px) clamp(48px, 5.4vw, 88px); }
.links { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.links path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.links .extra { stroke: var(--ink); stroke-width: 1.2; stroke-opacity: .5; }
.frame { position: relative; z-index: 1; display: block; color: var(--accent); text-decoration: none; transform: translate(calc(var(--dx) * var(--mess) * var(--amp)), calc(var(--dy) * var(--mess) * var(--amp))) rotate(calc(var(--r) * var(--mess))); }
.frame .label { display: block; margin-bottom: 7px; font-size: .875rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.frame img { display: block; width: auto; height: var(--fh); border-radius: var(--r-sm); background: var(--paper); box-shadow: var(--lift); transition: box-shadow .25s, outline-color .25s; outline: 2px solid transparent; outline-offset: 4px; }
.frame:hover, .frame:focus-visible { z-index: 3; color: var(--accent-dk); }
.frame:hover img, .frame:focus-visible img { outline-color: var(--accent); box-shadow: 0 2px 4px rgba(20, 24, 26, .12), 0 24px 54px rgba(20, 24, 26, .2); }
.frame:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .frame img, .js .frame .label { animation: pop .7s var(--ease) both; animation-delay: var(--in, 0ms); }
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }

/* Home: the work, fixed in a strict grid. Every screen sits whole inside its own tinted panel. */
.works { padding-top: clamp(28px, 5vh, 64px); }
.works-head { padding-bottom: clamp(20px, 3vh, 36px); }
.works-head h2 { font-size: clamp(2.75rem, 5.6vw, 6rem); line-height: 1; }
.works-head p { margin: 12px 0 0; max-width: 56ch; font-size: 1.1875rem; }
.works-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.work { grid-column: span 3; display: flex; }
.work:nth-child(-n+2) { grid-column: span 6; }
.work:nth-child(n+3):nth-child(-n+5) { grid-column: span 4; }
.work a { flex: 1; display: flex; flex-direction: column; padding: clamp(14px, 1.4vw, 22px); border: 1px solid var(--surface-2); border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 1px 2px rgba(20, 24, 26, .04), 0 10px 28px rgba(20, 24, 26, .07); color: var(--ink); text-decoration: none; transition: box-shadow .25s, border-color .25s, transform .25s var(--ease); }
.work a:hover { border-color: var(--soft-2); box-shadow: 0 2px 4px rgba(20, 24, 26, .05), 0 18px 40px rgba(20, 24, 26, .11); transform: translateY(-3px); }
.work-img { display: block; aspect-ratio: 16 / 10; }
.work-img img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: var(--r-sm); transition: transform .4s var(--ease); }
.work h3 { margin-top: 16px; font-size: clamp(1.625rem, 2.3vw, 2.5rem); line-height: 1.05; }
.work:nth-child(-n+2) h3 { font-size: clamp(2rem, 3.2vw, 3.5rem); }
.work h3::after { content: " →"; display: inline-block; margin-left: .2em; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s var(--ease); }
.work p { margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }
.work a:hover { color: var(--ink); }
.work a:hover .work-img img { transform: scale(1.025); }
.work a:hover h3::after, .work a:focus-visible h3::after { opacity: 1; transform: none; }
@media (max-width: 1099px) {
  .work, .work:nth-child(n+3):nth-child(-n+5) { grid-column: span 6; }
}
@media (max-width: 640px) {
  .work, .work:nth-child(-n+2), .work:nth-child(n+3):nth-child(-n+5) { grid-column: 1 / -1; }
}

/* Footer: three tiles, on every page */
.site-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; margin-top: clamp(72px, 12vh, 140px); padding: 0 var(--margin) var(--margin); }
.home + .site-foot { margin-top: clamp(56px, 9vh, 110px); }
.tile { display: flex; flex-direction: column; min-height: 250px; padding: 24px 28px 28px; border-radius: var(--r-lg); }
.tile p { margin: 0; }
.t-name { grid-column: 1 / 9; justify-content: space-between; gap: 32px; background: var(--soft); }
.foot-name { font: 400 clamp(2.75rem, 5.4vw, 6rem)/.95 var(--serif); letter-spacing: -.02em; }
.tile .foot-role { margin-top: 10px; font-size: 1.125rem; }
.foot-contact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.foot-contact h2 { font-size: 1.5rem; color: var(--muted); }
.contact-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.contact-links a { display: inline-block; padding: 4px 0; font: 400 clamp(1.5rem, 2.1vw, 2.125rem)/1.2 var(--serif); overflow-wrap: anywhere; text-decoration-thickness: 1px; }
.contact-links a:hover { text-decoration-thickness: 3px; }
.t-nav { grid-column: 9 / 13; background: var(--surface); }
.t-nav li a { display: inline-block; padding: 7px 0; font-size: 1.125rem; text-decoration: none; }
.t-nav li a:hover { text-decoration: underline; }
/* Home page (Figma frame 1:2): smaller three-line headline, compact footer */
.home .hero h1 { max-width: 10.75em; padding: 33px 0 31px; font-size: clamp(2.125rem, 5vw, 5.5rem); line-height: .99; }
.home + .site-foot { margin-top: 81px; }
.home + .site-foot .tile { min-height: 183px; }
.home + .site-foot .t-name { justify-content: flex-start; gap: 22px; background: var(--surface); }
.home + .site-foot .foot-name { font-size: 2.625rem; line-height: 1.3; }
.home + .site-foot .foot-role { margin-top: 0; }
.home + .site-foot .t-nav li a { padding: 0; line-height: 1.55; }

/* Portfolio: one band per project, its own tint, with whole screens beside the words.
   Deep dives: the same bands without screens, two across. */
.page-head { padding: clamp(16px, 3vh, 40px) var(--margin) 0; }
.page-head h1 { font-size: clamp(3.25rem, 8vw, 8.5rem); }
.dek { margin: 20px 0 0; max-width: 56ch; font-size: 1.1875rem; }
.index { padding: clamp(28px, 5vh, 56px) var(--margin) 0; }
.index-names { display: grid; gap: 14px; }
.index:not(.marks-done) .index-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.index-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; gap: 14px clamp(24px, 3vw, 56px); padding: clamp(22px, 2.8vw, 44px); border-radius: var(--r-lg); background: var(--tint, var(--surface)); }
.index-row h2 { grid-column: 1 / 6; align-self: end; font-size: clamp(2.5rem, 4.6vw, 5rem); line-height: 1; }
.index:not(.marks-done) .index-row h2, .index:not(.marks-done) .detail { grid-column: 1 / -1; }
.index:not(.marks-done) .index-row h2 { font-size: clamp(2.25rem, 3.4vw, 3.5rem); }
.index-row .name { display: inline-block; padding: 3px 0; color: var(--ink); text-decoration: none; transition: color .2s, transform .3s var(--ease); }
.index-row .name:hover { color: var(--accent); transform: translateX(8px); }
.marks-done a.name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.detail { grid-column: 1 / 6; padding: 0; max-width: 60ch; }
.detail-text { margin: 0; font-size: 1.125rem; }
.keywords { margin: 10px 0 0; color: var(--muted); font-size: .9375rem; }
.detail .button { margin-top: 18px; background: var(--accent); color: var(--accent-ink); }
.detail .button:hover { background: var(--accent-dk); }
.pending { margin: 12px 0 0; font-size: .9375rem; }

/* Portfolio page: the same white cards as the grid, each with its description and button */
.marks-done .index-names { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.marks-done .index-row { grid-column: span 3; display: flex; flex-direction: column; gap: 0; padding: clamp(14px, 1.4vw, 22px); border: 1px solid var(--surface-2); background: var(--paper); box-shadow: 0 1px 2px rgba(20, 24, 26, .04), 0 10px 28px rgba(20, 24, 26, .07); transition: box-shadow .25s, border-color .25s, transform .25s var(--ease); }
.marks-done .index-row:hover { border-color: var(--soft-2); box-shadow: 0 2px 4px rgba(20, 24, 26, .05), 0 18px 40px rgba(20, 24, 26, .11); transform: translateY(-3px); }
.marks-done .index-row:nth-child(-n+2) { grid-column: span 6; }
.marks-done .index-row:nth-child(n+3):nth-child(-n+5) { grid-column: span 4; }
.marks-done .index-row h2 { align-self: auto; margin-top: 16px; font-size: clamp(1.625rem, 2.3vw, 2.5rem); line-height: 1.05; }
.marks-done .index-row:nth-child(-n+2) h2 { font-size: clamp(2rem, 3.2vw, 3.5rem); }
.marks-done a.name { text-decoration: none; }
.marks-done .index-row .name:hover { transform: none; }
.marks-done .detail { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding-top: 10px; }
.marks-done .detail-text { font-size: 1rem; line-height: 1.5; }
.marks-done .index-row:nth-child(-n+2) .detail-text { font-size: 1.125rem; }
.marks-done .detail .button { margin-top: auto; }
.marks-done .keywords { margin-bottom: 18px; }
.marks-done .index-row:hover .work-img img { transform: scale(1.025); }
/* Image box per card (ratio from the Figma layout), whole image shown, sitting on a dark rule */
.marks-done .work-img { aspect-ratio: var(--box, 16 / 10); overflow: hidden; border-bottom: 1px solid var(--ink); }
.marks-done .work-img img { object-position: center bottom; border-radius: var(--r-sm) var(--r-sm) 0 0; transform-origin: 50% 100%; }
@media (max-width: 1099px) {
  .marks-done .work-img { aspect-ratio: auto; }
  .marks-done .work-img img { height: auto; }
}

/* Project pages: fixed facts beside the reading column */
main:has(> .story) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--margin); padding: 0 var(--margin) clamp(64px, 10vh, 120px); }
main:has(> .story) > .page-head { position: sticky; top: var(--nav-h); align-self: start; max-height: calc(100svh - var(--nav-h)); overflow-y: auto; padding: clamp(20px, 4vh, 48px) 0 24px; }
main:has(> .story) > .page-head h1 { font-size: clamp(3rem, 5.4vw, 6rem); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; margin: 24px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.story { padding-top: clamp(20px, 4vh, 48px); min-width: 0; }
.story section { margin-top: clamp(56px, 9vh, 96px); max-width: 66ch; }
.story > section:first-child { margin-top: 8px; }
.story h2 { font-size: clamp(2.25rem, 3.6vw, 3.5rem); line-height: 1.05; }
.story p { margin: 12px 0 0; }
.story .todo { margin-top: 16px; }
.plain { margin-top: 14px; }
.plain li { margin-top: 10px; }
.story .decisions { margin-top: 44px; }
.decisions h3 { margin-top: 36px; font-size: 1.75rem; line-height: 1.15; }
.decisions h3:first-child { margin-top: 0; }

.figure { margin: 36px 0 0; }
.figure figcaption { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
/* Screenshots of real interfaces, alone or in pairs */
.story section:has(.shot) { max-width: none; }
.story section:has(.shot) > p { max-width: 66ch; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--surface-2); background: #fff; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.stack-figs { display: grid; gap: 32px; margin-top: 36px; }
.shots .figure { margin: 0; }
@media (max-width: 560px) { .shots { grid-template-columns: minmax(0, 1fr); } }

.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; counter-reset: step; }
.flow li { counter-increment: step; padding: 16px; background: var(--surface); line-height: 1.35; }
.flow li::before { content: counter(step); display: block; margin-bottom: 18px; font: 400 2.5rem/1 var(--serif); color: var(--accent); }

/* A recreated piece of interface keeps its own light look */
.mock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; background: var(--surface); color: #14181a; font-size: .9375rem; }
.mock-doc { padding: 18px; background: #fff; }
.mock-doc p { margin: 0 0 8px; }
.mock-field { margin-bottom: 12px; }
.mock-field span { display: block; font-weight: 500; }
.mock-field b { display: block; padding: 7px 10px; background: #fff; border: 1px solid #93a2b0; font-weight: 400; }
.mock-field b + b { border-top: 0; }
.mock-field em { display: block; margin-top: 3px; font-size: .8125rem; font-style: normal; }
.mock-field.ok b { background: #d9f0e1; border-color: #4f9a6d; }
.mock-field.ok em { color: #1f6b3e; }
.mock-field.bad b { background: #f8dcd9; border-color: #c2483c; }
.mock-field.bad em { color: #a3271c; }

.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.compare > div { padding: 18px; background: var(--surface); }
.compare > div:last-child { background: var(--soft); box-shadow: inset 0 3px 0 var(--accent); }
.compare h3 { font-size: 1.75rem; }

.next-step { margin-top: clamp(56px, 9vh, 96px); padding: 32px; background: var(--surface); }
.next-step h2 { font-size: clamp(2.25rem, 3.6vw, 3.5rem); }

.blog-empty { min-height: 24vh; }

/* Password page */
.unlock label { display: block; margin-top: 24px; font-weight: 500; }
.unlock input { display: block; width: min(100%, 360px); min-height: 48px; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); font: inherit; }

/* Use cases page */
.roles { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 20px 0 0; }
.roles dt, .roles dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--surface-2); }
.roles dt { padding-right: 24px; font-weight: 600; }

.wf { display: grid; gap: 6px; counter-reset: wf; }
.wf > li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 6px; counter-increment: wf; }
.wf > li > div { position: relative; padding: 16px 16px 16px 64px; background: var(--surface); }
.wf > li > div::before { content: counter(wf); position: absolute; left: 18px; top: 12px; font: 400 2.25rem/1 var(--serif); color: var(--accent); }
.wf h3 { font: 600 1rem/1.3 var(--sans, inherit); }
.wf p { margin: 4px 0 0; font-size: .9375rem; }
.wf aside { align-self: stretch; padding: 16px; background: #f6dcd6; color: #4a1610; font-size: .9375rem; border-left: 4px solid #b23a2b; }
.wf aside strong { display: block; margin-bottom: 4px; }
.wf > li:last-child > div { background: var(--soft); box-shadow: inset 0 3px 0 var(--accent); }
.wf > li:last-child > div::before { color: var(--accent); }

.ucs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.story section:has(> .ucs) { max-width: none; }
.uc { padding: 20px; background: var(--surface); }
.uc h3 { font-size: 1.5rem; line-height: 1.15; }
.uc dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 14px 0 0; font-size: .9375rem; }
.uc dt { color: var(--muted); }
.uc dd { margin: 0; }
.uc ol { margin: 14px 0 0; padding-left: 1.3em; list-style: decimal; font-size: .9375rem; }
.uc ol li { margin-top: 6px; }

.rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px; }
.rules li { position: relative; padding: 18px; background: var(--surface); }
.rules h3 { font-size: 1.5rem; }
.rules p { margin: 6px 0 0; font-size: .9375rem; }
.rules .result { background: var(--soft); box-shadow: inset 0 3px 0 var(--accent); }
@media (max-width: 899px) {
  .ucs, .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wf > li { grid-template-columns: minmax(0, 1fr); }
  .roles { grid-template-columns: minmax(0, 1fr); }
  .roles dd { border-top: 0; padding-top: 0; }
}

/* Entrances only run when the script is there, so nothing stays hidden */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--delay, 0ms); }
  .js .rise.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Tablet and phone */
@media (max-width: 1099px) {
  .marks-done .index-row, .marks-done .index-row:nth-child(n+3):nth-child(-n+5) { grid-column: span 6; }
}
@media (max-width: 899px) {
  main:has(> .story) { grid-template-columns: minmax(0, 1fr); }
  main:has(> .story) > .page-head { position: static; max-height: none; overflow: visible; }
  .story > section:first-child { margin-top: 0; }
  .lead, .doors { grid-column: 1 / -1; }
  .canvas { --amp: .6; }
  .index:not(.marks-done) .index-names { grid-template-columns: minmax(0, 1fr); }
  .index-row { grid-template-rows: none; }
  .index-row h2, .detail { grid-column: 1 / -1; grid-row: auto; }
  .t-name, .t-nav { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-nav { padding: 10px var(--margin); }
  .site-nav ul { gap: 0 2px; margin-left: -7px; }
  .site-nav li a { padding: 7px 7px; font-size: .875rem; white-space: nowrap; }
  .hero h1 { font-size: 9.6vw; }
  .canvas { --amp: .35; }
  .toolbar { padding: 6px 14px 4px; }
  .untangle-wrap { height: 40px; flex-basis: 100%; }
  .board { gap: 30px 14px; padding: 48px 16px 36px; }
  .frame { width: calc(50% - 7px); }
  .frame img { width: 100%; height: auto; }
  .frame .label { white-space: normal; }
  .doors, .compare, .mock { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-step { padding: 24px 20px; }
  .marks-done .index-row, .marks-done .index-row:nth-child(-n+2), .marks-done .index-row:nth-child(n+3):nth-child(-n+5) { grid-column: 1 / -1; }
}

/* Screenshot viewer */
.shot-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot-open img { transition: transform .3s var(--ease), box-shadow .3s; }
.shot-open:hover img { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(20, 24, 26, .16); }
.viewer { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 56px 72px 40px; border: 0; background: rgba(255, 255, 255, .97); color: var(--ink); }
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: transparent; }
.viewer figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.viewer img { display: block; max-width: min(100%, 1280px); max-height: calc(100svh - 150px); width: auto; height: auto; border-radius: var(--r-sm); background: #fff; box-shadow: var(--lift); }
.viewer figcaption { margin-top: 14px; max-width: 70ch; text-align: center; font-size: .9375rem; color: var(--muted); }
.viewer button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer; }
.viewer button:hover { background: var(--accent); color: var(--accent-ink); }
.viewer-close { top: 12px; right: 12px; }
.viewer-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 12px; top: 50%; transform: translateY(-50%); }
.viewer-count { position: absolute; top: 22px; left: 0; right: 0; margin: 0; text-align: center; font-size: .875rem; color: var(--muted); }
.viewer img { cursor: zoom-in; }
.viewer-hint { position: absolute; bottom: 10px; left: 0; right: 0; margin: 0; text-align: center; font-size: .8125rem; color: var(--muted); pointer-events: none; }
.viewer.zoomed figure { position: absolute; inset: 56px 0 36px; display: block; max-width: none; max-height: none; overflow: auto; cursor: grab; touch-action: pan-x pan-y; }
.viewer.zoomed figure:active { cursor: grabbing; }
.viewer.zoomed img { max-width: none; max-height: none; height: auto; margin: 0 auto; cursor: zoom-out; }
.viewer.zoomed figcaption { display: none; }
@media (max-width: 560px) { .viewer { padding: 64px 12px 24px; } .viewer-prev, .viewer-next { top: auto; bottom: 12px; transform: none; } }

.flow.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .flow.two { grid-template-columns: minmax(0, 1fr); } }

/* One-to-many object diagram */
.otm { padding: 24px; background: var(--surface); }
.otm-map { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; align-items: center; }
.otm-core { display: flex; flex-direction: column; gap: 4px; padding: 22px; background: var(--bg); color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.otm-core strong { font: 400 2.5rem/1 var(--serif); }
.otm-kicker { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.otm-rel { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.otm-rel li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 14px; background: var(--bg); border-left: 3px solid var(--accent); }
.otm-rel span { color: var(--muted); font-size: .9375rem; }
.otm-rel em { font-style: normal; font-size: .8125rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.otm-life { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: life; }
.otm-life li { counter-increment: life; padding: 10px 12px; background: var(--bg); font-size: .9375rem; }
.otm-life li::before { content: counter(life) " "; font-weight: 600; color: var(--accent); }
@media (max-width: 720px) { .otm-map { grid-template-columns: minmax(0, 1fr); } .otm-life { grid-template-columns: repeat(2, minmax(0, 1fr)); } .otm-rel li { grid-template-columns: minmax(0, 1fr) auto; } .otm-rel span { grid-column: 1 / -1; } }

/* Model-to-screen chips and fold-away details */
.map-chip { display: inline-block; margin-right: 8px; padding: 1px 10px; background: var(--soft); color: var(--accent); font-size: .8125rem; font-weight: 500; letter-spacing: .02em; }
.more { max-width: none; }
.more details { margin-top: 16px; border-top: 1px solid var(--surface-2); }
.more details:last-of-type { border-bottom: 1px solid var(--surface-2); }
.more summary { display: flex; align-items: center; min-height: 56px; cursor: pointer; font: 400 1.5rem/1.2 var(--serif); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; margin-left: auto; font: 400 1.75rem/1 var(--sans); color: var(--accent); }
.more details[open] summary::after { content: "−"; }
.more details > p { max-width: 66ch; }
.more details > .figure { margin-bottom: 24px; }

/* Project collage: the first thing on every case study, a few real screens stacked like windows */
.collage { position: relative; aspect-ratio: 8 / 7; margin: 8px 0 0; }
.collage .win { position: absolute; margin: 0; overflow: hidden; border-radius: 14px; background: #fff; border: 1px solid rgba(20, 24, 26, .08); box-shadow: 0 22px 56px rgba(20, 24, 26, .16), 0 2px 6px rgba(20, 24, 26, .06); transition: transform .4s var(--ease); }
.collage .win img { display: block; width: 100%; height: auto; }
.collage .w1 { left: 0; top: 0; width: 74%; z-index: 1; }
.collage .w2 { right: 0; top: 15%; width: 62%; z-index: 2; }
.collage .w3 { left: 12%; top: 43%; width: 58%; z-index: 3; }
.collage .w4 { right: 3%; top: 58%; width: 54%; z-index: 4; }
.collage.wide { aspect-ratio: 16 / 11; }
.collage.wide .w3 { top: 47%; }
.collage.wide .w4 { top: 62%; }
.collage:hover .w1 { transform: translate(-6px, -6px); }
.collage:hover .w2 { transform: translate(6px, -4px); }
.collage:hover .w3 { transform: translate(-4px, 6px); }
.collage:hover .w4 { transform: translate(6px, 6px); }
.collage-empty { display: grid; place-items: center; aspect-ratio: 8 / 5; margin: 8px 0 0; padding: 24px; background: var(--soft); border: 1px dashed var(--line); color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .collage .win { transition: none; } .collage:hover .win { transform: none; } }
.story > .collage + section, .story > .collage-empty + section { margin-top: 56px; }

/* Skill tags: the keywords a recruiter (or a screening bot) looks for, right under the summary */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; background: var(--soft); color: var(--ink); font-size: .875rem; font-weight: 500; line-height: 1.4; }

/* Collage variant mixing desktop windows and phone screens */
.collage.mixed { aspect-ratio: 16 / 11; }
.collage.mixed .w1 { left: 0; top: 0; width: 66%; }
.collage.mixed .w2 { right: 0; top: 30%; width: 60%; }
.collage.mixed .phone { border-radius: 18px; }
.collage.mixed .w3 { left: 4%; top: 33%; width: 18%; }
.collage.mixed .w4 { left: 23.5%; top: 41%; width: 18%; }

/* Phone screens in a grid */
.shots.phones { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.shots.phones .shot img { border-radius: 14px; }
@media (max-width: 560px) { .shots.phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.brand-mark { display: grid; place-items: center; padding: clamp(28px, 6vw, 56px); background: #fff; border: 1px solid var(--surface-2); }
.brand-mark img { display: block; width: min(100%, 360px); height: auto; }

/* TravelGuard collage: a tablet with phone and desktop screens around it, laid out like the 2019 portfolio board */
.collage.travel { aspect-ratio: 2000 / 1414; }
.collage.travel .win { border-radius: 8px; }
.collage.travel .phone { border-radius: 14px; }
.collage.travel .tablet { padding: 2.4% 1.9% 5.4%; border-radius: 9% / 7%; background: #232323; border: 0; }
.collage.travel .tablet img { border-radius: 2px; }
.collage.travel .tablet::after { content: ""; position: absolute; left: 50%; bottom: 1.6%; width: 7%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 2px solid #4a4a4a; }
.collage.travel .s1 { left: 2.5%; top: 17%; width: 37.5%; z-index: 1; }
.collage.travel .s2 { left: 32.4%; top: 2.3%; width: 24.4%; z-index: 2; }
.collage.travel .s3 { left: 59%; top: 3%; width: 13.6%; z-index: 3; }
.collage.travel .s4 { left: 74.6%; top: 3%; width: 13.6%; z-index: 4; }
.collage.travel .s5 { left: 61%; top: 33%; width: 26%; z-index: 5; }
.collage.travel .s6 { left: 35%; top: 55%; width: 24.6%; z-index: 6; }
.collage.travel .s7 { left: 76.5%; top: 52%; width: 22.5%; z-index: 7; }
.collage.travel:hover .s1 { transform: translate(-6px, 0); }
.collage.travel:hover .s2 { transform: translate(0, -6px); }
.collage.travel:hover .s4 { transform: translate(6px, -4px); }
.collage.travel:hover .s6 { transform: translate(-4px, 6px); }
.collage.travel:hover .s7 { transform: translate(6px, 6px); }
@media (prefers-reduced-motion: reduce) { .collage.travel:hover .win { transform: none; } }

/* Style guide section: product values shown live. Colors here are the product's own (AIG), not the site's. */
.story section.sg-section { max-width: none; }
.sg-section > p { max-width: 66ch; }
.story .sg-note { color: var(--muted); font-size: .9375rem; }
.sg { --sg-blue: #00a4e4; --sg-blue-dk: #0073ae; --sg-blue-lt: #ade0ee; --sg-grey: #444; --sg-red: #c41c30; --sg-field: #dbd9d9; display: grid; gap: 8px; margin-top: 32px; }
.sg-block { padding: clamp(18px, 3vw, 28px); background: var(--surface); }
.sg-block > p { max-width: 62ch; font-size: .9375rem; }
.story .sg h3 { font-size: 1.75rem; line-height: 1.15; }
.sg h4 { margin: 22px 0 10px; font: 600 .8125rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sg-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; height: 72px; margin-top: 18px; padding: 0 8px; background: #fff; }
.sg-grid span { background: rgba(196, 28, 48, .14); }
.sg-bps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; font-size: .875rem; }
.sg-bps li { padding: 10px 12px; background: #fff; }
.sg-bps b { display: block; }
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sg-swatches li { display: grid; align-content: start; padding-bottom: 10px; background: #fff; font-size: .8125rem; line-height: 1.35; }
.sg-swatches i { display: block; height: 56px; margin-bottom: 8px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.sg-swatches b, .sg-swatches code, .sg-swatches small { padding: 0 10px; overflow-wrap: anywhere; }
.sg-swatches b { font-weight: 600; }
.sg-swatches code { font: .8125rem/1.35 ui-monospace, Consolas, monospace; color: var(--muted); }
.sg-swatches small { color: var(--muted); }
.sg-faces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.story .sg-face { margin: 0; padding: 16px; background: #fff; font: 400 clamp(1.5rem, 2.6vw, 2.25rem)/1.15 "Jost", sans-serif; color: var(--sg-grey); }
.sg-face span { display: block; margin-bottom: 8px; font: 500 .8125rem/1.3 var(--sans); color: var(--muted); }
.story .sg-face.heavy { font-weight: 700; }
.sg-type { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 18px 0 0; background: #fff; }
.sg-type dt, .sg-type dd { margin: 0; padding: 10px 14px; border-top: 1px solid var(--surface); }
.sg-type dt { color: var(--muted); font-size: .8125rem; align-self: center; }
.sg-type dd { font-family: "Jost", sans-serif; color: var(--sg-grey); line-height: 1.3; }
.sg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.sg-btn { min-height: 48px; padding: 0 30px; border: 2px solid var(--sg-blue); border-radius: 0; background: var(--sg-blue); color: #fff; font: 400 1rem/1 "Jost", sans-serif; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.sg-btn span { margin: 0 4px; font-size: 1.25em; }
.sg-btn:hover { background: var(--sg-blue-dk); border-color: var(--sg-blue-dk); }
.sg-btn.sm { min-height: 40px; padding: 0 15px; font-size: .875rem; }
.sg-btn.ghost { background: transparent; color: var(--sg-blue); }
.sg-btn.ghost:hover { background: transparent; border-color: var(--sg-blue-dk); color: var(--sg-blue-dk); }
.sg-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 18px; background: var(--sg-blue); }
.sg-btn.on-blue { background: transparent; border-color: #fff; color: #fff; }
.sg-btn.on-blue:hover { background: var(--sg-blue-dk); border-color: #fff; }
.story .sg-cap { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.sg-sel { display: inline-grid; place-items: center; min-width: 168px; min-height: 52px; padding: 8px 16px 22px; position: relative; background: #fff; border: 2px solid var(--sg-field); font: 400 1rem/1.2 "Jost", sans-serif; color: var(--sg-grey); }
.sg-sel small { position: absolute; bottom: 4px; font: 500 .6875rem/1 var(--sans); color: var(--muted); }
.sg-sel.hover { border-color: var(--sg-blue-lt); }
.sg-sel.on { background: var(--sg-blue); border-color: var(--sg-blue-lt); color: #fff; }
.sg-sel.on small { color: #e6f7fd; }
.sg-sel.edit { color: #a9a8a6; }
.story .sg-q { margin: 22px 0 8px; font: 400 1.125rem/1.3 "Jost", sans-serif; color: var(--sg-grey); }
.sg-toggle { display: inline-flex; max-width: 100%; border: 2px solid var(--sg-field); background: #fff; }
.sg-toggle button { min-height: 52px; width: 190px; padding: 6px 14px; border: 0; background: #fff; color: #9d9c9a; font: 400 1rem/1.2 "Jost", sans-serif; cursor: pointer; }
.sg-toggle.small button { width: 72px; }
.sg-toggle button[aria-pressed="true"] { background: var(--sg-blue); color: #fff; }
.sg-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-top: 18px; padding: 20px; background: #fff; }
.sg-field { position: relative; display: block; font-family: "Jost", sans-serif; color: var(--sg-grey); }
.sg-field > span { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: .75rem; font-weight: 700; }
.sg-field input { display: block; width: 100%; min-height: 48px; padding: 8px 12px; border: 2px solid var(--sg-field); border-radius: 0; background: #fff; color: var(--sg-grey); font: 400 1rem/1.2 "Jost", sans-serif; }
.sg-field input::placeholder { color: #a9a8a6; }
.sg-field input:focus, .sg-field.active input { outline: none; border-color: var(--sg-blue-lt); }
.sg-field input:focus-visible { box-shadow: 0 0 0 2px var(--sg-blue); }
.sg-field em { position: absolute; right: 8px; top: 30px; font-size: .5rem; font-weight: 700; font-style: normal; color: #9d9c9a; text-transform: uppercase; letter-spacing: .04em; }
.sg-field.error > span { color: var(--sg-red); }
.sg-field.error i, .sg-msg i { display: inline-grid; place-items: center; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--sg-red); color: #fff; font: 700 .625rem/1 var(--sans); font-style: normal; }
.sg-field small { display: block; margin-top: 4px; font-size: .625rem; color: var(--sg-red); }
.story .sg-msg { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 16px; background: #f3d2d6; color: var(--sg-grey); font: 400 .9375rem/1.3 "Jost", sans-serif; }
.story .sg-msg.alert { background: #cce3ef; }
.sg-msg.alert i { background: var(--sg-blue-dk); }
.sg-rail { width: min(100%, 300px); margin-top: 18px; background: #3e3d3d; color: #fff; font-family: "Jost", sans-serif; }
.sg-rail ol { padding: 22px 24px 18px; border-bottom: 1.5px solid #514c4d; }
.sg-rail li { margin-top: 12px; font-size: .875rem; font-weight: 700; color: #999; }
.sg-rail li:first-child { margin-top: 0; }
.sg-rail li i { display: block; height: 8px; margin-top: 6px; background: #666; }
.sg-rail li.done, .sg-rail li.now { color: #fff; }
.sg-rail li.done i { background: #78a22f; }
.sg-rail li.now i { background: linear-gradient(90deg, #00a4e4 35%, #ccc 35%); }
.story .sg-total { margin: 0; padding: 18px 24px; border-bottom: 1.5px solid #514c4d; font-size: 3rem; line-height: 1; color: #00a4e4; }
.sg-total span { display: block; margin-top: 6px; font-size: .625rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #a0a0a0; }
.story .sg-policy { margin: 0; padding: 18px 24px 22px; font-size: .75rem; line-height: 1.45; }
.sg-policy b { display: block; margin-top: 6px; }
.sg-policy b:first-child { margin-top: 0; }
@media (max-width: 720px) {
  .sg-bps, .sg-faces, .sg-fields { grid-template-columns: minmax(0, 1fr); }
  .sg-type { grid-template-columns: minmax(0, 1fr); }
  .sg-type dd { border-top: 0; padding-top: 0; }
  .sg-toggle button { width: auto; }
  .sg-bar .sg-btn { flex: 1 1 auto; padding: 0 14px; }
}


/* Seven-screen "system" collage (IntelliRisk), laid out like the 2019 portfolio board */
.collage.system { aspect-ratio: 1908 / 1315; }
.collage.system .win { border-radius: 10px; }
.collage.system .phone { border-radius: 14px; }
.collage.system .s1 { left: 0; top: 10.9%; width: 44%; z-index: 1; }
.collage.system .s2 { left: 52.6%; top: 0; width: 38.1%; z-index: 2; }
.collage.system .s3 { left: 2.3%; top: 65.6%; width: 41.9%; z-index: 3; }
.collage.system .s4 { left: 37.5%; top: 24.3%; width: 14.3%; z-index: 4; }
.collage.system .s5 { left: 72.3%; top: 27%; width: 15.5%; z-index: 5; }
.collage.system .s6 { left: 54%; top: 42.1%; width: 14.3%; z-index: 6; }
.collage.system .s7 { left: 61.9%; top: 68.8%; width: 38%; z-index: 7; }
.collage.system:hover .s1 { transform: translate(-5px, -5px); }
.collage.system:hover .s2 { transform: translate(5px, -5px); }
.collage.system:hover .s3 { transform: translate(-5px, 5px); }
.collage.system:hover .s7 { transform: translate(5px, 5px); }
@media (prefers-reduced-motion: reduce) { .collage.system:hover .win { transform: none; } }

/* Seiko collage: six screens of the brand family, overlapping like windows */
.collage.seiko { aspect-ratio: 1922 / 1351; }
.collage.seiko .win { border-radius: 8px; }
.collage.seiko .s1 { left: 38.6%; top: 0; width: 30.4%; z-index: 1; }
.collage.seiko .s2 { left: 0; top: 17.3%; width: 44.5%; z-index: 2; }
.collage.seiko .s3 { left: 10.9%; top: 52.5%; width: 52.1%; z-index: 3; }
.collage.seiko .s4 { left: 50%; top: 34.5%; width: 41.3%; z-index: 4; }
.collage.seiko .s5 { left: 66.3%; top: 10.4%; width: 32.3%; z-index: 5; }
.collage.seiko .s6 { left: 69%; top: 67.6%; width: 30.5%; z-index: 6; }
.collage.seiko:hover .s1 { transform: translate(0, -6px); }
.collage.seiko:hover .s2 { transform: translate(-6px, -4px); }
.collage.seiko:hover .s3 { transform: translate(-4px, 6px); }
.collage.seiko:hover .s5 { transform: translate(6px, -4px); }
.collage.seiko:hover .s6 { transform: translate(6px, 6px); }

/* A single composed board as the case-study hero (IntelliRisk) */
.hero-board { margin: 8px 0 0; }
.hero-board img { display: block; width: 100%; height: auto; }
.story > .hero-board + section { margin-top: 56px; }

/* Previous / next project at the end of every case study */
.project-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 80px; padding-top: 24px; border-top: 1px solid var(--line); }
.project-pager a { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; color: inherit; text-decoration: none; }
.project-pager a > span { color: var(--muted); font-size: .875rem; }
.project-pager b { font: 400 clamp(1.5rem, 2.4vw, 2.25rem)/1.15 var(--serif); }
.project-pager b span { display: inline-block; transition: transform .25s var(--ease); }
.project-pager .next { align-items: flex-end; text-align: right; }
.project-pager .prev:hover b span { transform: translateX(-6px); }
.project-pager .next:hover b span { transform: translateX(6px); }
.project-pager a:hover b, .project-pager a:focus-visible b { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
@media (max-width: 560px) { .project-pager b { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .project-pager b span { transition: none; } }

/* AIG Go: three-column screen grids */
.shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots.phones.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.story h3 + p { max-width: 66ch; }
@media (max-width: 760px) { .shots.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .shots.three { grid-template-columns: minmax(0, 1fr); } .shots.phones.three-up { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.story section h3.lob { margin: 56px 0 0; font: 400 1.75rem/1.1 var(--serif); }
.story section h3.lob + p { margin-top: 10px; }

/* Shared finish: soft corners on panels, whole screens lifted off the page */
.flow li, .compare > div, .uc, .rules li, .next-step, .otm, .otm-core, .sg-block, .mock, .wf > li > div, .wf aside, .collage-empty, .brand-mark, .todo, .visual-spot { border-radius: var(--r-md); }
.otm-rel li, .otm-life li, .mock-doc { border-radius: var(--r-sm); }
.shot img { border: 0; border-radius: var(--r-sm); box-shadow: var(--lift); }
.hero-board img { border-radius: var(--r-md); }
.tags li { padding: 4px 12px; border-radius: 999px; }
.map-chip { border-radius: 999px; }
.unlock input { border-radius: var(--r-sm); }
.project-pager { border-top: 0; }
.project-pager a { padding: 20px 24px; border-radius: var(--r-md); background: var(--surface); transition: background .25s; }
.project-pager a:hover { background: var(--soft); }
.draft-note { text-align: center; }

/* Password modal for Part 2 of a project (site.js); unlock.html is the no-JS fallback */
.pw-modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 0; border-radius: var(--r-lg); background: #fff; color: var(--ink); box-shadow: 0 24px 64px rgba(20, 24, 26, .18); }
.pw-modal::backdrop { background: rgba(227, 245, 248, .82); backdrop-filter: blur(3px); }
.pw-card { position: relative; padding: 36px 36px 32px; }
.pw-card h2 { font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.05; }
.pw-card > p { margin: 12px 0 0; }
.pw-card .todo { margin-top: 18px; }
.pw-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px !important; color: var(--accent); font-weight: 600; font-size: .9375rem; }
.pw-kicker svg { width: 15px; height: 15px; }
.pw-card label { display: block; margin-top: 22px; font-weight: 500; }
.pw-card input { display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; }
.pw-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-card .actions { margin-top: 22px; }
.pw-card .button { border: 0; font: inherit; font-weight: 500; cursor: pointer; }
.pw-cancel::after { content: none; }
.pw-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.pw-close:hover { background: var(--soft); }
@media (max-width: 599px) { .pw-card { padding: 28px 20px 22px; } }

/* Use-case walkthrough cards (workflows pages) */
.uc { margin: 28px 0 0; padding: 24px 26px 22px; border-radius: var(--r-lg); background: var(--surface); }
.uc h3 { font: 400 clamp(1.5rem, 2.2vw, 1.875rem)/1.15 var(--serif); }
.uc-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 18px; margin: 14px 0 0; font-size: .9375rem; }
.uc-meta dt { font-weight: 600; }
.uc-meta dd { margin: 0; }
.uc-head, .uc-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.uc-head { margin-top: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.uc-head::before { content: ""; }
.uc-steps { margin: 0; padding: 0; list-style: none; counter-reset: uc; font-size: .9375rem; }
.uc-steps li { padding: 11px 0; border-bottom: 1px solid var(--surface-2); counter-increment: uc; }
.uc-steps li::before { content: counter(uc); display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; color: var(--accent); font-weight: 600; font-size: .8125rem; }
.uc-who { display: none; font-style: normal; font-weight: 600; }
.uc-steps .uc-s:empty::after, .uc-steps .uc-u:empty::after { content: "–"; opacity: .4; }
.uc-alt { margin: 14px 0 0; font-size: .9375rem; }
.uc-alt b { font-weight: 600; }
.uc .figure { margin-top: 20px; }
.rules { margin: 16px 0 0; padding-left: 1.2em; }
.rules li { margin: 6px 0; }
@media (max-width: 599px) {
  .uc { padding: 20px 18px; }
  .uc-head { display: none; }
  .uc-steps li { grid-template-columns: 2rem minmax(0, 1fr); gap: 4px 12px; }
  .uc-steps li > span { grid-column: 2; }
  .uc-who { display: inline; }
  .uc-steps .uc-s:empty, .uc-steps .uc-u:empty { display: none; }
}
