/* verbeli.com — a cozy newspaper. Plain CSS, no build step. */

:root {
  --paper: #f5efe3;
  --paper-deep: #ece4d3;
  --card: #fbf8f1;
  --ink: #221d17;
  --ink-soft: #4b4339;
  --muted: #857a6a;
  --rule: #d9cfbd;
  --rule-strong: #221d17;
  --accent: #9b2f24;          /* newsprint red */
  --accent-soft: rgba(155, 47, 36, 0.09);
  --swap-bg: rgba(155, 47, 36, 0.08);
  --swap-line: rgba(155, 47, 36, 0.55);
  --pop: #221d17;
  --pop-ink: #f5efe3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --display: "Didot", "Bodoni 72", "Bodoni MT", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Night edition: follows the system unless the reader picked a theme (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1c1915;
    --paper-deep: #24201b;
    --card: #26221c;
    --ink: #ece4d6;
    --ink-soft: #c9bfae;
    --muted: #978c7b;
    --rule: #3a342c;
    --rule-strong: #ece4d6;
    --accent: #e0846f;
    --accent-soft: rgba(224, 132, 111, 0.12);
    --swap-bg: rgba(224, 132, 111, 0.12);
    --swap-line: rgba(224, 132, 111, 0.6);
    --pop: #ece4d6;
    --pop-ink: #1c1915;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1c1915;
  --paper-deep: #24201b;
  --card: #26221c;
  --ink: #ece4d6;
  --ink-soft: #c9bfae;
  --muted: #978c7b;
  --rule: #3a342c;
  --rule-strong: #ece4d6;
  --accent: #e0846f;
  --accent-soft: rgba(224, 132, 111, 0.12);
  --swap-bg: rgba(224, 132, 111, 0.12);
  --swap-line: rgba(224, 132, 111, 0.6);
  --pop: #ece4d6;
  --pop-ink: #1c1915;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper) var(--grain);
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.page { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Masthead ---------- */
.masthead { padding-top: 18px; text-align: center; }
.dateline {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--rule); padding-bottom: 8px;
}
.title {
  font-family: var(--display); font-weight: 700; font-size: clamp(54px, 11vw, 112px);
  line-height: 1; letter-spacing: -.02em; margin: 18px 0 6px; color: var(--ink); text-decoration: none; display: inline-block;
}
.motto { font-style: italic; color: var(--ink-soft); margin: 0 0 14px; }
.sections {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px;
  border-top: 3px double var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  padding: 8px 0; font-family: var(--sans); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.sections a { text-decoration: none; color: var(--ink); }
.sections a:hover { color: var(--accent); }

/* Day / night edition switch */
.theme-btn {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--muted);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.theme-btn:hover { color: var(--accent); }
.masthead.mini .dateline { margin-bottom: 0; }

/* Small masthead on inner pages */
.masthead.mini .title { font-size: 44px; margin: 10px 0 10px; }

/* ---------- Front page ---------- */
.front {
  display: grid; grid-template-columns: minmax(0, 1fr) 290px; grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "head controls" "body controls" "body note" "body .";
  margin-top: 26px;
}
.front > .head { grid-area: head; }
.front > .body { grid-area: body; }
.front > .head, .front > .body { padding-right: 30px; border-right: 1px solid var(--rule); }
.front > .controls { grid-area: controls; padding-left: 26px; }
.front > .note { grid-area: note; padding-left: 26px; }

.kicker { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.headline { font-family: var(--display); font-size: clamp(32px, 5vw, 50px); line-height: 1.08; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
.dek { font-size: 21px; font-style: italic; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.45; }
.byline { font-family: var(--sans); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 6px 0; margin-bottom: 18px; }

.story { columns: 2 260px; column-gap: 30px; column-rule: 1px solid var(--rule); font-size: 19px; line-height: 1.7; hyphens: auto; }
.story p { margin: 0 0 14px; }
.story p:first-child::first-letter {
  float: left; font-family: var(--display); font-size: 74px; line-height: .82; padding: 6px 8px 0 0; color: var(--accent); font-weight: 700;
}
.story .pull { break-inside: avoid; font-family: var(--display); font-size: 24px; line-height: 1.3; font-style: italic; text-align: center; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 12px 6px; margin: 4px 0 16px; text-align: center; }

/* Swapped words — same feel as the extension */
.w { transition: opacity .25s ease; hyphens: manual; white-space: nowrap; }
.w.on {
  background: var(--swap-bg); border-bottom: 1.5px dotted var(--swap-line); border-radius: 3px; padding: 0 2px;
  cursor: pointer; outline-offset: 2px;
}
.w.on:hover, .w.on:focus-visible, .w.on.open { background: var(--accent-soft); border-bottom-style: solid; }
.w.fading { opacity: 0; }
.w.known { border-bottom: 1px solid var(--rule); background: none; }

/* ---------- Reader's settings (demo controls) ---------- */
.box { border: 1px solid var(--ink); background: var(--card); padding: 16px 16px 14px; margin-bottom: 22px; box-shadow: 4px 4px 0 var(--paper-deep); }
.box h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.field { margin-bottom: 14px; }
.field label, .field .lbl { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
select, input[type="range"] { width: 100%; }
.field.pair { display: grid; gap: 12px; }
select {
  font: inherit; font-size: 16px; padding: 6px 8px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 4px;
}
input[type="range"] { accent-color: var(--accent); }
.ticks { display: flex; justify-content: space-between; font-family: var(--sans); font-size: 11px; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--sans); font-size: 14px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.hint { font-family: var(--sans); font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 6px 0 0; }
.tally { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 4px; }
.tally b { color: var(--accent); }

.aside-note { font-size: 16px; color: var(--ink-soft); }
.aside-note h4 { font-family: var(--display); font-size: 21px; margin: 0 0 6px; color: var(--ink); }

/* ---------- Word card (popover) ---------- */
.card {
  position: absolute; z-index: 10; width: 250px; padding: 14px 14px 10px;
  background: var(--pop); color: var(--pop-ink); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(20, 14, 6, .28); font-family: var(--sans); font-size: 13px;
}
.card[hidden] { display: none; }
.card .orig { color: color-mix(in srgb, var(--pop-ink) 65%, transparent); }
.card .orig b { font-family: var(--serif); font-size: 19px; color: var(--pop-ink); margin-left: 4px; }
.card .base { margin: 4px 0 0; color: color-mix(in srgb, var(--pop-ink) 65%, transparent); }
.card .base i { color: var(--pop-ink); font-style: normal; font-family: var(--serif); font-size: 15px; }
.card .btns { display: flex; gap: 6px; margin-top: 12px; }
.card button {
  flex: 1; font: inherit; font-size: 13px; padding: 7px 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--pop-ink); border: 1px solid color-mix(in srgb, var(--pop-ink) 25%, transparent);
}
.card button:hover { background: color-mix(in srgb, var(--pop-ink) 12%, transparent); }
.card .msg { margin: 10px 0 2px; color: color-mix(in srgb, var(--pop-ink) 70%, transparent); min-height: 1em; }

/* ---------- How it works ---------- */
.band { margin-top: 34px; border-top: 3px double var(--rule-strong); padding-top: 14px; }
.band > h2 { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-align: center; margin: 0 0 18px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.cols3 > div { padding: 0 22px; border-left: 1px solid var(--rule); }
.cols3 > div:first-child { border-left: 0; padding-left: 0; }
.cols3 > div:last-child { padding-right: 0; }
.cols3 h3 { font-family: var(--display); font-size: 25px; line-height: 1.15; margin: 0 0 8px; }
.cols3 .num { font-family: var(--display); font-style: italic; color: var(--accent); font-size: 18px; display: block; margin-bottom: 2px; }
.cols3 p { margin: 0; font-size: 17px; color: var(--ink-soft); }

/* ---------- Subscriptions as clip-out coupons ---------- */
.coupons { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; max-width: 820px; margin: 0 auto; }
.coupon { border: 2px dashed var(--ink-soft); padding: 22px 24px 20px; position: relative; background: var(--card); }
.coupon::before { content: "✂"; position: absolute; top: -14px; left: 18px; background: var(--paper); padding: 0 6px; color: var(--ink-soft); font-size: 18px; }
.coupon h3 { font-family: var(--display); font-size: 30px; margin: 0; }
.coupon .price { font-family: var(--display); font-size: 40px; font-weight: 700; margin: 6px 0 0; line-height: 1.1; }
.coupon .price small { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); }
.coupon .alt { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.coupon ul { margin: 10px 0 0; padding-left: 18px; font-size: 16.5px; color: var(--ink-soft); }
.coupon li { margin-bottom: 4px; }
.coupon.premium { border-color: var(--accent); }
.coupon.premium h3 { color: var(--accent); }

/* ---------- Get it ---------- */
.notice { text-align: center; max-width: 640px; margin: 0 auto; }
.notice .big { font-family: var(--display); font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
.notice p { color: var(--ink-soft); }
.stamp {
  display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); border: 2px solid var(--accent); padding: 4px 10px; transform: rotate(-3deg); margin-bottom: 12px;
}

/* ---------- Footer imprint ---------- */
footer { margin-top: 40px; border-top: 1px solid var(--rule-strong); padding: 14px 0 40px; font-family: var(--sans); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
footer nav a { margin-right: 18px; color: var(--ink-soft); text-decoration: none; }
footer nav a:hover { color: var(--accent); }

/* ---------- Legal pages ---------- */
article.legal { max-width: 720px; margin: 26px auto 0; }
article.legal h1 { font-family: var(--display); font-size: 44px; line-height: 1.1; margin: 0 0 4px; }
article.legal .updated { font-family: var(--sans); color: var(--muted); font-size: 13px; margin: 0 0 24px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
article.legal h2 { font-family: var(--display); font-size: 25px; margin: 30px 0 8px; }
article.legal p, article.legal li { font-size: 17.5px; }
article.legal li { margin-bottom: 6px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .front { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "controls" "body" "note"; }
  .front > .head, .front > .body { padding-right: 0; border-right: 0; }
  .front > .controls, .front > .note { padding-left: 0; }
  .front > .note { margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 14px; }
  .story { columns: 1; }
  .cols3 { grid-template-columns: 1fr; gap: 18px; }
  .cols3 > div { border-left: 0; padding: 0; border-top: 1px solid var(--rule); padding-top: 14px; }
  .cols3 > div:first-child { border-top: 0; padding-top: 0; }
  .coupons { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .dateline .vol { display: none; }
  .story { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .w { transition: none; }
}
