:root {
  --bg: #f6f4ef;
  --surface: #fffdf9;
  --ink: #1e2523;
  --ink-2: #3c4542;
  --muted: #6b726f;
  --line: #e4dfd5;
  --accent: #2d5a51;
  --accent-ink: #21453e;
  --accent-soft: #e3ebe7;
  --warm: #b4734a;
  --radius: 14px;
  --max: 1120px;
  --read: 680px;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: "Noto Serif TC", "Songti TC", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  line-break: strict;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p, li { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.45; letter-spacing: 0.03em; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; color: var(--accent); font-weight: 500; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.08em; }
.brand-sub { font-size: 13px; color: var(--muted); letter-spacing: 0.12em; }

.menu { position: relative; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: 14px; letter-spacing: 0.12em; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px 7px 18px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.menu-btn:hover { border-color: #cfc8ba; }
.menu-icon { position: relative; width: 16px; height: 10px; }
.menu-icon::before, .menu-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform .25s, top .25s;
}
.menu-icon::before { top: 1px; }
.menu-icon::after { top: 7px; }
.menu.open .menu-icon::before { top: 4px; transform: rotate(45deg); }
.menu.open .menu-icon::after { top: 4px; transform: rotate(-45deg); }

.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 300px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(30, 37, 35, 0.25);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.menu.open .menu-panel { opacity: 1; transform: none; pointer-events: auto; }
.menu-panel a.main {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-radius: 10px; font-size: 16px;
}
.menu-panel a.main:hover, .menu-panel a.main[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.menu-panel a.main small { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }
.menu-group { border-top: 1px solid var(--line); margin-top: 8px; padding: 12px 14px 4px; }
.menu-group-title { font-size: 12px; color: var(--muted); letter-spacing: 0.16em; margin-bottom: 6px; }
.menu-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-tags a { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.menu-tags a:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: end; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 16px 0 22px; }
.hero h1 .accent { display: block; color: var(--accent); }
.hero-lead { font-size: 18px; color: var(--ink-2); max-width: 30em; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-size: 15px; letter-spacing: 0.08em;
  border: 1px solid var(--accent); transition: background .2s, color .2s;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-ink); }
.btn-line { color: var(--accent); }
.btn-line:hover { background: var(--accent-soft); }

.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
}
.hero-card dl { margin: 0; display: grid; gap: 16px; }
.hero-card dt { font-size: 12px; color: var(--muted); letter-spacing: 0.16em; }
.hero-card dd { margin: 2px 0 0; font-size: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 8px; }
.sec-head a { font-size: 14px; color: var(--accent); white-space: nowrap; letter-spacing: 0.06em; }
.sec-head a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* symptom finder */
.finder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.finder a {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 156px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: border-color .2s, transform .2s;
}
.finder a:hover { border-color: var(--accent); transform: translateY(-2px); }
.finder .q { font-size: 16px; line-height: 1.7; color: var(--ink); }
.finder .cat { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--accent); margin-top: 16px; letter-spacing: 0.06em; }
.finder .cat em { font-style: normal; color: var(--muted); }

