:root {
  --paper: #f3efe4;
  --ink: #1d1a16;
  --muted: #5c564c;
  --line: #d4cbb8;
  --head: #1f3a34;
  --head-ink: #f6f3ea;
  --accent: #8c3d2f;
  --card: #fffdf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  line-height: 1.55;
}

.top, main, footer, .tabs {
  width: min(1100px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 36px 0 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent);
  font-family: "Segoe UI", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lede {
  margin: 8px 0 0;
  max-width: 46rem;
  color: var(--muted);
}

.lang {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

.lang button, .tabs button, .finder button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
}

.lang button.active, .tabs button.active, .finder button {
  background: var(--head);
  color: var(--head-ink);
  border-color: var(--head);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}

main { padding-bottom: 28px; }

h2 {
  font-weight: 500;
  font-size: 28px;
  margin: 8px 0 12px;
}

.note {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
}

.finder {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-family: "Segoe UI", sans-serif;
  font-size: 14px;
}

input {
  font: inherit;
  width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.result article {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 14px;
}

.result span {
  display: block;
  color: var(--muted);
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
}

.result strong {
  font-size: 28px;
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

th, td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th {
  background: var(--head);
  color: var(--head-ink);
  font-weight: 500;
  font-family: "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
}

td:first-child, th:first-child, td:last-child, th:last-child {
  text-align: center;
  font-family: "Segoe UI", sans-serif;
}

tr:nth-child(even) td { background: #faf7f1; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 18px 0 32px;
  font-size: 14px;
}

@media (max-width: 700px) {
  .top { flex-direction: column; align-items: flex-start; }
}
