:root {
  --bg: #f3efe6;
  --surface: #fffdf8;
  --ink: #1c1a16;
  --muted: #5c574c;
  --line: #d9d2c3;
  --accent: #245544;
  --accent-hover: #1b4234;
  --ok-bg: #e5f0ea;
  --ok-ink: #1b4234;
  --thin-bg: #f8eedc;
  --thin-ink: #6a4b12;
  --loss-bg: #f6e4df;
  --loss-ink: #7a2e22;
  --shadow: 0 10px 30px rgba(28, 26, 22, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  line-height: 1.45;
}

body {
  min-height: 100dvh;
}

.wrap {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  font-weight: 700;
}

nav a, .text-link {
  color: var(--accent);
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

nav a:hover, .text-link:hover { text-decoration: underline; }

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
}

.lede, p, li, label, button, input, select, small {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 38rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.card li { margin-bottom: 8px; }

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.price {
  font-size: 1.7rem;
  margin: 0 0 6px;
}

form.grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span, .field label {
  font-size: 0.92rem;
  font-weight: 650;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1.05rem;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus {
  outline: 3px solid rgba(36, 85, 68, 0.25);
  border-color: var(--accent);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .row-2 { grid-template-columns: 1fr; }
}

.result {
  padding: 20px;
  border-radius: 14px;
  margin-top: 4px;
}

.result.ok { background: var(--ok-bg); color: var(--ok-ink); }
.result.thin { background: var(--thin-bg); color: var(--thin-ink); }
.result.loss { background: var(--loss-bg); color: var(--loss-ink); }
.result.idle { background: #eeeae1; color: var(--muted); }

.result h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.figures {
  display: grid;
  gap: 10px;
  margin: 16px 0 4px;
}

.figures div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 1rem;
}

.figures .main strong {
  font-size: 1.25rem;
}

.fine {
  display: block;
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
