/* Xiaozao case study — editorial redesign
   Warm neutral ground matching the app's cream menu card; one restrained red accent.
   Display: local serif stack. Body: system sans. No external dependencies. */

:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --surface: #fffdf8;
  --ink: #201d18;
  --muted: #6d675c;
  --faint: #a29a8c;
  --line: #ddd6c8;
  --line-soft: #e8e2d6;
  --accent: #a8433c;
  --accent-t: #ecd2c9;
  --cream: #f3edde;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--cream);
  padding: .08em .35em;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -52px;
  left: 20px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--surface);
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 18px 0 14px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
}
.brand span { color: var(--muted); font-weight: 400; }

.site-header nav { display: flex; gap: 26px; }
.site-header nav a {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
  text-decoration: none;
}
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--accent); }

/* ---------- shared type ---------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin-top: 0; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow .chapter {
  color: var(--accent);
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

p { margin-top: 0; }

.section {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 104px 0 96px;
  border-top: 1px solid var(--line);
}

.section-head { max-width: 960px; margin-bottom: 72px; }

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.section-intro { max-width: 70ch; color: var(--muted); font-size: 18px; margin-bottom: 0; }

/* ---------- 01 hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: clamp(48px, 7vh, 88px) 0 96px;
}

h1 {
  margin-bottom: 26px;
  font-size: clamp(2.5rem, 4.5vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.lede { max-width: 58ch; color: var(--muted); font-size: 18px; }

/* Key-information highlight in the hero lede, in the case's own accent tint. */
.hl { color: var(--ink); font-weight: 600; background: linear-gradient(transparent 62%, var(--accent-t) 62%); }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 40px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
/* Approved full-length claims (role, status) span both columns so they stay on one line. */
.facts div.wide { grid-column: 1 / -1; }
.facts dt { color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.facts dd { margin: 0; font-size: 14px; line-height: 1.5; }

.hero-visual {
  position: relative;
  aspect-ratio: 100 / 128;
  max-width: 520px;
  margin: 0 auto;
}

.phone {
  overflow: hidden;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(14px, 2.6vw, 30px);
  box-shadow: 0 18px 44px rgba(32, 29, 24, .10);
}

.hero-visual .phone { position: absolute; }
.phone-dominant { z-index: 2; top: 0; left: 0; width: 60%; }
.phone-support { z-index: 3; top: 22%; right: 0; width: 47%; }

.visual-note {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

/* ---------- 02 pain points ---------- */

.pain-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

/* align media / number / heading / lead / body rows across the three columns
   (captions of different lengths otherwise push column content down) */
.pain {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 0;
  align-content: start;
}

.pain h3 { font-size: 21px; line-height: 1.3; margin: 6px 0 10px; }
.pain-lead { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.pain > p:last-child { color: var(--muted); font-size: 15px; margin-bottom: 0; }

.pain-num {
  margin: 26px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
}

.pain-media { aspect-ratio: 4 / 3; margin: 0; }

.placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--faint);
  border-radius: 6px;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(162, 154, 140, .07) 14px 28px);
}
.placeholder-tag {
  align-self: flex-start;
  padding: 3px 9px;
  border: 1px solid var(--faint);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.placeholder p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.artifact { display: flex; flex-direction: column; }
.artifact .note-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 30px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(32, 29, 24, .06);
}
.note-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}
.note-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.note-card li {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.35;
  padding-left: 22px;
  position: relative;
}
.note-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .85em;
}
.artifact figcaption { margin-top: 10px; color: var(--faint); font-size: 12px; line-height: 1.5; }

/* pain 1 — scattered-sources scene */

.scatter-scene {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mini-card {
  padding: 10px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 6px 14px rgba(32, 29, 24, .05);
}
.mini-post { transform: translateY(12px); }

.mini-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--line-soft);
  border-radius: 3px;
}
.play-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 11px solid var(--muted);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.mini-photo { aspect-ratio: 5 / 4; background: var(--line-soft); border-radius: 3px; }

.mini-lines span {
  display: block;
  height: 6px;
  margin-top: 7px;
  border-radius: 3px;
  background: var(--line);
}
.mini-lines .short { width: 55%; }

