/* Diktum — design A "Feuilleton" */

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #1E1A16;
  --muted: #5E554B;
  --rule: #DDD3C3;
  --ground: #F6F1E7;
  --paper: #FFFFFF;
  --accent: #A3221B;
  --accent-soft: #EFDDD3;
  --accent-line: #E0B4AE;
  --footer: #1E1A16;
  --footer-text: #D8CFC2;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; color: var(--paper); }

/* Header */
.site-header .wrap { padding-top: 20px; }
.site-header--masthead .wrap { padding-top: 32px; }
.masthead-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--accent); padding-bottom: 10px; }
.masthead-logo { text-align: center; padding: 28px 0 20px; }
.logo { font-family: var(--serif); font-weight: 600; letter-spacing: -1px; line-height: 1; }
.masthead-logo .logo { font-size: clamp(48px, 9vw, 76px); }
.logo--small { font-size: 34px; letter-spacing: -0.5px; text-transform: none; margin-right: 8px; }
.logo--footer { font-size: 20px; letter-spacing: 0; }

.main-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; border-bottom: 3px double var(--accent); padding: 10px 0 14px; }
.site-header--masthead .main-nav { border-top: 3px double var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 10px; }
.main-nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.main-nav__links a:not(.logo) { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 10px 0; }
.main-nav__links a[aria-current="page"] { color: var(--accent); }

.search { display: flex; flex: 0 1 320px; min-width: 220px; }
.search input { flex: 1; min-width: 0; font-size: 15px; padding: 10px 12px; border: 1px solid var(--ink); border-right: 0; border-radius: 0; background: var(--paper); }
.search button { width: 46px; height: 44px; border: 1px solid var(--accent); background: var(--accent); color: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 0; }
.search button:hover { background: var(--ink); border-color: var(--ink); }

/* Page layout */
.page { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 36px; padding-bottom: 56px; }
.page__main { flex: 999 1 560px; min-width: 0; }
.page__aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }

.section-title { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 30px; line-height: 1.2; margin: 0 0 4px; color: var(--accent); }
.section-meta { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

.list-head { margin: 20px 0 0; }
.list-head__title { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 48px); line-height: 1.1; letter-spacing: -0.5px; margin: 0 0 8px; overflow-wrap: anywhere; }

.list-head--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-top: 0; }
.list-filter { flex: 0 1 320px; min-width: 220px; }
.list-filter .field { margin-bottom: 0; }
.list-head--row + .section-meta { margin-top: 16px; }
.search--inline { flex: none; min-width: 0; width: 100%; }

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); columns: 3 220px; column-gap: 40px; }
.index-list li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.index-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 16px; }

.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 24px 0 20px; }
.letters a { min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); font-weight: 600; }
.letters a[aria-current="page"] { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* Quote list */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 40px; border-top: 1px solid var(--ink); }
.quote-card { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
.quote-card__text { font-family: var(--serif); font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.quote-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.byline { font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; font-size: 13px; }
.topic-link { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.topic-link:hover { text-decoration: underline; }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; font-size: 15px; }
.pager__page, .pager__step { min-width: 44px; height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); }
.pager__page.is-current { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.pager__step { border-color: var(--ink); font-weight: 600; }
.pager__gap { min-width: 28px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* Sidebar */
.widget { border-top: 3px double var(--accent); padding-top: 16px; }
.widget--light { border-top-width: 1px; border-top-style: solid; }
.widget--random { background: var(--accent-soft); border-top: 3px solid var(--accent); padding: 16px 20px 20px; }
.logo__dot { color: var(--accent); }
.widget__head { display: flex; justify-content: space-between; align-items: center; }
.widget__title { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.widget__head .widget__title { margin: 0; }
.icon-button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--accent); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-button.is-busy svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .icon-button.is-busy svg { animation: none; } }
.random-quote__text { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.4; margin: 8px 0 12px; overflow-wrap: anywhere; }

.count-list { list-style: none; margin: 0; padding: 0; }
.count-list li { border-bottom: 1px solid var(--rule); }
.count-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 16px; }
.count { color: var(--muted); font-size: 14px; }
.more-link { display: inline-block; margin-top: 12px; padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--accent); }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 4px 0 6px; }
.field { width: 100%; font-size: 15px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); margin-bottom: 8px; }
.empty-note { color: var(--muted); font-size: 15px; margin: 8px 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.plain-list a { display: inline-block; padding: 4px 0; }

/* Quote page */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover, .breadcrumb__current { color: var(--accent); }
.quote-hero { margin: 32px 0 0; padding-bottom: 32px; border-bottom: 1px solid var(--ink); }
.quote-hero__text { margin: 0; font-family: var(--serif); font-size: clamp(32px, 4.6vw, 50px); line-height: 1.18; letter-spacing: -0.5px; overflow-wrap: anywhere; }
.quote-hero__meta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; }
.byline--large { font-size: 17px; letter-spacing: 1px; }
.quote-hero__meta .topic-link { font-size: 14px; font-weight: 600; }

.share { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.share__btn { height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--paper); font-size: 14px; cursor: pointer; border-radius: 0; }
.share__btn:hover { border-color: var(--ink); }
.share__btn--strong { border-color: var(--ink); font-weight: 600; }

.tags { padding: 18px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; }
.tags__label { color: var(--muted); }
.tags a { text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }

.ad-slot { margin: 28px auto 8px; overflow: hidden; }
.ad-slot--leaderboard { max-width: 728px; min-height: 90px; }

.related { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.related__title { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 24px; line-height: 1.25; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.related__item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.related__text { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.related__meta { display: inline-block; margin-top: 8px; font-size: 13px; }
.more-link--ink { color: var(--ink); }

/* Text pages */
.prose { max-width: 720px; font-size: 17px; line-height: 1.65; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ol { padding-left: 1.4em; margin: 0 0 16px; }
.prose li { margin: 0 0 12px; }
.prose ol ol { margin-top: 12px; }
.search--page { max-width: 480px; margin: 24px 0; }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-text); }
.site-footer__inner { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--footer-text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { padding: 6px 0; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--accent-line); }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .masthead-meta span:last-child { display: none; }
  .search { flex-basis: 100%; }
  .list-filter { flex-basis: 100%; }
  .main-nav__links { gap: 4px 16px; }
  .main-nav__links a:not(.logo) { font-size: 14px; letter-spacing: 0.6px; }
  .logo--small { font-size: 28px; margin-right: 4px; }
  .page { gap: 40px; padding-top: 24px; }
  .quote-card__text { font-size: 20px; }
}
