/* ============================================================
   醫途半路 MEDROAD
   亮系醫學編輯誌 × 科技感（NBIS / Palantir / Peter Attia 血統）
   預設亮色，右上可一鍵切深色。單一組件、雙主題。
   ============================================================ */

:root {
  /* ---- 亮色（預設）---- */
  --paper:  #f5f3ec;
  --paper-2:#ffffff;
  --paper-3:#edeae0;
  --ink:    #16191a;
  --ink-soft:#39413f;
  --dim:    #5f6a6a;
  --faint:  #949c99;
  --line:   #e4e0d4;
  --line-2: #d8d3c4;
  --teal:   #0c8f6c;
  --teal-deep:#0a6b50;
  --coral:  #d94a2f;
  --gold:   #ad7c15;
  --sky:    #2f6fce;
  --violet: #6a4fd0;
  --shadow: rgba(28,34,28,0.09);
  --shadow-lg: rgba(28,34,28,0.14);
  --tint-teal: rgba(12,143,108,0.09);
  --tint-coral: rgba(217,74,47,0.09);
  --grain-op: 0.35;

  /* ---- 品牌恆定色（不隨主題）---- */
  --lime:   #c6f04e;
  --lime-ink:#12160a;

  --serif: "Fraunces", "Noto Serif TC", Georgia, serif;
  --sans:  "Noto Sans TC", -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "Menlo", monospace;
}

:root[data-theme="dark"] {
  --paper:  #0a1016;
  --paper-2:#0e161e;
  --paper-3:#121c25;
  --ink:    #e9e4d7;
  --ink-soft:#c3c0b6;
  --dim:    #8fa0ab;
  --faint:  #5c6c77;
  --line:   #1d2a36;
  --line-2: #26343f;
  --teal:   #35e0b2;
  --teal-deep:#1f8a70;
  --coral:  #ff6b4a;
  --gold:   #e8b64c;
  --sky:    #6cb8ff;
  --violet: #b490f5;
  --shadow: rgba(0,0,0,0.4);
  --shadow-lg: rgba(0,0,0,0.55);
  --tint-teal: rgba(53,224,178,0.08);
  --tint-coral: rgba(255,107,74,0.08);
  --grain-op: 0.5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  background-image:
    radial-gradient(1100px 520px at 88% -8%, var(--tint-teal), transparent 60%),
    radial-gradient(900px 480px at -5% 8%, var(--tint-coral), transparent 55%);
}

::selection { background: var(--teal); color: var(--paper); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: var(--grain-op);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .grain { mix-blend-mode: screen; }

/* --------------------------------------------------- aurora（星雲漸層）*/
.aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5;
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .aurora span { mix-blend-mode: screen; opacity: 0.42; }
.aurora span:nth-child(1) { width: 46%; height: 70%; top: -18%; right: 4%; background: radial-gradient(circle, var(--teal), transparent 70%); }
.aurora span:nth-child(2) { width: 40%; height: 60%; top: 6%; right: 26%; background: radial-gradient(circle, var(--lime), transparent 70%); opacity: 0.34; }
.aurora span:nth-child(3) { width: 34%; height: 55%; bottom: -20%; right: 12%; background: radial-gradient(circle, var(--sky), transparent 70%); }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem clamp(1.1rem, 4vw, 3.2rem);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark {
  width: 2.3rem; height: 2.3rem; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 900; font-size: 1.2rem;
  color: var(--lime-ink); background: var(--lime);
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.12);
  object-fit: cover;
}
.brand-txt b { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; letter-spacing: 0.12em; line-height: 1.15; }
.brand-txt em { display: block; font-family: var(--mono); font-style: normal; font-size: 0.56rem; letter-spacing: 0.4em; color: var(--teal); }

.nav { display: flex; align-items: center; gap: clamp(0.7rem, 2vw, 1.6rem); margin-left: auto; margin-right: 1.4rem; }
.nav a {
  position: relative; font-size: 0.86rem; font-weight: 500; color: var(--dim);
  letter-spacing: 0.06em; padding: 0.2rem 0; transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.35rem; height: 2px;
  background: var(--teal); border-radius: 2px;
}

.head-right { display: flex; align-items: center; gap: 0.6rem; }
.nav-fb {
  font-size: 0.8rem; font-weight: 500; color: var(--paper) !important;
  background: var(--ink); padding: 0.42rem 0.95rem; border-radius: 99px;
  transition: transform 0.18s, opacity 0.18s; white-space: nowrap;
}
.nav-fb:hover { transform: translateY(-1px); opacity: 0.9; }

