:root {
  --bg: #f7f5f0;
  --ink: #1a1814;
  --muted: #6a645a;
  --line: #e2dcd0;
  --card: #fffcf7;
  --calm: #1e6b3f;
  --calm-bg: #e8f5ee;
  --calm-line: #b9d8c7;
  --need: #8a3b1d;
  --need-bg: #fceede;
  --need-line: #e8c9a8;
  --accent: #1f2a22;
  --soft: #f0ebe3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 17px/1.5 Georgia, "Iowan Old Style", Palatino, "Times New Roman", serif;
  color: var(--ink);
  background: var(--bg);
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.brand {
  font: 12px/1.3 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.attention {
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 22px;
  border: 1px solid var(--calm-line);
  background: var(--calm-bg);
}

.attention.need {
  border-color: var(--need-line);
  background: var(--need-bg);
}

.attention .label {
  font: 700 12px/1.2 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--calm);
  margin: 0 0 6px;
}

.attention.need .label { color: var(--need); }

.attention h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 600;
}

.attention p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.pulse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 28px;
}

@media (max-width: 520px) {
  .pulse { grid-template-columns: 1fr; }
}

.pulse .cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.pulse .k {
  font: 12px/1.2 system-ui, sans-serif;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.pulse .v {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.pulse .v.big {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.letter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px 18px;
  margin: 0 0 22px;
}

.letter .from {
  font: 13px/1.3 system-ui, sans-serif;
  color: var(--muted);
  margin: 0 0 14px;
}

.letter h2 {
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 6px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

.letter h2:first-of-type { margin-top: 0; }

.letter p { margin: 0 0 8px; }
.letter ul { margin: 0 0 8px; padding-left: 1.15em; }
.letter li { margin: 0 0 4px; }

.section-title {
  font: 700 12px/1.2 system-ui, sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 10px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 12px;
}

.card h3 {
  font-size: 18px;
  margin: 0 0 10px;
  font-weight: 600;
}

.card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 6px 12px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
}

.card dt {
  color: var(--muted);
  margin: 0;
  font-weight: 600;
}

.card dd {
  margin: 0;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

button[disabled], .btn-disabled {
  font: 15px system-ui, sans-serif;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid #c9c2b6;
  background: #eeeae2;
  color: #6d675e;
  cursor: not-allowed;
}

.hint {
  font: 13px/1.35 system-ui, sans-serif;
  color: var(--muted);
  margin: 0;
}

.empty {
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.empty strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

details.more {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

details.more > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font: 600 15px/1.3 system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
}

details.more > summary::-webkit-details-marker { display: none; }

details.more > summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

details.more[open] > summary::after { content: "−"; }

details.more .body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

details.more .body p,
details.more .body li {
  font-size: 16px;
}

footer.note {
  margin-top: 36px;
  font: 12px/1.45 system-ui, sans-serif;
  color: var(--muted);
}

footer.note a { color: var(--muted); }
