/* Public site design. Mobile first: base rules are the phone layout, min-width rules add to them.
   Cloudflare keeps these files for up to 31 days, so rename the file whenever it changes:
   site8.css, and the link in base.html, embed_base.html, the console templates and .gitignore. */
:root {
  --ink: #15212c;
  --soft: #4d5b68;
  --line: #e2e6ea;
  --wash: #f4f6f8;
  --night: #0f2a43;
  --accent: #d52837;
  --link: #0b5c94;
  --bs-body-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
.site-body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip; /* a wide ad or embed must never make the whole page scroll sideways */
  overflow-wrap: break-word;
}
a { color: var(--link); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
img, iframe, ins { max-width: 100%; }
h1, h2, h3 { font-family: inherit; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.site-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Keyboard users get this on Tab. It never takes up a row for anyone else. */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 3000; padding: 8px 14px; background: #fff; color: var(--ink); border-radius: 6px; }
.skip-link:focus { left: 8px; }

/* Header: one row at every size, and it stays in view while reading. */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .site-wrap { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.brand { display: flex; flex: 0 0 auto; margin-right: auto; font-size: 1.65rem; font-weight: 800; letter-spacing: -.055em; line-height: 1; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand span { color: var(--accent); }
.brand small { align-self: flex-end; margin-left: 2px; padding-bottom: 3px; font-size: .6rem; font-weight: 600; letter-spacing: 0; color: var(--soft); }
.header-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 8px; color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; border-radius: 6px; list-style: none; }
.header-button::-webkit-details-marker { display: none; }
.header-button:hover { color: var(--accent); background: var(--wash); }
.header-search { border: 1px solid var(--line); border-radius: 50%; padding: 0; }
.topic-links { display: none; margin: 0; padding: 0; list-style: none; }
.topic-links a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); font-size: .92rem; font-weight: 650; white-space: nowrap; text-decoration: none; }
.topic-links a:hover { color: var(--accent); }
.topic-links a.is-current { color: var(--accent); }
.topic-links a.is-current::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -10px; height: 3px; background: var(--accent); }
.more-menu { position: relative; }
.more-menu summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; color: var(--ink); font-size: .92rem; font-weight: 650; cursor: pointer; list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary::after { content: ''; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.more-menu summary:hover { color: var(--accent); }
.more-panel { position: absolute; left: 0; top: 100%; z-index: 1500; min-width: 170px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: 0 10px 20px rgba(15, 42, 67, .1); }
.topic-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 1500; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; margin: 0; padding: 8px 16px 12px; list-style: none; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 20px rgba(15, 42, 67, .08); }
.topic-panel a { display: flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: none; }

.site-main { min-height: 60vh; padding-top: 20px; padding-bottom: 32px; }

