:root {
  --plaster: #f2e8d8;
  --paper: rgb(255 252 246 / 60%);
  --ink: #241a16;
  --muted-ink: #69584e;
  --oxblood: #743126;
  --rule: rgb(91 58 44 / 18%);
  color-scheme: light;
  color: var(--ink);
  background: var(--plaster);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background-color: var(--plaster);
  background-image:
    linear-gradient(rgb(248 243 234 / 76%), rgb(240 230 214 / 70%)),
    url(/roman-plaster.webp);
  background-size: auto, 48rem 48rem;
  color: var(--ink);
  overscroll-behavior-y: none;
}

.information-shell {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(1.4rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom))
    max(1.4rem, env(safe-area-inset-left));
}

.information-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.information-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.information-logo {
  width: 3rem;
  height: 2.9rem;
  display: block;
  object-fit: contain;
}

.information-brand strong,
.information-brand small {
  display: block;
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
}

.information-brand strong {
  color: var(--oxblood);
  font-size: clamp(0.88rem, 3.4vw, 1.05rem);
  font-variant: small-caps;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: lowercase;
}

.information-brand small {
  margin-top: 0.18rem;
  color: var(--muted-ink);
  font-size: 0.82rem;
  font-style: italic;
}

.information-content {
  padding: clamp(2.75rem, 8vw, 5rem) 0;
}

.information-kicker,
.information-effective {
  margin: 0;
  color: var(--oxblood);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  line-height: 1.2;
  text-transform: uppercase;
}

