:root {
  color-scheme: light;
  --ink: #15120e;
  --muted: #5d554d;
  --page: #e8dfcf;
  --paper: #fbf6e9;
  --paper-dark: #efe3cd;
  --line: #19140f;
  --red: #b82420;
  --red-dark: #7f1714;
  --blue: #153d5d;
  --green: #246a5a;
  --gold: #d79a25;
  --shadow: 0 18px 40px rgba(36, 28, 20, 0.18);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18px 18px, rgba(21, 18, 14, 0.04) 1px, transparent 1.5px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(21, 18, 14, 0.035) 1px, transparent 1px) 0 0 / 64px 100%,
    var(--page);
  color: var(--ink);
  font-family: "Trebuchet MS", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(21, 18, 14, 0.018) 3px 4px);
  mix-blend-mode: multiply;
}

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

.app-shell {
  width: min(1400px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(12px, 2.2vw, 22px);
}

.site-nav {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  margin-bottom: clamp(18px, 3vh, 34px);
  padding-bottom: 8px;
  border-bottom: 4px double var(--line);
}

.site-title {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

.site-title:hover {
  color: var(--red);
}

body:has(#consent-screen:not(.hidden)) .site-nav {
  display: none;
}

.screen {
  display: block;
}

.hidden {
  display: none !important;
}

.landing,
.done {
  min-height: calc(100svh - 150px);
  display: grid;
  align-items: center;
}

.landing {
  position: relative;
  isolation: isolate;
  justify-items: center;
  overflow: visible;
  padding: clamp(22px, 6vh, 64px) 0 clamp(32px, 7vh, 72px);
}

.landing-copy,
.done {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  max-width: none;
}

.landing-copy {
  padding: clamp(20px, 4vw, 42px);
  border-top: 8px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.landing-copy::after {
  display: none;
}

.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: var(--red);
  color: #fff8e8;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 5.2vw, 4.9rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
}

.landing h1 {
  font-size: clamp(2.1rem, 4.4vw, 4.15rem);
}

.landing p:not(.eyebrow),
.done p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progress {
  color: var(--muted);
  font-weight: 800;
}

.premise-panel {
  position: relative;
  margin: 0 0 20px;
  padding: 16px 18px 18px;
  border-top: 5px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--paper-dark);
  box-shadow: var(--shadow);
}

.premise-panel p,
.completion-card p {
  margin: 0;
  white-space: pre-wrap;
}

.premise-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.premise-panel p {
  flex: 1 1 auto;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.3;
}

.premise-image {
  flex: 0 0 auto;
  width: clamp(96px, 13vw, 140px);
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(21, 18, 14, 0.55);
  object-fit: cover;
  background: var(--paper);
}

.section-label {
  margin-bottom: 10px;
  background: var(--blue);
}

.article-title {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 14px;
}

.completion-card {
  position: relative;
  min-height: 292px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(36, 28, 20, 0.13);
}

.completion-card p {
  color: #2a241d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.48;
}

.label-mobile {
  display: none;
}

.article-body {
  white-space: pre-wrap;
}


.choice-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  padding: 14px 0 10px;
  background: linear-gradient(to top, var(--page) 80%, rgba(232, 223, 207, 0));
}

button,
.ghost-button {
  min-height: 46px;
  min-width: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-transform: uppercase;
  white-space: normal;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.start-button {
  margin-top: 24px;
  min-height: 60px;
  padding: 16px 34px;
  font-size: 1.02rem;
}

.primary-button,
.choice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  background: var(--blue);
  box-shadow: 4px 4px 0 var(--line);
  color: #fff8e8;
  padding: 12px 16px;
  text-decoration: none;
}

.primary-button:hover,
.choice-button:hover,
.neither-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--line);
}

.primary-button:active,
.choice-button:active,
.neither-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.neither-button {
  border: 2px solid var(--line);
  background: #2d6471;
  box-shadow: 4px 4px 0 var(--line);
  color: #fff8e8;
  padding: 12px 16px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
  text-decoration: none;
  font-size: 0.92rem;
}

.save-status {
  min-height: 1.4em;
  margin: 0 0 14px;
  color: var(--red-dark);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
}

.site-footer {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px;
  border-top: 1px solid rgba(21, 18, 14, 0.25);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .label-desktop {
    display: none;
  }

  .label-mobile {
    display: inline;
  }

  body {
    line-height: 1.38;
  }

  .app-shell {
    padding: 10px 12px;
  }

  .site-nav {
    margin-bottom: 12px;
  }

  .site-title {
    font-size: clamp(1rem, 6vw, 1.35rem);
    line-height: 1.08;
  }

  .landing,
  .done {
    min-height: auto;
    align-items: start;
  }

  .landing {
    justify-items: stretch;
    padding: 14px 0 28px;
  }

  .landing-copy {
    width: 100%;
    padding: 18px 14px 20px;
    background: var(--paper);
    box-shadow: 0 12px 24px rgba(36, 28, 20, 0.14);
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 11vw, 2.85rem);
    line-height: 1;
  }

  .landing h1 {
    font-size: clamp(1.85rem, 9.2vw, 2.45rem);
  }

  .landing p:not(.eyebrow),
  .done p:not(.eyebrow) {
    font-size: 1rem;
    line-height: 1.45;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    margin: -10px -10px 10px;
    padding: 10px 10px 8px;
    border-bottom: 3px double var(--line);
    background: rgba(232, 223, 207, 0.96);
    backdrop-filter: blur(10px);
  }

  .eyebrow,
  .section-label {
    margin-bottom: 8px;
    padding: 4px 8px;
    font-size: 0.64rem;
  }

  .progress {
    font-size: 0.92rem;
  }

  .premise-panel {
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: none;
  }

  .premise-content {
    align-items: flex-start;
    gap: 10px;
  }

  .premise-panel p {
    font-size: 1.2rem;
  }

  .premise-image {
    width: clamp(72px, 24vw, 96px);
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 8px;
  }

  .completion-card {
    min-height: 0;
    padding: 13px;
    background: var(--paper);
    box-shadow: none;
  }

  .article-title {
    margin-bottom: 8px;
    font-size: 1.18rem;
  }

  .completion-card p {
    font-size: 0.98rem;
  }

  .choice-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin: 0 -10px;
    padding: 10px 10px calc(8px + var(--safe-bottom));
    border-top: 3px double var(--line);
    background: rgba(232, 223, 207, 0.98);
    backdrop-filter: blur(10px);
  }

  .choice-button,
  .neither-button {
    width: 100%;
    min-height: 52px;
    padding: 10px 12px;
    font-size: 0.8rem;
    line-height: 1.15;
    box-shadow: 3px 3px 0 var(--line);
  }

  #choose-left {
    order: 1;
  }

  #choose-right {
    order: 2;
  }

  .neither-button {
    order: 3;
    grid-column: 1 / -1;
    min-height: 46px;
  }

  .save-status {
    margin-bottom: 8px;
    font-size: 0.82rem;
    padding-bottom: calc(4px + var(--safe-bottom));
  }

  .site-footer {
    padding: 12px 10px 18px;
  }
}

@media (max-width: 380px) {
  .site-title {
    font-size: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .choice-button,
  .neither-button {
    font-size: 0.74rem;
    padding-inline: 8px;
  }
}
