:root {
  --paper: #f3efe6;
  --paper-2: #fffdf8;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #e2d9c8;
  --green: #0e6b52;
  --green-deep: #08382c;
  --gold: #8a5a12;
  --sell: #8d2f2a;
  --warn-bg: #fff4d8;
  --shadow: 0 18px 50px rgba(48, 36, 12, 0.08);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #efe4cc 0%, transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
img, svg { max-width: 100%; }
a { color: var(--green-deep); }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header, .site-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0 8px;
}
.brand { text-decoration: none; color: inherit; }
.brand strong {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
}
.brand span { color: var(--muted); font-size: 0.82rem; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.nav a { text-decoration: none; font-size: 0.95rem; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 650; border-bottom: 2px solid var(--green); }
.lang { font-size: 0.85rem; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; text-decoration: none; }

.notice {
  background: var(--warn-bg);
  border: 1px solid #ead7a4;
  border-radius: 12px;
  padding: 10px 14px;
  color: #4a3b16;
  font-size: 0.92rem;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 0 0 12px; }
h2 { font-size: 1.6rem; margin: 0 0 8px; }
h3 { font-size: 1.15rem; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 22px 0 48px;
}
.layout > * { min-width: 0; }
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.form-card { position: sticky; top: 12px; }
label { display: block; font-size: 0.92rem; font-weight: 650; margin: 12px 0 4px; }
.hint { display: block; font-weight: 450; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
input, select, button { font: inherit; }
input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d4cbb8;
  background: white;
  color: var(--ink);
  min-height: 44px;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 14px 0;
  padding: 8px 12px 12px;
}
legend { font-size: 0.85rem; font-weight: 650; padding: 0 4px; }
.choice { display: flex; gap: 8px; align-items: flex-start; font-weight: 450; margin: 6px 0; }
.choice input { margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 450; margin: 12px 0; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--green);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
}
button.secondary, a.secondary { background: transparent; color: var(--green-deep); border: 1px solid var(--green); }
button.ghost, .ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 550; min-height: 36px; }
button.linkish {
  background: none;
  color: var(--green-deep);
  border: 0;
  padding: 0;
  min-height: 0;
  font-weight: 650;
  text-align: left;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.full { width: 100%; }

.warning {
  background: #fdecea;
  border: 1px solid #f0c8c4;
  color: #6d241f;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
}
.muted { color: var(--muted); }
.status { min-height: 1.2em; font-size: 0.9rem; color: var(--green-deep); }

.trade-hero {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 4px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.stats div {
  background: #f7f3ea;
  border-radius: 12px;
  padding: 8px 10px;
}
.stats dt { font-size: 0.75rem; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; font-weight: 650; }
.chart-wrap { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.chart-grid { stroke: #eee6d8; stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 12px 18px; list-style: none; padding: 8px 0 0; margin: 0; font-size: 0.85rem; }
.swatch { width: 14px; height: 4px; display: inline-block; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.swatch-va { background: #0e6b52; }
.swatch-dca { background: #a15c12; }
.swatch-hold { background: #1c1915; }

.table-scroll { overflow: auto; max-height: 28rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
table { border-collapse: collapse; width: 100%; min-width: 920px; font-variant-numeric: tabular-nums; font-size: 0.86rem; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; }
td:first-child { background: white; z-index: 1; }
th { position: sticky; top: 0; z-index: 2; font-size: 0.75rem; color: var(--muted); font-weight: 650; background: #f7f3ea; }
th:first-child { left: 0; z-index: 3; background: #f7f3ea; }
tr.is-sell td { color: var(--sell); }
caption { text-align: left; padding: 8px 10px; font-size: 0.85rem; color: var(--muted); }

.plans { list-style: none; padding: 0; margin: 8px 0 0; }
.plans li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

.prose { padding-bottom: 48px; }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare { width: 100%; border-collapse: collapse; min-width: 0; background: white; }
.compare th, .compare td { text-align: left; white-space: normal; }
.site-footer { padding: 12px 0 36px; color: var(--muted); font-size: 0.88rem; }
.site-footer .notice { margin-bottom: 12px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; }

@media (max-width: 860px) {
  .layout, .grid-2, .stats { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .stats { grid-template-columns: 1fr 1fr; }
  body { font-size: 16px; }
}
@media (max-width: 560px) {
  .row-2 { grid-template-columns: 1fr; }
}
