/* =========================================================
   garytitmarsh.com
   Royal blue + white, navy ink, hanko red used only for the stamp.
   ========================================================= */

:root {
  --royal: #1F3BE0;
  --royal-deep: #1730B8;
  --royal-ink: #142795;
  --ink: #0E1433;
  --ink-soft: #3A4266;
  --mist: #E9EDFF;
  --paper: #FFFFFF;
  --hanko: #E5392A;
  --line-proj: #12A7A0;
  --line-ibm: #8A93B8;

  --display: "Montserrat", system-ui, sans-serif;
  --body: "Ubuntu", system-ui, sans-serif;
  --mono: "Ubuntu Mono", ui-monospace, monospace;
  --jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --brush: "Yuji Syuku", "Hiragino Mincho ProN", serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--hanko); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.h2 {
  font: 900 clamp(2.2rem, 5.2vw, 3.75rem)/1.02 var(--display);
  letter-spacing: -0.035em;
  margin-bottom: 0.45em;
}
.section__lede { max-width: 56ch; color: var(--ink-soft); font-size: 1.125rem; margin-bottom: 2.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--display); letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--light { background: var(--paper); color: var(--royal); }
.btn--light:hover { background: var(--mist); }
.btn--ghost { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { border-color: var(--paper); background: rgba(255,255,255,.08); }
.btn--big { min-height: 60px; padding: 0 30px; font-size: clamp(1rem, 2.6vw, 1.25rem); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--royal); color: var(--paper);
  transition: box-shadow .2s ease;
}
.nav.is-scrolled { box-shadow: 0 1px 0 rgba(255,255,255,.14), 0 10px 30px rgba(14,20,51,.18); }
.nav__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__seal {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--paper);
  font: 900 .82rem/1 var(--display); letter-spacing: -0.04em;
}
.nav__name { font: 800 1.05rem/1 var(--display); letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 28px); }
.nav__links a { font: 500 .95rem/1 var(--body); text-decoration: none; opacity: .88; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav__links .nav__cta {
  opacity: 1; background: var(--paper); color: var(--royal);
  padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.nav__links .nav__cta:hover { text-decoration: none; background: var(--mist); }
.nav__links a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav__toggle {
  display: none; background: none; color: var(--paper);
  border: 2px solid rgba(255,255,255,.6); border-radius: 999px;
  font: 600 .9rem/1 var(--display); padding: 10px 16px; cursor: pointer;
}

@media (max-width: 860px) {
  .nav__toggle { display: inline-block; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--royal-deep); padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 1.05rem; }
  .nav__links .nav__cta { margin-top: 14px; text-align: center; border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero {
  background: var(--royal); color: var(--paper);
  position: relative; overflow: hidden;
  padding: clamp(28px, 5vw, 56px) 0 0;
}
.hero__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: end;
}
.hero__copy { padding-bottom: clamp(40px, 6vw, 80px); }
.hero__title {
  font: 900 clamp(3.4rem, 10.5vw, 8.6rem)/0.86 var(--display);
  letter-spacing: -0.055em;
  margin: 0 0 .32em -0.04em;
}
.hero__line { display: block; }
.hero__jp {
  font: 700 clamp(1.25rem, 2.6vw, 1.75rem)/1.3 var(--jp);
  margin: 0 0 1.1rem; letter-spacing: .02em;
}
.hero__jp-en { font: 400 1rem/1 var(--body); opacity: .75; letter-spacing: 0; }
.hero__lede { max-width: 52ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; opacity: .95; margin-bottom: 1.8rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__portrait { position: relative; margin: 0; align-self: end; justify-self: center; width: min(100%, 440px); }
.hero__disc {
  position: absolute; left: 50%; bottom: 8%;
  width: 104%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: var(--paper);
}
.hero__portrait picture { position: relative; display: block; }
.hero__portrait img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
          mask-image: linear-gradient(to right, #000 86%, transparent 100%);
}
.hero__caption {
  position: absolute; left: -6%; bottom: 22px; z-index: 3;
  max-width: 230px; background: var(--ink); color: var(--paper);
  font-size: .82rem; line-height: 1.45; padding: 10px 14px; border-radius: 10px;
}

/* the one loud thing: the hanko stamp */
.hanko {
  position: absolute; z-index: 2;
  right: 0; top: 15%;
  width: clamp(88px, 10vw, 124px); aspect-ratio: 1;
  border-radius: 50%;
  border: 5px solid var(--hanko);
  color: var(--hanko);
  display: grid; place-items: center;
  transform: rotate(-12deg);
  background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 0 transparent;
}
.hanko::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 2px solid var(--hanko); opacity: .85;
}
.hanko span {
  font: 400 clamp(2rem, 3.6vw, 2.9rem)/1 var(--brush);
  writing-mode: vertical-rl; letter-spacing: -.04em;
}

.hero__now {
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter);
  position: relative; z-index: 4;
  border-top: 1px solid rgba(255,255,255,.22);
  font-size: .95rem; opacity: .9; margin-bottom: 0;
  background: var(--royal);
}

/* load sequence: lines rise, then the stamp lands */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__line { opacity: 0; transform: translateY(.35em); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .js .hero__line:nth-child(2) { animation-delay: .1s; }
  .js .hero__line:nth-child(3) { animation-delay: .2s; }
  .js .hanko { opacity: 0; animation: stamp .42s cubic-bezier(.3,1.6,.5,1) 1s forwards; }
  .js .hero__caption { opacity: 0; animation: fade .4s ease 1.4s forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-12deg) scale(1.8); }
  60% { opacity: 1; transform: rotate(-12deg) scale(.94); }
  100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 8px; }
  .hero__portrait { width: min(78%, 340px); margin-top: 8px; }
  .hero__caption { left: -14%; max-width: 190px; font-size: .78rem; }
}

