/* ===== PHYTOHORMONE SHARED STYLES ===== */
:root {
  --bg: #f7f3e8; --bg-alt: #efe8d5;
  --ink: #2a2418; --ink-soft: #5d4e35; --ink-muted: #8a7c5f;
  --moss: #4a5d3a; --moss-dark: #2d3e26; --sage: #8b9a72;
  --bordeaux: #6b2b2b; --amber: #a0742f; --gold: #b8924a;
  --line: #c9bd9f; --line-soft: #e3dbc5; --card: #fbf8ed;
  --shadow: 0 2px 12px rgba(90,70,30,0.08);
  --shadow-h: 0 8px 28px rgba(90,70,30,0.15);
  --serif-dis: 'Cormorant Garamond', 'Noto Serif KR', serif;
  --serif-body: 'Noto Serif KR', 'Cormorant Garamond', serif;
  --mono: 'JetBrains Mono', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--serif-body); background: var(--bg); color: var(--ink);
  line-height: 1.75; font-weight: 400; overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column;
  background-image:
    radial-gradient(ellipse at top left, rgba(184,146,74,0.06), transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(74,93,58,0.05), transparent 45%);
}

/* TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,243,232,0.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-brand {
  font-family: var(--serif-dis); font-size: 1.4rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--moss-dark); text-decoration: none;
}
.topbar-brand .dot { color: var(--bordeaux); }
.topbar-nav {
  display: flex; gap: 1.3rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.73rem;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.topbar-nav a {
  color: var(--ink-soft); text-decoration: none;
  padding: 0.3rem 0; border-bottom: 1px solid transparent;
  transition: all 0.2s;
}
.topbar-nav a:hover, .topbar-nav a.active {
  color: var(--bordeaux); border-bottom-color: var(--bordeaux);
}

/* HERO */
.hero {
  padding: 5rem 2rem 3.5rem; text-align: center;
  position: relative; border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '植'; position: absolute;
  top: 1.3rem; left: 50%; transform: translateX(-50%);
  font-family: var(--serif-dis); font-size: 2.3rem;
  color: var(--sage); opacity: 0.4;
}
.hero-kicker {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--serif-dis);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 500; line-height: 1.1;
  letter-spacing: -0.01em; margin-bottom: 0.8rem; color: var(--ink);
}
.hero-title .it { font-style: italic; color: var(--bordeaux); font-weight: 400; }
.hero-sub {
  font-size: 1.08rem; color: var(--ink-soft);
  max-width: 720px; margin: 0 auto 1.8rem;
  font-weight: 300; line-height: 1.7;
}
.hero-tags {
  display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.hero-tag {
  padding: 0.35rem 0.85rem;
  background: rgba(184,146,74,0.12);
  border: 1px solid var(--line); color: var(--amber);
}

/* MAIN */
main {
  max-width: 1280px; margin: 0 auto; padding: 3rem 2rem;
  flex: 1; width: 100%;
}
section { padding: 2rem 0; }
.section-head { margin-bottom: 2.5rem; }
.section-num {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.3em; color: var(--amber); margin-bottom: 0.4rem;
}
.section-title {
  font-family: var(--serif-dis); font-size: 2.4rem;
  font-weight: 500; line-height: 1.15;
  color: var(--moss-dark); margin-bottom: 0.5rem;
}
.section-title .accent { color: var(--bordeaux); font-style: italic; }
.section-lede {
  font-size: 1.02rem; color: var(--ink-soft);
  max-width: 800px; margin-top: 0.6rem;
}

/* PROSE */
.prose { max-width: 820px; line-height: 1.85; }
.prose p { margin-bottom: 1.1rem; font-size: 1.0rem; }
.prose p.lede {
  font-size: 1.13rem; font-style: italic; color: var(--ink-soft);
  border-left: 3px solid var(--amber); padding-left: 1.2rem; margin: 1.4rem 0;
}
.prose strong { color: var(--bordeaux); font-weight: 600; }
.prose em { color: var(--moss-dark); }
.prose h3 {
  font-family: var(--serif-dis); font-size: 1.55rem; font-weight: 600;
  color: var(--moss-dark); margin: 1.8rem 0 0.7rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.3rem;
}
.prose h4 {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--amber); margin: 1.3rem 0 0.5rem;
}
.prose ul, .prose ol { margin: 0.7rem 0 1.1rem 1.8rem; }
.prose li { margin-bottom: 0.35rem; }

