/* USDLKR — public site. Tokens and shared components come from base.css */

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--gold); color: #2a1d00;
  padding: 0.6rem 1rem; border-radius: var(--r-field); font-family: var(--font-display); font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

/* --- Header --------------------------------------------------------------- */
.site-header { position: relative; z-index: 30; padding: 1rem 0; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); flex: none; }
.brand img { border-radius: 11px; box-shadow: var(--raise-sm); }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.65rem; letter-spacing: -0.035em; line-height: 1; }
.brand-word b { font-weight: 800; color: var(--teal); }
.brand-light { color: #fff; }
.brand-light .brand-word b { color: var(--gold); }
.brand-light img { box-shadow: none; }

.site-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.site-nav > ul { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a {
  display: block; padding: 0.6rem 0.9rem; border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.98rem; color: var(--ink); text-decoration: none;
}
.site-nav > ul > li > a:hover { background: var(--surface); box-shadow: var(--raise-sm); }
.site-nav > ul > li > a[aria-current] { background: var(--paper); box-shadow: var(--press); color: var(--teal-deep); }

.has-menu > a { padding-right: 1.9rem !important; }
.sub-toggle {
  position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%);
  width: 1.5rem; height: 1.5rem; border: 0; background: none; cursor: pointer; padding: 0;
}
.sub-toggle::before {
  content: ""; display: block; width: 7px; height: 7px; margin: 0 auto 3px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg);
}
.sub-menu {
  display: none; position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%);
  width: 520px; max-width: 92vw; margin: 0; padding: 0.75rem; list-style: none;
  grid-template-columns: repeat(3, 1fr); gap: 0.15rem;
  background: var(--surface-hi); border-radius: var(--r-card); box-shadow: 0 18px 40px rgba(16, 38, 46, 0.2);
}
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -0.6rem; height: 0.6rem; }
.has-menu:hover .sub-menu, .has-menu:focus-within .sub-menu, .has-menu.is-open .sub-menu { display: grid; }
.sub-menu a {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 10px;
  font-weight: 600; font-size: 0.92rem; color: var(--ink); text-decoration: none;
}
.sub-menu a:hover { background: var(--teal-tint); }
.sub-rate { margin-left: auto; font-weight: 500; color: var(--ink-soft); font-size: 0.86rem; }

.nav-search { display: flex; align-items: center; background: var(--paper); border-radius: var(--r-pill); box-shadow: var(--press); padding-right: 0.3rem; }
.nav-search input { width: 9.5rem; background: none; box-shadow: none; padding: 0.55rem 0.4rem 0.55rem 1rem; font-size: 0.95rem; border: 0; }
.nav-search input:focus { border: 0; }
.nav-search:focus-within { outline: 2px solid var(--teal); }
.nav-search button { border: 0; background: none; color: var(--teal-deep); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }

.nav-toggle { display: none; }

