:root {
  --paper: #f3efe7;
  --ink: #1c1916;
  --muted: #6e675e;
  --line: #d4cdc2;
  --oxide: #8d3a2b;
  --wash: #efe4d4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

:root[data-bs-theme="dark"] {
  --paper: #161410;
  --ink: #f3efe7;
  --muted: #b3aa9e;
  --line: #3c352d;
  --oxide: #d48474;
  --wash: #2a241e;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.dateline,
.status,
.kicker,
.checked,
.colophon {
  color: var(--muted);
}

.dateline {
  justify-self: start;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mast-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
}

.brand,
.brand:visited {
  justify-self: center;
  color: inherit;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--oxide);
}

.live-tag {
  display: none;
}

.mast.is-live .live-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.28em 0.48em 0.2em;
  border-radius: 999px;
  background: var(--oxide);
  color: #f3efe7;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  vertical-align: 0.32em;
}

.mast-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-btn,
.mast .listen {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}

.mast .listen-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.settings-btn:hover {
  border-color: var(--ink);
  background: var(--wash);
}

.settings-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.settings-btn[aria-pressed="true"]:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--paper));
}

:root[data-bs-theme="dark"] .settings-btn[aria-pressed="true"],
:root[data-bs-theme="dark"] .settings-btn[aria-pressed="true"]:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.settings-btn i {
  display: block;
  font-size: 0.85rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pulse {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--oxide);
}

.pulse.is-on {
  animation: beat 2.4s ease-out infinite;
}

.listen-icon {
  display: block;
  font-size: 0.92rem;
}

.listen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  appearance: none;
  min-width: 6.1rem;
  min-height: 2rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.mast .listen {
  gap: 0;
  min-width: 2.25rem;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.listen:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--paper));
}

.listen[aria-pressed="true"],
.listen[aria-pressed="true"]:hover {
  background: transparent;
  color: var(--ink);
}

:root[data-bs-theme="dark"] .listen {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

:root[data-bs-theme="dark"] .listen:hover,
:root[data-bs-theme="dark"] .listen[aria-pressed="true"],
:root[data-bs-theme="dark"] .listen[aria-pressed="true"]:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.listen:focus-visible,
.settings-btn:focus-visible,
.brand:focus-visible,
.lead a:focus-visible,
.callout a:focus-visible,
.story a:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
}

.tooltip.hear-tip {
  --bs-tooltip-bg: var(--ink);
  --bs-tooltip-color: var(--paper);
  --bs-tooltip-opacity: 1;
  font-family: var(--sans);
  font-size: 0.75rem;
}

body:has(.mast.is-live) .tooltip.hear-tip {
  --bs-tooltip-bg: var(--paper);
  --bs-tooltip-color: var(--ink);
}

body:has(.mast.is-live) .tooltip.hear-tip .tooltip-inner {
  border: 1px solid var(--ink);
}

.mast {
  background: var(--paper);
  border-bottom: 3px double var(--ink);
  container-type: inline-size;
  container-name: mast;
  transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.mast.is-live {
  background: var(--ink);
  color: var(--paper);
  border-bottom-color: var(--oxide);
}

.mast.is-live .dateline,
.mast.is-live .status,
.mast.is-live .checked,
.mast.is-live .settings-btn {
  color: var(--paper);
  border-color: color-mix(in srgb, var(--paper) 40%, transparent);
}

.mast.is-live .settings-btn:hover {
  border-color: var(--paper);
  background: color-mix(in srgb, var(--paper) 16%, transparent);
  color: var(--paper);
}

.mast.is-live .settings-btn[aria-pressed="true"],
.mast.is-live .settings-btn[aria-pressed="true"]:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.mast.is-live .brand span {
  color: #e8b4a8;
}

:root[data-bs-theme="dark"] .mast.is-live .brand span {
  color: var(--oxide);
}

.mast.is-live .brand .live-tag {
  color: #f3efe7;
}

:root[data-bs-theme="dark"] .mast.is-live .brand .live-tag {
  color: #1c1916;
}

.mast.is-live .listen,
.mast.is-live .listen:hover,
.mast.is-live .listen[aria-pressed="true"],
.mast.is-live .listen[aria-pressed="true"]:hover,
:root[data-bs-theme="dark"] .mast.is-live .listen,
:root[data-bs-theme="dark"] .mast.is-live .listen:hover,
:root[data-bs-theme="dark"] .mast.is-live .listen[aria-pressed="true"],
:root[data-bs-theme="dark"] .mast.is-live .listen[aria-pressed="true"]:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.front {
  border-bottom: 1px solid var(--line);
}

.front:has(.lead-quiet) {
  border-bottom: 0;
}

.lead a,
.callout a,
.story a,
.lead a:visited,
.callout a:visited,
.story a:visited {
  color: inherit;
  text-decoration: none;
}

.lead {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
}

.lead a {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.15rem;
}

.lead figure,
.callout figure,
.story figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

.media-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: inherit;
  pointer-events: none;
}

