/* The story page (story.html): one event, in 晴天. Loads after site.css and only adds layout and page pieces.
   Components that core.js renders (tracker, hype, sheets, toasts) are styled here, scoped to body.page-story, because this
   page does not load style.css. Nothing here reaches another page. */

body.page-story{background:#fff}
.page-story main{display:block}

/* layout: a 720px reading column; on wide screens the map and share card sit in a side column */
.story{padding-top:8px}
.story-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.col-main,.col-side{min-width:0}
.col-main>*+*,.col-side>*+*{margin-top:clamp(36px,5vw,52px)}
@media (min-width:1040px){
  .story-grid{grid-template-columns:minmax(0,720px) 340px;justify-content:center;column-gap:clamp(40px,5vw,72px);align-items:start}
  .col-side{position:sticky;top:96px;margin-top:64px}
}
@media (max-width:1039px){
  .story-grid{max-width:720px;margin:0 auto}
  .col-side{margin-top:clamp(36px,5vw,52px)}
}

/* back link and place crumbs */
.s-nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;margin-bottom:10px}
.back{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 4px 0 0;font-family:var(--round);font-weight:900;font-size:16px;color:var(--cobalt-deep);text-decoration:none}
.back:hover{text-decoration:underline;text-underline-offset:4px}
.back .ic{width:20px;height:20px}
.crumbs ol{display:flex;flex-wrap:wrap;align-items:center;list-style:none;margin:0;padding:0;font-size:14px;color:var(--ink-soft)}
.crumbs li{display:flex;align-items:center}
.crumbs li+li::before{content:"";width:6px;height:6px;margin:0 8px 0 4px;border-top:2px solid var(--ink-faint);border-right:2px solid var(--ink-faint);transform:rotate(45deg)}
.crumbs a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;color:var(--ink-soft);text-decoration:none;border-radius:8px}
.crumbs a:hover{color:var(--cobalt-deep);text-decoration:underline;text-underline-offset:4px}
.crumbs [aria-current]{padding:0 4px;color:var(--ink);font-weight:700}

/* title and the one meta line */
.s-head{display:grid;grid-template-columns:64px minmax(0,1fr);gap:18px;align-items:start}
.s-head .cat-ic{width:64px;height:64px;margin-top:6px}
@media (max-width:560px){ .s-head{grid-template-columns:1fr;gap:12px} .s-head .cat-ic{width:52px;height:52px;margin:0} }
.s-title{font-size:clamp(27px,3vw,40px);line-height:1.3;letter-spacing:.01em;text-wrap:balance}
.s-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 8px;margin:16px 0 0;font-size:14.5px;color:var(--ink-soft)}
.s-meta>span,.s-meta>a{display:inline-flex;align-items:center;gap:6px}
.s-facts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;margin:10px 0 0;font-size:15px;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.s-facts>span,.s-facts>a{display:inline-flex;align-items:center;gap:6px}
.s-facts .ic{width:17px;height:17px;color:var(--ink-soft)}
.s-meta .place{font-weight:700;color:var(--ink)}
.s-meta .place .ic{width:18px;height:18px;color:var(--cobalt-deep)}
.s-meta .tag .ic{width:15px;height:15px}
.s-meta .tag.grey{background:var(--grey);color:var(--ink-soft)}
.s-facts a.srcn .ic{color:var(--cobalt-deep)}
.s-facts a.srcn{min-height:44px;color:var(--cobalt-deep);font-weight:700;text-decoration:underline;text-underline-offset:4px;margin:-10px 0}
@media (max-width:560px){
}

.act-done{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:4px 12px;padding:10px 18px;border-radius:12px;background:var(--sky-faint);box-shadow:inset 0 0 0 1px var(--line);font-size:15px;color:var(--ink-soft)}
.act-done .ic{width:20px;height:20px;color:var(--cobalt-deep)}
.act-done b{color:var(--ink)}
@media (max-width:560px){ .act-done{grid-template-columns:24px minmax(0,1fr)} .act-done .link{grid-column:2} }
@media (max-width:560px){
  .act-card{grid-template-columns:68px minmax(0,1fr);gap:14px;padding:18px 16px 20px}
  .act-tile{min-height:84px;border-radius:12px}
  .act-tile b{font-size:30px}
  .act-btns{grid-column:1/-1;margin-top:4px}
  .act-btns .btn{flex:1 1 auto}
}

/* summary */
.summary{margin:0;font-size:clamp(17px,1.5vw,19px);line-height:1.9;color:var(--ink)}
.follow-up{margin:12px 0 0;font-size:15px;color:var(--ink-soft)}
.follow-up a{color:var(--cobalt-deep);font-weight:700;text-underline-offset:4px}
.pending{display:flex;gap:10px;align-items:flex-start;margin:16px 0 0;padding:12px 16px;border-radius:12px;background:var(--grey);font-size:15px;color:var(--ink-soft)}
.pending .ic{width:20px;height:20px;margin-top:3px}

