:root {
  --bg: #f6f2e8;
  --paper: #fffdf8;
  --ink: #1c2b25;
  --muted: #66746e;
  --line: #ded5c4;
  --forest: #1f6b4a;
  --forest-dark: #174f38;
  --sea: #0b74a5;
  --brunei: #b7791f;
  --warn: #a35b00;
  --danger: #9a3428;
  --soft: #7c7568;
  --shadow: 0 18px 45px rgba(31, 43, 38, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 107, 74, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(11, 116, 165, 0.12), transparent 30rem),
    linear-gradient(180deg, #f7f3e8 0%, #f6f2e8 50%, #eef2ec 100%);
  line-height: 1.65;
}

a { color: var(--forest-dark); }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.hero { padding: 44px 0 24px; }
.hero-card {
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(239, 248, 242, 0.92));
  border: 1px solid rgba(222, 213, 196, 0.95);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 34px;
}
.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 107, 74, 0.1);
  color: var(--forest-dark);
  font-weight: 800;
  font-size: 13px;
}
h1 { margin: 16px 0 10px; font-size: clamp(30px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.04em; }
.subtitle { margin: 0; max-width: 840px; color: var(--muted); font-size: 17px; }
.lead { color: var(--muted); margin-top: -4px; max-width: 820px; }

.topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 0;
  backdrop-filter: blur(14px);
  text-align: center;
}
.nav-inner {
  display: inline-flex;
  gap: 8px;
  max-width: min(1120px, calc(100% - 32px));
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(222, 213, 196, 0.9);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 10px 28px rgba(31, 43, 38, 0.08);
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a { flex: 0 0 auto; text-decoration: none; color: var(--muted); font-weight: 800; font-size: 14px; line-height: 1; padding: 9px 13px; border-radius: 999px; }
.nav-inner a:hover, .nav-inner a.active { background: var(--forest); color: #fff; }

main { padding: 14px 0 42px; }
.card {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(222, 213, 196, 0.95);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(31, 43, 38, 0.08);
  padding: 26px;
  margin: 0 0 22px;
}
.card h2 { margin-top: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; }
.card h3 { margin-top: 0; font-size: 22px; }
.card h4 { margin-bottom: 6px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile, .panel { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: rgba(255,255,255,0.68); }
.tile strong { display: block; font-size: 18px; margin-bottom: 4px; }
.tile span, .panel p, .panel li { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.metric { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: rgba(255,255,255,0.7); }
.metric strong { display: block; font-size: clamp(24px, 4vw, 36px); line-height: 1.1; color: var(--forest-dark); letter-spacing: -0.04em; }
.metric span { display: block; color: var(--ink); font-weight: 800; margin-top: 4px; }
.metric em { display: block; color: var(--muted); font-size: 13px; font-style: normal; margin-top: 2px; }

.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.action-card { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: rgba(255,255,255,0.72); transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.action-card:hover { transform: translateY(-2px); border-color: var(--forest); box-shadow: 0 10px 24px rgba(31, 107, 74, 0.12); }
.action-card strong { font-size: 21px; letter-spacing: -0.03em; }
.action-card span { color: var(--muted); font-size: 14px; }
.action-card.sea { border-top: 4px solid var(--sea); }
.action-card.warn { border-top: 4px solid var(--warn); }
.action-card.forest { border-top: 4px solid var(--forest); }
.action-card.danger { border-top: 4px solid var(--danger); }

.day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.day-link { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: rgba(255,255,255,0.72); color: var(--ink); transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.day-link:hover { transform: translateY(-2px); border-color: var(--forest); box-shadow: 0 10px 24px rgba(31, 107, 74, 0.12); }
.day-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.day-link .d { display: inline-flex; background: var(--forest); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 900; }
.day-link .date { display: inline-flex; align-items: center; border: 1px solid rgba(31, 107, 74, 0.22); background: rgba(31, 107, 74, 0.08); color: var(--forest-dark); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 800; }
.day-link h3 { margin: 0 0 4px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.22; letter-spacing: -0.03em; }
.day-link p { margin: 0; color: var(--muted); }

.section-nav { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { flex: 0 0 auto; text-decoration: none; font-weight: 800; color: var(--forest-dark); background: rgba(255,253,248,0.9); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }

.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.split-grid .panel:nth-child(3) { grid-column: span 2; }

.notice { padding: 14px 16px; border-radius: 16px; border: 1px solid #efd19c; background: #fff4df; color: #6e4300; font-weight: 650; }
.notice.ok { border-color: #b8dfc8; background: #edf8f1; color: #136d3d; }

.tag { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 900; background: #eee7d8; color: var(--soft); }
.tag.ok { background: #e4f4ea; color: #136d3d; }
.tag.todo { background: #fff4df; color: #8a5100; }
.tag.warn { background: #fff4df; color: var(--warn); }
.tag.danger { background: #fbe8e5; color: var(--danger); }
.tag.forest { background: #e5f3eb; color: var(--forest-dark); }
.tag.sea { background: #e3f2f8; color: var(--sea); }
.tag.soft { background: #eee7d8; color: var(--soft); }

.table-wrap { width: 100%; overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.5); }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; vertical-align: top; }
th { background: #eef4ee; color: var(--forest-dark); font-size: 13px; white-space: nowrap; }
td { font-size: 14px; }
tr:last-child td { border-bottom: none; }

.check-list { padding-left: 20px; }
.check-list li { margin: 8px 0; color: var(--muted); }
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stepper div { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: rgba(255,255,255,0.72); }
.stepper b { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; background: var(--forest); margin-bottom: 10px; }
.stepper span { display: block; color: var(--muted); }
.route-line { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.route-line::-webkit-scrollbar { display: none; }
.route-line span { flex: 0 0 auto; position: relative; background: rgba(31,107,74,0.09); border: 1px solid rgba(31,107,74,0.2); color: var(--forest-dark); border-radius: 999px; padding: 8px 13px; font-weight: 800; }
.route-line span:not(:last-child)::after { content: "→"; color: var(--muted); margin-left: 10px; }

.markdown .table-wrap { margin: 14px 0; }
.markdown table { min-width: 760px; }
.markdown th { background: #eef4ee; color: var(--forest-dark); }
.markdown blockquote { margin: 14px 0; padding: 12px 16px; border-left: 4px solid var(--forest); background: rgba(31, 107, 74, 0.07); border-radius: 0 12px 12px 0; color: var(--muted); }
.markdown code { background: rgba(31, 107, 74, 0.09); padding: 2px 5px; border-radius: 5px; }
.markdown hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
.markdown img { max-width: 100%; }

.footer { color: var(--muted); text-align: center; font-size: 13px; padding: 18px 0 42px; }

@media (max-width: 980px) {
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .grid, .day-grid, .split-grid { grid-template-columns: 1fr; }
  .split-grid .panel:nth-child(3) { grid-column: auto; }
  .hero-card, .card { padding: 20px; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 24px, 1120px); }
  .hero { padding: 24px 0 16px; }
  .hero-card { border-radius: 24px; }
  h1 { font-size: clamp(32px, 11vw, 44px); overflow-wrap: anywhere; }
  .subtitle { font-size: 15px; }
  .topnav { text-align: left; padding-left: 12px; padding-right: 12px; }
  .nav-inner { max-width: 100%; }
  .card { border-radius: 20px; margin-bottom: 18px; }
  .action-grid, .metrics, .stepper { grid-template-columns: 1fr; }
  .action-card { min-height: 112px; }
  .day-link { padding: 16px; }
  .day-link h3 { font-size: 24px; }
  table { min-width: 680px; }
}