.theme-toggle {
  width: 2.15rem; height: 2.15rem; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 99px; color: var(--dim);
  transition: color 0.2s, border-color 0.2s, transform 0.3s;
}
.theme-toggle:hover { color: var(--teal); border-color: var(--teal); transform: rotate(18deg); }
.i-sun { display: none; } .i-moon { display: block; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

/* ------------------------------------------------ shared bits */
main { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 3.2rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.28em;
  color: var(--teal); text-transform: uppercase;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 50%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.04em;
  padding: 0.72rem 1.5rem; border-radius: 99px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow-lg); }
.btn span { transition: transform 0.2s; }
.btn:hover span { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; }

.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

/* section scaffolding */
.sect { padding: clamp(3rem, 6vw, 5rem) 0 1rem; }
.sect--tint {
  background: var(--paper-3);
  margin: 2rem calc(50% - 50vw) 0; padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sect--tint > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.sect-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 0.7rem 1.5rem; margin-bottom: 1.9rem;
}
.sect-title {
  font-family: var(--serif); font-weight: 900; font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: 0.02em; display: flex; align-items: baseline; gap: 0.7rem; line-height: 1.2;
}
.sect-title .num {
  font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.1em;
  color: var(--teal); border: 1px solid var(--teal); border-radius: 5px;
  padding: 0.1rem 0.4rem; transform: translateY(-0.3rem); font-feature-settings: "tnum";
}
.sect-sub { color: var(--dim); font-size: 0.9rem; max-width: 32em; }
.sect-sub--wide { max-width: none; margin: -1rem 0 1.6rem; }
.sect-more { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--teal); transition: opacity 0.2s; }
.sect-more:hover { opacity: 0.6; }

/* tags */
.tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  padding: 0.2rem 0.55rem; border-radius: 4px;
  background: var(--tint-teal); color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
}
.tag--type { background: transparent; color: var(--faint); border-color: var(--line-2); }
.cat-a .tag:first-child, .cat-a.tag { background: color-mix(in srgb, var(--sky) 12%, transparent); color: var(--sky); border-color: color-mix(in srgb, var(--sky) 32%, transparent); }
.cat-b .tag:first-child, .cat-b.tag { background: color-mix(in srgb, var(--coral) 12%, transparent); color: var(--coral); border-color: color-mix(in srgb, var(--coral) 34%, transparent); }
.cat-c .tag:first-child, .cat-c.tag { background: var(--tint-teal); color: var(--teal); border-color: color-mix(in srgb, var(--teal) 30%, transparent); }
.cat-d .tag:first-child, .cat-d.tag { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); border-color: color-mix(in srgb, var(--gold) 34%, transparent); }
.cat-e .tag:first-child, .cat-e.tag { background: color-mix(in srgb, var(--violet) 12%, transparent); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 32%, transparent); }

/* ==================================================== HOME: hero */
.hero-land {
  position: relative; overflow: hidden;
  margin: 0 calc(50% - 50vw); padding: clamp(3rem, 7vw, 6rem) calc(50vw - 50%) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero-land-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.hero-land .eyebrow { margin-bottom: 1.4rem; }
.hero-h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(2.1rem, 6.5vw, 4.4rem); line-height: 1.14; letter-spacing: -0.005em;
  max-width: 16em;
}
.hero-lead {
  color: var(--ink-soft); font-size: clamp(1rem, 1.7vw, 1.18rem); line-height: 1.85;
  max-width: 34em; margin: 1.5rem 0 2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-ecg {
  display: flex; align-items: center; gap: 1rem; margin-top: 2.6rem;
  color: var(--teal); opacity: 0.85;
}
.hero-ecg .ecg { width: min(340px, 55%); height: 40px; }
.ecg path { animation: dash 2.4s ease-in-out infinite; stroke-dasharray: 620; }
@keyframes dash { 0% { stroke-dashoffset: 620; } 60%,100% { stroke-dashoffset: 0; } }
.hero-count { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--faint); }

