/* Public site. Mobile first. Brand colours come from Settings via --brand / --accent. */
:root {
  --brand: #14213d;
  --accent: #c8102e;
  --ink: #16181d;
  --ink-2: #3d424d;
  --muted: #5f6570;
  --line: #e2e0da;
  --paper: #ffffff;
  --paper-2: #f6f5f1;
  --focus: #1a5fd0;
  --serif: "Iowan Old Style", "Charter", "Georgia", "Cambria", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: 16px;
  --radius: 6px;
  --measure: 68ch;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans); overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; overflow-wrap: break-word; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; }
@font-face { font-family: "Archivo Black"; src: url("../fonts/archivo-black-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Site themes (Settings > Branding) */
body.theme-dark {
  --ink: #eceef2; --ink-2: #c3c7cf; --muted: #9aa0ab; --line: #2a2e36; --paper: #0d0f13; --paper-2: #171a20; --focus: #7aa7ff;
  color-scheme: dark;
}
body.theme-dark .site-header, body.theme-dark .search-form input { background: var(--paper); }
body.theme-dark .search-form input, body.theme-dark .search-big input, body.theme-dark .newsletter-row input, body.theme-dark .pnl input[type=number] { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
body.theme-dark .brand { color: #fff; }
body.theme-dark .site-footer { background: #07080b; border-top: 1px solid var(--line); }
body.theme-dark .pnl, body.theme-dark .pnl-kelly, body.theme-dark .pnl-side button { background: var(--paper-2); }
body.theme-dark .pnl-results { background: #1d2129; }
body.theme-dark .preview-bar { background: #3a3000; color: #ffe9a3; border-color: #5c4c00; }
body.theme-dark .prose th { background: var(--paper-2); }
body.headings-sans { --serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body.headings-display h1, body.headings-display h2, body.headings-display .card-title, body.headings-display .brand-name, body.headings-display .section-title {
  font-family: "Archivo Black", "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif; font-weight: 400; letter-spacing: -.005em;
}
body.headings-display .prose { font-family: var(--sans); }
.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; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--brand); color: #fff; padding: 10px 14px; z-index: 100; border-radius: var(--radius); }
.skip:focus { top: 8px; color: #fff; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1100px; margin-inline: auto; }
.wrap-full { width: 100%; }
main { display: block; min-height: 50vh; outline: none; }
.preview-bar { background: #fff3c4; color: #5a4300; text-align: center; padding: 10px var(--gutter); font-size: .9rem; font-weight: 600; border-bottom: 1px solid #e8d48a; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { text-decoration: none; color: var(--brand); display: flex; align-items: center; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.brand-logo { max-height: 40px; max-width: 100%; width: auto; height: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search-form { display: none; }
.search-form input { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; width: 180px; background: var(--paper-2); }
.search-form button, .menu-toggle {
  background: none; border: 1px solid var(--line); border-radius: 999px; min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: var(--ink); padding: 0 12px;
}
.search-form { gap: 6px; align-items: center; }
@media (min-width: 640px) { .search-form { display: flex; } }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
.menu-toggle-bars::before { position: absolute; top: -6px; } .menu-toggle-bars::after { position: absolute; top: 6px; }
.primary-nav { border-top: 1px solid var(--line); }
.nav-list { list-style: none; margin-block: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-list > li { position: relative; flex-shrink: 0; }
.nav-list a { display: block; padding: 12px 10px; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.sub-nav { display: none; list-style: none; margin: 0; padding: 0; }
/* With JS on small screens the nav becomes a disclosure panel. */
.js .menu-toggle { display: inline-flex; }
@media (max-width: 767px) {
  .js .primary-nav { display: none; }
  .js .primary-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; overflow: visible; padding-block: 8px; }
  .js .nav-list a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .js .sub-nav { display: block; padding-left: 16px; }
  .js .sub-nav a { font-weight: 400; }
}
@media (min-width: 768px) {
  .menu-toggle, .js .menu-toggle { display: none; }
  .nav-list { overflow: visible; }
  .has-children:hover > .sub-nav, .has-children:focus-within > .sub-nav {
    display: block; position: absolute; left: 0; top: 100%; background: var(--paper); border: 1px solid var(--line);
    min-width: 200px; z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.08); border-radius: var(--radius);
  }
  .sub-nav a { font-weight: 400; padding: 10px 14px; }
}

/* Cards */
.kicker { display: inline-block; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 700; color: var(--accent); text-decoration: none; margin-bottom: 6px; }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.02); }
.card-title { font-size: 1.2rem; margin: 0 0 6px; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; color: inherit; }
.card-excerpt { color: var(--ink-2); font-size: .95rem; margin-bottom: 6px; }
.meta { color: var(--muted); font-size: .82rem; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card--lead .card-title { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.card--lead .card-excerpt { font-size: 1.08rem; }
.card--compact .card-title { font-size: 1.05rem; }
.card--list { flex-direction: row; gap: 14px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.card--list .card-media { flex: 0 0 33%; max-width: 240px; aspect-ratio: 4 / 3; }
.card--list .card-body { flex: 1; min-width: 0; }
.card--list .card-excerpt { display: none; }
@media (min-width: 640px) { .card--list .card-excerpt { display: block; } .card--list .card-title { font-size: 1.35rem; } }

/* Home */
.home-top { display: grid; gap: 28px; padding-block: 24px; }
.home-featured { display: grid; gap: 24px; }
@media (min-width: 640px) { .home-featured { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .home-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; padding-block: 32px; }
  .home-featured { grid-template-columns: 1fr; gap: 20px; }
  .home-featured .card { flex-direction: row; gap: 14px; }
  .home-featured .card-media { flex: 0 0 42%; aspect-ratio: 4 / 3; }
  .home-featured .card-excerpt { display: none; }
  .home-featured .card-title { font-size: 1.1rem; }
}
.home-intro { padding-block: 24px 8px; }
.home-intro-body { max-width: 820px; }
.section { padding-block: 28px; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-title { font-size: 1.35rem; margin-bottom: 18px; padding-top: 4px; border-top: 3px solid var(--brand); display: inline-block; }
.more { font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.empty-state { padding: 48px 0; color: var(--muted); }

/* Article */
.article-header { max-width: 820px; padding-top: 20px; }
.breadcrumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .82rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs [aria-current] { display: inline-block; max-width: 40ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.article-title { font-size: clamp(1.9rem, 6vw, 3rem); margin-bottom: 12px; }
.standfirst { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--ink-2); line-height: 1.5; font-family: var(--serif); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .9rem; padding-block: 12px 18px; border-bottom: 1px solid var(--line); }
.byline a { font-weight: 700; }
.dates { color: var(--muted); }
.avatar { border-radius: 50%; object-fit: cover; width: 44px; height: 44px; }
.avatar-lg { width: 72px; height: 72px; } .avatar-xl { width: 96px; height: 96px; }
.article-hero { margin: 20px auto 8px; }
.article-hero img { width: 100%; }
.article-hero figcaption { padding: 8px var(--gutter) 0; font-size: .85rem; color: var(--muted); max-width: 820px; }
@media (min-width: 1100px) { .article-hero figcaption { padding-inline: 0; } .article-hero img { border-radius: var(--radius); } }
.credit { font-style: italic; }
.article-layout { max-width: 820px; padding-block: 16px 40px; }
.article-main { min-width: 0; }
.article-layout.has-sidebar { max-width: var(--wrap); }
@media (min-width: 1100px) {
  .article-header.has-sidebar { max-width: var(--wrap); }
  .article-header.has-sidebar > * { max-width: 760px; }
}
@media (min-width: 1100px) {
  .article-layout.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
  .article-layout.has-sidebar .article-main { max-width: 760px; }
  .article-sidebar { position: sticky; top: 24px; }
}
.article-sidebar { display: grid; gap: 18px; margin-top: 32px; font-family: var(--sans); }
@media (min-width: 1100px) { .article-sidebar { margin-top: 0; } }
.side-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--paper); }
.side-title { font-size: 1rem; margin: 0 0 10px; letter-spacing: .01em; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.side-list a { text-decoration: none; }
.side-list a:hover { text-decoration: underline; }
.promo-box { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.promo-text { font-size: .9rem; color: var(--ink-2); margin-bottom: 10px; }
.promo-text p { margin: 0 0 .5em; }
.promo-text a, .promo-disclaimer a { color: var(--accent); }
.promo-image { display: block; border-radius: 8px; overflow: hidden; }
.promo-image img { width: 100%; }
.promo-button { display: flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 10px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.promo-button:hover { color: #fff; filter: brightness(1.08); }
.promo-disclaimer { font-size: .72rem; line-height: 1.45; color: var(--muted); margin-top: 10px; }
.promo-disclaimer p { margin: 0 0 .4em; }
.page-full { padding-block: 16px 40px; }

/* Rich text */
.prose { font-family: var(--serif); font-size: 1.12rem; line-height: 1.7; max-width: var(--measure); overflow-wrap: break-word; }
.page-full .prose { max-width: none; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.4em; }
.prose a { color: var(--accent); }
.prose a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; margin: .2em 0; border-radius: var(--radius); background: var(--accent); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.3; }
.prose a.button:hover { filter: brightness(1.08); color: #fff; }
/* Framed boxes, grids of boxes, small caps labels and promo codes (kept from imported layouts; editors can use them too). */
.prose .box { border: 1px solid var(--line); border-radius: calc(var(--radius) * 2); background: var(--paper-2); padding: 16px 18px; margin: 1.2em 0; }
.prose .box > :first-child { margin-top: 0; }
.prose .box > :last-child { margin-bottom: 0; }
.prose .cards { display: grid; gap: 12px; margin: 1.2em 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.prose .cards > .box { margin: 0; }
.prose .cards > .box p { font-size: .95rem; }
.prose .label { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 .4em; }
.prose code.promo-code { display: inline-block; font-size: .95rem; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border: 1px dashed var(--accent); border-radius: var(--radius); background: transparent; color: var(--accent); }
.prose img { border-radius: var(--radius); margin-block: 1em; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: 6px; }
.prose blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.1em; border-left: 4px solid var(--accent); font-size: 1.2rem; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-family: var(--sans); font-size: .92rem; margin: 1.5em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); }
.prose pre { overflow-x: auto; background: var(--paper-2); padding: 12px; border-radius: var(--radius); font-size: .9rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose figure.align-left, .prose figure.align-right { max-width: 50%; }
@media (min-width: 768px) {
  .prose figure.align-left { float: left; margin: .3em 1.4em 1em 0; }
  .prose figure.align-right { float: right; margin: .3em 0 1em 1.4em; }
}

/* FAQ */
.faq { font-family: var(--sans); margin-top: 2.5em; clear: both; }
.faq h2 { font-family: var(--serif); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; list-style-position: outside; }
.faq-answer { padding-bottom: 14px; color: var(--ink-2); font-size: 1rem; }

/* Article footer */
.article-footer { max-width: var(--measure); margin-top: 28px; display: grid; gap: 22px; }
.tags, .chips, .inline-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a, .chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.share-label { font-weight: 700; margin-right: 4px; }
.share a, .share button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: none; text-decoration: none; cursor: pointer; color: inherit; }
.author-box { display: flex; gap: 14px; padding: 18px; background: var(--paper-2); border-radius: var(--radius); font-size: .95rem; }
.author-name { font-weight: 700; margin-bottom: 4px; }
.related { background: var(--paper); }
.child-pages { margin-top: 32px; padding: 18px; background: var(--paper-2); border-radius: var(--radius); }
.child-pages h2 { font-size: 1.1rem; }

/* Archives */
.archive { padding-block: 20px 40px; }
.archive-header { padding-bottom: 12px; border-bottom: 3px solid var(--brand); margin-bottom: 8px; }
.archive-header h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.archive-desc { max-width: 60ch; color: var(--ink-2); }
.author-head { display: flex; gap: 18px; align-items: flex-start; }
.list { max-width: 900px; }
.archive-intro { margin: 20px 0 28px; }
.category-index { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; max-width: 760px; }
.category-index li { padding-left: calc(var(--depth, 0) * 20px); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.category-index a { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.category-index p { margin: 4px 0 0; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; max-width: 900px; font-size: .95rem; }
.pagination a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; }
.search-big { display: flex; gap: 8px; margin: 12px 0; max-width: 640px; }
.search-big input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border: 1px solid #b9b6ad; border-radius: var(--radius); }
.search-big button { min-height: 48px; padding: 0 20px; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); font-weight: 700; cursor: pointer; }
.not-found { padding-block: 40px; }

/* Footer */
.site-footer { background: var(--brand); color: #fff; margin-top: 40px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .muted { color: rgba(255,255,255,.75); }
.footer-grid { display: grid; gap: 24px; padding-block: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .brand-name { color: #fff; font-size: 1.4rem; white-space: normal; }
.footer-links, .footer-social { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-links a, .footer-social a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; }
.footer-links a:hover, .footer-social a:hover { text-decoration: underline; color: #fff; }
.disclosure { font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--ink-2); background: var(--paper-2); border-left: 3px solid var(--accent); padding: 10px 14px; margin: 0 0 1.4em; border-radius: 0 var(--radius) var(--radius) 0; }
[dir="rtl"] .disclosure { border-left: 0; border-right: 3px solid var(--accent); border-radius: var(--radius) 0 0 var(--radius); }
.newsletter { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 40px; }
.newsletter + .site-footer { margin-top: 0; }
.newsletter-inner { display: grid; gap: 14px; padding-block: 28px; }
@media (min-width: 900px) { .newsletter-inner { grid-template-columns: 1fr 1fr; align-items: center; } }
.newsletter h2 { font-size: 1.35rem; margin-bottom: 4px; }
.newsletter p { margin: 0; color: var(--ink-2); }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid #b9b6ad; border-radius: var(--radius); background: #fff; }
.newsletter-row button, .button-primary { min-height: 48px; padding: 0 18px; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); font-weight: 700; cursor: pointer; }
.newsletter-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; margin-top: 10px; color: var(--ink-2); }
.newsletter-consent input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.newsletter-msg { font-weight: 600; margin-bottom: 8px !important; }
.newsletter-error { color: #a1141d !important; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.rg-notice { font-size: .82rem; opacity: .85; margin: 0; padding-block: 12px 0; }
.message-page { padding-block: 48px; max-width: 640px; }
/* Built-in tools */
.tool { margin: 2em 0; min-height: 80px; font-family: var(--sans); }
.tool:empty::before { content: "Loading…"; color: var(--muted); }
.pnl { display: grid; gap: 20px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; }
@media (min-width: 768px) { .pnl { grid-template-columns: 1fr 1fr; padding: 24px; } }
.pnl-inputs { display: grid; gap: 16px; align-content: start; }
.pnl label { display: grid; gap: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pnl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pnl input[type=number] { min-height: 44px; padding: 0 12px; border: 1px solid #b9b6ad; border-radius: var(--radius); font-size: 1rem; color: var(--ink); text-transform: none; letter-spacing: 0; }
.pnl input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.pnl-range { grid-template-columns: 1fr auto; align-items: center; }
.pnl-range input { grid-column: 1 / -1; }
.pnl output { font-family: ui-monospace, Menlo, monospace; color: var(--ink); font-size: .9rem; }
.pnl-side { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pnl-side legend { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.pnl-side button { min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 700; cursor: pointer; font-size: .85rem; color: var(--muted); }
.pnl-side button[aria-pressed="true"][data-side="YES"] { border-color: #0f7b3e; color: #0f7b3e; background: #eaf7ef; }
.pnl-side button[aria-pressed="true"][data-side="NO"] { border-color: #b42318; color: #b42318; background: #fdecea; }
.pnl-results { background: var(--paper-2); border-radius: 10px; padding: 18px; align-self: start; }
.pnl-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pnl-profit { font-family: var(--serif); font-size: clamp(2.2rem, 7vw, 3rem); font-weight: 800; color: #0f7b3e; margin-top: 6px; line-height: 1.1; }
.pnl-roi { font-weight: 700; color: #0f7b3e; }
.pnl .is-neg { color: #b42318; }
.pnl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.pnl-stats-2 { grid-template-columns: 1fr 1fr; border-top: 0; padding-top: 6px; margin-top: 6px; }
.pnl-stats dt { font-size: .75rem; color: var(--muted); }
.pnl-stats dd { margin: 2px 0 0; font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
.pnl-kelly { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.pnl-ev { margin-top: 8px; font-size: .85rem; font-weight: 700; color: #0f7b3e; }
.pnl-note { font-size: .75rem; color: var(--muted); margin: 10px 0 0; }
.language-switcher ul { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid rgba(255,255,255,.2); }
.language-switcher a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; text-decoration: none; font-size: .88rem; }
.language-switcher a[aria-current] { background: #fff; color: var(--brand); font-weight: 700; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255,255,255,.2); padding-block: 16px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 36px; }

/* Right-to-left languages */
[dir="rtl"] .prose blockquote { border-left: 0; border-right: 4px solid var(--accent); padding: .2em 1.1em .2em 0; }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.3em; }
[dir="rtl"] .breadcrumbs li + li::before { margin-right: 0; margin-left: 4px; }
[dir="rtl"] .has-children:hover > .sub-nav, [dir="rtl"] .has-children:focus-within > .sub-nav { left: auto; right: 0; }
[dir="rtl"] .js .sub-nav { padding-left: 0; padding-right: 16px; }
@media (min-width: 768px) {
  [dir="rtl"] .prose figure.align-left { float: right; margin: .3em 0 1em 1.4em; }
  [dir="rtl"] .prose figure.align-right { float: left; margin: .3em 1.4em 1em 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .share, .related { display: none; } }
/* Calculator: never wider than the screen */
.pnl, .pnl > *, .pnl-row > *, .pnl-stats > * { min-width: 0; }
.pnl input[type=number] { width: 100%; }
.pnl-side button { white-space: normal; padding: 6px 8px; line-height: 1.25; }
.pnl-stats dd { font-size: .95rem; overflow-wrap: anywhere; }
@media (max-width: 420px) { .pnl { padding: 14px; } .pnl-results { padding: 14px; } .pnl-stats { gap: 6px; } }
body.theme-dark .pnl-side button[aria-pressed="true"][data-side="YES"] { background: rgba(34, 197, 94, .14); color: #4ade80; border-color: #22c55e; }
body.theme-dark .pnl-side button[aria-pressed="true"][data-side="NO"] { background: rgba(239, 68, 68, .14); color: #f87171; border-color: #ef4444; }
body.theme-dark .pnl-profit, body.theme-dark .pnl-roi, body.theme-dark .pnl-ev { color: #4ade80; }
body.theme-dark .pnl .is-neg { color: #f87171; }

/* Live odds tool */
.lo { margin: 1.5em 0; font-family: var(--sans); }
.lo-title { margin: 0 0 .6em; }
.lo-note, .lo-foot { color: var(--muted); font-size: .85rem; margin: .6em 0 0; }
.lo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.lo-card { border: 1px solid var(--line); border-radius: calc(var(--radius) * 2); background: var(--paper-2); padding: 14px; margin: 0; min-width: 0; }
.lo-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lo-live { color: #fff; background: #d92d20; border-radius: 4px; padding: 1px 6px; font-weight: 700; }
.lo-teams { font-weight: 700; font-size: 1.02rem; margin: 6px 0 8px; overflow-wrap: anywhere; }
.lo-teams span { color: var(--muted); font-weight: 400; }
.lo .lo-list, .lo .lo-trend, .lo .lo-tick { padding-left: 0; }
.lo table.lo-odds { display: table; width: 100%; border-collapse: collapse; font-size: .9rem; margin: 0; overflow: visible; }
.lo .lo-odds th, .lo .lo-odds td { padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); text-align: right; background: none; vertical-align: middle; }
.lo .lo-odds th[scope=row], .lo .lo-odds thead th:first-child { text-align: left; font-weight: 400; overflow-wrap: anywhere; }
.lo .lo-odds thead th { font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.lo .lo-odds td { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.lo-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.prose .lo-book, .lo-book { flex: 1 1 120px; display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 6px 10px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; text-align: center; }
.lo-trend { list-style: none; padding: 0; margin: 0; }
.lo-trend li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.lo-trend .lo-event { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lo-trend .lo-pick { font-weight: 700; }
.lo-trend .lo-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.lo-trend .lo-book { grid-column: 1 / -1; flex: none; justify-self: start; min-height: 36px; font-size: .8rem; }
.lo-tick { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.lo-tick li { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .82rem; background: var(--paper-2); margin: 0; }
.lo-tick li span { color: var(--muted); margin-right: 6px; }
.pe { border: 1px solid var(--line); border-radius: calc(var(--radius) * 2); background: var(--paper-2); padding: 14px 16px; }
.pe-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.pe-live { color: #12b76a; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pe-up { color: #12b76a; } .pe-down { color: #f04438; } .pe-flat { color: var(--muted); }