.admin-bar { background: var(--warn-bg); color: #5b3f00; text-align: center; font-size: 0.88rem; padding: 0.45rem 1rem; }
.admin-bar a { color: inherit; font-weight: 700; }

.app-prompt {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap;
  background: var(--teal-deep); color: #fff; padding: 0.6rem 2.8rem 0.6rem 1rem; font-size: 0.92rem; position: relative;
}
.app-prompt[hidden] { display: none; }
.app-prompt img { border-radius: 9px; }
.app-prompt-close { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; width: 2rem; height: 2rem; cursor: pointer; }

/* --- Ads ------------------------------------------------------------------ */
.ad { margin: 1.25rem auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-sidebar { margin-top: 0; }
.ad.is-test {
  background: #ffe500; color: #3b3300; border: 2px dashed #8a7b00; border-radius: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  display: grid; place-items: center; width: 728px; height: 90px;
}
.ad-sidebar.is-test { width: 300px; height: 250px; }

/* --- Page scaffolding ----------------------------------------------------- */
.page-top { padding-top: 0.5rem; padding-bottom: 3rem; }
.narrow-page { max-width: 820px; }
.page-head { margin: 1rem 0 1.5rem; }
.page-head h1 { margin-bottom: 0.4rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; margin: 0; }
.crumbs { font-size: 0.88rem; color: var(--ink-soft); margin: 0.25rem 0 1rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs span[aria-hidden] { margin: 0 0.3rem; opacity: 0.6; }

.section { margin-top: 2.75rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.more-link { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; align-items: start; }
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 2rem; align-items: start; margin-top: 1.75rem; }
.main-col > * + * { margin-top: 1.75rem; }
.sidebar > * + * { margin-top: 1.5rem; }
.sidebar { position: sticky; top: 1rem; }

/* --- The rate plate ------------------------------------------------------- */
.plate {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--teal-deep); color: #fff;
  border-radius: var(--r-plate);
  box-shadow: 10px 12px 28px rgba(7, 63, 71, 0.32), -6px -6px 16px rgba(255, 255, 255, 0.8);
  padding: clamp(1.4rem, 1rem + 2.4vw, 2.75rem);
}
.guilloche { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; stroke: #1b7480; opacity: 0.55; }
.guilloche path:nth-child(4n) { stroke: var(--gold); opacity: 0.42; }

.plate-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: center; }
.plate h1 { font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.4rem); font-weight: 600; color: #cfe3e4; letter-spacing: 0; margin: 0; }

.plate-rate { display: flex; align-items: baseline; gap: 0.12em; margin: 0.15em 0 0; line-height: 0.95;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em;
  font-size: clamp(3.6rem, 1.6rem + 10.5vw, 9rem); color: #fff; }
.plate-rs { font-size: 0.36em; font-weight: 700; letter-spacing: -0.02em; color: var(--gold); margin-right: 0.12em; align-self: flex-start; margin-top: 0.5em; }
.plate-sub { font-family: var(--font-display); font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem); font-weight: 500; margin: 0.5rem 0 0; display: flex; align-items: center; gap: 0.5rem; }
.plate-sub .flag { border-radius: 4px; }
.plate-meta { font-family: var(--font-display); font-size: 0.98rem; margin: 0.9rem 0 0; color: #cfe3e4; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; }
.plate-meta .chg { background: rgba(255, 255, 255, 0.94); padding: 0.28rem 0.75rem; border-radius: var(--r-pill); }

.plate-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; margin: clamp(1.25rem, 3vw, 2.25rem) 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.plate-stats div { min-width: 0; }
.plate-stats dt { font-family: var(--font-display); font-size: 0.86rem; color: #a9cbcd; }
.plate-stats dd { margin: 0.1rem 0 0; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem); font-weight: 700; }

/* --- Converter (sits on the plate) ---------------------------------------- */
.converter { background: var(--surface); color: var(--ink); border-radius: var(--r-card); padding: 1.35rem; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.converter h2 { font-size: 1.15rem; margin-bottom: 0.8rem; }
.converter label { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.25rem; }
.conv-amount input { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0.55rem 0.9rem; }
.conv-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.5rem; align-items: end; margin-top: 0.8rem; }
.conv-pair select { padding: 0.65rem 0.6rem; font-weight: 600; text-overflow: ellipsis; }
.conv-swap { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--surface); color: var(--teal-deep); box-shadow: var(--raise-sm); cursor: pointer; display: grid; place-items: center; }
.conv-swap:active { box-shadow: var(--press); }
.conv-result { display: block; margin-top: 1rem; padding: 0.9rem 1rem; background: var(--teal-tint); border-radius: var(--r-field); font-family: var(--font-display); }
.conv-from-text { display: block; font-size: 0.9rem; color: var(--teal-deep); }
.conv-result strong { display: block; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; letter-spacing: -0.02em; color: var(--teal-deep); line-height: 1.2; overflow-wrap: anywhere; }

.home-intro { text-align: center; max-width: 68ch; margin: 2rem auto 0; font-size: 1.12rem; color: var(--ink-soft); }

/* --- Chart ---------------------------------------------------------------- */
.chart-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 2rem; align-items: start; }
.main-col .chart-layout { grid-template-columns: 1fr; margin-top: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.chart-head h2 { margin: 0; }
.range-tabs { display: inline-flex; background: var(--paper); border-radius: var(--r-pill); box-shadow: var(--press); padding: 4px; }
.range-tabs button { border: 0; background: none; cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); padding: 0.4rem 0.85rem; border-radius: var(--r-pill); }
.range-tabs button.is-active { background: var(--surface-hi); color: var(--teal-deep); box-shadow: var(--raise-sm); }
.chart-canvas { position: relative; height: 320px; touch-action: pan-y; }
.chart-canvas svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-canvas svg text { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.chart-note { margin: 0.6rem 0 0; }
.chart-tip {
  position: absolute; top: 0; left: 0; pointer-events: none; white-space: nowrap; z-index: 2;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 0.4rem 0.7rem;
  font-family: var(--font-display); font-size: 0.85rem; line-height: 1.3; opacity: 0; transition: opacity 0.1s ease;
}
.chart-tip strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.chart-tip.is-on { opacity: 1; }

.mini-table { width: 100%; border-collapse: collapse; font-family: var(--font-display); font-size: 0.96rem; }
.mini-table th, .mini-table td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); text-align: left; }
.mini-table thead th { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); border-bottom-width: 2px; }
.mini-table tbody tr:last-child > * { border-bottom: 0; }
.mini-table .r { text-align: right; }
.mini-table th[scope="row"] { font-weight: 400; }
.mini-table a { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 0.55rem; }
.mini-table a:hover strong { text-decoration: underline; }
.table-scroll { overflow-x: auto; }
.rates-table td, .rates-table th { padding-top: 0.7rem; padding-bottom: 0.7rem; white-space: nowrap; }
.forecast-card h2 { font-size: 1.2rem; }
.forecast-card p { margin: 0.9rem 0 0; }
.tables .card h2 { font-size: 1.2rem; }

