:root {
  --sqlops-paperwash: #f7f2e8;
  --sqlops-graphite: #162126;
  --sqlops-graphite-soft: #43515a;
  --sqlops-queryblue: #285f77;
  --sqlops-olivejoin: #657b51;
  --sqlops-plumwhere: #67405f;
  --sqlops-saffroncommit: #c58b2c;
  --sqlops-rustcheck: #aa583e;
  --sqlops-rulemark: #d0c1ad;
  --sqlops-cellwhite: #fffdf8;
  --sqlops-washgreen: #e7ecdf;
  --sqlops-mistblue: #dfeaf0;
  --sqlops-plumwash: #eee5ee;
  --sqlops-gutter: clamp(18px, 4vw, 46px);
  --sqlops-measure: 72rem;
  --sqlops-corner: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--sqlops-graphite);
  background: var(--sqlops-paperwash);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(22, 33, 38, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, rgba(197, 139, 44, 0.08), rgba(223, 234, 240, 0.55) 42%, var(--sqlops-paperwash));
  color: var(--sqlops-graphite);
}

.course-nameplate > *,
.fit-checkpoint > *,
.clause-map > *,
.python-bridge > *,
.seat-prep > *,
.workshop-rhythm > *,
.operator-note > *,
.condition-row > *,
.manifest-readout,
.rhythm-lines,
.statement-stack {
  min-width: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  border: 12px solid rgba(22, 33, 38, 0.06);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sqlops-skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 5;
  padding: 0.75rem 1rem;
  color: var(--sqlops-cellwhite);
  background: var(--sqlops-graphite);
  transform: translateY(-140%);
}

.sqlops-skip:focus {
  transform: translateY(0);
}

.sqlops-sheet {
  width: min(100%, calc(var(--sqlops-measure) + (var(--sqlops-gutter) * 2)));
  margin: 0 auto;
  padding: var(--sqlops-gutter);
}

.course-nameplate {
  display: grid;
  grid-template-columns: minmax(17rem, 0.92fr) minmax(20rem, 1.08fr);
  grid-template-areas:
    "photo copy"
    "photo jump";
  min-height: 92vh;
  gap: 1.25rem;
  align-items: stretch;
}

.nameplate-photo {
  grid-area: photo;
  position: relative;
  margin: 0;
  min-height: 34rem;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 38, 0.18);
  background: #1c282d;
}

.nameplate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nameplate-photo figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  max-width: 18rem;
  padding: 0.65rem 0.8rem;
  color: var(--sqlops-cellwhite);
  background: rgba(22, 33, 38, 0.82);
  font-size: 0.88rem;
  line-height: 1.35;
}

.nameplate-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 2rem;
  background: var(--sqlops-cellwhite);
  border: 1px solid rgba(22, 33, 38, 0.16);
  box-shadow: 0 22px 60px rgba(22, 33, 38, 0.11);
}

