﻿/*
Theme Name: 도연랩 (Doyeon Lab)
Theme URI: https://doyeonlab.com
Author: Doyeon Lab
Description: 근거 기반 건강·의학 정보 저널 "도연랩"을 위한 워드프레스 테마. Nutrition Science / Smart Eating / Wellness Guide 3개 카테고리와 하위 6개 서브 카테고리를 지원합니다.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: doyeonlab
*/

/* ===========================================================
   DOYEON LAB — Design tokens
=========================================================== */
:root{
  --paper: #F5F7F6;
  --surface: #FFFFFF;
  --surface-2: #EEF2F0;
  --ink: #15242A;
  --ink-soft: #46595D;
  --muted: #6C8188;
  --line: #DEE6E2;
  --line-strong: #C4D0CB;

  --teal: #1F5D4E;
  --teal-deep: #123A32;
  --teal-soft: #E3EEEA;
  --amber: #C1622D;
  --amber-soft: #F5E3D6;
  --blue-data: #5C7A8A;

  --font-display: "Noto Serif KR", "Songmyung", serif;
  --font-body: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 32px);
  --radius: 2px;
  --radius-lg: 4px;

  --shadow-card: 0 1px 2px rgba(21,36,42,.04), 0 8px 24px -12px rgba(21,36,42,.16);
  --shadow-card-hover: 0 4px 10px rgba(21,36,42,.06), 0 20px 40px -16px rgba(21,36,42,.22);

  --ease: cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; cursor:pointer; }
input{ font-family: inherit; }

/* WordPress core accessibility / alignment classes */
.screen-reader-text{ position:absolute !important; left:-9999px; top:-9999px; width:1px; height:1px; overflow:hidden; }
.alignleft{ float:left; margin:6px 24px 16px 0; }
.alignright{ float:right; margin:6px 0 16px 24px; }
.aligncenter{ display:block; margin-left:auto; margin-right:auto; }
.wp-caption{ max-width:100%; }
.wp-caption-text{ font-size:12.5px; color: var(--muted); padding-top:8px; }
.wp-block-image img, .wp-block-embed{ border-radius: var(--radius); }

.wrap{
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.24;
  margin: 0;
  letter-spacing: -0.01em;
}

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

/* ---------- eyebrow / specimen-label system (signature) ---------- */
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--teal);
}
.eyebrow::before{
  content:"";
  width:14px; height:1px;
  background: var(--teal);
}

.tag-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 5px 9px 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--teal-deep);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--teal);
  border-radius: 1px;
  position: relative;
}
.tag-label::before{
  content:"";
  position:absolute; left:-1px; top:-1px;
  width:6px; height:6px;
  border-left:1px solid var(--teal);
  border-top:1px solid var(--teal);
  background: var(--paper);
}
.tag-label .dot{
  width:5px; height:5px; border-radius:50%;
  background: var(--amber);
  flex:none;
}
.tag-label time{ color: var(--muted); font-weight:500; }

.card-tag-overlay{
  position:absolute;
  left:14px; bottom:14px;
  z-index:2;
}

