/* ドル円 掲示板 – site stylesheet
   Design source: supplied mockups (black #050505 masthead/footer, red #CE0028 navigation and
   actions, white content, #D4D4D4 rules, #F4F4F4 surfaces, Japanese serif headings).
   Breakpoints: ≤767px mobile, 768–1023px tablet, ≥1024px desktop. No inline styles anywhere. */

@font-face {
  font-family: "Noto Serif JP Sub";
  src: url("/assets/fonts/noto-serif-jp-subset-700.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #050505;
  --ink-2: #1a1a1a;
  --red: #ce0028;
  --red-dark: #a3001f;
  --red-tint: #fdf0f2;
  --red-tint-2: #f9dfe4;
  --blue: #1f4e8c;
  --blue-tint: #eef3fa;
  --line: #d4d4d4;
  --line-soft: #e6e6e6;
  --surface: #f4f4f4;
  --surface-2: #fafafa;
  --text: #1a1a1a;
  --muted: #555;
  --white: #fff;
  --up: #b3001f;
  --down: #1d4f91;
  --serif: "Noto Serif JP Sub", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 10px rgba(0, 0, 0, .05);
  --header-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 0;
  overflow-wrap: anywhere;
  line-break: strict;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--red-dark); text-decoration: none; }
a, a:hover, a:focus { text-decoration: none; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.35; margin: 0; color: var(--ink); letter-spacing: .01em; }
table { border-collapse: collapse; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.masthead :focus-visible, .site-footer :focus-visible, .mainnav :focus-visible, .drawer :focus-visible, .banner :focus-visible { outline-color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
main { display: block; min-height: 50vh; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--ink);
  padding: 10px 16px; border: 2px solid var(--red); font-weight: 700; transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ Header */
.site-header { position: relative; z-index: 30; }
.masthead { background: var(--ink); color: #fff; }
.masthead-inner {
  max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter);
  height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.mh-left { display: flex; gap: 4px; align-items: center; }
.mh-right { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; background: transparent; color: #fff; border-radius: var(--radius); cursor: pointer;
  transition: background-color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.icon-btn .ico { width: 26px; height: 26px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: .04em; white-space: nowrap; margin: 0; }
.wordmark:hover { color: #fff; }
.wm-square { width: 18px; height: 18px; background: var(--red); flex: none; }
.wordmark-sm { font-size: 22px; gap: 9px; }
.wordmark-sm .wm-square { width: 13px; height: 13px; }
.mh-ico { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 8px 22px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 700;
  font-size: 16px; line-height: 1.3; cursor: pointer; text-align: center;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn-sm { min-height: 36px; padding: 5px 16px; font-size: 14px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; background: transparent; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--red); color: var(--red-dark); background: #fff; }
.btn-outline:hover { background: var(--red-tint); color: var(--red-dark); }
.btn-plain { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-plain:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-light { border-color: rgba(255, 255, 255, .6); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }
.more { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--red-dark); font-size: 15px; }
.more .ico { width: 16px; height: 16px; transition: transform .2s; }
.more:hover .ico { transform: translateX(3px); }

/* Main navigation */
.mainnav { background: var(--red); }
.mainnav ul { list-style: none; display: flex; justify-content: center; max-width: var(--wrap); margin: 0 auto; }
.mainnav li { display: flex; align-items: center; }
.mainnav li + li::before { content: ""; width: 1px; height: 18px; background: rgba(255, 255, 255, .55); }
.mainnav a {
  position: relative; display: block; padding: 10px 44px; color: #fff; font-family: var(--serif);
  font-weight: 700; font-size: 18px; letter-spacing: .06em; transition: background-color .2s;
}
.mainnav a:hover { background: var(--red-dark); color: #fff; }
.mainnav a.is-active::after { content: ""; position: absolute; left: 30px; right: 30px; bottom: 5px; height: 3px; background: #fff; }

/* Topic bar */
.topicbar { border-bottom: 1px solid var(--line); background: #fff; }
.topicbar-inner { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; min-height: 46px; gap: 6px; }
.topic-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; padding-right: 10px; }
.topic-dot { width: 14px; height: 14px; border: 4px solid var(--red); border-radius: 50%; }
.topicbar ul { list-style: none; display: flex; flex-wrap: wrap; }
.topicbar li { display: flex; align-items: center; }
.topicbar li::before { content: ""; width: 1px; height: 16px; background: var(--line); }
.topicbar a { display: block; padding: 10px 18px; color: var(--ink); font-size: 15px; white-space: nowrap; transition: color .2s; }
.topicbar a:hover, .topicbar a[aria-current] { color: var(--red); }

/* ------------------------------------------------------------------ Drawer menu */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(5, 5, 5, .62); opacity: 0; transition: opacity .25s; }
.drawer-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(560px, 100%); background: var(--ink); color: #fff;
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  border-right: 6px solid var(--red);
}
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 10px 24px; border-bottom: 1px solid #262626; }
.drawer-search { margin: 18px 24px 4px; display: flex; align-items: center; gap: 8px; background: #161616; border: 1px solid #333; border-radius: var(--radius); padding: 4px 4px 4px 12px; }
.drawer-search .ico { color: #aaa; }
.drawer-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; padding: 8px 4px; font-size: 16px; }
.drawer-search input::placeholder { color: #999; }
.drawer-search input:focus { outline: none; }
.drawer-search:focus-within { border-color: #fff; }
.drawer-quote {
  margin: 14px 24px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: end;
  padding: 14px 16px; border: 1px solid #2c2c2c; background: linear-gradient(135deg, #141414, #0b0b0b); color: #fff; border-radius: var(--radius);
  transition: border-color .2s;
}
.drawer-quote:hover { border-color: var(--red); color: #fff; }
.dq-pair { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #ccc; grid-column: 1 / -1; }
.dq-pair .flag { width: 18px; height: 18px; }
.dq-rate { font-family: var(--serif); font-size: 34px; font-weight: 900; line-height: 1.1; }
.dq-rate small { font-size: 16px; margin-left: 2px; }
.dq-chg { font-size: 14px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.dq-chg.is-up { color: #ff8095; }
.dq-chg.is-down { color: #8fb6ff; }
.dq-date { grid-column: 1 / -1; font-size: 12px; color: #9a9a9a; }
.drawer-nav { padding: 6px 24px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.drawer-group { padding: 18px 0 6px; border-bottom: 1px solid #222; }
.drawer-group-title { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 19px; margin-bottom: 8px; }
.drawer-group-title .ico { color: var(--red); width: 20px; height: 20px; }
.dg-num { font-family: var(--serif); font-size: 13px; color: var(--red); border: 1px solid var(--red); padding: 0 5px; line-height: 1.5; }
.drawer-group ul { list-style: none; }
.drawer-group a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 8px 2px;
  color: #e9e9e9; font-size: 15px; border-bottom: 1px solid transparent; transition: color .2s, padding .2s, border-color .2s;
}
.drawer-group a .ico { width: 16px; height: 16px; color: #666; transition: color .2s, transform .2s; }
.drawer-group a:hover, .drawer-group a[aria-current] { color: #fff; border-bottom-color: var(--red); }
.drawer-group a:hover .ico, .drawer-group a[aria-current] .ico { color: var(--red); transform: translateX(3px); }
.drawer-foot { margin-top: auto; padding: 18px 24px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-legal { grid-column: 1 / -1; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 13px; }
.drawer-legal a { color: #aaa; display: inline-block; padding: 6px 0; }
.drawer-legal a:hover { color: #fff; }
body.drawer-open { overflow: hidden; }

/* ------------------------------------------------------------------ Breadcrumbs & hero */
.crumbs { padding: 14px 0 6px; font-size: 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs li + li::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid #888; border-top: 1.5px solid #888; transform: rotate(45deg); margin: 0 12px 0 8px; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--red); }
.crumb-home { width: 16px; height: 16px; color: var(--ink-2); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 28px; align-items: center; padding: 10px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.hero-text { grid-template-columns: 1fr; }
.kicker { display: inline-block; background: var(--surface); border: 1px solid var(--line-soft); padding: 2px 12px; font-size: 13px; color: #333; margin-bottom: 12px; }
.hero-title { font-size: 54px; font-weight: 900; line-height: 1.2; letter-spacing: .02em; }
.hero-lead { margin: 14px 0 0; font-size: 18px; line-height: 1.7; color: #222; max-width: 40em; }
.hero-media img { width: 100%; aspect-ratio: 478 / 148; object-fit: cover; }

/* ------------------------------------------------------------------ Layout helpers */
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.layout > .side { border-left: 1px solid var(--line); padding-left: 28px; }
.stack > * + * { margin-top: 36px; }
.section { margin: 0 0 44px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.divided > * + * { border-left: 1px solid var(--line); padding-left: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }

.sec-title {
  position: relative; font-size: 28px; font-weight: 900; padding-left: 20px; margin: 0 0 16px; line-height: 1.35;
}
.sec-title::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 6px; background: var(--red); }
.sec-title small { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-head .sec-title { margin: 0; }
.sec-lead { margin: -6px 0 18px; color: #333; }
.side-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; margin: 0 0 14px; }
.side-title .ico { color: var(--red); width: 26px; height: 26px; }
.side-block { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.side-block:last-child { border-bottom: 0; }

/* Panels / boxes */
.panel { border: 1px solid var(--line); background: #fff; padding: 22px; border-radius: 2px; }
.panel-soft { background: var(--surface); border: 1px solid var(--line-soft); padding: 22px; }
.panel-red { background: var(--red-tint); border: 1px solid var(--red-tint-2); padding: 22px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-left: 4px solid var(--red); padding: 14px 18px; margin: 0 0 22px; }
.notice .ico { color: var(--red); margin-top: 4px; }
.notice p:last-child { margin-bottom: 0; }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin: 16px 0; border-radius: var(--radius); border: 1px solid; }
.alert p { margin: 0; }
.alert .ico { margin-top: 4px; }
.alert-success { background: #eef8f0; border-color: #b7dfc0; color: #14532d; }
.alert-error { background: #fdeef0; border-color: #f2b8c1; color: #8a0019; }
.alert-info { background: var(--blue-tint); border-color: #c8d7ee; color: #173b6b; }

/* ------------------------------------------------------------------ Rate box (home, thread, rate pages) */
.ratebox { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr) minmax(0, 1.6fr); border: 1px solid var(--line); margin-bottom: 30px; }
.ratebox > * { padding: 20px 22px; }
.ratebox > * + * { border-left: 1px solid var(--line); }
.pair-head { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 900; font-size: 22px; }
.pair-head .flag { width: 34px; height: 34px; }
.pair-head .slash { color: #777; font-weight: 400; }
.rate-label { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.rate-big { font-family: var(--serif); font-weight: 900; font-size: 56px; line-height: 1.1; margin: 4px 0 0; letter-spacing: .01em; }
.rate-big small { font-size: 24px; margin-left: 4px; }
.rate-date { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.kv { list-style: none; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.kv li:last-child { border-bottom: 0; }
.kv b { font-weight: 700; }
.chg { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; white-space: nowrap; }
.chg .ico { width: 15px; height: 15px; }
.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-flat { color: var(--muted); }

/* Segmented tabs / range buttons */
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg button, .seg a {
  min-height: 36px; min-width: 64px; padding: 4px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; cursor: pointer; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; transition: background-color .2s, color .2s, border-color .2s;
}
.seg button:hover, .seg a:hover { border-color: var(--ink); color: var(--ink); }
.seg [aria-selected="true"], .seg [aria-pressed="true"], .seg .is-active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.chart-panel[hidden], .tab-panel[hidden] { display: none; }

/* Charts */
.chart { width: 100%; height: auto; display: block; background: #fff; }
.chart .grid { stroke: #e8e8e8; stroke-width: 1; }
.chart .grid.zero { stroke: #9a9a9a; stroke-dasharray: 4 3; }
.chart text { font-family: var(--sans); font-size: 12px; fill: #555; }
.chart .endlabel { font-size: 12px; font-weight: 700; }
.chart .area { fill: rgba(206, 0, 40, .08); }
.chart-empty { padding: 40px 10px; text-align: center; color: var(--muted); background: var(--surface); }
.chart-box { border: 1px solid var(--line); padding: 14px 12px 8px; }
.chart-cap { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.spark { width: 100%; height: 44px; display: block; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin-top: 8px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 3px; display: inline-block; }
.sw-USD { background: #ce0028; } .sw-EUR { background: #1d4ed8; } .sw-GBP { background: #7c3aed; } .sw-JPY { background: #c2410c; }
.sw-AUD { background: #15803d; } .sw-CAD { background: #0e7490; } .sw-CHF { background: #78350f; } .sw-NZD { background: #be185d; }
.data-details { margin-top: 10px; font-size: 14px; }
.data-details summary { cursor: pointer; color: var(--red-dark); font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }

/* Source note */
.source-note { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0 0; align-items: flex-start; }
.source-note .ico { margin-top: 3px; width: 15px; height: 15px; }
.source-note.is-stale, .source-note.is-missing { color: #8a0019; font-weight: 700; }

/* ------------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); }
.table-wrap:focus-visible { outline-offset: 0; }
.tbl { width: 100%; font-size: 15px; background: #fff; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line-soft); padding: 10px 12px; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--surface); font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody th { font-weight: 700; background: #fcfcfc; }
.tbl-compare thead th:not(:first-child) { background: var(--red-tint); text-align: center; }
.tbl-center td { text-align: center; }
.tbl-matrix th, .tbl-matrix td { text-align: center; padding: 8px 6px; font-size: 14px; white-space: nowrap; }
.tbl-matrix tbody th { position: sticky; left: 0; z-index: 1; }
.tbl-matrix td.is-up { background: #fdecef; }
.tbl-matrix td.is-down { background: #edf2fb; }
.tbl-matrix td.self { color: #999; }
.table-cap { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ------------------------------------------------------------------ Cards */
.story { display: flex; flex-direction: column; }
.story-media { display: block; overflow: hidden; background: var(--surface); }
.story-media img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; transition: transform .4s; }
.story:hover .story-media img { transform: scale(1.03); }
.story-body { padding: 12px 0 0; }
.story-label { color: var(--red); font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.story-title { font-size: 25px; font-weight: 900; margin: 0 0 8px; }
.story-title a { color: var(--ink); }
.story-title a:hover { color: var(--red); }
.story-text { font-size: 15px; color: #333; margin: 0 0 8px; }
.stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.stories > .story { padding: 0 24px; }
.stories > .story:first-child { padding-left: 0; }
.stories > .story:last-child { padding-right: 0; }
.stories > .story + .story { border-left: 1px solid var(--line); }
.stories-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stories-5 > .story { padding: 0 12px; }
.stories-5 .story-title { font-size: 20px; }
.stories-5 .story-media img { aspect-ratio: 16 / 9; }
.stories-5 .story-label { display: inline-block; background: var(--red-tint); padding: 0 6px; font-size: 12px; }

.feature-card { border: 1px solid var(--line); background: #fff; padding: 20px; box-shadow: var(--shadow); }
.feature-card h3 { display: flex; gap: 10px; align-items: center; font-size: 21px; margin-bottom: 10px; }
.feature-card h3 .ico { color: var(--red); width: 28px; height: 28px; }
.feature-card p { font-size: 15px; margin: 0 0 8px; color: #333; }
.feature-card .note { font-size: 12px; color: var(--muted); }

.link-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); background: #fff; padding: 16px 18px; color: var(--ink); transition: border-color .2s, box-shadow .2s; min-height: 72px; }
.link-card:hover { border-color: var(--red); color: var(--ink); box-shadow: var(--shadow); }
.link-card-ico { width: 34px; height: 34px; color: var(--red); }
.link-card-body { flex: 1; display: flex; flex-direction: column; }
.link-card-body strong { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.4; }
.link-card-body span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.link-card-chev { color: var(--ink); width: 18px; height: 18px; transition: transform .2s; }
.link-card:hover .link-card-chev { transform: translateX(3px); color: var(--red); }
.link-list { list-style: none; border-top: 1px solid var(--line-soft); }
.link-list li { border-bottom: 1px solid var(--line-soft); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 4px; color: var(--ink); min-height: 44px; transition: color .2s, background-color .2s; }
.link-list a:hover, .link-list a[aria-current] { color: var(--red); }
.link-list a[aria-current] { background: var(--red-tint); font-weight: 700; padding-left: 10px; }
.link-list .ico { width: 16px; height: 16px; flex: none; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; counter-reset: step; }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { position: relative; background: var(--surface); padding: 18px 16px; }
.step + .step::before { content: ""; position: absolute; left: -21px; top: 50%; width: 10px; height: 10px; border-right: 2px solid #888; border-top: 2px solid #888; transform: translateY(-50%) rotate(45deg); }
.step-ico { color: var(--red); width: 30px; height: 30px; display: block; margin: 0 auto 6px; }
.step h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; justify-content: center; margin-bottom: 6px; }
.step p { font-size: 14px; color: #333; margin: 0; }
.num-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 14px; flex: none; }
.num-sq { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--red); color: #fff; font-family: var(--serif); font-weight: 900; font-size: 22px; flex: none; }

.checklist { list-style: none; }
.checklist li { position: relative; padding: 6px 0 6px 30px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 13px; height: 7px; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); }
.dotlist { list-style: none; }
.dotlist li { position: relative; padding: 4px 0 4px 18px; }
.dotlist li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.numlist { list-style: none; counter-reset: n; }
.numlist > li { counter-increment: n; position: relative; padding: 6px 0 6px 38px; }
.numlist > li::before { content: counter(n); position: absolute; left: 0; top: 7px; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }

.tag { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px; font-size: 13px; line-height: 1.8; color: #333; background: #fff; white-space: nowrap; }
.tag-red { border-color: var(--red); color: var(--red-dark); background: #fff; }
.tag-solid { background: var(--red); color: #fff; border-color: var(--red); }
.tag-green { border-color: #2f855a; color: #22543d; background: #f0faf4; }
.tag-blue { border-color: #2b6cb0; color: #1f4e8c; background: var(--blue-tint); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }

/* Banner (black strip with banknotes) */
.banner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 536px; align-items: stretch; background: var(--ink); color: #fff; margin: 10px 0 28px; min-height: 104px; overflow: hidden; }
.banner-title { align-self: center; padding: 18px 28px; font-size: 40px; font-weight: 900; color: #fff; position: relative; }
.banner-title::before { content: ""; position: absolute; left: 28px; top: 4px; width: 40px; height: 5px; background: var(--red); }
.banner-media { position: relative; }
.banner-media img { width: 100%; height: 100%; object-fit: cover; }
.banner-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink), rgba(5, 5, 5, 0) 45%); z-index: 1; }

/* FAQ */
.faq-item { border: 1px solid var(--line); margin-bottom: 10px; background: #fff; }
.faq-item summary { list-style: none; display: flex; gap: 12px; align-items: center; padding: 10px 14px; min-height: 48px; cursor: pointer; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.faq-item summary span[itemprop] { flex: 1; }
.faq-chev { width: 20px; height: 20px; transition: transform .2s; }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq-a { padding: 12px 16px 6px 50px; font-size: 15px; }
.faq-a p { margin-bottom: .8em; }

/* ------------------------------------------------------------------ Forum */
.composer { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.composer-fake { flex: 1; display: flex; align-items: center; min-height: 44px; border: 1px solid var(--line); padding: 6px 14px; color: #666; background: #fff; border-radius: 2px; transition: border-color .2s; }
.composer-fake:hover { border-color: var(--ink); color: #333; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: #c9c9c9; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: var(--serif); font-weight: 700; font-size: 20px; }
.avatar-sm { width: 40px; height: 40px; font-size: 16px; }
.avatar .ico { width: 28px; height: 28px; }
.av-0 { background: #8c6d5a; } .av-1 { background: #3f6c8f; } .av-2 { background: #6b5b95; } .av-3 { background: #2f7d6d; }
.av-4 { background: #a0522d; } .av-5 { background: #5b6770; } .av-6 { background: #8a3f56; } .av-7 { background: #4a6b35; }
.thread-list { list-style: none; }
.thread-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.thread-meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.thread-alias { font-weight: 700; color: var(--ink); font-size: 15px; }
.thread-title { font-family: var(--sans); font-weight: 700; font-size: 17px; margin: 2px 0 4px; line-height: 1.5; }
.thread-title a { color: var(--ink); }
.thread-title a:hover { color: var(--red); }
.thread-stats { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: #444; list-style: none; }
.thread-stats li { display: inline-flex; align-items: center; gap: 5px; }
.thread-stats .ico { width: 16px; height: 16px; }
.cat-question { border-color: var(--red); color: var(--red-dark); }
.cat-market { border-color: #2f855a; color: #22543d; background: #f0faf4; }
.cat-beginner { border-color: #b7791f; color: #7b4f12; background: #fffaf0; }
.empty { text-align: center; padding: 34px 18px; background: var(--surface); border: 1px dashed #bdbdbd; color: #333; }
.empty .ico { width: 40px; height: 40px; color: #888; display: block; margin: 0 auto 10px; }
.empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { margin: 0 0 12px; font-size: 15px; }

.post { border: 1px solid var(--line); padding: 20px; background: #fff; }
.post-op { background: #fdf3f5; border-color: #f3d3da; }
.post-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.post-alias { font-weight: 700; }
.post-time { font-size: 13px; color: var(--muted); display: block; }
.post-body { font-size: 16px; }
.post-body p { margin: 0 0 .9em; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; margin-top: 8px; }
.post-actions form { display: inline; margin: 0; }
.act {
  display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 4px 10px; border: 1px solid transparent; background: transparent;
  color: #333; font-size: 14px; cursor: pointer; border-radius: 2px; transition: background-color .2s, color .2s, border-color .2s;
}
.act:hover { background: var(--surface); color: var(--ink); }
.act .ico { width: 17px; height: 17px; }
.act[aria-pressed="true"] { color: var(--red-dark); font-weight: 700; }
.act[aria-pressed="true"] .ico { fill: rgba(206, 0, 40, .15); }
.reply-list { list-style: none; border: 1px solid var(--line); }
.reply { padding: 18px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
.reply:last-child { border-bottom: 0; }
.reply.is-child { margin-left: 52px; padding-left: 0; border-left: 0; position: relative; }
.reply.is-child::before { content: ""; position: absolute; left: -28px; top: 18px; width: 16px; height: 22px; border-left: 1.5px solid #999; border-bottom: 1.5px solid #999; }
.reply-to { font-size: 13px; color: var(--red-dark); margin: 0 0 4px; display: inline-flex; gap: 4px; align-items: center; }
.reply-to .ico { width: 14px; height: 14px; }
.post-removed { color: var(--muted); font-style: normal; background: var(--surface); padding: 8px 12px; font-size: 14px; }
.sortbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sortbar .seg button { min-width: 0; }
.login-prompt { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; }
.login-prompt p { margin: 0; flex: 1 1 260px; display: flex; gap: 12px; align-items: center; }
.login-prompt .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.thread-head { margin: 4px 0 18px; }
.thread-h1 { font-size: 36px; font-weight: 900; position: relative; padding-left: 20px; }
.thread-h1::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 6px; background: var(--red); }
.thread-info { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: #444; list-style: none; margin: 12px 0 0; align-items: center; }
.thread-info li { display: inline-flex; gap: 6px; align-items: center; }
.thread-info .ico { width: 16px; height: 16px; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 22px 0; list-style: none; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 4px 12px; border: 1px solid var(--line); color: var(--ink); }
.pager a:hover { border-color: var(--red); color: var(--red); }
.pager [aria-current] { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.pager .is-disabled { color: #999; background: var(--surface); }

/* Forms */
.form-grid { display: grid; gap: 18px; }
.field label, .field .label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.req { background: var(--red); color: #fff; font-size: 12px; padding: 0 6px; font-weight: 700; border-radius: 2px; line-height: 1.7; }
.opt { background: var(--surface); color: #444; font-size: 12px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; line-height: 1.7; }
.field-hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #b8b8b8; border-radius: 2px; background: #fff; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
.select { appearance: none; background-image: url("/assets/img/chevron-down.svg"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(206, 0, 40, .25); }
[aria-invalid="true"] { border-color: var(--red) !important; background-color: #fff8f9; }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: #a3001f; font-size: 14px; font-weight: 700; margin: 6px 0 0; }
.field-error .ico { width: 16px; height: 16px; margin-top: 3px; }
.input-icon { position: relative; }
.input-icon > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #777; pointer-events: none; }
.input-icon .input { padding-left: 42px; }
.input-icon .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; color: #555; display: flex; align-items: center; justify-content: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.counter { text-align: right; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.counter.is-over { color: var(--red-dark); font-weight: 700; }
.form-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; }
.preview-box { border: 1px dashed #999; background: var(--surface-2); padding: 16px 18px; margin-top: 14px; }
.preview-box[hidden] { display: none; }
.preview-box h3 { font-size: 20px; margin-bottom: 6px; }
.tabs-auth { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-bottom: 0; }
.tabs-auth button { min-height: 56px; border: 0; background: var(--surface); font-family: var(--serif); font-size: 20px; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s; }
.tabs-auth button[aria-selected="true"] { background: var(--red); color: #fff; }
.auth-panel { border: 1px solid var(--line); padding: 26px; }
.auth-panel h2 { margin-bottom: 6px; }

/* Search */
.searchbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; margin-bottom: 22px; }
.searchbar .input-icon .input { min-height: 60px; font-size: 22px; border-color: var(--red); padding-left: 54px; }
.searchbar .input-icon > .ico { width: 28px; height: 28px; left: 16px; color: var(--red); }
.searchbar .btn { min-height: 60px; font-size: 20px; padding: 0 40px; }
.filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; background: var(--surface); padding: 14px 18px; margin-bottom: 20px; }
.filters label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.filters .select { min-height: 42px; width: auto; min-width: 180px; }
.type-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; max-width: 680px; }
.type-tabs a { min-height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 18px; transition: background-color .2s, color .2s; }
.type-tabs a:hover { border-color: var(--ink); }
.type-tabs a[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }
.result { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.result-media { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; text-align: center; }
.result-media img { width: 150px; aspect-ratio: 3 / 2; object-fit: cover; }
.result h3 { font-family: var(--sans); font-size: 19px; margin: 4px 0; display: flex; gap: 10px; align-items: flex-start; }
.result h3 a { color: var(--ink); }
.result h3 a:hover { color: var(--red); }
.result p { margin: 0 0 6px; font-size: 15px; color: #333; }
.result-date { font-size: 13px; color: var(--muted); }
mark { background: #fff1a8; color: inherit; padding: 0 1px; }

/* ------------------------------------------------------------------ Tools */
.converter { display: grid; gap: 12px; }
.conv-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; gap: 10px; align-items: center; }
.conv-row label { font-weight: 700; font-size: 15px; }
.conv-row .input { text-align: right; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.conv-unit { font-size: 14px; color: #444; }
.conv-swap { justify-self: center; }
.conv-result { background: var(--red-tint); border: 1px solid var(--red-tint-2); padding: 14px; text-align: center; }
.conv-result-main { font-family: var(--serif); font-weight: 900; font-size: 30px; color: var(--red-dark); line-height: 1.3; }
.conv-result-main small { font-size: 16px; color: var(--ink); }
.conv-result-sub { font-size: 13px; color: #333; margin: 4px 0 0; }
.calc-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.2fr); gap: 12px; align-items: end; }
.calc-inline .op { font-size: 26px; padding-bottom: 8px; color: #333; }
.calc-out { background: var(--red-tint); border: 1px solid var(--red-tint-2); min-height: 56px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 900; font-size: 30px; color: var(--red-dark); }

.rank-list { list-style: none; }
.rank-item { display: grid; grid-template-columns: 32px 28px 52px minmax(0, 1fr) 70px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.rank-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.rank-item:nth-child(-n+3) .rank-no { background: var(--red); border-color: var(--red); color: #fff; }
.rank-code { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.rank-bar { position: relative; height: 14px; background: #ededed; }
.rank-bar span { position: absolute; top: 0; bottom: 0; }
.rank-bar .pos { left: 50%; background: var(--up); }
.rank-bar .neg { right: 50%; background: var(--down); }
.rank-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #777; }
.rank-score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.flag { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }

.currency-card { border: 1px solid var(--line); padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.cc-head { display: flex; gap: 10px; align-items: center; }
.cc-head .flag { width: 36px; height: 36px; }
.cc-name { font-family: var(--serif); font-weight: 900; font-size: 20px; line-height: 1.2; }
.cc-name small { display: block; font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--muted); }
.cc-rate { font-family: var(--serif); font-weight: 900; font-size: 30px; line-height: 1.1; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.cc-rate small { font-size: 15px; }
.cc-label { font-size: 12px; color: var(--muted); margin: 0; }
.cc-links { display: grid; gap: 6px; margin-top: auto; }
.cc-links a { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid var(--red-tint-2); padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--red-dark); min-height: 40px; transition: background-color .2s; }
.cc-links a:hover { background: var(--red-tint); }
.cc-links .ico { width: 15px; height: 15px; }
.vol-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 90px; gap: 12px; align-items: center; padding: 5px 0; font-size: 14px; }
.vol-bar { height: 16px; background: #eee; position: relative; }
.vol-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #f3a0b0, var(--red)); }
.vol-tag { text-align: center; font-size: 12px; padding: 1px 6px; border-radius: 10px; background: var(--red-tint); color: var(--red-dark); font-weight: 700; }

/* Calendar */
.cal-controls { border: 1px solid var(--line); padding: 14px; margin-bottom: 12px; display: grid; gap: 12px; }
.cal-date-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.cal-date { display: flex; align-items: center; gap: 10px; }
.cal-date output { font-family: var(--serif); font-weight: 700; font-size: 22px; display: inline-flex; align-items: center; gap: 8px; min-width: 12em; justify-content: center; }
.cal-step { width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cal-step:hover { border-color: var(--ink); }
.cal-filter-row { display: flex; flex-wrap: wrap; gap: 12px 26px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.cal-filter-row label { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.cal-filter-row .select { width: auto; min-width: 200px; min-height: 44px; }
.cal-table td, .cal-table th { vertical-align: middle; }
.cal-table .imp { display: inline-block; min-width: 28px; text-align: center; font-size: 13px; font-weight: 700; padding: 0 6px; border-radius: 2px; }
.imp-high { background: var(--red); color: #fff; }
.imp-medium { background: #fff1e0; color: #8a4a00; border: 1px solid #f4c78f; }
.imp-low { background: #eee; color: #444; }
.cal-country { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cal-event-btn { border: 0; background: none; text-align: left; padding: 0; cursor: pointer; color: var(--ink); font-weight: 700; line-height: 1.5; }
.cal-event-btn:hover { color: var(--red); }
.cal-row[hidden] { display: none; }
.cal-row.is-selected { background: var(--red-tint); }
.cal-day-head th { background: var(--ink) !important; color: #fff; font-family: var(--serif); }
.event-detail { border: 1px solid var(--line); background: var(--surface); padding: 20px; min-height: 180px; }
.event-detail .empty-hint { text-align: center; color: #555; padding: 24px 0; }
.event-detail .empty-hint .ico { width: 40px; height: 40px; color: #888; display: block; margin: 0 auto 10px; }
.event-detail h3 { font-size: 19px; margin-bottom: 8px; }

/* Article */
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; font-size: 14px; color: #333; padding: 10px 0; border-bottom: 1px solid var(--line); margin: -14px 0 22px; }
.article-meta li { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .ico { width: 16px; height: 16px; color: var(--red); }
.intro { background: var(--surface); border: 1px solid var(--line-soft); padding: 18px 22px; margin-bottom: 24px; }
.intro p:last-child { margin-bottom: 0; }
.toc { border: 1px solid var(--line); padding: 16px 22px; margin-bottom: 30px; background: #fff; }
.toc-title { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 10px; }
.toc-title .ico { color: var(--red); }
.toc ol { list-style: none; counter-reset: t; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 30px; }
.toc li { counter-increment: t; display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.toc li::before { content: counter(t); width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; transform: translateY(-1px); }
.prose { font-size: 16px; }
.prose h2 { font-size: 27px; font-weight: 900; margin: 40px 0 14px; padding-left: 20px; position: relative; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 6px; background: var(--red); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 21px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.4em; margin: 0 0 1em; }
.prose ul:not([class]) li, .prose ol:not([class]) li { margin: .2em 0; }
.prose .table-wrap { margin: 0 0 1.2em; }
.prose figure { margin: 0 0 1.4em; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.prose strong { font-weight: 700; background: linear-gradient(transparent 62%, #fde2e7 62%); }
.prose a { font-weight: 700; }
.callout { border: 1px solid var(--red-tint-2); background: var(--red-tint); padding: 18px 20px; margin: 0 0 1.4em; }
.callout-title { display: flex; gap: 8px; align-items: center; font-size: 19px; color: var(--red-dark); margin: 0 0 8px; }
.callout-title .ico { color: var(--red); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.formula { font-family: var(--serif); font-size: 18px; background: var(--surface); border-left: 4px solid var(--ink); padding: 12px 16px; margin: 0 0 1.2em; }
.compare-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 1.4em; }
.compare-box { border: 1px solid var(--line); background: #fff; }
.compare-box-head { padding: 12px 16px; display: flex; gap: 10px; align-items: center; font-family: var(--serif); font-weight: 900; font-size: 22px; }
.compare-box-head .ico { width: 30px; height: 30px; }
.compare-box.is-red .compare-box-head { background: var(--red-tint); color: var(--red-dark); }
.compare-box.is-blue .compare-box-head { background: var(--blue-tint); color: var(--blue); }
.compare-box.is-gray .compare-box-head { background: var(--surface); }
.compare-box-body { padding: 14px 16px; }
.compare-box-body p:last-child, .compare-box-body ul:last-child { margin-bottom: 0; }
.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 10px; border-radius: 12px; }
.pill-red { background: var(--red); color: #fff; }
.pill-blue { background: var(--blue); color: #fff; }
.pill-gray { background: #e6e6e6; color: #333; }
.scenario { border: 1px solid var(--line); background: #fff; }
.scenario-head { color: #fff; padding: 12px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.scenario-head h3 { color: #fff; font-size: 28px; display: flex; align-items: center; gap: 10px; }
.scenario-head .ico { width: 30px; height: 30px; }
.scenario-head .tag { background: rgba(255, 255, 255, .92); border: 0; color: #333; }
.sc-up .scenario-head { background: linear-gradient(120deg, #1f4e8c, #3a6db0); }
.sc-flat .scenario-head { background: linear-gradient(120deg, #4a4a4a, #6d6d6d); }
.sc-down .scenario-head { background: linear-gradient(120deg, #a3001f, #ce0028); }
.scenario-body { padding: 14px 16px; }
.scenario-body h4 { font-family: var(--sans); font-size: 15px; background: var(--surface); padding: 4px 10px; margin: 6px 0 8px; }
.scenario-lead { font-weight: 700; margin-bottom: 8px; }
.glossary { display: grid; grid-template-columns: 180px minmax(0, 1fr); border: 1px solid var(--line); margin: 0 0 1.4em; }
.glossary dt, .glossary dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.glossary dt { font-weight: 700; background: var(--surface); }
.glossary dt:last-of-type, .glossary dd:last-of-type { border-bottom: 0; }
.related-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* Step cards (indicator install, etc.) */
.how-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; list-style: none; }
.how-steps li { position: relative; background: var(--surface); padding: 16px 14px; text-align: center; }
.how-steps li + li::before { content: ""; position: absolute; left: -18px; top: 50%; width: 9px; height: 9px; border-right: 2px solid #888; border-top: 2px solid #888; transform: translateY(-50%) rotate(45deg); }
.how-steps .ico { width: 32px; height: 32px; color: var(--red); display: block; margin: 0 auto 6px; }
.how-steps h3 { font-family: var(--sans); font-size: 16px; display: flex; gap: 6px; justify-content: center; align-items: center; margin-bottom: 4px; }
.how-steps p { font-size: 14px; margin: 0; }

/* Tool tabs (indicator page) */
.tool-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }
.tool-tabs a { min-height: 54px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 700; transition: background-color .2s, color .2s; }
.tool-tabs a:hover { border-color: var(--ink); }
.tool-tabs a[aria-current] { background: var(--red); color: #fff; border-color: var(--red); }

/* Phone illustration (apps page): live data in a CSS device frame */
.phone { width: 260px; margin: 0 auto; border: 10px solid #1d1d1f; border-radius: 34px; background: #fff; padding: 18px 14px 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, .18); }
.phone-title { font-family: var(--serif); font-weight: 900; text-align: center; font-size: 18px; margin: 0; }
.phone-sub { text-align: center; font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.phone .rank-item { grid-template-columns: 20px 22px 40px minmax(0, 1fr) 46px; gap: 6px; font-size: 12px; }
.phone .rank-no { width: 20px; height: 20px; font-size: 11px; }
.phone .flag { width: 20px; height: 20px; }
.phone .rank-code { font-size: 14px; }
.phone .rank-score { font-size: 12px; }

/* About / policy */
.policy h2 { font-size: 24px; margin: 30px 0 10px; padding-left: 16px; position: relative; }
.policy h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; background: var(--red); }
.policy ol:not([class]), .policy ul:not([class]) { padding-left: 1.4em; margin: 0 0 1em; }
.rule-row { display: grid; grid-template-columns: 56px 70px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.rule-row:last-child { border-bottom: 0; }
.rule-ico { width: 56px; height: 56px; color: var(--ink); }
.rule-row h3 { font-size: 21px; margin-bottom: 4px; }
.rule-row p { margin: 0; font-size: 15px; }
.info-table { width: 100%; border: 1px solid var(--line); }
.info-table th, .info-table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.info-table th { background: var(--surface); width: 34%; font-weight: 700; }
.mail-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; border: 2px solid var(--red); padding: 22px; background: var(--red-tint); }
.mail-card .ico { width: 40px; height: 40px; color: var(--red); }
.mail-address { font-family: var(--serif); font-size: 28px; font-weight: 900; color: var(--ink); word-break: break-all; }
.mail-address:hover { color: var(--red); }
.cta-band { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; border: 1px solid var(--red-tint-2); background: var(--red-tint); padding: 22px 26px; }
.cta-band h2 { font-size: 24px; margin-bottom: 4px; }
.cta-band p { margin: 0; }
.cta-band .ico-big { width: 54px; height: 54px; color: var(--red); }

/* 404 */
.error-page { padding: 40px var(--gutter); }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: var(--ink); color: #fff; margin-top: 56px; }
.footer-inner { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; justify-content: space-between; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; align-items: center; }
.footer-links li { display: flex; align-items: center; }
.footer-links li + li::before { content: ""; width: 1px; height: 14px; background: #666; }
.footer-links a { color: #fff; font-size: 14px; padding: 10px 22px; display: block; }
.footer-links a:hover { color: #ff8da2; }
.footer-note { font-size: 13px; margin: 0; color: #ddd; }


/* Bar widths (no inline styles: discrete width classes) */
.w-0{width:0%}.w-1{width:1%}.w-2{width:2%}.w-3{width:3%}.w-4{width:4%}.w-5{width:5%}.w-6{width:6%}.w-7{width:7%}.w-8{width:8%}.w-9{width:9%}.w-10{width:10%}.w-11{width:11%}.w-12{width:12%}.w-13{width:13%}.w-14{width:14%}.w-15{width:15%}.w-16{width:16%}.w-17{width:17%}.w-18{width:18%}.w-19{width:19%}.w-20{width:20%}.w-21{width:21%}.w-22{width:22%}.w-23{width:23%}.w-24{width:24%}.w-25{width:25%}.w-26{width:26%}.w-27{width:27%}.w-28{width:28%}.w-29{width:29%}.w-30{width:30%}.w-31{width:31%}.w-32{width:32%}.w-33{width:33%}.w-34{width:34%}.w-35{width:35%}.w-36{width:36%}.w-37{width:37%}.w-38{width:38%}.w-39{width:39%}.w-40{width:40%}.w-41{width:41%}.w-42{width:42%}.w-43{width:43%}.w-44{width:44%}.w-45{width:45%}.w-46{width:46%}.w-47{width:47%}.w-48{width:48%}.w-49{width:49%}.w-50{width:50%}.w-51{width:51%}.w-52{width:52%}.w-53{width:53%}.w-54{width:54%}.w-55{width:55%}.w-56{width:56%}.w-57{width:57%}.w-58{width:58%}.w-59{width:59%}.w-60{width:60%}.w-61{width:61%}.w-62{width:62%}.w-63{width:63%}.w-64{width:64%}.w-65{width:65%}.w-66{width:66%}.w-67{width:67%}.w-68{width:68%}.w-69{width:69%}.w-70{width:70%}.w-71{width:71%}.w-72{width:72%}.w-73{width:73%}.w-74{width:74%}.w-75{width:75%}.w-76{width:76%}.w-77{width:77%}.w-78{width:78%}.w-79{width:79%}.w-80{width:80%}.w-81{width:81%}.w-82{width:82%}.w-83{width:83%}.w-84{width:84%}.w-85{width:85%}.w-86{width:86%}.w-87{width:87%}.w-88{width:88%}.w-89{width:89%}.w-90{width:90%}.w-91{width:91%}.w-92{width:92%}.w-93{width:93%}.w-94{width:94%}.w-95{width:95%}.w-96{width:96%}.w-97{width:97%}.w-98{width:98%}.w-99{width:99%}.w-100{width:100%}
.sources { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 4px; }
.sources h2 { font-size: 21px; padding-left: 0; }
.sources h2::before { display: none; }
.sources ul { padding-left: 1.3em; font-size: 14px; }

/* ------------------------------------------------------------------ Tablet */
@media (max-width: 1100px) {
  .mainnav a { padding: 10px 26px; font-size: 17px; }
  .mainnav a.is-active::after { left: 16px; right: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr) 400px; }
  .hero-title { font-size: 46px; }
  .stories-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  .stories-5 > .story:nth-child(4) { border-left: 0; padding-left: 0; }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  :root { --gutter: 20px; }
  .layout { grid-template-columns: 1fr; gap: 36px; }
  .layout > .side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .ratebox { grid-template-columns: 1fr 1fr; }
  .ratebox > :last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .grid-4, .steps-4, .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-steps li + li::before, .steps-4 .step + .step::before { display: none; }
  .banner { grid-template-columns: minmax(0, 1fr) 46%; }
  .banner-title { font-size: 32px; }
  .related-guides { grid-template-columns: 1fr 1fr; }
  .drawer-nav { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------------ Mobile */
@media (max-width: 767px) {
  :root { --gutter: 16px; }
  body { line-height: 1.7; }
  .masthead-inner { height: 56px; grid-template-columns: auto 1fr auto; gap: 4px; padding: 0 8px; }
  .mh-left .icon-btn:nth-child(2) { display: none; }
  .wordmark { font-size: 23px; gap: 8px; justify-self: center; }
  .wordmark .wm-square { width: 13px; height: 13px; }
  .mh-right { gap: 2px; }
  .mh-right .btn { min-height: 44px; min-width: 44px; padding: 0; border: 0; }
  .mh-right .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
  .mh-right .btn-red { background: transparent; }
  .mh-right .btn-red:hover { background: rgba(255, 255, 255, .12); }
  .mh-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mh-ico { display: block; width: 24px; height: 24px; }
  .mh-right .btn .ico:not(.mh-ico) { width: 24px; height: 24px; }
  .mainnav { display: none; }
  .topicbar-inner { padding: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .topicbar-inner::-webkit-scrollbar { display: none; }
  .topic-label { padding-left: 16px; font-size: 14px; }
  .topicbar ul { flex-wrap: nowrap; padding-right: 16px; }
  .topicbar li { scroll-snap-align: start; }
  .topicbar a { padding: 10px 14px; font-size: 14px; }
  .drawer-panel { width: 100%; border-right: 0; }
  .drawer-nav { grid-template-columns: 1fr; padding: 4px 20px; }
  .drawer-search, .drawer-quote { margin-left: 20px; margin-right: 20px; }
  .drawer-foot { padding: 18px 20px 28px; grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; gap: 14px; padding-bottom: 16px; margin-bottom: 20px; }
  .hero-media { order: -1; margin: 0 calc(var(--gutter) * -1); }
  .hero-media img { aspect-ratio: 16 / 6; }
  .hero-title { font-size: 34px; }
  .hero-lead { font-size: 16px; }
  .sec-title { font-size: 23px; padding-left: 16px; }
  .sec-title::before { width: 5px; }
  .side-title { font-size: 20px; }
  .ratebox { grid-template-columns: 1fr; }
  .ratebox > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .ratebox > :last-child { grid-column: auto; }
  .rate-big { font-size: 46px; }
  .grid-2, .grid-3, .grid-4, .grid-5, .steps, .steps-4, .how-steps, .compare-2, .related-guides { grid-template-columns: 1fr; }
  .step + .step::before { display: none; }
  .divided > * + * { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .stories, .stories-5 { grid-template-columns: 1fr; row-gap: 24px; }
  .stories > .story, .stories-5 > .story { padding: 0 !important; border-left: 0 !important; }
  .stories > .story + .story { border-top: 1px solid var(--line); padding-top: 20px !important; }
  .story-title { font-size: 22px; }
  .banner { grid-template-columns: 1fr; min-height: 0; }
  .banner-media { height: 84px; order: -1; }
  .banner-media::before { background: linear-gradient(0deg, var(--ink), rgba(5, 5, 5, 0) 60%); }
  .banner-title { font-size: 26px; padding: 6px 16px 16px; }
  .banner-title::before { left: 16px; top: -4px; }
  .thread-h1 { font-size: 27px; padding-left: 16px; }
  .reply { padding: 14px; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .reply.is-child { margin-left: 22px; }
  .reply.is-child::before { left: -16px; width: 10px; }
  .post { padding: 14px; }
  .thread-item { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .avatar { width: 40px; height: 40px; font-size: 16px; }
  .form-actions { grid-template-columns: 1fr; }
  .searchbar { grid-template-columns: 1fr; }
  .searchbar .btn { min-height: 52px; }
  .searchbar .input-icon .input { min-height: 54px; font-size: 19px; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters label { justify-content: space-between; }
  .filters .select { flex: 1; min-width: 0; }
  .type-tabs a { font-size: 15px; }
  .result { grid-template-columns: 1fr; gap: 8px; }
  .result-media { flex-direction: row; justify-content: flex-start; }
  .result-media img { width: 96px; }
  .conv-row { grid-template-columns: 1fr 48px; }
  .conv-row label { grid-column: 1 / -1; }
  .calc-inline { grid-template-columns: 1fr; }
  .calc-inline .op { padding: 0; text-align: center; }
  .toc ol { grid-template-columns: 1fr; }
  .prose h2 { font-size: 23px; padding-left: 16px; }
  .glossary { grid-template-columns: 1fr; }
  .glossary dt { border-bottom: 0; }
  .rule-row { grid-template-columns: 40px minmax(0, 1fr); }
  .rule-ico { display: none; }
  .vol-row { grid-template-columns: 100px minmax(0, 1fr) 72px; gap: 8px; font-size: 13px; }
  .tool-tabs a { font-size: 17px; min-height: 48px; }
  .tabs-auth button { font-size: 18px; }
  .auth-panel { padding: 18px; }
  .cal-date output { font-size: 18px; min-width: 0; }
  .cal-filter-row label { width: 100%; justify-content: space-between; }
  .cal-filter-row .select { flex: 1; min-width: 0; }
  .mail-address { font-size: 21px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px var(--gutter) 24px; }
  .footer-links a { padding: 10px 14px; }
  .footer-links li:first-child a { padding-left: 0; }
  .info-table th { width: 38%; }
}

@media (max-width: 380px) {
  .wordmark { font-size: 20px; }
  .hero-title { font-size: 30px; }
  .rate-big { font-size: 40px; }
  .rank-item { grid-template-columns: 28px 24px 44px minmax(0, 1fr) 62px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .drawer, .post-actions, .composer { display: none !important; }
}

/* strength guides */
.layout > .prose, .layout > .side { min-width: 0; }
.ex-card { border: 1px solid var(--line); background: #fff; padding: 18px 20px; margin: 0 0 18px; }
.prose .ex-title { display: flex; gap: 12px; align-items: center; border-bottom: 0; padding-bottom: 0; margin: 0 0 12px; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ex-grid .tbl { font-size: 14px; }
.ex-pair { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); padding: 14px; text-align: center; }
.ex-pair > div { flex: 1; }
.ex-pair .ex-code { display: block; font-weight: 900; font-family: var(--serif); font-size: 22px; }
.ex-pair .ico { width: 26px; height: 26px; color: #777; flex: none; }
.prose pre { background: #1d1d1f; color: #f3f3f3; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; margin: 0 0 1.2em; }
.prose pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.prose :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface); border: 1px solid var(--line-soft); padding: 0 4px; }
.prose .how-steps { margin: 0 0 1.4em; }
.tbl-sg { min-width: 680px; }
.tbl-sg thead th { white-space: normal; }
.tbl-sg th, .tbl-sg td { min-width: 6em; }
.app-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center; margin: 0 0 28px; }
@media (max-width: 767px) {
  .ex-grid, .app-hero { grid-template-columns: 1fr; }
  .ex-card { padding: 14px; }
}

/* yen guides */
.learn-strip { display: grid; grid-template-columns: 150px minmax(0, 1fr); border: 1px solid var(--line); background: #fff; margin: 0 0 26px; }
.learn-strip-title { margin: 0; background: var(--red); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; padding: 10px 14px; }
.learn-strip ul { list-style: none; margin: 0; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; }
.learn-strip li { display: flex; gap: 6px; align-items: center; font-size: 13px; line-height: 1.4; }
.learn-strip li .ico { color: var(--red); width: 22px; height: 22px; flex: none; }
.calc-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 14px; margin: 0 0 1.2em; }
.calc-card { border: 1px solid var(--line); background: #fff; }
.calc-card-head { margin: 0; padding: 8px 12px; font-weight: 700; color: #fff; background: var(--blue); }
.calc-card.is-red .calc-card-head { background: var(--red); }
.calc-card.is-diff { background: var(--red-tint); border-color: var(--red-tint-2); }
.calc-card.is-diff .calc-card-head { background: transparent; color: var(--red-dark); padding-bottom: 0; }
.calc-card-body { padding: 10px 12px; }
.calc-card-body p { margin: 0 0 6px; font-size: 14px; }
.calc-card-body p:last-child { margin-bottom: 0; }
.calc-big { font-family: var(--serif); font-weight: 900; font-size: 26px; line-height: 1.2; }
.calc-card.is-red .calc-big, .calc-card.is-diff .calc-big { color: var(--red-dark); }
.calc-card.is-blue .calc-big { color: var(--blue); }
.method-card { border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.method-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.method-card-body { padding: 14px 16px; }
.prose .method-card h3 { border-bottom: 0; margin: 0 0 6px; color: var(--red-dark); font-size: 20px; }
.method-card-body p { font-size: 15px; margin: 0 0 8px; }
.method-card-body .dotlist { margin: 0 0 8px; font-size: 14px; }
.method-card-body .pill { margin-top: 4px; }
.case-grid { gap: 14px; margin: 0 0 1.4em; }
.check-panel { margin: 0 0 1.2em; }
.case-grid .feature-card { padding: 14px; }
.prose .case-grid .feature-card h3 { font-size: 18px; border-bottom: 0; padding-bottom: 0; margin: 0 0 8px; }
.case-grid .feature-card h3 .ico { width: 22px; height: 22px; }
.case-grid .dotlist { font-size: 14px; margin: 0 0 8px; }
.case-grid .dotlist li { white-space: nowrap; }
@media (max-width: 767px) {
  .learn-strip { grid-template-columns: 1fr; }
  .learn-strip ul { grid-template-columns: 1fr; }
  .calc-compare { grid-template-columns: 1fr; }
}

/* outlook pages */
.outlook-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin: 0 0 24px; align-items: start; }
.about-box { display: flex; gap: 12px; border: 1px solid var(--line); background: var(--surface-2); padding: 16px 18px; box-shadow: var(--shadow); }
.about-box > .ico { width: 34px; height: 34px; color: var(--red); flex: none; }
.about-box p { font-size: 14px; margin: 0 0 6px; }
.about-box p:last-child { margin-bottom: 0; }
.about-box .about-box-title { font-family: var(--serif); font-weight: 900; font-size: 18px; margin-bottom: 4px; }
.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 1.4em; }
.scenarios .scenario-head { flex-wrap: wrap; gap: 4px 10px; padding: 10px 14px; }
.prose .scenario-head h3 { margin: 0; padding: 0; border: 0; font-size: 24px; white-space: nowrap; }
.scenarios .scenario-head .ico { width: 24px; height: 24px; }
.scenario-body ul { margin: 0; }
.scenario-body li { font-size: 14px; }
.factor-list { list-style: none; border: 1px solid var(--line); margin: 0 0 1.4em; padding: 0; background: #fff; }
.factor-list li { display: grid; grid-template-columns: 32px 150px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.factor-list li:last-child { border-bottom: 0; }
.factor-list .ico { width: 28px; height: 28px; color: var(--red); }
.factor-name { font-family: var(--serif); font-weight: 900; font-size: 17px; }
.factor-list p { margin: 0; font-size: 14px; }
.prose .stories { margin: 0 0 1.4em; }
.prose .story-title { font-size: 20px; margin: 0 0 6px; padding: 0; border: 0; }
.prose .story a { border-bottom: 0; }
.prose .link-card { border-bottom: 1px solid var(--line); font-weight: 400; }
.prose .link-card strong { background: none; }
.prose .link-card:hover { border-color: var(--red); }
.prose .story-text { font-size: 14px; }
.link-stack { display: grid; gap: 10px; margin: 0 0 1.4em; }
@media (max-width: 767px) {
  .outlook-head, .scenarios { grid-template-columns: 1fr; }
  .factor-list li { grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; }
  .factor-list li p { grid-column: 2; }
}

/* ------------------------------------------------------------------ Forum, account & utility views */
.layout-2col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 40px; }
.col-side { border-left: 1px solid var(--line); padding-left: 28px; display: grid; gap: 26px; }
.side-box { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.side-box:last-child { border-bottom: 0; }
.side-box p { font-size: 15px; }
.side-warn { background: var(--red-tint); border: 1px solid var(--red-tint-2); padding: 18px; }
.side-soft { background: var(--surface); padding: 18px; border: 0; }
.num-list { list-style: none; counter-reset: n; margin: 0 0 12px; }
.num-list > li { counter-increment: n; position: relative; padding: 6px 0 6px 38px; font-size: 15px; }
.num-list > li::before { content: counter(n); position: absolute; left: 0; top: 7px; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.cal-mini { list-style: none; margin-bottom: 10px; }
.cal-mini li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.cal-mini-date { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.2; }
.cal-mini-date small { display: block; font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--muted); }
.ctry { display: inline-block; font-size: 12px; border: 1px solid var(--line); padding: 0 6px; margin-right: 6px; }
.mini-conv { display: block; background: var(--surface); border: 1px solid var(--line-soft); padding: 14px; text-align: center; color: var(--ink); margin-bottom: 10px; }
.mini-conv:hover { color: var(--ink); border-color: var(--red); }
.mini-conv-eq { display: block; font-family: var(--serif); font-size: 22px; color: var(--red-dark); }
.mini-conv-eq b { font-size: 30px; }
.mini-conv-note { display: block; font-size: 13px; color: var(--muted); }
.quote-box .qb-pair { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 4px; }
.side-box .qb-rate { font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1.1; margin: 0 0 8px; }
.qb-rate small { font-size: 18px; }
.qb-dl { margin: 0 0 8px; }
.qb-dl div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.qb-dl dd { margin: 0; font-weight: 700; }
.qb-note { font-size: 12px; color: var(--muted); }
.list-count { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.post-list { list-style: none; }
.pager-cur { background: var(--red); border-color: var(--red) !important; color: #fff !important; font-weight: 700; }
.seg .is-on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.empty-ico { width: 40px; height: 40px; color: #888; display: block; margin: 0 auto 10px; }
.empty-title { font-family: var(--serif); font-weight: 700; font-size: 20px; margin: 0 0 6px !important; }
.empty-sm { padding: 22px 16px; }
.empty-line { color: var(--muted); font-size: 15px; padding: 10px 0; }

/* Thread view (h1 inside the thread header) */
.thread-head { margin: 4px 0 18px; }
.thread-head .thread-title { font-family: var(--serif); font-size: 36px; font-weight: 900; position: relative; padding-left: 20px; margin: 0; line-height: 1.35; }
.thread-head .thread-title::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 6px; background: var(--red); }
.thread-tags { margin: 12px 0 0; display: flex; gap: 8px; }
.tag-question { border-color: var(--red); color: var(--red-dark); }
.tag-market { border-color: #2f855a; color: #22543d; background: #f0faf4; }
.tag-beginner { border-color: #b7791f; color: #7b4f12; background: #fffaf0; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: #444; margin: 12px 0 0; }
.thread-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.thread-meta .ico { width: 16px; height: 16px; }
.op-post { background: #fdf3f5; border: 1px solid #f3d3da; padding: 20px; margin-bottom: 28px; }
.op-head, .reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.reply-head time { font-size: 13px; color: var(--muted); }
.badge-op { border: 1px solid var(--red); color: var(--red-dark); font-size: 12px; padding: 0 8px; border-radius: 2px; background: #fff; }
.avatar-lg { width: 56px; height: 56px; }
.reply-list .reply { display: block; }
.reply-gone { color: var(--muted); background: var(--surface); padding: 8px 12px; font-size: 14px; margin: 0; }
.act-static { cursor: default; }
.act-static:hover { background: transparent; }
.replies { margin-bottom: 30px; }
section.composer { display: block; border-bottom: 0; padding: 0; margin-bottom: 30px; }
.reply-target { display: flex; gap: 8px; align-items: center; background: var(--red-tint); padding: 6px 12px; font-size: 14px; }
.link-btn { border: 0; background: none; color: var(--red-dark); font-weight: 700; cursor: pointer; text-decoration: none; padding: 6px 4px; min-height: 32px; }
.side-links { list-style: none; margin-bottom: 10px; }
.side-links li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.side-links a { font-weight: 700; color: var(--ink); display: block; }
.side-links a:hover { color: var(--red); }
.side-sub { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.side-sub .ico { width: 14px; height: 14px; }

/* Generic forms (inputs inside .form get the field styling) */
.form { display: grid; gap: 18px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
.form fieldset[disabled] { opacity: .6; }
.card-form { border: 1px solid var(--line); padding: 24px; background: #fff; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="search"], .form textarea, .form select {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #b8b8b8; border-radius: 2px; background: #fff; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 160px; resize: vertical; line-height: 1.7; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(206, 0, 40, .25); }
.field label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; font-weight: 400; }
div.select { position: relative; padding: 0; border: 0; min-height: 0; background: none; }
div.select select { appearance: none; padding-right: 44px; cursor: pointer; }
div.select > .ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; width: 18px; height: 18px; }
.input-ico { position: relative; }
.input-ico > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #777; pointer-events: none; }
.input-ico input { padding-left: 42px !important; }
.field-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.text-link { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--red-dark); font-size: 15px; min-height: 32px; }
.text-link .ico { width: 15px; height: 15px; }
.btn-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }
.btn-lg { min-height: 54px; font-size: 18px; }
.btn-danger { background: #fff; color: #a3001f; border-color: #a3001f; }
.btn-danger:hover { background: #a3001f; color: #fff; }
.danger-zone { border: 1px solid #f2b8c1; background: #fff8f9; padding: 18px; margin-top: 24px; }
.preview { border: 1px dashed #999; background: var(--surface-2); padding: 16px 18px; }
.preview-label { font-size: 13px; font-weight: 700; color: var(--red-dark); margin: 0 0 6px; }
.preview-title { font-family: var(--serif); font-weight: 700; font-size: 20px; margin: 0 0 6px; }
.notice-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; border: 1px solid #f2b8c1; background: #fff6f7; padding: 20px 22px; margin-bottom: 28px; }
.notice-bar > div:first-of-type { flex: 1 1 320px; }
.notice-bar p { margin: 0; }
.notice-ico { width: 44px; height: 44px; color: var(--red); }
.notice-title { font-family: var(--serif); font-weight: 900; font-size: 22px; margin-bottom: 4px !important; }
.notice-actions { display: grid; gap: 6px; justify-items: center; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 40px; }
.page-title { font-size: 34px; font-weight: 900; margin: 6px 0 14px; }
.narrow { max-width: 760px; }
.report-form { border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.fine { font-size: 13px; color: var(--muted); }

/* Login / register */
.auth-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); padding: 0; margin-bottom: 30px; }
.auth-forms { padding: 26px; }
.auth-info { background: var(--surface-2); border-left: 1px solid var(--line); padding: 26px; }
.auth-info-title { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.auth-info-title .ico { color: var(--red); width: 32px; height: 32px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); margin-bottom: 22px; }
.tabs [role="tab"] { min-height: 54px; border: 0; background: var(--surface); font-family: var(--serif); font-size: 20px; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s; }
.tabs [role="tab"][aria-selected="true"] { background: var(--red); color: #fff; }
.feature-list { list-style: none; background: var(--red-tint); padding: 8px 18px; margin: 14px 0; }
.feature-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--red-tint-2); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list .ico { width: 28px; height: 28px; color: var(--red); }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; justify-content: center; padding: 16px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.trust-title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 19px; margin: 0; }
.trust-title .ico { width: 34px; height: 34px; color: var(--red); }

/* Account */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; margin-bottom: 40px; }
.profile-card { border: 1px solid var(--line); padding: 22px; text-align: center; background: var(--surface-2); }
.profile-card .avatar { margin: 0 auto 10px; }
.profile-name { font-family: var(--serif); font-weight: 900; font-size: 24px; margin: 0 0 4px; }
.profile-actions { display: grid; gap: 10px; margin-top: 16px; }
.block-list { list-style: none; }
.block-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }

/* Search */
.search-big { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 2px solid var(--red); padding: 6px 6px 6px 16px; margin-bottom: 22px; background: #fff; }
.search-big > .ico { width: 28px; height: 28px; color: var(--red); }
.search-big input { border: 0; min-height: 52px; font-size: 22px; width: 100%; background: transparent; }
.search-big input:focus { outline: none; }
.search-big:focus-within { box-shadow: 0 0 0 3px rgba(206, 0, 40, .25); }
.search-big .btn { min-height: 52px; padding: 0 32px; font-size: 18px; }
.tabs-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; max-width: 700px; }
.tabs-nav a { min-height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 18px; transition: background-color .2s, color .2s; }
.tabs-nav a:hover { border-color: var(--ink); color: var(--ink); }
.tabs-nav a[aria-current], .tabs-nav a.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-end; background: var(--surface); padding: 14px 18px; margin-bottom: 20px; }
.filter { display: grid; gap: 4px; font-weight: 700; font-size: 14px; min-width: 180px; }
.result-list { list-style: none; }
.result-list > li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.result-thumb { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; text-align: center; }
.result-thumb img { width: 130px; aspect-ratio: 3 / 2; object-fit: cover; }
.result-title { font-family: var(--sans); font-size: 19px; font-weight: 700; margin: 4px 0; line-height: 1.5; }
.result-title a { color: var(--ink); }
.result-title a:hover { color: var(--red); }
.result-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 4px; }
.result-text { font-size: 15px; color: #333; margin: 0 0 6px; }
.tag-type { display: inline-block; border: 1px solid var(--red); color: var(--red-dark); font-size: 12px; padding: 0 8px; margin-right: 8px; vertical-align: 2px; font-weight: 700; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 2px 14px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fff; font-size: 14px; }
.chip:hover { border-color: var(--red); color: var(--red); }
.check-list { list-style: none; }
.check-list li { position: relative; padding: 5px 0 5px 28px; font-size: 14px; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 12px; height: 6px; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); }
.cta-strip { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; background: var(--surface); padding: 22px 24px; margin: 26px 0; }
.cta-title { font-family: var(--serif); font-weight: 900; font-size: 22px; margin: 0 0 4px; }

/* Admin */
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-row > * { border: 1px solid var(--line); padding: 14px; text-align: center; }
.mod-card { border: 1px solid var(--line); padding: 16px; margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line-soft); padding: 8px; text-align: left; }

/* 404 */
.notfound { margin-bottom: 30px; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* Learn-more banner (wrapping variant) */
.learn .banner { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 10px auto 28px; display: block; padding: 0; background: none; }
.banner-inner { display: grid; grid-template-columns: minmax(0, 1fr) 536px; background: var(--ink); min-height: 104px; overflow: hidden; margin: 0 var(--gutter); }

@media (max-width: 1023px) {
  .layout-2col, .account-grid { grid-template-columns: 1fr; }
  .col-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .auth-panel { grid-template-columns: 1fr; }
  .auth-info { border-left: 0; border-top: 1px solid var(--line); }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .thread-head .thread-title { font-size: 26px; padding-left: 16px; }
  .op-post { padding: 14px; }
  .story-grid, .link-grid { grid-template-columns: 1fr; }
  .btn-row { grid-template-columns: 1fr; }
  .card-form, .auth-forms, .auth-info { padding: 16px; }
  .search-big { grid-template-columns: auto minmax(0, 1fr); }
  .search-big .btn { grid-column: 1 / -1; }
  .search-big input { font-size: 19px; }
  .tabs-nav a { font-size: 15px; }
  .result-list > li { grid-template-columns: 1fr; gap: 6px; }
  .result-thumb { flex-direction: row; }
  .result-thumb img { width: 96px; }
  .filter { min-width: 0; width: 100%; }
  .banner-inner { grid-template-columns: 1fr; margin: 0; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-title { font-size: 27px; }
  .notice-actions { justify-items: stretch; width: 100%; }
}

/* fx basics guides */
.pair-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pair-cell .flag { width: 22px; height: 22px; }
.glossary dd p { margin: 0; }
.glossary dd .see { display: block; margin-top: 4px; font-size: 14px; }
.guide-search { margin: 0 0 14px; background: #fff; border-color: var(--line); }
.guide-search input { color: var(--ink); }
.guide-search input::placeholder { color: #777; }
.guide-search .ico { color: #777; }
.guide-search:focus-within { border-color: var(--ink); }

/* macro guides */
.tbl-wide { min-width: 600px; }

/* Grid children may shrink below their content width (prevents page-level overflow on phones). */
.layout > *, .layout-2col > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-5 > *, .stories > *, .stack > *, .account-grid > *, .auth-panel > * { min-width: 0; }
.info-table { table-layout: fixed; }
@media (max-width: 767px) {
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: 0; padding-bottom: 4px; }
}

/* ------------------------------------------------------------------ Vertical rhythm (more air between sections) */
main .wrap > * + *:not(.source-note):not(.alert):not(.article-meta):not(.hero) { margin-top: 64px; }
main .wrap > .source-note { margin-bottom: 0; }
.section { margin-bottom: 64px; }
.stack > * + * { margin-top: 56px; }
.hero { padding-bottom: 32px; margin-bottom: 44px; }
.crumbs { padding: 18px 0 12px; }
.banner, .learn .banner { margin-top: 72px; margin-bottom: 36px; }
.stories, .story-grid { margin-bottom: 8px; }
.sec-title { margin-bottom: 22px; }
.sec-head { margin-bottom: 22px; }
.sec-lead { margin: -8px 0 24px; }
.prose h2 { margin: 60px 0 18px; }
.prose h3 { margin: 34px 0 12px; }
.prose > div > p, .prose p { margin-bottom: 1.15em; }
.prose .table-wrap, .prose .callout, .prose .compare-2, .prose figure, .prose .grid-3, .prose .grid-2 { margin-top: 24px; margin-bottom: 28px; }
.intro { margin-bottom: 36px; }
.toc { margin-bottom: 44px; }
.faq { margin-top: 8px; }
.faq-item { margin-bottom: 12px; }
.layout, .layout-2col { margin-bottom: 64px; }
.side-block, .side-box { padding-bottom: 30px; margin-bottom: 30px; }
.col-side { gap: 32px; }
.ratebox { margin-bottom: 18px; }
.sources { margin-top: 56px; padding-top: 12px; }
.article-meta { margin-bottom: 36px; }
.cta-band, .cta-strip { margin-top: 64px; }
.steps, .how-steps { margin-top: 8px; }
.site-footer { margin-top: 88px; }
@media (max-width: 767px) {
  main .wrap > * + *:not(.source-note):not(.alert):not(.article-meta):not(.hero) { margin-top: 44px; }
  .section, .layout, .layout-2col { margin-bottom: 44px; }
  .stack > * + * { margin-top: 40px; }
  .hero { padding-bottom: 22px; margin-bottom: 30px; }
  .banner, .learn .banner { margin-top: 48px; margin-bottom: 26px; }
  .prose h2 { margin-top: 44px; }
  .stories > .story + .story { margin-top: 12px; padding-top: 24px !important; }
  .site-footer { margin-top: 60px; }
}

/* ------------------------------------------------------------------ Footer extras, cookie consent, back-to-top */
.footer-btn { border: 0; background: none; color: #fff; font-size: 14px; padding: 10px 22px; cursor: pointer; font-family: inherit; min-height: 44px; }
.footer-btn:hover { color: #ff8da2; }
.footer-links { row-gap: 0; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 55; max-width: 1100px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--red); box-shadow: 0 10px 40px rgba(0, 0, 0, .22); }
.consent[hidden], .consent-modal[hidden], .to-top[hidden] { display: none; }
.consent-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 26px; align-items: center; padding: 18px 22px; }
.consent-title { font-size: 19px; margin-bottom: 4px; }
.consent-text p { margin: 0; font-size: 14px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.consent-scrim { position: absolute; inset: 0; background: rgba(5, 5, 5, .6); }
.consent-panel { position: relative; background: #fff; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; border-top: 5px solid var(--red); }
.consent-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.consent-panel-head h2 { font-size: 24px; }
.consent-x { color: var(--ink); }
.consent-x:hover { background: var(--surface); color: var(--ink); }
.consent-cats { border: 0; padding: 0; margin: 0 0 12px; }
.consent-cat { border-top: 1px solid var(--line-soft); padding: 12px 0 4px; }
.consent-cat p { margin: 4px 0 6px 52px; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; min-height: 40px; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: #c4c4c4; position: relative; cursor: pointer; flex: none; transition: background-color .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--red); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:disabled { opacity: .55; cursor: not-allowed; }
.consent-saved { color: #14532d; font-weight: 700; min-height: 1.4em; }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; background: var(--red); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: background-color .2s, transform .2s; }
.to-top:hover { background: var(--red-dark); transform: translateY(-2px); }
.to-top-ico { transform: rotate(180deg); width: 24px; height: 24px; }
.policy-toc { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; padding: 16px 20px; background: var(--surface); margin: 0 0 32px; }
.policy h3 { font-size: 19px; margin: 26px 0 8px; }
.policy .tbl { margin: 0 0 1.2em; }
.pending-note { border: 2px dashed #b7791f; background: #fffaf0; padding: 12px 16px; font-size: 14px; color: #5f3d0c; }
.price-note { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--red-tint-2); background: var(--red-tint); padding: 18px 20px; margin: 0 0 28px; }
.price-note .ico { width: 28px; height: 28px; color: var(--red); margin-top: 2px; }
@media (max-width: 767px) {
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .consent-inner { grid-template-columns: 1fr; padding: 14px 16px; }
  .consent-actions .btn { flex: 1 1 140px; }
  .consent-cat p { margin-left: 0; }
  .to-top { right: 12px; bottom: 12px; width: 48px; height: 48px; }
  .policy-toc { grid-template-columns: 1fr; }
  .footer-btn { padding: 10px 14px; }
}
@media print { .consent, .consent-modal, .to-top { display: none !important; } }

/* ------------------------------------------------------------------ Logo (supplied artwork, 533×96 intrinsic) */
.logo-link { display: inline-flex; align-items: center; line-height: 0; }
.logo-link picture { display: block; line-height: 0; }
.site-logo { display: block; width: auto; max-width: 100%; aspect-ratio: 533 / 96; }
.site-logo-header { height: 46px; }
.site-logo-drawer { height: 32px; }
.site-logo-footer { height: 30px; }
@media (max-width: 767px) {
  .site-logo-header { height: 32px; }
  .masthead .logo-link { justify-self: center; min-width: 0; }
}
@media (max-width: 380px) {
  .site-logo-header { height: 27px; }
}

/* Financial chart and screener displays; isolated third-party frames. */
.market-display { margin: 24px 0; min-width: 0; }
.market-frame { display: block; width: 100%; height: 560px; border: 1px solid #dedede; background: #fff; }
.market-frame-tall { height: 680px; }
@media (max-width: 600px) { .market-frame { height: 480px; } .market-frame-tall { height: 620px; } }
.ohlc-tool { padding: 20px; border: 1px solid #ddd; background: #faf9f6; margin: 24px 0; }
.ohlc-tool input { max-width: 100%; margin: 12px 0; }
.ohlc-tool button { margin: 6px 8px 6px 0; }
.ohlc-up { fill: #b83535; stroke: #b83535; }
.ohlc-down { fill: #315c80; stroke: #315c80; }
.ohlc-grid { stroke: #ddd; }
.ohlc-axis { font-family: sans-serif; font-size: 12px; fill: #555; }

.ohlc-ma20{stroke:#176e9d;stroke-width:2}.ohlc-ma200{stroke:#88549a;stroke-width:2}
#ohlc-chart { overflow-x: auto; }
#ohlc-chart svg { min-width: 800px; }
#ohlc-chart .ohlc-axis { font-size: 18px; }
