:root {
  --bg: #f5f8fa;
  --surface: #ffffff;
  --ink: #12202b;
  --ink-2: #44525e;
  --ink-3: #6b7884;
  --line: #e3e9ee;
  --brand: #0e6b74;
  --brand-ink: #0a5259;
  --brand-soft: #e3f3f3;
  --accent: #e0703a;
  --pass: #18794e;
  --pass-soft: #e5f5ec;
  --fail: #b4402a;
  --fail-soft: #fbeae5;
  --pending: #8a6100;
  --pending-soft: #fdf3dc;
  --hero-a: #b9ece4;
  --hero-b: #d6e8f7;
  --dark: #12202b;
  --shadow: 0 1px 2px rgba(18, 32, 43, .04), 0 8px 28px rgba(18, 32, 43, .06);
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f171d; --surface: #16222b; --ink: #e9eff3; --ink-2: #b6c2cb; --ink-3: #8b98a3;
    --line: #26343f; --brand: #4fc1c4; --brand-ink: #7fd6d8; --brand-soft: #173a3d;
    --pass: #5fd39a; --pass-soft: #163527; --fail: #f08c75; --fail-soft: #3d201a;
    --pending: #f0c25e; --pending-soft: #3a2f14; --hero-a: #12403f; --hero-b: #152d44;
    --dark: #050a0d; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f171d; --surface: #16222b; --ink: #e9eff3; --ink-2: #b6c2cb; --ink-3: #8b98a3;
  --line: #26343f; --brand: #4fc1c4; --brand-ink: #7fd6d8; --brand-soft: #173a3d;
  --pass: #5fd39a; --pass-soft: #163527; --fail: #f08c75; --fail-soft: #3d201a;
  --pending: #f0c25e; --pending-soft: #3a2f14; --hero-a: #12403f; --hero-b: #152d44;
  --dark: #050a0d; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { font-weight: 700; font-size: 19px; color: var(--ink); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink-2); font-size: 15.5px; }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }

/* Hero */
.hero { background: linear-gradient(115deg, var(--hero-a), var(--hero-b)); padding: 72px 0 150px; }
.hero.short { padding: 56px 0 110px; }
.pill { display: inline-block; background: var(--surface); color: var(--brand-ink); font-weight: 600; font-size: 14.5px; padding: 6px 16px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 800; max-width: 760px; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 720px; margin-bottom: 30px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 16px; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 40px; }
.lift { margin-top: -96px; position: relative; }
.tag { display: inline-block; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; padding: 5px 15px; border-radius: 999px; margin-bottom: 14px; }
.tag.soft { background: var(--brand-soft); color: var(--brand-ink); }
.card h2 { font-size: clamp(24px, 3vw, 32px); }
.card .intro { color: var(--ink-2); font-size: 18px; max-width: 900px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 26px 0 18px; }
.stat { background: var(--brand-soft); border-radius: 14px; padding: 20px 22px; }
.stat b { display: block; font-size: 30px; color: var(--brand-ink); font-weight: 800; line-height: 1.1; margin-bottom: 6px; }
.stat span { color: var(--ink-2); font-size: 15px; }
.also { color: var(--ink-3); font-size: 15px; margin: 0; }

/* Sections */
section { padding: 64px 0 0; }
section:last-of-type { padding-bottom: 72px; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 13.5px; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 6px; }
.section-title { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 14px; }
.section-lede { color: var(--ink-2); max-width: 780px; margin-bottom: 28px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.work-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; color: inherit; }
.work-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.work-card .thumb { background: var(--brand-soft); height: 200px; display: grid; place-items: center; padding: 18px; }
.work-card .thumb svg { width: 100%; height: 100%; max-width: 360px; }
.work-card .body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.work-card h3 { font-size: 23px; }
.work-card p { color: var(--ink-2); flex: 1; }
.work-card .more { color: var(--brand); font-weight: 600; }
.work-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.chip { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.chip.pass { background: var(--pass-soft); color: var(--pass); }
.chip.fail { background: var(--fail-soft); color: var(--fail); }
.chip.pending { background: var(--pending-soft); color: var(--pending); }
.chip.muted { background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); }

/* Lifecycle */
.lc-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px 26px; }
.lc-card { font: inherit; color: var(--ink); text-align: left; background: var(--surface); border: 1.5px solid transparent; border-radius: 16px; padding: 20px 18px; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, background .15s; }
.lc-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.lc-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lc-badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.lc-text { display: flex; flex-direction: column; gap: 4px; }
.lc-card .lc-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.lc-card .lc-q { color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.lc-card[aria-selected="true"] { background: var(--brand); border-color: var(--brand); }
.lc-card[aria-selected="true"] .lc-badge { background: #fff; color: var(--brand); }
.lc-card[aria-selected="true"] .lc-name, .lc-card[aria-selected="true"] .lc-q { color: #fff; }
.lc-card:nth-child(-n+5)::after { content: "→"; position: absolute; right: -21px; top: 50%; transform: translateY(-50%); color: var(--brand); font-weight: 800; font-size: 18px; pointer-events: none; }
.lc-trace { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 12px; border-radius: 999px; padding: 10px 20px; background: var(--brand-soft); box-shadow: none; }
.lc-trace .lc-text { flex-direction: row; align-items: baseline; gap: 10px; }
.lc-trace .lc-badge { width: 28px; height: 28px; }
.ic { width: 22px; height: 22px; }
.ic-sm { width: 15px; height: 15px; }

.lc-panel { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; border-top: 4px solid var(--brand); }
.lc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.lc-head .lc-badge { width: 44px; height: 44px; font-size: 17px; }
.lc-head h3 { margin: 0; font-size: 24px; }
.lc-head .lc-short { margin: 2px 0 0; color: var(--ink-2); font-size: 16px; }
.lc-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin: 0 0 12px; }

.lc-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; }
.lc-steps li { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.lc-steps li:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--brand); border-right: 2px solid var(--brand); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.lc-step-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.lc-step-n { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .06em; }
.lc-step-n::before { content: "STEP "; }
.lc-step-t { font-weight: 600; font-size: 15px; line-height: 1.3; }

.lc-mid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 26px; }
.lc-why { background: var(--brand-soft); border-radius: 14px; padding: 18px 20px; border-left: 4px solid var(--brand); }
.lc-why .lc-label { color: var(--brand-ink); margin-bottom: 6px; display: block; }
.lc-why p { margin: 0; font-size: 17px; font-weight: 500; color: var(--ink); line-height: 1.45; }
.lc-stat { border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.lc-stat b { font-size: 32px; line-height: 1; color: var(--brand-ink); font-weight: 800; letter-spacing: -0.02em; }
.lc-stat > span:last-child { color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.lc-bar { display: block; height: 8px; border-radius: 999px; background: var(--fail); overflow: hidden; }
.lc-bar span { display: block; height: 100%; background: var(--pass); }

.lc-proof { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.lc-proof-item { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; background: var(--surface); transition: border-color .15s, transform .15s; }
.lc-proof-item:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.lc-thumb { display: block; height: 120px; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.lc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.lc-thumb-ic { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.lc-thumb-ic .ic { width: 40px; height: 40px; }
.lc-proof-t { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.lc-proof-t b { font-size: 15px; }
.lc-proof-t span { font-size: 13.5px; color: var(--ink-3); }

.lc-foot { margin-bottom: 14px; }
.lc-more { border-top: 1px solid var(--line); padding-top: 14px; }
.lc-more summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: 15px; list-style: none; }
.lc-more summary::-webkit-details-marker { display: none; }
.lc-more summary::before { content: "+ "; font-weight: 700; }
.lc-more[open] summary::before { content: "– "; }
.lc-more-body { padding-top: 14px; max-width: 860px; }
.lc-why-long { color: var(--ink-2); }
.lc-ex { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; }
.phase-tag { display: inline-block; background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 2px 10px; margin-right: 8px; letter-spacing: .06em; }
.phase-tag:hover { text-decoration: none; background: var(--brand); color: #fff; }

/* Project pages */
.subnav { position: sticky; top: 68px; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.subnav a { flex: none; font-size: 14.5px; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; }
.subnav a:hover, .subnav a.active { background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }

.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.meta dt { font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.meta dd { margin: 2px 0 0; font-weight: 600; font-size: 15.5px; }

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; }
.panel + .panel { margin-top: 22px; }
.panel h3 { font-size: 21px; }
.panel .note { color: var(--ink-3); font-size: 14.5px; margin: 14px 0 0; }

.figure { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.figure .img-wrap { background: #fff; padding: 18px; cursor: zoom-in; border-bottom: 1px solid var(--line); }
.figure .img-wrap img { margin: 0 auto; max-height: 560px; object-fit: contain; }
.figure figcaption { padding: 18px 24px; color: var(--ink-2); font-size: 15px; }
.figure figcaption b { color: var(--ink); display: block; font-size: 16px; margin-bottom: 2px; }
figure { margin: 0; }

ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--ink-2); }
ul.ticks li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
ul.pains li::before { border: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); transform: none; top: 9px; }

.callout { background: var(--brand-soft); border-radius: 14px; padding: 20px 24px; color: var(--ink); }
.callout b { color: var(--brand-ink); }

/* Tables */
.table-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
td.id { font-weight: 700; color: var(--brand-ink); white-space: nowrap; }
td .ac { color: var(--ink-2); margin: 0; padding-left: 16px; }
td .ac li { margin-bottom: 3px; }
tr.epic td { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.recommended { outline: 2px solid var(--brand); outline-offset: -2px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters button { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Options */
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.option { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); }
.option.pick { border: 2px solid var(--brand); background: var(--brand-soft); }
.option h4 { font-size: 17px; }
.option p { color: var(--ink-2); font-size: 15px; margin-bottom: 8px; }
.option .price { font-size: 14px; color: var(--ink-3); margin: 0; }

/* Matrix */
.matrix { display: grid; grid-template-columns: 34px 1fr 1fr; grid-template-rows: 1fr 1fr 30px; gap: 10px; }
.matrix .q { border-radius: 12px; padding: 16px 18px; font-size: 14.5px; }
.matrix .q h5 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; }
.matrix .q ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.matrix .q1 { background: var(--bg); border: 1px solid var(--line); }
.matrix .q2 { background: var(--brand-soft); }
.matrix .q2 h5 { color: var(--brand-ink); }
.matrix .ylab { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 12.5px; color: var(--ink-3); font-weight: 600; grid-row: 1 / 3; align-self: center; }
.matrix .xlab { grid-column: 2 / 4; text-align: center; font-size: 12.5px; color: var(--ink-3); font-weight: 600; align-self: center; }

/* UAT bar */
.uat-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 16px 0 10px; }
.uat-bar span { display: block; height: 100%; }
.uat-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-2); }
.uat-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Board */
.board { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.board .col { background: var(--bg); border-radius: 12px; padding: 12px; border: 1px solid var(--line); min-width: 150px; }
.board .col h5 { margin: 0 0 10px; font-size: 13.5px; }
.board .col div { background: var(--surface); border-radius: 8px; padding: 9px 10px; font-size: 13px; color: var(--ink-2); box-shadow: 0 1px 2px rgba(0,0,0,.06); margin-bottom: 6px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gallery button { all: unset; cursor: zoom-in; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: block; }
.gallery button:focus-visible { outline: 3px solid var(--brand); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; width: 100%; background: #fff; border-bottom: 1px solid var(--line); }
.gallery span { display: block; padding: 10px 14px; font-size: 14px; font-weight: 600; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(8, 14, 18, .88); display: none; z-index: 100; padding: 24px; }
.lightbox.open { display: flex; flex-direction: column; }
.lightbox .lb-img { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; }
.lightbox img { max-width: none; width: auto; max-height: none; background: #fff; border-radius: 8px; }
.lightbox img.fit { max-width: 100%; max-height: 100%; margin: auto; }
.lightbox .lb-bar { display: flex; justify-content: space-between; align-items: center; color: #fff; padding-bottom: 12px; gap: 12px; font-size: 15px; }
.lightbox button { font: inherit; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }

/* Lessons */
.lessons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lessons div { border-radius: 14px; padding: 22px; background: var(--surface); box-shadow: var(--shadow); }
.lessons h4 { font-size: 16px; margin-bottom: 10px; }
.lessons ul { padding-left: 18px; margin: 0; color: var(--ink-2); font-size: 15px; }
.lessons li { margin-bottom: 6px; }

/* Resume */
.cv-section { margin-bottom: 34px; }
.cv-section h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); border-bottom: 2px solid var(--brand-soft); padding-bottom: 8px; margin-bottom: 18px; }
.role { margin-bottom: 24px; }
.role-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.role-head h4 { font-size: 18px; margin: 0; }
.role-head span { color: var(--ink-3); font-size: 15px; white-space: nowrap; }
.role .sub { color: var(--ink-2); font-weight: 600; font-size: 15.5px; margin: 2px 0 8px; }
.role ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.role li { margin-bottom: 5px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Case study: lifecycle strip, tiles, collapsible tables */
.phase-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 22px 0 26px; }
.ps-item { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--surface); border-radius: 14px; padding: 14px 14px 16px; box-shadow: var(--shadow); color: inherit; border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.ps-item:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.ps-item .lc-badge { width: 30px; height: 30px; font-size: 13px; }
.ps-name { font-weight: 700; font-size: 15.5px; }
.ps-what { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--surface); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.tile-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--fail-soft); color: var(--fail); margin-bottom: 4px; }
.tile b { font-size: 15.5px; }
.tile span:last-child { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.flow-steps { margin-bottom: 26px; }
.flow-steps li { background: var(--surface); box-shadow: var(--shadow); border-color: transparent; }
.flow-steps .lc-step-n::before { content: ""; }
.note-line { color: var(--ink-3); font-size: 14.5px; margin: 6px 0 0; }
.show-all { font: inherit; font-size: 14.5px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border: 0; border-radius: 999px; padding: 8px 16px; margin-top: 12px; cursor: pointer; }
.show-all:hover { background: var(--brand); color: #fff; }
table[data-collapsed="true"] tbody tr.over { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--ink-3); font-size: 15px; background: var(--surface); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Responsive */
@media (max-width: 960px) {
  .grid-3, .options, .lessons { grid-template-columns: 1fr; }
  .lc-tabs { grid-template-columns: repeat(3, 1fr); }
  .lc-card:nth-child(-n+5)::after { content: none; }
  .lc-steps { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .lc-steps li::after { display: none; }
  .lc-mid { grid-template-columns: 1fr; }
  .phase-strip { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .hero { padding: 48px 0 120px; }
  .card, .panel { padding: 24px 20px; }
  .lc-tabs { grid-template-columns: 1fr; gap: 10px; }
  .lc-card { flex-direction: row; align-items: center; padding: 14px 16px; }
  .lc-trace { border-radius: 16px; justify-content: flex-start; }
  .lc-trace .lc-text { flex-direction: column; gap: 2px; }
  .lc-panel { padding: 22px 18px; }
  .lc-steps { grid-template-columns: 1fr; gap: 10px; }
  .lc-steps li { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
  .lc-steps li:not(:last-child)::after { display: block; right: auto; left: 33px; top: auto; bottom: -11px; transform: rotate(135deg); }
  .lc-step-n { display: none; }
  .lc-proof { grid-template-columns: 1fr; }
  .phase-strip { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: 1fr; }
  .matrix { grid-template-columns: 24px 1fr; grid-template-rows: auto auto auto; }
  .matrix .q { grid-column: 2; }
  .matrix .ylab { grid-row: 1 / 3; }
  .matrix .xlab { grid-column: 2; }
  .subnav { top: 68px; }
}

/* Print / PDF */
@media print {
  .site-header, .subnav, .nav-toggle, .btns, .filters, .lightbox, .site-footer, .show-all { display: none !important; }
  table[data-collapsed="true"] tbody tr.over { display: table-row !important; }
  body { background: #fff; font-size: 12pt; }
  .hero { background: none; padding: 0 0 12pt; }
  .lift { margin-top: 0; }
  .card, .panel, .figure, .work-card, .lc-panel, .lessons div { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  section { padding-top: 18pt; }
  a { color: inherit; }
  .figure .img-wrap img { max-height: 420px; }
}
