:root {
  color-scheme: light;
  --paper: #f6f7f1;
  --ink: #172114;
  --muted: #566250;
  --line: #d8dfd1;
  --accent: #d9fb72;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid #537511; outline-offset: 4px; }
.frame { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 1; padding: 12px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 69px; }
.brand { display: inline-flex; align-items: center; font-size: 1.55rem; font-weight: 780; letter-spacing: -.055em; white-space: nowrap; }
.brand img { margin-right: 9px; }
.brand-accent { color: #4a6335; }
.masthead nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 34px); font-size: .9rem; }
.masthead nav [aria-current] { font-weight: 700; }
.header-label { color: var(--muted); font-size: .79rem; }
.eyebrow, .story-meta, .language, .status { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .73rem; letter-spacing: .075em; font-weight: 700; }
.eyebrow { margin: 0 0 13px; color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
.language-filter { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; max-width: min(24rem, 100%); }
.section-label { color: #496133; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 14px; }
.topics a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 24px; font-size: .82rem; font-weight: 650; }
.topics [aria-current] { border-color: #222e1f; background: #222e1f; color: #fff; }
.filters { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 14px 0 20px; }
.filters label { display: grid; gap: 6px; font-size: .78rem; font-weight: 700; }
.publisher-filter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.publisher-controls { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.publisher-picker { min-width: 0; max-width: 100%; }
.publisher-controls:has(.filter-chips[hidden]) .publisher-picker { flex: 1 1 100%; }
.filter-chips:not([hidden]) { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 5px; }
.publisher-controls .filter-chips { flex: 1 1 8rem; }
input, select, button { width: 100%; min-height: 43px; border: 1px solid #b8c2b1; border-radius: 7px; padding: 0 12px; color: var(--ink); background: #fff; font: inherit; font-size: .9rem; }
button { width: auto; border-color: #759b27; background: var(--accent); font-weight: 700; cursor: pointer; }
button:hover { background: #c8ed57; }
.language-filter select, .language-filter button { width: auto; min-height: 32px; padding-inline: 8px; font-size: .8rem; }
.language-filter select { max-width: 8rem; }
.filter-toggle { border-color: #b8c2b1; background: #fff; font-weight: 500; }
.language-filter .filter-toggle { flex-shrink: 0; }
.publisher-filter .filter-toggle { width: 100%; }
.filter-chips button { min-height: 32px; max-width: 100%; padding-inline: 8px; font-size: .8rem; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; border-color: var(--line); border-radius: 20px; background: #eef3e5; }
.filter-chip span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chips .clear-filter { padding-inline: 5px; border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: .17em; }
.filter-toggle:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.filter-toggle span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-menu { position: absolute; inset-block-start: calc(100% + 5px); inset-inline-start: 0; z-index: 2; width: min(16rem, calc(100vw - 28px)); padding: 8px; border: 1px solid #b8c2b1; border-radius: 8px; background: #fff; box-shadow: 0 8px 20px #17211422; }
.language-filter .filter-menu { width: min(13rem, calc(100vw - 28px)); }
.filter-menu input { min-height: 34px; padding-inline: 8px; }
.filter-menu ul { max-height: min(14rem, 40vh); overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none; }
.filter-menu button { width: 100%; border: 0; background: transparent; font-weight: 500; text-align: start; overflow-wrap: anywhere; }
.filter-menu button:hover { background: #eef3e5; }
.filter-menu button:focus-visible { outline-offset: -2px; }
.filter-menu p { margin: 8px; color: var(--muted); font-size: .8rem; }
.filter-menu button[aria-pressed="true"] { background: #eef3e5; font-weight: 700; }
.filter-menu button[aria-pressed="true"]::after { content: ""; display: inline-block; width: .35em; height: .65em; margin-inline-start: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.preset-controls:not([hidden]) { display: flex; align-items: center; gap: 8px; }
.preset-controls label { font-size: .78rem; font-weight: 700; }
.preset-controls input, .preset-controls select { width: 14rem; min-width: 0; }
.preset-controls :is(input, select, button) { min-height: 34px; font-size: .8rem; }
.preset-controls button { flex-shrink: 0; }
.preset-toolbar:has(:is(#manage-preset, #import-browser-presets):not([hidden])), .preset-actions { flex-wrap: wrap; }
.preset-picker { min-width: 0; }
.preset-controls button:disabled { opacity: .55; cursor: default; }
.preset-actions { margin-top: 8px; }
.feed-presets form, .feed-presets .form-note:not(:empty) { margin: 8px 0 0; }
.feed-presets .form-note:empty { margin: 0; }
.stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.story { display: flex; flex-direction: column; min-width: 0; min-height: 219px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.story-meta, .byline { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--muted); }
.topic-tag { border-radius: 4px; padding: 3px 6px; background: #eef3e5; color: #38512b; }
.story h2 { margin: 15px 0 8px; font: 600 clamp(1.18rem, 2.1vw, 1.65rem)/1.19 Georgia, serif; overflow-wrap: anywhere; }
.summary { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin-bottom: 16px; color: #434e3d; font-size: .91rem; line-height: 1.5; overflow-wrap: anywhere; }
.byline { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: .78rem; font-weight: 650; }
.story-sources { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.story-sources summary { cursor: pointer; width: fit-content; padding-block: 3px; font-weight: 650; }
.story-sources ul { display: flex; flex-wrap: wrap; gap: 2px 10px; list-style: none; margin: 4px 0 0; padding: 0; }
.story-sources li { min-width: 0; }
.author-link { color: #38512b; font-weight: 650; text-decoration: underline; text-underline-offset: .17em; overflow-wrap: anywhere; }
.region { font-weight: 400; }
.language, .status { border-radius: 4px; background: #eef3e5; padding: 4px 6px; color: #38512b; white-space: nowrap; }
.older { display: inline-block; margin-top: 18px; border: 1px solid var(--line); padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.empty { padding: 32px 24px; border: 1px solid var(--line); border-radius: 8px; }
.empty p { margin: 0; color: var(--muted); }
.directory { margin-block: 42px; }
.directory h1 { margin-bottom: 18px; font: 500 clamp(2.8rem, 7vw, 5rem)/.92 Georgia, serif; letter-spacing: -.075em; }
.directory > p:not(.eyebrow) { max-width: 58ch; color: var(--muted); line-height: 1.55; }
.source-list { margin-top: 24px; border-top: 1px solid var(--line); }
.source-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.source-list h2 { margin: 0 0 4px; font-size: 1.1rem; }
.source-list p { margin: 0; color: var(--muted); font-size: .84rem; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 48px; padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
@media (max-width: 900px) {
  .frame { width: calc(100% - 38px); }
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 621px) {
  .filters:has(.filter-chips:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
}
@media (max-width: 620px) {
  .frame { width: calc(100% - 28px); }
  .masthead-inner { min-height: 60px; gap: 12px; }
  .brand { font-size: 1.42rem; }
  .header-label { display: none; }
  .filters { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .publisher-filter { grid-column: 1 / -1; }
  .stories { grid-template-columns: 1fr; }
  .story { min-height: 0; }
}

.masthead-inner { flex-wrap: wrap; }
.masthead .account-nav { flex-wrap: wrap; gap: 12px; min-width: 0; }
.writing-links { display: flex; gap: 12px; }
.account-nav a, .account-nav button { white-space: nowrap; }
.account-nav .account-join { padding: 7px 10px; border-radius: 6px; background: var(--accent); font-weight: 700; }
.account-nav .logout-form button { min-height: 32px; padding: 0 8px; background: transparent; border-color: var(--line); }
.notification-bell { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; min-height: 36px; border-radius: 6px; padding-inline: 5px; }
.notification-bell:hover, .notification-bell[aria-current] { background: #eef3e5; text-decoration: none; }
.notification-count { border-radius: 12px; padding: 1px 5px; background: #38512b; color: #fff; font-size: .72rem; font-weight: 700; }
.notification-list { list-style: none; padding: 0; margin: 0; }
.notification-list li { border-top: 1px solid var(--line); }
.notification-open { display: grid; gap: 4px; width: 100%; padding: 14px 10px; border: 0; background: transparent; text-align: start; overflow-wrap: anywhere; }
.notification-open:hover { background: #eef3e5; }
.notification-open .reader-meta { font-weight: 400; }
.notification-title { font-size: 1rem; }
.notification-unread { color: #38512b; }
.discussion-link { margin-top: 9px; color: #38512b; font-size: .8rem; font-weight: 650; }
.reader { max-width: 720px; margin: 32px auto 0; line-height: 1.6; }
.reader h1 { font: 500 clamp(2rem, 5vw, 3.5rem)/1.08 Georgia, serif; letter-spacing: -.035em; overflow-wrap: anywhere; margin-bottom: 12px; }
.notification-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.notification-header h1 { margin: 0; }
.reader p { overflow-wrap: anywhere; }
.reader-back { display: inline-block; margin-bottom: 12px; font-weight: 650; }
.reader-meta, .form-note { color: var(--muted); font-size: .88rem; }
.author-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.author-heading h1 { min-width: 0; margin: 0; }
.author-bio { white-space: pre-wrap; }
.profile-picture { display: block; flex: none; border-radius: 50%; object-fit: cover; background: #eef3e5; }
.profile-follow { margin-bottom: 16px; }
.following-feed { margin-top: 18px; }
.following-feed h1 { font-size: 1.5rem; margin-bottom: 12px; }
.account-page { max-width: 440px; }
.editor { display: grid; gap: 13px; margin-block: 16px; }
.editor label, .editor-field { display: grid; gap: 5px; }
.editor label { font-weight: 650; }
.picture-input { min-width: 0; padding: 8px 12px; }
.editor textarea { display: block; resize: vertical; padding: 10px 12px; width: 100%; border: 1px solid #b8c2b1; border-radius: 7px; font: inherit; font-weight: 400; color: var(--ink); }
.editor button { justify-self: start; }
.editor .form-note { margin: 0; }
.form-error { color: #8d1c15; }
.prose-plain, .comment-body { white-space: pre-wrap; }
.prose, .comment-body { overflow-wrap: anywhere; }
.prose { font: 1.17rem/1.65 Georgia, serif; margin-top: 25px; }
.prose h1, .prose h2, .prose h3 { font-size: 1.55em; line-height: 1.2; margin: 1.25em 0 .5em; }
.prose a { color: #38512b; text-decoration: underline; text-underline-offset: .17em; }
.prose img { display: block; max-width: 100%; height: auto; margin-block: 1em; border-radius: 6px; }
.prose pre { overflow-x: auto; padding: 12px; background: #eef3e5; }
.editor-toolbar:not([hidden]), .editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor .format-option { display: flex; align-items: center; gap: 7px; font-size: .9rem; }
.format-option input { width: auto; min-height: auto; }
.post-preview { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.preview-title { font: 500 clamp(2rem, 5vw, 3.5rem)/1.08 Georgia, serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
.writing-item { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.writing-item h2 { font: 600 1.35rem/1.2 Georgia, serif; margin: 0 0 4px; overflow-wrap: anywhere; }
.writing-item p { margin: 0; }
.writing-actions { display: flex; align-items: baseline; gap: 12px; }
.writing-actions > a { text-decoration: underline; text-underline-offset: .17em; }
.writing-confirm { flex-shrink: 0; }
.writing-confirm summary { cursor: pointer; }
.writing-confirm form { margin-top: 8px; }
@media (max-width: 420px) {
  .writing-item:has(.writing-actions) { flex-direction: column; gap: 8px; }
}
.reader-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-block: 18px; }
.reader-actions a, .reader-actions summary, .comments a, .account-switch a { color: #38512b; text-decoration: underline; text-underline-offset: .17em; }
.reader-actions summary { cursor: pointer; }
.comments, .comment { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.comment .reader-meta { margin-bottom: 5px; }
.comment form { margin-top: 8px; }
.secondary { background: transparent; border-color: var(--line); min-height: 32px; }

@media (max-width: 620px) {
  .masthead-inner { row-gap: 8px; padding-block: 9px; }
}

.footer-with-traffic { display: grid; grid-template-columns: 1fr auto 1fr; }
.footer-with-traffic .footer-credit { text-align: end; }
.footer-traffic { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; }
.footer-traffic span { white-space: nowrap; }
.footer-traffic strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.traffic-page { max-width: 1000px; }
.traffic-totals, .traffic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.traffic-totals { margin-bottom: 14px; }
.traffic-totals div { display: grid; padding: 14px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.traffic-totals strong { font: 500 clamp(1.8rem, 5vw, 3rem)/1.2 Georgia, serif; }
.traffic-grid { margin-top: 28px; align-items: start; }
.traffic-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.traffic-table th, .traffic-table td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: end; vertical-align: top; font-variant-numeric: tabular-nums; }
.traffic-table th:first-child { text-align: start; }
.traffic-table summary { cursor: pointer; }
.country-topics { margin-top: 5px; font-size: .76rem; }
.country-topics th { font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 720px) {
  .footer-with-traffic { grid-template-columns: 1fr 1fr; }
  .footer-traffic { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .traffic-grid { grid-template-columns: 1fr; }
}
