:root {
  --ink: #16245c; --text: #1d2542; --muted: #58607c; --line: #d6dbea;
  --page: #e9edf7; --sheet: #ffffff; --gold: #f2b92c;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root { --ink: #dfe5ff; --text: #e4e7f2; --muted: #a4abc4; --line: #30395c; --page: #0d1330; --sheet: #161d40; }
}
.c0  { --c: #16245c; } .c1  { --c: #1d4ed8; } .c2  { --c: #0b6e4f; } .c3  { --c: #6d28d9; }
.c4  { --c: #0e7490; } .c5  { --c: #c2410c; } .c6  { --c: #be185d; } .c7  { --c: #3f7d20; }
@media (prefers-color-scheme: dark) {
  .c0  { --c: #aab8f5; } .c1  { --c: #93b4ff; } .c2  { --c: #5fd0a8; } .c3  { --c: #c4a7ff; }
  .c4  { --c: #67cfe6; } .c5  { --c: #ffa672; } .c6  { --c: #ff93bf; } .c7  { --c: #a2d97f; }
  }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.55 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
.wrap { width: min(1080px, 100%); margin-inline: auto; padding-inline: 16px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--sheet); padding: 8px 12px; z-index: 5; }
.skip:focus { top: 8px; }

.mast { padding-top: 22px; }
.mast-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.brand { font: 700 clamp(2.1rem, 6vw, 3.1rem)/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.today { margin: 0; color: var(--muted); font-size: .92rem; }

/* The channel tabs are the diary's index dividers: the open one joins the page below it. */
.tabs { display: flex; flex-wrap: wrap; gap: 3px; align-items: flex-end; }
.tab { flex: none; display: block; padding: 7px 13px 8px; font-size: .9rem; font-weight: 600; line-height: 1.3; color: var(--c);
  text-decoration: none; background: color-mix(in srgb, var(--sheet) 62%, transparent); border-top: 4px solid var(--c); border-radius: 7px 7px 0 0; }
.tab:hover { background: var(--sheet); }
.tab.on { background: var(--sheet); padding-top: 11px; color: var(--ink); }
.tab:focus-visible { outline-offset: -3px; }
.sheet { background: var(--sheet); padding-block: 8px 40px; min-height: 60vh; }

.day h2 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 18px 0 9px; background: var(--sheet); color: var(--ink);
  font: 700 1.2rem/1.25 var(--serif); border-bottom: 2px solid var(--ink); }
.entry { display: grid; grid-template-columns: 58px 232px minmax(0, 1fr); column-gap: 20px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.day .entry:last-child { border-bottom: 0; }
.clock { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.pic { display: block; align-self: start; text-decoration: none; }
.pic img, .nopic { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 4px; background: var(--page); }
.nopic { display: grid; place-items: center; padding: 8px; text-align: center; color: var(--c); font: 700 1.05rem var(--serif); border-top: 4px solid var(--c); }
.text { min-width: 0; }
.chan { color: var(--c); font-size: .86rem; font-weight: 700; text-decoration: none; }
.chan:hover { text-decoration: underline; }
.entry h3 { margin: 2px 0 7px; font: 700 1.32rem/1.24 var(--serif); color: var(--ink); text-wrap: pretty; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry p { margin: 0 0 8px; max-width: 66ch; }
.src { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.lead { grid-template-columns: 58px minmax(0, 1.15fr) minmax(0, 1fr); }
.lead h3 { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.14; }

.page-title { margin: 22px 0 0; font: 700 clamp(1.9rem, 5vw, 2.6rem)/1.1 var(--serif); color: var(--c); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; color: var(--muted); font-size: .92rem; }
.pager a { color: var(--ink); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

.story { max-width: 720px; margin-inline: auto; padding-top: 26px; }
.story h1 { margin: 4px 0 10px; font: 700 clamp(1.85rem, 5vw, 2.75rem)/1.12 var(--serif); color: var(--ink); text-wrap: pretty; }
.stamp { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.hero { width: 100%; border-radius: 4px; margin-bottom: 22px; background: var(--page); }
.prose { font: 1.13rem/1.66 var(--serif); }
.prose p { margin: 0 0 1.05em; }
.origin { padding: 13px 15px; border-left: 4px solid var(--c); background: var(--page); font-size: .97rem; }
.origin a { font-weight: 600; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--muted); font-size: .94rem; }
.share a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.more { max-width: 720px; margin: 26px auto 0; padding-top: 12px; border-top: 2px solid var(--ink); }
.more h2 { margin: 0 0 6px; font: 700 1.2rem var(--serif); color: var(--ink); }
.more ul { margin: 0; padding: 0; list-style: none; }
.more li { border-bottom: 1px solid var(--line); }
.more li:last-child { border-bottom: 0; }
.more a { display: block; padding: 10px 0; text-decoration: none; font-weight: 600; }
.more a:hover { text-decoration: underline; }

.info { max-width: 680px; padding-top: 26px; }
.info h2 { font: 700 1.25rem/1.3 var(--serif); color: var(--ink); margin: 1.4em 0 .4em; }
.info h1 { font-size: 2.1rem; line-height: 1.15; color: var(--ink); margin: 0 0 16px; }
.empty { padding: 64px 0; text-align: center; }
.empty h1 { font: 700 1.9rem var(--serif); color: var(--ink); margin: 0 0 8px; }
.foot { padding: 20px 0 30px; font-size: .92rem; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.foot-row span { font-weight: 700; margin-right: auto; color: var(--ink); }
.foot a { min-height: 40px; display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .mast { padding-top: 16px; }
  .mast-row { margin-bottom: 12px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .entry, .lead { grid-template-columns: minmax(0, 1fr); padding-block: 18px; }
  .clock { order: 2; padding: 9px 0 0; }
  .pic { order: 1; }
  .text { order: 3; }
  .entry h3 { font-size: 1.3rem; }
  .lead h3 { font-size: 1.65rem; }
}
