:root {
  --ink: #16141a;
  --muted: #635e6b;
  --line: #e4e2dd;
  --paper: #ffffff;
  --soft: #fbfaf7;
  --soft-2: #f4f3f1;
  --accent: #d6230f;
  --up: #167343;
  --down: #8a5a00;
  --header-bg: rgba(255, 255, 255, 0.88);
  color-scheme: light dark;
}

/* Dark mode — mirrors the LP top page's "Ink & Shu (dark)" palette so the
   page is consistent with nohmitaina.com when the OS prefers dark. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f1ea;
    --muted: #8a8479;
    --line: #2b2932;
    --paper: #14131a;
    --soft: #1a1922;
    --soft-2: #1d1c24;
    --accent: #ff6b4a;
    --up: #5fbf8a;
    --down: #d4a24a;
    --header-bg: rgba(20, 19, 26, 0.88);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-logo {
  flex: 0 0 auto;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 56px) 96px;
}

.hero {
  max-width: 880px;
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 22px);
}

.updated {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.updated strong {
  color: var(--ink);
  font-weight: 650;
}

/* Latest-week summary cards */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 38px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stats div {
  padding: 20px;
  background: var(--soft);
}

.stats dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats dd {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 750;
}

.stats .delta {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.delta.up {
  color: var(--up);
}

.delta.down {
  color: var(--down);
}

.delta.flat {
  color: var(--muted);
}

.section {
  padding: 56px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.table-wrap {
  overflow-x: auto;
}

table.weekly {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

table.weekly thead th {
  text-align: right;
  padding: 0 0 16px 18px;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

table.weekly thead th.col-week,
table.weekly thead th.col-range {
  text-align: left;
}

table.weekly tbody td {
  padding: 16px 0 16px 18px;
  border-top: 1px solid var(--line);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.weekly tbody tr:first-child td {
  border-top: 0;
}

table.weekly td.col-week {
  text-align: left;
  font-weight: 700;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: nowrap;
}

table.weekly td.col-range {
  text-align: left;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}

.note {
  margin: 28px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 720px) {
  .site-header,
  .section-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  main {
    padding-top: 48px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
