:root {
  --canvas: #f3f0e7;
  --paper: #fffcf5;
  --ink: oklch(0.285 0.018 53);
  --body: var(--ink);
  --muted: oklch(0.49 0.015 53);
  --rule: oklch(0.85 0.017 70);
  --control: oklch(0.65 0.018 53);
  --accent: oklch(0.49 0.14 37);
  --accent-hover: oklch(0.44 0.14 37);
  --sans: "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul, ol, figure, form, blockquote, dl, dd { margin: 0; }
h1 { font: 400 34px/1.15 var(--serif); letter-spacing: -0.03em; text-wrap: balance; }
h2 { font: 400 26px/1.2 var(--serif); letter-spacing: -0.025em; text-wrap: balance; }
h3, strong, b { font-weight: 500; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover, .text-button:hover, summary:hover .setting-action { color: var(--ink); }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
#main:focus { outline: none; }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
[id] { scroll-margin-top: 24px; }
.site-shell { width: min(800px, calc(100% - 96px)); margin-inline: auto; padding: 24px 0 32px; }
main { min-width: 0; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 20px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current] { text-decoration: underline; }
.site-footer .site-name { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 8px 16px; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: 0 0 20px; }
.icon svg { width: 16px; height: 16px; stroke-width: 1.5; }
.x-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.cta { appearance: none; display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; gap: 10px; min-height: 46px; padding: 10px 20px; border: 0; border-radius: 0; background: var(--accent); color: var(--paper); font: 500 14px/1.4 var(--sans); text-decoration: none; cursor: pointer; }
.cta:hover { color: var(--paper); background: var(--accent-hover); }
.cta:disabled { opacity: 0.65; cursor: wait; }
.text-button, .text-link { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); font: 400 13px/20px var(--sans); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; }
.hero { display: flex; flex-direction: column; gap: 40px; }
.hero-intro { display: flex; flex-direction: column; gap: 20px; }
.lede { max-width: 65ch; color: var(--muted); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.help, .updated { color: var(--muted); font-size: 13px; line-height: 20px; }
.digest-preview { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--rule); padding-top: 24px; }
.preview-caption { color: var(--muted); font-size: 13px; line-height: 20px; }
.email-heading { display: flex; flex-direction: column; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.email-subject { font: 500 18px/26px var(--sans); letter-spacing: 0; }
.email-envelope { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.email-sender { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.email-sender strong { font-size: 14px; line-height: 20px; }
.email-envelope small, .email-envelope time { color: var(--muted); font-size: 13px; line-height: 18px; }
.email-envelope time { flex-shrink: 0; }
.email-body { padding-top: 24px; font-size: 14px; line-height: 22px; }
.email-greeting { padding-bottom: 12px; }
.email-post { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.email-post-author { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; line-height: 18px; }
.email-post-author span { color: var(--muted); }
.email-post a { color: var(--body); font-size: 13px; line-height: 20px; }
.email-signoff { padding: 20px 0; }
.email-footer { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.email-footer a { color: var(--muted); }
.example-link { width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.account-page { display: flex; flex-direction: column; gap: 24px; }
.account-heading { display: flex; flex-direction: column; gap: 16px; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; border-block: 1px solid var(--rule); }
.heading-row h1 { flex: 1; min-width: 0; }
.heading-row .text-link { flex: 0 0 120px; justify-content: flex-end; text-align: right; }
.sync-status { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 8px; }
.sync-status > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sync-status p { font-size: 14px; line-height: 20px; }
.sync-status .help { font-size: 13px; }
.trial-ended { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 8px; }
.trial-ended p { max-width: 56ch; color: var(--muted); line-height: 1.6; text-wrap: pretty; }
.settings-list { border: 1px solid var(--rule); background: var(--paper); }
.setting-row { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--rule); }
.settings-list > :last-child { border-bottom: 0; }
.setting-label { flex: 0 0 128px; color: var(--muted); font-size: 14px; line-height: 22px; }
.setting-value { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }
.setting-value small { color: var(--muted); font-size: 13px; line-height: 20px; }
.setting-value .trial-remaining { color: var(--body); font-size: 14px; font-variant-numeric: tabular-nums; }
.plan-name { color: var(--accent); font-weight: 500; }
.setting-action { display: flex; align-items: flex-start; justify-content: flex-end; flex: 0 0 88px; min-height: 44px; color: var(--accent); font-size: 13px; line-height: 22px; text-align: right; text-decoration: underline; text-underline-offset: 4px; }
.setting-action .text-button { align-items: flex-start; line-height: 22px; }
.setting-editor > summary { cursor: pointer; list-style: none; }
.setting-editor > summary::-webkit-details-marker { display: none; }
.setting-editor[open] { border-bottom: 1px solid var(--rule); }
.setting-editor[open] > summary { border-bottom: 0; }
.setting-editor > form, .setting-editor > .billing-options { padding: 0 24px 24px; }
.settings-form, .billing-options { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .choice-field legend { font-size: 14px; line-height: 20px; }
.field input, .field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--control); border-radius: 0; background: var(--paper); color: var(--ink); font: 400 16px/22px var(--sans); }
.field-row { display: flex; gap: 16px; }
.field-row > .field { flex: 1; }
.choice-field { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; font-size: 14px; line-height: 22px; }
.choice-field legend { margin-bottom: 12px; }
.choice-field label, .check-field { display: flex; align-items: flex-start; gap: 8px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.form-actions, .settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.feedback, .notice { font-size: 14px; line-height: 22px; color: var(--body); overflow-wrap: anywhere; }
.feedback.error, .notice.alert { color: var(--accent); font-weight: 500; }
.notice > * + * { margin-top: 8px; }
.account-secondary { display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 20px; color: var(--muted); }
.account-secondary summary { display: flex; align-items: center; min-height: 44px; color: var(--accent); cursor: pointer; }
.account-secondary[open] > * + * { margin-top: 12px; }
.plan-list, .delivery-list { list-style: none; padding: 0; }
.plan-list li, .delivery-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.plan-list li > div { display: flex; flex-direction: column; gap: 4px; }
.plan-list small { color: var(--muted); font-size: 13px; }
.feed-page { gap: 28px; }
.feed-intro { font-size: 14px; line-height: 22px; color: var(--muted); }
.saved-posts { padding: 0 28px; list-style: none; border: 1px solid var(--rule); background: var(--paper); }
.saved-post { display: flex; flex-direction: column; gap: 14px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.saved-post:last-child { border-bottom: 0; }
.saved-post-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post-meta { display: flex; align-items: baseline; gap: 16px; }
.post-author { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; flex: 1; min-width: 0; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }
.post-author span { color: var(--muted); font-size: 14px; font-weight: 400; }
.post-date { flex: 0 0 80px; color: var(--muted); text-align: right; font-size: 13px; line-height: 22px; }
.post-copy { max-width: 68ch; font: 400 20px/1.5 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.post-media { width: 100%; height: auto; max-height: 480px; object-fit: contain; outline: 1px solid oklch(0 0 0 / 0.1); }
.post-media-list { display: flex; flex-direction: column; gap: 12px; }
.media-note { display: block; color: var(--muted); font-size: 13px; line-height: 20px; margin-top: 6px; }
.quoted-post { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px 16px; border-left: 2px solid var(--rule); }
.quoted-post .post-author { font-size: 14px; line-height: 20px; }
.quoted-post .post-author span, .quoted-post .post-date { font-size: 13px; line-height: 20px; }
.quoted-post .post-copy { font-size: 16px; line-height: 24px; }
.post-engagement { display: flex; list-style: none; padding: 0; color: var(--muted); font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.post-engagement li { display: flex; align-items: center; gap: 8px; flex: 0 0 25%; min-width: 0; }
.post-engagement .icon { flex: 0 0 20px; }
.post-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; line-height: 20px; }
.post-footer .post-status { flex: 0 1 192px; color: var(--muted); text-align: right; }
.post-status time { white-space: nowrap; }
.article-preview { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.article-preview small { color: var(--muted); font-size: 13px; line-height: 20px; }
.empty-queue { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; border: 1px solid var(--rule); background: var(--paper); }
.feed-pagination { display: flex; justify-content: space-between; gap: 24px; }
.message-page, .auth-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px; border-block: 1px solid var(--rule); background: var(--paper); }
.legal { max-width: 68ch; margin-inline: auto; }
.legal .page-heading { display: flex; flex-direction: column; gap: 16px; }
.draft-note { margin-top: 24px; padding-block: 16px; border-block: 1px solid var(--rule); color: var(--muted); font-size: 14px; line-height: 22px; }
.contents { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 13px; line-height: 20px; }
.contents a { display: inline-flex; align-items: center; min-height: 40px; }
.legal section { margin-top: 32px; }
.legal section > * + * { margin-top: 16px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .cta { transition: border-color 140ms ease, background-color 140ms ease, scale 140ms ease; }
  .cta:active { scale: 0.96; }
  .is-spinning { animation: spin 1s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .site-shell { width: calc(100% - 40px); padding-top: 16px; }
  h1 { font-size: 30px; line-height: 1.15; }
  .heading-row { padding-block: 20px; }
  .setting-row { padding: 20px; }
  .setting-editor > form, .setting-editor > .billing-options { padding: 0 20px 20px; }
  .saved-posts { padding-inline: 20px; }
  .message-page, .auth-panel, .empty-queue { padding: 24px 20px; }
}
@media (max-width: 527px) {
  .heading-row { flex-wrap: wrap; gap: 8px 16px; }
  .heading-row h1 { flex-basis: 100%; }
  .heading-row .text-link { flex-basis: auto; justify-content: flex-start; }
  .setting-row { flex-wrap: wrap; gap: 8px 16px; }
  .setting-label { flex-basis: 100%; }
  .setting-action { flex-basis: 72px; }
  .field-row { flex-direction: column; }
  .email-envelope { flex-wrap: wrap; }
  .post-engagement li { gap: 4px; }
  .cta, .text-button, .text-link, .site-footer a { min-height: 44px; }
  .post-footer .post-status { flex-basis: 160px; }
}
