:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6166;
  --line: #dedad0;
  --accent: #a3480e;
  --accent-ink: #ffffff;
  --note-bg: #fbf1e3;
  --note-line: #ecd3b0;
  --code-bg: #efece4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --surface: #1f2225;
    --text: #e8e6e1;
    --muted: #a3a7ab;
    --line: #34383c;
    --accent: #f0904c;
    --accent-ink: #1a1206;
    --note-bg: #2a2219;
    --note-line: #4d3a24;
    --code-bg: #2a2d31;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }

.site-header,
main,
.site-footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  padding-top: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

.disclosure {
  margin: 20px 0 8px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  border-radius: 8px;
}

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 28px 0 16px; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 36px 0 10px; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }

p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }

code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; background: var(--code-bg); }
.table-wrap.table-wide {
  width: min(66rem, calc(100vw - 48px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.table-wide table { min-width: 52rem; }
.table-wide td:first-child { min-width: 9rem; }

.coupon {
  margin: 36px 0 8px;
  padding: 18px 20px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 10px;
}
.coupon h2 { margin: 0 0 8px; font-size: 1.15rem; }
.coupon p { margin: 0 0 10px; }
.coupon .code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.coupon .code {
  font: 700 1.25rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  background: var(--note-bg);
}
.coupon .small { font-size: 14px; color: var(--muted); }

.button {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border: 0;
  font-size: 15px;
  cursor: pointer;
}
button.button { font-family: inherit; }

.site-footer {
  margin-top: 40px;
  padding-top: 16px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
}