/* ==================================================== HOME: featured */
.feat-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.4rem; }
.feat-lead {
  display: flex; flex-direction: column; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 0 var(--shadow); transition: transform 0.28s, box-shadow 0.28s, border-color 0.28s;
}
.feat-lead:hover { transform: translateY(-5px); box-shadow: 0 20px 44px var(--shadow-lg); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.feat-media { overflow: hidden; border-bottom: 1px solid var(--line); }
.feat-media img { width: 100%; aspect-ratio: 16/9.5; object-fit: cover; transition: transform 0.5s ease; }
.feat-lead:hover .feat-media img { transform: scale(1.04); }
.feat-body { padding: 1.4rem 1.6rem 1.6rem; }
.feat-body .card-tags { display: flex; gap: 0.45rem; margin-bottom: 0.85rem; }
.feat-title {
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  line-height: 1.4; margin-bottom: 0.7rem;
}
.feat-ex { color: var(--dim); font-size: 0.95rem; line-height: 1.75; margin-bottom: 1.1rem; }
.feat-col { display: flex; flex-direction: column; gap: 1.4rem; }

/* ==================================================== series hubs */
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 1rem; }
.series-card {
  display: flex; flex-direction: column; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.series-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px var(--shadow-lg); border-color: color-mix(in srgb, var(--teal) 42%, var(--line)); }
.series-media { overflow: hidden; background: var(--paper-3); border-bottom: 1px solid var(--line); }
.series-media img { width: 100%; aspect-ratio: 16/8; object-fit: cover; transition: transform 0.45s ease; }
.series-card:hover .series-media img { transform: scale(1.045); }
.series-media--blank { aspect-ratio: 16/8; display: grid; place-items: center; color: var(--line-2); font: 900 3rem var(--serif); }
.series-card-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.1rem 1.15rem; }
.series-card-top { display: flex; justify-content: space-between; color: var(--faint); font: 0.64rem var(--mono); letter-spacing: 0.1em; }
.series-index { color: var(--teal); }
.series-card h3 { margin: 0.55rem 0 0.4rem; color: var(--ink); font: 700 1.12rem/1.45 var(--serif); }
.series-card p { color: var(--dim); font-size: 0.8rem; line-height: 1.7; margin-bottom: 0.8rem; }
.series-card-go { margin-top: auto; color: var(--teal); font: 0.68rem var(--mono); letter-spacing: 0.08em; }
.series-grid--page { margin-top: 1rem; }
.series-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.65rem; margin: 1.15rem 0 1.5rem; color: var(--faint); font: 0.72rem var(--mono); letter-spacing: 0.06em; }
.series-quick-link { padding: 0.35rem 0.65rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--dim); transition: color 0.2s, border-color 0.2s, background 0.2s; }
.series-quick-link:hover { color: var(--teal); border-color: var(--teal); background: var(--tint-teal); }
.series-quick-link i { font-style: normal; color: var(--faint); margin-left: 0.2rem; }
.series-detail-head { border-bottom: 1px solid var(--line); padding: 1.4rem 0 1.8rem; margin-bottom: 2rem; }
.series-detail-meta { color: var(--faint); font: 0.68rem var(--mono); letter-spacing: 0.1em; margin-top: 1rem; }
.series-article-grid { margin-bottom: 2rem; }

/* ==================================================== cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.4rem; }

.card {
  display: flex; flex-direction: column; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 0 var(--shadow); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px var(--shadow-lg); border-color: color-mix(in srgb, var(--teal) 38%, var(--line)); }
.card-media { overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; aspect-ratio: 16/9.5; object-fit: cover; transition: transform 0.45s ease; }
.card:hover .card-media img { transform: scale(1.045); }
.card-media--blank { aspect-ratio: 16/9.5; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, var(--paper-3), var(--paper-2)); }
.card-media--blank span { font-family: var(--serif); font-weight: 900; font-size: 2.8rem; color: var(--line-2); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.05rem 1.2rem 1.15rem; }
.card-tags { display: flex; gap: 0.45rem; margin-bottom: 0.6rem; }
.card-title { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; line-height: 1.5; margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { color: var(--dim); font-size: 0.84rem; line-height: 1.7; margin-bottom: 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em; color: var(--faint);
  border-top: 1px dashed var(--line-2); padding-top: 0.7rem; }

/* mini card (featured column) — 無圖橫式 */
.card--mini { flex-direction: row; }
.card--mini .card-media { flex: 0 0 38%; border-bottom: none; border-right: 1px solid var(--line); }
.card--mini .card-media img { height: 100%; aspect-ratio: auto; }
.card--mini .card-media--blank { aspect-ratio: auto; }
.card--mini .card-excerpt { display: none; }
.card--mini .card-body { padding: 1rem 1.1rem; }

