:root {
  --ink: #2b2118;
  --paper: #f7f2ea;
  --paper-deep: #efe6d8;
  --coffee: #8a5a33;
  --cream: #e8dcc8;
  --line: #d8cdbb;
  --muted: #6f655a;
  --mint: #b8d8b8;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
.shell { width: min(1040px, calc(100% - 40px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 700; letter-spacing: -.05em; text-decoration: none; }
.brand span { color: var(--coffee); }
.site-nav { display: flex; gap: 18px; font-size: .86rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--coffee); }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; padding: 80px 0 64px; align-items: end; }
.eyebrow { margin: 0 0 12px; color: var(--coffee); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.055em; line-height: .98; }
h1 { max-width: 680px; margin: 0; font-size: clamp(3rem, 7vw, 6rem); font-weight: 500; }
h1 em { color: var(--coffee); font-style: italic; }
h2 { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; }
h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.03em; font-size: 1.4rem; margin: 30px 0 10px; }
.lead { max-width: 560px; color: var(--muted); font-size: 1.08rem; }
.hero-card { padding: 24px; background: var(--mint); border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--coffee); transform: rotate(1deg); }
.hero-card p { margin: 0; color: var(--ink); }
.calc { display: grid; grid-template-columns: .7fr 1.3fr; gap: 40px; padding: 40px; border: 1px solid var(--ink); background: var(--ink); color: #f5efe4; }
.calc__intro p:not(.eyebrow) { color: #d9cfc0; }
.calc .eyebrow { color: #d8e8c8; }
.calc__form { display: grid; gap: 14px; align-content: start; }
.calc__form label { display: grid; gap: 6px; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #d9cfc0; }
.calc__form input { padding: 10px 12px; border: 1px solid #5a4c3a; border-radius: 0; background: #f7f2ea; color: var(--ink); font: inherit; }
.calc__form .button { margin-top: 6px; }
.button { border: 1px solid var(--ink); padding: 11px 16px; font-weight: 800; font-size: .9rem; cursor: pointer; }
.button--lime { background: #d8e8c8; color: var(--ink); }
.calc__result { display: grid; gap: 10px; align-content: start; }
.calc__row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #5a4c3a; }
.calc__row span { color: #c9bdaa; font-size: .86rem; }
.calc__row strong { font-size: 1.05rem; }
.calc__row--highlight { border-color: #d8e8c8; background: rgba(216, 232, 200, .1); }
.calc__note { margin-top: 14px; color: #a89c8a; font-size: .78rem; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 70px 0 24px; }
.guide-grid a { min-height: 150px; padding: 22px; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.guide-grid a:hover { border-color: var(--coffee); transform: translateY(-3px); }
.guide-grid span { display: block; margin-bottom: 24px; color: var(--coffee); font: 1.4rem Georgia, serif; }
.guide-grid strong { display: block; font: 1.3rem Georgia, serif; letter-spacing: -.04em; }
.guide-grid p { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 60px; padding: 80px 0 90px; }
.article p, .article li { color: var(--muted); }
.article ul { padding-left: 20px; }
.article__note { align-self: start; position: sticky; top: 20px; padding: 20px; background: var(--paper-deep); border-top: 5px solid var(--coffee); }
.article__note p { margin: 0; font-size: .9rem; }
.guide-hero { max-width: 760px; padding: 70px 0 40px; }
.guide-hero p { color: var(--muted); font-size: 1.08rem; }
.guide-content { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 55px; padding: 30px 0 85px; }
.guide-content p, .guide-content li { color: var(--muted); }
.side-card { align-self: start; position: sticky; top: 20px; padding: 20px; background: var(--cream); border: 1px solid var(--line); }
.text-link { font-weight: 800; text-underline-offset: 4px; }
.site-footer { padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
@media (max-width: 760px) {
  .hero, .calc, .article, .guide-content { grid-template-columns: 1fr; }
  .hero { gap: 30px; padding-top: 55px; }
  .calc { padding: 26px; }
  .article { gap: 30px; padding: 55px 0; }
  .guide-content { gap: 25px; }
}
@media (max-width: 480px) {
  .shell { width: min(100% - 28px, 1040px); }
  .site-nav { display: none; }
  .guide-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.6rem, 14vw, 3.4rem); }
}

/* 工具区扩展 */
.tool-hero { max-width: 780px; padding: 66px 0 30px; }
.tool-hero p { color: var(--muted); font-size: 1.08rem; }
.calc { gap: 40px; }
.calc__form .intake-row { display: flex; gap: 8px; margin-top: 6px; }
.calc__form .intake-row input { flex: 1; }
.calc__answer { font-size: 1.08rem; line-height: 1.5; color: #f5efe4; }
.calc__answer strong { color: #d8e8c8; font-size: 1.25rem; }
.calc__result .calc__answer ul { margin: 0; padding-left: 20px; }
.calc__result .calc__answer li { margin: 6px 0; color: #d9cfc0; }
.tool-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.tool-links a { padding: 14px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 700; }
.tool-links a:hover { border-color: var(--coffee); }
.side-links { display: grid; gap: 8px; }
.side-links a { display: block; padding: 10px 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 700; font-size: .9rem; }
.side-links a:hover { border-color: var(--coffee); }
.content-table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; background: #fff; }
.content-table th, .content-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; font-size: .92rem; }
.content-table th { background: var(--paper-deep); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.guide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guide-grid a { min-height: 138px; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 最近计算（留存） */
.recent { margin-top: 18px; padding: 18px 22px; border: 1px solid var(--line); background: #fff; }
.recent[hidden] { display: none; }
.recent__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.recent__head .eyebrow { margin: 0; }
.recent__clear { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 10px; font-size: .78rem; cursor: pointer; }
.recent__item { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .86rem; }
.recent__item span { color: var(--muted); }
.recent__item strong { color: var(--ink); }

/* 代谢曲线 */
.metab-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 8px; }
.metab-del { border: 1px solid #5a4c3a; background: transparent; color: #c9bdaa; font-size: 1rem; cursor: pointer; padding: 0 10px; min-width: 44px; }
.metab-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 10px 8px 24px; border: 1px solid #5a4c3a; background: rgba(0, 0, 0, .15); }
.metab-bar { position: relative; flex: 1; min-width: 8px; background: #d8e8c8; transition: height .2s; }
.metab-bar i { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-style: normal; color: #a89c8a; font-size: .68rem; white-space: nowrap; }
.metab-chart { margin-bottom: 18px; }
@media (max-width: 480px) {
  .metab-bar i { display: none; }
}