.pullquote {
  border-left: 4px solid var(--bordeaux);
  padding: 1.3rem 1.6rem; margin: 1.8rem 0;
  background: linear-gradient(90deg, rgba(107,43,43,0.05), transparent 70%);
  font-family: var(--serif-dis); font-size: 1.3rem;
  font-style: italic; font-weight: 500;
  color: var(--moss-dark); line-height: 1.5;
}
.pullquote .attrib {
  display: block; margin-top: 0.7rem;
  font-family: var(--mono); font-size: 0.72rem;
  font-style: normal; letter-spacing: 0.15em;
  color: var(--amber); text-transform: uppercase;
}

/* AXIS CARD (hormones landing) */
.axis-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin: 1.8rem 0;
}
.axis-card {
  background: var(--card); border: 1px solid var(--line);
  padding: 1.4rem; position: relative; transition: all 0.25s;
  text-decoration: none; color: inherit; display: block;
}
.axis-card:hover {
  border-color: var(--bordeaux); transform: translateY(-3px);
  box-shadow: var(--shadow-h);
}
.axis-card.lee-related {
  border-left: 4px solid var(--bordeaux);
  background: linear-gradient(90deg, rgba(107,43,43,0.04), var(--card) 30%);
}
.axis-num {
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.2em; color: var(--amber); margin-bottom: 0.3rem;
}
.axis-name {
  font-family: var(--serif-dis); font-size: 1.35rem; font-weight: 600;
  color: var(--moss-dark); margin-bottom: 0.2rem;
}
.axis-name .en {
  display: block; font-size: 0.82rem; font-weight: 400;
  font-style: italic; color: var(--ink-muted);
}
.axis-desc {
  font-size: 0.88rem; color: var(--ink-soft);
  line-height: 1.55; margin: 0.7rem 0;
}
.axis-phytos {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  padding-top: 0.7rem; border-top: 1px dashed var(--line);
}
.phyto-chip {
  font-family: var(--mono); font-size: 0.68rem;
  padding: 0.13rem 0.45rem;
  background: rgba(74,93,58,0.1);
  color: var(--moss-dark); border: 1px solid var(--sage);
  border-radius: 2px;
}
.phyto-chip.star {
  background: rgba(107,43,43,0.1);
  border-color: var(--bordeaux); color: var(--bordeaux);
}
.lee-tag {
  position: absolute; top: 0.9rem; right: 0.9rem;
  font-family: var(--mono); font-size: 0.62rem;
  color: var(--bordeaux); font-weight: 600;
}

/* TABLES */
.table-wrap {
  overflow-x: auto; margin: 1.3rem 0;
  background: var(--card); border: 1px solid var(--line);
}
table.data { width: 100%; border-collapse: collapse;
  font-family: var(--serif-body); font-size: 0.91rem; }