.ruler{
  display:flex; flex-direction:column; justify-content:space-between;
  width:16px;
  padding-block: 6px;
}
.ruler span{
  display:block; height:1px; background: var(--line-strong);
  position:relative;
}
.ruler span::after{
  content:"";
  position:absolute; left:0; top:0; height:1px; width:7px;
  background: var(--teal);
}
.ruler span:nth-child(4n+1)::after{ width:16px; background: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding: 13px 24px;
  font-size: 14.5px; font-weight:700;
  border-radius: 999px;
  border:1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  white-space:nowrap;
}
.btn-primary{ background: var(--teal); color:#fff; }
.btn-primary:hover{ background: var(--teal-deep); transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(18,58,50,.45); }
.btn-outline{ background:transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover{ border-color: var(--teal); color: var(--teal); }
.btn-amber{ background: var(--amber); color:#fff; }
.btn-amber:hover{ background:#a34f22; transform: translateY(-1px); }
.btn-sm{ padding:9px 16px; font-size:13px; }

/* ===========================================================
   Header
=========================================================== */
.site-header{
  position: sticky; top:0; z-index: 50;
  background: rgba(245,247,246,.86);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.header-bar{
  display:flex; align-items:center; justify-content:space-between;
  height:76px;
  gap: 24px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family: var(--font-display);
  font-weight:700; font-size: 21px; letter-spacing: -0.01em;
  color: var(--ink);
  flex:none;
}
.brand .mark{
  width:11px; height:11px; border-radius: 50% 50% 50% 0;
  background: var(--teal);
  transform: rotate(45deg);
  flex:none;
}
.brand small{
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight:500;
  color: var(--muted);
  letter-spacing: .12em;
  display:block; margin-top:1px;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }

.main-nav{ display:flex; align-items:center; gap:30px; }
.main-nav ul{ display:flex; align-items:center; gap:30px; }
.main-nav a{
  font-size: 14.5px; font-weight:600; color: var(--ink-soft);
  position:relative; padding-block:6px;
}
.main-nav a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:2px;
  background: var(--teal);
  transition: right .22s var(--ease);
}
.main-nav a:hover{ color: var(--ink); }
.main-nav a:hover::after, .main-nav .current-cat-parent > a::after, .main-nav .current_page_item > a::after{ right:0; }
.main-nav .current-cat-parent > a, .main-nav .current_page_item > a{ color: var(--teal); }

/* dropdown groups (Nutrition Science / Smart Eating / Wellness Guide) */
.main-nav > ul > li{ position:relative; }
.main-nav li.menu-item-has-children > a::after{ content:"▾"; display:inline-block; margin-left:5px; font-size:10px; position:static; background:none; }
.main-nav .sub-menu{
  position:absolute; top:100%; left:50%; transform:translateX(-50%) translateY(4px);
  min-width:190px; margin-top:8px;
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  padding:8px; display:flex; flex-direction:column; gap:2px;
  opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
  z-index:60;
}
.main-nav li.menu-item-has-children:hover > .sub-menu,
.main-nav li.menu-item-has-children:focus-within > .sub-menu{
  opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-50%) translateY(0);
}
.main-nav .sub-menu a{ padding:9px 12px; border-radius: var(--radius); font-size:13.5px; white-space:nowrap; }
.main-nav .sub-menu a::after{ display:none; }
.main-nav .sub-menu a:hover{ background: var(--surface-2); }

@media (max-width: 900px){
  .main-nav li.menu-item-has-children > a::after{ float:right; }
  .main-nav .sub-menu{
    position:static; transform:none; opacity:1; visibility:visible; pointer-events:auto;
    box-shadow:none; border:none; border-radius:0; background:transparent;
    margin: 0 0 8px 14px; padding:0; display:flex;
  }
  .main-nav .sub-menu a{ border-bottom:none; padding:10px 4px; font-size:14.5px; color: var(--ink-soft); }
}

.header-actions{ display:flex; align-items:center; gap:10px; flex:none; }
.icon-btn{
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; color: var(--ink-soft);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.icon-btn:hover{ background: var(--surface-2); color: var(--ink); }
.search-box{ display:none; padding-bottom:14px; }
.search-box.open{ display:block; }

.nav-toggle{ display:none; }

@media (max-width: 900px){
  .main-nav{
    position: fixed; inset: 76px 0 0 0;
    background: var(--paper);
    padding: 28px var(--gutter);
    transform: translateY(-8px);
    opacity:0;
    pointer-events:none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    overflow-y:auto;
  }
  .main-nav ul{ flex-direction:column; align-items:flex-start; gap:4px; width:100%; }
  .main-nav.open{ opacity:1; transform:none; pointer-events:auto; }
  .main-nav a{ width:100%; padding: 14px 4px; border-bottom:1px solid var(--line); font-size:16.5px; display:block; }
  .nav-toggle{
    display:inline-flex; align-items:center; justify-content:center;
    width:40px; height:40px; flex:none; color: var(--ink);
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
    content:""; display:block; width:20px; height:2px; background: currentColor; position:relative; transition: transform .2s var(--ease), opacity .2s var(--ease);
  }
  .nav-toggle span::before{ position:absolute; top:-6px; }
  .nav-toggle span::after{ position:absolute; top:6px; }
  .nav-toggle.open span{ background: transparent; }
  .nav-toggle.open span::before{ transform: translateY(6px) rotate(45deg); }
  .nav-toggle.open span::after{ transform: translateY(-6px) rotate(-45deg); }
  .btn-primary.header-cta{ display:none; }
}

/* ===========================================================
   Hero
=========================================================== */
.hero{
  padding-block: clamp(40px, 7vw, 88px) clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items:center;
}
.hero-copy h1{
  font-size: clamp(34px, 4.6vw, 58px);
  line-height:1.14;
  margin-block: 18px 20px;
}
.hero-copy h1 em{
  font-style: normal;
  color: var(--teal);
  box-shadow: inset 0 -0.32em 0 var(--teal-soft);
}
.hero-dek{
  font-size: 17px; color: var(--ink-soft); max-width: 46ch;
  margin-bottom: 28px;
}
.hero-meta{
  display:flex; align-items:center; gap:16px;
  font-size: 13.5px; color: var(--muted);
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.hero-meta .byline{ display:flex; align-items:center; gap:8px; color: var(--ink-soft); font-weight:600; }
.avatar{
  width:26px; height:26px; border-radius:50%;
  background: var(--teal-soft);
  display:inline-flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; font-size:11px; color: var(--teal-deep);
  overflow:hidden; flex:none;
}
.avatar img{ width:100%; height:100%; object-fit:cover; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

.hero-visual{ display:flex; gap: 14px; align-items:stretch; }
.hero-figure{
  position:relative; flex:1;
  border-radius: var(--radius-lg);
  overflow:hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-card);
  isolation:isolate;
}
.hero-figure img{
  width:100%; height:100%; object-fit:cover;
  transform: scale(1.16); transform-origin: 34% 28%;
}
.hero-figure::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(18,58,50,0) 45%, rgba(15,29,26,.78) 100%);
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order:-1; }
  .hero-figure{ aspect-ratio: 16/10; }
}

/* ===========================================================
   Category tab strip
=========================================================== */
.tab-strip{
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.tab-list{
  display:flex; gap: 6px;
  overflow-x:auto;
  padding-block: 14px;
  scrollbar-width:none;
}
.tab-list::-webkit-scrollbar{ display:none; }
.tab-list a{
  flex:none;
  font-size: 13.5px; font-weight:600; color: var(--ink-soft);
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tab-list a:hover{ background: var(--surface-2); color: var(--ink); }
.tab-list a.active{ background: var(--teal-soft); color: var(--teal-deep); border-color: var(--teal-soft); }
.tab-list-sub{ padding-block: 0 14px; margin-top:-8px; }
.tab-list-sub a{ font-size:12.5px; font-weight:500; padding:7px 14px; color: var(--ink-soft); background: var(--surface-2); }
.tab-list-sub a:hover{ background: var(--teal-soft); color: var(--teal-deep); }

/* ===========================================================
   Section scaffolding
=========================================================== */
.section{ padding-block: clamp(56px, 7vw, 100px); }
.section + .section{ border-top: 1px solid var(--line); }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap: 20px; margin-bottom: 34px; flex-wrap:wrap;
}
.section-head h2{ font-size: clamp(24px, 2.6vw, 32px); margin-top:10px; }
.section-head .more{
  font-size:13.5px; font-weight:700; color: var(--teal);
  display:inline-flex; align-items:center; gap:6px;
  padding-bottom: 4px; border-bottom: 1px solid transparent;
}
.section-head .more:hover{ border-color: var(--teal); }
.section-desc{ color: var(--ink-soft); max-width: 56ch; margin-top:10px; }

/* ---------- article card ---------- */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow:hidden;
  display:flex; flex-direction:column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  height:100%;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--line-strong); }
.card-figure{ position:relative; aspect-ratio: 4/3; overflow:hidden; background: var(--surface-2); }
.card-figure img{ width:100%; height:100%; object-fit:cover; transform: scale(1.14); transform-origin: 30% 25%; transition: transform .5s var(--ease); }
.card:hover .card-figure img{ transform: scale(1.22) translate(-1%,-1%); }
.card-figure::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(15,29,26,0) 60%, rgba(15,29,26,.55) 100%);
}
.card-body{ padding: 20px 20px 22px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card-cat{ font-size:12px; font-weight:700; letter-spacing:.06em; color: var(--teal); }
.card h3{ font-family: var(--font-display); font-size:19px; line-height:1.34; }
.card p{ color: var(--ink-soft); font-size: 14px; margin:0; flex:1; }
.card-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:6px; font-size:12.5px; color: var(--muted); }