/* incident support box */
.help{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px;align-items:start;padding:20px 22px;border-radius:var(--r-card);background:var(--sky-faint);box-shadow:inset 0 0 0 1px var(--line)}
.help>.ic{width:44px;height:44px;padding:10px;border-radius:12px;background:#fff;color:var(--cobalt-deep);box-shadow:inset 0 0 0 1px var(--line)}
.help h2{font-size:18px;line-height:1.45}
.help p{margin:4px 0 0;font-size:16px;color:var(--ink-soft)}
.help .btn{margin-top:14px}

/* section heads */
.sec-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin-bottom:16px;padding-top:clamp(24px,3vw,32px);border-top:1px solid var(--line)}
.sec-head h2{font-size:clamp(21px,2vw,26px);line-height:1.35}
.sec-head .meta{margin:0}

/* the status tracker */
.trk-card{padding:0}
.trk-next{display:flex;gap:10px;align-items:flex-start;margin:22px 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:16px;color:var(--ink)}
.trk-next .ic{width:20px;height:20px;margin-top:4px;color:var(--cobalt-deep)}
.trk-next b{font-family:var(--round);font-weight:900}
.trk-follow{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:16px}
.trk-follow .meta{margin:0}
.chain{list-style:none;margin:18px 0 0;padding:0}
.chain li{position:relative;padding:0 0 14px 26px;font-size:15px}
.chain li::before{content:"";position:absolute;left:5px;top:9px;width:10px;height:10px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 2px var(--cobalt)}
.chain li::after{content:"";position:absolute;left:9px;top:22px;bottom:0;width:2px;background:var(--line)}
.chain li:last-child::after{display:none}
.chain li.now::before{background:var(--cobalt)}
.chain time{display:block;font-size:14px;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.chain a{color:var(--cobalt-deep);font-weight:700;text-underline-offset:4px}
.chain li.now b{color:var(--ink)}

/* sources timeline */
.src-list{list-style:none;margin:0;padding:0}
/* two columns: who reported it and the headline, then the link out. A row with no link is the text alone. */
.src-list li{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 20px;align-items:center;padding:14px 0 14px}
.src-list li+li{border-top:1px solid var(--line)}
.src-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.src-main b{font-family:var(--round);font-weight:900;font-size:17px;color:var(--ink);line-height:1.4;overflow-wrap:anywhere}
.src-main span{font-size:14px;line-height:1.6;color:var(--ink-soft);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.src-list .link{gap:6px;white-space:nowrap}
.src-list .link .ic{width:16px;height:16px}
.src-card{padding:0;border-bottom:1px solid var(--line)}
.src-foot{display:flex;gap:10px;align-items:flex-start;margin:16px 0 0;font-size:14px;line-height:1.75;color:var(--ink-soft)}
.src-foot .ic{width:18px;height:18px;margin-top:4px;color:var(--ok)}

/* side column: topic, where, share */
.topic-row{display:flex;align-items:center;gap:14px;padding:14px 18px;text-decoration:none;min-height:76px}
.topic-row .cat-ic{width:48px;height:48px;flex:none}
.topic-row span{display:flex;flex-direction:column;flex:1;min-width:0}
.topic-row small{font-size:14px;color:var(--ink-soft)}
.topic-row b{font-family:var(--round);font-weight:900;font-size:17px;line-height:1.4;color:var(--ink)}
.topic-row>.ic{width:22px;height:22px;color:var(--cobalt-deep);transition:transform .2s var(--out)}
.topic-row:hover>.ic{transform:translateX(3px)}

.where{padding:0;overflow:hidden}
.where-tx{padding:16px 20px 18px}
.where-tx b{display:block;font-family:var(--round);font-weight:900;font-size:19px;color:var(--ink)}
.where-tx p{margin:2px 0 0;font-size:14.5px;color:var(--ink-soft)}
.where-tx .link{gap:6px}
.where-tx .link .ic{width:18px;height:18px}

.share-card{padding-top:20px;border-top:1px solid var(--line)}
.share-card h2{font-size:21px}
.share-card p{margin:6px 0 0;font-size:15px;color:var(--ink-soft)}
.share-acts{display:flex;flex-wrap:wrap;gap:14px;margin-top:18px;align-items:center}
.share-acts .btn.line-btn{flex:1 1 180px}
.hype-note{margin:12px 0 0;font-size:14px;color:var(--ink-soft)}

/* hold-to-hype, restyled: amber wash pill, white ring, ink progress; lit = full amber */
.page-story .hype{display:inline-flex;align-items:center;gap:12px;border:0;background:var(--amber-wash);border-radius:6px;padding:5px 20px 5px 5px;min-height:56px;box-shadow:inset 0 0 0 2px #F5DC9C;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation;cursor:pointer;text-align:left;transition:transform .14s var(--out),background-color .2s,box-shadow .14s var(--out)}
.page-story .hype:hover{background:#FFE9B3}
.page-story .hring{position:relative;display:flex;align-items:center;justify-content:center;width:46px;height:46px;flex:none;border-radius:50%;background:#fff;color:var(--ink)}
.page-story .hring svg:not(.ic){position:absolute;inset:0;width:46px;height:46px;transform:rotate(-90deg)}
.page-story .hring .ic{position:relative;width:22px;height:22px}
.page-story .ht{fill:none;stroke:#FFE3A3;stroke-width:4}
.page-story .hf{fill:none;stroke:var(--ink);stroke-width:4;stroke-linecap:round;stroke-dasharray:132;stroke-dashoffset:132}
.page-story .hype.holding{transform:translateY(4px);box-shadow:inset 0 0 0 2px #F5DC9C}
.page-story .hype.holding .hf{stroke-dashoffset:0;transition:stroke-dashoffset .65s linear}
.page-story .htx{display:flex;flex-direction:column;line-height:1.25}
.page-story .htx b{font-family:var(--round);font-weight:900;font-size:21px;color:var(--ink);font-variant-numeric:tabular-nums}
.page-story .htx small{font-size:14px;font-weight:700;color:var(--amber-ink)}
.page-story .hype.on{background:var(--amber);}
.page-story .hype.on .hring{background:var(--ink);color:var(--amber)}
.page-story .hype.on .hf{stroke-dashoffset:0;stroke:var(--ink)}
.page-story .hype.on .htx small{color:var(--ink)}

/* the share sheet and its preview card */
.page-story .share-sub{margin:0;font-size:15px}
.page-story .ogcard{margin:16px 0 22px;border-radius:12px;overflow:hidden;background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
.page-story .ogimg{position:relative;aspect-ratio:1.91/1;overflow:hidden}
.page-story .ogtag{position:absolute;left:14px;top:12px;padding:3px 12px;border-radius:6px;background:#fff;color:var(--cobalt-deep);font-family:var(--round);font-weight:900;font-size:14px;box-shadow:inset 0 0 0 1px var(--line)}
.page-story .ogtx{display:flex;flex-direction:column;gap:2px;padding:12px 16px 14px;border-top:1px solid var(--line)}
.page-story .ogtx b{font-family:var(--round);font-weight:900;font-size:16.5px;line-height:1.45;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.page-story .ogtx span{font-size:14px;color:var(--ink-soft)}
.page-story .ogtx small{font-size:14px;color:var(--ink-soft)}
.page-story .sbtns{display:grid;gap:14px}
.page-story .sbtns .btn{white-space:normal;word-break:break-all;text-align:center}
/* the art inside the preview (built in story.html) */
.og-art{position:absolute;inset:0;display:flex;align-items:center;gap:16px;padding:40px 22px 16px;background:var(--sky)}
.og-art.grey{background:var(--grey)}
.og-art .cat-ic{width:72px;height:72px;flex:none;border-radius:12px;}
.og-art.grey .cat-ic{}
.og-art .og-k{display:flex;flex-direction:column;min-width:0;padding-right:70px}
.og-art .og-k b{font-family:var(--round);font-weight:900;font-size:19px;line-height:1.3;color:var(--ink)}
.og-art .og-k span{font-size:14px;color:var(--ink-soft);font-weight:700}
.og-art .og-q{position:absolute;right:10px;bottom:-14px;width:84px;height:auto}

/* not found */
.s-empty{padding:72px 0;text-align:center}
.s-empty p{color:var(--ink-soft)}

@media (max-width:560px){
  .sec-head{margin-bottom:12px}
  .src-list li{grid-template-columns:minmax(0,1fr);gap:2px 12px}
  .src-list .link{justify-self:start;min-height:44px;margin:-6px 0 -8px}
  .help{padding:18px 16px;grid-template-columns:1fr}
  .og-art{padding:38px 16px 12px;gap:12px}
  .og-art .cat-ic{width:56px;height:56px;border-radius:12px}
  .og-art .og-k b{font-size:16px}
  .og-art .og-q{width:70px}
}
@media (prefers-reduced-motion:reduce){
  .roadfill,.bus{transition:none}
}

/* the shape of a story while it is arriving (story.html); the server-rendered article or pages/story.js replaces it */
.sk-story{max-width:720px;margin:0 auto;padding:24px 0 56px}
.sk-story .sk-h{margin:0 0 22px;width:80%}

/* Server-rendered article (app/seo.py): a plain version of the story for readers and crawlers without
   JavaScript. pages/story.js replaces it ([data-ssr]) once the feed loads. */
.ssr-story{max-width:720px;margin:0 auto;padding:8px 0 56px}
.ssr-title{font-size:clamp(27px,3vw,40px);line-height:1.3;letter-spacing:.01em;text-wrap:balance}
.ssr-meta{display:flex;flex-wrap:wrap;gap:4px 12px;margin:14px 0 0;font-size:14.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.ssr-place{font-weight:700;color:var(--ink)}
.ssr-summary{margin:20px 0 0;font-size:17px;line-height:1.85;color:var(--ink)}
.ssr-h{margin:36px 0 6px;font-size:20px}
.ssr-sources{list-style:none;margin:0;padding:0}
.ssr-sources li{display:flex;flex-direction:column;gap:2px;padding:12px 0}
.ssr-sources li+li{border-top:1px solid var(--line)}
.ssr-sources a,.ssr-related a{color:var(--cobalt-deep);font-weight:700}
.ssr-src-meta{font-size:14px;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.ssr-related{margin:24px 0 0;color:var(--ink-soft)}