table.data th, table.data td {
  padding: 0.65rem 0.9rem; text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
table.data thead { background: var(--bg-alt); }
table.data th {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
  border-bottom: 2px solid var(--line);
}
table.data tbody tr:hover { background: rgba(184,146,74,0.05); }
table.data .star { color: var(--bordeaux); font-weight: 600; }
table.data .numeric { text-align: right; font-family: var(--mono); font-size: 0.86rem; }
table.data .edible-no { color: var(--bordeaux); font-size: 0.83rem; }
table.data .edible-yes { color: var(--moss); font-size: 0.83rem; }
table.data .edible-caution { color: var(--amber); font-size: 0.83rem; }

sup.ref { font-family: var(--mono); font-size: 0.7rem; color: var(--amber); font-weight: 600; }
sup.ref a { color: var(--amber); text-decoration: none; padding: 0 0.1em; }
sup.ref a:hover { color: var(--bordeaux); text-decoration: underline; }

/* NR BLOCK */
.nr-block {
  background: var(--card); border: 1px solid var(--line);
  padding: 1.8rem 2rem; margin: 1.1rem 0;
}
.nr-block.orphan { border-left: 4px solid var(--bordeaux); }
.nr-block.adopted { border-left: 4px solid var(--moss); }
.nr-head {
  display: flex; align-items: baseline; gap: 0.9rem;
  flex-wrap: wrap; margin-bottom: 0.3rem;
}
.nr-num { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--amber); }
.nr-name { font-family: var(--serif-dis); font-size: 1.6rem; font-weight: 600; color: var(--moss-dark); }
.nr-alt { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-muted); }
.nr-type {
  font-family: var(--mono); font-size: 0.68rem;
  padding: 0.2rem 0.55rem; border-radius: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; display: inline-block;
}
.nr-type.orphan { background: rgba(107,43,43,0.12); color: var(--bordeaux); }
.nr-type.adopted { background: rgba(74,93,58,0.12); color: var(--moss); }
.nr-sub { font-size: 0.92rem; color: var(--ink-soft); font-style: italic; margin-bottom: 1rem; }

.ligand {
  margin-top: 1.1rem; padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
}
.ligand-head {
  display: flex; align-items: baseline; gap: 0.7rem;
  margin-bottom: 0.5rem; flex-wrap: wrap;
}
.ligand-idx {
  font-family: var(--mono); font-size: 0.77rem;
  padding: 0.13rem 0.45rem;
  background: var(--bg-alt); border: 1px solid var(--line);
  color: var(--ink-soft);
}
.ligand-name {
  font-family: var(--serif-dis); font-size: 1.2rem;
  font-weight: 600; color: var(--ink);
}
.ligand-name.lee-star::after {
  content: ' ★ Lee 2014';
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--bordeaux); font-weight: 600; letter-spacing: 0.1em;
}

/* REFERENCES */
.refs {
  background: var(--bg-alt); border: 1px solid var(--line);
  padding: 1.8rem; margin-top: 1.5rem;
  font-family: var(--serif-body); font-size: 0.86rem; line-height: 1.7;
}
.refs ol { list-style: none; counter-reset: refnum; }
.refs li {
  counter-increment: refnum; padding: 0.55rem 0 0.55rem 2.8rem;
  position: relative; border-bottom: 1px dotted var(--line);
}
.refs li:last-child { border-bottom: none; }
.refs li::before {
  content: '[' counter(refnum) ']';
  position: absolute; left: 0; top: 0.55rem;
  font-family: var(--mono); font-weight: 600;
  color: var(--amber); font-size: 0.82rem;
}
.refs li:target {
  background: rgba(184,146,74,0.15);
  animation: flash 1.5s;
}
@keyframes flash {
  0% { background: rgba(184,146,74,0.4); }
  100% { background: rgba(184,146,74,0.15); }
}
.refs em { font-style: italic; color: var(--moss-dark); }
.refs .ligand-link {
  display: inline-block;
  font-family: var(--mono); font-size: 0.7rem;
  margin-left: 0.5rem; padding: 0.1rem 0.45rem;
  background: rgba(107,43,43,0.08); color: var(--bordeaux);
  border: 1px solid var(--line); border-radius: 2px;
  letter-spacing: 0.05em;
}

