:root {
  --bg: #f4f0e6;
  --panel: #fffdf7;
  --ink: #171612;
  --muted: #6f695e;
  --line: #ded6c7;
  --gold: #9a762b;
  --green: #28755b;
  --red: #b84a42;
  --shadow: 0 18px 48px rgba(41, 35, 22, .08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; }
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 64px);
  background: rgba(244, 240, 230, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; }
.brand span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #14130f;
  color: #fff;
  font-size: 14px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.nav-actions a { text-decoration: none; font-size: 14px; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 72px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 26px;
}
.hero-card, .side-card, .panel {
  background: rgba(255, 253, 247, .86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 20px;
}
.hero-card { padding: clamp(28px, 5vw, 58px); }
.eyebrow { color: var(--gold); font-weight: 800; letter-spacing: 0; font-size: 14px; }
h1 { margin: 14px 0 16px; font-size: clamp(42px, 6vw, 72px); line-height: 1.04; letter-spacing: 0; }
.lead { max-width: 760px; margin: 0; color: var(--muted); font-size: 19px; line-height: 1.9; }
.side-card { padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.metric { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.metric:last-child { border-bottom: 0; }
.metric strong { font-size: 24px; }
.metric span { color: var(--muted); font-size: 14px; }
.panel { padding: clamp(18px, 3vw, 30px); margin-top: 22px; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { margin: 0 0 6px; font-size: 28px; }
.panel-head p { margin: 0; color: var(--muted); line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.group-title {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--gold);
  font-weight: 900;
}
label { font-weight: 800; color: #3d382f; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
  color: var(--ink);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}
textarea { min-height: 132px; resize: vertical; line-height: 1.75; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(154, 118, 43, .12); }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.btn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
button, .button-link {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
  color: var(--ink);
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.primary { border-color: #14130f; background: #14130f; color: #fff; }
button:disabled { opacity: .55; cursor: not-allowed; }
.msg { min-height: 22px; margin-top: 12px; color: var(--muted); }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.record-list { display: grid; gap: 12px; }
.record-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
}
.record-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.record-head h3 { margin: 4px 0 0; font-size: 21px; }
.record-head span { color: var(--muted); font-size: 13px; }
.status {
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f4ecd8;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}
.status.reviewed { background: #e8f4ee; color: var(--green); }
.status.needs_revision { background: #fff2df; color: #a45c18; }
.record-body { color: #4f493f; line-height: 1.75; white-space: pre-wrap; }
.link-list { display: flex; flex-wrap: wrap; gap: 10px; }
.link-list a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  text-decoration: none;
  color: var(--gold);
  background: #fbf6e9;
  font-weight: 700;
  font-size: 13px;
}
.review-box {
  display: grid;
  gap: 8px;
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  background: #f9f3e5;
  border-radius: 0 12px 12px 0;
  color: #4f493f;
  line-height: 1.75;
}
.empty, .gate {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, .55);
}
.hidden { display: none !important; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 44px; }
}
