:root {
  --card: rgba(255, 250, 240, .86);
  --ink: #20231f;
  --muted: #69645b;
  --line: rgba(47, 38, 26, .14);
  --red: #a8322d;
  --jade: #23685c;
  --gold: #b9852c;
  --blue: #29486f;
  --shadow: 0 16px 36px rgba(52, 34, 17, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(184, 133, 44, .18), transparent 26rem),
    radial-gradient(circle at 92% 16%, rgba(35, 104, 92, .14), transparent 24rem),
    linear-gradient(150deg, #fbf7ef 0%, #f1e0c4 52%, #eaf0ec 100%);
}
a, button, select { font: inherit; }
a { color: inherit; }
.tool-shell { width: min(1100px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 44px; }
.tool-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 900; }
.brand span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #fffaf0; border: 1px solid rgba(168, 50, 45, .24); color: var(--red); }
nav, .action-row { display: flex; gap: 8px; flex-wrap: wrap; }
nav a { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,250,240,.72); text-decoration: none; }
.hero { padding: clamp(24px, 5vw, 46px); border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(32,35,31,.86), rgba(32,35,31,.48)), repeating-linear-gradient(45deg, rgba(255,250,240,.06) 0 11px, transparent 11px 22px), linear-gradient(135deg, #5d241f, #1f5b51 58%, #263f61); color: #fffaf0; box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 10px; color: #d9af66; font-size: 14px; font-weight: 900; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 14px; font-size: clamp(34px, 6vw, 60px); line-height: 1.1; }
.hero p:last-child, .panel p { max-width: 780px; color: rgba(255,250,240,.86); font-size: 19px; line-height: 1.75; }
.panel p { color: var(--muted); }
.panel { margin-top: 16px; padding: clamp(18px, 4vw, 28px); border-radius: 8px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
select { min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #fffaf0; padding: 0 12px; }
.topic-box { margin-top: 16px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { border: 1px solid var(--line); background: #fffaf0; color: var(--ink); border-radius: 999px; min-height: 36px; padding: 0 12px; cursor: pointer; }
.topic-chip.is-active { border-color: var(--jade); color: var(--jade); background: rgba(35,104,92,.1); font-weight: 900; }
button, .primary, .ghost { min-height: 44px; border-radius: 8px; border: 1px solid transparent; padding: 0 16px; cursor: pointer; font-weight: 800; }
.primary { margin-top: 16px; background: var(--red); color: #fff; }
.ghost { margin-top: 16px; background: #fffaf0; border-color: var(--line); color: var(--ink); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.resource-card { display: flex; flex-direction: column; gap: 10px; min-height: 260px; padding: 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.resource-card h3 { margin-bottom: 0; font-size: 19px; line-height: 1.45; }
.resource-card p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.resource-card span { color: var(--jade); font-weight: 900; font-size: 13px; }
.resource-card a { min-height: 40px; margin-top: auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--red); color: white; text-decoration: none; font-weight: 900; }
@media (max-width: 920px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .tool-header { flex-direction: column; align-items: stretch; }
  .control-grid, .resource-grid { grid-template-columns: 1fr; }
  .hero p:last-child { font-size: 17px; }
  .action-row > * { width: 100%; }
}
