/* Pinnacle Post — screen */
:root {
  --paper: #f8f5ee;
  --paper-2: #f1ecdf;
  --ink: #191b1d;
  --ink-soft: #3d4145;
  --muted: #7a7568;
  --line: #ddd5c2;
  --accent: #0f3d2e;
  --accent-2: #a9853d;
  --up: #1d6b3c;
  --dn: #a33b2e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* CJK editions get their own type stacks and a calmer rhythm */
.lang-zh { font-family: "PingFang TC", "Hiragino Sans GB", "Microsoft JhengHei", "Noto Sans TC", var(--sans); }
.lang-zh h1, .lang-zh h2, .lang-zh h3, .lang-zh h4 { font-family: "Noto Serif TC", "Songti TC", "PMingLiU", "Hiragino Mincho ProN", var(--serif); }
.lang-ja { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans JP", var(--sans); }
.lang-ja h1, .lang-ja h2, .lang-ja h3, .lang-ja h4 { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", var(--serif); }
.lang-zh .article-body, .lang-ja .article-body { line-height: 1.95; letter-spacing: .015em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.notice { background: #e7efdf; border: 1px solid #b9cf9d; padding: 10px 14px; border-radius: 4px; margin: 12px 0; }
code { background: var(--paper-2); padding: 1px 5px; border-radius: 3px; font-size: .85em; }

/* masthead */
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.mast-top {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .78rem; color: var(--muted); padding-top: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mast-editions a, .mast-editions strong { margin-left: 10px; }
.mast-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  background: var(--accent); color: var(--paper); font-family: var(--serif);
  font-weight: 700; font-size: 1.25rem; padding: 6px 10px; border-radius: 3px; letter-spacing: .02em;
}
.brand-name { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .01em; }
.brand-name em { font-style: italic; color: var(--accent); }
.mast-search { display: flex; gap: 6px; }
.mast-search input {
  border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 3px;
  font-size: .9rem; width: 220px; max-width: 46vw;
}
.mast-search button {
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  padding: 8px 12px; border-radius: 3px; cursor: pointer;
}
.mast-nav { border-top: 1px solid var(--line); }
.nav-scroll { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.mast-nav a {
  display: block; padding: 10px 14px; font-size: .92rem; letter-spacing: .02em;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.mast-nav a.on, .mast-nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ticker */
.ticker { background: var(--accent); color: #e9e4d4; font-size: .78rem; }
.ticker-scroll { display: flex; gap: 26px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; white-space: nowrap; scrollbar-width: none; }
.ticker-scroll::-webkit-scrollbar { display: none; }
.tk b { color: #fff; font-weight: 600; margin-right: 4px; }
.tk i { font-style: normal; margin-left: 6px; }
.up { color: #7fc98f; }
.dn { color: #ef9b8d; }

main.wrap { padding-top: 26px; padding-bottom: 40px; min-height: 50vh; }

/* home hero */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-bottom: 44px; }
.hero-main h1 { font-size: 2.35rem; margin: 10px 0 10px; letter-spacing: -.01em; }
.hero-main .cover { border-radius: 4px; margin-bottom: 14px; width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: filter .18s ease; }
.hero-main a:hover .cover { filter: brightness(.94); }
.hero-main a:hover h1 { color: var(--accent); }
.kicker {
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-2); font-weight: 700; margin-bottom: 4px;
}
.standfirst { color: var(--ink-soft); font-size: 1.02rem; }
.byline { margin-top: 8px; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.card-row { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.card-row a { display: flex; gap: 14px; align-items: flex-start; }
.card-row .row-text { flex: 1; min-width: 0; }
.card-row h3 { font-size: 1.05rem; margin: 2px 0 6px; }
.card-row a:hover h3 { color: var(--accent); }
.thumb { width: 96px; flex: none; aspect-ratio: 3/2; object-fit: cover; border-radius: 3px; transition: filter .18s ease; }
.card-row a:hover .thumb { filter: brightness(.94); }
.trending-box { background: var(--paper-2); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px; padding: 14px 16px; }
.trending-box h3 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.trending-list { list-style: none; counter-reset: trend; display: grid; gap: 10px; font-size: .9rem; padding-left: 0; }
.trending-list li { counter-increment: trend; display: flex; gap: 10px; align-items: baseline; }
.trending-list li::before { content: counter(trend); font-family: var(--serif); font-weight: 700; color: var(--accent-2); font-size: 1.05rem; flex: none; }
.trending-list a:hover { text-decoration: underline; }

/* channel blocks & cards */
.channel-block { margin-bottom: 48px; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--ink); margin-bottom: 18px; padding-bottom: 6px;
}
.block-head h2 { font-size: 1.4rem; letter-spacing: -.01em; }
.more { font-size: .85rem; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 20px; }
.card h3 { font-size: 1.02rem; margin: 10px 0 4px; }
.card a:hover h3 { color: var(--accent); }
.card .cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; transition: filter .18s ease; }
.card a:hover .cover { filter: brightness(.93); }
.card .standfirst.small { margin-top: 2px; }
.card .muted.small { margin-top: 6px; }
.card-lead { grid-column: span 2; grid-row: span 2; }
.card-lead h3 { font-size: 1.35rem; letter-spacing: -.01em; }

/* channel river */
.channel-head { margin-bottom: 22px; max-width: 720px; }
.channel-head h1 { font-size: 2rem; }
.dek { color: var(--muted); margin-top: 6px; }
.river { max-width: 860px; }
.river-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.river-item h2 { font-size: 1.3rem; margin: 4px 0 6px; }
.river-link { display: flex; gap: 24px; align-items: flex-start; }
.river-text { flex: 1; min-width: 0; }
.river-link:hover h2 { color: var(--accent); }
.river-thumb { width: 220px; flex: none; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; transition: filter .18s ease; }
.river-link:hover .river-thumb { filter: brightness(.94); }
.river-lead h2 { font-size: 1.8rem; letter-spacing: -.01em; }
.river-lead a:hover h2 { color: var(--accent); }
.river-lead .cover { border-radius: 4px; margin-bottom: 12px; width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: filter .18s ease; }
.river-lead a:hover .cover { filter: brightness(.94); }
.river-title { font-size: 1.2rem; margin-bottom: 6px; }
.pager { display: flex; gap: 16px; align-items: center; margin-top: 22px; }
.pager a { border: 1px solid var(--line); padding: 6px 14px; border-radius: 3px; }

/* article */
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.crumbs .sep { margin: 0 8px; }
.article-head { max-width: 760px; margin: 0 auto 18px; }
.article-head h1 { font-size: 2.3rem; margin: 8px 0 12px; }
.article-head .standfirst { font-size: 1.15rem; }
.byline { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font-size: .88rem; margin-top: 12px; color: var(--ink-soft); }
.by-author { font-weight: 600; color: var(--accent); }
.article-cover { max-width: 980px; margin: 18px auto 26px; }
.article-cover img { border-radius: 4px; }
.article-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; max-width: 980px; margin: 0 auto; }
.article-aside { font-size: .88rem; }
.article-aside .toc { position: sticky; top: 16px; border-left: 3px solid var(--line); padding-left: 14px; display: grid; gap: 8px; margin-bottom: 24px; }
.article-aside .toc h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.article-body { max-width: 680px; font-size: 1.06rem; line-height: 1.75; }
.article-body > p { margin-bottom: 1.25em; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.1em; float: left; line-height: .85;
  padding: 4px 10px 0 0; color: var(--accent);
}
.lang-zh .article-body > p:first-of-type::first-letter,
.lang-ja .article-body > p:first-of-type::first-letter { font-size: 2.6em; padding: 2px 10px 0 0; }
.article-body h2 {
  font-size: 1.42rem; margin: 1.8em 0 .7em; padding-left: 12px;
  border-left: 4px solid var(--accent-2); line-height: 1.25;
}
.article-body h3 { font-size: 1.18rem; margin: 1.5em 0 .55em; }
.article-body ul, .article-body ol { margin: 0 0 1.25em 1.4em; }
.article-body li { margin-bottom: .45em; }
.article-body blockquote {
  border: none; padding: 8px 24px; margin: 1.8em 0;
  font-family: var(--serif); font-style: italic; font-size: 1.28em; line-height: 1.5;
  color: var(--accent); text-align: center; position: relative;
}
.article-body blockquote::before {
  content: "“"; display: block; font-size: 2.2em; line-height: .5;
  color: var(--accent-2); margin-bottom: 8px;
}
.article-body figure { margin: 1.4em 0; }
.article-body figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-color: #b7c4bd; text-underline-offset: 3px; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.read-also {
  background: var(--paper-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 14px 18px; margin: 1.6em 0; border-radius: 3px;
}
.read-also-label { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.read-also a { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; text-decoration: none; }

/* key-points box at the top of every feature */
.key-points {
  max-width: 680px; margin: 0 auto 30px; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: 4px; padding: 18px 22px;
}
.key-points h3 {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.key-points ul { list-style: none; display: grid; gap: 9px; }
.key-points li { position: relative; padding-left: 20px; font-size: .95rem; line-height: 1.5; }
.key-points li::before {
  content: ""; position: absolute; left: 2px; top: .52em;
  width: 7px; height: 7px; background: var(--accent-2); transform: rotate(45deg);
}

/* reading progress */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent-2); z-index: 60; transition: width .1s linear;
}
.article-foot { margin-top: 2em; border-top: 1px solid var(--line); padding-top: 1.2em; }
.tags { font-size: .88rem; }
.tag {
  display: inline-block; border: 1px solid var(--line); border-radius: 20px;
  padding: 2px 12px; margin: 4px 4px 0 0; font-size: .82rem; background: #fff;
}
.author-box { display: flex; gap: 14px; margin-top: 22px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.author-dot {
  --hue: 150;
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: hsl(var(--hue), 34%, 32%); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.2rem;
}
.author-dot.big { width: 72px; height: 72px; font-size: 1.9rem; }
.author-name { font-weight: 700; }
.author-head { display: flex; gap: 20px; align-items: flex-start; max-width: 760px; margin-bottom: 26px; }

/* rails */
.rail { margin-top: 40px; }
.rail h2 { font-size: 1.3rem; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 16px; }

/* ads: invisible until a network tag is pasted */
.ad { margin: 18px auto; text-align: center; clear: both; }
.ad:empty { display: none; }

/* search */
.search-big { display: flex; gap: 8px; margin-top: 14px; max-width: 560px; }
.search-big input { flex: 1; border: 1px solid var(--line); background: #fff; padding: 10px 14px; font-size: 1rem; border-radius: 3px; }
.search-big button { background: var(--accent); color: #fff; border: none; padding: 10px 20px; border-radius: 3px; cursor: pointer; }
.search-none { padding: 24px 0; color: var(--muted); max-width: 520px; }

/* static pages & errors */
.static-page .article-body { margin: 0 auto; }
.error-page { text-align: center; padding: 60px 0; }
.error-page h1 { font-size: 1.8rem; margin-bottom: 10px; }

/* footer */
.colophon { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: 40px; }
.colophon-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-top: 34px; padding-bottom: 34px; }
.colophon h4 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-family: var(--sans); }
.colophon a { display: block; margin-bottom: 7px; font-size: .9rem; }
.foot-brand { margin-bottom: 12px; }

/* ============ portal (2p.hk) ============ */
.tpl-portal { background: #101418; color: #e8e4da; }
.tpl-portal .wrap { max-width: 1080px; }
.tpl-portal a:hover { color: var(--accent-2); }
.portal-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-top: 30px; padding-bottom: 18px; border-bottom: 1px solid #2a2f36; }
.tpl-portal .brand-mark { background: var(--accent-2); color: #101418; }
.tpl-portal .brand-name { color: #f4f0e4; }
.tpl-portal .brand-name em { color: var(--accent-2); }
.portal-tag { color: #8b9096; font-size: .9rem; flex: 1; }
.portal-editions a { margin-left: 14px; font-size: .85rem; color: #b8b2a2; }
.portal-ticker { margin: 26px 0; }
.portal-ticker h2, .portal-wire h2, .portal-section h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #8b9096; font-family: var(--sans); margin-bottom: 12px; }
.tape { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tape-cell { background: #171c22; border: 1px solid #262c34; border-radius: 4px; padding: 10px 12px; display: grid; gap: 2px; }
.tape-cell b { color: #f0ead8; font-size: .85rem; }
.tape-cell span { font-family: var(--serif); font-size: 1.15rem; }
.tape-cell i { font-style: normal; font-size: .78rem; }
.tpl-portal .up { color: #6fbf82; }
.tpl-portal .dn { color: #e0826f; }
.portal-wire { margin-bottom: 30px; }
.wire-list { list-style: none; display: grid; gap: 8px; }
.wire-list a { display: block; padding: 8px 0; border-bottom: 1px solid #20262d; font-size: .95rem; }
.wire-time, .wire-ed { display: inline-block; margin-right: 8px; font-size: .78rem; }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin: 10px 0 40px; }
.portal-section { background: #151a20; border: 1px solid #232a32; border-radius: 6px; padding: 18px; }
.portal-section h2 { color: var(--accent-2); }
.dir-list { list-style: none; margin-top: 10px; display: grid; gap: 10px; }
.dir-list li a { color: #f0ead8; font-weight: 600; font-size: .95rem; }
.dir-list li span { display: block; color: #878e96; font-size: .78rem; margin-top: 1px; }
.tpl-portal .colophon { background: none; border-top-color: #2a2f36; }
.more { color: #8b9096; font-size: .78rem; }

/* ============ desk (admin) ============ */
.tpl-admin, .tpl-admin-login { background: #f4f5f6; }
.admin-head { display: flex; align-items: center; gap: 22px; padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid #d8dce0; flex-wrap: wrap; }
.admin-head .brand-name { font-size: 1.2rem; }
.admin-head nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.admin-head nav a { padding: 6px 10px; border-radius: 4px; font-size: .9rem; }
.admin-head nav a:hover { background: #e5e9ec; }
.admin-main { padding-top: 22px; padding-bottom: 40px; }
.admin-main h1 { font-size: 1.5rem; margin-bottom: 14px; }
.admin-main h2 { font-size: 1.1rem; margin: 26px 0 10px; }
.admin-cards { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 20px; }
.admin-card { background: #fff; border: 1px solid #dde1e5; border-radius: 6px; padding: 14px 20px; min-width: 130px; }
.admin-card b { font-size: 1.5rem; display: block; }
.admin-card span { color: #667; font-size: .8rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #dde1e5; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eceff1; vertical-align: top; }
.admin-table th { background: #f0f2f4; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #556; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.admin-filters { margin-bottom: 12px; font-size: .9rem; }
.admin-filters a { margin-right: 10px; color: #457; }
.admin-filters a.on { font-weight: 700; color: var(--ink); }
.pill { font-size: .75rem; padding: 2px 9px; border-radius: 12px; background: #e5e9ec; }
.pill-published { background: #dcefdc; }
.pill-queued { background: #f4e9c8; }
.pill-draft { background: #e8e8e8; }
.pill-parked { background: #f0d9d4; }
.edit-form .edit-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.edit-form label, .token-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 12px; }
.edit-form input[type=text], .edit-form select, .edit-form textarea,
.token-form input, .queue-form input, .queue-form select {
  width: 100%; margin-top: 4px; border: 1px solid #cdd3d8; border-radius: 4px;
  padding: 8px 10px; font-size: .92rem; background: #fff; font-family: inherit;
}
.edit-form textarea { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; }
.edit-side { background: #fff; border: 1px solid #dde1e5; border-radius: 6px; padding: 16px; }
button { background: var(--accent); color: #fff; border: none; border-radius: 4px; padding: 9px 18px; font-size: .9rem; cursor: pointer; }
button:hover { opacity: .9; }
button.link, .link { background: none; color: #457; padding: 0; font-size: .85rem; text-decoration: underline; }
button.danger { background: #8c3a2d; }
.inline { display: inline; }
.queue-form { display: grid; grid-template-columns: 2fr 80px 160px 90px 1fr auto; gap: 8px; margin-bottom: 20px; background: #fff; border: 1px solid #dde1e5; border-radius: 6px; padding: 12px; }
.slot-box { border: 1px solid #dde1e5; border-radius: 6px; background: #fff; padding: 14px; margin-bottom: 14px; }
.slot-box legend { font-size: .85rem; font-weight: 700; padding: 0 6px; }
.slot-box legend code { font-weight: 400; margin-left: 8px; }
.slot-box .switch { float: right; font-weight: 400; }
.slot-box textarea { width: 100%; border: 1px solid #cdd3d8; border-radius: 4px; padding: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }
.token-form { background: #fff; border: 1px solid #dde1e5; border-radius: 6px; padding: 16px; margin-bottom: 20px; }
.token-scopes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.token-scopes label { font-weight: 400; font-size: .88rem; margin-bottom: 4px; }
.token-reveal code { display: block; font-size: 1.05rem; background: #fffbe8; padding: 12px; border: 1px dashed #c8b45a; margin-top: 8px; word-break: break-all; }
.robots-editor { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; padding: 12px; border: 1px solid #cdd3d8; border-radius: 4px; margin-bottom: 12px; }
.log-tail { background: #14181c; color: #b9c4c9; font-size: .78rem; padding: 12px; border-radius: 6px; max-height: 300px; overflow: auto; white-space: pre-wrap; }
.login-box { max-width: 340px; margin: 12vh auto; background: #fff; border: 1px solid #dde1e5; border-radius: 8px; padding: 28px; }
.login-box .brand { margin-bottom: 18px; }
.login-box label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 12px; }
.login-box input { width: 100%; margin-top: 4px; border: 1px solid #cdd3d8; border-radius: 4px; padding: 9px 10px; }
.login-box button { width: 100%; margin-top: 6px; }
.login-error { background: #f7e3de; border: 1px solid #dfa295; padding: 8px 12px; border-radius: 4px; font-size: .85rem; margin-bottom: 12px; }
.button-link { display: inline-block; margin-left: 10px; font-size: .85rem; color: #457; }

/* ============ responsive ============ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .article-aside { order: 2; }
  .article-aside .toc { position: static; }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .edit-form .edit-grid, .admin-cols, .token-scopes { grid-template-columns: 1fr; }
  .queue-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  html { font-size: 16px; }
  .mast-brand { flex-direction: column; align-items: flex-start; }
  .mast-search { width: 100%; }
  .mast-search input { flex: 1; max-width: none; }
  .hero-main h1 { font-size: 1.6rem; }
  .article-head h1 { font-size: 1.7rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card-lead { grid-column: span 1; grid-row: span 1; }
  .river-thumb { width: 130px; }
  .river-link { gap: 14px; }
  .river-item h2 { font-size: 1.12rem; }
  .portal-grid { grid-template-columns: 1fr; }
  .colophon-grid { grid-template-columns: 1fr; }
  .queue-form { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
}

@media print {
  .masthead, .colophon, .article-aside, .ad, .rail { display: none; }
  body { background: #fff; }
}