.card-feat{ display:grid; grid-template-columns: 1.15fr 1fr; }
.card-feat .card-figure{ aspect-ratio:auto; height:100%; min-height:280px; }
.card-feat .card-body{ padding: 30px 32px; justify-content:center; }
.card-feat h3{ font-size: clamp(21px,2.2vw,27px); }
@media (max-width: 720px){
  .card-feat{ grid-template-columns:1fr; }
  .card-feat .card-figure{ aspect-ratio: 16/9; min-height:0; }
}

.grid{ display:grid; gap: 22px; }
.grid-3{ grid-template-columns: repeat(3,1fr); }
.grid-featured{ grid-template-columns: 2fr 1fr; grid-template-rows: auto; }
.grid-featured .card-feat{ grid-row: span 2; }
@media (max-width: 980px){
  .grid-3{ grid-template-columns: repeat(2,1fr); }
  .grid-featured{ grid-template-columns: 1fr; }
  .grid-featured .card-feat{ grid-row:auto; }
}
@media (max-width: 620px){
  .grid-3{ grid-template-columns: 1fr; }
}

.reveal{ opacity:0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

/* ===========================================================
   Trust / editorial band
=========================================================== */
.trust-band{ background: var(--teal-deep); color: #EAF1EE; position:relative; overflow:hidden; }
.trust-band .wrap{ position:relative; z-index:2; }
.trust-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:center; padding-block: clamp(56px,7vw,96px); }
.trust-figure{ position:relative; border-radius: var(--radius-lg); overflow:hidden; aspect-ratio: 5/4; border: 1px solid rgba(255,255,255,.14); }
.trust-figure img{ width:100%; height:100%; object-fit:cover; transform: scale(1.18); transform-origin: 30% 25%; opacity:.92; }
.trust-copy .eyebrow{ color:#8FD9C4; }
.trust-copy .eyebrow::before{ background:#8FD9C4; }
.trust-copy h2{ color:#fff; font-size: clamp(24px,3vw,34px); margin-block:14px 16px; }
.trust-copy p{ color: #C7D8D2; max-width:50ch; margin:0 0 30px; }
.stat-row{ display:grid; grid-template-columns: repeat(3,1fr); gap:18px; border-top:1px solid rgba(255,255,255,.16); padding-top:26px; }
.stat b{ display:block; font-family: var(--font-display); font-size: clamp(22px,2.6vw,30px); color:#fff; }
.stat span{ font-size:12.5px; color:#A9C2BB; }
@media (max-width: 860px){ .trust-grid{ grid-template-columns:1fr; } .trust-figure{ order:-1; } }

/* ===========================================================
   Newsletter
=========================================================== */
.newsletter{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow:hidden; display:grid; grid-template-columns: 1fr 1.15fr; box-shadow: var(--shadow-card); }
.newsletter-figure{ position:relative; }
.newsletter-figure img{ width:100%; height:100%; object-fit:cover; transform: scale(1.2); transform-origin: 20% 40%; }
.newsletter-copy{ padding: clamp(28px,4vw,52px); display:flex; flex-direction:column; justify-content:center; gap:14px; }
.newsletter-copy h2{ font-size: clamp(22px,2.4vw,28px); }
.newsletter-copy p{ color: var(--ink-soft); margin:0; max-width:44ch; }
.newsletter-form{ display:flex; gap:10px; margin-top:8px; flex-wrap:wrap; }
.newsletter-form input[type="email"]{ flex:1; min-width:200px; padding: 13px 16px; border:1px solid var(--line-strong); border-radius:999px; font-size:14.5px; background: var(--paper); color: var(--ink); }
.newsletter-form input[type="email"]:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
.form-note{ font-size:12px; color: var(--muted); margin:0; }
.form-success{ font-size:13.5px; font-weight:700; color: var(--teal); display:none; }
.form-success.show{ display:block; }
@media (max-width: 760px){ .newsletter{ grid-template-columns:1fr; } .newsletter-figure{ aspect-ratio:16/9; } }

/* ===========================================================
   Footer
=========================================================== */
.site-footer{ background: #10201D; color:#C7D3D0; }
.footer-top{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-block: 56px 40px; border-bottom:1px solid rgba(255,255,255,.1); }
.footer-brand .brand{ color:#fff; }
.footer-brand p{ color:#93A6A1; font-size:14px; max-width: 34ch; margin: 14px 0 0; }
.footer-col h4{ font-family: var(--font-body); font-size:13px; letter-spacing:.06em; color:#7E948F; margin-bottom:16px; font-weight:700; }
.footer-col ul{ display:flex; flex-direction:column; gap:11px; }
.footer-col a{ font-size:14px; color:#D6E0DD; }
.footer-col a:hover{ color:#8FD9C4; }
.footer-social{ display:flex; gap:10px; margin-top:16px; }
.footer-social a{ width:34px; height:34px; border:1px solid rgba(255,255,255,.16); border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:12px; }
.footer-social a:hover{ border-color:#8FD9C4; color:#8FD9C4; }
.footer-cat-tree > li{ margin-bottom:14px; }
.footer-cat-tree > li > a{ font-weight:700; color:#fff; }
.footer-cat-tree ul{ margin-top:8px; padding-left:14px; border-left:1px solid rgba(255,255,255,.12); display:flex; flex-direction:column; gap:9px; }
.footer-cat-tree ul a{ font-size:13px; }

.footer-bottom{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-block:22px; font-size:12.5px; color:#7E948F; }
.footer-legal-links{ display:flex; gap:16px; flex-wrap:wrap; }
.footer-legal-links a{ color:#93A6A1; }
.footer-legal-links a:hover{ color:#8FD9C4; }
.footer-disclaimer{ font-size:12px; color:#71857F; line-height:1.7; padding-block: 18px 26px; border-bottom:1px solid rgba(255,255,255,.08); }
@media (max-width: 860px){ .footer-top{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .footer-top{ grid-template-columns: 1fr; } }

/* ===========================================================
   Page header (list / about pages)
=========================================================== */
.page-hero{ padding-block: clamp(44px,6vw,72px) 36px; border-bottom:1px solid var(--line); }
.breadcrumb{ font-size:13px; color: var(--muted); margin-bottom:16px; display:flex; gap:8px; align-items:center; }
.breadcrumb a:hover{ color: var(--teal); }
.page-hero h1{ font-size: clamp(30px,4vw,46px); margin-block: 6px 12px; }
.page-hero p{ color: var(--ink-soft); max-width: 60ch; font-size:16px; }

.filter-bar{ display:flex; gap:8px; flex-wrap:wrap; padding-block: 22px 34px; }
.filter-bar a{ background:var(--surface); border:1px solid var(--line-strong); color: var(--ink-soft); font-size:13.5px; font-weight:600; padding:9px 16px; border-radius:999px; transition: all .16s var(--ease); display:inline-block; }
.filter-bar a:hover{ border-color: var(--teal); color: var(--teal); }
.filter-bar a.active{ background: var(--teal); border-color: var(--teal); color:#fff; }
.filter-bar a.sub{ font-size:12.5px; font-weight:500; padding:7px 14px; background:transparent; border-color: var(--line); color: var(--ink-soft); }
.filter-bar a.sub:hover{ border-color: var(--teal); color: var(--teal); }
.filter-bar a.sub.active{ background: var(--teal-soft); border-color: var(--teal-soft); color: var(--teal-deep); }

/* ===========================================================
   Article (single post) page
=========================================================== */
.post-hero{ padding-block: clamp(36px,5vw,60px) 0; }
.post-hero .eyebrow{ margin-bottom:14px; }
.post-hero h1{ font-size: clamp(28px,4.4vw,48px); margin-block:0 18px; max-width: 22ch; }
.post-lede{ font-size:18px; color: var(--ink-soft); max-width:62ch; margin-bottom:26px; }
.post-meta{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding-block: 22px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); font-size:13.5px; color: var(--muted); margin-bottom: 34px; }
.post-meta .byline{ color: var(--ink); font-weight:700; display:flex; align-items:center; gap:10px; }
.post-meta .role{ font-weight:500; color: var(--muted); }
.post-share{ display:flex; gap:8px; margin-left:auto; }

.post-cover{ position:relative; border-radius: var(--radius-lg); overflow:hidden; aspect-ratio: 16/8; margin-bottom: 6px; box-shadow: var(--shadow-card); }
.post-cover img{ width:100%; height:100%; object-fit:cover; transform:scale(1.1); transform-origin:35% 30%; }
.post-cover-cap{ font-size:12.5px; color: var(--muted); padding-top:10px; margin-bottom: 44px; }

.post-layout{ display:grid; grid-template-columns: 210px 1fr; gap: 56px; align-items:start; }
.post-toc{ position:sticky; top:100px; }
.post-toc .eyebrow{ margin-bottom:14px; }
.post-toc ol{ display:flex; flex-direction:column; gap:10px; counter-reset:toc; border-left:1px solid var(--line); margin:0; padding:0; list-style:none; }
.post-toc a{ display:block; font-size:13.5px; color: var(--ink-soft); padding-left:16px; position:relative; }
.post-toc a::before{ counter-increment: toc; content: counter(toc); position:absolute; left:-6px; top:0; width:11px; height:11px; transform:translateX(-50%); background:var(--paper); font-size:9px; color:var(--muted); }
.post-toc a:hover, .post-toc a.active{ color: var(--teal); font-weight:700; }
@media (max-width: 900px){ .post-layout{ grid-template-columns:1fr; } .post-toc{ position:static; display:none; } }

.post-body{ max-width: 68ch; font-size:17px; color:#233B41; }
.post-body h2{ font-size: clamp(22px,2.6vw,28px); margin-block: 46px 16px; scroll-margin-top: 100px; }
.post-body h3{ font-family: var(--font-body); font-weight:800; font-size:18.5px; margin-block: 30px 12px; scroll-margin-top:100px; }
.post-body p{ margin: 0 0 20px; line-height:1.85; }
.post-body ul, .post-body ol{ margin:0 0 22px; padding-left:22px; }
.post-body li{ margin-bottom:9px; line-height:1.75; }
.post-body ul{ list-style:none; padding-left:2px; }
.post-body ul li{ position:relative; padding-left:20px; }
.post-body ul li::before{ content:""; position:absolute; left:0; top:9px; width:7px; height:7px; background: var(--teal-soft); border:1px solid var(--teal); }
.post-body strong{ color: var(--ink); }
.post-body a{ color: var(--teal); text-decoration: underline; text-underline-offset:3px; text-decoration-color: var(--line-strong); }
.post-body a:hover{ text-decoration-color: var(--teal); }
.post-body img{ border-radius: var(--radius); }

.pull-quote{ margin: 36px 0; padding: 26px 28px; border-left: 3px solid var(--amber); background: var(--amber-soft); font-family: var(--font-display); font-size: 21px; line-height:1.5; color:#4A2C16; border-radius: 0 var(--radius) var(--radius) 0; }
.pull-quote cite{ display:block; margin-top:12px; font-family: var(--font-body); font-style:normal; font-size:13px; font-weight:700; color:#8A5324; }

.inline-fig{ margin: 34px 0; }
.inline-fig img{ width:100%; border-radius: var(--radius); aspect-ratio:16/9; object-fit:cover; }
.inline-fig figcaption{ font-size:12.5px; color: var(--muted); padding-top:9px; }

.callout{ display:flex; gap:14px; padding: 20px 22px; margin: 30px 0; background: var(--teal-soft); border:1px solid #CFE3DC; border-radius: var(--radius); font-size:14.5px; color:#173A32; }
.callout .ico{ flex:none; font-size:18px; }
.callout strong{ display:block; margin-bottom:4px; }

.tag-row{ display:flex; gap:8px; flex-wrap:wrap; margin: 44px 0 0; }
.tag-pill{ font-size:12.5px; font-weight:600; color: var(--ink-soft); background: var(--surface-2); border:1px solid var(--line); padding:7px 13px; border-radius:999px; }

.author-box{ display:flex; gap:18px; align-items:flex-start; margin-top: 52px; padding: 26px; background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg); }
.author-box .avatar{ width:52px; height:52px; font-size:16px; }
.author-box h4{ font-family: var(--font-body); font-size:15.5px; margin:0 0 4px; }
.author-box p{ font-size:13.5px; color: var(--ink-soft); margin:0; line-height:1.7; }

.disclaimer-box{ margin-top: 30px; padding: 18px 20px; border:1px dashed var(--line-strong); border-radius: var(--radius); font-size:12.5px; color: var(--muted); line-height:1.8; }

.post-body table{ width:100%; border-collapse:collapse; margin: 8px 0 28px; font-size:14.5px; }
.post-body th, .post-body td{ padding:12px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.post-body th{ background: var(--surface-2); font-weight:700; color: var(--ink); white-space:nowrap; }
.post-body tr:last-child td{ border-bottom:none; }
.post-body table caption{ text-align:left; font-size:13px; color: var(--muted); margin-bottom:8px; }
@media (max-width: 640px){
  .post-body table{ display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
}

.ref-num{ font-size:.75em; vertical-align:super; line-height:0; color: var(--teal); text-decoration:none; }
.ref-num:hover{ text-decoration:underline; }

.article-references{ margin-top:40px; padding-top:28px; border-top:1px solid var(--line-strong); }
.article-references h3{ font-family: var(--font-body); font-weight:800; font-size:16px; margin:0 0 14px; }
.article-references ol{ margin:0; padding-left:20px; }
.article-references li{ font-size:14px; color: var(--muted); line-height:1.75; margin-bottom:10px; }
.article-references li em{ font-style:italic; }
.article-references a{ color: var(--teal); text-decoration:underline; text-underline-offset:2px; }
.article-references a:hover{ color: var(--teal-deep); }

.related{ padding-block: 60px 80px; }

/* ===========================================================
   About page
=========================================================== */
.value-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:22px; }
.value-card{ background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px; }
.value-card .num{ font-family: var(--font-display); font-size:26px; color: var(--teal); margin-bottom:14px; }
.value-card h3{ font-family: var(--font-body); font-size:16.5px; margin-bottom:8px; }
.value-card p{ font-size:14px; color: var(--ink-soft); margin:0; line-height:1.75; }
@media (max-width: 760px){ .value-grid{ grid-template-columns:1fr; } }

.process-list{ counter-reset:step; display:flex; flex-direction:column; }
.process-item{ display:grid; grid-template-columns: 64px 1fr; gap:20px; padding-block:26px; border-top:1px solid var(--line); }
.process-item:last-child{ border-bottom:1px solid var(--line); }
.process-item .step{ font-family: var(--font-mono); color: var(--teal); font-size:13px; padding-top:3px; }
.process-item h3{ font-family: var(--font-body); font-size:17px; margin-bottom:6px; }
.process-item p{ color: var(--ink-soft); margin:0; max-width:60ch; }

.team-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:22px; }
.team-card{ text-align:left; }
.team-card .avatar{ width:100%; aspect-ratio:1; border-radius: var(--radius-lg); font-size:34px; }
.team-card h4{ font-size:15px; margin: 14px 0 2px; }
.team-card span{ font-size:12.5px; color: var(--muted); }
@media (max-width: 860px){ .team-grid{ grid-template-columns: repeat(2,1fr); } }

.center{ text-align:center; }
.mt-0{ margin-top:0; }

.pagination{ display:flex; justify-content:center; gap:8px; padding-block: 20px 60px; }
.pagination a, .pagination span{ display:inline-flex; align-items:center; justify-content:center; min-width:38px; height:38px; padding:0 12px; border:1px solid var(--line-strong); border-radius:999px; font-size:13.5px; font-weight:600; color: var(--ink-soft); }
.pagination .current{ background: var(--teal); border-color: var(--teal); color:#fff; }
.pagination a:hover{ border-color: var(--teal); color: var(--teal); }

.empty-state{ text-align:center; padding-block:60px; color: var(--ink-soft); }

.home-cta{ text-align:center; padding-block: 8px 56px; }
.home-cta a{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13.5px; font-weight:700; color: var(--teal-deep);
  padding:12px 22px; border:1px solid var(--teal-soft); border-radius:999px;
  background: var(--teal-soft);
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.home-cta a:hover{ background: var(--teal); color:#fff; transform: translateY(-1px); }

/* ===========================================================
   Health Tools — homepage section + shared tool-page components
=========================================================== */
.tool-card-grid{
  display:grid; grid-template-columns: repeat(3,1fr); gap:20px;
}
@media (max-width: 900px){
  .tool-card-grid{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 620px){
  .tool-card-grid{ display:flex; gap:14px; overflow-x:auto; padding-bottom:8px; scroll-snap-type:x proximity; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .tool-card-grid .tool-card{ flex:none; width:78vw; scroll-snap-align:start; }
}
.tool-card{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; display:flex; flex-direction:column; gap:12px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.tool-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--line-strong); }
.tool-card .tool-icon{
  width:48px; height:48px; border-radius: var(--radius-lg); background: var(--teal-soft);
  display:inline-flex; align-items:center; justify-content:center; font-size:22px;
}
.tool-card h3{ font-family: var(--font-body); font-size:17px; margin:0; }
.tool-card p{ color: var(--ink-soft); font-size:14px; margin:0; flex:1; line-height:1.6; }
.tool-card .btn{ align-self:flex-start; margin-top:4px; }

/* kakao banner */
.kakao-banner{
  background: linear-gradient(135deg, #F2EEE3 0%, #EDE7D8 100%);
  border-radius: var(--radius-lg); border:1px solid #E2DBC7;
  padding: clamp(28px,4vw,44px); display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;
}
.kakao-banner-copy h3{ font-family: var(--font-display); font-size: clamp(19px,2vw,23px); margin:0 0 8px; }
.kakao-banner-copy p{ color:#5B5644; margin:0; font-size:14.5px; line-height:1.7; }
.btn-kakao{
  background:#FEE500; color:#191600; border-color:#FEE500; flex:none;
}
.btn-kakao:hover{ background:#F5D900; transform: translateY(-1px); }
@media (max-width: 620px){ .kakao-banner{ flex-direction:column; align-items:flex-start; } .btn-kakao{ width:100%; justify-content:center; } }

/* ---------- shared tool-page components ---------- */
.tool-hero{ padding-block: clamp(36px,5vw,60px) 30px; border-bottom:1px solid var(--line); }
.tool-hero h1{ font-size: clamp(28px,3.6vw,42px); margin-block: 14px 16px; }
.tool-hero p{ color: var(--ink-soft); font-size:16px; max-width:64ch; }
.tool-hero .tool-icon{ width:56px; height:56px; border-radius: var(--radius-lg); background: var(--teal-soft); display:inline-flex; align-items:center; justify-content:center; font-size:26px; margin-bottom:6px; }

.tool-app{ padding-block: 44px 70px; }
.tool-panel{
  max-width: 640px; margin-inline:auto;
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px,4vw,40px); box-shadow: var(--shadow-card);
}
.tool-field{ margin-bottom:24px; }
.tool-field label{ display:block; font-size:13.5px; font-weight:700; color: var(--ink); margin-bottom:10px; }
.tool-field input[type="number"]{
  width:100%; padding:13px 16px; border:1px solid var(--line-strong); border-radius: var(--radius);
  font-size:16px; background: var(--paper); color: var(--ink);
}
.tool-field input[type="number"]:focus-visible{ outline:2px solid var(--teal); outline-offset:1px; }

.pill-group{ display:flex; gap:8px; flex-wrap:wrap; }
.pill-group.cols-2 .pill-btn{ flex:1 1 calc(50% - 4px); }
.pill-btn{
  padding: 12px 16px; border:1px solid var(--line-strong); border-radius:999px;
  background: var(--surface); color: var(--ink-soft); font-size:13.5px; font-weight:600;
  transition: all .15s var(--ease); text-align:center;
}
.pill-btn:hover{ border-color: var(--teal); color: var(--teal); }
.pill-btn.active{ background: var(--teal); border-color: var(--teal); color:#fff; }

.tag-select{ display:flex; flex-wrap:wrap; gap:8px; max-height:220px; overflow-y:auto; padding:4px 2px; }
.tag-select .pill-btn{ padding:9px 14px; font-size:13px; }
.tag-select .pill-btn.active{ background: var(--amber); border-color: var(--amber); }
.tag-select-count{ font-size:12.5px; color: var(--muted); margin-top:8px; }

.tool-submit{ width:100%; margin-top:6px; justify-content:center; padding:15px; font-size:15.5px; }

.tool-result{ display:none; }
.tool-result.show{ display:block; }
.tool-result-big{ text-align:center; padding-block:8px 4px; }
.tool-result-big .num{ font-family: var(--font-display); font-size: clamp(40px,7vw,58px); color: var(--teal); font-weight:700; line-height:1; }
.tool-result-big .label{ font-size:13.5px; color: var(--muted); margin-top:8px; }
.tool-result-badge{ display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; font-size:13.5px; font-weight:700; margin:12px auto 0; }
.tool-result-badge.good{ background:#E3EEEA; color:#175C43; }
.tool-result-badge.warn{ background:#FCF0DB; color:#8A5324; }
.tool-result-badge.bad{ background:#FBE4E1; color:#A3352A; }

.gauge-bar{ margin-top:26px; }
.gauge-track{ display:flex; height:14px; border-radius:999px; overflow:hidden; }
.gauge-track span{ flex:1; }
.gauge-labels{ display:flex; justify-content:space-between; font-size:10.5px; color: var(--muted); margin-top:6px; }
.gauge-marker-wrap{ position:relative; height:0; }
.gauge-marker{ position:absolute; top:-24px; width:2px; height:16px; background: var(--ink); transform:translateX(-1px); }
.gauge-marker::after{ content:""; position:absolute; top:-6px; left:50%; transform:translateX(-50%); width:8px; height:8px; border-radius:50%; background: var(--ink); }

.bar-chart{ display:flex; flex-direction:column; gap:10px; margin-top:18px; }
.bar-chart-row{ display:grid; grid-template-columns: 60px 1fr 48px; align-items:center; gap:10px; font-size:12.5px; color: var(--ink-soft); }
.bar-chart-track{ height:10px; background: var(--surface-2); border-radius:999px; overflow:hidden; }
.bar-chart-fill{ height:100%; background: var(--teal); border-radius:999px; }

.food-equiv-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:12px; margin-top:22px; }
.food-equiv-item{ background: var(--surface-2); border-radius: var(--radius); padding:14px 16px; text-align:center; }
.food-equiv-item .amt{ font-family: var(--font-display); font-size:20px; color: var(--teal-deep); display:block; }
.food-equiv-item .name{ font-size:12.5px; color: var(--muted); margin-top:4px; display:block; }

.quiz-progress{ height:6px; background: var(--surface-2); border-radius:999px; overflow:hidden; margin-bottom:26px; }
.quiz-progress-fill{ height:100%; background: var(--teal); border-radius:999px; transition: width .3s var(--ease); width:10%; }
.quiz-step{ display:none; }
.quiz-step.active{ display:block; }
.quiz-step .q-num{ font-family: var(--font-mono); font-size:12px; color: var(--teal); letter-spacing:.06em; }
.quiz-step h3{ font-family: var(--font-body); font-size:17.5px; margin: 8px 0 18px; line-height:1.5; }
.quiz-options{ display:flex; flex-direction:column; gap:10px; }
.quiz-options .pill-btn{ text-align:left; border-radius: var(--radius); padding:14px 16px; }

.pair-result-list{ display:flex; flex-direction:column; gap:10px; margin-top:20px; }
.pair-result-item{ display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius: var(--radius); font-size:13.5px; }
.pair-result-item .icon{ flex:none; font-size:16px; }
.pair-result-item .names{ font-weight:700; display:block; margin-bottom:3px; }
.pair-result-item.good{ background:#EEF6F2; color:#1B4B39; }
.pair-result-item.warn{ background:#FCF3E3; color:#7A4B1E; }
.pair-result-item.bad{ background:#FBE9E7; color:#8F2F26; }

.improve-list{ display:flex; flex-direction:column; gap:12px; margin-top:22px; }
.improve-item{ display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 18px; background: var(--surface-2); border-radius: var(--radius); }
.improve-item .t{ font-size:14px; font-weight:700; color: var(--ink); }
.improve-item a{ font-size:13px; font-weight:700; color: var(--teal); white-space:nowrap; }

.tool-related{ margin-top:30px; padding-top:22px; border-top:1px solid var(--line); }
.tool-related h4{ font-size:13px; color: var(--muted); font-weight:700; margin-bottom:10px; }
.tool-related-links{ display:flex; flex-direction:column; gap:8px; }
.tool-related-links a{ font-size:14px; color: var(--teal); text-decoration:underline; text-underline-offset:3px; text-decoration-color: var(--line-strong); }
.tool-related-links a:hover{ text-decoration-color: var(--teal); }

.tool-reset{ display:block; margin: 22px auto 0; }
.tool-disclaimer{ margin-top:26px; padding:14px 16px; border:1px dashed var(--line-strong); border-radius: var(--radius); font-size:12px; color: var(--muted); line-height:1.7; text-align:center; }
