/* Padala Hub — "honest rate board"
   Flat, ruled, tabular. No shadows, no gradients, no animation beyond basic transitions. */

:root {
  --green-900: #17332A;
  --green-800: #1F4536;
  --green-700: #2A5A46;
  --paper: #F6F1E4;
  --paper-raised: #EFE8D6;
  --line: #C9BE9E;
  --line-strong: #17332A;
  --ink: #1A1A15;
  --ink-soft: #4A473C;
  --mango: #EFA430;
  --mango-ink: #2E1D02;
  --stale: #A6432E;
  --good: #2A5A46;

  --font-serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
}

body {
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.num, .num-col, td.num-cell, input#amount-input, .yen-sign {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--green-900);
  color: var(--paper);
  border-bottom: 3px solid var(--mango);
  padding: 20px 16px 16px;
}

.masthead-inner {
  max-width: 900px;
  margin: 0 auto;
}

.wordmark {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: #D9D2BC;
}

.rate-line {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #B9C9BE;
  border-top: 1px solid #2E4E40;
  padding-top: 8px;
}

.rate-line .num {
  color: var(--mango);
  font-weight: 600;
}

/* ---------- Main / Calculator ---------- */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

.calculator {
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
}

.calculator label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.amount-field {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--green-900);
  max-width: 280px;
}

.yen-sign {
  padding: 10px 0 10px 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--green-900);
}

#amount-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  min-width: 0;
}

#amount-input:focus {
  background: #FBF8EF;
}

.hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------- Table ---------- */

.table-section {
  padding: 16px 0 4px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
}

thead th {
  background: var(--green-900);
  color: var(--paper);
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 10px;
  line-height: 1.3;
  border-right: 1px solid #2E4E40;
  white-space: nowrap;
}

thead th:last-child { border-right: none; }

thead th.num-col, thead th.center-col { text-align: right; }
thead th.center-col { text-align: center; }

tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: top;
  white-space: nowrap;
}

tbody td:last-child { border-right: none; }
tbody tr:last-child td { border-bottom: none; }

.col-name-cell {
  font-weight: 700;
  font-size: 14.5px;
  position: sticky;
  left: 0;
  background: var(--paper);
  z-index: 1;
}

tbody tr.best-value .col-name-cell {
  background: var(--mango);
}

td.num-cell {
  text-align: right;
  font-size: 15px;
}

td.hero-cell {
  text-align: right;
  font-size: 19px;
  font-weight: 700;
}

tbody tr.best-value {
  background: var(--mango);
  color: var(--mango-ink);
}

tbody tr.best-value td {
  border-color: #C98A17;
}

.best-flag {
  display: block;
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.center-col, td.center-cell {
  text-align: center;
}

.mark-yes { color: var(--good); font-weight: 700; }
tbody tr.best-value .mark-yes { color: var(--mango-ink); }
.mark-no { color: var(--stale); font-weight: 700; }

.receive-list {
  white-space: normal;
  font-size: 12.5px;
  color: var(--ink-soft);
}
tbody tr.best-value .receive-list { color: var(--mango-ink); }

.verified-cell {
  font-size: 12px;
  white-space: normal;
}

.badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  margin-top: 3px;
}

.estimated-badge { color: var(--ink-soft); }
.stale-badge { color: var(--stale); }

.loading-row {
  text-align: center;
  padding: 24px;
  color: var(--ink-soft);
  font-size: 14px;
}

.scroll-hint {
  font-size: 11.5px;
  color: var(--ink-soft);
  text-align: right;
  margin: 6px 2px 0;
}

/* ---------- Legend ---------- */

.legend {
  padding: 16px 0 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.legend p {
  margin: 0 0 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 16px;
  font-size: 11.5px;
  color: var(--ink-soft);
  text-align: center;
}

.site-footer p { margin: 0 0 6px; }

/* ---------- Small viewport tightening ---------- */

@media (max-width: 380px) {
  .wordmark { font-size: 22px; }
  body { font-size: 15px; }
}
