:root {
  color-scheme: light dark;
  --bg: #f1f5ed;
  --surface: #fffef9;
  --soft: #eef3e9;
  --text: #142d24;
  --muted: #496259;
  --line: #ccd9ce;
  --accent: #07664a;
  --gain: #076a4e;
  --loss: #a22d42;
  --warning: #683e09;
  --warning-bg: #fff0cf;
  --chart-1: #067455;
  --chart-2: #2456a2;
  --chart-3: #7838a2;
  --chart-4: #885100;
  --chart-5: #ab3156;
  --chart-6: #45534d;
  --chart-7: #9a4500;
  --shadow: 0 14px 34px -23px #16382d66;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1f19;
    --surface: #142b22;
    --soft: #1c362b;
    --text: #f2f8ed;
    --muted: #b6cfc0;
    --line: #3d5a4b;
    --accent: #a2e9b2;
    --gain: #9aedad;
    --loss: #ffabb6;
    --warning: #ffe2a6;
    --warning-bg: #392b16;
    --chart-1: #79e0ba;
    --chart-2: #a5c4ff;
    --chart-3: #e3b5ff;
    --chart-4: #ffd58c;
    --chart-5: #ffa3c0;
    --chart-6: #c5d8cd;
    --chart-7: #ffb46b;
    --shadow: 0 14px 34px -23px #000a;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
.wrap { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; z-index: 10; top: .5rem; left: .5rem; padding: .5rem .85rem; background: var(--surface); border-radius: .5rem; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.masthead-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.14rem; letter-spacing: -.025em; }
.brand-mark { display: grid; place-items: center; flex: 0 0 2.05rem; height: 2.05rem; background: #13563b; color: #f4dda0; border: 1px solid #43724e; border-radius: .68rem; font-size: 1.18rem; }
.main-nav a, .footer nav a { color: var(--muted); text-decoration: none; font-weight: 650; font-size: .93rem; }
.main-nav a:hover, .footer nav a:hover { text-decoration: underline; }

h1, h2 { margin: 0; line-height: 1.12; letter-spacing: -.04em; }
h1 { font-size: clamp(2.25rem, 6vw, 4.75rem); }
h2 { font-size: clamp(1.36rem, 3vw, 1.95rem); }
p { margin: .6rem 0; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.27fr 1fr;
  align-items: center;
  border-radius: 1.7rem;
  padding: clamp(1.5rem, 4vw, 3.1rem);
  margin-bottom: 1.2rem;
  color: #f9faf0;
  background: radial-gradient(ellipse at 90% 54%, #245c40 0%, #13452f 37%, #0c3024 74%);
  box-shadow: 0 16px 36px -25px #062918b0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(#def4c610 1px, transparent 1px), linear-gradient(90deg, #def4c610 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, transparent 12%, #000 82%);
}
.hero-copy { z-index: 1; max-width: 34rem; }
.hero h1 { font-weight: 800; letter-spacing: -.07em; }
.hero h1 em { color: #e5f8a7; font-family: Georgia, serif; font-weight: 400; letter-spacing: -.067em; }
.hero-copy p { max-width: 43ch; margin-block: 1rem 1.3rem; color: #e1ebd9; font-size: clamp(1rem, 1.8vw, 1.12rem); }
.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  border: 1px solid #ebf8b2;
  border-radius: .75rem;
  padding: .6rem 1.05rem;
  color: #193820;
  background: #e5f5a7;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}
.hero-action:hover { background: #f3ffc7; transform: translateY(-2px); }
.hero-action:focus-visible { outline-color: #fff2a9; }
.hero-disclaimer {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  margin: 1.5rem 0 0;
  padding-top: .7rem;
  border-top: 1px solid #cce9bf40;
  color: #dbe8d2;
  font-size: .85rem;
}

.hero-art { position: relative; height: clamp(210px, 27vw, 310px); width: 100%; max-width: 450px; justify-self: center; }
.coin-orbit { position: absolute; inset: 14% 3%; border: 1px solid #bded9a56; border-radius: 50%; transform: rotate(-24deg); }
.orbit-inner { inset: 22% 13%; border-color: #d9e9a845; transform: rotate(28deg); }
.orbit-wide::after { content: ""; position: absolute; inset: 43% auto auto -3px; width: 6px; height: 6px; border-radius: 50%; background: #d9ed9b; box-shadow: 0 0 12px #cbf28ab0; }
.coin {
  --face-light: #f9e7a7;
  --face: #d5a343;
  --edge: #9d671d;
  --coin-text: #653d0d;
  --angle: -16deg;
  position: absolute;
  width: var(--coin-size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--coin-text);
  background: linear-gradient(145deg, var(--face-light), var(--face) 78%);
  border: 1px solid var(--face-light);
  box-shadow: 0 .32rem 0 var(--edge), 0 .52rem 0 var(--edge), 0 1.4rem 2rem #071b1499, inset 0 0 0 .32rem var(--face), inset 0 0 0 .43rem var(--face-light);
  transform: rotate(var(--angle));
  animation: coin-enter .8s both cubic-bezier(.2, .8, .28, 1.18);
}
.coin::before { content: ""; position: absolute; inset: 12%; border: 1px dashed currentColor; border-radius: 50%; opacity: .35; }
.coin span { font-family: Georgia, serif; font-size: calc(var(--coin-size) * .54); font-weight: bold; line-height: 1; text-shadow: 0 1px 0 var(--face-light); }
.coin-try { --coin-size: clamp(112px, 14vw, 168px); left: 31%; top: 24%; }
.coin-usd { --coin-size: clamp(73px, 9.5vw, 111px); --face-light: #dfefa8; --face: #a3ce63; --edge: #527938; --coin-text: #2d5228; --angle: 18deg; left: 65%; top: 52%; animation-delay: .12s; }
.coin-eur { --coin-size: clamp(64px, 8.5vw, 100px); --face-light: #a4ddbf; --face: #66b891; --edge: #3b7b61; --coin-text: #194f39; --angle: -23deg; left: 13%; top: 14%; animation-delay: .2s; }
.spark { position: absolute; line-height: 1; color: #e6f5a0; font-size: 1.9rem; animation: spark-enter .7s .4s both; }
.spark-gold { top: 11%; right: 17%; color: #f8de95; }
.spark-lime { left: 13%; bottom: 12%; font-size: 1.55rem; }
.spark-small { right: 9%; bottom: 23%; font-size: .9rem; }
@keyframes coin-enter {
  from { opacity: 0; transform: translateY(24px) rotate(calc(var(--angle) - 12deg)) scale(.9); }
  to { opacity: 1; transform: rotate(var(--angle)); }
}
@keyframes spark-enter {
  from { opacity: 0; transform: scale(.45) rotate(-20deg); }
  to { opacity: 1; transform: scale(1); }
}

.panel, .metric { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 1.2rem; box-shadow: var(--shadow); }
.panel { margin-bottom: 1.1rem; padding: clamp(1rem, 3vw, 1.75rem); }
#hesapla, #yontem { scroll-margin-top: 1rem; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .65rem 1.25rem; margin-bottom: 1rem; }
.panel-heading p { margin: .35rem 0 0; }
.coverage { display: inline-flex; align-items: center; padding: .36rem .68rem; border: 1px solid var(--line); border-radius: 2rem; color: var(--accent); background: var(--soft); font-size: .82rem; font-weight: 750; }
.coverage:empty, .status:empty { display: none; }
.notice { border-inline-start: .25rem solid currentColor; border-radius: .55rem; background: var(--warning-bg); color: var(--warning); padding: .7rem 1rem; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.status { margin: .95rem 0 0; padding: .65rem .8rem; border-radius: .68rem; color: var(--accent); background: var(--soft); font-size: .94rem; font-weight: 650; }
.status.is-error { color: var(--loss); }
.status.is-summary { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
#controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem .9rem; min-width: 0; padding: 0; margin: 0; border: 0; }
.field { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.field-label, .field > label { display: flex; align-items: center; gap: .35rem; min-height: 1.8rem; }
label { font-weight: 750; font-size: .94rem; }
button, input, select { font: inherit; }
input, select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: .7rem;
  padding: .6rem .7rem;
  font-weight: 650;
  color: var(--text);
  background: var(--soft);
}
select { appearance: none; padding-inline-end: 1.75rem; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right .93rem center / .3rem .3rem no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) right .63rem center / .3rem .3rem no-repeat var(--soft); }
input[aria-invalid="true"] { border-color: var(--loss); }
.input-unit { position: relative; }
.input-unit span { position: absolute; inset: 0 auto 0 .75rem; display: grid; place-items: center; color: var(--accent); font-weight: 800; pointer-events: none; }
.input-unit input { padding-inline-start: 1.95rem; }
.amount-presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; }
.amount-presets button, .term-help {
  border: 1px solid var(--line);
  border-radius: 2rem;
  color: var(--muted);
  background: var(--surface);
  font-size: .875rem;
  font-weight: 700;
}
.amount-presets button { padding: .38rem .7rem; min-height: 36px; cursor: pointer; transition: background-color .18s ease, border-color .18s ease; }
.amount-presets button:hover, .amount-presets button[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.amount-presets button:disabled { cursor: default; opacity: .6; }
.terms { display: flex; flex-wrap: wrap; gap: .4rem; }
.term-help { display: inline-flex; align-items: center; gap: .2rem; padding-inline-start: .65rem; }
.help { position: relative; display: inline-flex; }
.help-toggle { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; padding: 0; border: 0; border-radius: 50%; color: var(--accent); background: transparent; font-size: .84rem; font-weight: 850; cursor: help; }
.help-toggle::before { content: ""; position: absolute; inset: .26rem; border: 1px solid var(--line); border-radius: 50%; pointer-events: none; }
.help-toggle:hover, .help-toggle[aria-expanded="true"] { background: var(--soft); }
.help-tip {
  position: absolute;
  z-index: 5;
  bottom: 100%;
  left: 0;
  width: min(16rem, calc(100vw - 3rem));
  padding: .65rem .8rem;
  border: 1px solid #83b293;
  border-radius: .65rem;
  color: #f7faf2;
  background: #153c2d;
  box-shadow: 0 6px 18px #0b221f40;
  font-size: .875rem;
  line-height: 1.5;
  font-weight: 500;
}
.help-right .help-tip { left: auto; right: 0; }

.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.1rem; }
.metric { padding: .9rem 1.15rem; font-variant-numeric: tabular-nums; }
.metric p { margin: 0 0 .2rem; color: var(--muted); font-size: .85rem; font-weight: 750; }
.metric strong { display: block; overflow-wrap: anywhere; line-height: 1.18; letter-spacing: -.035em; font-size: clamp(1.25rem, 3vw, 2rem); }
.metric span { display: block; margin-top: .3rem; color: var(--muted); font-size: .84rem; }
.metric-leader { background: #133c2b; color: #f4f7e8; border-color: #376349; }
.metric-leader p { color: #d4e3ca; }
.metric-leader span { color: #e9e28f; font-weight: 750; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: .85rem; }
.period-scroll { overscroll-behavior-inline: contain; }
.period-table {
  --bar-column: clamp(155px, 19vw, 225px);
  width: calc(100% + var(--bar-column) - 10px);
  table-layout: fixed;
}
.period-table > thead th:last-child { width: var(--bar-column); }
.period-table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.period-table thead th:first-child { background: var(--soft); }
.period-table .winning-row > :first-child { background: color-mix(in srgb, var(--surface), var(--accent) 7%); }
.period-table .bar span { transform: scaleX(var(--bar-reveal, 1)); transform-origin: left center; }
.period-table .bar .negative { transform-origin: right center; }
.table-actions { display: flex; align-items: center; justify-content: space-between; gap: .45rem 1rem; margin-top: .6rem; }
.table-actions p { margin: 0; color: var(--muted); font-size: .85rem; }
.table-actions button { min-height: 36px; flex: 0 0 auto; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--soft); color: var(--accent); font-size: .85rem; font-weight: 750; cursor: pointer; }
.table-actions button:hover { border-color: var(--accent); }
.scroll-hint { display: none; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .7rem .78rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
thead th { background: var(--soft); color: var(--muted); font-size: .84rem; white-space: normal; }
th:first-child { text-align: left; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: var(--soft); }
.period-name { display: flex; align-items: center; gap: .55rem; }
.asset-icon { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; border-radius: .55rem; color: var(--series-color); background: var(--soft); font-size: .84rem; font-weight: 850; }
.winning-row > * { background: color-mix(in srgb, var(--surface), var(--accent) 7%); }
.positive { color: var(--gain); font-weight: 650; }
.negative { color: var(--loss); font-weight: 650; }
.bar { position: relative; min-width: 6.5rem; height: .56rem; margin: .1rem 0; border-radius: 1rem; background: var(--soft); }
.bar::after { content: ""; position: absolute; inset: -.12rem auto -.12rem 50%; border-left: 1px solid var(--muted); }
.bar span { position: absolute; height: 100%; border-radius: 1rem; background: currentColor; }
.chart-scroll { margin-top: 1rem; padding: .5rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); }
#chart { display: block; width: 100%; font-size: 15px; }
#chart.compact-chart { font-size: 12px; }
.grid { stroke: var(--line); }
.tick { fill: var(--muted); }
.series-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.series-label { font-weight: 750; }
.chart-reveal-rect { width: var(--chart-visible, 100%); }
#history-body tr { opacity: calc(.12 + var(--row-reveal, 1) * .88); transform: translateY(calc((1 - var(--row-reveal, 1)) * 9px)); }
.history-scroll:focus-within tr { --row-reveal: 1 !important; }
@media print {
  .chart-reveal-rect { width: 100%; }
  #history-body tr { --row-reveal: 1 !important; }
}
summary { color: var(--accent); cursor: pointer; margin-top: .8rem; font-weight: 650; }
details[open] summary { margin-bottom: .55rem; }
.ad-slot {
  display: grid;
  place-items: center;
  width: min(970px, 100%);
  min-height: 94px;
  margin: 1rem auto 1.1rem;
  border: 1px dashed var(--line);
  border-radius: .9rem;
  color: var(--muted);
  background: var(--soft);
  font-size: .85rem;
}
.coffee-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.4rem;
  padding: clamp(1rem, 3vw, 1.65rem);
  margin-bottom: 1rem;
  border: 1px solid #8f6229;
  border-radius: 1.2rem;
  color: #fff9e5;
  background: radial-gradient(ellipse at 2% 65%, #88552c, transparent 65%), #482b1e;
  box-shadow: var(--shadow);
}
.coffee-card h2 { color: #fff2c9; }
.coffee-card p { margin: .35rem 0 0; color: #f2dfc9; }
.coffee-illustration { position: relative; display: grid; place-items: center; width: 4.6rem; aspect-ratio: 1; border-radius: 1rem; border: 1px solid #f2c276; background: #edbd68; }
.coffee-cup { font-size: 2.25rem; line-height: 1; transform: rotate(-9deg); }
.coffee-steam, .coffee-steam::after { position: absolute; width: 9px; height: 15px; border-left: 2px solid #fff4d0; border-radius: 50%; }
.coffee-steam { top: 5px; left: 39%; opacity: 0; }
.coffee-steam::after { content: ""; top: 1px; left: 11px; }
.coffee-card:is(:hover, :focus-within) .coffee-cup { animation: coffee-tilt .55s ease-in-out; }
.coffee-card:is(:hover, :focus-within) .coffee-steam { animation: coffee-steam .75s .15s ease-out; }
@keyframes coffee-tilt {
  0%, 100% { transform: rotate(-9deg); }
  42% { transform: translateY(-3px) rotate(11deg); }
}
@keyframes coffee-steam {
  0% { opacity: 0; transform: translateY(5px); }
  32% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-8px); }
}
.coffee-link { justify-self: start; padding: .65rem .9rem; border: 1px solid #fae2a3; border-radius: .7rem; color: #442715; background: #ffe2a2; font-weight: 800; text-decoration: none; }
.coffee-link:hover { background: #fff1c7; }
.coffee-link:focus-visible { outline-color: #fff2a9; }
.method-intro { margin-bottom: 1.25rem; }
.method-intro h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.method-intro p { max-width: 62ch; color: var(--muted); }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.method-grid section { padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--soft); }
.method-grid h2 { font-size: 1.25rem; }
.story {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 3rem);
  margin: clamp(1.6rem, 5vw, 3.8rem) 0 1.35rem;
}
.story-intro { position: sticky; top: clamp(1rem, 8vh, 5rem); min-width: 0; }
.story-intro h2 { max-width: 13ch; font-size: clamp(2rem, 5vw, 3.8rem); overflow-wrap: anywhere; }
.story-intro h2 #story-principal { color: var(--accent); }
.story-intro > p { max-width: 36ch; }
.story-dates { color: var(--accent); font-size: .9rem; font-weight: 750; }
.story-jump { display: inline-block; margin-top: .55rem; font-weight: 700; }
.personal-choice {
  max-width: 23rem;
  margin-top: 1.15rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.personal-choice > label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem .5rem; margin-bottom: .35rem; }
.personal-choice > label span { color: var(--muted); font-size: .8rem; font-weight: 500; }
.personal-results dl { display: grid; gap: .6rem; margin: .8rem 0 .55rem; }
.personal-results dl > div { padding-inline-start: .55rem; border-inline-start: 2px solid var(--line); }
.personal-results dl > div:first-child { border-color: var(--accent); }
.personal-results dt { color: var(--muted); font-size: .84rem; }
.personal-results dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.personal-results p { margin: 0; color: var(--muted); font-size: .87rem; }
.story-cards { display: grid; gap: .7rem; min-width: 0; }
.story-card {
  --scene-bg: #103b2c;
  --scene-spot: #2c6846;
  --scene-ink: #e7f6d8;
  --scene-coin: #d1eaa0;
  --scene-edge: #718a42;
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  padding: clamp(.95rem, 3vw, 1.55rem);
  overflow: hidden;
  border: 1px solid #ffffff36;
  border-radius: 1.15rem;
  color: #fffdf3;
  background: radial-gradient(ellipse at 87% 12%, var(--scene-spot), transparent 63%), var(--scene-bg);
  box-shadow: var(--shadow);
  opacity: calc(.18 + .82 * var(--story-reveal, 1));
  transform: translateY(calc((1 - var(--story-reveal, 1)) * 18px));
}
.story-card[data-asset="usd"] { --scene-bg: #142d49; --scene-spot: #315e83; --scene-ink: #ddeeff; --scene-coin: #acd4ff; --scene-edge: #5b88b4; }
.story-card[data-asset="eur"] { --scene-bg: #312742; --scene-spot: #654c7f; --scene-ink: #f3e6ff; --scene-coin: #e5c4ff; --scene-edge: #87719e; }
.story-card[data-asset="gold"] { --scene-bg: #432b17; --scene-spot: #835723; --scene-ink: #fff1cc; --scene-coin: #f5d183; --scene-edge: #a87a39; }
.story-card[data-asset="bist"] { --scene-bg: #3c2231; --scene-spot: #75405c; --scene-ink: #ffe8f1; --scene-coin: #ffc5dc; --scene-edge: #a4627f; }
.story-card[data-asset="btc"] { --scene-bg: #482d1a; --scene-spot: #83501b; --scene-ink: #ffebce; --scene-coin: #ffb85c; --scene-edge: #a95f20; }
.story-card h3 { margin: 0 0 .3rem; color: var(--scene-ink); font-size: clamp(.96rem, 2.5vw, 1.15rem); }
.story-value { display: block; margin-bottom: .25rem; font-size: clamp(1.5rem, 4.7vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.story-return { display: inline-block; padding: .18rem .53rem; border-radius: 2rem; color: var(--scene-bg); background: var(--scene-coin); font-size: .85rem; font-weight: 800; }
.story-power { margin: .4rem 0 0; color: var(--scene-ink); }
.story-source { display: block; margin-top: .3rem; color: var(--scene-ink); font-size: .82rem; }
.story-coin {
  display: grid;
  place-items: center;
  width: clamp(2.75rem, 8vw, 5.75rem);
  aspect-ratio: 1;
  border: 3px double var(--scene-bg);
  border-radius: 50%;
  color: var(--scene-bg);
  background: var(--scene-coin);
  box-shadow: 0 .25rem 0 var(--scene-edge), 0 .75rem 1.3rem #0005;
  font-size: clamp(1.4rem, 4vw, 2.8rem);
  font-weight: 850;
  transform: rotate(calc(-32deg + 21deg * var(--story-reveal, 1))) scale(calc(.76 + .24 * var(--story-reveal, 1)));
}
.details-heading { margin: 1.7rem 0 .9rem; scroll-margin-top: 1rem; }
.sources { display: flex; flex-wrap: wrap; gap: .45rem 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.footer .sources { margin-bottom: .85rem; }
.footer { padding-block: .2rem 1.75rem; }
.footer-inner { padding-top: .75rem; border-top: 1px solid var(--line); }
.legal { padding-block: 2rem; max-width: 800px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-top: 1.2rem; }
.legal h2 { margin-top: 1.15rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
.legal dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .wrap { width: calc(100% - 1.5rem); }
  .hero { grid-template-columns: 1.35fr 1fr; padding: 1.5rem; }
  .coin-try { left: 26%; }
  .coin-usd { left: 62%; }
  .coin-eur { left: 7%; }
  #controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .amount-presets button { min-height: 40px; }
}

@media (max-width: 560px) {
  .masthead-inner { min-height: 60px; }
  .main-nav { gap: .75rem; }
  .main-nav a { font-size: .82rem; }
  .brand { font-size: 1rem; gap: .42rem; }
  .brand-mark { flex-basis: 1.7rem; height: 1.7rem; border-radius: .52rem; }
  .hero { grid-template-columns: 1fr; padding: 1.25rem; border-radius: 1.25rem; }
  .hero h1 { font-size: clamp(2.65rem, 11vw, 3.6rem); }
  .hero-copy p { margin-block: .75rem 1rem; }
  .hero-art { height: 160px; max-width: 290px; margin-top: .6rem; }
  .coin-try { --coin-size: 98px; }
  .coin-usd { --coin-size: 66px; }
  .coin-eur { --coin-size: 64px; }
  .hero-disclaimer { margin-top: .8rem; }
  .panel { border-radius: 1rem; }
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .metric { padding: .75rem .78rem; border-radius: .82rem; }
  .metric-leader { grid-column: 1 / -1; }
  .metric p, .metric span { font-size: .81rem; }
  .period-table th, .period-table td { padding: .55rem .31rem; font-size: .81rem; }
  .period-table th:first-child { padding-inline-start: .45rem; }
  .period-table th:nth-child(4), .period-table td:nth-child(4) { padding-inline-end: .45rem; }
  .period-table th, .period-table td { white-space: normal; overflow-wrap: anywhere; }
  .period-table th:last-child, .period-table td:last-child { padding-inline: .65rem; }
  .period-name { gap: .24rem; }
  .asset-icon { display: none; }
  .table-actions button { min-height: 42px; }
  .ad-slot { min-height: 106px; }
  .coffee-card { grid-template-columns: auto 1fr; }
  .coffee-illustration { width: 3.7rem; }
  .coffee-cup { font-size: 1.8rem; }
  .coffee-link { grid-column: 1 / -1; }
  .method-grid { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .story-intro { position: static; }
  .story-intro h2 { max-width: none; }
  .scroll-hint { display: block; color: var(--muted); font-size: .84rem; margin: 0 0 .45rem; }
  .history-scroll tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .history-scroll thead th:first-child { background: var(--soft); }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 355px) {
  .main-nav { gap: .45rem; }
  #controls { grid-template-columns: 1fr; }
}

@media (max-height: 720px) {
  .story-intro { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .chart-reveal-rect { width: 100%; }
  #history-body tr { --row-reveal: 1 !important; }
  .period-table .bar span { transform: none; }
  .story-card { opacity: 1; transform: none; }
  .story-coin { transform: rotate(-11deg); }
}
