:root {
  --paper: #f4f2ec;
  --paper-deep: #ece9e0;
  --card: #fffefb;
  --ink: #172420;
  --ink-soft: #34443e;
  --muted: #68736d;
  --line: #d9ddd6;
  --line-strong: #c5ccc4;
  --green: #116b4f;
  --green-dark: #0c503b;
  --green-soft: #e4f0e9;
  --amber: #8a5a13;
  --amber-soft: #f8eeda;
  --red: #a33b2c;
  --red-soft: #f8e7e3;
  --blue: #2e5f86;
  --blue-soft: #e7eff6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 36, 32, 0.04), 0 8px 24px rgba(23, 36, 32, 0.035);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(17, 107, 79, 0.09), transparent 70%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.demo-bar {
  background: var(--ink);
  color: #f5f3ea;
  font-size: 13px;
}
.demo-bar .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 48px;
}
.demo-id { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.demo-id .mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #d7ffc2;
  color: #143528;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.demo-id .by { color: #aebcb4; font-weight: 500; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  color: #c9d4ce;
  padding: 7px 11px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.nav a.on { background: rgba(255, 255, 255, 0.13); color: #fff; }
.reset-form { margin: 0; }

.top { padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.brand-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.top h1 { margin: 2px 0 0; font-size: 28px; letter-spacing: -0.04em; line-height: 1; }
.top h1 a { color: var(--ink); }
.top h1 a:hover { text-decoration: none; }
.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.top-note { color: var(--muted); font-size: 13px; max-width: 460px; text-align: right; }

main { padding: 30px 0 56px; }
main a:hover { text-decoration: underline; }

h2 { margin: 4px 0 10px; font-size: 34px; line-height: 1.08; letter-spacing: -0.045em; }
h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -0.015em; }
h4 { margin: 18px 0 7px; font-size: 14px; letter-spacing: -0.005em; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.sub { color: var(--muted); font-size: 13px; line-height: 1.45; }
.muted { color: var(--muted); }
.good { color: var(--green); font-weight: 650; }
.soon { color: var(--amber); font-weight: 650; }
.over { color: var(--red); font-weight: 650; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.hint { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.5; }
.note { border-left: 3px solid var(--green); padding: 8px 0 8px 14px; color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }

.flash {
  background: var(--green-soft);
  border: 1px solid #c2dccd;
  color: var(--green-dark);
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 14px;
  margin-bottom: 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr);
  gap: 36px;
  align-items: start;
  padding: 34px 0 32px;
}
.hero h2 { font-size: 46px; max-width: 680px; margin-top: 8px; }
.hero-copy > p { max-width: 650px; color: var(--ink-soft); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.account-card { padding: 20px; }
.account-card h3 { font-size: 20px; }
.account-card label { margin-top: 12px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;
}
.stat { padding: 17px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { font-size: 29px; font-weight: 720; letter-spacing: -0.04em; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 12px; margin-top: 3px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.card-head h3 { margin-bottom: 2px; }
.card-head .sub { max-width: 620px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr); gap: 20px; align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.62fr); }
.cols > div, .cols > aside, .hero > *, .card { min-width: 0; }
.cols > div > .card:last-child, .cols > aside > .card:last-child { margin-bottom: 0; }
aside .card { padding: 18px; }

.scroll { overflow-x: auto; max-width: 100%; }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.grid td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover { background: #fbfaf6; }
.grid .num { font-variant-numeric: tabular-nums; }
.brand-link { font-weight: 650; color: var(--ink); }
.brand-link:hover { color: var(--green); }
.grid td .sub { margin-top: 2px; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; color: var(--muted); font-size: 11px; }
.legend b { color: var(--ink-soft); }

.dots { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.rdot {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 4px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  border: 1px solid transparent;
  color: var(--muted);
  background: var(--paper-deep);
  cursor: default;
}
.rdot.st-drafted { background: var(--blue-soft); color: var(--blue); border-color: #c6d8e8; }
.rdot.st-sent { background: var(--amber-soft); color: var(--amber); border-color: #ebd6ae; }
.rdot.st-receipt_confirmed { background: #e6efe8; color: var(--green); border-color: #c5dbcc; }
.rdot.st-verified_unblocked { background: var(--green); color: #fff; border-color: var(--green); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.55;
  white-space: nowrap;
}
.pill.ok { color: var(--green-dark); background: var(--green-soft); border-color: #c1dbcb; }
.pill.wait { color: var(--amber); background: var(--amber-soft); border-color: #ead4ab; }
.pill.bad { color: var(--red); background: var(--red-soft); border-color: #ecc8c0; }
.pill.neutral { color: var(--ink-soft); background: var(--paper); }
.pill.st-not_started { color: var(--muted); background: var(--paper); }
.pill.st-drafted { color: var(--blue); background: var(--blue-soft); border-color: #c6d8e8; }
.pill.st-sent { color: var(--amber); background: var(--amber-soft); border-color: #ead4ab; }
.pill.st-receipt_confirmed { color: var(--green-dark); background: var(--green-soft); border-color: #c1dbcb; }
.pill.st-verified_unblocked { color: #fff; background: var(--green); border-color: var(--green); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.btn:hover { background: var(--paper); border-color: var(--muted); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.24); color: #e7ede9; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn.small { min-height: 32px; padding: 6px 10px; font-size: 12.5px; }
.btn.tiny { min-height: 28px; padding: 4px 9px; font-size: 11.5px; }
.btn.full { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--card); border-color: var(--line-strong); }

label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-soft); }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(17, 107, 79, 0.23);
  outline-offset: 1px;
  border-color: var(--green);
}
textarea { resize: vertical; min-height: 70px; }
input[type="file"] { padding: 7px; background: var(--paper); font-size: 12.5px; }
input[type="date"] { min-height: 38px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.four { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1.4fr; gap: 10px; }
.stack label { margin-bottom: 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.upload { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upload input[type="file"] { flex: 1 1 300px; margin: 0; }
.upload.secondary { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.upload.secondary select { width: 180px; margin: 0; }
.upload.secondary input[type="file"] { flex: 1 1 240px; }

.manual-add { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 6px; }
.manual-add h4 { margin-top: 12px; }
.manual-add .btn { margin-top: 10px; }
.inline { display: flex; align-items: center; gap: 6px; margin: 0; }
.inline select { width: auto; min-width: 180px; margin: 0; }

.doc-list { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list .sub { display: block; }

.steps-card { padding-bottom: 16px; }
.progress-nums { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; list-style: none; padding: 0; margin: 10px 0 0; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 7px; padding-right: 10px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.steps li::before { content: ""; position: absolute; top: 11px; left: 24px; right: 0; height: 1px; background: var(--line-strong); }
.steps li:last-child::before { display: none; }
.step-n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.steps li.done { color: var(--ink-soft); }
.steps li.done .step-n { background: var(--green); border-color: var(--green); color: #fff; }
.steps li.done::before { background: var(--green); opacity: 0.45; }
.steps li.current { color: var(--ink); font-weight: 650; }
.steps li.current .step-n { border-color: var(--green); color: var(--green); background: var(--green-soft); }

.family-card { border: 1px solid var(--line); border-radius: 9px; padding: 14px; margin-top: 10px; background: #fff; }
.family-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.family-head h4 { margin: 0 0 3px; font-size: 15px; }
.family-head h4 a { color: var(--ink); }
.family-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; font-size: 12px; }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-of-type { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-weight: 600; }

.missing { margin: 12px 0 0; padding-left: 18px; color: var(--amber); font-size: 12.5px; }
.missing li { margin-bottom: 5px; }

.callout { border: 1px solid var(--line); background: var(--paper); border-radius: 9px; padding: 13px 15px; font-size: 13px; margin-bottom: 16px; }
.callout ul { margin: 7px 0 0; padding-left: 18px; }
.callout li { margin-bottom: 3px; }
.callout.warn { background: var(--amber-soft); border-color: #ead4ab; color: #65400d; }
.callout.warn strong { color: #4f3208; }
.callout.good-callout { background: var(--green-soft); border-color: #c1dbcb; color: var(--green-dark); }
.callout p { margin: 6px 0 0; }

.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-head h2 { margin-bottom: 5px; }
.page-head .sub { margin: 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.review-stamp { border: 1px solid #c1dbcb; background: var(--green-soft); border-radius: 8px; padding: 11px 13px; margin: 10px 0; }
.review-stamp strong { display: block; color: var(--green-dark); font-size: 14px; }
.review-stamp span { color: var(--green-dark); font-size: 12px; }
.review-stamp.bad { border-color: #ecc8c0; background: var(--red-soft); }
.review-stamp.bad strong, .review-stamp.bad span { color: var(--red); }
details summary { cursor: pointer; color: var(--green); font-size: 12.5px; font-weight: 650; margin: 6px 0 10px; }

.warning-block { border: 1px solid var(--line); background: var(--paper); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px; }
.warning-block p { margin: 0; font-size: 13px; line-height: 1.5; }
.wlabel { text-transform: uppercase; letter-spacing: 0.08em; font-size: 9.5px; font-weight: 800; color: var(--muted); margin-bottom: 5px; }
.lock-form { margin-top: 10px; }
pre.memo {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 8px 0 0;
  max-height: 520px;
  overflow-y: auto;
}

.notice-card { padding-bottom: 16px; }
.notice-form textarea { font-family: var(--mono); font-size: 11.5px; line-height: 1.55; }
.agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.send-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.send-form label { max-width: 220px; }
.send-form .btn { margin-bottom: 1px; }
.receipt-box { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; font-size: 13px; }
.receipt-box p { margin: 5px 0 8px; color: var(--muted); }
.check-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.check-foot label { max-width: 240px; }
.checks td { font-size: 12.5px; }
.checks select { min-width: 135px; font-size: 12px; padding: 7px 8px; }
.checks input { min-width: 130px; font-size: 12px; padding: 7px 8px; }

.plain { margin: 5px 0 12px; padding-left: 18px; }
.plain li { margin-bottom: 4px; }
.plain.tight { margin: 0; padding-left: 16px; font-size: 12.5px; }
.plain.tight li { margin-bottom: 2px; }
.contents { list-style: none; padding: 0; margin: 0; }
.contents li { display: grid; grid-template-columns: 165px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.contents li:last-child { border-bottom: 0; }
.contents span { color: var(--muted); }
.kb td { vertical-align: top; }
.kb td:first-child { min-width: 220px; }

.due-list { margin-top: 8px; }
.due-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}
.due-row:hover { text-decoration: none; background: #fbfaf6; }
.due-date { font-weight: 650; font-size: 12.5px; }
.due-date small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.due-main { display: flex; flex-direction: column; font-size: 13px; }
.due-main span { color: var(--muted); font-size: 12px; }
.due-row.soon .due-date { color: var(--amber); }
.due-row.over .due-date { color: var(--red); }

.demo-source p { font-size: 13px; color: var(--ink-soft); }
.empty { color: var(--muted); font-size: 13.5px; font-style: italic; padding: 8px 0; }
.empty-state { text-align: center; padding: 48px 20px; }

.site-foot { border-top: 1px solid var(--line); padding: 22px 0 30px; color: var(--muted); font-size: 12px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-foot strong { color: var(--ink-soft); }
.foot-note { max-width: 660px; text-align: right; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero h2 { font-size: 38px; }
  .cols, .cols.wide-left { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(4, 1fr); row-gap: 12px; }
  .steps li:nth-child(4)::before { display: none; }
  .top-note { display: none; }
  .four { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .demo-bar .wrap { gap: 10px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .demo-id .by { display: none; }
  .nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .reset-form { margin-left: auto; }
  .top { padding: 16px 0 14px; }
  .top h1 { font-size: 24px; }
  h2 { font-size: 27px; }
  .hero { padding-top: 20px; }
  .hero h2 { font-size: 32px; }
  .hero-copy > p { font-size: 15px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px; }
  .stat .n { font-size: 24px; }
  .card { padding: 16px; }
  .page-head { flex-direction: column; gap: 12px; }
  .card-head { flex-direction: column; gap: 8px; }
  .two, .four, .agent-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::before { display: none; }
  .family-head { flex-direction: column; gap: 8px; }
  .family-foot { flex-direction: column; align-items: flex-start; }
  .due-row { grid-template-columns: 100px minmax(0, 1fr); }
  .due-row .pill { grid-column: 2; justify-self: start; }
  .contents li { grid-template-columns: 1fr; gap: 2px; }
  .site-foot .wrap { flex-direction: column; }
  .foot-note { text-align: left; }
  .upload { flex-direction: column; align-items: stretch; }
  .upload input[type="file"], .upload select { width: 100%; flex: none; }
  .send-form { flex-direction: column; align-items: stretch; }
  .send-form label { max-width: none; }
  .inline select { min-width: 150px; }
  .checks select, .checks input { min-width: 110px; }
}