/* --- Rates board ---------------------------------------------------------- */
.board {
  list-style: none; margin: 0; padding: 0.5rem; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--raise);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem;
}
.board li { border-bottom: 1px solid var(--line); }
.board a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 5.2rem; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.75rem; border-radius: 12px; text-decoration: none; color: var(--ink); font-family: var(--font-display);
}
.board a:hover { background: var(--teal-tint); }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-name strong { font-weight: 700; margin-right: 0.3rem; }
.board-name span { color: var(--ink-soft); font-size: 0.93rem; }
.board-rate { font-weight: 700; font-size: 1.08rem; }
.board-chg { text-align: right; font-size: 0.88rem; }
.flag { flex: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(16, 38, 46, 0.12); display: inline-block; }
.flag-code { width: 32px; height: 24px; display: inline-grid; place-items: center; background: var(--teal-tint); color: var(--teal-deep); font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; }

.board-single, .widget .board { grid-template-columns: 1fr; }
.widget .board { padding: 0; box-shadow: none; background: none; }
.widget .board a { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0.55rem 0.25rem; gap: 0.6rem; }
.widget .board .board-chg { display: none; }
.widget .board-name span { display: none; }
.widget .board li:last-child { border-bottom: 0; }

/* --- News ----------------------------------------------------------------- */
.news-list { list-style: none; margin: 0; padding: 0.4rem 1.4rem; }
.news-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-list a { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.35; color: var(--ink); text-decoration: none; display: block; }
.news-list a:hover { color: var(--teal); text-decoration: underline; }
.news-meta { font-family: var(--font-display); font-size: 0.84rem; color: var(--ink-soft); }
.widget .news-list { padding: 0; }
.widget .news-list a { font-size: 0.95rem; }
.news-day { margin-top: 2rem; }
.news-day h2 { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 0.7rem; }