.card, .col, .note-row { animation: rise 0.5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==================================================== columns */
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.col {
  position: relative; display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.3rem 1.2rem; overflow: hidden; transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.col::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.col.cat-a::before { background: var(--sky); } .col.cat-b::before { background: var(--coral); }
.col.cat-c::before { background: var(--teal); } .col.cat-d::before { background: var(--gold); }
.col.cat-e::before { background: var(--violet); }
.col:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow-lg); border-color: var(--line-2); }
.col-top { display: flex; align-items: baseline; justify-content: space-between; }
.col-idx { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--faint); }
.col-n { font-family: var(--serif); font-weight: 900; font-size: 1.7rem; color: var(--ink); }
.col-n::after { content: " 篇"; font-family: var(--sans); font-weight: 400; font-size: 0.62rem; color: var(--faint); }
.col-name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.06em; margin-top: 0.2rem; }
.col-eg { font-size: 0.76rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-go { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--teal); margin-top: 0.6rem; opacity: 0; transform: translateX(-4px); transition: 0.22s; }
.col:hover .col-go { opacity: 1; transform: none; }

/* ==================================================== notes list */
.sect--notes { padding-top: clamp(3rem, 6vw, 5rem); }
.note-list { display: flex; flex-direction: column; }
.note-row {
  display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 1.4rem;
  padding: 1.3rem 0.4rem; border-top: 1px solid var(--line); transition: padding 0.2s, background 0.2s;
}
.note-row:last-child { border-bottom: 1px solid var(--line); }
.note-row:hover { padding-left: 1rem; background: linear-gradient(90deg, var(--tint-teal), transparent 60%); }
.note-date { text-align: center; font-family: var(--mono); color: var(--dim); line-height: 1.1; }
.note-date b { display: block; font-family: var(--serif); font-weight: 900; font-size: 1.9rem; color: var(--ink); }
.note-date span { font-size: 0.62rem; letter-spacing: 0.14em; }
.note-date i { display: block; font-style: normal; color: var(--faint); }
.note-title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.45; }
.note-mood { font-family: var(--sans); font-weight: 400; font-size: 0.72rem; color: var(--teal); margin-left: 0.5rem; white-space: nowrap; }
.note-ex { color: var(--dim); font-size: 0.86rem; margin-top: 0.3rem;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.note-arrow { font-family: var(--mono); color: var(--faint); transition: transform 0.2s, color 0.2s; }
.note-row:hover .note-arrow { color: var(--teal); transform: translateX(4px); }

/* ==================================================== band (about CTA) */
.band {
  position: relative; overflow: hidden; margin: clamp(3rem,6vw,5rem) calc(50% - 50vw) 0;
  padding: clamp(2.6rem, 5vw, 4.5rem) calc(50vw - 50%);
  background: var(--paper-3); border-top: 1px solid var(--line);
}
.band-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.band-title { font-family: var(--serif); font-weight: 900; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.3; margin: 1rem 0 1rem; }
.band-sub { color: var(--dim); font-size: 0.95rem; line-height: 1.8; max-width: 30em; margin-bottom: 1.6rem; }
.steps { display: flex; flex-direction: column; gap: 0.9rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem 1.2rem; transition: transform 0.2s, border-color 0.2s; }
.step:hover { transform: translateX(5px); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.step-n { flex: 0 0 auto; font-family: var(--mono); font-weight: 500; font-size: 0.8rem; color: var(--lime-ink);
  background: var(--lime); width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 7px; }
.step h4 { font-family: var(--serif); font-weight: 700; font-size: 1rem; margin-bottom: 0.15rem; }
.step p { color: var(--dim); font-size: 0.84rem; line-height: 1.6; }
.aurora--band span:nth-child(1) { left: 60%; top: -30%; }
.aurora--band span:nth-child(2) { left: 74%; bottom: -40%; opacity: 0.3; }

/* ==================================================== generic page head */
.page { padding-bottom: 4rem; }
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.2rem; }
.page-head .eyebrow { margin-bottom: 1.1rem; }
.page-h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; letter-spacing: -0.005em; }
.page-lead { color: var(--dim); font-size: 1rem; line-height: 1.8; max-width: 40em; margin-top: 1rem; }

/* toolbar (articles) */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.search { display: flex; align-items: center; gap: 0.6rem; background: var(--paper-2);
  border: 1px solid var(--line-2); border-radius: 99px; padding: 0.5rem 1.1rem; color: var(--faint);
  min-width: 260px; flex: 1 1 260px; max-width: 380px; transition: border-color 0.2s, box-shadow 0.2s; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--tint-teal); color: var(--teal); }
