/* Layout idea: the channel's own colours used in big blocks. Teal carries the brand (header, hero, page heads),
   orange is the button you press, cards sit on hard coloured shadows like the frames in the channel's thumbnails. */
:root {
  color-scheme: light;
  --paper: #f7f1e3;
  --card: #ffffff;
  --ink: #0e2a30;
  --muted: #536a6d;
  --teal: #0f7f78;
  --teal-deep: #0a5f5a;
  --teal-tint: #d7efea;
  --key: #f08a2e;
  --key-tint: #fde3c6;
  --red: #d8504a;
  --red-tint: #fbdcd8;
  --line: #e2d9c3;
  --warn: #8a5300;
  --warn-bg: #fdeccb;
  --bad: #a8261d;
  --bad-bg: #fbe1dc;
  --ok: #0b6a52;
  --ok-bg: #dff1e6;
  --display: "Alexandria", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", Tahoma, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.85;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-block: 28px 72px; }
.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; font-weight: 800; line-height: 1.45; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
a { color: var(--teal-deep); text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--key); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
code { font-size: 0.9em; direction: ltr; unicode-bidi: isolate; background: rgba(14, 42, 48, 0.08); padding: 1px 6px; border-radius: 5px; }
.num, .stamp, .dur { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ic { flex: none; vertical-align: -4px; }

/* the button */
.press {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.4;
  color: var(--ink); background: var(--key); text-decoration: none;
  border: 3px solid var(--ink); border-radius: 16px; padding: 12px 28px;
  box-shadow: 0 6px 0 var(--ink); transition: transform 80ms, box-shadow 80ms;
}
.press:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--ink); }
.press:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.press-ink { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 0 rgba(14, 42, 48, 0.35); }
.press-ink:hover { box-shadow: 0 4px 0 rgba(14, 42, 48, 0.35); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* header */
.top { background: var(--teal); color: #fff; border-bottom: 4px solid var(--ink); }
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 23px; color: #fff; text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; background: var(--key-tint); }
.brand-key { width: 26px; height: 26px; border-radius: 50%; background: var(--key); border: 3px solid #fff; }
.top-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.top-nav a { display: inline-flex; align-items: center; gap: 7px; color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 999px; }
.top-nav a:hover { background: rgba(255, 255, 255, 0.16); }
.top-search { flex-direction: row; gap: 0; align-items: stretch; margin-inline-start: 6px; }
.top-search input { width: 170px; border: 2px solid var(--ink); border-inline-end: 0; border-radius: 0 999px 999px 0; padding: 4px 14px; font-size: 15px; background: #fff; }
.top-search button { border-radius: 999px 0 0 999px; padding: 4px 14px; font-size: 15px; background: var(--ink); }
.top-nav .top-sub { background: var(--key); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); margin-inline-start: 6px; }
.top-nav .top-sub:hover { background: var(--key); transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }

/* footer */
.foot { background: var(--ink); color: #dfe9e8; font-size: 15px; padding-block: 28px; }
.foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px; }
.foot nav { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.foot a { color: #fff; }

/* home */
.cover { border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; aspect-ratio: 6.2 / 1; margin-bottom: 22px; background: var(--line); box-shadow: 0 7px 0 var(--key); }
.cover img { width: 100%; height: 100%; object-fit: cover; }

.hero {
  background: var(--teal); color: #fff; border: 3px solid var(--ink); border-radius: 26px;
  padding: 36px 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center;
  box-shadow: 0 9px 0 var(--ink);
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; }
.hero h1 { font-family: var(--body); font-weight: 600; font-size: 16px; color: #d5f1ed; }
.hero h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.45; }
.hero h2 a { color: #fff; text-decoration: none; }
.hero p { font-size: 18px; color: #e6f6f4; max-width: 50ch; }
.hero-go { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 4px; padding-bottom: 6px; }
.hero-meta { color: #d5f1ed; font-size: 15px; }
.hero-thumb { border: 4px solid #fff; border-radius: 18px; overflow: hidden; background: var(--teal-deep); aspect-ratio: 16 / 9; transform: rotate(-2deg); box-shadow: 10px 10px 0 var(--key); }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14.5px; border-radius: 999px; padding: 3px 14px; }
.chip-key { background: var(--key); color: var(--ink); border: 2px solid var(--ink); }

.chip-link { background: var(--card); color: var(--ink); border: 2px solid var(--ink); text-decoration: none; }
.chip-link:hover, .chip-link.is-on { background: var(--key); }
.topic-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-weight: 600; }
.video .topic-row { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.tile { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; color: var(--ink); text-decoration: none; border: 3px solid var(--ink); border-radius: 18px; padding: 16px 20px; box-shadow: 0 6px 0 var(--ink); transition: transform 80ms, box-shadow 80ms; }
.tile:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--ink); }
.tile .ic { grid-row: 1 / 3; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--ink); color: #fff; }
.tile-name { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.4; }
.tile-count { font-size: 14.5px; }
.tile-teal { background: var(--teal-tint); }
.tile-key { background: var(--key-tint); }
.tile-red { background: var(--red-tint); }

.band { margin-top: 64px; }
.band-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 22px; }
.band-head h2 { display: inline-flex; align-items: center; gap: 10px; }
.band-head h2::before { content: ""; width: 12px; height: 30px; border-radius: 4px; background: var(--key); border: 2px solid var(--ink); }
.band-head h2:has(.ic)::before { display: none; }
.more-link { font-weight: 600; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 16px; text-decoration: none; color: var(--ink); }
.more-link:hover { background: var(--key-tint); }
.band-key, .band-teal { border: 3px solid var(--ink); border-radius: 26px; padding: 28px 30px 30px; }
.band-key { background: var(--key-tint); }
.band-teal { background: var(--teal-tint); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; }
/* exactly 2 or 4 cards: two columns, so no card sits alone on a row */
.grid:has(> :nth-child(2):last-child), .grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--card); color: var(--ink); text-decoration: none; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 7px 0 var(--teal); transition: transform 80ms, box-shadow 80ms; min-width: 0; }
.grid > .card:nth-child(3n + 2) { box-shadow: 0 7px 0 var(--key); }
.grid > .card:nth-child(3n) { box-shadow: 0 7px 0 var(--red); }
.card:hover { transform: translateY(-3px); }
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--line); border-bottom: 3px solid var(--ink); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card-title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.6; }
.card-text { font-size: 15px; color: var(--muted); line-height: 1.75; }
.card-meta { color: var(--muted); font-size: 14px; margin-top: auto; }
.dur { position: absolute; bottom: 8px; left: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; padding: 1px 8px; border-radius: 7px; }

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.strip-wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); overflow: visible; gap: 26px 18px; }
.short { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; scroll-snap-align: start; min-width: 0; }
.short-thumb { border-radius: 16px; overflow: hidden; background: var(--line); aspect-ratio: 9 / 16; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform 80ms; }
.short:hover .short-thumb { transform: translateY(-3px); }
.short-thumb img { width: 100%; height: 100%; object-fit: cover; }
.short-title { font-weight: 600; font-size: 15px; line-height: 1.65; }

