:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #20312b;
  background: #f6f5f0;
  font-synthesis: none;
  --muted: #6d786f;
  --line: #e1e5db;
  --accent: #dcebc9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #70964d;
  outline-offset: 4px;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
button,
a {
  touch-action: manipulation;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: absolute;
  top: -100px;
}
.skip-link:focus {
  top: 0;
  z-index: 10;
}
.reading-room {
  max-width: 1240px;
  margin: auto;
}
.reader-header {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -1.5px;
}
.wordmark > span {
  color: #779951;
  margin-left: -7px;
}
.wordmark svg {
  color: #627b4f;
  width: 25px;
  height: 25px;
}
.header-actions {
  display: flex;
  gap: 12px;
}
.icon-button,
.save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
}
.selected,
.is-saved {
  background: var(--accent);
}
.is-saved svg {
  fill: #9dbd7d;
}
.desktop-reader main {
  padding: 40px 36px 70px;
}
.edition-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 0 0 25px;
}
.edition-heading h1 {
  font-family: Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -1.3px;
  margin: 10px 0 0;
}
.edition-heading > span {
  font-size: 13px;
  color: var(--muted);
}
.eyebrow,
.small-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 650;
  color: #65804f;
}
.desktop-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
select {
  padding: 10px 30px 10px 14px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: inherit;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.story-card {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.story-art {
  position: relative;
  margin: 0;
  background: #fff9e9;
}
.story-art img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: contain;
}
.story-art figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: #fffdf1df;
  color: #6b7365;
  border-radius: 3px;
  padding: 3px 5px;
  font-size: 9px;
}
.story-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.topic-label {
  color: #64834b;
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 650;
  text-transform: uppercase;
}
.story-position {
  color: var(--muted);
  font-size: 10px;
}
.story-card h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1.16;
  font-weight: 400;
  letter-spacing: -0.7px;
  margin: 0 0 16px;
}
.story-card h2 a {
  text-decoration: none;
}
.story-card h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.story-summary {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  color: #435148;
}
.source-line {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 18px 0 12px;
}
.quiet-link,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.quiet-link:hover,
.text-button:hover {
  text-decoration: underline;
}
.story-context {
  margin-bottom: 18px;
}
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: auto;
}
.source-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.source-button svg {
  width: 15px;
  height: 15px;
}
.source-button:hover {
  text-decoration: underline;
}
.save-button {
  min-width: 38px;
  min-height: 38px;
}
.mobile-navigation {
  display: none;
}
.empty-card {
  min-height: 450px;
  padding: 45px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}
.empty-card h2 {
  font-size: 34px;
  margin: 0;
}
.empty-card > p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 370px;
  margin: 0;
  color: var(--muted);
}
.empty-symbol {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf3df;
}
.empty-symbol svg {
  width: 28px;
  height: 28px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #24392e;
  color: #fff;
  padding: 14px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}