/* featured */
.feature-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.feature-list { display: grid; gap: 18px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s;
}
.card:hover { border-color: #c9c1b2; }
.card:hover h3 { color: var(--accent-ink); }
.card .meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.chip { display: inline-block; font-size: 12px; letter-spacing: 0.06em; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.card h3 { font-size: 19px; transition: color .2s; }
.card p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.card.big { padding: 34px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.card.big h3 { font-size: 26px; }
.card.big p { font-size: 16px; margin-top: 14px; }
.card.big .points { margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 8px; }
.card.big .points li { font-size: 15px; color: var(--ink-2); padding-left: 18px; position: relative; }
.card.big .points li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 7px; height: 7px; border-radius: 50%; background: var(--warm); }

/* doctor strip */
.doctor-strip { background: var(--accent); color: #f1f5f3; border-radius: 26px; padding: 48px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.doctor-strip .eyebrow { color: #b9d2ca; }
.doctor-strip h2 { font-size: 30px; margin: 10px 0 16px; color: #fff; }
.doctor-strip p { margin: 0 0 24px; color: #d9e5e1; }
.doctor-strip .btn { border-color: #f1f5f3; color: #fff; }
.doctor-strip .btn:hover { background: rgba(255,255,255,.1); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.pill-list span { font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); }

/* visit tips */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: tip; }
.tip { border-top: 1px solid var(--ink); padding-top: 18px; }
.tip::before { counter-increment: tip; content: "0" counter(tip); font-family: var(--serif); color: var(--warm); font-size: 15px; }
.tip h3 { font-size: 19px; margin: 6px 0 8px; }
.tip p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- Articles page ---------- */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); margin: 10px 0 12px; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 36em; }

.filters { position: sticky; top: 68px; z-index: 10; background: var(--bg); padding: 14px 0; border-bottom: 1px solid var(--line); }
.filters .wrap { display: flex; gap: 16px; align-items: center; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 2px 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; font: inherit; font-size: 14px; letter-spacing: 0.04em; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.tabs button:hover { border-color: #c9c1b2; }
.tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs button span { margin-left: 4px; font-size: 12px; opacity: .6; }
.search { flex: none; width: 220px; position: relative; }
.search input {
  width: 100%; font: inherit; font-size: 14px; padding: 7px 14px 7px 36px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.cat-intro { padding: 36px 0 8px; }
.cat-intro h2 { font-size: 24px; }
.cat-intro p { margin: 6px 0 0; color: var(--muted); }

.year-block { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.year-block:last-child { border-bottom: 0; }
.year-label { font-family: var(--serif); font-size: 22px; color: var(--muted); position: sticky; top: 140px; align-self: start; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li + li { border-top: 1px dashed var(--line); }
.post-list a { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 16px 0; }
.post-list a:hover .pt { color: var(--accent-ink); }
.pt { font-size: 17px; font-weight: 500; transition: color .2s; }
.ps { grid-column: 1; font-size: 14px; color: var(--muted); line-height: 1.75; }
.pm { grid-column: 2; grid-row: 1; font-size: 13px; color: var(--muted); white-space: nowrap; text-align: right; padding-top: 3px; }
.pm .chip { margin-right: 10px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- Single article ---------- */
.article { max-width: var(--read); margin: 0 auto; padding: 48px 24px 24px; }
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.article h1 { font-size: clamp(26px, 3.6vw, 34px); margin: 18px 0 16px; }
.article .meta { display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--muted); padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.keypoints { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 32px 0 8px; }
.keypoints h2 { font-family: var(--sans); font-size: 14px; letter-spacing: 0.16em; color: var(--accent); font-weight: 500; margin-bottom: 10px; }
.keypoints ul { margin: 0; padding-left: 1.2em; }
.keypoints li { margin: 4px 0; }
.prose p { font-size: 18px; line-height: 2; margin: 1.4em 0; color: var(--ink); }
.source-box { margin: 40px 0; padding: 22px 26px; border-radius: var(--radius); background: var(--accent-soft); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.source-box p { margin: 0; font-size: 15px; color: var(--accent-ink); }
.notice { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 40px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 22px; background: #e9e4da; border: 1px dashed #cfc6b6;
  display: grid; place-items: center; color: var(--muted); font-size: 14px; letter-spacing: 0.1em; position: sticky; top: 100px;
}
.about-body h2 { font-size: 22px; margin: 44px 0 14px; }
.about-body h2:first-child { margin-top: 0; }
.about-body p { margin: 0 0 1em; color: var(--ink-2); }
.def-list { list-style: none; margin: 0; padding: 0; }
.def-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr; gap: 16px; }
.def-list li b { font-weight: 500; color: var(--muted); font-size: 14px; padding-top: 2px; }
.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.focus-grid a { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.focus-grid a:hover { border-color: var(--accent); }
.focus-grid b { display: block; font-weight: 500; }
.focus-grid .n { display: block; font-style: normal; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- Visit ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--serif); font-size: 19px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .ans { padding: 0 0 22px; color: var(--ink-2); }
.faq .ans p { margin: 0 0 10px; }
.faq .ans a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.info-card h3 { font-size: 20px; margin-bottom: 14px; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px dashed var(--line); }
.check li:last-child { border-bottom: 0; }
.check li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.placeholder { background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(180,115,74,.06) 8px 16px); border: 1px dashed #d8c3b2; border-radius: 12px; padding: 14px 16px; font-size: 14px; color: #8a5a3b; margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 8px; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; line-height: 2.1; }
.footer-note { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .feature-grid, .doctor-strip, .about-grid, .two-col { grid-template-columns: 1fr; }
  .finder { grid-template-columns: repeat(2, 1fr); }
  .tips { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 280px; }
  .doctor-strip { padding: 36px 28px; gap: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand-sub { display: none; }
  .hero { padding: 44px 0 32px; }
  .hero-lead { font-size: 16px; }
  section { padding: 40px 0; }
  .finder a { min-height: 132px; padding: 16px; }
  .finder .q { font-size: 15px; }
  .card, .card.big { padding: 22px; }
  .card.big h3 { font-size: 22px; }
  .filters .wrap { flex-direction: column; align-items: stretch; gap: 10px; }
  .search { width: 100%; }
  .year-block { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
  .year-label { position: static; font-size: 18px; }
  .post-list a { grid-template-columns: 1fr; }
  .pm { grid-column: 1; grid-row: auto; text-align: left; padding: 0; }
  .article { padding: 32px 16px 16px; }
  .prose p { font-size: 17px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .menu-panel { width: min(300px, calc(100vw - 32px)); }
  .stat b { font-size: 24px; }
  .sec-head { flex-direction: column; align-items: start; gap: 8px; }
}

.subt { display: block; font-size: 0.62em; font-weight: 500; color: var(--muted); margin-top: 8px; letter-spacing: 0.04em; }

.ph { display: inline-block; }
.line { display: block; }
.site-footer .line a { color: var(--accent); }

.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink); background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(30, 37, 35, 0.12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px -8px rgba(30, 37, 35, 0.25);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: rgba(255, 253, 249, 0.95); }

/* hero photo */
.hero-photo { margin: 0; position: relative; border-radius: 26px; overflow: hidden; background: #ecebe6; aspect-ratio: 4 / 5; max-height: 560px; justify-self: end; width: 100%; max-width: 440px; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.hero-photo figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(255, 253, 249, 0.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 14px; padding: 14px 18px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.hero-photo figcaption b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); }
.cred { padding: 8px 0 24px; }
.cred .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cred-item { padding: 22px 24px 22px 0; }
.cred-item + .cred-item { padding-left: 24px; border-left: 1px solid var(--line); }
.cred-item dt { font-size: 12px; color: var(--muted); letter-spacing: 0.16em; margin-bottom: 4px; }
.cred-item dd { margin: 0; font-size: 15px; line-height: 1.75; }
.cred-item b { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--accent); line-height: 1.3; }
.portrait-img { border-radius: 22px; overflow: hidden; background: #ecebe6; position: sticky; top: 100px; }
.portrait-img img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.interest { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.interest li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--ink-2); }
.quote { font-family: var(--serif); font-size: 20px; line-height: 1.8; color: #fff; margin: 0 0 24px; }
.mail { color: var(--accent); white-space: nowrap; word-break: keep-all; }
.mail:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 960px) {
  .hero-photo { justify-self: start; max-width: 380px; }
  .cred .wrap { grid-template-columns: repeat(2, 1fr); }
  .cred-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .cred-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .portrait-img { position: static; max-width: 320px; }
}
@media (max-width: 640px) {
  .cred .wrap { grid-template-columns: 1fr; padding: 0; margin: 0 16px; }
  .cred-item, .cred-item + .cred-item { padding: 16px 0; border-left: 0; }
  .cred-item + .cred-item { border-top: 1px solid var(--line); }
  .to-top { right: 16px; bottom: 18px; }
  .quote { font-size: 18px; }
}
a.tip { display: block; }
a.tip h3 { transition: color .2s; }
a.tip:hover h3 { color: var(--accent); }
.hero-grid { align-items: center; }
x-w, x-k { white-space: nowrap; }
x-p { display: inline-block; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .focus-grid { grid-template-columns: 1fr; }
}

/* ===== magazine layout ===== */
.hero h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: 0.04em; margin: 14px 0 20px; }
.hero-lead { line-height: 1.9; }
.cred-item dd .line { display: block; }
.mag-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 20px; }
.mag-title { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 7vw, 84px); line-height: 1.1; letter-spacing: 0.06em; margin: 0; }
.mag-head .more { font-size: 14px; color: var(--accent); letter-spacing: 0.06em; padding-bottom: 10px; }
.mag-head .more:hover { text-decoration: underline; text-underline-offset: 4px; }
.pills, .tabs { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.pills { margin-bottom: 24px; }
.pills button, .tabs button { font: inherit; font-size: 14px; letter-spacing: 0.04em; padding: 6px 15px; border-radius: 999px; border: 1px solid #cfc8bb; background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.pills button:hover, .tabs button:hover { border-color: var(--ink); color: var(--ink); }
.pills button[aria-pressed="true"], .tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mag-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #cfc8bb; border-left: 1px solid #cfc8bb; }
.mcard { display: flex; flex-direction: column; padding: 26px 26px 24px; border-right: 1px solid #cfc8bb; border-bottom: 1px solid #cfc8bb; background: var(--surface); min-height: 280px; transition: background .2s; }
.mcard:hover { background: #fff; }
.mcard:hover h3 { color: var(--accent-ink); }
.mmeta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.mmeta .tag { font-size: 12px; letter-spacing: 0.04em; padding: 2px 10px; border: 1px solid #cfc8bb; border-radius: 999px; color: var(--ink-2); white-space: nowrap; }
.mcard h3 { font-size: 19px; line-height: 1.55; transition: color .2s; }
.mcard h3 .subt { font-size: 0.78em; }
.mcard p { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mcard .read { margin-top: auto; padding-top: 22px; font-size: 13px; letter-spacing: 0.1em; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #cfc8bb; }
.mcard:hover .read { text-decoration-color: var(--accent); color: var(--accent); }
.mag-foot { display: flex; justify-content: center; padding-top: 32px; }
.filters { position: static; border-bottom: 0; padding: 0 0 8px; }
.filters .wrap { align-items: start; }
.cat-intro { display: flex; align-items: baseline; gap: 14px; padding: 28px 0 18px; }
.cat-intro .count { font-size: 14px; color: var(--muted); }
.page-head { padding-bottom: 28px; }
@media (max-width: 960px) {
  .mag-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .mag-grid { grid-template-columns: 1fr; }
  .mcard { min-height: 0; padding: 22px 20px; }
  .mcard h3 { font-size: 18px; }
  .mag-head .more { display: none; }
  .pills button, .tabs button { font-size: 13px; padding: 5px 12px; }
}

/* ===== round 4: category grid, credentials ===== */
.filters .wrap { display: block; }
.filters .search { width: 100%; max-width: 360px; margin-bottom: 18px; }
.pills, .tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 0 1px 1px 0; }
#home-pills { grid-template-columns: repeat(5, 1fr); }
.pills button, .tabs button { border: 1px solid #cfc8bb; margin: 0 -1px -1px 0; border-radius: 0; padding: 12px 8px; font-size: 14px; text-align: center; background: var(--surface); color: var(--ink-2); }
.pills button:hover, .tabs button:hover { background: #fff; color: var(--ink); border-color: #cfc8bb; }
.pills button[aria-pressed="true"], .tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); position: relative; z-index: 1; }
.cred-item dd { font-size: 15px; }
.cred-item dd span#stat-count { font: inherit; color: inherit; }
@media (max-width: 960px) {
  .cred .wrap { grid-template-columns: 1fr; }
  .cred-item, .cred-item + .cred-item, .cred-item:nth-child(3) { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 14px 0; border-left: 0; }
  .cred-item + .cred-item { border-top: 1px solid var(--line); }
  .cred-item dt { margin: 0; padding-top: 3px; }
}
@media (max-width: 640px) {
  .pills, .tabs, #home-pills { grid-template-columns: repeat(3, 1fr); }
  .pills button, .tabs button { padding: 10px 4px; font-size: 13px; }
  .filters .search { max-width: none; }
  .cred .wrap { margin: 0 16px; }
  .cred-item, .cred-item + .cred-item, .cred-item:nth-child(3) { grid-template-columns: 72px 1fr; }
  .cred-item dd { font-size: 14px; }
}
.article .mag-grid { grid-template-columns: 1fr; }
.article .mcard { min-height: 0; }
.filters .wrap > .search { display: block; margin: 0 0 16px; }

/* ===== round 5: browse modes, tags, contact ===== */
.seg { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: #ebe7df; }
.seg button { font: inherit; font-size: 14px; letter-spacing: 0.04em; border: 0; background: transparent; color: var(--ink-2); padding: 7px 18px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(30, 37, 35, .12); }
.tabs button em, .pills button em { font-style: normal; margin-left: 8px; color: var(--muted); }
.tabs button[aria-pressed="true"] em { color: rgba(255, 255, 255, .7); }
.tabs.mode-t { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.tabs.mode-t button { margin: 0; border-radius: 999px; padding: 6px 14px; }
.tabs.mode-t button::before { content: "#"; margin-right: 2px; color: var(--muted); }
.tabs.mode-t button[aria-pressed="true"]::before { color: rgba(255, 255, 255, .7); }
.tabs.mode-t .more-tags { border-style: dashed; background: transparent; color: var(--accent); }
.tabs.mode-t .more-tags::before { content: none; }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.art-tags a { font-size: 13px; color: var(--ink-2); padding: 3px 12px; border: 1px solid #cfc8bb; border-radius: 999px; }
.art-tags a::before { content: "#"; color: var(--muted); margin-right: 2px; }
.art-tags a:hover { border-color: var(--accent); color: var(--accent); }

.contact { padding-top: 24px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.contact-side h2 { font-size: clamp(26px, 3vw, 34px); }
.contact-side > p { color: var(--ink-2); margin: 12px 0 28px; }
.contact-info { margin: 0; display: grid; gap: 16px; }
.contact-info dt { font-size: 13px; color: var(--muted); letter-spacing: 0.1em; }
.contact-info dd { margin: 2px 0 0; font-size: 16px; }
.contact-note { margin-top: 28px; font-size: 14px; color: var(--muted); }
.cform { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; display: grid; gap: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; color: var(--ink-2); padding: 0; }
.field i { font-style: normal; font-size: 12px; color: var(--warm); margin-left: 8px; }
.field input, .field textarea { font: inherit; font-size: 16px; color: var(--ink); width: 100%; padding: 12px 14px; border: 1px solid #d9d3c8; border-radius: 12px; background: var(--bg); transition: border-color .2s, background .2s, box-shadow .2s; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a7a399; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(45, 90, 81, .12); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; font-size: 14px; padding: 8px 16px; border: 1px solid #d9d3c8; border-radius: 999px; color: var(--ink-2); transition: all .2s; }
.choices input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.choices input:focus-visible + span { box-shadow: 0 0 0 3px rgba(45, 90, 81, .2); }
.cform-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cform-foot .btn { border: 0; cursor: pointer; font: inherit; }
.cform-status { margin: 0; font-size: 14px; }
.cform-status.ok { color: var(--accent); }
.cform-status.warn { color: var(--warm); }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr; }
  .cform { padding: 22px 18px; border-radius: 18px; }
  .seg { display: flex; }
  .seg button { flex: 1; padding: 7px 8px; }
}
.choices label { position: relative; }
.field .choices input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; }
