:root {
  --paper: #f3efe4;
  --paper-2: #e7e1d2;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #cfc6b4;
  --pull: #1f6b4a;
  --push: #b45309;
  --weight: #3f4c6b;
  --mark: #8c2f2f;
  --warn: #f4e4c8;
  --ok: #e4efe6;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.08);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #efe6d2 0%, transparent 50%),
    var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px 8px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--ink); border-radius: 50%; font-size: 20px;
}
.brand strong { display: block; font-size: 22px; letter-spacing: 0.01em; }
.brand em { color: var(--muted); font-style: normal; font-size: 14px; }
#lang {
  background: transparent; border: 1px solid var(--ink); border-radius: 999px;
  padding: 6px 14px;
}

.shell { display: grid; grid-template-columns: 220px 1fr; gap: 8px; padding: 8px 20px 40px; }
#nav { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
#nav button {
  text-align: left; background: transparent; border: 0; border-left: 2px solid transparent;
  padding: 8px 12px; color: var(--muted);
}
#nav button.active { border-left-color: var(--mark); color: var(--ink); font-weight: 700; }
#view {
  background: rgba(255, 252, 246, 0.76);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 32px 36px;
  min-height: 70vh;
}

h1 { font-weight: 600; font-size: 34px; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 22px; margin: 28px 0 8px; }
p, li { line-height: 1.45; }
.lead { font-size: 18px; max-width: 68ch; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input[type="text"], input[type="number"], input[type="url"], textarea, select {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
textarea { min-height: 80px; resize: vertical; }
.btn {
  background: var(--ink); color: #f7f3ea; border: 0; border-radius: 999px; padding: 8px 16px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.warn { background: transparent; color: var(--mark); border: 0; padding: 0; }
.note, .warn, .ok {
  border-radius: 12px; padding: 12px 14px; margin: 10px 0;
}
.note { background: #f7f1e4; }
.warn { background: var(--warn); }
.ok { background: var(--ok); }

.forces { display: flex; gap: 8px; margin: 12px 0; }
.forces button, .tabs button {
  border-radius: 999px; border: 1px solid var(--line); background: transparent; padding: 6px 12px;
}
.forces button.on-pull, .pill.pull { background: var(--pull); color: white; border-color: var(--pull); }
.forces button.on-push, .pill.push { background: var(--push); color: white; border-color: var(--push); }
.forces button.on-weight, .pill.weight { background: var(--weight); color: white; border-color: var(--weight); }
.tabs { display: flex; gap: 8px; margin: 8px 0 16px; }
.tabs button.on { background: var(--ink); color: #f7f3ea; }
.tabs button:disabled { opacity: 0.4; cursor: not-allowed; }

.cards { display: grid; gap: 10px; }
.card {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fffdf8;
}
.card header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.meta { color: var(--muted); font-size: 13px; }
.bars { display: grid; gap: 8px; margin-top: 8px; }
.bar { display: grid; grid-template-columns: 150px 1fr 32px; gap: 8px; align-items: center; font-size: 14px; }
.bar span.track { background: #e6e0d4; border-radius: 99px; height: 10px; }
.bar i { display: block; height: 10px; border-radius: 99px; }
.chart { min-height: 280px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { border-bottom: 1px solid var(--line); text-align: left; padding: 6px 4px; vertical-align: top; }
.check { display: flex; gap: 6px; align-items: center; font-size: 14px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 8px; }
  #nav { flex-direction: row; overflow-x: auto; }
  #view { padding: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
}
@media print {
  .top, #nav, .noprint { display: none !important; }
  .shell { display: block; padding: 0; }
  #view { border: 0; box-shadow: none; }
}