.information-content h1 {
  margin: 0.8rem 0 0;
  color: var(--ink);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: clamp(2.4rem, 10vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.information-effective {
  margin-top: 1.1rem;
  color: #806c61;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.information-intro {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  color: var(--muted-ink);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  font-style: italic;
  line-height: 1.45;
}

.information-content section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.information-content h2 {
  margin: 0 0 0.8rem;
  color: var(--oxblood);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.information-content p,
.information-content li {
  color: #43362f;
  font-size: 1rem;
  line-height: 1.7;
}

.information-content section p {
  margin: 0.7rem 0 0;
}

.information-content ul {
  margin: 0.8rem 0 0;
  padding-left: 1.35rem;
}

.information-content li + li {
  margin-top: 0.35rem;
}

.information-content a,
.information-footer a {
  color: var(--oxblood);
  text-decoration-color: rgb(116 49 38 / 34%);
  text-underline-offset: 0.18em;
}

.information-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: #806f65;
  font-size: 0.78rem;
}

.information-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.information-footer p {
  margin: 1rem 0 0;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 42rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1.4rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1.4rem, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.app-header {
  padding: 0.25rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.app-brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-brand-copy {
  min-width: 0;
}

.app-brand-logo {
  width: 2.9rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.app-header h1 {
  margin: 0;
  color: var(--oxblood);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: clamp(0.88rem, 2.8vw, 1.12rem);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: lowercase;
}

.app-header p {
  margin: 0.2rem 0 0;
  color: var(--muted-ink);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: clamp(0.78rem, 2.4vw, 0.88rem);
  font-style: italic;
  line-height: 1.35;
}

.quote-frame {
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  display: block;
}

.quote-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.quote-content {
  min-height: 0;
  flex: 1 0 auto;
  padding-block: clamp(1.75rem, 5vh, 3.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inscription-composition {
  width: 100%;
  max-width: 35rem;
}

.quote-eyebrow {
  width: 100%;
  margin-bottom: clamp(1.6rem, 3.4vh, 2.25rem);
  padding-bottom: 0.8rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.quote-kicker,
.quote-label,
.metadata dt,
.quote-provenance-label,
.quote-details-title,
.notification-settings h2 {
  margin: 0;
  color: var(--oxblood);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  line-height: 1.2;
  text-transform: uppercase;
}

.quote-label {
  margin-left: auto;
  color: #826a5e;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.11em;
  white-space: nowrap;
}

.quote-copy {
  position: relative;
}

.quote-text {
  max-width: 35rem;
  margin: 0;
  position: relative;
  color: var(--ink);
  font-family: "Iowan Old Style", Baskerville, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.13;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.quotation-mark {
  font-weight: 500;
}

.quotation-mark--open {
  position: absolute;
  z-index: 0;
  top: -0.16em;
  left: -0.1em;
  color: var(--oxblood);
  font-size: clamp(5rem, 20vw, 8rem);
  line-height: 0.75;
  opacity: 0.12;
  pointer-events: none;
}

.quote-text-content,
.quotation-mark--close {
  position: relative;
  z-index: 1;
}

.quotation-mark--close {
  color: #6f382e;
  font-size: 0.86em;
}

.quote-explanation {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: var(--muted-ink);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: clamp(1.05rem, 4.1vw, 1.28rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  text-wrap: pretty;
}

.quote-actions {
  margin: 1.2rem 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 1.35rem;
}

.quote-actions .quote-refresh-form {
  margin: 0;
}

.quote-carousel-viewport {
  margin: -1.5rem -0.9rem 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.quote-carousel-track {
  display: flex;
  align-items: flex-start;
  transition: transform 220ms cubic-bezier(0.22, 0.75, 0.25, 1);
  will-change: transform;
}

.quote-carousel-slide {
  min-width: 0;
  padding: 1.5rem 0.9rem 0;
  flex: 0 0 100%;
}

.quote-page-indicator {
  min-height: 2.75rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
}

.quote-page-indicator button {
  width: 1.3rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  position: relative;
  border: 0;
  background: transparent;
  color: #a49389;
  cursor: pointer;
}

.quote-page-indicator button::after {
  width: 0.3rem;
  height: 0.3rem;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: width 150ms ease, background-color 150ms ease;
}

.quote-page-indicator button[aria-current="page"] {
  color: var(--oxblood);
}

.quote-page-indicator button[aria-current="page"]::after {
  width: 0.72rem;
}

.quote-page-indicator button:focus-visible {
  outline: 2px solid rgb(116 49 38 / 26%);
  outline-offset: -0.15rem;
}

.quote-copy-button,
.quote-refresh-button {
  min-height: 2.75rem;
  margin: 0;
  padding: 0.45rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--oxblood);
  cursor: pointer;
  font: 700 0.68rem/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quote-copy-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  display: block;
}

.quote-refresh-button {
  white-space: nowrap;
}

.quote-refresh-button > span:first-child {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1;
}

.quote-refresh-button small {
  font: inherit;
  letter-spacing: 0.08em;
}

.quote-refresh-button:disabled {
  color: #9d9189;
  cursor: default;
}

.quote-copy-button:focus-visible,
.quote-refresh-button:focus-visible {
  outline: 3px solid rgb(116 49 38 / 24%);
  outline-offset: 2px;
}

.quote-provenance {
  margin-top: clamp(1.65rem, 3.6vh, 2.4rem);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.quote-provenance-label {
  margin: 0;
}

.quote-provenance-text {
  margin: 0.62rem 0 0;
  color: #44332c;
  font-family: "Iowan Old Style", Baskerville, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(0.88rem, 3.2vw, 1rem);
  font-variant-caps: small-caps;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.quote-provenance-findspot {
  margin: 0.45rem 0 0;
  color: var(--muted-ink);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.4;
}

.quote-details {
  flex: none;
  margin: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.quote-details-toggle {
  min-height: 4.5rem;
  padding: 0.85rem 0.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--oxblood);
  cursor: pointer;
  list-style: none;
}

.quote-details-toggle::-webkit-details-marker {
  display: none;
}

.quote-details-toggle:focus-visible {
  outline: 3px solid rgb(116 49 38 / 24%);
  outline-offset: 2px;
}

.quote-details-title {
  display: block;
}

.quote-details-icon {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  margin-right: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.quote-details[open] .quote-details-icon {
  transform: rotate(225deg);
}

.quote-details-content {
  border-top: 1px solid var(--rule);
}

.metadata {
  margin: 0;
}

.metadata div {
  min-height: 3.9rem;
  padding: 1.05rem 0.15rem;
  display: grid;
  grid-template-columns: clamp(4.9rem, 23vw, 5.8rem) minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
  border-bottom: 1px solid rgb(91 58 44 / 13%);
}

.metadata dd {
  margin: -0.14rem 0 0;
  color: #50433c;
  font-size: clamp(0.9rem, 3.5vw, 1rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.source-row dd {
  min-width: 0;
  margin: -0.14rem 0 -0.55rem;
  align-self: stretch;
  display: flex;
}

.source-link {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0 0.55rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--oxblood);
  font-size: inherit;
  font-weight: 550;
  text-decoration: none;
}

.source-link-icon {
  flex: 0 0 auto;
  margin-top: 0.08rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1;
}

.source-link:focus-visible {
  outline: 3px solid rgb(116 49 38 / 26%);
  outline-offset: 3px;
}

.notification-settings {
  padding: 1.25rem 0.15rem max(1.25rem, env(safe-area-inset-bottom));
  border-top: 2px solid var(--oxblood);
}

.notification-settings h2 {
  margin-bottom: 1rem;
}

.notification-form {
  display: block;
}

.notification-switch-row,
.notification-time-row {
  width: 100%;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #44372f;
}

.notification-time-row {
  cursor: pointer;
  border-top: 1px solid rgb(91 58 44 / 12%);
  border-bottom: 1px solid rgb(91 58 44 / 12%);
}

.notification-time-row[hidden] {
  display: none;
}

.notification-switch-row strong,
.notification-switch-row small {
  display: block;
}

.notification-switch-row strong,
.notification-time-label {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
}

.notification-switch-row small {
  margin-top: 0.22rem;
  color: #74665d;
  font-size: 0.76rem;
  line-height: 1.3;
}

.notification-time-control {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.notification-switch {
  width: 3rem;
  height: 1.75rem;
  flex: 0 0 auto;
  position: relative;
  appearance: none;
  margin: 0;
  border: 1px solid rgb(91 58 44 / 20%);
  border-radius: 999px;
  background: #d9cbbb;
  cursor: pointer;
  transition: background 160ms ease;
}

.notification-switch::after {
  width: 1.35rem;
  height: 1.35rem;
  position: absolute;
  top: 0.14rem;
  left: 0.16rem;
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 1px 4px rgb(54 34 25 / 24%);
  content: "";
  transition: transform 160ms ease;
}

.notification-switch:checked {
  background: var(--oxblood);
}

.notification-switch:checked::after {
  transform: translateX(1.2rem);
}

.notification-time-row select {
  width: auto;
  min-height: 2.75rem;
  position: relative;
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: 500 1rem/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-align-last: center;
}

.notification-hour-select {
  width: 1.4rem;
  min-width: 1.4rem;
}

.notification-time-separator {
  margin-inline: -0.3rem;
  color: var(--ink);
  font: 500 1rem/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.notification-minute-select {
  width: 1.75rem;
  min-width: 1.75rem;
}

.notification-meridiem-select {
  width: 2.15rem;
  min-width: 2.15rem;
}

.notification-status {
  min-height: 1rem;
  margin: 0.75rem 0 0;
  color: #7b6b61;
  font-size: 0.72rem;
  line-height: 1.35;
}

.notification-status:empty {
  display: none;
}

.notification-noscript-save {
  width: 100%;
  min-height: 2.6rem;
  margin-top: 0.9rem;
  border: 0;
  background: var(--oxblood);
  color: #fffaf0;
  cursor: pointer;
  font: 700 0.88rem/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.notification-time-row select:focus,
.notification-time-row select:focus-visible {
  outline: none;
}

.notification-noscript-save:focus-visible,
.notification-switch:focus-visible {
  outline: 3px solid rgb(116 49 38 / 26%);
  outline-offset: 3px;
}

.empty-state {
  max-width: 22rem;
  margin: auto;
  color: var(--muted-ink);
  font-family: "Iowan Old Style", Baskerville, Palatino, Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.55;
  text-align: center;
}

.error-message {
  margin: 0;
  color: var(--oxblood);
}

.quote-card--compact .quote-copy {
  margin-top: 0;
}

.quote-card--compact .quote-text {
  font-size: clamp(1.7rem, 5.8vw, 2.5rem);
}

.quote-card--dense .quote-copy {
  margin-top: 0;
}

.quote-card--dense .quote-eyebrow {
  margin-bottom: 1.1rem;
}

.quote-card--dense .quote-text {
  font-size: clamp(1.35rem, 4.8vw, 2rem);
  line-height: 1.23;
}

.quote-card--dense .quote-explanation {
  margin-top: 0.85rem;
  font-size: 1rem;
  line-height: 1.38;
}

.quote-card--dense .quote-content {
  justify-content: flex-start;
  padding-block: 1.35rem 1.75rem;
}

.quote-card--dense .quote-provenance {
  margin-top: 1.25rem;
}

.quote-card--short .quote-text {
  font-size: clamp(2.35rem, 10vw, 3.55rem);
  line-height: 1.05;
}

.quote-card--short .quote-explanation {
  font-size: clamp(1.1rem, 4.3vw, 1.35rem);
}

.hotwire-native .app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: max(1.15rem, calc(env(safe-area-inset-top) + 0.6rem));
  grid-template-rows: auto minmax(0, 1fr);
}

.hotwire-native .app-header {
  padding-top: 0;
  padding-bottom: 0.85rem;
}

.hotwire-native .app-brand-logo {
  width: 2.65rem;
  height: 2.5rem;
}

.hotwire-native .quote-card {
  padding-top: 0;
}

.hotwire-native .notification-status {
  text-align: right;
}

@media (max-width: 39.999rem) {
  .app-shell {
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-left: max(1.25rem, env(safe-area-inset-left));
  }

  .app-brand-lockup {
    gap: 0.55rem;
  }

  .app-brand-logo {
    width: 2.65rem;
    height: 2.5rem;
  }

  .app-header h1 {
    font-size: clamp(0.74rem, 3.5vw, 0.98rem);
    letter-spacing: 0.09em;
    white-space: nowrap;
  }

  .app-header p {
    margin-top: 0.18rem;
    font-size: clamp(0.72rem, 3.25vw, 0.86rem);
    white-space: nowrap;
  }

  .quote-details-toggle {
    min-height: 4.25rem;
  }

  .quote-details-toggle {
    padding-right: 0;
    padding-left: 0;
  }

  .quote-details-toggle:focus-visible {
    background: rgb(116 49 38 / 4%);
  }

  .quote-details-content {
    border-top-color: rgb(91 58 44 / 14%);
  }

  .metadata div {
    min-height: 3.75rem;
    grid-template-columns: clamp(4.8rem, 23vw, 5.45rem) minmax(0, 1fr);
    gap: 0.8rem;
  }

  .metadata dt {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

  .metadata dd {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .notification-settings {
    padding-right: 0;
    padding-left: 0;
  }

  .notification-switch-row,
  .notification-time-row {
    min-height: 4.25rem;
  }
}

@media (min-width: 40rem) {
  .app-shell {
    padding-inline: 2rem;
  }
}

@media (max-height: 46rem) {
  .app-shell {
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .quote-eyebrow {
    margin-bottom: 1.05rem;
    padding-bottom: 0.7rem;
  }

  .quote-content {
    padding-block: 1.2rem 1.5rem;
  }

  .quote-text {
    font-size: clamp(1.55rem, 5.8vw, 2.15rem);
  }

  .quote-explanation {
    margin-top: 0.7rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .quote-provenance {
    margin-top: 1.2rem;
    padding-top: 0.8rem;
  }

  .quote-details-toggle {
    min-height: 3.5rem;
  }

  .metadata div {
    min-height: 3.2rem;
    padding-block: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
