/* Shared layout for every base theme. Colours, fonts and widths come from the
   tokens as CSS custom properties; a theme's own theme.css only restyles. */
*,*::before,*::after{box-sizing:border-box}
:root{--gutter:20px;--nav-bg:var(--color-bg);color-scheme:light}
@media (min-width:768px){:root{--gutter:28px}}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
body{margin:0;background:var(--color-bg);color:var(--color-text);font-family:var(--font-body);font-size:17px;line-height:1.7;
  text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;overflow-wrap:break-word;overflow-x:clip}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none;touch-action:manipulation}
a:active{opacity:.72}
@media (hover:hover){a:hover{color:var(--color-accent)}}
:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}
/* Side padding follows the notch in landscape (viewport-fit=cover). */
.container{--pad-l:max(var(--gutter),env(safe-area-inset-left));--pad-r:max(var(--gutter),env(safe-area-inset-right));
  width:100%;max-width:var(--max-width);margin:0 auto;padding:0 var(--pad-r) 0 var(--pad-l)}
.beacon{position:absolute;width:1px;height:1px;opacity:0}
.preview-bar{background:#f6c343;color:#222;text-align:center;font-size:14px;padding:6px var(--gutter);padding-top:max(6px,env(safe-area-inset-top))}

/* masthead */
.masthead{border-bottom:1px solid var(--color-border);background:var(--color-bg)}
.masthead-inner{display:flex;align-items:baseline;gap:4px 16px;flex-wrap:wrap;padding-top:max(22px,env(safe-area-inset-top));padding-bottom:14px}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand picture{display:block;flex:none}
.brand-logo{height:40px;width:auto;max-width:min(320px,70vw);object-fit:contain}
.brand-wordmark .brand-logo{height:44px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.brand-name{font-family:var(--font-heading);font-weight:900;font-size:clamp(28px,4vw,40px);letter-spacing:.02em;line-height:1.1;overflow-wrap:anywhere}
.brand-tagline{margin:0;color:var(--color-muted);font-size:15px}
.masthead-date{margin:0 0 0 auto;color:var(--color-muted);font-size:14px;white-space:nowrap}
@media (max-width:600px){
  .masthead-inner{padding-top:max(16px,env(safe-area-inset-top));padding-bottom:12px;column-gap:12px}
  .brand-logo{height:32px}
  .brand-wordmark .brand-logo{height:36px}
  .brand-tagline{font-size:14px;line-height:1.5}
  .masthead-date{font-size:13px}
}
/* Phone on its side: keep the masthead short so the story shows. */
@media (orientation:landscape) and (max-height:500px){
  .masthead-inner{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:10px}
}

/* Section nav: one row that scrolls sideways, 44px tall targets, a fade at the
   edge while there is more to see (driven by the scroll where supported). */
.sections{position:relative;border-top:1px solid var(--color-border);timeline-scope:--sections-x}
.sections-inner{display:flex;align-items:center;gap:0 4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;
  white-space:nowrap;scroll-snap-type:x proximity;scroll-timeline:--sections-x x;font-size:15px;font-weight:500}
.sections-inner::-webkit-scrollbar{display:none}
.sections-inner::after{content:"";flex:0 0 12px}
.sections-inner a{flex:none;display:inline-flex;align-items:center;min-height:44px;padding:0 10px;scroll-snap-align:start;scroll-margin-left:var(--gutter)}
.sections-inner a:first-child{margin-left:-10px}
.sections-inner a[aria-current=page]{color:var(--color-accent);box-shadow:inset 0 -2px 0 currentColor}
.sections::before,.sections::after{content:"";position:absolute;top:0;bottom:0;width:36px;pointer-events:none;z-index:1}
.sections::before{left:0;background:linear-gradient(to right,var(--nav-bg),transparent);opacity:0}
.sections::after{right:0;background:linear-gradient(to left,var(--nav-bg) 20%,transparent)}
@supports (animation-timeline:scroll()){
  /* Inactive timeline (nothing to scroll) leaves both fades hidden. */
  .sections::before,.sections::after{opacity:0;animation:linear both;animation-timeline:--sections-x}
  .sections::before{animation-name:sections-fade-in}
  .sections::after{animation-name:sections-fade-out}
}
@keyframes sections-fade-in{0%{opacity:0}12%,100%{opacity:1}}
@keyframes sections-fade-out{0%,88%{opacity:1}100%{opacity:0}}

/* Headlines break at the spaces and punctuation that separate clauses (the way
   HK papers set them); an over-long run still wraps rather than overflowing. */
.card-title,.article-title,.page-title,.prose h2,.prose h3,.brand-name{word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}

/* shared bits */
.kicker{display:inline-block;color:var(--color-accent);font-size:13px;font-weight:700;letter-spacing:.04em;margin-bottom:4px}
.meta{color:var(--color-muted);font-size:13px;margin:6px 0 0}
.section-title{font-family:var(--font-heading);font-size:22px;margin:0 0 14px;padding-bottom:8px;border-bottom:2px solid var(--color-text)}
@media (hover:hover){.section-title a:hover{color:var(--color-accent)}}
.grid{display:grid;gap:24px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:900px){.grid-3,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.grid-2,.grid-3,.grid-4{grid-template-columns:minmax(0,1fr)}}

/* cards: the whole card is the tap target (the title link stretches over it;
   the section kicker stays tappable on top). */
.card{position:relative;display:flex;flex-direction:column;gap:10px;min-width:0}
.card-media{display:block;overflow:hidden;border-radius:var(--radius);background:var(--color-surface);aspect-ratio:16/9}
.card-media img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
@media (hover:hover){.card:hover .card-media img{transform:scale(1.03)}.card:hover .card-title a{color:var(--color-accent)}}
.card-body{min-width:0;flex:1 1 auto}
.card-body .kicker{position:relative;z-index:1}
.card-title{font-family:var(--font-heading);font-size:19px;line-height:1.4;margin:0;font-weight:700}
.card-title a::after{content:"";position:absolute;inset:0;z-index:0}
.card-dek{margin:6px 0 0;color:var(--color-muted);font-size:15px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-wrap:pretty}
.card-lg .card-title{font-size:clamp(24px,3vw,34px);line-height:1.3}
.card-sm .card-title{font-size:16px}
.card-row{flex-direction:row;align-items:flex-start;padding:18px 0;border-bottom:1px solid var(--color-border)}
.card-row .card-media{flex:0 0 220px;aspect-ratio:3/2}
@media (max-width:600px){
  .card-row{gap:14px;padding:16px 0}
  .card-row .card-media{flex-basis:112px;aspect-ratio:4/3}
  .card-row .card-title{font-size:17px;line-height:1.45}
  .card-row .card-dek{font-size:14px;-webkit-line-clamp:2}
}

/* article */
.article{max-width:760px;margin:36px auto 0}
.article-title{font-family:var(--font-heading);font-size:clamp(27px,4.4vw,42px);line-height:1.3;margin:6px 0 12px;font-weight:900}
.article-dek{font-size:19px;color:var(--color-muted);margin:0 0 10px;line-height:1.6;text-wrap:pretty}
.article-meta{line-height:1.6}
.article-cover{margin:24px 0}
.article-cover img{width:100%;border-radius:var(--radius)}
.article-cover figcaption{color:var(--color-muted);font-size:13px;line-height:1.6;margin-top:8px}
.article-cover figcaption a{text-decoration:underline;text-underline-offset:3px}
.prose{font-size:18px;line-height:1.9;text-wrap:pretty}
.prose p{margin:0 0 1.2em}
.prose h2,.prose h3{font-family:var(--font-heading);line-height:1.4;margin:1.6em 0 .6em}
.prose blockquote{margin:1.4em 0;padding:4px 0 4px 18px;border-left:3px solid var(--color-accent);color:var(--color-muted)}
.prose a{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.prose ul,.prose ol{padding-left:1.4em;margin:0 0 1.2em}
.prose li+li{margin-top:.4em}
.prose img{border-radius:var(--radius);margin:1.4em 0}
.prose code{font-size:.88em;overflow-wrap:anywhere}
.prose pre{overflow-x:auto;padding:12px 14px;background:var(--color-surface);border-radius:var(--radius);font-size:14px;line-height:1.6}
.prose pre code{overflow-wrap:normal}
.prose table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:15px;line-height:1.6}
.prose th,.prose td{border:1px solid var(--color-border);padding:6px 10px;text-align:left}
.prose hr{border:0;border-top:1px solid var(--color-border);margin:2em 0}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0}
/* Search: the header's icon, the box, and the results. Every target is at least 44px. */
/* In the sections row: pushed to the right end, and kept in view while the row scrolls sideways on a phone. */
.search-link{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin-left:auto;
  padding:0 4px;color:inherit;flex:none;position:sticky;right:0;z-index:5;background:inherit;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.sections .search-link{background:var(--nav-bg)}
.search-box{display:flex;gap:8px;margin:12px 0 20px}
.search-box input{flex:1;min-width:0;min-height:44px;padding:0 14px;border:1px solid var(--color-border);border-radius:var(--radius);
  background:var(--color-bg);color:var(--color-text);font:inherit;font-size:16px}
.search-box button{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:44px;border:0;
  border-radius:var(--radius);background:var(--color-accent);color:#fff;cursor:pointer}
.search-count,.search-empty{color:var(--color-muted);font-size:15px}
.search-results{list-style:none;margin:0;padding:0}
.search-result{display:flex;gap:14px;padding:16px 0;border-top:1px solid var(--color-border)}
.search-thumb{flex:0 0 112px}
.search-thumb img{width:112px;aspect-ratio:16/9;object-fit:cover;border-radius:calc(var(--radius) / 2)}
.search-text{min-width:0}
.search-title{margin:2px 0 6px;font-size:18px;line-height:1.4}
.search-title a{color:inherit;text-decoration:none}
.search-excerpt{margin:0;color:var(--color-muted);font-size:14.5px;line-height:1.7;overflow-wrap:anywhere}
.search-excerpt mark,.search-title mark{background:color-mix(in srgb,var(--color-accent) 22%,transparent);color:inherit;padding:0 1px}
@media (max-width:520px){.search-thumb{flex-basis:88px}.search-thumb img{width:88px}.search-title{font-size:16.5px}}
/* A client's paid piece: says so before the headline, everywhere it appears. */
.sponsor-label{display:inline-block;margin:0 0 6px 8px;padding:1px 8px;border:1px solid var(--color-muted);border-radius:4px;
  font-size:12px;line-height:1.6;color:var(--color-muted);vertical-align:middle}
.kicker+.sponsor-label{margin-left:8px}
.card-body>.sponsor-label:first-child,.article-head>.sponsor-label:first-child{margin-left:0}
/* Share bar: links that work without script; the share sheet and copy buttons appear when it runs.
   Five looks (the site picks one; a theme may restyle any): pills, icons, solid, outline, minimal. */
.share{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:20px 0}
.share-top{flex-wrap:nowrap;overflow-x:auto;margin:14px 0 0;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.share-top::-webkit-scrollbar{display:none}
.share-label{font-size:14px;font-weight:700;margin-right:4px}
.share-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-height:44px;padding:0 14px;
  border:1px solid transparent;font:inherit;font-size:14px;line-height:1;white-space:nowrap;color:var(--color-text);
  background:none;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.share-btn[hidden]{display:none}
.share-ico{width:18px;height:18px;flex:none;color:var(--brand,var(--color-accent))}
.share-whatsapp{--brand:#25d366}.share-facebook{--brand:#1877f2}.share-threads{--brand:var(--color-text);--solid:#111}
.share-telegram{--brand:#229ed9}.share-x{--brand:var(--color-text);--solid:#111}.share-line{--brand:#06c755}
.share-linkedin{--brand:#0a66c2}.share-weibo{--brand:#e6162d}.share-wechat-btn{--brand:#07c160}
.share-email,.share-copy{--brand:var(--color-muted)}.share-native{--brand:var(--color-accent)}
.share-done{outline:2px solid var(--color-accent);outline-offset:2px}
/* pills (default): rounded, outlined, the brand in the icon */
.share-style-pills .share-btn{border-color:var(--color-border);border-radius:999px;background:var(--color-bg)}
.share-style-pills .share-btn:hover,.share-style-pills .share-btn:focus-visible{border-color:var(--brand,var(--color-accent))}
/* icons: round brand-coloured buttons, the name kept for screen readers only */
.share-style-icons .share-btn{position:relative;width:44px;padding:0;border-radius:50%;background:var(--solid,var(--brand));color:#fff}
.share-style-icons .share-ico{color:#fff;width:20px;height:20px}
.share-style-icons .share-txt{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.share-style-icons .share-btn:hover{filter:brightness(1.08)}
/* solid: filled brand colour with the name */
.share-style-solid .share-btn{border-radius:var(--radius,8px);background:var(--solid,var(--brand));color:#fff;font-weight:600}
.share-style-solid .share-ico{color:#fff}
.share-style-solid .share-email,.share-style-solid .share-copy,.share-style-solid .share-native{background:var(--color-surface);color:var(--color-text)}
.share-style-solid .share-email .share-ico,.share-style-solid .share-copy .share-ico,.share-style-solid .share-native .share-ico{color:var(--color-text)}
/* outline: squared, a brand-coloured frame */
.share-style-outline .share-btn{border:1.5px solid var(--brand,var(--color-border));border-radius:calc(var(--radius,8px) / 2);font-weight:600}
/* minimal: just the icon and the word, for quiet designs */
.share-style-minimal{gap:2px 14px}
.share-style-minimal .share-btn{padding:0 2px;color:var(--color-muted)}
.share-style-minimal .share-btn:hover .share-txt{text-decoration:underline;text-underline-offset:3px;color:var(--color-text)}
.share-wechat summary{list-style:none}
.share-wechat summary::-webkit-details-marker{display:none}
.share-wechat[open]{flex:1 0 100%}
.share-qr{display:inline-block;margin-top:8px;padding:12px;border:1px solid var(--color-border);border-radius:var(--radius);
  background:#fff;color:#111;text-align:center}
.share-qr-code{display:block;width:160px;height:160px;margin:0 auto}
.share-qr p{margin:8px 0 0;font-size:12px}
.tag{font-size:13px;color:var(--color-muted);background:var(--color-surface);padding:3px 10px;border-radius:999px}
.sources{margin:28px 0;padding:16px 20px;background:var(--color-surface);border-radius:var(--radius);font-size:14px}
.sources h2{font-size:15px;margin:0 0 8px}
.sources ul{margin:0;padding-left:18px}
.sources li+li{margin-top:6px}
.sources a{text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
details.sources summary{cursor:pointer;font-weight:700;font-size:15px;min-height:44px;display:flex;align-items:center;
  list-style:none;margin:-10px 0}
details.sources summary::-webkit-details-marker{display:none}
details.sources summary::after{content:"＋";margin-left:auto;color:var(--color-muted)}
details.sources[open] summary::after{content:"－"}
details.sources[open] summary{margin-bottom:6px}
.sources-names{color:var(--color-muted)}
.ai-note{font-size:13px;color:var(--color-muted);border-top:1px solid var(--color-border);padding-top:14px}
.related{max-width:var(--max-width);margin:48px auto 0}

/* Phone reading: 20px margins, a full-bleed cover, and related stories as
   compact rows rather than a column of big pictures. */
@media (max-width:600px){
  .article{margin-top:22px}
  .article-dek{font-size:17px;line-height:1.65}
  .article-cover{margin:20px calc(-1 * var(--pad-r)) 24px calc(-1 * var(--pad-l))}
  .article-cover img{border-radius:0;width:100%}
  .article-cover figcaption{padding:0 var(--pad-r) 0 var(--pad-l)}
  .prose{font-size:17.5px;line-height:1.85}
  .prose h2{font-size:21px}
  .prose h3{font-size:19px}
  .prose blockquote{padding-left:14px}
  .sources{padding:14px 16px;font-size:15px;line-height:1.6}
  .related{margin-top:36px}
  .related .grid{gap:0}
  .related .card{flex-direction:row;align-items:flex-start;gap:14px;padding:14px 0;border-top:1px solid var(--color-border)}
  .related .card:first-child{border-top:0;padding-top:0}
  .related .card-media{flex:0 0 108px;aspect-ratio:4/3}
  .related .card-title{font-size:16px;line-height:1.45}
}

/* ad slots: labelled, centred, their height reserved so the page does not jump when an ad loads */
.ad{display:block;margin:24px auto;text-align:center;max-width:100%;overflow:hidden;clear:both}
.ad-label{display:block;font-size:11px;letter-spacing:.12em;color:var(--color-muted);margin-bottom:4px}
.ad-row .ad{margin:12px auto 0}
.rail .ad,aside .ad-sidebar{margin:0 auto 20px}
.ad-placeholder{display:flex;align-items:center;justify-content:center;border:2px dashed var(--color-border);
  border-radius:var(--radius);color:var(--color-muted);font-size:14px;background:var(--color-surface)}
.ad-placeholder small{display:block;font-size:12px;margin-top:2px}
.article-body .ad{margin:28px auto}

/* lists, pages */
.page-head{margin:36px 0 10px}
.page-title{font-family:var(--font-heading);font-size:clamp(26px,5vw,34px);line-height:1.3;margin:0}
.pager{display:flex;justify-content:space-between;gap:16px;margin:28px 0;font-weight:500}
.pager a{display:inline-flex;align-items:center;min-height:44px}
.pager a:only-child:last-child{margin-left:auto}
.empty{color:var(--color-muted);padding:40px 0}
.editor-card{display:flex;gap:16px;align-items:flex-start;margin:18px 0}
.avatar{width:64px;height:64px;border-radius:50%;object-fit:cover;flex:none;margin:0}
.editor-name{font-weight:700;margin:0}
.editor-bio{margin:4px 0 0;color:var(--color-muted);font-size:15px}
@media (max-width:600px){.page-head{margin:24px 0 6px}}
/* sub-sections under a section title: a row of pills, scrolling sideways on a phone */
.page-parent{margin:0 0 2px;font-size:14px;font-weight:500}
.page-parent a{color:var(--color-muted);display:inline-flex;align-items:center;min-height:32px}
.page-parent a::after{content:"›";margin-left:6px}
.subsections{display:flex;gap:8px;margin:14px calc(var(--gutter) * -1) 0;padding:0 var(--gutter);overflow-x:auto;
  scrollbar-width:none;overscroll-behavior-x:contain}
.subsections::-webkit-scrollbar{display:none}
.subsections a{flex:none;display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;
  border:1px solid var(--color-border);font-size:15px;font-weight:500;white-space:nowrap}
.subsections a[aria-current=page]{background:var(--color-accent);border-color:var(--color-accent);color:var(--color-bg)}
@media (pointer:coarse){.subsections a{min-height:44px}.page-parent a{min-height:44px}}

/* footer: clear of the home indicator */
.site-footer{margin-top:64px;border-top:1px solid var(--color-border);background:var(--color-surface);font-size:14px}
.footer-inner{display:flex;justify-content:space-between;gap:16px 24px;flex-wrap:wrap;padding-top:28px;padding-bottom:8px}
.footer-brand{font-family:var(--font-heading);font-weight:900;font-size:20px;margin:0 0 6px}
.footer-desc,.footer-ai{color:var(--color-muted);margin:4px 0;max-width:560px}
.footer-links{display:flex;gap:0 20px;flex-wrap:wrap;align-items:center}
.footer-links a{display:inline-flex;align-items:center;min-height:44px}
.footer-copy{color:var(--color-muted);padding-top:8px;padding-bottom:calc(24px + env(safe-area-inset-bottom));font-size:13px}
@media (max-width:600px){.site-footer{margin-top:48px}.footer-inner{padding-top:24px}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;scroll-behavior:auto!important}
  .card-media img{transform:none!important}
}


/* 快訊：時間線、緊湊、即時感。 */
.theme-flash{--nav-bg:var(--color-surface)}
/* 頭版：大圖壓軸，圖片為主。 */
.theme-flash .home-top{margin:28px 0 30px}
.theme-flash .home-top>.card{margin-bottom:18px}
.theme-flash .home-top .card-lg .card-media{border-radius:var(--radius);box-shadow:0 8px 24px rgb(5 20 45 / .12)}
.theme-flash .home-top .card-lg .card-title{font-size:clamp(24px,3.4vw,32px)}
.theme-flash .home-top .grid{margin:0}
.theme-flash .home-top .grid .card{margin-bottom:0}
.theme-flash .masthead{background:var(--color-surface)}
.theme-flash .brand-name{font-weight:900}
.theme-flash .brand-name::before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--color-accent);margin-right:10px;vertical-align:middle;animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
.theme-flash .brand-has-logo .brand-name::before{display:none}
.theme-flash .sections-inner a[aria-current=page]{box-shadow:inset 0 -3px 0 currentColor}
.theme-flash .flash-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:28px;margin-top:24px}
.theme-flash .timeline{position:relative;padding-left:28px}
.theme-flash .timeline::before{content:"";position:absolute;left:8px;top:6px;bottom:6px;width:2px;background:var(--color-border)}
/* Each update is one tap target: the headline link covers the whole item. */
.theme-flash .tl-item{position:relative;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);padding:14px 16px;margin-bottom:14px}
.theme-flash .tl-item::before{content:"";position:absolute;left:-25px;top:18px;width:12px;height:12px;border-radius:50%;background:var(--color-bg);border:3px solid var(--color-accent)}
.theme-flash .tl-item .kicker{position:relative;z-index:1;margin-bottom:0}
.theme-flash .tl-time{font-size:13px;font-weight:700;color:var(--color-accent);font-variant-numeric:tabular-nums}
.theme-flash .tl-item h3{font-size:18px;margin:4px 0;line-height:1.45}
.theme-flash .tl-item h3 a::after{content:"";position:absolute;inset:0;border-radius:inherit}
.theme-flash .tl-item p{margin:0;color:var(--color-muted);font-size:15px;line-height:1.6;text-wrap:pretty}
@media (hover:hover){.theme-flash .tl-item:hover{border-color:var(--color-accent)}.theme-flash .tl-item:hover h3 a{color:var(--color-accent)}}
.theme-flash .side-box{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);padding:16px;margin-bottom:20px}
.theme-flash .side-box h2{font-size:16px;margin:0 0 10px}
.theme-flash .side-box ol{margin:0;padding-left:18px}
.theme-flash .side-box li{margin-bottom:10px;line-height:1.45}
.theme-flash .side-box li a{display:block;padding:2px 0}

/* iPad portrait: the timeline keeps a slim side column; below 700px it takes the
   width and the side boxes pair up beneath it. */
@media (max-width:900px){.theme-flash .flash-layout{grid-template-columns:minmax(0,1fr) 250px;gap:22px}}
@media (max-width:700px){
  .theme-flash .flash-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  .theme-flash .flash-layout>aside{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:0 20px;align-items:start}
}

/* Phone: brand and date on one line, a tighter timeline. */
@media (max-width:600px){
  .theme-flash .masthead-inner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;padding-bottom:10px}
  .theme-flash .brand{grid-column:1;grid-row:1}
  .theme-flash .brand-name{font-size:clamp(24px,7vw,30px)}
  .theme-flash .brand-name::before{width:8px;height:8px;margin-right:8px}
  .theme-flash .masthead-date{grid-column:2;grid-row:1;margin:0;font-size:12.5px}
  .theme-flash .brand-tagline{grid-column:1/-1;grid-row:2;font-size:13.5px}
  .theme-flash .flash-layout{margin-top:16px}
  .theme-flash .timeline{padding-left:22px}
  .theme-flash .timeline::before{left:7px}
  .theme-flash .tl-item{padding:12px 14px;margin-bottom:10px}
  .theme-flash .tl-item::before{left:-20px;top:16px;width:11px;height:11px}
  .theme-flash .tl-item h3{font-size:17px}
  .theme-flash .tl-item p{font-size:14.5px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.theme-flash .brand-name::before{animation:none}}
.theme-flash .tl-item h3,.theme-flash .side-box li{word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