/* ---------- receipts ---------- */
.receipts { background: var(--mist); }
.receipts__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(40px, 7vw, 96px); align-items: start; }
.receipts__intro { position: sticky; top: 110px; max-width: 46ch; font-size: 1.125rem; color: var(--ink-soft); }
.receipts__intro .h2 { color: var(--ink); }

.receipt {
  background: var(--paper); color: var(--ink);
  font: 400 1rem/1.35 var(--mono);
  padding: 30px 28px 24px;
  box-shadow: 0 30px 60px -30px rgba(23, 48, 184, .45);
  position: relative; transform: rotate(1.2deg);
  --tear: radial-gradient(circle at 8px 0, transparent 7px, var(--paper) 7.5px);
}
.receipt::before, .receipt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: var(--tear); background-size: 16px 12px; background-repeat: repeat-x;
}
.receipt::before { top: -11px; transform: scaleY(-1); }
.receipt::after { bottom: -11px; }
.receipt__head { text-align: center; border-bottom: 2px dashed var(--ink); padding-bottom: 14px; margin-bottom: 8px; }
.receipt__shop { font-weight: 700; font-size: 1.05rem; line-height: 1.3; margin: 0 0 8px; }
.receipt__meta { font-size: .8rem; margin: 0; color: var(--ink-soft); }
.receipt__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0; border-bottom: 1px dotted rgba(14,20,51,.35);
}
.receipt__row span { display: flex; flex-direction: column; }
.receipt__row small { font-size: .82rem; color: var(--ink-soft); }
.receipt__row b { font-size: 1.25rem; white-space: nowrap; color: var(--royal); }
.receipt__foot { text-align: center; padding-top: 14px; }
.receipt__total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 700; font-size: 1.2rem; border-top: 2px dashed var(--ink); border-bottom: 2px dashed var(--ink);
  padding: 10px 0; margin-bottom: 18px;
}
.receipt__total b { font-size: 1.6rem; }
.receipt__thanks { font: 700 1.15rem/1.3 var(--jp); margin: 0 0 2px; }
.receipt__small { font-size: .82rem; color: var(--ink-soft); margin: 0 0 14px; }
.receipt__barcode {
  height: 46px; margin: 0 auto; width: 78%;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px,
    var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 16px);
}

@media (max-width: 860px) {
  .receipts__grid { grid-template-columns: 1fr; }
  .receipts__intro { position: static; }
  .receipt { transform: none; padding: 26px 18px 20px; }
}

/* ---------- offer ---------- */
.offer__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.offer__item { padding: 34px 40px 34px 0; border-bottom: 1px solid rgba(14,20,51,.18); }
.offer__item:nth-child(even) { padding: 34px 0 34px 40px; border-left: 1px solid rgba(14,20,51,.18); }
.offer__title {
  font: 900 clamp(1.7rem, 3.4vw, 2.5rem)/1 var(--display); letter-spacing: -0.04em;
  color: var(--royal); margin-bottom: .55em;
}
.offer__item p { max-width: 48ch; color: var(--ink-soft); }
.offer__proof { color: var(--ink) !important; font-size: .98rem; margin: 0; padding-left: 14px; border-left: 3px solid var(--royal); }