/* LEE BOX */
.lee-box {
  background: linear-gradient(135deg, rgba(107,43,43,0.06), rgba(184,146,74,0.04));
  border: 1px solid var(--line); border-left: 4px solid var(--bordeaux);
  padding: 2.2rem 2.5rem; margin: 2.5rem 0; position: relative;
}
.lee-box::before {
  content: '★'; position: absolute; top: 1.3rem; right: 1.8rem;
  font-size: 1.8rem; color: var(--bordeaux); opacity: 0.3;
}
.lee-box h3 {
  font-family: var(--serif-dis); font-size: 1.7rem;
  color: var(--bordeaux); margin-bottom: 0.5rem;
}
.lee-box .citation {
  font-family: var(--mono); font-size: 0.77rem;
  color: var(--ink-soft); margin-bottom: 1.3rem; font-style: italic;
}
.lee-box .findings {
  display: grid; gap: 0.9rem; margin-top: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.lee-box .finding {
  background: var(--card); padding: 0.9rem 1.1rem; border: 1px solid var(--line);
}
.lee-box .finding-path {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  color: var(--moss-dark); margin-bottom: 0.35rem;
}
.lee-box .finding-stat {
  font-family: var(--mono); font-size: 0.76rem;
  color: var(--ink-soft); line-height: 1.55;
}
.lee-box .finding-stat .frg { color: var(--bordeaux); font-weight: 600; }
.lee-box .finding-stat .pbo { color: var(--amber); font-weight: 600; }

/* TOP10 */
.top10 {
  display: grid; gap: 0.9rem; margin: 1.8rem 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.top10-card {
  background: var(--card); border: 1px solid var(--line);
  padding: 1.1rem; position: relative; transition: all 0.22s;
}
.top10-card:hover {
  border-color: var(--moss); transform: translateY(-2px); box-shadow: var(--shadow);
}
.top10-rank {
  position: absolute; top: -0.4rem; right: 0.7rem;
  font-family: var(--serif-dis); font-size: 2.2rem;
  font-weight: 500; color: var(--sage); opacity: 0.5; line-height: 1;
}
.top10-name {
  font-family: var(--serif-dis); font-size: 1.15rem;
  font-weight: 600; color: var(--moss-dark);
  margin-bottom: 0.25rem; padding-right: 1.8rem;
}
.top10-compound {
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--amber); letter-spacing: 0.05em; margin-bottom: 0.35rem;
}
.top10-targets {
  font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5;
}

/* CUISINE GRID (40 dishes) */
.cuisine-section { margin: 2.5rem 0; }
.cuisine-section h2 {
  font-family: var(--serif-dis); font-size: 2rem; font-weight: 500;
  color: var(--moss-dark); margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--bordeaux); padding-bottom: 0.4rem;
}
.cuisine-section .sub {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.2em; color: var(--amber);
  text-transform: uppercase; margin-bottom: 1.5rem;
}
.cuisine-grid {
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.cuisine-card {
  background: var(--card); border: 1px solid var(--line);
  padding: 1rem 1.1rem; text-decoration: none;
  color: inherit; transition: all 0.22s; position: relative;
  display: block;
}
.cuisine-card:hover {
  border-color: var(--bordeaux); transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cuisine-card.keto { border-left: 3px solid var(--amber); }
.cuisine-card.regular { border-left: 3px solid var(--moss); }
.cuisine-num {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.15em; color: var(--amber); margin-bottom: 0.2rem;
}
.cuisine-name {
  font-family: var(--serif-dis); font-size: 1.2rem; font-weight: 600;
  color: var(--moss-dark); margin-bottom: 0.35rem;
}
.cuisine-tags {
  display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.4rem;
}
.cuisine-tag {
  font-family: var(--mono); font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
  color: var(--ink-muted); border: 1px solid var(--line);
}

/* CUISINE DETAIL (cascade) */
.cuisine-hero {
  background: linear-gradient(135deg, rgba(74,93,58,0.07), rgba(184,146,74,0.04));
  border: 1px solid var(--line); border-radius: 3px;
  padding: 2rem 2.3rem; margin-bottom: 2rem;
}
.cuisine-hero .kind {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 0.4rem;
}
.cuisine-hero h1 {
  font-family: var(--serif-dis); font-size: 2.5rem;
  font-weight: 600; color: var(--moss-dark); margin-bottom: 0.5rem;
}
.cuisine-hero .en {
  font-family: var(--mono); font-size: 0.8rem;
  color: var(--ink-muted); font-style: italic;
}
.cuisine-hero p { margin-top: 0.8rem; color: var(--ink-soft); }

/* CASCADE GRAPH (SVG) */
.cascade-wrap {
  background: var(--card); border: 1px solid var(--line);
  padding: 1.5rem; margin: 1.5rem 0;
  overflow-x: auto;
}
.cascade-wrap svg {
  display: block; margin: 0 auto;
  max-width: 100%; height: auto;
}
.cascade-legend {
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--ink-soft); margin-top: 0.8rem;
  padding-top: 0.8rem; border-top: 1px dashed var(--line);
}
.cascade-legend .item { display: flex; align-items: center; gap: 0.4rem; }
.cascade-legend .swatch {
  width: 14px; height: 14px; border-radius: 3px;
}

/* NODE STYLES IN SVG */
.node-label {
  font-family: var(--serif-dis); font-size: 14px; font-weight: 600;
  fill: var(--moss-dark);
}
.node-label.tier3 { fill: var(--bordeaux); }
.node-label.small {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  fill: var(--ink-soft);
}
.node-rect { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.node-rect.tier0 { fill: rgba(107,43,43,0.12); stroke: var(--bordeaux); stroke-width: 2; }
.node-rect.tier1 { fill: rgba(74,93,58,0.1); stroke: var(--moss); }
.node-rect.tier2 { fill: rgba(184,146,74,0.1); stroke: var(--amber); }
.node-rect.tier3 { fill: rgba(107,43,43,0.06); stroke: var(--bordeaux); }
.edge-line {
  stroke: var(--sage); stroke-width: 1.2;
  fill: none; opacity: 0.6;
}

/* FOOTER */
footer {
  background: var(--moss-dark); color: var(--bg);
  padding: 2.5rem 2rem 1.8rem; margin-top: 3rem;
}
footer .inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 1.8rem;
  grid-template-columns: 2fr 1fr 1fr;
}
footer h4 {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.7rem;
}
footer p { font-size: 0.87rem; line-height: 1.65; color: rgba(247,243,232,0.8); }
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .brand {
  font-family: var(--serif-dis); font-size: 1.5rem;
  font-weight: 500; letter-spacing: 0.08em;
  color: var(--bg); margin-bottom: 0.4rem;
}
footer .bottom {
  max-width: 1280px; margin: 1.8rem auto 0;
  padding-top: 1.3rem; border-top: 1px solid rgba(247,243,232,0.2);
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(247,243,232,0.5);
  display: flex; justify-content: space-between; flex-wrap: wrap;
}

/* RESPONSIVE */
@media (max-width: 820px) {
  .topbar { padding: 0.6rem 1rem; flex-wrap: wrap; gap: 0.6rem; }
  .topbar-nav { gap: 0.7rem; }
  .topbar-nav a { font-size: 0.65rem; }
  .hero { padding: 3.5rem 1.2rem 2.5rem; }
  main { padding: 2rem 1.2rem; }
  .section-title { font-size: 1.8rem; }
  .lee-box { padding: 1.5rem 1.3rem; }
  .cuisine-hero { padding: 1.3rem 1.3rem; }
  .cuisine-hero h1 { font-size: 1.8rem; }
  footer .inner { grid-template-columns: 1fr; }
  footer .bottom { flex-direction: column; gap: 0.3rem; }
  table.data { font-size: 0.78rem; }
  table.data th, table.data td { padding: 0.4rem 0.55rem; }
}

.fade-in {
  opacity: 0; transform: translateY(15px);
  transition: all 0.6s cubic-bezier(0.16,1,0.3,1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