.search input { border: none; background: none; outline: none; color: var(--ink); font-family: var(--sans); font-size: 0.9rem; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { background: var(--paper-2); border: 1px solid var(--line-2); color: var(--dim);
  font-size: 0.8rem; padding: 0.4rem 0.9rem; border-radius: 99px; letter-spacing: 0.03em; transition: all 0.18s; }
.chip i { font-style: normal; font-family: var(--mono); font-size: 0.66rem; color: var(--faint); margin-left: 0.2rem; }
.chip:hover { border-color: var(--teal); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 500; }
.chip.is-active i { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.feed-empty { color: var(--faint); text-align: center; padding: 3rem 0; }

/* notes page */
.page--notes .note-list--full .note-row:first-child { border-top: 1px solid var(--line); }
.notes-empty { text-align: center; padding: 4rem 1rem; color: var(--dim); }
.notes-empty-sub { color: var(--faint); font-size: 0.86rem; margin-top: 0.4rem; }

/* ==================================================== about page */
.about-page { position: relative; padding-bottom: 4rem; }
.aurora--about { position: absolute; top: 0; left: calc(50% - 50vw); width: 100vw; height: 420px; }
.aurora--about span:nth-child(1) { right: 2%; top: -30%; }
.aurora--about span:nth-child(2) { right: 30%; top: 10%; background: radial-gradient(circle, var(--lime), transparent 70%); }
.about-hero { position: relative; z-index: 1; display: flex; gap: 1.6rem; align-items: center; padding: clamp(2.5rem,6vw,4.5rem) 0 1.6rem; }
.brand-mark--xl { width: 4.6rem; height: 4.6rem; font-size: 2.4rem; border-radius: 14px; box-shadow: 0 6px 0 rgba(0,0,0,0.1); }
.about-hero .eyebrow { margin-bottom: 0.7rem; }
.about-h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.about-tag { color: var(--dim); font-size: 1rem; margin-top: 0.4rem; }
.about-stats { position: relative; z-index: 1; display: flex; gap: clamp(1.5rem, 5vw, 4rem); flex-wrap: wrap;
  padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.about-stats div { display: flex; flex-direction: column; }
.about-stats b { font-family: var(--serif); font-weight: 900; font-size: 2rem; color: var(--teal); line-height: 1; }
.about-stats span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--faint); margin-top: 0.4rem; }
.about-body { max-width: 44em; }
.about-process { max-width: 46em; margin: 3rem 0 2rem; }
.about-process .sect-title { margin-bottom: 1.6rem; }
.ab-steps { display: flex; flex-direction: column; gap: 1rem; }
.ab-step { display: flex; gap: 1.2rem; align-items: flex-start; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.2rem 1.4rem; transition: transform 0.2s, border-color 0.2s; }
.ab-step:hover { transform: translateX(6px); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.ab-step-n { flex: 0 0 auto; font-family: var(--mono); font-weight: 500; font-size: 0.9rem; color: var(--teal);
  border: 1px solid var(--teal); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 8px; }
.ab-step h3 { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; }
.ab-step p { color: var(--dim); font-size: 0.9rem; line-height: 1.7; }
.about-cta { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.about-disclaimer { color: var(--faint); font-size: 0.78rem; max-width: 40em; }

/* ==================================================== article & note page */
.reading-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 70;
  background: linear-gradient(90deg, var(--teal), var(--lime)); transition: width 0.1s linear; }
.article-wrap { max-width: 760px; padding-bottom: 4rem; }
.article { padding-top: clamp(2rem, 5vw, 3.5rem); }
.back { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--faint); transition: color 0.2s; }
.back:hover { color: var(--teal); }
.art-tagrow { display: flex; gap: 0.5rem; margin: 1.6rem 0 1rem; }
.art-series { display: inline-block; color: var(--teal); font: 0.7rem var(--mono); letter-spacing: 0.08em; margin-top: 1.25rem; transition: opacity 0.2s; }
.art-series:hover { opacity: 0.65; }
.art-title { font-family: var(--serif); font-weight: 900; font-size: clamp(1.7rem, 4.5vw, 2.5rem); line-height: 1.35; letter-spacing: -0.005em; margin-bottom: 1rem; }
.art-meta { display: flex; align-items: center; gap: 0.7rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--faint); padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.art-cover { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 2.2rem; box-shadow: 0 14px 34px var(--shadow-lg); }

/* prose */
.prose { font-family: var(--serif); font-weight: 500; font-size: 1.06rem; line-height: 2.0; letter-spacing: 0.01em; color: var(--ink-soft); }
.prose p { margin-bottom: 1.5em; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--teal); font-style: normal; font-weight: 600; }
.prose h2, .prose h3, .prose h4 { font-weight: 700; color: var(--ink); margin: 2.2em 0 0.85em; line-height: 1.45; font-family: var(--serif); }
.prose h2 { font-size: 1.42rem; }
.prose h3 { font-size: 1.2rem; }
.prose h3.emoji-head { padding-left: 0.85rem; border-left: 3px solid var(--teal); }
.prose ul, .prose ol { margin: 0 0 1.5em 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--teal); font-family: var(--mono); }
.prose blockquote { border-left: 3px solid var(--coral); background: var(--tint-coral); padding: 0.9em 1.2em; margin: 0 0 1.5em; border-radius: 0 10px 10px 0; color: var(--ink-soft); }
.prose hr { border: 0; border-top: 1px dashed var(--line-2); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--paper-3); border: 1px solid var(--line-2); padding: 0.1em 0.4em; border-radius: 5px; color: var(--teal-deep); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.8em; font-family: var(--sans); font-size: 0.86rem; line-height: 1.6; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 0.55em 0.8em; text-align: left; }
.prose th { background: var(--paper-3); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--teal-deep); }
.prose img { border-radius: 10px; border: 1px solid var(--line); margin: 0 auto 1.5em; }

