@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-700.ttf) format("truetype"); font-weight: 700; font-display: swap; }
:root { --paper: #ffffff; --desk: #f1f3f2; --ink: #202522; --muted: #5f6861; --rule: #d8ded9; --yellow: #f4df42; --selected: #fff8cd; --blue: #135b83; --danger: #a33326; --ui: "Public Sans", sans-serif; --reading-size: 18px; }
* { box-sizing: border-box; }
html { scrollbar-color: #9aa59e var(--desk); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 14px/1.5 var(--ui); letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--blue); text-underline-offset: 3px; }
button, select, input { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--ink); }
input { caret-color: var(--blue); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); padding: 12px; background: var(--paper); z-index: 50; }
.skip:focus { transform: none; }
.masthead { height: 100px; padding: 0 36px; display: flex; align-items: center; gap: 36px; background: var(--yellow); border-bottom: 1px solid var(--ink); }
.wordmark { display: flex; gap: 16px; align-items: baseline; text-decoration: none; color: var(--ink); white-space: nowrap; }
.wordmark strong { font-size: 46px; font-weight: 700; line-height: 1; }
.wordmark span { font-size: 21px; }
.masthead p { font-size: 13px; line-height: 1.4; border-left: 1px solid #a79527; padding-left: 24px; }
.directory { margin-left: auto; display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; }
.directory i { font-size: 21px; }
.desk { height: calc(100dvh - 100px); min-height: 400px; display: grid; grid-template-columns: 360px minmax(0,1fr); max-width: 1800px; margin: auto; }
.catalogue { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--rule); background: var(--desk); }
.catalogue-tools { padding: 24px 24px 0; }
.catalogue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.catalogue-heading h1 { font-size: 19px; font-weight: 600; line-height: 1.3; }
.icon-button { border: 1px solid transparent; border-radius: 4px; background: transparent; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; text-decoration: none; color: var(--ink); font-size: 21px; }
.icon-button:hover { background: #e2e7e3; }
.icon-button[aria-pressed=true] { background: var(--selected); color: var(--ink); border-color: #c7b543; }
.search { display: flex; align-items: center; background: var(--paper); border: 1px solid #9ba89e; border-radius: 4px; gap: 10px; padding: 0 12px; }
.search:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.search i { font-size: 20px; color: var(--muted); }
.search input { border: 0; background: transparent; outline: 0; width: 100%; min-width: 0; min-height: 44px; }
.search input::placeholder { color: var(--muted); }
.views { display: flex; gap: 20px; margin-top: 20px; border-bottom: 1px solid var(--rule); }
.views button { display: inline-flex; align-items: center; gap: 7px; border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 12px 0; min-height: 44px; color: var(--muted); }
.views button[aria-pressed=true] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.views span { font-size: 12px; font-variant-numeric: tabular-nums; }
.index-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 16px 0 12px; font-size: 12px; color: var(--muted); }
.sort-label { font-size: 0; }
.sort-label select { border: 0; background: transparent; font-size: 12px; min-height: 32px; max-width: 120px; color: var(--muted); }
.feed-status { font-size: 12px; color: var(--muted); padding: 0 24px 12px; }
.feed-status[data-error=true] { color: var(--danger); }
.story-list { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.story-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; border-top: 1px solid var(--rule); }
.story-row.selected { background: var(--selected); }
.story-open { padding: 20px 0 20px 24px; text-align: left; border: 0; background: transparent; min-width: 0; width: 100%; }
.story-open:hover { background: #e6ebe7; }
.selected .story-open:hover { background: #fff2a6; }
.story-open h2 { font-size: 16px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.story-open p { font-size: 12px; color: var(--muted); margin-top: 10px; }
.story-open .story-category { display: block; margin-bottom: 6px; font-size: 12px; color: var(--blue); }
.story-row .icon-button { margin: 12px 0; font-size: 18px; }
.catalogue-footer { border-top: 1px solid var(--rule); padding: 14px 24px; font-size: 12px; color: var(--muted); }
.catalogue-footer p + p { margin-top: 4px; }
.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.reader-toolbar { min-height: 70px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 32px; border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.reader-actions { display: flex; align-items: center; gap: 6px; }
.size-label { display: flex; align-items: center; gap: 6px; }
.size-label i { font-size: 18px; }
.size-label select { min-height: 44px; border: 0; background: transparent; max-width: 100px; }
.back-button { display: none; background: transparent; border: 0; min-height: 44px; padding: 0; align-items: center; gap: 6px; }
.back-button i { font-size: 20px; }
.reading-progress { height: 3px; background: var(--desk); flex-shrink: 0; }
.reading-progress span { display: block; background: var(--blue); width: 0; height: 100%; }
.reading-scroll { overflow-y: auto; flex: 1; min-height: 0; scroll-behavior: smooth; overscroll-behavior: contain; }
.article { max-width: 780px; padding: 48px 40px 72px; margin: auto; overflow-wrap: anywhere; }
.article-meta { font-size: 13px; color: var(--blue); margin-bottom: 16px; }
.article > h2 { font-size: 36px; font-weight: 700; line-height: 1.2; text-wrap: balance; margin-bottom: 20px; }
.byline { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.article-body { font: 400 var(--reading-size)/1.85 Georgia, "Times New Roman", serif; }
.article-body > * + * { margin-top: 1.3em; }
.article-body p { margin-top: 0; margin-bottom: 1.3em; }
.article-body h2, .article-body h3, .article-body h4 { font-family: var(--ui); line-height: 1.35; font-weight: 600; margin: 2em 0 .8em; }
.article-body h2 { font-size: 24px; }
.article-body h3, .article-body h4 { font-size: 20px; }
.article-body img { max-width: 100%; height: auto; display: block; margin: 24px auto; border-radius: 2px; }
.article-body figure { margin: 28px 0; }
.article-body figcaption { font: 12px/1.6 var(--ui); color: var(--muted); }
.article-body blockquote { border-left: 1px solid var(--blue); padding-left: 22px; margin: 28px 0; }
.article-body li { margin-bottom: .7em; }
.article-body pre { overflow-x: auto; padding: 16px; background: var(--desk); font-size: 14px; }
.article-body table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.article-body td, .article-body th { border: 1px solid var(--rule); padding: 8px; }
.original-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; margin-top: 24px; }
.original-link i { font-size: 20px; }
.feed-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 28px; }
.loading-state, .empty-state { padding: 40px 24px; color: var(--muted); }
.loading-state i, .empty-state i { font-size: 28px; color: var(--blue); display: block; margin-bottom: 12px; }
.empty-state h2 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.empty-state button { background: var(--ink); color: var(--paper); border: 0; border-radius: 4px; min-height: 44px; padding: 10px 16px; margin-top: 20px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 4px; padding: 12px 20px; z-index: 30; width: max-content; max-width: calc(100% - 32px); font-size: 13px; }
.no-script { position: fixed; bottom: 0; padding: 16px; background: var(--selected); width: 100%; }
@media (max-width: 1050px) { .desk { grid-template-columns: 320px minmax(0,1fr); } .article { padding: 32px 28px 56px; } .article > h2 { font-size: 30px; } .reader-toolbar { padding: 12px 20px; } }
@media (max-width: 760px) {
  .masthead { height: 80px; padding: 0 20px; gap: 20px; } .wordmark strong { font-size: 36px; } .wordmark span { font-size: 17px; } .masthead p { display: none; }
  .desk { height: calc(100dvh - 80px); display: block; min-height: 0; } .catalogue { height: 100%; border-right: 0; } .reader { height: 100%; display: none; }
  body.reader-open .catalogue { display: none; } body.reader-open .reader { display: flex; }
  .back-button { display: inline-flex; } #reading-position { display: none; } .reader-toolbar { padding: 8px 16px; min-height: 60px; }
  .article { padding: 28px 24px 56px; } .article > h2 { font-size: 28px; } .catalogue-tools { padding-top: 16px; } .story-open { padding-right: 8px; }
}
@media (max-width: 360px) { .masthead { padding: 0 16px; } .directory span { display: none; } .article { padding-inline: 18px; } .reader-actions { gap: 0; } .size-label { gap: 0; } }
@media (prefers-reduced-motion: reduce) { .reading-scroll { scroll-behavior: auto; } }