@media (max-width: 760px) {
  .offer__list { grid-template-columns: 1fr; }
  .offer__item, .offer__item:nth-child(even) { padding: 28px 0; border-left: 0; }
}

/* ---------- cases ---------- */
.cases { background: var(--ink); color: var(--paper); }
.cases .section__lede { color: rgba(255,255,255,.75); }
.cases__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.case {
  border-radius: var(--radius); padding: clamp(24px, 3vw, 36px);
  background: #18204A; color: rgba(255,255,255,.86);
  display: flex; flex-direction: column;
}
.case p { max-width: 60ch; }
.case--a { grid-column: span 7; background: var(--royal); color: var(--paper); }
.case--b { grid-column: span 5; }
.case--c { grid-column: span 5; }
.case--d { grid-column: span 7; background: var(--paper); color: var(--ink-soft); }
.case__where { font-size: .9rem; opacity: .8; margin-bottom: .6em; }
.case__title { font: 900 clamp(1.6rem, 3vw, 2.25rem)/1.02 var(--display); letter-spacing: -0.035em; margin-bottom: .6em; color: var(--paper); }
.case--d .case__title { color: var(--ink); }
.case__result {
  margin: auto 0 0; padding-top: 18px; border-top: 1px solid currentColor;
  font-weight: 500; color: inherit;
}
.case__result b { font: 900 1.5rem/1 var(--display); letter-spacing: -0.03em; display: block; margin-bottom: 6px; }
.case--d .case__result b { color: var(--royal); }
.case--d .case__result { border-color: rgba(14,20,51,.2); color: var(--ink); }

@media (max-width: 900px) {
  .case--a, .case--b, .case--c, .case--d { grid-column: 1 / -1; }
}

.film { margin-top: clamp(48px, 7vw, 80px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.film__title { font: 900 clamp(1.6rem, 3vw, 2.25rem)/1.05 var(--display); letter-spacing: -0.035em; margin-bottom: .5em; }
.film__text p { color: rgba(255,255,255,.78); max-width: 44ch; }
.film__player {
  position: relative; width: 100%; aspect-ratio: 16/9; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; background: #000;
}
.film__player img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s; }
.film__player:hover img { opacity: 1; }
.film__play {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--paper);
}
.film__play::after {
  content: ""; position: absolute; left: 34px; top: 26px;
  border-left: 24px solid var(--royal); border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}
.film__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { .film { grid-template-columns: 1fr; } }

/* ---------- route (transit line) ---------- */
.route__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.route__intro { position: sticky; top: 110px; color: var(--ink-soft); font-size: 1.1rem; }
.route__intro .h2 { color: var(--ink); }
.route__legend { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 10px; font-size: .98rem; }
.route__legend li { display: flex; align-items: center; gap: 12px; }
.dot { width: 28px; height: 8px; border-radius: 4px; display: inline-block; }
.dot--cs { background: var(--royal); }
.dot--proj { background: var(--line-proj); }
.dot--ibm { background: var(--line-ibm); }

.line { list-style: none; margin: 0; padding: 0; position: relative; }
.stop { --c: var(--royal); position: relative; padding: 0 0 26px 56px; }
.stop--proj { --c: var(--line-proj); }
.stop--ibm { --c: var(--line-ibm); }
.stop::before { /* track */
  content: ""; position: absolute; left: 15px; top: 6px; bottom: -6px; width: 8px; background: var(--c);
}
.stop:last-child::before { bottom: auto; height: 14px; }
.stop::after { /* station */
  content: ""; position: absolute; left: 9px; top: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--paper); border: 5px solid var(--c);
}
.stop--interchange::after, .stop--origin::after, .stop--now::after {
  left: 3px; top: -2px; width: 32px; height: 32px; border: 6px solid var(--ink);
}
.stop--now::after { background: var(--hanko); border-color: var(--ink); }
.stop__when { font: 700 .92rem/1 var(--display); color: var(--c); display: block; margin-bottom: 6px; filter: saturate(1.2) brightness(.85); }
.stop h3 { font: 800 1.12rem/1.25 var(--display); letter-spacing: -0.015em; margin-bottom: 3px; }
.stop__org { color: var(--ink-soft); font-size: .97rem; margin: 0; }