.course-kind,
.query-marker {
  margin: 0 0 0.85rem;
  color: var(--sqlops-queryblue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: 4rem;
  line-height: 0.98;
  font-weight: 760;
}

h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 720;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.course-lede {
  max-width: 40rem;
  margin: 1.25rem 0 0;
  color: var(--sqlops-graphite-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}

.opening-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.6rem 0 0;
}

.opening-facts div {
  min-height: 8.2rem;
  padding: 0.9rem;
  border: 1px solid var(--sqlops-rulemark);
  background: linear-gradient(180deg, rgba(223, 234, 240, 0.52), rgba(255, 253, 248, 0.9));
}

.opening-facts dt {
  color: var(--sqlops-plumwhere);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.opening-facts dd {
  margin: 0.55rem 0 0;
  color: var(--sqlops-graphite);
  font-size: 0.95rem;
  line-height: 1.38;
}

.call-run {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.call-run a,
.seat-actions a,
.seat-actions button,
.conditions-link,
.return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--sqlops-graphite);
  text-decoration: none;
  font-weight: 740;
}

.call-run__primary,
.seat-actions a {
  color: var(--sqlops-cellwhite);
  background: var(--sqlops-graphite);
}

.call-run__secondary,
.conditions-link,
.return-link {
  background: var(--sqlops-cellwhite);
}

.query-jump {
  grid-area: jump;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.query-jump a {
  display: flex;
  min-height: 7.2rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9rem;
  border: 1px solid rgba(22, 33, 38, 0.22);
  background: rgba(255, 253, 248, 0.74);
  text-decoration: none;
}

.query-jump code {
  color: var(--sqlops-rustcheck);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}

.query-jump span {
  color: var(--sqlops-graphite-soft);
  font-size: 0.9rem;
  line-height: 1.25;
}

.fit-checkpoint,
.clause-map,
.python-bridge,
.seat-prep,
.workshop-rhythm,
.operator-note {
  margin-top: 1.4rem;
  border: 1px solid rgba(22, 33, 38, 0.16);
  background: rgba(255, 253, 248, 0.82);
}

.fit-checkpoint {
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(22rem, 1fr);
  gap: 1rem;
  padding: 1.1rem;
  align-items: stretch;
}

.fit-question {
  padding: 1rem;
  background: var(--sqlops-mistblue);
}

.fit-question p:last-child,
.clause-intro p:last-child,
.bridge-copy p,
.seat-prep-copy p,
.operator-copy p {
  color: var(--sqlops-graphite-soft);
  line-height: 1.62;
}

.persona-board {
  display: grid;
  gap: 0.65rem;
}

.persona-board button,
.dataset-switch button,
.delivery-routes button,
.statement-stack button,
.seat-actions button {
  border: 1px solid rgba(22, 33, 38, 0.2);
  background: var(--sqlops-cellwhite);
  color: var(--sqlops-graphite);
}

.persona-board button {
  display: grid;
  min-height: 6rem;
  gap: 0.35rem;
  padding: 0.9rem;
  text-align: left;
}

.persona-board button[aria-pressed="true"],
.dataset-switch button[aria-pressed="true"],
.delivery-routes button[aria-pressed="true"],
.statement-stack button[aria-pressed="true"] {
  color: var(--sqlops-cellwhite);
  background: var(--sqlops-queryblue);
  border-color: var(--sqlops-queryblue);
}

.persona-board span {
  font-weight: 780;
}

.persona-board small {
  font-size: 0.88rem;
  line-height: 1.35;
}

.persona-result {
  grid-column: 1 / -1;
  display: block;
  min-height: 4.2rem;
  padding: 1rem;
  color: var(--sqlops-graphite);
  background: linear-gradient(90deg, var(--sqlops-washgreen), var(--sqlops-cellwhite));
  border-left: 0.42rem solid var(--sqlops-olivejoin);
  line-height: 1.55;
}

.clause-map {
  display: grid;
  grid-template-columns: minmax(13rem, 0.7fr) minmax(20rem, 1.05fr) minmax(16rem, 0.85fr);
  gap: 1rem;
  padding: 1.1rem;
}

.clause-intro {
  padding: 1rem;
  background: var(--sqlops-plumwash);
}

.statement-stack {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clause-slice {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  min-height: 6.8rem;
  border: 1px solid var(--sqlops-rulemark);
  background: var(--sqlops-cellwhite);
}

.clause-slice button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem;
  text-align: left;
}

.clause-slice code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  font-weight: 900;
}

.clause-slice span {
  line-height: 1.2;
  font-weight: 740;
}

.clause-slice p {
  margin: 0;
  padding: 0.85rem;
  color: var(--sqlops-graphite-soft);
  line-height: 1.45;
}

.clause-inspector {
  min-height: 100%;
  padding: 1rem;
  color: var(--sqlops-cellwhite);
  background: var(--sqlops-graphite);
}

.clause-inspector p {
  margin: 0 0 1rem;
  color: #f0d6a6;
  font-weight: 800;
}

.clause-inspector ul {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.48;
}

.python-bridge {
  display: grid;
  grid-template-columns: minmax(19rem, 0.9fr) minmax(17rem, 0.75fr) minmax(19rem, 0.95fr);
  gap: 1rem;
  padding: 1.1rem;
}

.bridge-photo {
  margin: 0;
  min-height: 24rem;
  overflow: hidden;
}

.bridge-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bridge-copy {
  align-self: center;
}

.dataset-switch {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.dataset-switch button,
.delivery-routes button {
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-weight: 720;
}

.manifest-readout {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem;
  background: #152b36;
  color: var(--sqlops-cellwhite);
}

.manifest-readout h3 {
  color: #f4d391;
}

.manifest-readout ul {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
  padding-left: 1.2rem;
  line-height: 1.45;
}

.manifest-readout pre {
  margin: auto 0 0;
  padding: 1rem;
  overflow: auto;
  color: #e8f4f0;
  background: rgba(0, 0, 0, 0.32);
  font-size: 0.88rem;
  line-height: 1.45;
}

.seat-prep {
  display: grid;
  grid-template-columns: minmax(17rem, 0.75fr) minmax(18rem, 1fr);
  gap: 1rem;
  padding: 1.1rem;
}

.seat-prep-copy {
  padding: 1rem;
  background: var(--sqlops-washgreen);
}

.seat-controls {
  display: grid;
  gap: 0.9rem;
}

.attendance-scale {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 1rem;
  background: var(--sqlops-cellwhite);
  border: 1px solid var(--sqlops-rulemark);
}

.attendance-scale span {
  font-weight: 760;
}

.attendance-scale input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--sqlops-plumwhere);
}

