/* Cat Wu 怎麼做產品:訪談合成牆。深藍綠牆面、杏色便利貼、圓體字 */

:root {
  color-scheme: light dark;
  --wall: #0f6170;         /* 牆面、2026 年的標記 */
  --wall-deep: #0a4450;
  --coral: #ff8a5c;        /* 2025 年的標記 */
  --peach: #ffc7a6;        /* 牆上 2025 的便利貼 */
  --blush: #eaf7f6;        /* 牆上 2026 的便利貼 */
  --plum: #0d2a30;         /* 貼紙上的字,不隨深淺色改變 */

  --paper: #f3f9f9;        /* 頁面底色 */
  --card: #ffffff;
  --ink: #0d2a30;
  --ink-soft: #46656b;
  --rule: #c4dfe1;
  --link: #0b6b7c;
  --mark: #ffe0cc;         /* 引文的螢光筆底 */
  --mark-ink: #0d2a30;
  --focus: #0d2a30;

  --font: "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #0c505c;
    --wall-deep: #083942;
    --paper: #081a1e;
    --card: #0f2a30;
    --ink: #e6f5f5;
    --ink-soft: #a3c4c8;
    --rule: #1f4950;
    --link: #7fd6e0;
    --mark: #5a2f1a;
    --mark-ink: #ffe9dc;
    --focus: #ffc7a6;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.85;
}