/* Home banner: photo beside real text, so any photo works and nothing is lost to a crop or an overlay. */
.home-hero { display: grid; margin-top: 16px; border-radius: 13px; overflow: hidden; }
.home-hero--night { background: var(--night); color: #fff; }
.home-hero--red { background: #b5212d; color: #fff; }
.home-hero--cream { background: #faf8f4; color: var(--ink); border: 1px solid #ebe7e1; }
.home-hero-photo { position: relative; margin: 0; aspect-ratio: 16 / 9; background: rgba(0, 0, 0, .15); }
.home-hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-hero-pos-top { object-position: top; }
.home-hero-pos-center { object-position: center; }
.home-hero-pos-bottom { object-position: bottom; }
.home-hero-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 5px; font-size: .68rem; line-height: 1.35; color: #fff; background: linear-gradient(0deg, rgba(7, 18, 27, .78), rgba(7, 18, 27, 0)); }
.home-hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 20px; }
.home-hero-label { margin-bottom: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; opacity: .85; }
.home-hero--cream .home-hero-label { color: var(--accent); opacity: 1; }
.home-hero h2 { margin: 0 0 8px; font-size: clamp(1.35rem, 3.2vw, 2.1rem); line-height: 1.15; color: inherit; }
.home-hero p { margin: 0 0 14px; font-size: .98rem; line-height: 1.5; opacity: .92; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.home-hero-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 7px; font-size: .92rem; font-weight: 750; text-decoration: none; background: #fff; color: var(--ink); }
.home-hero-button:hover { background: var(--wash); color: var(--ink); }
.home-hero--cream .home-hero-button { background: var(--night); color: #fff; }
.home-hero--cream .home-hero-button:hover { background: var(--ink); color: #fff; }

/* Page headings */
.page-title { font-size: clamp(1.5rem, 4.5vw, 2rem); margin: 0 0 4px; }
.page-lead { color: var(--soft); margin: 0 0 16px; }
.section-title { font-size: 1.05rem; margin: 28px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.crumbs { font-size: .85rem; color: var(--soft); margin-bottom: 10px; }
.crumbs a { color: var(--soft); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: '/'; margin-right: 8px; }

/* Story list: headlines first, with a small photo beside each so more stories fit on screen. */
.story-list { max-width: 780px; }
.story-card { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.story-card .story-photo { order: 2; display: block; align-self: start; }
.story-card img, .photo-preview, .photo-preview-list, .photo-preview-topic-main, .photo-preview-topic-sub { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--wash); }
.story-title { font-size: 1.04rem; font-weight: 700; line-height: 1.3; margin: 2px 0 4px; }
.story-title a { color: inherit; text-decoration: none; }
.story-title a:hover { color: var(--link); text-decoration: underline; }
.kicker { font-size: .78rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.kicker:hover { color: var(--ink); text-decoration: underline; }
.story-teaser { display: none; font-size: .95rem; line-height: 1.5; color: var(--soft); margin: 0 0 4px; }
.story-date { font-size: .8rem; color: var(--soft); }
.story-ad { min-height: 100px; padding: 14px 0; text-align: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.more-link { display: block; margin: 18px 0; padding: 11px 16px; text-align: center; font-weight: 700; color: var(--ink); background: var(--wash); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.more-link:hover { color: var(--ink); background: var(--line); }

/* Sidebar */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; line-height: 1.35; }
.mini-list a { color: inherit; text-decoration: none; font-weight: 600; }
.mini-list a:hover { color: var(--link); text-decoration: underline; }
.explore-links { list-style: none; margin: 0; padding: 0; }
.explore-links a { display: block; padding: 10px 0; font-weight: 600; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.explore-links a:hover { color: var(--link); }
.explore-links span { display: block; font-size: .85rem; font-weight: 400; color: var(--soft); }
.side-column { margin-top: 24px; min-width: 0; }
.side-column > :first-child { margin-top: 0; }

/* Article */
.article-title { font-size: clamp(1.7rem, 5.5vw, 2.6rem); margin: 2px 0 8px; }
.article-teaser { font-size: 1.15rem; line-height: 1.45; color: var(--soft); margin: 0 0 12px; }
.byline { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .85rem; color: var(--soft); margin-bottom: 14px; }
.byline .author { font-weight: 700; color: var(--ink); }

/* Share bar. On a phone with a share sheet, that button leads and only WhatsApp and Copy link stay beside it. */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.share-label { font-size: .9rem; font-weight: 700; color: var(--ink); }
.share-native { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; font: inherit; font-size: .95rem; font-weight: 700; color: #fff; background: var(--night); border: 0; border-radius: 999px; cursor: pointer; }
.share-native:hover { background: var(--ink); }
.share-native[hidden], .share-copy[hidden] { display: none; }
.share-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.share-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; font-size: 1.1rem; color: var(--share, var(--ink)); background: var(--wash); border: 0; border-radius: 50%; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.share-link:hover { color: #fff; background: var(--share, var(--ink)); }
.share-whatsapp { --share: #128c5e; }
.share-facebook { --share: #1877f2; }
.share-x { --share: #15212c; }
.share-telegram { --share: #1b86b8; }
.share-email, .share-copy { --share: #4d5b68; }
.share-copy-done { display: none; }
.share-copy.is-done { --share: #128c5e; }
.share-copy.is-done .share-copy-idle { display: none; }
.share-copy.is-done .share-copy-done { display: inline; }
.share-status { font-size: .88rem; font-weight: 600; color: #0d7a50; }
.share-bar.has-native .share-extra { display: none; }
@media (min-width: 720px) {
  .share-bar.has-native .share-extra { display: block; }
}
.article-figure { margin: 0 -16px 8px; }
.article-figure img { display: block; width: 100%; height: auto; }
.article-figure figcaption { padding: 4px 16px; font-size: .78rem; color: var(--soft); }
.article-body { font-size: 1.09rem; line-height: 1.7; max-width: 68ch; }
.article-body h2 { font-size: 1.45rem; margin: 30px 0 10px; }
.article-body iframe { width: 100%; }
.article-body .photo-section { display: block; width: 100%; height: auto; border-radius: 6px; }
.section-figure { margin: 0 0 8px; }
.section-figure figcaption { padding-top: 4px; font-size: .78rem; color: var(--soft); }
.fact-box { margin: 24px 0; padding: 14px 16px; background: var(--wash); border-radius: 8px; }
.fact-box h2 { font-size: 1.05rem; margin: 0 0 6px; }
.fact-box p:last-child { margin-bottom: 0; }
.offer-panel { margin: 0 0 16px; padding: 14px 16px; background: var(--wash); border-radius: 8px; font-size: .95rem; }
.offer-panel dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 8px 0 0; }
.offer-panel dt { color: var(--soft); font-weight: 400; }
.offer-panel dd { margin: 0; }
.offer-logo { max-width: 120px; height: auto; margin-top: 10px; display: block; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; padding: 0; list-style: none; }
.tag-list a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; font-size: .85rem; background: var(--wash); border-radius: 6px; color: var(--ink); text-decoration: none; }
.tag-list a:hover { background: var(--line); }
.follow-note { font-size: .92rem; color: var(--soft); }
.ad-slot { min-height: 100px; text-align: center; overflow: hidden; margin: 16px 0; }

/* Word and link lists */
.link-columns { list-style: none; margin: 0; padding: 0; columns: 2 150px; column-gap: 20px; }
.link-columns li { break-inside: avoid; }
.link-columns a { display: block; padding: 8px 0; }
.word-meaning { font-size: 1.15rem; }
.sample { color: var(--soft); font-style: italic; }

/* Site search: one reading column, with the words people typed marked in each result. */
.search-page { max-width: 780px; min-height: 300px; }
.search-box { display: flex; gap: 8px; margin: 12px 0 14px; }
.search-box input { flex: 1 1 auto; min-width: 0; min-height: 50px; padding: 0 14px; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff; border: 2px solid #c8d0d7; border-radius: 9px; }
.search-box input:focus { border-color: var(--night); outline: none; box-shadow: 0 0 0 3px rgba(15, 42, 67, .15); }
.search-box button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 50px; padding: 0 16px; font: inherit; font-weight: 700; color: #fff; background: var(--night); border: 0; border-radius: 9px; cursor: pointer; }
.search-box button:hover { background: var(--ink); }
.search-box button svg { width: 1em; height: 1em; fill: currentColor; }
.search-summary { margin: 0 0 12px; color: var(--soft); }
.search-summary strong { color: var(--ink); }
.search-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.search-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; font-size: .92rem; font-weight: 650; color: var(--ink); text-decoration: none; background: var(--wash); border-radius: 999px; }
.search-tabs a:hover { background: var(--line); color: var(--ink); }
.search-tabs a span { font-size: .78rem; font-weight: 600; color: var(--soft); }
.search-tabs a.is-current { background: var(--night); color: #fff; }
.search-tabs a.is-current span { color: #d5dee6; }
.search-group { margin-bottom: 8px; }
.search-page mark { padding: 0 2px; color: inherit; background: #ffeaa0; border-radius: 3px; }
/* Unlike story lists, the matching text is the point of a result, so it shows on phones too and is not cut short. */
.search-page .story-teaser { display: block; overflow: visible; -webkit-line-clamp: none; margin-top: 2px; }
.search-page .kicker { display: block; }
.search-page .story-card { border-bottom: 1px solid var(--line); }
.search-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 700; }
.search-word { padding: 14px 0; border-bottom: 1px solid var(--line); }
.search-word.is-exact { padding: 16px; margin: 10px 0; background: #faf8f4; border: 1px solid #ebe7e1; border-radius: 10px; }
.search-word h3 { margin: 0 0 4px; font-size: 1.2rem; }
.search-word h3 a { color: inherit; text-decoration: none; }
.search-word h3 a:hover { color: var(--link); text-decoration: underline; }
.search-word h3 span { margin-left: 4px; font-size: .78rem; font-weight: 600; letter-spacing: 0; color: var(--soft); }
.search-word p { margin: 0; }
.search-example { margin-top: 6px !important; font-style: italic; color: var(--soft); }
.search-places, .search-browse { margin: 0; padding: 0; list-style: none; }
.search-places a { display: block; padding: 11px 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.search-places a:hover strong { color: var(--link); text-decoration: underline; }
.search-places strong { display: block; font-weight: 650; }
.search-places span { display: block; font-size: .9rem; color: var(--soft); }
.search-empty { padding: 18px; margin: 8px 0 4px; background: var(--wash); border-radius: 10px; }
.search-empty h2 { margin: 0 0 8px; font-size: 1.15rem; overflow-wrap: anywhere; }
.search-empty ul { margin: 0; padding-left: 20px; }
.search-browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 10px; }
.search-browse a { display: block; height: 100%; padding: 12px 14px; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--wash); border-radius: 9px; }
.search-browse a:hover { background: var(--line); color: var(--ink); }
.search-browse span { display: block; font-size: .85rem; font-weight: 400; color: var(--soft); }

/* Paging */
.pagin { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pagin a, .pagin span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pagin span { background: var(--wash); font-weight: 700; }

/* Footer */
.site-footer { margin-top: 24px; background: var(--night); color: #d5dde4; font-size: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .site-wrap { padding-top: 22px; padding-bottom: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0 0 8px; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
.social-links { display: flex; gap: 2px; margin: 0 0 8px -12px; padding: 0; list-style: none; font-size: 1.2rem; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.fine-print { margin: 0; font-size: .8rem; color: #aebbc6; }

/* Carried over from the old stylesheet */
.qik-btn { display: none; z-index: 1000; bottom: 15%; position: fixed; }
.go-top-btn { right: 1rem; }
.alert { z-index: 2000; top: 20px; right: 5px; position: absolute; }
.invalid-feedback { display: block !important; }
.requiredField { color: #b3261e !important; font-weight: bold; }
.bs-callout { padding: 20px; margin: 20px 0; background: var(--wash); border-radius: 6px; }
.bs-callout p:last-child { margin-bottom: 0; }

/* Google's reCAPTCHA is a fixed 304px wide, too wide for the smallest phones. */
@media (max-width: 345px) { .g-recaptcha { transform: scale(.88); transform-origin: 0 0; } }
@media (min-width: 640px) {
  .story-card { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 16px 0; }
  .story-card .story-photo { order: 0; }
  .story-title { font-size: 1.2rem; }
  .story-teaser { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .topic-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-figure { margin-left: 0; margin-right: 0; }
  .article-figure img { border-radius: 8px; max-height: 480px; object-fit: contain; background: var(--wash); }
  .article-figure figcaption { padding-left: 0; padding-right: 0; }
}
@media (min-width: 720px) {
  .brand { margin-right: 18px; }
  .topic-links { display: flex; flex: 1 1 auto; min-width: 0; }
  .topic-menu { display: none; }
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 300px; }
  .home-hero--text { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .home-hero-photo { order: 2; aspect-ratio: auto; max-height: 340px; }
  .home-hero-copy { padding: 32px; }
}
@media (min-width: 1024px) {
  .home-layout, .article-layout, .list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .side-column { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