.subscription-card {
  background: #edf3e2;
}
.subscription-note {
  font-size: 12px !important;
}
.humor-card {
  padding: 30px;
  background: #edeadd;
  border-color: #e0ddca;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.humor-card h2 {
  margin: 0;
}
.humor-card > p {
  font-size: 21px;
  line-height: 1.5;
  margin: 0;
  font-family: Georgia, serif;
}
.humor-credit {
  font-size: 10px;
  color: var(--muted);
  margin-top: auto;
}
.newsletter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 32px;
  background: #edf3e2;
}
.newsletter-banner h2 {
  font:
    28px Georgia,
    serif;
  margin: 10px 0;
}
.newsletter-banner p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
dialog {
  width: min(560px, calc(100% - 28px));
  max-height: 85dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  background: #fffefa;
  color: inherit;
}
dialog::backdrop {
  background: #162b2370;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  align-items: start;
  gap: 16px;
  justify-content: space-between;
}
.dialog-heading h2 {
  font:
    26px/1.2 Georgia,
    serif;
  margin: 5px 0;
}
.dialog-heading button {
  flex-shrink: 0;
}
.dialog-intro,
.context-copy {
  font-size: 15px;
  line-height: 1.65;
  color: #4c5a50;
}
.context-copy h3 {
  font-size: 14px;
  color: #20312b;
}
.topic-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0;
}
.topic-options label {
  display: flex;
  gap: 9px;
  font-size: 14px;
  align-items: center;
}
.topic-options input {
  accent-color: #587c3d;
  width: 17px;
  height: 17px;
}
.field-label {
  font-size: 13px;
}
input[type="url"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.inbox-list {
  display: grid;
  gap: 15px;
  margin-top: 20px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.inbox-list small {
  display: block;
}
.login {
  max-width: 550px;
  margin: 10vh auto;
  padding: 30px;
}
.login h1 {
  font:
    40px Georgia,
    serif;
}
.brand {
  font-weight: bold;
  font-size: 24px;
}
.brand svg {
  margin-right: 8px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: #20382d;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}
#toast.visible {
  opacity: 1;
}
#login-error {
  color: #a33931;
}
@media (min-width: 701px) and (max-width: 1050px) {
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  html:has(.mobile-reader),
  body:has(.mobile-reader) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #fffefa;
  }
  .mobile-reader {
    position: fixed;
    inset: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: none;
    overflow: hidden;
  }
  .reader-header {
    height: 56px;
    flex: 0 0 56px;
    padding: 0 18px;
    border: 0;
    background: #fffefa;
  }
  .wordmark {
    font-size: 25px;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions .icon-button {
    min-width: 36px;
    min-height: 36px;
  }
  .mobile-reader main {
    flex: 1;
    min-height: 0;
    padding: 0;
    display: flex;
    overflow: hidden;
  }
  .mobile-reader .reader {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
  }
  .mobile-reader .story-card {
    flex: 1;
    min-height: 0;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-reader .story-art {
    flex: 0 0 auto;
  }
  .mobile-reader .story-art img {
    height: clamp(130px, 22dvh, 210px);
  }
  .mobile-reader .story-body {
    flex: 1;
    padding: clamp(16px, 3dvh, 28px) 24px 12px;
    min-height: min-content;
  }
  .mobile-reader .card-top {
    margin-bottom: 15px;
  }
  .mobile-reader .story-card h2 {
    font-size: clamp(24px, 6.6vw, 30px);
    line-height: 1.13;
    margin-bottom: 18px;
  }
  .mobile-reader .story-summary {
    font-size: 16px;
    line-height: 1.6;
  }
  .mobile-reader .source-line {
    margin-top: 20px;
  }
  .mobile-reader .card-actions {
    margin-top: auto;
    padding-top: 14px;
  }
  .mobile-reader .story-context {
    margin-bottom: 20px;
  }
  .mobile-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
  }
  .mobile-navigation .icon-button {
    min-height: 32px;
    min-width: 32px;
    border: 0;
    color: #84917f;
  }
  .mobile-reader .empty-card {
    padding: 30px 25px;
  }
  .mobile-reader .humor-card {
    padding: 40px 28px;
    justify-content: center;
  }
  .mobile-reader .humor-card > p {
    font-size: 27px;
  }
  .mobile-reader .humor-credit {
    margin-top: 0;
  }
  .mobile-reader .humor-card .quiet-link {
    margin-top: 30px;
  }
  .topic-options {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .newsletter-banner {
    display: none;
  }
}
@media (max-width: 700px) and (max-height: 720px) {
  .mobile-reader .story-art img {
    height: 125px;
  }
  .mobile-reader .story-body {
    padding: 14px 20px 8px;
  }
  .mobile-reader .story-card h2 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  .mobile-reader .story-summary {
    font-size: 15px;
    line-height: 1.5;
  }
  .mobile-reader .source-line {
    margin: 12px 0 8px;
  }
  .mobile-reader .story-context {
    margin-bottom: 12px;
  }
  .mobile-navigation {
    padding-top: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.loading:not([hidden]) {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  background: #fffefa;
}
.loading-dot {
  width: 8px;
  height: 8px;
  background: #65804f;
  border-radius: 50%;
  animation: breathe 1s ease-in-out infinite alternate;
}
@keyframes breathe {
  to {
    opacity: 0.3;
  }
}
@media (max-width: 700px) {
  .mobile-reader .reader-header {
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
    flex-basis: calc(56px + env(safe-area-inset-top));
  }
  .mobile-reader .story-body {
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    gap: 0;
  }
  .mobile-reader .story-card:not(:has(.story-art)) .story-body {
    padding-top: clamp(35px, 9dvh, 80px);
  }
  .mobile-reader .card-actions {
    margin-top: auto;
    padding-bottom: 0;
  }
  .mobile-reader .story-context {
    margin-bottom: 24px;
  }
  .mobile-reader .story-art img {
    width: 100%;
    object-fit: contain;
  }
}

@media (max-width: 700px) {
  .mobile-reader .reader {
    position: relative;
    isolation: isolate;
  }
  .mobile-reader #story-card {
    position: relative;
    z-index: 1;
    background: #fffefa;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
    will-change: transform;
  }
  .mobile-reader .swipe-preview {
    position: absolute;
    inset: 0;
    display: flex;
    pointer-events: none;
    z-index: 2;
    will-change: transform;
    background: #fffefa;
  }
  .mobile-reader .swipe-preview .story-card {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
  .swipe-hint {
    position: absolute;
    z-index: 3;
    bottom: calc(9px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    letter-spacing: 0.035em;
    color: #7c8777;
    pointer-events: none;
  }
  .swipe-hint span {
    width: 12px;
    height: 3px;
    border-radius: 3px;
    background: #a7b49e;
  }
}

@media (max-width: 700px) {
  .swipe-hint span {
    width: 7px;
    height: 7px;
    background: none;
    border-top: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    border-radius: 0;
    transform: rotate(45deg);
  }
  .swipe-hint.is-nudging {
    color: #426338;
    font-weight: 600;
  }
  .swipe-hint.is-nudging span {
    animation: swipe-cue 600ms ease-in-out 2;
  }
}
@keyframes swipe-cue {
  50% {
    transform: translateY(-5px) rotate(45deg);
  }
}