a { color: var(--link); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.frame { width: min(100% - 2rem, 70rem); margin-inline: auto; }

/* ── 牆:標題與矩陣 ── */
.wall {
  background: var(--wall);
  color: #fff;
  padding: 1.25rem 0 4rem;
  --focus: #fff;
}
.wall a { color: #fff; }

.home {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgb(255 255 255 / 0.55);
}
.home:hover { border-bottom-color: #fff; }

.wall h1 {
  margin-top: 3.5rem;
  font-weight: 900;
  font-size: clamp(3.1rem, 12.5vw, 9.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.wall h1 span { display: block; }

.tagline {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.55rem 1rem 0.6rem;
  background: var(--peach);
  color: var(--plum);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  line-height: 1.4;
  transform: rotate(-1.4deg);
  box-shadow: 0.3rem 0.4rem 0 var(--wall-deep);
}

.intro {
  margin-top: 2.75rem;
  display: grid;
  gap: 1rem 3rem;
  max-width: 62rem;
}
.intro p { max-width: 36em; }
@media (min-width: 56rem) {
  .intro { grid-template-columns: 1fr 1fr; }
}

.matrix-sec { margin-top: 4rem; }
.matrix-sec h2 {
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.25;
}
.matrix-hint { margin-top: 0.6rem; max-width: 38em; }

.matrix {
  margin-top: 1.75rem;
  border-collapse: separate;
  border-spacing: 0.3rem;
  margin-inline: -0.3rem;
  width: calc(100% + 0.6rem);
  table-layout: fixed;
}
.matrix th, .matrix td { padding: 0; font-weight: 400; text-align: center; vertical-align: middle; }
.matrix .corner { width: 7.4rem; }
.matrix .sum { display: none; }

.matrix thead th { vertical-align: bottom; padding-bottom: 0.3rem; }
.matrix thead b {
  display: block;
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1.2;
}
.matrix thead span, .matrix thead i { display: none; }

.matrix tbody th {
  text-align: left;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  padding-right: 0.4rem;
}
.matrix tbody th a { text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 0.5); }
.matrix tbody th a:hover { border-bottom-color: #fff; }

.on, .off {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  max-width: 3.6rem;
  margin-inline: auto;
}
.on {
  background: var(--blush);
  box-shadow: 0.14rem 0.2rem 0 var(--wall-deep);
  transition: transform 0.15s ease;
}
.on.y25 { background: var(--peach); }
.off { border: 1.5px dashed rgb(255 255 255 / 0.5); }

/* 便利貼貼得不太齊 */
.matrix td:nth-child(3n) .on { transform: rotate(-3deg); }
.matrix td:nth-child(3n + 1) .on { transform: rotate(2deg); }
.matrix tr:nth-child(even) td:nth-child(even) .on { transform: rotate(3.5deg); }
.matrix tr:nth-child(3n) td:nth-child(odd) .on { transform: rotate(-1.5deg); }
.matrix .on:hover, .matrix .on:focus-visible { transform: rotate(0) scale(1.12); }

.matrix-key {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  font-size: 0.92rem;
}
.key { display: inline-block; width: 1rem; height: 1rem; }
.key:not(:first-child) { margin-left: 0.9rem; }
.k25 { background: var(--peach); }
.k26 { background: var(--blush); }
.koff { border: 1.5px dashed rgb(255 255 255 / 0.6); }
.matrix-note { margin-top: 0.5rem; font-size: 0.92rem; max-width: 40em; opacity: 0.92; }

@media (min-width: 48rem) {
  .matrix { border-spacing: 0.6rem; margin-inline: -0.6rem; width: calc(100% + 1.2rem); }
  .matrix .corner { width: 13rem; }
  .matrix .sum { display: table-cell; width: 4.2rem; font-weight: 700; font-size: 0.95rem; text-align: right; }
  .matrix thead span { display: block; font-size: 0.82rem; font-weight: 700; line-height: 1.3; }
  .matrix thead i { display: block; font-style: normal; font-size: 0.78rem; opacity: 0.85; }
  .matrix tbody th { font-size: 1.15rem; }
}

/* ── 共用:章節標題、編號徽章 ── */
main > section, .themes { padding-block: 4.5rem 0; }

.sessions h2, .numbers h2, .refs h2 {
  font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.25;
}
.lead { margin-top: 0.6rem; color: var(--ink-soft); max-width: 38em; }

.badge, .src b, .dot {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
  border-radius: 50%;
  background: var(--wall);
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
}
.badge.y25, .y25 .src b, .dot.y25 { background: var(--coral); color: var(--plum); }

/* ── 時間軸 ── */
.axis { margin-top: 2rem; padding: 4.6rem 0.9rem 6.2rem; }
.axis-line { position: relative; height: 3px; background: var(--ink); border-radius: 2px; }

.dot {
  position: absolute;
  left: var(--x);
  transform: translateX(-50%);
}
.dot::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--ink-soft);
}
.up1 { bottom: 0.9rem; }
.up1::after { top: 100%; height: 0.9rem; }
.up2 { bottom: 2.9rem; }
.up2::after { top: 100%; height: 2.9rem; }
.dn1 { top: 0.9rem; }
.dn1::after { bottom: 100%; height: 0.9rem; }
.dn2 { top: 2.9rem; }
.dn2::after { bottom: 100%; height: 2.9rem; }

.tick {
  position: absolute;
  left: var(--x);
  top: -0.3rem;
  width: 1px;
  height: calc(0.6rem + 3px);
  background: var(--ink);
}
.tick i {
  position: absolute;
  top: 5.3rem;
  left: 0;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 0.74rem;
  line-height: 1;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tick:first-of-type i { transform: translateX(-15%); }

.session-list {
  margin-top: 1rem;
  display: grid;
  gap: 1.5rem 3rem;
}
.session-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.session-list .badge { margin-top: 0.2rem; }
.session-list h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.5; }
.session-list time { margin-left: 0.4rem; font-weight: 400; font-size: 0.92rem; color: var(--ink-soft); white-space: nowrap; }
.session-list p { margin-top: 0.15rem; font-size: 0.97rem; line-height: 1.75; color: var(--ink-soft); max-width: 34em; }
@media (min-width: 52rem) {
  .session-list { grid-template-columns: 1fr 1fr; }
}

/* ── 篩選列(由 script.js 建立) ── */
.filter {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-inline: -1rem;
  padding: 0.6rem 1rem;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.45rem;
}
.filter-label { font-weight: 700; font-size: 0.95rem; margin-right: 0.2rem; }
@media (max-width: 30rem) {
  .filter-label { display: none; }
  .filter { gap: 0.35rem; }
  .filter button { min-width: 2.15rem; height: 2.15rem; padding: 0 0.5rem; }
}
.filter button {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filter-status { flex-basis: 100%; font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }

/* ── 主題 ── */
.themes { padding-top: 3.5rem; }
.theme { padding-block: 3rem; border-bottom: 1px solid var(--rule); }
.theme:last-child { border-bottom: 0; padding-bottom: 0; }

.theme-head h2 {
  font-weight: 900;
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
  line-height: 1.25;
}
.theme-head p { margin-top: 0.8rem; color: var(--ink-soft); max-width: 30em; }

.notes { margin-top: 1.75rem; display: grid; gap: 1rem; }

.note {
  background: var(--card);
  border-left: 0.45rem solid var(--wall);
  padding: 1rem 1.15rem 1.15rem;
  max-width: 44rem;
}
.note.y25 { border-left-color: var(--coral); }
.note > * + * { margin-top: 0.7rem; }
.note:target { outline: 3px solid var(--ink); outline-offset: 3px; }

.src a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.97rem;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}
.src a:hover { text-decoration: underline; }
.src time { font-weight: 400; color: var(--ink-soft); }

.note ul { display: grid; gap: 0.45rem; }
.note li { position: relative; padding-left: 1.1rem; }
.note li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.72em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--ink-soft);
}

q {
  quotes: "\201C" "\201D";
  background: var(--mark);
  color: var(--mark-ink);
  padding: 0.12em 0.3em;
  font-weight: 700;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (min-width: 60rem) {
  .theme { display: grid; grid-template-columns: 20rem 1fr; gap: 3.5rem; align-items: start; }
  .theme-head { position: sticky; top: 5.5rem; }
  .notes { margin-top: 0; }
}

/* ── 數字 ── */
.numbers h3, .refs h3 { font-weight: 900; font-size: 1.3rem; line-height: 1.4; }

.speed { margin-top: 2.25rem; }
.speed figcaption p { margin-top: 0.25rem; font-size: 0.95rem; color: var(--ink-soft); }
.speed-chart { margin-top: 1.5rem; display: grid; gap: 1.6rem; }

.speed-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.6rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.speed-label a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.speed-label a:hover { text-decoration: underline; }
.speed-label time { color: var(--ink-soft); }
.speed-label span { flex-basis: 100%; color: var(--ink-soft); }

.track, .speed-axis { position: relative; margin-inline: 1.1rem 1.6rem; }
.track { height: 1.4rem; margin-top: 0.6rem; }
.track::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 2px dotted var(--rule);
}
.span {
  position: absolute;
  left: var(--a);
  width: calc(var(--b) - var(--a));
  top: calc(50% - 2px);
  height: 4px;
  background: var(--wall);
}
.mark {
  position: absolute;
  left: var(--x);
  top: 50%;
  width: 1.2rem;
  height: 1.2rem;
  transform: translate(-50%, -50%);
}
.mark.now { background: var(--wall); }
.mark.was { background: var(--paper); border: 3px solid var(--ink); border-radius: 50%; }
.mark.was.wide { width: calc(var(--w) + 1.2rem); border-radius: 0.6rem; transform: translate(-0.6rem, -50%); }

.speed-axis { height: 1.6rem; border-top: 2px solid var(--ink); }
.speed-axis span {
  position: absolute;
  left: var(--x);
  top: 0.45rem;
  transform: translateX(-50%);
  font-size: 0.8rem;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink-soft);
}
.speed-axis span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.45rem;
  height: 0.35rem;
  border-left: 2px solid var(--ink);
}
.speed-axis span:nth-child(4) { transform: translateX(-72%); }
.speed-axis span:nth-child(4)::before { left: 72%; }
.speed-axis span:last-child { transform: translateX(-38%); }
.speed-axis span:last-child::before { left: 38%; }

