:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

.site-shell {
  position: relative;
  isolation: isolate;
}

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 8%, rgba(233, 85, 47, 0.18), transparent 30rem),
    radial-gradient(circle at 86% 24%, rgba(32, 125, 118, 0.18), transparent 34rem),
    linear-gradient(180deg, #f7f2e8 0%, #fff7ea 48%, #f4ecdf 100%);
}

.site-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 32, 51, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 51, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.hero {
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10rem;
  z-index: -1;
  width: min(78vw, 980px);
  height: 19rem;
  transform: translateX(-50%) rotate(-4deg);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(233, 85, 47, 0.18), rgba(215, 155, 40, 0.18), rgba(32, 125, 118, 0.18));
  filter: blur(14px);
}

.venue-badge,
.kicker,
.pin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(16, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.78);
  color: #102033;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.venue-badge {
  padding: 0.55rem 0.85rem;
  box-shadow: 0 10px 30px rgba(16, 32, 51, 0.08);
}

.kicker {
  padding: 0.4rem 0.68rem;
}

.pin {
  padding: 0.42rem 0.65rem;
  background: #102033;
  color: #fffaf0;
  white-space: nowrap;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.8rem;
  border: 1px solid rgba(16, 32, 51, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.86);
  padding: 0.68rem 1rem;
  color: #102033;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.action-button:hover,
.action-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(233, 85, 47, 0.52);
  background: white;
  outline: none;
}

.action-button span {
  color: #e9552f;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.action-button-dark {
  background: #102033;
  color: #fffaf0;
}

.action-button-dark:hover,
.action-button-dark:focus-visible {
  background: #18324e;
}

.summary-card,
.finding-card,
.example-card,
.release-card {
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 2rem;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: 0 22px 70px rgba(16, 32, 51, 0.12);
}

.summary-card {
  padding: clamp(1.35rem, 4vw, 2.6rem);
}