@media (max-width: 860px) {
  .route__grid { grid-template-columns: 1fr; }
  .route__intro { position: static; }
}

/* ---------- how I work ---------- */
.how { background: var(--mist); }
.how__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.how__copy { color: var(--ink-soft); font-size: 1.08rem; }
.how__copy .h2 { color: var(--ink); }
.radar { width: 100%; height: auto; overflow: visible; }
.radar .grid { fill: none; stroke: rgba(14,20,51,.14); }
.radar .spoke { stroke: rgba(14,20,51,.12); }
.radar .pop { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 4 4; }
.radar .gary { fill: rgba(31,59,224,.22); stroke: var(--royal); stroke-width: 3; stroke-linejoin: round; }
.radar .pt { fill: var(--royal); }
.radar text { font: 500 11px var(--body); fill: var(--ink); }
.radar__key { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }
.k { width: 22px; height: 10px; display: inline-block; border-radius: 2px; }
.k--gary { background: rgba(31,59,224,.35); border: 2px solid var(--royal); }
.k--pop { border: 2px dashed var(--ink-soft); margin-left: 12px; }
.how__facts { margin: 1.8rem 0 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.how__facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(14,20,51,.15); }
.how__facts dt { font: 800 .95rem/1.5 var(--display); color: var(--ink); }
.how__facts dd { margin: 0; font-size: .98rem; }
@media (max-width: 860px) {
  .how__grid { grid-template-columns: 1fr; }
  .how__chart { order: 2; }
  .how__facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- writing ---------- */
.posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 3px solid var(--ink); }
.post {
  display: block; text-decoration: none; padding: 22px 0;
  border-bottom: 1px solid rgba(14,20,51,.18); height: 100%;
}
.post h3 { font: 800 clamp(1.2rem, 2vw, 1.45rem)/1.2 var(--display); letter-spacing: -0.025em; margin-bottom: 6px; color: var(--ink); }
.post p { margin: 0; color: var(--ink-soft); max-width: 50ch; }
.post:hover h3 { color: var(--royal); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.post--mk h3::after { content: " (marketing)"; font: 400 .9rem var(--body); color: var(--ink-soft); }
@media (max-width: 760px) { .posts { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { background: var(--royal); color: var(--paper); padding-top: clamp(80px, 11vw, 140px); }
.contact__title { font: 900 clamp(3.4rem, 12vw, 9rem)/.88 var(--display); letter-spacing: -0.055em; margin-bottom: .3em; }
.contact__lede { max-width: 54ch; font-size: clamp(1.05rem, 1.7vw, 1.25rem); opacity: .95; margin-bottom: 2rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.2rem; }
.contact__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-weight: 500; }
.contact__links a { text-underline-offset: 5px; }
.foot {
  max-width: var(--wrap); margin: clamp(64px, 9vw, 112px) auto 0; padding: 22px var(--gutter);
  border-top: 1px solid rgba(255,255,255,.22);
  display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; opacity: .85;
}
.foot p { margin: 0; }
@media (max-width: 520px) { .btn--big { width: 100%; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-weight: 500; transition: transform .25s ease, visibility 0s .25s; z-index: 60; pointer-events: none;
  visibility: hidden;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease; }

/* case study link */
.case__link { display: inline-block; margin-top: 10px; font-weight: 700; color: inherit; text-underline-offset: 4px; }
.case--a .case__link:hover { opacity: .85; }
.receipt__total + .receipt__small { margin-top: -10px; }

/* =========================================================
   Insights (posts/*.md + posts/posts.json)
   ========================================================= */
.btn--royal { background: var(--royal); color: var(--paper); }
.btn--royal:hover { background: var(--royal-deep); }
.writing__all { margin: 2rem 0 0; }

.ins-hero { background: var(--royal); color: var(--paper); padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.ins-hero__title { font: 900 clamp(2.6rem, 8vw, 6rem)/.9 var(--display); letter-spacing: -0.05em; margin-bottom: .35em; max-width: 12ch; }
.ins-hero__lede { max-width: 54ch; font-size: clamp(1.05rem, 1.7vw, 1.2rem); opacity: .95; margin: 0; }
.ins-hero--strip { padding: 22px 0; }
.ins-hero--strip .ins-hero__title { font-size: 1.3rem; letter-spacing: -0.02em; margin: 0; max-width: none; }
.ins-hero--strip .ins-hero__lede { display: none; }

.ins-body { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(64px, 9vw, 112px); min-height: 40vh; }
.ins-empty { color: var(--ink-soft); }
.ins-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.ins-filter__btn {
  font: 600 .95rem/1 var(--display); padding: 11px 18px; border-radius: 999px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2px solid rgba(14,20,51,.2);
}
.ins-filter__btn:hover { border-color: var(--royal); }
.ins-filter__btn[aria-pressed="true"] { background: var(--royal); color: var(--paper); border-color: var(--royal); }

.posts--page .post h2 { font: 800 clamp(1.25rem, 2.2vw, 1.6rem)/1.2 var(--display); letter-spacing: -0.025em; margin-bottom: 6px; color: var(--ink); }
.posts--page .post:hover h2 { color: var(--royal); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.post__meta { font-size: .88rem; color: var(--ink-soft); margin: 0 0 6px !important; }
.post__where { color: var(--royal); font-weight: 500; }

.article { max-width: 70ch; }
.article__back { display: inline-block; margin-bottom: 1.4rem; font-weight: 500; color: var(--royal); text-underline-offset: 4px; }
.article__meta { color: var(--ink-soft); font-size: .95rem; margin-bottom: .6rem; }
.article__missing { font: 900 clamp(2rem, 5vw, 3rem)/1 var(--display); letter-spacing: -0.04em; margin-bottom: .5em; }
.article__also { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(14,20,51,.18); color: var(--ink-soft); }
.article__also a { color: var(--royal); }
.article__more { margin-top: clamp(56px, 8vw, 88px); }
.article__more-title { font: 900 clamp(1.6rem, 3vw, 2.2rem)/1 var(--display); letter-spacing: -0.035em; margin-bottom: 1rem; }

.markdown-body { font-size: 1.12rem; line-height: 1.7; color: var(--ink); }
.markdown-body h1 { font: 900 clamp(2.2rem, 5.5vw, 3.6rem)/1.02 var(--display); letter-spacing: -0.04em; margin: 0 0 .6em; }
.markdown-body h2 { font: 800 clamp(1.4rem, 2.6vw, 1.85rem)/1.15 var(--display); letter-spacing: -0.025em; margin: 2em 0 .6em; }
.markdown-body h3 { font: 800 1.2rem/1.3 var(--display); margin: 1.6em 0 .5em; }
.markdown-body p, .markdown-body ul, .markdown-body ol { margin: 0 0 1.15em; }
.markdown-body li { margin-bottom: .35em; }
.markdown-body a { color: var(--royal); text-underline-offset: 3px; }
.markdown-body strong { font-weight: 700; }
.markdown-body img { width: 100%; height: auto; border-radius: var(--radius); margin: 1.6em 0 .5em; }
.markdown-body img + em, .markdown-body p > em:only-child { display: block; font-size: .92rem; color: var(--ink-soft); font-style: normal; }
.markdown-body blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--royal);
  font: 600 1.3rem/1.45 var(--display); letter-spacing: -0.015em; color: var(--ink);
}
.markdown-body blockquote p:last-child { margin: 0; }
.markdown-body code { font: 400 .95em var(--mono); background: var(--mist); padding: 2px 6px; border-radius: 4px; }
.markdown-body pre { background: var(--ink); color: var(--paper); padding: 18px; border-radius: 10px; overflow-x: auto; }
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body hr { border: 0; border-top: 2px dashed rgba(14,20,51,.25); margin: 2.4em 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .98rem; display: block; overflow-x: auto; }
.markdown-body th, .markdown-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(14,20,51,.15); }
.markdown-body th { font-family: var(--display); font-weight: 800; border-bottom: 2px solid var(--ink); }

.foot--page { color: var(--ink-soft); border-top: 1px solid rgba(14,20,51,.15); margin-top: 0; opacity: 1; }
.foot--page a { color: var(--royal); }
.markdown-body img.article__cover { margin-top: 0; margin-bottom: 1.8em; }

.offer__proof a { color: var(--royal); font-weight: 500; text-underline-offset: 3px; }

/* =========================================================
   Homepage demo: LAB59 health score
   ========================================================= */
.demo { background: var(--ink); color: var(--paper); padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.demo__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.demo__from { font-size: .95rem; color: rgba(255,255,255,.7); margin-bottom: 1rem; }
.demo__from a { color: var(--paper); font-weight: 700; text-underline-offset: 4px; }
.demo__title { font: 900 clamp(2.1rem, 4.2vw, 3.3rem)/1.02 var(--display); letter-spacing: -0.045em; margin-bottom: .5em; }
.demo__lede { color: rgba(255,255,255,.82); font-size: 1.12rem; max-width: 50ch; margin-bottom: 1.6rem; }
.demo__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.8rem 0 0; }

.dswitch { display: inline-flex; align-items: center; gap: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 8px 20px 8px 8px; cursor: pointer; color: var(--paper); font: 700 1.1rem/1 var(--display); }
.dswitch:hover { background: rgba(255,255,255,.14); }
.dswitch__track { position: relative; width: 62px; height: 34px; border-radius: 999px; background: #4A5278; transition: background-color .25s ease; }
.dswitch__thumb { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: left .25s cubic-bezier(.3,1.4,.6,1); }
.dswitch[aria-pressed="true"] .dswitch__track { background: var(--hanko); }
.dswitch[aria-pressed="true"] .dswitch__thumb { left: 32px; }
.dswitch__label b { color: #A7AEC8; }
.dswitch[aria-pressed="true"] .dswitch__label b { color: #FF7A6E; }

.demo__count { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; margin-top: 1.4rem; min-height: 80px; }
.demo__count p { margin: 0; font-size: 1.02rem; line-height: 1.45; max-width: 38ch; }
.demo__count p span { display: block; color: rgba(255,255,255,.65); font-size: .95rem; margin-top: 2px; }
.demo__n { font: 900 clamp(3rem, 6vw, 4.4rem)/.9 var(--display); letter-spacing: -0.05em; min-width: 1.4ch; }
.demo__count.is-off .demo__n { color: #4A5278; }
.demo__count.is-on .demo__n { color: #FF7A6E; }

.demo__panel { background: #151C40; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: clamp(14px, 2.4vw, 24px); }
.demo__dots { display: grid; grid-template-columns: repeat(40, 1fr); gap: 3px; }
.demo__dots i { display: block; aspect-ratio: 1; border-radius: 50%; background: #3A4266; transition: background-color .5s ease, box-shadow .5s ease, transform .5s cubic-bezier(.3,1.6,.5,1); }
.demo__dots i.t-healthy { background: #2E8F67; }
.demo__dots i.t-atrisk { background: #C08A25; }
.demo__dots i.t-critical { background: #A8453E; }
.demo__dots i.is-caught { background: #FF5A4C; box-shadow: 0 0 0 1.5px #151C40, 0 0 0 3px var(--paper); transform: scale(1.18); position: relative; z-index: 1; }
.demo__key { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: rgba(255,255,255,.7); }
.demo__key li { display: flex; align-items: center; gap: 7px; }
.demo__key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.demo__key .k-h { background: #2E8F67; } .demo__key .k-a { background: #C08A25; } .demo__key .k-c { background: #A8453E; }
.demo__key .k-x { background: #FF5A4C; box-shadow: 0 0 0 1.5px #151C40, 0 0 0 3px var(--paper); }
@media (prefers-reduced-motion: reduce) { .demo__dots i, .dswitch__thumb { transition: none; } }
@media (max-width: 900px) {
  .demo__grid { grid-template-columns: 1fr; }
  .demo__dots { grid-template-columns: repeat(30, 1fr); gap: 2px; }
}
@media (max-width: 480px) { .demo__dots { grid-template-columns: repeat(24, 1fr); } }

/* ---------- tool band (homepage, under the demo) ---------- */
.tband { position: relative; overflow: hidden; background: var(--royal); color: var(--paper); }
.tband::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 92% 50%, rgba(255,255,255,.22), transparent 55%);
}
.tband__inner { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 36px; padding-top: 34px; padding-bottom: 34px; }
.tband__kicker { font: 700 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin: 0 0 12px; }
.tband__text { margin: 0; max-width: 58ch; font-size: 1.05rem; line-height: 1.5; opacity: .95; }
.tband__text b { display: block; font: 900 clamp(1.45rem, 2.8vw, 1.9rem)/1.12 var(--display); letter-spacing: -0.03em; margin-bottom: 8px; opacity: 1; }
.tband__btn { min-height: 54px; padding: 0 30px; font-size: 1.05rem; box-shadow: 0 10px 24px -12px rgba(0,0,0,.45); }
.tband__btn:hover { background: var(--mist); }
@media (max-width: 560px) {
  .tband__inner { flex-direction: column; align-items: stretch; }
  .tband__btn { width: 100%; }
}