.media-placeholder .placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border-radius: inherit;
  background-color: var(--wash);
  opacity: 1;
  cursor: default;
}

.lead figure.is-loading img,
.callout figure.is-loading img,
.story figure.is-loading img,
.deck-card figure.is-loading img {
  opacity: 0 !important;
}

.lead figure {
  flex: 0 0 auto;
  width: 100%;
  margin-bottom: 1.05rem;
}

.lead img,
.callout img,
.story img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(6) grayscale(1) sepia(.25) brightness(1);
  transform: scale(1);
  transition: transform 0.55s ease, opacity 0.28s ease;
}

.eyebrow,
.kicker {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub.badge {
  --bs-badge-padding-x: 0.55em;
  --bs-badge-padding-y: 0.35em;
  --bs-badge-font-size: 0.68rem;
  --bs-badge-font-weight: 500;
  --bs-badge-color: var(--paper);
  background-color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topic-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.topic-mark .fa-solid {
  font-size: 0.95em;
}

.topic-shrug {
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}

.filter-field label .topic-shrug {
  width: auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.lead,
.callout,
.story {
  container-type: inline-size;
}

.lead h1,
.lead-quiet h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  overflow-wrap: break-word;
}

.lead.no-image a,
.callout.no-image a,
.story.no-image a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  height: 100%;
  text-align: left;
}

.lead-col {
  display: flex;
  flex-direction: column;
}

.lead.no-image a {
  flex: 1 1 auto;
  min-height: clamp(16rem, 38vw, 28rem);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.lead.no-image h1,
.callout.no-image h2,
.story.no-image h3 {
  width: 100%;
  text-align: left;
  text-wrap: balance;
}

.lead.no-image h1 {
  font-size: clamp(2.8rem, 8.5cqw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.lead-quiet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28vh;
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
}

.wire-wait {
  margin: 0 0 1.35rem;
  color: var(--muted);
  line-height: 1;
}

.wire-scan {
  position: relative;
  display: grid;
  place-items: end center;
  width: 7.5rem;
  height: 6.75rem;
}

.wire-scan .fa-satellite-dish {
  transform-origin: 50% 82%;
  animation: wire-sweep 3.2s ease-in-out infinite;
}

.wire-scan::before,
.wire-scan::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1.35rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--oxide);
  border-radius: 50%;
  transform: translate(-50%, 50%);
  opacity: 0;
  pointer-events: none;
  animation: wire-ping 3.2s ease-out infinite;
}

.wire-scan::after {
  animation-delay: 1.6s;
}

.wire-blip {
  position: absolute;
  color: var(--oxide);
  font-size: 0.45rem;
  opacity: 0;
  animation: wire-blip 4.8s ease-out infinite;
}

.wire-blip:nth-child(2) {
  top: 22%;
  left: 16%;
  animation-delay: 0.35s;
}

.wire-blip:nth-child(3) {
  top: 6%;
  left: 46%;
  animation-delay: 1.9s;
}

.wire-blip:nth-child(4) {
  top: 24%;
  right: 10%;
  animation-delay: 3.35s;
}

@keyframes wire-sweep {
  0%, 100% { transform: rotate(-20deg); }
  50% { transform: rotate(20deg); }
}

@keyframes wire-ping {
  0% {
    width: 1.15rem;
    height: 1.15rem;
    opacity: 0.55;
  }
  100% {
    width: 6.6rem;
    height: 6.6rem;
    opacity: 0;
  }
}

@keyframes wire-blip {
  0%, 72%, 100% {
    opacity: 0;
    transform: scale(0.35);
  }
  8% {
    opacity: 1;
    transform: scale(1);
  }
  22% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wire-scan .fa-satellite-dish,
  .wire-scan::before,
  .wire-scan::after,
  .wire-blip {
    animation: none;
  }

  .wire-scan::before,
  .wire-scan::after,
  .wire-blip {
    opacity: 0;
  }
}

.lead-quiet h1 {
  max-width: 16em;
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
}

.callout-col {
  display: flex;
  flex-direction: column;
}

.callout {
  flex: 1 1 auto;
  border-bottom: 1px solid var(--line);
}

.callout:last-child {
  border-bottom: 0;
}

.callout a {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  height: 100%;
  padding: 1rem 0.2rem 1rem 1.15rem;
}


.callout.no-image {
  display: flex;
}

.callout.no-image a {
  flex: 1;
  align-items: stretch;
  grid-template-columns: 1fr;
  min-height: 8.5rem;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.callout h2,
.story h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.callout h2 {
  font-size: 1.35rem;
}

.callout a,
.callout.no-image a,
.callout.no-image h2 {
  text-align: left;
}

.callout.no-image h2 {
  font-size: clamp(1.7rem, 8cqw, 3.4rem);
  line-height: 1.02;
}

.lead time,
.callout time,
.story time {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.lead,
.callout,
.story {
  transition: background-color 0.28s ease;
}

.lead:hover,
.callout:hover,
.story:hover,
.lead:focus-within,
.callout:focus-within,
.story:focus-within {
  background: var(--wash);
}

.is-speaking {
  background: var(--wash);
  box-shadow: inset 3px 0 0 var(--oxide);
}

::highlight(speaking) {
  background-color: var(--ink);
  color: var(--paper);
}

mark.spoken-word {
  background-color: var(--ink);
  color: var(--paper);
}

.day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 1.35rem 0 0.75rem;
  text-align: center;
}

.day-head h2 {
  width: 100%;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
}

.checked {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.story {
  grid-column: span 4;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story:nth-child(5n + 1),
.story:nth-child(5n + 2) {
  grid-column: span 6;
}

.story:nth-child(5n + 2),
.story:nth-child(5n + 5),
.story:last-child {
  border-right: 0;
}

.story a {
  display: block;
  height: 100%;
  padding: 0.95rem 1rem 1.1rem;
}

.story figure {
  margin-bottom: 0.75rem;
}

.lead a:hover img.opacity-50,
.callout a:hover img.opacity-50,
.story a:hover img.opacity-50,
.lead a:focus-visible img.opacity-50,
.callout a:focus-visible img.opacity-50,
.story a:focus-visible img.opacity-50 {
  opacity: 0.75 !important;
  transform: scale(1.045);
}

@media (prefers-reduced-motion: reduce) {
  .lead,
  .callout,
  .story,
  .lead img,
  .callout img,
  .story img {
    transition: none;
  }

  .lead a:hover img.opacity-50,
  .callout a:hover img.opacity-50,
  .story a:hover img.opacity-50,
  .lead a:focus-visible img.opacity-50,
  .callout a:focus-visible img.opacity-50,
  .story a:focus-visible img.opacity-50 {
    transform: none;
  }
}

.story h3 {
  font-size: 1.12rem;
}

.story:nth-child(5n + 1) h3,
.story:nth-child(5n + 2) h3 {
  font-size: 1.5rem;
  line-height: 1.15;
}

.story.no-image {
  display: flex;
}

.story.no-image a {
  flex: 1;
  min-height: 12.5rem;
}

.story.no-image h3,
.story.no-image:nth-child(5n + 1) h3,
.story.no-image:nth-child(5n + 2) h3 {
  font-size: clamp(1.6rem, 8.5cqw, 4.2rem);
  line-height: 1.02;
}

.story .kicker {
  margin-bottom: 0.3rem;
}

.is-new {
  animation: rise 0.55s ease;
}

.colophon {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

.seo-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 2fr);
  gap: 2rem 3rem;
  align-items: start;
}

.seo-columns > * {
  min-width: 0;
}

.colophon .about,
.colophon .faq {
  max-width: none;
  padding-top: 0;
}

.colophon h2 {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.colophon .about p,
.colophon .faq dd {
  margin: 0;
  line-height: 1.55;
}

.colophon .faq dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.colophon .faq dl > div {
  min-width: 0;
}

.colophon .faq dt {
  margin: 0 0 0.2rem;
  color: var(--ink);
  font-weight: 600;
}

.colophon .credit {
  margin-top: 1.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 900px) {
  .seo-columns {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 640px) {
  .colophon .faq dl {
    grid-template-columns: 1fr;
  }
}

.settings-sheet:not([open]),
.reader-sheet:not([open]) {
  display: none;
}

.settings-sheet {
  --bs-dialog-bg: var(--paper);
  --bs-dialog-color: var(--ink);
  --bs-dialog-border-color: var(--line);
  width: min(36rem, calc(100vw - 2rem));
  max-width: 36rem;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.settings-sheet .dialog-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.settings-sheet .dialog-title i {
  font-size: 0.85em;
}

.settings-sheet .dialog-header,
.settings-sheet .dialog-footer {
  border-color: var(--line);
}

.settings-sheet .dialog-footer {
  justify-content: space-between;
}

.settings-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.settings-block h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-block h3 i {
  width: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.settings-note,
.filter-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.filter-note {
  margin: 0 0 0.75rem;
}

.filter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.25rem;
  row-gap: 0.1rem;
}

.filter-field {
  align-items: center;
  margin: 0;
  padding: 0.28rem 0;
}

.filter-field label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.filter-field label i {
  width: 1.1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.settings-sheet .switch {
  --bs-switch-checked-bg: var(--ink);
  --bs-switch-checked-border-color: var(--ink);
  --bs-switch-checked-indicator-bg: var(--paper);
}

/* Bootstrap paints the knob with --bs-theme-contrast, which stays white
   on the ink track. Use the paper color so an on switch stays readable. */
.settings-sheet .switch:has(input:checked)::before {
  background-color: var(--paper);
}

.settings-sheet .btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-sheet .theme-secondary {
  --bs-theme-bg: transparent;
  --bs-theme-fg: var(--ink);
  --bs-theme-border: var(--line);
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.settings-sheet .theme-primary {
  --bs-theme-bg: var(--ink);
  --bs-theme-fg: var(--paper);
  --bs-theme-border: var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.settings-sheet .btn-solid:disabled {
  opacity: 0.38;
}

@media (max-width: 520px) {
  .settings-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .filter-fields {
    grid-template-columns: 1fr;
  }
}

.reader-sheet {
  --bs-dialog-backdrop-bg: transparent;
  --bs-dialog-backdrop-blur: 18px;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  color: var(--ink);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.reader-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 2;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.reader-kicker {
  justify-self: start;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.reader-bar .btn-close {
  justify-self: end;
  margin: 0;
}

.reader-copy {
  max-width: 40rem;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.reader-listen {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-self: center;
  margin: 0;
}

.listen-pace {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.listen-pace button,
.speed-pace button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1;
}

.listen-pace button:hover,
.speed-pace button:hover {
  border-color: var(--ink);
  background: var(--wash);
}

.listen:disabled,
.listen-pace button:disabled,
.speed-pace button:disabled {
  opacity: 0.38;
  cursor: default;
}

.listen-pace button:disabled:hover,
.speed-pace button:disabled:hover {
  border-color: var(--line);
  background: transparent;
}

#reader-listen[hidden],
#reader-speed[hidden] {
  display: none !important;
}

.reader-listen .listen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
}

.reader-listen .listen i {
  font-size: 0.72rem;
}

.reader-listen .fa-play {
  margin-left: 0.08rem;
}

.reader-copy .reader-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.15rem 0 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1;
}

.reader-copy .reader-eyebrow:empty {
  display: none;
}

.speed-read {
  margin: 16vh 0 2rem;
}

.speed-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr);
  align-items: baseline;
  min-height: 1.2em;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.speed-read.is-large .speed-line {
  font-size: clamp(3.4rem, 11vw, 6.5rem);
}

.speed-before {
  overflow: hidden;
  text-align: right;
  white-space: nowrap;
}

.speed-focus {
  color: var(--oxide);
}

.speed-after {
  overflow: hidden;
  white-space: nowrap;
}

.speed-pace {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.speed-pace .fa-solid {
  font-size: 0.68rem;
}

.speed-pace .fa-play {
  margin-left: 0.08rem;
}

.speed-pace .speed-size[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.reader-copy.is-speeding .reader-eyebrow,
.reader-copy.is-speeding h1,
.reader-copy.is-speeding #reader-body,
.reader-copy.is-speeding .reader-out {
  display: none;
}

@media (max-width: 575.98px) {
  .speed-pace {
    gap: 0.4rem;
    margin-top: 1.25rem;
  }

  .listen-pace button,
  .speed-pace button {
    width: 1.7rem;
    height: 1.7rem;
    min-width: 1.7rem;
    min-height: 1.7rem;
  }

  #reader-listen,
  .reader-restart,
  .reader-stop,
  .reader-speed {
    position: relative;
    box-sizing: border-box;
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 50%;
  }

  #reader-listen-label,
  .reader-restart span,
  .reader-stop span,
  .reader-speed span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.reader-copy h1 {
  margin: 0.35rem 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.reader-copy p,
.reader-copy blockquote {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.6;
}

.reader-copy blockquote {
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--oxide);
  color: var(--muted);
}

.reader-copy h2 {
  margin: 1.8rem 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
}

.reader-status {
  color: var(--muted);
}

.reader-copy .reader-credit {
  margin: 0.2rem 0 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.reader-out {
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.reader-copy:has(#reader-body:empty) .reader-out {
  margin-top: 0;
}

.reader-out a {
  color: var(--oxide);
}

.colophon .container-fluid {
  padding-top: 1.1rem;
  padding-bottom: 1.4rem;
}

::selection {
  background: #e7d3c6;
}

@keyframes beat {
  0% { box-shadow: 0 0 0 0 rgba(141, 58, 43, 0.45); }
  100% { box-shadow: 0 0 0 8px rgba(141, 58, 43, 0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 1024px) {
  .lead-col {
    min-height: 75vh;
  }

  .front.has-callouts .lead-col {
    border-right: 1px solid var(--line);
  }
}

@media (max-width: 1023.98px) {
  .lead a,
  .lead.no-image a {
    padding-right: 0;
    padding-left: 0;
  }

  .lead a > :not(figure) {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .front.has-callouts .callout-col {
    border-top: 1px solid var(--line);
  }

  .callout a {
    padding-left: 0;
  }

  .callout.no-image a {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mosaic {
    grid-template-columns: 1fr 1fr;
  }

  .story {
    border-right: 1px solid var(--line);
  }

  .story:nth-child(2n),
  .story:last-child {
    border-right: 0;
  }

  .story,
  .story:nth-child(5n + 1),
  .story:nth-child(5n + 2) {
    grid-column: span 1;
  }

  .story:nth-child(5n + 1) h3,
  .story:nth-child(5n + 2) h3 {
    font-size: 1.28rem;
  }

  .story.no-image h3,
  .story.no-image:nth-child(5n + 1) h3,
  .story.no-image:nth-child(5n + 2) h3 {
    font-size: clamp(1.55rem, 8cqw, 3rem);
  }
}

@container mast (max-width: 900px) {
  /* Match Bootstrap dialog header: 1rem padding, compact icon buttons. */
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mast-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.55rem;
    min-height: 0;
    padding-block: 1rem;
  }

  .dateline {
    justify-self: start;
    min-width: 0;
    overflow: hidden;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    height: 2.25rem;
    font-size: 2.25rem;
    line-height: 1;
  }

  .mast.is-live .live-tag {
    margin-left: 0.35rem;
    font-size: 0.55rem;
    vertical-align: 0.15em;
  }

  .mast-tools {
    justify-self: end;
    gap: 0.5rem;
  }

  .settings-btn,
  .mast .listen {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }

  .settings-btn i,
  .mast .listen-icon {
    font-size: 0.85rem;
  }

  .checked,
  #status-text {
    display: none;
  }

  .status {
    gap: 0;
  }

}

@container mast (max-width: 520px) {
  .mast-bar {
    gap: 0.5rem;
    padding-block: 1rem;
  }

  .brand {
    height: 2.25rem;
    font-size: 2.25rem;
    line-height: 1;
  }

  .mast.is-live .live-tag {
    margin-left: 0.28rem;
    font-size: 0.5rem;
  }

  .mast-tools {
    gap: 0.5rem;
  }

  .settings-btn,
  .mast .listen {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }
}

@media (max-width: 575.98px) {
  .callout a {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .mosaic {
    grid-template-columns: 1fr;
  }

  .story,
  .story:nth-child(2n) {
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse.is-on,
  .is-new {
    animation: none;
  }
}

/* Installed app — same as weatheroo.in:
   manifest theme_color (#8d3a2b, their #0d6efd) paints the OS bars.
   No color-scheme override. Body stays transparent so a fixed oxide layer
   (their weather backdrop) shows through the gesture bar, not the paper page. */
html.pwa-standalone,
html.pwa-standalone[data-bs-theme="light"],
html.pwa-standalone[data-bs-theme="dark"] {
  background: #8d3a2b;
}

body.pwa-standalone {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: transparent;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}

body.pwa-standalone::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #8d3a2b;
  pointer-events: none;
}

body.pwa-standalone .page {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--paper);
  color: var(--ink);
}

@media (display-mode: standalone), (display-mode: minimal-ui) {
  html {
    background: #8d3a2b;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    margin: 0;
    background: transparent;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #8d3a2b;
    pointer-events: none;
  }

  .page {
    flex: 1 1 auto;
    min-height: 0;
    background: var(--paper);
    color: var(--ink);
  }

  body.is-decking,
  body.is-decking .page {
    height: auto;
    max-height: none;
  }
}

/* Mobile swipe deck — dating-app inspired card stack */
.deck {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 0.55rem 0.85rem 0.75rem;
  box-sizing: border-box;
  overflow: hidden;
}

.deck-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 2rem;
}

.deck-progress {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
}

.deck-reset,
.deck-replay {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Keep Start over in layout to avoid CLS when it becomes available */
.deck-reset {
  visibility: hidden;
  pointer-events: none;
}

.deck-reset.is-on {
  visibility: visible;
  pointer-events: auto;
}

.deck-reset:hover,
.deck-replay:hover {
  border-color: var(--ink);
  background: var(--wash);
}

.deck-reset:disabled {
  cursor: default;
}

.deck-board {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
}

.deck-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.deck-coach {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 6;
}

.deck-coach[hidden] {
  display: none !important;
}

.deck-tip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--oxide) 70%, var(--ink));
  border-radius: 999px;
  background: var(--oxide);
  color: var(--paper);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 18%, transparent);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  animation: deck-tip-float 2.8s ease-in-out infinite;
}

.deck-tip-up {
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  animation-name: deck-tip-float-up;
}

.deck-tip-left {
  top: 46%;
  left: 0.55rem;
  animation-name: deck-tip-float-left;
}

.deck-tip-right {
  top: 46%;
  right: 0.55rem;
  animation-name: deck-tip-float-right;
}

.deck-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--paper);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent),
    0 18px 40px color-mix(in srgb, var(--ink) 12%, transparent);
  transform-origin: 50% 110%;
  will-change: transform;
  cursor: grab;
  color: var(--ink);
  container-type: size;
  container-name: deck-card;
}

.deck-card.is-dragging {
  cursor: grabbing;
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--ink) 8%, transparent),
    0 28px 55px color-mix(in srgb, var(--ink) 18%, transparent);
  transition: none;
}

.deck-card.is-exit {
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.42s ease;
}

.deck-card.is-snap {
  transition: transform 0.38s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.deck-card.is-enter {
  animation: deck-enter 0.45s cubic-bezier(0.22, 1.15, 0.36, 1) both;
}

.deck-card.is-under {
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.deck-placeholder {
  overflow: hidden;
}

.deck-placeholder-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.deck-ph-media {
  flex: 0 0 32%;
  width: 100%;
  min-height: 6rem;
  margin: 0;
  border-radius: 1.15rem 1.15rem 0 0;
}

.deck-placeholder-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.25rem 1.2rem 1.45rem;
}

.deck-placeholder-copy .placeholder {
  display: block;
  min-height: 0.85rem;
}

.deck-placeholder-copy .placeholder.col-11,
.deck-placeholder-copy .placeholder.col-9 {
  min-height: 1.35rem;
}

.deck-card.is-speaking {
  outline: 2px solid var(--oxide);
  outline-offset: -2px;
}

.deck-card.is-heard .deck-copy {
  opacity: 0.92;
}

.deck-latest-badge {
  position: absolute;
  left: 0.9rem;
  top: calc(32% - 2.5rem);
  z-index: 5;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 3px solid currentColor;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  transform: rotate(-14deg);
}

.deck-card.no-image .deck-latest-badge {
  top: 1.25rem;
  left: 0.9rem;
  bottom: auto;
}

.deck-card.no-image.is-latest .deck-copy {
  padding-top: 3.35rem; /* keep Latest stamp above the publication */
}

.deck-card:nth-child(1) { z-index: 3; }
.deck-card:nth-child(2) { z-index: 2; }
.deck-card:nth-child(3) { z-index: 1; }

.deck-stamps {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
}

.deck-stamp {
  position: absolute;
  padding: 0.35rem 0.55rem;
  border: 3px solid currentColor;
  border-radius: 0.35rem;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.12s ease;
}

.deck-stamp-read {
  top: 1.15rem;
  color: var(--oxide);
}

.deck-stamp-left {
  right: 1rem;
  transform: rotate(18deg) scale(0.92);
}

.deck-stamp-right {
  left: 1rem;
  transform: rotate(-18deg) scale(0.92);
}

.deck-stamp-open {
  top: 1.15rem;
  left: 50%;
  color: var(--ink);
  transform: translateX(-50%) rotate(-4deg) scale(0.92);
}

.deck-stamp-back {
  top: 1.15rem;
  color: var(--ink);
}

html:not([data-bs-theme="dark"]) .deck-card:not(.no-image) .deck-stamp-back,
html:not([data-bs-theme="dark"]) .deck-card:not(.no-image) .deck-latest-badge {
  filter: invert(1) contrast(1.08);
}

.deck-card.is-hint-left .deck-stamp-left,
.deck-card.is-hint-right .deck-stamp-right,
.deck-card.is-hint-up .deck-stamp-open,
.deck-card.is-stamped-heard .deck-stamp-left,
.deck-card.is-heard .deck-stamp-left {
  opacity: 1;
  transform: rotate(18deg) scale(1);
}

.deck-card.is-hint-right .deck-stamp-right {
  transform: rotate(-18deg) scale(1);
}

.deck-card.is-hint-up .deck-stamp-open {
  transform: translateX(-50%) rotate(-4deg) scale(1);
}

.deck-card.is-stamped-heard .deck-stamp-left,
.deck-card.is-heard .deck-stamp-left {
  transform: rotate(18deg) scale(1.04);
}

.deck-card figure {
  position: relative;
  flex: 0 0 32%;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--wash);
  border-radius: 1.15rem 1.15rem 0 0;
}

.deck-card.no-image figure {
  display: none;
}

.deck-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(6) grayscale(1) sepia(.25) brightness(1);
  pointer-events: none;
}

.deck-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  min-height: 0;
  padding: 1.5rem 1.2rem; /* at least py-4 */
  overflow: visible;
  background: var(--paper);
  border-radius: 0 0 1.15rem 1.15rem;
}

.deck-card.no-image .deck-copy {
  flex: 1 1 auto;
  justify-content: center;
  padding: 1.5rem 1.35rem;
  border-radius: 1.15rem;
}

.deck-copy .kicker {
  flex: 0 0 auto;
  margin: 0;
}

.deck-copy h2 {
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 6.5cqh, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* Shorter headlines scale up but stay inside the copy box */
.deck-card.is-short .deck-copy h2 {
  font-size: clamp(2.15rem, 8.5cqh, 3.25rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  -webkit-line-clamp: 6;
}

.deck-card.is-medium .deck-copy h2 {
  font-size: clamp(2rem, 7.5cqh, 3rem);
  -webkit-line-clamp: 7;
}

.deck-card.no-image .deck-copy h2 {
  font-size: clamp(2.2rem, 9cqh, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  -webkit-line-clamp: 11;
}

.deck-card.no-image.is-short .deck-copy h2,
.deck-card.no-image.is-medium .deck-copy h2 {
  font-size: clamp(2.2rem, 9cqh, 3.5rem);
}

.deck-copy time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.deck-empty {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 0;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
  box-sizing: border-box;
}

.deck.is-done .deck-board,
.deck.is-done .deck-actions {
  display: none;
}

.deck.is-done .deck-empty {
  display: flex;
  flex: 1 1 auto;
  min-height: min(72vh, 100%);
}

.deck-empty-kicker {
  margin: 0;
  color: var(--oxide);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deck-empty h2 {
  margin: 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 12vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.deck-empty p {
  margin: 0;
  max-width: 28ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.deck-empty .deck-replay {
  margin-top: 0.65rem;
}

.deck-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.deck-act {
  display: grid;
  place-items: center;
  width: 3.35rem;
  height: 3.35rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 10%, transparent);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.deck-act:hover,
.deck-act:focus-visible {
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

.deck-act:active {
  transform: scale(0.96);
}

.deck-act-read {
  color: var(--oxide);
  border-color: color-mix(in srgb, var(--oxide) 35%, var(--line));
}

.deck-act-read:hover,
.deck-act-read:focus-visible {
  background: color-mix(in srgb, var(--oxide) 12%, var(--paper));
  border-color: var(--oxide);
}

.deck-act-back {
  color: var(--ink);
  border-color: var(--line);
}

.deck-act-back:hover,
.deck-act-back:focus-visible {
  background: var(--wash);
  border-color: var(--ink);
}

.deck-act-back:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.deck-act-open {
  width: 3.85rem;
  height: 3.85rem;
  color: var(--ink);
  border-color: var(--ink);
}

.deck-act-open:hover,
.deck-act-open:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

@keyframes deck-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes deck-tip-float-up {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.92; }
  50% { transform: translateX(-50%) translateY(-7px); opacity: 1; }
}

@keyframes deck-tip-float-left {
  0%, 100% { transform: translateX(0); opacity: 0.92; }
  50% { transform: translateX(-6px); opacity: 1; }
}

@keyframes deck-tip-float-right {
  0%, 100% { transform: translateX(0); opacity: 0.92; }
  50% { transform: translateX(6px); opacity: 1; }
}

@media (max-width: 767.98px) {
  body.is-decking {
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.is-decking .front,
  body.is-decking .day,
  body.is-decking .colophon {
    display: none !important;
  }

  body.is-decking .deck {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  body.is-decking .deck-top {
    flex: 0 0 auto;
  }

  body.is-decking .deck-board {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  body.is-decking main.container-fluid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
  }

  body.is-decking .page {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  /* Installed app: don’t let the paper sheet cover the gesture bar (weatheroo backdrop). */
  body.pwa-standalone.is-decking .page {
    height: auto;
    max-height: none;
  }

  /* Standalone: keep deck inside safe-area padding (getwhether-style body pad). */
  body.pwa-standalone.is-decking {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.pwa-standalone.is-decking .page {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  body.is-decking .mast {
    flex: 0 0 auto;
  }
}

@media (min-width: 768px) {
  .deck {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck-card.is-enter,
  .deck-card.is-exit,
  .deck-card.is-snap,
  .deck-act,
  .deck-tip {
    animation: none;
    transition: none;
  }
}