/* --- Posts ---------------------------------------------------------------- */
.post-rows { display: grid; gap: 1rem; }
.post-row { display: flex; gap: 1rem; align-items: center; padding: 0.8rem; text-decoration: none; color: var(--ink); }
.post-row img { width: 132px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }
.post-row > span { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.post-row strong { font-family: var(--font-display); font-size: 1.04rem; line-height: 1.3; font-weight: 600; }
.post-row:hover strong { color: var(--teal); }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.post-card { padding: 0; overflow: hidden; }
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.post-card img, .post-card-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--teal-tint); }
.post-card-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.post-card h2 { font-size: 1.15rem; line-height: 1.28; font-weight: 600; margin: 0; }
.post-card-link:hover h2 { color: var(--teal); }
.post-card-excerpt { font-size: 0.96rem; line-height: 1.5; color: var(--ink-soft); }
.post-card time { margin-top: auto; font-family: var(--font-display); }

/* Featured posts: a gold frame and a label (the label carries the meaning, the colour supports it) */
.is-featured { box-shadow: 0 0 0 2px var(--gold), var(--raise); }
.tag-featured {
  align-self: flex-start; font-family: var(--font-display); font-size: 0.76rem; font-weight: 700;
  background: var(--gold); color: #2a1d00; border-radius: var(--r-pill); padding: 0.12rem 0.6rem;
}

/* --- Article -------------------------------------------------------------- */
.article-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); margin-bottom: 0.5rem; }
.article-head p { margin: 0; font-size: 0.95rem; }
.article-image { width: 100%; border-radius: var(--r-card); box-shadow: var(--raise); aspect-ratio: 16 / 9; object-fit: cover; }

.prose { max-width: 70ch; font-size: 1.12rem; line-height: 1.72; }
.prose h2 { margin-top: 1.8em; }
.prose h3, .prose h4 { margin-top: 1.5em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 4px solid var(--gold); color: var(--ink-soft); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-display); font-size: 0.95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 0.5rem; text-align: left; }
.home-text { margin: 3.5rem auto 0; }
.main-col .prose { margin-top: 2.25rem; }
.legal { max-width: none; padding: clamp(1.25rem, 4vw, 2.75rem); font-size: 1.05rem; }
.legal h1 { margin-bottom: 0.2rem; }
.legal h2 { font-size: 1.3rem; }
.legal h3 { font-size: 1.08rem; }

.rate-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; text-decoration: none;
  background: var(--teal-deep); color: #fff; border-radius: var(--r-card); padding: 1rem 1.4rem; font-family: var(--font-display);
  box-shadow: var(--raise); margin-top: 2rem;
}
.rate-strip:hover { color: #fff; }
.rate-strip strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.rate-strip .chg { background: rgba(255, 255, 255, 0.94); padding: 0.15rem 0.6rem; border-radius: var(--r-pill); font-size: 0.85rem; }
.rate-strip-cta { margin-left: auto; text-decoration: underline; text-underline-offset: 0.2em; color: var(--gold); font-weight: 600; }

/* --- Sidebar widgets ------------------------------------------------------ */
.widget { padding: 1.25rem; }
.widget h2 { font-size: 1.08rem; margin-bottom: 0.6rem; }
.widget .more-link { display: inline-block; margin-top: 0.7rem; }
.similar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 0.8rem; }
.similar-grid a { text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 0.86rem; font-weight: 600; line-height: 1.3; }
.similar-grid a:hover { color: var(--teal); }
.similar-grid img, .similar-grid .post-card-blank { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; margin-bottom: 0.4rem; display: block; background: var(--teal-tint); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; }
.tag-list a { display: block; font-family: var(--font-display); font-size: 0.86rem; font-weight: 600; text-decoration: none; background: var(--paper); box-shadow: var(--press); border-radius: var(--r-pill); padding: 0.3rem 0.8rem; color: var(--teal-deep); }
.tag-list a:hover { background: var(--teal-tint); }