.mini-tag {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

/* pain 3 — form-heavy entry abstraction */

.mock-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: 20px 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.mock-form .mini-tag { margin: 0 0 2px; }

.mock-row { display: grid; gap: 5px; }
.mock-label {
  position: relative;
  width: 34%;
  height: 6px;
  border-radius: 3px;
  background: var(--faint);
  opacity: .6;
}
.mock-label.req::after {
  content: "*";
  position: absolute;
  left: calc(100% + 5px);
  top: -6px;
  color: var(--accent);
  font-size: 12px;
  opacity: 1;
}
.mock-input {
  height: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.mock-add {
  margin: 2px 0 0;
  padding: 7px;
  border: 1px dashed var(--faint);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* ---------- 03 core journey ---------- */

.journey-row {
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  gap: clamp(36px, 4.5vw, 64px);
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line-soft);
}
.journey-row:first-of-type { border-top: 0; padding-top: 0; }
.journey-row:last-of-type { padding-bottom: 0; }

.journey-row.flip .journey-copy { order: 2; }
.journey-row.flip .journey-visual { order: 1; }
.journey-visual, .shots, .shots figure { min-width: 0; }

.kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.journey-copy h3 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.25; margin-bottom: 14px; text-wrap: balance; }
.journey-copy p { max-width: 52ch; color: var(--muted); font-size: 16px; }
.journey-copy p:last-child { margin-bottom: 0; }

.micro {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink) !important;
  font-size: 17px !important;
}

.shots { display: grid; gap: clamp(10px, 1.4vw, 18px); align-items: start; }
.shots-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shots-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
.journey-row.flip .shots-2 { margin-left: auto; }

.shots figure { margin: 0; }
.shots img { width: 100%; }
.shots .phone { border-radius: clamp(10px, 1.6vw, 20px); box-shadow: 0 12px 30px rgba(32, 29, 24, .08); }
.shots figcaption {
  margin-top: 9px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.print { margin: 0; }
.print img {
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(32, 29, 24, .08);
}

/* ---------- 04 AI process ---------- */

.substory { margin-top: 8px; }
.substory + .substory { margin-top: 96px; padding-top: 72px; border-top: 1px solid var(--line-soft); }

.substory h3 { font-size: clamp(22px, 2.3vw, 28px); margin-bottom: 12px; }
.substory-lead { max-width: 70ch; color: var(--muted); margin-bottom: 40px; }

.legend {
  display: grid;
  gap: 6px;
  margin-bottom: 36px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}
.legend p { margin: 0; font-size: 13.5px; color: var(--muted); }
.legend strong { color: var(--ink); font-weight: 600; }
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 50%;
  vertical-align: baseline;
}
.dot-ai { background: var(--accent); }
.dot-exec { background: transparent; border: 1.5px solid var(--accent); }
.dot-runtime { background: var(--faint); }
.dot-owner { background: var(--ink); }

.workflow {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow li {
  position: relative;
  padding: 22px 18px 6px 0;
  border-top: 2px solid var(--ink);
}
.workflow li + li { margin-left: 14px; }
.workflow li::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.step-num { display: none; }

.workflow h4 { font-size: 16px; line-height: 1.3; margin: 0 0 12px; }

.lane { position: relative; margin: 0 0 12px; padding-left: 17px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.lane::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.lane-ai::before { background: var(--accent); }
.lane-exec::before { background: transparent; border: 1.5px solid var(--accent); }
.lane-runtime::before { background: var(--faint); }
.lane-owner::before { background: var(--ink); }

/* triangle */

.triangle {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 600 / 440;
  color: var(--ink);
}
.triangle svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.triangle svg circle { fill: var(--accent); }

.tri-label {
  position: absolute;
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(13px, 2.4vw, 18px);
  line-height: 1.25;
}
.tri-top { top: -4%; left: 50%; transform: translate(-50%, -100%); text-align: center; }
.tri-left { bottom: -3%; left: 0; transform: translateY(100%); }
.tri-right { bottom: -3%; right: 0; transform: translateY(100%); text-align: right; }

.tri-center {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(58%, 300px);
  margin: 0;
  text-align: center;
  font-size: clamp(11.5px, 1.9vw, 14.5px);
  line-height: 1.55;
  color: var(--muted);
}
.tri-center strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.12em; margin-bottom: 2px; }

.tri-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 48px);
  margin-top: 84px;
}
.tri-detail h4 { font-size: 16px; margin-bottom: 10px; }
.tri-detail p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.tri-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.tri-list li {
  position: relative;
  padding-left: 15px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.tri-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .7;
}

.outcome-line {
  max-width: 60ch;
  margin: 56px auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  text-align: center;
}

/* ---------- 05 takeaways / cta ---------- */