@media (min-width: 52rem) {
  .speed-row { display: grid; grid-template-columns: 17rem 1fr; gap: 1.5rem; align-items: center; }
  .track { margin-top: 0; }
  .speed-axis { margin-left: calc(17rem + 1.5rem + 1.1rem); }
}

.figs { margin-top: 3.25rem; display: grid; gap: 3rem; }
@media (min-width: 52rem) {
  .figs { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.figs p, .figs dd { font-size: 0.98rem; color: var(--ink-soft); max-width: 32em; }

.share-bar {
  margin-block: 1rem;
  height: 3.4rem;
  border: 3px solid var(--ink);
  background: var(--card);
}
.share-fill {
  display: flex;
  align-items: center;
  width: 65%;
  height: 100%;
  padding-left: 0.8rem;
  background: var(--wall);
  color: #fff;
  border-right: 3px solid var(--ink);
}
.share-fill b { font-weight: 900; font-size: 1.6rem; line-height: 1; }

.freq dl { margin-top: 1rem; display: grid; gap: 1.1rem; }
.freq dt { font-weight: 900; font-size: 1.35rem; line-height: 1.4; }

/* ── Reference ── */
.refs { padding-bottom: 5rem; }
.refs h3 { margin-top: 2rem; }
.refs ol, .refs ul { margin-top: 0.75rem; display: grid; gap: 0.7rem; max-width: 50rem; }
.refs li { font-size: 0.98rem; line-height: 1.75; overflow-wrap: anywhere; }
.refs ol { counter-reset: ref; }
.refs ol li { counter-increment: ref; position: relative; padding-left: 2.4rem; }
.refs ol li::before {
  content: counter(ref);
  position: absolute;
  left: 0;
  top: 0.12rem;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--wall);
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  line-height: 1;
}
.refs ol li:nth-child(-n + 2)::before { background: var(--coral); color: var(--plum); }
.refs ul li { padding-left: 1.1rem; position: relative; }
.refs ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.7em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--ink-soft);
}
.refs-note { margin-top: 2rem; font-size: 0.92rem; color: var(--ink-soft); max-width: 44em; }

/* ── 頁尾 ── */
.foot { background: var(--wall); padding: 2rem 0 2.5rem; --focus: #fff; }
.foot a { color: #fff; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .on { transition: none; }
}