/* --- Forms on public pages ------------------------------------------------ */
.search-form { display: flex; gap: 0.75rem; padding: 0.9rem; margin-bottom: 1.5rem; }
.search-form input { flex: 1; min-width: 0; }
.form-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.contact-form .help { font-size: 0.9rem; color: var(--ink-soft); margin: 1rem 0 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.not-found { text-align: center; padding: clamp(1.5rem, 5vw, 3rem); margin-top: 1rem; }
.not-found-code { font-size: clamp(4rem, 14vw, 7rem); font-weight: 800; line-height: 1; margin: 0; color: var(--teal-tint); letter-spacing: -0.04em; text-shadow: 2px 2px 3px rgba(16, 38, 46, 0.18), -2px -2px 3px #fff; }
.not-found p { max-width: 48ch; margin-inline: auto; }
.btn-row-center { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 1.5rem 0; }
.not-found .search-form { max-width: 460px; margin: 0 auto; padding: 0; }

.maintenance { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.maintenance-card { max-width: 480px; text-align: center; padding: 2.5rem; }
.maintenance-card img { margin: 0 auto 1.5rem; height: 48px; width: auto; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--teal-deep); color: #cfe3e4; margin-top: 2rem; padding: 3rem 0 1.5rem; font-family: var(--font-display); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.footer-about p { max-width: 38ch; margin: 1rem 0 0; }
.site-footer h2 { font-size: 0.95rem; color: #fff; margin-bottom: 0.7rem; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: #cfe3e4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.store-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; align-items: center; }
.store-badges img { height: 40px; width: auto; }
.footer-legal { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.84rem; color: #a9cbcd; }
.footer-legal p { margin: 0 0 0.5rem; max-width: 90ch; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1020px) {
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
  .sidebar > * + * { margin-top: 0; }
  .sidebar .ad { grid-column: 1 / -1; }
  .chart-layout { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-search input { width: 6.5rem; }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto; width: 2.9rem; height: 2.9rem; border: 0; cursor: pointer;
    border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm);
  }
  .nav-toggle[aria-expanded="true"] { box-shadow: var(--press); }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--teal-deep); }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6.5px; }
  .nav-toggle-bars::after { top: 6.5px; }

  .site-nav {
    display: none; position: absolute; left: 1rem; right: 1rem; top: calc(100% - 0.25rem);
    flex-direction: column; align-items: stretch; gap: 0.75rem; margin: 0; padding: 1rem;
    background: var(--surface-hi); border-radius: var(--r-card); box-shadow: 0 18px 40px rgba(16, 38, 46, 0.22);
  }
  .site-nav.is-open { display: flex; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .site-nav > ul > li > a { padding: 0.8rem 0.9rem; font-size: 1.05rem; }
  .sub-toggle { top: 0.45rem; right: 0.4rem; transform: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--paper); }
  .sub-toggle::before { margin-top: -3px; }
  .sub-menu { position: static; transform: none; width: auto; max-width: none; box-shadow: none; background: var(--paper); grid-template-columns: repeat(2, 1fr); padding: 0.5rem; margin-top: 0.25rem; }
  .has-menu:hover .sub-menu, .has-menu:focus-within .sub-menu { display: none; }
  .has-menu.is-open .sub-menu { display: grid; }
  .nav-search input { width: 100%; flex: 1; }

  .plate-grid { grid-template-columns: 1fr; }
  .plate-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
  .ad.is-test { width: 100%; max-width: 728px; }
}

@media (max-width: 620px) {
  body { font-size: 1rem; }
  .brand-word { font-size: 1.45rem; }
  .plate { border-radius: 22px; }
  .plate-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board a { grid-template-columns: auto minmax(0, 1fr) auto 4.3rem; gap: 0.6rem; padding: 0.7rem 0.5rem; }
  .board-chg { font-size: 0.82rem; }
  .board-rate { font-size: 1rem; }
  .board-name span { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .form-two { grid-template-columns: 1fr; }
  .chart-canvas { height: 260px; }
  .range-tabs button { padding: 0.4rem 0.65rem; }
  .post-row img { width: 96px; height: 76px; }
  .search-form { flex-direction: column; }
  .rate-strip-cta { margin-left: 0; width: 100%; }
  .news-list { padding: 0.25rem 1rem; }
  .prose { font-size: 1.05rem; }
}