.follow { margin-top: 64px; background: var(--key); border: 3px solid var(--ink); border-radius: 26px; padding: 26px 32px 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; box-shadow: 0 9px 0 var(--ink); }
.follow-face { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; background: var(--key-tint); }
.follow-text { flex: 1 1 260px; }
.follow-links { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 6px; }
.press-light { background: #fff; font-size: 16px; padding: 10px 20px; }
.news { flex: 1 1 100%; border-top: 3px solid var(--ink); padding-top: 16px; gap: 8px; }
.news label { margin: 0; }
.news-row { display: flex; gap: 10px; flex-wrap: wrap; }
.news-row input[type="email"] { flex: 1 1 240px; font: inherit; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 14px; background: #fff; color: var(--ink); }
.news-row button { border-radius: 12px; }
.news-note, .news-msg { font-size: 14.5px; }
.news-msg { font-weight: 700; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 22px; font-weight: 600; }
.share a, .share button { background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 16px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { background: var(--key-tint); }
.card-cat { align-self: flex-start; font-size: 13px; font-weight: 600; background: var(--red-tint); border-radius: 999px; padding: 0 10px; }
.qa { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 2px solid var(--line); }
.qa:first-of-type { border-top: 0; padding-top: 0; }
.transcript summary { font-family: var(--display); font-weight: 700; font-size: 19px; cursor: pointer; }
.transcript[open] summary { margin-bottom: 6px; }
.table-scroll { overflow-x: auto; border: 3px solid var(--ink); border-radius: 14px; }
.prose table { font-size: 16.5px; }
.band-first { margin-top: 0; }
.search-big { flex-direction: row; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.search-big input { flex: 1 1 260px; font: inherit; border: 3px solid var(--ink); border-radius: 12px; padding: 9px 14px; color: var(--ink); background: #fff; }
.search-big button { border-radius: 12px; }
.follow-big { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.5; }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 48px; }
.pager a { font-weight: 600; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 20px; text-decoration: none; color: var(--ink); justify-self: start; }
.pager a:last-child, .pager span:last-child { justify-self: end; }
.pager-pos { color: var(--muted); font-size: 14.5px; }
.empty { color: var(--muted); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14.5px; color: var(--muted); }
.crumbs a { color: inherit; }

/* coloured page heads: lists, fixed pages, articles */
.page-head { background: var(--teal); color: #fff; border: 3px solid var(--ink); border-radius: 26px; padding: 28px 34px 32px; margin-bottom: 34px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 0 var(--ink); }
.page-head h1 { display: flex; align-items: center; gap: 14px; font-size: clamp(28px, 4vw, 40px); }
.page-head h1 .ic { width: 38px; height: 38px; }
.page-head .crumbs, .page-head .crumbs a, .page-head .meta, .page-head .meta a { color: rgba(255, 255, 255, 0.86); }
.page-head-key { background: var(--key); color: var(--ink); }
.page-head-key .crumbs, .page-head-key .crumbs a { color: var(--ink); }
.page-head-red { background: var(--red); }

.article { max-width: 820px; margin-inline: auto; }
.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 3px solid var(--ink); border-radius: 22px; margin-bottom: 28px; }
.sheet { background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 14px; }
.sheet-teal { background: var(--teal-tint); }
.sheet-key { background: var(--key-tint); }
.prose h2 { margin-top: 18px; padding-top: 20px; border-top: 3px solid var(--ink); }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 8px; }
.prose p, .prose li { font-size: 18px; overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0; padding-inline-start: 26px; display: flex; flex-direction: column; gap: 6px; }
.prose figure { margin: 6px 0; }
.embed { aspect-ratio: 16 / 9; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--ink); }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-link { font-size: 15.5px !important; margin-top: -6px; }
.prose figure img { border: 3px solid var(--ink); border-radius: 16px; }
.prose figcaption { font-size: 14.5px; color: var(--muted); margin-top: 6px; }

/* video page */
.video { max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.video h1 { font-size: clamp(26px, 4vw, 38px); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 15px; align-items: center; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.player { aspect-ratio: 16 / 9; background: var(--ink); border: 4px solid var(--ink); border-radius: 22px; overflow: hidden; margin-block: 8px 12px; box-shadow: 0 9px 0 var(--teal); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.is-short .player { aspect-ratio: 9 / 16; max-width: 360px; width: 100%; margin-inline: auto; }
.video .sheet { margin-top: 10px; }
.video .sheet p { max-width: 68ch; font-size: 18px; }
.chapters, .sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chapters a { display: grid; grid-template-columns: 66px 1fr; gap: 14px; align-items: center; padding: 7px 10px; margin-inline: -10px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500; }
.chapters a:hover { background: #fff; }
.stamp { font-weight: 700; font-size: 14.5px; color: #fff; background: var(--teal); border-radius: 8px; text-align: center; padding: 1px 0; }
.sources { gap: 10px; }
.sources li { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.host { color: var(--muted); font-size: 13.5px; direction: ltr; unicode-bidi: isolate; }
.video .follow { margin-top: 30px; }

.ad { margin-block: 26px; padding: 10px 0; border-block: 2px dashed var(--line); min-height: 120px; }
.ad-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.notice { max-width: 560px; margin: 48px auto; display: flex; flex-direction: column; gap: 12px; }

/* control panel: same colours, calmer surfaces */
.is-admin h1 { font-size: 26px; margin-bottom: 18px; }
.is-admin h2 { font-size: 19px; font-weight: 700; }
.who { flex-direction: row; align-items: center; gap: 14px; font-size: 15px; }
.who button.quiet { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.is-admin .hint { font-size: 15.5px; color: #40585b; }
.is-admin table { font-size: 16px; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 32px; align-items: start; padding-block: 26px 72px; flex: 1; max-width: 1320px; }
.panel { min-width: 0; padding: 0; }
.side { position: sticky; top: 18px; background: var(--card); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 12px 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 0 var(--teal); }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 12px 2px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; line-height: 1.5; }
.side a:hover { background: var(--teal-tint); }
.side a[aria-current="page"] { background: var(--ink); color: #fff; }
.side .side-site { justify-content: center; border: 2px solid var(--ink); font-size: 15px; margin-top: 2px; }
.intro { background: var(--teal-tint); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 18px; margin-bottom: 22px; font-size: 16.5px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 14px 18px 16px; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; box-shadow: 0 5px 0 var(--ink); }
.stat:hover { background: var(--teal-tint); }
.stat-num { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-name { font-size: 15px; }
.stat-warn { background: var(--warn-bg); }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.todo li { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.todo-n { width: 34px; height: 34px; border-radius: 50%; background: var(--key); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; }
.todo-text { font-size: 16.5px; }
.todo .btn { white-space: nowrap; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; }
.quick a { display: inline-flex; align-items: center; gap: 9px; background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
.quick a:hover { background: var(--key-tint); }
button .ic, .btn .ic { margin-inline-end: 8px; }

/* article editor */
.post-form { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.post-main, .post-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.post-side { gap: 16px; position: sticky; top: 18px; }
.side-card { background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.side-card label { margin-top: 0; }
button.wide { width: 100%; padding-block: 11px; font-size: 17px; background: var(--key); color: var(--ink); box-shadow: 0 4px 0 var(--ink); margin-block: 4px 6px; }
.big-input { font-family: var(--display) !important; font-weight: 700 !important; font-size: 21px !important; padding-block: 12px !important; }
.editor { border: 3px solid var(--ink); border-radius: 18px; background: var(--card); overflow: hidden; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: var(--teal-tint); border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 2; }
.ed-bar button { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 9px; padding: 4px 12px; font-size: 15px; }
.ed-bar button:hover { background: var(--key-tint); }
.ed-sep { width: 2px; background: var(--ink); opacity: 0.25; margin-inline: 4px; }
.ed-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 14px 16px; background: var(--key-tint); border-bottom: 3px solid var(--ink); }
.ed-panel[hidden] { display: none; }
.ed-panel label { margin: 0; font-size: 15px; flex: 1 1 100%; }
.ed-panel input[type="text"], .ed-panel select { flex: 1 1 240px; width: auto; }
.ed-status { flex: 1 1 100%; font-weight: 600; font-size: 15px; }
.ed-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ed-split textarea { border: 0; border-radius: 0; border-inline-end: 3px solid var(--ink); min-height: 560px; font-size: 17px; padding: 16px 18px; resize: vertical; }
.ed-preview { border: 0 !important; border-radius: 0 !important; max-height: 760px; overflow-y: auto; }
.no-preview .ed-split { grid-template-columns: 1fr; }
.no-preview .ed-split textarea { border-inline-end: 0; }
.no-preview .ed-preview { display: none; }
.editor > .hint { padding: 8px 16px; border-top: 2px solid var(--line); }
.ed-video img { border: 3px solid var(--ink); border-radius: 14px; width: 100%; }
.cover-preview { border: 2px solid var(--ink); border-radius: 10px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cover-preview[hidden] { display: none; }
.flash { background: var(--ok-bg); color: var(--ok); border: 2px solid var(--ok); border-radius: 12px; padding: 10px 16px; margin-bottom: 20px; font-weight: 600; }
.form-page { max-width: 440px; margin: 24px auto; display: flex; flex-direction: column; gap: 16px; }
.form-page.wide { max-width: 820px; }
form { display: flex; flex-direction: column; gap: 8px; }
form.inline { display: inline-flex; flex-direction: row; gap: 8px; align-items: center; }
form.stack { max-width: 820px; }
label { font-weight: 600; margin-top: 10px; }
label.check { font-weight: 400; display: flex; gap: 12px; align-items: flex-start; margin-top: 0; }
label.check input { margin-top: 9px; width: 18px; height: 18px; flex: none; accent-color: var(--teal); }
label.plain { font-weight: inherit; margin: 0; }
input[type="password"], input[type="text"], select, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 2px solid var(--ink); border-radius: 10px; padding: 8px 12px; width: 100%;
}
form.inline input, form.inline select { width: auto; min-width: 0; padding-block: 5px; }
form.inline input[type="password"] { width: 150px; }
textarea { line-height: 1.8; resize: vertical; }
button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
  background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 8px 20px;
}
form.inline button { padding: 5px 12px; font-size: 15px; }
button.quiet { background: transparent; color: var(--ink); }
button.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
button.danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.form-actions { display: flex; gap: 18px; align-items: center; margin-top: 16px; }
.error { background: var(--bad-bg); color: var(--bad); border: 2px solid var(--bad); border-radius: 12px; padding: 10px 16px; }
.hint { color: var(--muted); font-size: 15px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.admin-block { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.admin-block.first { margin-top: 0; }
.status-line { margin-bottom: 4px; }
.sync-box { background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 24px; box-shadow: 0 6px 0 var(--teal); }
.pill { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.review li { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 16px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; }
.reason { color: var(--warn); font-size: 15px; }
.links { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-wrap { overflow-x: auto; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; background: var(--teal-tint); }
tr:last-child td { border-bottom: 0; }
.add-user { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.add-user > div { display: flex; flex-direction: column; flex: 1 1 180px; }
.add-user label { margin-top: 0; font-size: 15px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a { background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 12px; font-size: 15px; color: var(--ink); text-decoration: none; }
.tagcloud .num { color: var(--muted); font-size: 13px; }
.places { display: flex; flex-direction: column; gap: 10px; }
.place { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.place .check { flex: 1 1 320px; }
.place-unit { display: flex; flex-direction: column; flex: 0 1 230px; }
.gap-top { margin-top: 20px; }
input.copy { min-width: 220px; font-size: 13px; padding: 4px 8px; }
.guide { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.guide li { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 18px; }
.guide strong { font-family: var(--display); }
ol.guide li strong:first-child { display: block; margin-bottom: 4px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; gap: 20px; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px; }
  .side-group { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side-label { display: none; }
  .side a { padding: 5px 12px; font-size: 15px; border: 2px solid var(--line); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-form { grid-template-columns: 1fr; }
  .post-side { position: static; }
  .ed-split { grid-template-columns: 1fr; }
  .ed-split textarea { border-inline-end: 0; border-bottom: 3px solid var(--ink); min-height: 320px; }
  .todo li { grid-template-columns: auto 1fr; }
  .todo .btn { grid-column: 2; justify-self: start; }
}
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .hero { grid-template-columns: 1fr; padding: 26px 22px 30px; gap: 26px; }
  .hero-thumb { order: -1; transform: none; box-shadow: 6px 6px 0 var(--key); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .grid, .grid:has(> :nth-child(2):last-child), .grid:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; }
  .card-title { font-size: 16.5px; }
  .band { margin-top: 48px; }
  .band-key, .band-teal { padding: 22px 18px 24px; border-radius: 20px; }
  .top-in { justify-content: center; }
  .top-search { flex: 1 1 100%; margin: 4px 0 0; }
  .top-search input { flex: 1; width: auto; }
  .top-nav a { padding: 5px 10px; font-size: 15px; }
  .strip { grid-auto-columns: 148px; }
  .cover { aspect-ratio: 3.6 / 1; border-radius: 16px; }
  .page-head { padding: 22px 20px 26px; border-radius: 20px; }
  .sheet { padding: 20px 18px 24px; border-radius: 18px; }
  .follow { padding: 22px 20px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .press, .card, .tile, .short-thumb { transition: none; }
}
.news a { color: var(--ink); }

/* ---- reading pages: calmer and tighter than the home page ---- */
.page-head { padding: 20px 28px 22px; border-radius: 20px; margin-bottom: 26px; gap: 6px; box-shadow: 0 6px 0 var(--ink); }
.page-head h1 { font-size: clamp(24px, 3vw, 30px); gap: 10px; }
.page-head h1 .ic { width: 28px; height: 28px; }
.page-head p { font-size: 16px; }
.article { max-width: 760px; }
.article-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 3px solid var(--ink); }
.article-head h1 { font-size: clamp(25px, 3.2vw, 32px); line-height: 1.5; }
.article-head .meta { gap: 6px 16px; }
.article-head .card-cat { color: var(--ink); text-decoration: none; padding: 1px 12px; }
.article .sheet { border-width: 2px; border-radius: 16px; padding: 24px 26px 26px; gap: 12px; }
.prose p, .prose li { font-size: 17px; line-height: 1.9; }
.prose h2 { font-size: 21px; margin-top: 14px; padding-top: 0; border-top: 0; display: flex; align-items: baseline; gap: 10px; }
.prose h2::before { content: ""; flex: none; width: 10px; height: 20px; border-radius: 3px; background: var(--key); transform: translateY(3px); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin-top: 6px; }
.prose ul, .prose ol { gap: 4px; padding-inline-start: 22px; }
.prose .table-scroll { border-width: 2px; border-radius: 12px; align-self: flex-start; max-width: 100%; }
.prose table { width: auto; min-width: min(100%, 420px); font-size: 16px; }
.prose th, .prose td { padding: 8px 16px; }
.prose tbody tr:nth-child(even) td { background: #faf6ea; }
.prose figure img, .prose .embed, .article-cover { border-width: 2px; border-radius: 14px; }
.article-cover { margin-bottom: 20px; }
.article .share { margin-top: 18px; font-size: 15px; }
.article .share a, .article .share button { font-size: 14.5px; padding: 2px 14px; }
.article .follow, .video .follow { margin-top: 28px; padding: 18px 22px 20px; border-radius: 18px; box-shadow: 0 5px 0 var(--ink); gap: 12px 18px; }
.article .follow-face, .video .follow-face { width: 56px; height: 56px; }
.article .follow-big, .video .follow-big { font-size: 19px; }
.article .follow .press, .video .follow .press { font-size: 15.5px; padding: 8px 18px; border-width: 2px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.article .follow .press-ink, .video .follow .press-ink { box-shadow: 0 4px 0 rgba(14, 42, 48, 0.35); }
.article .news, .video .news { border-top-width: 2px; padding-top: 12px; }
.article .news label, .video .news label { font-size: 15.5px; }
.article .news-row input[type="email"], .video .news-row input[type="email"] { border-width: 2px; padding: 6px 12px; font-size: 16px; }
.article ~ .band { margin-top: 44px; }
.post-card .card-title { font-size: 16.5px; }
.post-card .card-text { font-size: 14.5px; }
.card-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--teal); color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; }
.card-ph .ic { width: 44px; height: 44px; }
.grid > .card:nth-child(3n + 2) .card-ph { background: var(--key); color: var(--ink); }
.grid > .card:nth-child(3n) .card-ph { background: var(--red); }
.side-card input[type="file"], .ed-panel input[type="file"] { font: inherit; font-size: 14.5px; width: 100%; border: 2px dashed var(--ink); border-radius: 10px; padding: 8px; background: var(--paper); }