.art-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 2.4rem; }
.art-slogan { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2.6rem; padding: 1.4rem 1.5rem;
  background: var(--tint-teal); border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent); border-radius: 12px; }
.art-slogan .brand-mark { flex: 0 0 auto; }
.art-slogan p { font-family: var(--serif); font-weight: 600; font-size: 0.94rem; line-height: 1.9; }
.art-disclaimer { color: var(--faint); font-size: 0.76rem; margin-top: 1rem; line-height: 1.7; }

.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.6rem; }
.pn { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem;
  font-family: var(--serif); font-weight: 700; font-size: 0.9rem; line-height: 1.55; transition: border-color 0.2s, transform 0.2s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn span { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 0.4rem; -webkit-line-clamp: none; }
.pn--next { text-align: right; grid-column: 2; }
.pn:hover { border-color: var(--teal); transform: translateY(-3px); }

/* note page */
.note-article .note-stamp { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--teal); margin: 1.4rem 0 0.8rem; }
.note-article .note-stamp i { font-style: normal; color: var(--faint); margin-left: 0.4rem; }
.note-article .art-title { font-size: clamp(1.5rem, 4vw, 2.1rem); }

/* ==================================================== footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 3rem clamp(1.1rem,4vw,3.2rem) 3rem; max-width: 1200px; margin-left: auto; margin-right: auto; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 2rem 4rem; justify-content: space-between; }
.foot-brand { display: flex; gap: 1rem; align-items: flex-start; max-width: 34em; }
.foot-slogan { font-family: var(--serif); font-weight: 600; font-size: 0.94rem; line-height: 1.9; color: var(--ink-soft); }
.foot-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.foot-label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; color: var(--faint); margin-bottom: 0.3rem; }
.foot-nav a { font-size: 0.88rem; color: var(--dim); transition: color 0.2s; }
.foot-nav a:hover { color: var(--teal); }
.foot-disclaimer { color: var(--faint); font-size: 0.74rem; line-height: 1.7; max-width: 52em; margin-top: 1.8rem; }
.foot-meta { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; color: var(--faint); margin-top: 1.6rem; }

/* ==================================================== responsive */
@media (max-width: 900px) {
  .feat-grid { grid-template-columns: 1fr; }
  .band-inner { grid-template-columns: 1fr; }
  .nav { display: none; }
  .about-hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  .note-row { grid-template-columns: 3.4rem 1fr; }
  .note-arrow { display: none; }
  .note-date b { font-size: 1.4rem; }
  .postnav { grid-template-columns: 1fr; }
  .pn--next { grid-column: 1; text-align: left; }
  .card--mini { flex-direction: column; }
  .card--mini .card-media { flex-basis: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .card--mini .card-media img { aspect-ratio: 16/9.5; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
}