.attendance-scale strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--sqlops-cellwhite);
  background: var(--sqlops-plumwhere);
}

.delivery-routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.quote-readout {
  grid-column: 1 / -1;
  display: block;
  min-height: 4.4rem;
  padding: 1rem;
  color: var(--sqlops-cellwhite);
  background: var(--sqlops-plumwhere);
  line-height: 1.55;
}

.seat-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.seat-actions span {
  color: var(--sqlops-graphite-soft);
}

.workshop-rhythm {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 1rem;
  padding: 1.1rem;
}

.rhythm-titlebar {
  padding: 1rem;
  background: var(--sqlops-mistblue);
}

.rhythm-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--sqlops-rulemark);
}

.rhythm-lines article {
  min-height: 14rem;
  padding: 1rem;
  background: var(--sqlops-cellwhite);
}

.rhythm-lines article + article {
  border-left: 1px solid var(--sqlops-rulemark);
}

.rhythm-lines time {
  display: inline-block;
  margin-bottom: 1.4rem;
  color: var(--sqlops-rustcheck);
  font-weight: 800;
}

.rhythm-lines p {
  color: var(--sqlops-graphite-soft);
  line-height: 1.5;
}

.operator-note {
  display: grid;
  grid-template-columns: minmax(18rem, 0.82fr) minmax(20rem, 1fr);
  gap: 1rem;
  padding: 1.1rem;
  margin-bottom: 2rem;
}

.operator-photo {
  margin: 0;
  min-height: 24rem;
  overflow: hidden;
}

.operator-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operator-copy {
  padding: 1rem;
  background: var(--sqlops-cellwhite);
}

.operator-copy address,
.condition-row address {
  margin: 1rem 0;
  color: var(--sqlops-graphite);
  font-style: normal;
  line-height: 1.62;
}

.conditions-link {
  margin-top: 0.4rem;
}

.conditions-body {
  min-height: 100vh;
}

.condition-sheet {
  width: min(100%, 58rem);
  margin: 0 auto;
  padding: var(--sqlops-gutter);
}

.return-link {
  margin-bottom: 1rem;
}

.condition-leaf {
  padding: 1.25rem;
  background: var(--sqlops-cellwhite);
  border: 1px solid rgba(22, 33, 38, 0.16);
}

.condition-leaf h1 {
  max-width: 14ch;
  font-size: 3.1rem;
}

.condition-lead {
  max-width: 42rem;
  color: var(--sqlops-graphite-soft);
  line-height: 1.6;
}

.condition-row {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1.3rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--sqlops-rulemark);
}

.condition-row h2 {
  font-size: 1.2rem;
}

.condition-row p {
  margin: 0;
  color: var(--sqlops-graphite-soft);
  line-height: 1.62;
}