.section-heading h2 {
  margin-top: 0.75rem;
  max-width: 48rem;
  font-size: clamp(2rem, 6vw, 4.4rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.stage-chip {
  display: flex;
  min-height: 8.4rem;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 1.5rem;
  background: rgba(255, 250, 240, 0.78);
  padding: 1rem;
  color: #102033;
  font-weight: 800;
  line-height: 1.35;
}

.stage-chip span {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 999px;
  background: #e9552f;
  color: white;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.pipeline-pdf {
  display: block;
  width: 100%;
  min-height: min(72vh, 48rem);
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 1.35rem;
  background: #ffffff;
}

.pipeline-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 1.35rem;
  background: #ffffff;
}

.protocol-grid {
  display: grid;
  gap: 1rem;
}

.protocol-card {
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 1.65rem;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(255, 250, 240, 0.74)),
    radial-gradient(circle at 100% 0%, rgba(32, 125, 118, 0.12), transparent 14rem);
  padding: clamp(1rem, 3vw, 1.35rem);
  box-shadow: 0 16px 48px rgba(16, 32, 51, 0.08);
}

.protocol-card h3 {
  margin-top: 0.7rem;
  color: #102033;
  font-size: 1.24rem;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.protocol-card p {
  margin-top: 0.78rem;
  color: #587083;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.55;
}

.protocol-card b {
  color: #102033;
}

.protocol-card code {
  border-radius: 0.45rem;
  background: rgba(16, 32, 51, 0.08);
  padding: 0.08rem 0.28rem;
  color: #207d76;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82em;
  font-weight: 800;
}

.protocol-label {
  display: inline-flex;
  border-radius: 999px;
  background: #102033;
  padding: 0.38rem 0.62rem;
  color: #fffaf0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.protocol-example {
  border-left: 3px solid #e9552f;
  padding-left: 0.8rem;
  color: #102033 !important;
  font-style: italic;
}

.finding-card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.finding-card-highlight {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(255, 237, 216, 0.94));
  border-color: rgba(233, 85, 47, 0.28);
}

.finding-card h3 {
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.subhead {
  margin-top: 0.35rem;
  color: #587083;
  font-weight: 750;
}

.caption {
  margin-top: 1.25rem;
  color: #587083;
  font-size: 0.93rem;
  line-height: 1.65;
}

.chart-wrap {
  position: relative;
  height: 20rem;
  border-radius: 1.5rem;
  background:
    linear-gradient(to top, rgba(16, 32, 51, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(255, 255, 255, 0.58);
  padding: 1rem 0.8rem 3rem;
}

.chance-line {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  top: 50%;
  z-index: 2;
  border-top: 2px dashed rgba(16, 32, 51, 0.46);
}

.chance-line span {
  position: absolute;
  right: 0;
  top: -0.8rem;
  border-radius: 999px;
  background: #fffaf0;
  padding: 0.18rem 0.45rem;
  color: #102033;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.bar-grid {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: end;
  gap: 0.28rem;
}

.bar-item {
  position: relative;
  display: grid;
  height: 100%;
  align-items: end;
  justify-items: center;
  gap: 0.2rem;
}

.bar-item .bar {
  width: min(100%, 1.8rem);
  height: calc(var(--value) * 1%);
  min-height: 0.6rem;
  border-radius: 999px 999px 0.45rem 0.45rem;
  background: linear-gradient(180deg, #8796a2, #485d6f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bar-item.ours .bar {
  background: linear-gradient(180deg, #ff7b46, #e9552f);
}

.bar-item b {
  position: absolute;
  bottom: calc(var(--value) * 1% + 0.4rem);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  color: #102033;
}

.bar-item span {
  position: absolute;
  bottom: -2.1rem;
  max-width: 3.4rem;
  color: #587083;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.metric-pill {
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.58);
  padding: 1.15rem;
}

.metric-pill span,
.metric-pill small {
  display: block;
  color: #587083;
  font-weight: 800;
}

.metric-pill strong {
  display: block;
  margin-top: 0.55rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.05em;
}

.metric-pill em {
  color: #e9552f;
  font-style: normal;
}

.metric-pill-hot {
  border-color: rgba(233, 85, 47, 0.22);
  background: rgba(255, 236, 218, 0.64);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.mini-table th,
.mini-table td {
  border-bottom: 1px solid rgba(16, 32, 51, 0.08);
  padding: 0.75rem 0.6rem;
  text-align: right;
}

.mini-table th:first-child,
.mini-table td:first-child {
  text-align: left;
}

.mini-table thead {
  background: #102033;
  color: #fffaf0;
}

.mini-table td {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.mini-table td:first-child {
  font-family: "Inter", ui-sans-serif, system-ui;
  font-weight: 850;
}

.mini-table td span {
  color: #587083;
  font-size: 0.75rem;
}

.mini-table .selected {
  background: rgba(32, 125, 118, 0.10);
}

.transfer-table th,
.transfer-table td {
  text-align: center;
}

.transfer-table th:first-child,
.transfer-table td:first-child {
  text-align: left;
}

.example-card {
  padding: clamp(1rem, 3vw, 1.45rem);
}

.example-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.example-title span {
  font-weight: 950;
  letter-spacing: -0.02em;
}

.example-title code {
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.08);
  padding: 0.35rem 0.55rem;
  color: #207d76;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.example-card p {
  margin-top: 1rem;
  color: #102033;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.65;
}

.example-card mark {
  border-radius: 0.45rem;
  padding: 0.05rem 0.22rem;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 900;
}

.hl-trait {
  background: rgba(233, 85, 47, 0.16);
  color: #b53318;
}

.hl-state {
  background: rgba(32, 125, 118, 0.14);
  color: #12605a;
}

.hl-evidence {
  background: rgba(215, 155, 40, 0.18);
  color: #9a6810;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92em;
}

.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 2rem;
  background: rgba(16, 32, 51, 0.12);
  box-shadow: 0 22px 70px rgba(16, 32, 51, 0.10);
}

.stats-ribbon div {
  background: #102033;
  padding: clamp(1rem, 4vw, 1.65rem);
  color: #fffaf0;
}

.stats-ribbon b {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1.8rem, 6vw, 3rem);
  letter-spacing: -0.07em;
}

.stats-ribbon span {
  color: rgba(255, 250, 240, 0.70);
  font-weight: 800;
}

.release-card {
  padding: clamp(1.35rem, 4vw, 2rem);
  background:
    radial-gradient(circle at 90% 8%, rgba(233, 85, 47, 0.14), transparent 22rem),
    rgba(255, 250, 240, 0.90);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(16, 32, 51, 0.56);
  padding: 1rem;
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 52rem);
  max-height: min(90vh, 44rem);
  overflow: auto;
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 2rem;
  background: #fffaf0;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
}

.modal-close {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.08);
  color: #102033;
  font-size: 1.7rem;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #102033;
  color: #fffaf0;
  outline: none;
}

.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .stats-ribbon {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .protocol-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .protocol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .chart-wrap {
    height: 18rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .bar-grid {
    gap: 0.18rem;
  }

  .bar-item b {
    font-size: 0.58rem;
    transform: rotate(-90deg);
    transform-origin: center;
  }

  .bar-item span {
    font-size: 0.58rem;
  }
}

/* ---------- Headline result badge (added in showcase polish) ---------- */
.headline-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(233, 85, 47, 0.16), rgba(32, 125, 118, 0.16));
  border: 1px solid rgba(16, 32, 51, 0.10);
  color: #102033;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.08);
}
.headline-strip b {
  color: #b53318;
  font-weight: 950;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.0rem;
}
.headline-strip .sep {
  width: 1px;
  height: 1.1rem;
  background: rgba(16, 32, 51, 0.18);
}

/* ---------- Results-table panel (Tab.3 / Tab.4) ---------- */
.results-panel {
  border: 1px solid rgba(16, 32, 51, 0.10);
  border-radius: 2rem;
  background: rgba(255, 250, 240, 0.86);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 22px 60px rgba(16, 32, 51, 0.10);
  overflow-x: auto;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.results-table th,
.results-table td {
  border-bottom: 1px solid rgba(16, 32, 51, 0.08);
  padding: 0.7rem 0.55rem;
  text-align: right;
  white-space: nowrap;
}
.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
}
.results-table thead {
  background: #102033;
  color: #fffaf0;
}
.results-table thead .group-row th {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 250, 240, 0.18);
}
.results-table td {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.results-table td:first-child {
  font-family: "Inter", ui-sans-serif, system-ui;
  font-weight: 850;
}
.results-table .ours {
  background: rgba(32, 125, 118, 0.10);
}
.results-table .ours td {
  color: #102033;
}
.results-table .best {
  color: #b53318;
  font-weight: 950;
}
.results-table tr.subheader td {
  background: #f4ecdf;
  color: #587083;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  text-align: left;
  font-family: "Inter", ui-sans-serif, system-ui;
}
.panel-note {
  margin-top: 0.7rem;
  color: #587083;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* TL;DR three-block layout */
.tldr-block {
  border-radius: 1.25rem;
  background: rgba(255, 250, 240, 0.7);
  border: 1px solid rgba(16, 32, 51, 0.08);
  padding: 1.15rem 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tldr-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(16, 32, 51, 0.10);
}
.tldr-num {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9552f;
  background: rgba(233, 85, 47, 0.10);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
.tldr-text {
  margin-top: 0.7rem;
  color: #102033;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
}
.tldr-text b {
  color: #102033;
  font-weight: 800;
}

/* AC-Verify example pair cards */
.ac-section-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.5rem;
}
.ac-section-label .kicker {
  margin: 0;
}
.ac-section-label .pin {
  color: #102033;
}
.ac-pair-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  border-radius: 1.4rem;
  background: #fffaf0;
  border: 1px solid rgba(16, 32, 51, 0.08);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 14px 38px rgba(16, 32, 51, 0.07);
}
.ac-pair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px dashed rgba(16, 32, 51, 0.12);
  padding-bottom: 0.55rem;
}
.ac-pair-trait {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #102033;
}
.ac-pair-flip {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #587083;
}
.ac-pair-flip code {
  background: rgba(16, 32, 51, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
  color: #102033;
}
.ac-side {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border-radius: 0.9rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #102033;
  font-weight: 550;
}
.ac-side-pos {
  background: rgba(32, 125, 118, 0.08);
  border: 1px solid rgba(32, 125, 118, 0.20);
}
.ac-side-neg {
  background: rgba(233, 85, 47, 0.07);
  border: 1px solid rgba(233, 85, 47, 0.22);
}
.ac-tag {
  flex-shrink: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ac-tag-pos {
  background: rgba(32, 125, 118, 0.18);
  color: #12605a;
}
.ac-tag-neg {
  background: rgba(233, 85, 47, 0.20);
  color: #b53318;
}
.ac-side-text {
  flex: 1;
}
.hl-flip {
  background: rgba(233, 85, 47, 0.22);
  color: #b53318;
  border-radius: 0.35rem;
  padding: 0.05rem 0.28rem;
  font-weight: 800;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hl-keep {
  color: #12605a;
  font-weight: 700;
}
.ac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}
.ac-subhead {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(16, 32, 51, 0.08);
}
.ac-subhead h3 {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #102033;
  margin-top: 0.4rem;
}
.ac-subhead .ac-sub-meta {
  font-size: 0.88rem;
  color: #587083;
  margin-top: 0.45rem;
  max-width: 60ch;
  line-height: 1.55;
}