.takeaways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(40px, 6vw, 88px);
}
.takeaways div { padding: 26px 0; border-top: 1px solid var(--line-soft); }
.takeaways h3 { font-size: 20px; margin-bottom: 8px; }
.takeaways p { margin: 0; max-width: 52ch; color: var(--muted); font-size: 15px; }

.cta { display: none; } /* remove legacy CTA styling — replaced by status note below */

.status-note {
  max-width: 60ch;
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.status-note strong { color: var(--ink); }

/* ---------- shared shell footer ---------- */

/* ---------- tablet ≤ 1080 ---------- */

@media (max-width: 1080px) {
  .workflow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 0; }
  .workflow li + li { margin-left: 0; }
  .workflow li { margin-right: 22px; padding-right: 0; }
  .facts { gap: 0 26px; }
}

/* ---------- ≤ 900 ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { max-width: 460px; }
  h1 { max-width: none; }

  .pain-columns { grid-template-columns: 1fr; gap: 56px; }
  .pain { display: block; }
  .pain-media { max-width: 480px; }

  .journey-row { grid-template-columns: 1fr; gap: 32px; align-items: start; padding: 56px 0; }
  .journey-row.flip .journey-copy { order: 1; }
  .journey-row.flip .journey-visual { order: 2; }
  .journey-row.flip .shots-2 { margin-left: 0; }

  .tri-detail { grid-template-columns: 1fr; gap: 28px; margin-top: 72px; }
  .takeaways { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- mobile ≤ 620 ---------- */

@media (max-width: 620px) {
  body { font-size: 16px; }

  .section, .hero { width: min(100% - 32px, var(--max)); }
  .section { padding: 68px 0 64px; }
  .section-head { margin-bottom: 48px; }

  .lede, .section-intro { font-size: 16.5px; }
  .facts { grid-template-columns: 1fr; }

  .journey-copy p { font-size: 15px; }

  .shots-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .shots-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .shots-3 .print { grid-column: 1 / -1; max-width: 340px; justify-self: center; }

  .workflow { grid-template-columns: 1fr; gap: 24px; }
  .workflow li { margin-right: 0; padding-top: 18px; padding-bottom: 0; }
  .lane { margin-bottom: 10px; }

  .legend { padding: 14px 16px; }
  .legend p { font-size: 12.5px; }

  .triangle { max-width: 100%; margin-top: 40px; }
  .tri-center { width: 62%; }

  .cta { display: none; } /* legacy CTA replaced by compact status note */
}

/* ---------- narrow mobile ≤ 420 ---------- */

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ===== Shared Case Shell — Xiaozao ===== */

[data-shell="case-header"] {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.shell-header-inner {
  width: min(100% - 48px, var(--max)); margin-inline: auto;
  display: flex; align-items: baseline; gap: 16px; padding: 18px 0 14px;
}
.shell-brand {
  font-weight: 600; text-decoration: none; color: var(--ink);
  font-size: 15px; white-space: nowrap;
}
.shell-brand:hover { text-decoration: underline; }

.shell-case-title {
  font-size: 13px; color: var(--muted); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}

[data-shell="section-nav"] {
  display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px;
  margin-left: auto;
}
[data-shell="section-nav"] a {
  text-decoration: none; color: var(--muted);
}
[data-shell="section-nav"] a:hover { color: var(--ink); }

[data-shell="case-footer"] {
  margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.shell-footer-inner {
  width: min(100% - 48px, var(--max)); margin-inline: auto;
}
.shell-connect {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.shell-connect a {
  color: var(--muted); text-decoration: underline;
}
.shell-connect a:hover { color: var(--ink); }

[data-shell="disclosure-note"] {
  margin-bottom: 16px; font-style: italic; color: var(--muted);
}

.skip-link { position: absolute; top: -100px; left: 0; z-index: 200; }
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  [data-shell="case-header"] { position: relative; }
}

@media (max-width: 620px) {
  .shell-header-inner { width: min(100% - 32px, var(--max)); padding: 14px 0 12px; }
  .shell-footer-inner { width: min(100% - 32px, var(--max)); }
}

@media (max-width: 420px) {
  .shell-header-inner { flex-wrap: wrap; gap: 8px; }
  .shell-case-title { max-width: 140px; }
  [data-shell="section-nav"] { width: 100%; justify-content: flex-start; margin-left: 0; }
}

.shell-cta-heading { font-size: 1.3em; color: var(--ink); margin-bottom: 12px; }
