@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=DM+Mono:wght@400;500&display=swap");
:root {
  --paper: #f4efe6;
  --ink: #22201c;
  --muted: #736e64;
  --blue: #2457c5;
  --line: #d8d1c4;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-synthesis: none;
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
a,
button,
input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}
::selection {
  background: #cbd7f1;
}
svg {
  display: block;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.site-shell {
  max-width: 1440px;
  margin: auto;
  padding: 0 64px;
}
.site-header {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 30px;
  letter-spacing: -1.6px;
}
.brand svg {
  width: 31px;
  height: 35px;
  transform: rotate(-4deg);
}
.brand-dot {
  color: var(--blue);
}
.site-header nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
}
.site-header nav a:hover,
.login-link:hover,
.text-link:hover {
  color: var(--blue);
}
.login-link {
  font-size: 13px;
}
.hero {
  padding: 82px 0 69px;
  display: flex;
  justify-content: space-between;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.7px;
  line-height: 1.8;
}
.tiny-cross {
  color: var(--blue);
  margin-right: 10px;
  font-size: 16px;
}
.hero h1 {
  font-size: clamp(60px, 7.4vw, 106px);
  line-height: 1.02;
  letter-spacing: -5px;
  font-weight: 450;
  margin-top: 27px;
}
.hero h1 em,
h2 em {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--blue);
  letter-spacing: -4px;
}
.hero-description {
  font-size: 17px;
  line-height: 1.65;
  margin-top: 31px;
  color: #5c584f;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 29px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  justify-content: space-between;
  gap: 38px;
  align-items: center;
  min-height: 49px;
  padding: 14px 21px;
  font-size: 13px;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button.primary {
  background: var(--blue);
  color: white;
}
.button.primary:hover {
  background: #1743a0;
  transform: translateY(-1px);
}
.button span {
  font-size: 19px;
}
.text-link {
  font-size: 12px;
}
.hero-footnote {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 18px;
}
.hero-margin {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  margin: 80px 32px 0 0;
  transform: rotate(5deg);
}
.hero-margin svg {
  width: 80px;
  height: 115px;
  margin: 25px 0 0 24px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.1px;
  margin-bottom: 16px;
  color: var(--muted);
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
  margin: 0 8px 1px 0;
}
.sketchbook {
  background: #faf7f0;
  border: 1px solid #cbc3b4;
  box-shadow:
    0 4px 0 -2px var(--paper),
    0 5px 0 -2px #cbc3b4,
    0 14px 30px #4d3c1a08;
  transform: rotate(-0.45deg);
}
.page-topline {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 19px 25px;
  border-bottom: 1px solid var(--line);
}
.page-title {
  font-size: 14px;
  font-weight: 550;
}
.page-icon {
  font-size: 19px;
  margin-right: 10px;
  color: var(--blue);
}
.page-subtitle,
.page-date {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.8px;
  color: var(--muted);
}
.page-date {
  margin-left: auto;
}
.study-content {
  display: grid;
  grid-template-columns: 1fr 320px;
}
.drawing-column {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-image: radial-gradient(#bdb5a66b 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  padding: 26px 28px 15px;
}
.drawing-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  transform: rotate(-2deg);
  margin-bottom: 15px;
}
.beam-drawing {
  width: 100%;
  flex: 1;
  min-height: 250px;
  overflow: visible;
}
.svg-ink {
  font-family: var(--mono);
  fill: var(--blue);
  font-size: 13px;
}
.svg-small {
  font-family: var(--mono);
  fill: var(--muted);
  font-size: 8px;
  letter-spacing: 0.5px;
}
.drawing-annotation {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.4;
  margin: -12px 0 23px 40px;
  transform: rotate(-3deg);
}
.drawn-arrow {
  font-size: 40px;
  font-style: normal;
  align-self: flex-start;
}
.drawing-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 20px;
}
.calculation-column {
  padding: 28px;
  border-left: 1px solid var(--line);
}
.sheet-label {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 27px;
}
.parameter {
  display: block;
  padding-bottom: 21px;
}
.parameter > span:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.parameter output {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--blue);
}
.parameter output small {
  font-size: 10px;
}
.parameter input {
  width: 100%;
  height: 18px;
  accent-color: var(--blue);
  margin: 12px 0 0;
  cursor: ew-resize;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.formula {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.formula > span,
.secondary-result {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.formula > div {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  margin: 12px 0 8px;
}
.formula > small {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}
.check-result {
  margin-top: 25px;
  padding: 16px 12px;
  background: #2457c50a;
  border-left: 2px solid var(--blue);
  color: var(--blue);
}
.check-result > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.check-result span {
  font-family: var(--mono);
  font-size: 8px;
}
.check-result strong {
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 400;
  white-space: nowrap;
}
.check-result strong small {
  font-size: 10px;
}
.check-result p {
  font-size: 10px;
  line-height: 1.6;
  margin-top: 8px;
}
.check-result.fail {
  background: #c2412d0a;
  color: #b63d2b;
  border-color: #b63d2b;
}
.secondary-result {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 7px;
}
.page-bottomline {
  border-top: 1px solid var(--line);
  padding: 14px 25px;
  display: flex;
  gap: 22px;
  align-items: baseline;
}
.page-bottomline > span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.7px;
  flex-shrink: 0;
  color: var(--muted);
}
.page-bottomline > p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.study-caption {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 25px;
}
.study-caption span {
  color: var(--ink);
}
.thesis {
  padding: 113px 0 47px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: clamp(36px, 4.2vw, 57px);
  font-weight: 450;
  letter-spacing: -2.5px;
  line-height: 1.12;
}
h2 em {
  letter-spacing: -2px;
}
.thesis h2 {
  margin-top: 22px;
}
.thesis-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  margin: 34px 0 10px;
  max-width: 930px;
}
.thesis-bottom p,
.steps p,
.study-tile p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 38px 0 64px;
  gap: 42px;
}
.step-number {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}
.step-drawing {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-drawing svg {
  width: 100%;
  max-width: 270px;
}
.steps h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 15px 0 12px;
  letter-spacing: -0.4px;
}
.equation-art {
  flex-direction: column;
  gap: 15px;
}
.equation-art > span {
  font-family: var(--serif);
  font-size: 29px;
  font-style: italic;
}
.equation-art > small {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--blue);
}
.studies-section {
  border-top: 1px solid var(--line);
  padding: 72px 0 80px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 38px;
  gap: 30px;
}
.section-heading h2 {
  margin-top: 20px;
}
.section-heading > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 5px;
}
.study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.study-tile {
  padding: 25px;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}
.study-tile:hover {
  background: #fff6;
}
.study-tile + .study-tile {
  border-left: 1px solid var(--line);
}
.tile-index {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.7px;
  color: var(--muted);
}
.tile-art {
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-art svg {
  width: 100%;
  max-width: 270px;
}
.study-tile h3 {
  font-size: 17px;
  letter-spacing: -0.5px;
  font-weight: 500;
  margin-bottom: 12px;
}
.study-tile p {
  font-size: 12px;
  margin-bottom: 28px;
}
.tile-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--blue);
  margin-top: auto;
}
.agent-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}
.agent-section h2 {
  margin: 22px 0;
}
.agent-section > div > p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 370px;
  margin-bottom: 25px;
}
.agent-guide {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 18px;
}
.conversation {
  background: #e9e3d7;
  padding: 35px 30px;
  align-self: center;
  transform: rotate(1deg);
  border: 1px solid var(--line);
}
.message {
  padding: 20px 0;
}
.message > span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--blue);
}
.message p {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 10px;
}
.user-message {
  border-bottom: 1px solid #cfc6b5;
  padding-top: 0;
}
.user-message > span {
  color: var(--muted);
}
.conversation-result {
  margin-top: 20px;
  padding: 18px;
  background: #f7f3ec;
  border: 1px solid var(--line);
}
.conversation-result > span {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8px;
  padding: 6px 0;
  color: var(--muted);
  gap: 10px;
}
.conversation-result b {
  font-weight: 400;
  color: var(--blue);
}
.ink-line {
  height: 25px;
  background: linear-gradient(
    173deg,
    transparent 47%,
    #2457c5 49%,
    #2457c5 50%,
    transparent 52%
  );
  margin-top: 6px;
}
.conversation > small {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
  line-height: 1.6;
}
.boundaries {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.boundaries p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 630px;
}
.closing {
  text-align: center;
  padding: 105px 0;
}
.handwritten {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--muted);
  display: block;
  transform: rotate(-3deg);
  margin-bottom: 22px;
}
.closing h2 {
  font-size: clamp(42px, 5vw, 70px);
  margin-bottom: 30px;
}
.closing p {
  font-family: var(--mono);
  font-size: 9px;
  margin-top: 24px;
  color: var(--muted);
}
.site-footer {
  padding: 26px 0 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  gap: 25px;
}
.site-footer .brand {
  font-size: 23px;
}
.site-footer .brand svg {
  width: 25px;
}
.site-footer > span {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.site-footer > a:last-child {
  font-size: 11px;
}
.skip-link {
  position: absolute;
  left: 20px;
  top: -80px;
  background: var(--ink);
  color: var(--paper);
  padding: 15px;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.utility-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}
.utility-main {
  padding: 70px 0;
  min-height: 80vh;
}
.utility-main h1 {
  font-size: 54px;
  font-weight: 450;
  letter-spacing: -2px;
  line-height: 1.1;
  margin: 18px 0 25px;
}
.utility-main > p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 650px;
}
.utility-card {
  border: 1px solid var(--line);
  padding: 26px;
  margin-top: 30px;
}
.utility-card h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
  margin-bottom: 15px;
}
.utility-card p,
.utility-card li {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.utility-card code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  overflow-wrap: anywhere;
}
.utility-card pre {
  white-space: pre-wrap;
  background: #e9e3d7;
  padding: 20px;
  margin: 18px 0;
  overflow-x: auto;
}
.utility-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.utility-card .button {
  text-decoration: none;
  margin-top: 15px;
}
.utility-card ul {
  padding-left: 20px;
}
.status-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  margin-top: 25px;
}
.account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.account-toolbar button {
  background: transparent;
  border: 1px solid var(--line);
  padding: 9px 15px;
  cursor: pointer;
}
.study-list {
  list-style: none;
  padding: 0 !important;
}
.study-list li {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  gap: 20px;
}
.study-list code {
  color: var(--muted);
  font-size: 9px;
}
@media (min-width: 1400px) {
  .site-shell {
    padding: 0 85px;
  }
}
@media (max-width: 1000px) {
  .site-shell {
    padding: 0 35px;
  }
  .hero h1 {
    font-size: 82px;
  }
  .hero-margin {
    margin-right: 0;
    font-size: 8px;
  }
  .study-content {
    grid-template-columns: 1fr 285px;
  }
  .calculation-column {
    padding: 24px 20px;
  }
  .agent-section {
    gap: 40px;
  }
  .steps {
    gap: 25px;
  }
  .study-tile {
    padding: 20px;
  }
  .drawing-annotation {
    font-size: 14px;
    margin-left: 0;
  }
  .section-label {
    font-size: 8px;
  }
}
@media (max-width: 720px) {
  .site-shell {
    padding: 0 22px;
  }
  .site-header {
    height: 82px;
    gap: 15px;
  }
  .brand {
    font-size: 26px;
  }
  .brand svg {
    width: 27px;
  }
  .site-header nav {
    gap: 17px;
    font-size: 11px;
  }
  .site-header nav a:first-child,
  .site-header nav a:nth-child(2) {
    display: none;
  }
  .login-link {
    font-size: 11px;
  }
  .hero {
    padding: 50px 0 48px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .hero h1 {
    font-size: clamp(53px, 10.5vw, 75px);
    letter-spacing: -3px;
    margin-top: 23px;
  }
  .hero h1 em {
    letter-spacing: -3px;
  }
  .hero-description {
    font-size: 15px;
    margin-top: 25px;
  }
  .hero-actions {
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 27px;
  }
  .hero-margin {
    display: none;
  }
  .hero-footnote {
    font-size: 8px;
  }
  .section-label {
    font-size: 7px;
    gap: 16px;
    line-height: 1.7;
  }
  .section-label > span:last-child {
    text-align: right;
  }
  .sketchbook {
    transform: none;
  }
  .page-topline {
    padding: 14px 16px;
    gap: 10px;
  }
  .page-title {
    font-size: 12px;
  }
  .page-subtitle {
    display: none;
  }
  .study-content {
    grid-template-columns: 1fr;
  }
  .drawing-column {
    padding: 20px 16px 14px;
  }
  .drawing-note {
    font-size: 16px;
  }
  .beam-drawing {
    min-height: 210px;
  }
  .drawing-annotation {
    margin-top: -8px;
    margin-bottom: 8px;
    font-size: 14px;
  }
  .drawing-meta {
    font-size: 6px;
  }
  .calculation-column {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 23px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .sheet-label {
    grid-column: 1/-1;
    margin-bottom: 20px;
  }
  .parameter {
    min-width: 0;
  }
  .parameter > span:first-child {
    font-size: 11px;
  }
  .parameter output {
    font-size: 15px;
  }
  .formula {
    grid-column: 1;
    align-self: center;
    padding-top: 15px;
  }
  .formula > div {
    font-size: 22px;
  }
  .check-result {
    grid-column: 2;
    margin-top: 0;
    align-self: center;
    padding: 12px 8px;
  }
  .check-result > div {
    flex-wrap: wrap;
    gap: 8px;
  }
  .check-result strong {
    font-size: 22px;
  }
  .check-result span {
    font-size: 7px;
  }
  .secondary-result {
    grid-column: 1/-1;
    gap: 15px;
    margin-top: 20px;
  }
  .page-bottomline {
    padding: 13px 16px;
    gap: 12px;
  }
  .page-bottomline > span {
    font-size: 6px;
  }
  .page-bottomline > p {
    font-size: 8px;
  }
  .study-caption {
    font-size: 10px;
    line-height: 1.8;
    padding: 0 12px;
  }
  .thesis {
    padding: 65px 0 30px;
  }
  h2 {
    font-size: 38px;
    letter-spacing: -1.8px;
  }
  h2 em {
    letter-spacing: -1.5px;
  }
  .thesis-bottom {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 24px;
  }
  .thesis-bottom p {
    font-size: 13px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 30px 0 45px;
  }
  .steps article {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0 20px;
  }
  .step-number {
    grid-column: 1/-1;
    margin-bottom: 10px;
  }
  .step-drawing {
    grid-row: 2/4;
    grid-column: 1;
    height: 110px;
  }
  .steps h3 {
    grid-column: 2;
    font-size: 16px;
    margin: 12px 0 8px;
  }
  .steps p {
    grid-column: 2;
    font-size: 12px;
  }
  .equation-art > span {
    font-size: 19px;
  }
  .equation-art > small {
    font-size: 7px;
    text-align: center;
  }
  .studies-section {
    padding: 45px 0;
  }
  .section-heading {
    display: block;
    margin-bottom: 25px;
  }
  .section-heading > p {
    margin-top: 22px;
  }
  .study-grid {
    grid-template-columns: 1fr;
  }
  .study-tile + .study-tile {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .study-tile {
    padding: 25px;
  }
  .tile-art {
    height: 155px;
  }
  .study-tile p {
    margin-bottom: 20px;
  }
  .agent-section {
    grid-template-columns: 1fr;
    padding: 45px 0;
    gap: 35px;
  }
  .conversation {
    padding: 25px;
  }
  .boundaries {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 25px 0;
  }
  .closing {
    padding: 65px 0;
  }
  .closing p {
    font-size: 8px;
  }
  .site-footer {
    flex-wrap: wrap;
    padding: 20px 0 30px;
  }
  .site-footer > span {
    order: 3;
    width: 100%;
    font-size: 6px;
  }
  .utility-page {
    padding: 0 22px;
  }
  .utility-main {
    padding: 45px 0;
  }
  .utility-main h1 {
    font-size: 40px;
  }
  .utility-card {
    padding: 20px;
  }
  .study-list li {
    flex-direction: column;
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.syntax-section {
  padding: 60px 0 75px;
  border-bottom: 1px solid var(--line);
}
.syntax-section .section-heading h2 {
  max-width: 650px;
}
.source-sheet {
  border: 1px solid var(--line);
  background: #faf7f0;
  min-width: 0;
}
.source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  font: 12px var(--mono);
}
.source-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.source-action {
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: var(--blue);
  font: 11px var(--mono);
  cursor: pointer;
}
.source-action:hover {
  text-decoration: underline;
}
.source-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}
.source-copy [role="status"] {
  color: var(--muted);
  font-size: 10px;
}
.source-copy [role="status"]:empty {
  display: none;
}
.napkin-code {
  min-width: 0;
}
.napkin-code pre {
  margin: 0;
  padding: 28px;
  overflow-x: auto;
  font: 12px/1.9 var(--mono);
  tab-size: 2;
}
.source-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.source-result {
  padding: 22px 26px;
}
.source-result + .source-result {
  border-left: 1px solid var(--line);
}
.source-result > span {
  display: block;
  color: var(--muted);
  font: 10px var(--mono);
}
.source-result strong {
  display: block;
  margin-top: 12px;
  font: 22px var(--mono);
  color: var(--blue);
}
.source-result.fail strong {
  color: #a63c29;
}
.source-result small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
}
.source-caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 15px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.source-caption a {
  flex-shrink: 0;
  color: var(--blue);
}
@media (max-width: 700px) {
  .syntax-section {
    padding: 40px 0;
  }
  .source-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .source-actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .source-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .napkin-code pre {
    padding: 20px 18px;
    font-size: 11px;
  }
  .source-results {
    grid-template-columns: 1fr;
  }
  .source-result {
    padding: 18px;
  }
  .source-result + .source-result {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .source-result strong {
    margin-top: 8px;
  }
  .source-caption {
    flex-direction: column;
    gap: 10px;
  }
}

/* Native text editing over the same highlighted source. Both layers share metrics. */
.source-editor {
  position: relative;
  height: clamp(300px, 58vh, 480px);
  overflow: hidden;
}
.source-editor .napkin-code {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.source-editor pre,
.source-editor textarea {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 26px;
  border: 0;
  font: 12px/1.9 var(--mono);
  letter-spacing: normal;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  scrollbar-gutter: stable;
}
.source-editor code {
  font: inherit;
}
.source-editor pre {
  background: transparent !important;
}
.source-editor textarea {
  position: relative;
  display: block;
  resize: none;
  background: transparent;
  color: var(--ink);
  caret-color: var(--ink);
}
.source-editor.has-highlight textarea {
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.source-editor textarea::selection {
  background: #2457c533;
}
.source-editor textarea:focus-visible {
  outline-offset: -3px;
}
.source-edit-hint {
  color: var(--muted);
  font-size: 10px;
}
.copy-status {
  font-size: 10px;
  color: var(--muted);
}
.copy-status:empty {
  display: none;
}
.source-state {
  border-top: 1px solid var(--line);
  padding: 12px 26px;
  color: var(--muted);
  font: 11px/1.6 var(--mono);
  overflow-wrap: anywhere;
}
.source-error {
  padding: 18px 26px;
  color: #a63c29;
  font-size: 13px;
}
.source-check {
  margin-top: 12px;
}
.source-check > span {
  color: var(--muted);
  font: 10px var(--mono);
}
.source-check.fail strong {
  color: #a63c29;
}
.source-check.pass strong {
  color: var(--blue);
}
.spec-page .utility-main {
  max-width: 1100px;
}
.spec-page .utility-card h2 {
  margin-bottom: 20px;
}
.spec-page .utility-card p + p {
  margin-top: 16px;
}
.spec-table {
  overflow-x: auto;
  margin-bottom: 24px;
}
.spec-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  line-height: 1.7;
}
.spec-table th,
.spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
.spec-table code {
  font: 11px/1.8 var(--mono);
  white-space: pre;
}
.spec-flow {
  padding-left: 22px;
  line-height: 1.9;
}
.spec-flow li + li {
  margin-top: 14px;
}
@media (max-width: 700px) {
  .source-editor pre,
  .source-editor textarea {
    padding: 20px 18px;
    font-size: 11px;
  }
  .source-state,
  .source-error {
    padding: 12px 18px;
  }
  .source-header .source-actions {
    flex-wrap: wrap;
  }
  .source-header .copy-status {
    order: 4;
    flex-basis: 100%;
  }
  .spec-page .site-header nav {
    gap: 15px;
    font-size: 11px;
  }
}
.model-records {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.model-records summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
}
.model-records p {
  margin: 16px 0;
}
.model-records pre {
  max-height: 520px;
  overflow: auto;
  padding: 18px;
  background: var(--paper);
  font: 11px/1.8 var(--mono);
}

.model-preview {
  border-bottom: 1px solid var(--line);
}
.model-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
}
.model-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 10px var(--mono);
  color: var(--muted);
}
.model-toolbar select {
  min-width: 64px;
  border: 1px solid var(--line);
  background: #faf7f0;
  color: var(--ink);
  padding: 7px 10px;
  font: 12px var(--mono);
}
.preview-verdict {
  margin-left: auto;
  font: 11px var(--mono);
  color: var(--blue);
}
.preview-verdict.fail {
  color: #a63c29;
}
.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
}
.model-drawing {
  min-width: 0;
  padding: 26px;
}
.model-drawing svg {
  width: 100%;
  height: auto;
  min-height: 230px;
}
.model-part {
  fill: #2457c508;
  stroke: var(--blue);
  stroke-width: 1.2;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}
.model-part.selected {
  fill: #2457c520;
  stroke-width: 2;
}
.model-part.fail {
  stroke: #a63c29;
}
.model-part:focus-visible {
  outline: none;
  stroke-width: 3;
  stroke-dasharray: 4 2;
}
.model-part-label {
  fill: var(--ink);
  font: 9px var(--mono);
  pointer-events: none;
}
.model-drawing-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font: 8px var(--mono);
  margin-top: 12px;
}
.model-selection {
  min-height: 50px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.model-selection button {
  display: block;
  margin-top: 3px;
}
.model-inputs {
  border-left: 1px solid var(--line);
  padding: 26px;
}
.model-input {
  display: block;
  margin-top: 20px;
  padding-left: 12px;
  border-left: 2px solid transparent;
}
.model-input.related {
  border-color: var(--blue);
}
.model-input > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.model-input output {
  color: var(--blue);
  font: 12px var(--mono);
}
.model-input output small {
  font-size: 10px;
}
.model-input input {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  accent-color: var(--blue);
}
.model-input input[type="number"] {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 12px var(--mono);
}
.model-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.model-check {
  border-left: 2px solid var(--blue);
  background: #2457c508;
  padding: 14px;
  color: var(--blue);
}
.model-check.fail {
  border-color: #a63c29;
  background: #a63c2908;
  color: #a63c29;
}
.model-check > span {
  display: block;
  font: 10px/1.7 var(--mono);
}
.model-check strong {
  display: block;
  font: 24px var(--mono);
  margin: 8px 0;
}
.model-check strong small {
  font-size: 13px;
}
.model-derived {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.model-derived > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font: 10px var(--mono);
  margin-top: 12px;
  color: var(--muted);
}
.model-derived output {
  color: var(--ink);
}
.model-scope {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.model-empty {
  padding: 70px 15px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.source-code-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 26px 0;
  color: var(--muted);
  font: 9px/1.8 var(--mono);
}
.model-preview[aria-busy="true"] .model-drawing {
  opacity: 0.5;
}
@media (max-width: 700px) {
  .model-layout {
    grid-template-columns: 1fr;
  }
  .model-inputs {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 18px;
  }
  .model-drawing {
    padding: 20px 18px;
  }
  .model-toolbar {
    padding: 16px 18px;
    gap: 14px;
  }
  .model-toolbar label {
    flex-wrap: wrap;
    gap: 6px;
  }
  .model-toolbar select {
    max-width: 180px;
    font-size: 11px;
  }
  .preview-verdict {
    margin-left: 0;
    flex-basis: 100%;
  }
  .source-code-heading {
    padding: 14px 18px 0;
  }
}

.beam-overlay .beam-title {
  font: 10px var(--mono);
  fill: var(--ink);
}
.beam-unloaded {
  fill: none;
  stroke: #8099c4;
  stroke-width: 1;
  stroke-dasharray: 4 3;
  pointer-events: none;
}
.beam-reference {
  fill: #736e6405;
  stroke: #9c9589;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  pointer-events: none;
}
.beam-support {
  stroke: #736e64;
  stroke-width: 1.3;
}
.beam-deformed {
  fill: #2457c515;
  stroke: var(--deflection-ink);
  stroke-width: 1.2;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}
.beam-deformed.selected {
  stroke-width: 1.7;
}
.beam-deformed:not([data-part-id]) {
  pointer-events: none;
}
.beam-deformed:focus-visible {
  outline: none;
  stroke-width: 2.5;
  stroke-dasharray: 3 2;
}
.beam-centerline {
  fill: none;
  stroke: var(--deflection-ink);
  stroke-width: 0.65;
  stroke-dasharray: 3 3;
  pointer-events: none;
}
.beam-annotations {
  pointer-events: none;
}
.beam-load-arrow {
  stroke: var(--blue);
  stroke-width: 1.3;
}
.beam-extension {
  stroke: #a49c8e;
  stroke-width: 0.65;
  stroke-dasharray: 2 2;
}
.beam-deflection-arrow {
  stroke: var(--deflection-ink);
  color: var(--deflection-ink);
  stroke-width: 1;
}
.beam-length-arrow {
  stroke: var(--blue);
  color: var(--blue);
  stroke-width: 0.8;
}
.beam-callout {
  font: 8px var(--mono);
  fill: var(--blue);
  paint-order: stroke;
  stroke: #faf7f0;
  stroke-width: 3;
}
.beam-displacement-label {
  font: 9px var(--mono);
  fill: var(--deflection-ink);
  paint-order: stroke;
  stroke: #faf7f0;
  stroke-width: 3;
}
.beam-delta {
  font: 7.5px var(--mono);
  fill: var(--muted);
}
.beam-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 15px 0;
  font: 9px/1.8 var(--mono);
  color: var(--muted);
}
.beam-legend span::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  margin-right: 7px;
  border-top: 1.5px solid var(--blue);
}
.beam-legend .legend-unloaded::before {
  border-top: 1px dashed #8099c4;
}
.beam-legend .legend-reference::before {
  border-top: 1px dotted #9c9589;
}
.beam-callout-leader {
  fill: none;
  stroke: var(--deflection-ink);
  stroke-width: 0.6;
  opacity: 0.7;
}
.beam-legend .legend-deformed::before {
  border-color: var(--deflection-ink);
}

.source-squiggle {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: #b8422d;
  text-decoration-thickness: 1.2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  background: #b8422d08;
}
.source-error {
  border-top: 1px solid #b8422d35;
  background: #b8422d05;
}
.source-error h3 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 550;
}
.source-diagnostics {
  margin: 0;
  padding: 0;
  list-style: none;
}
.source-diagnostics li + li {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #b8422d25;
}
.diagnostic-heading {
  display: flex;
  align-items: baseline;
  gap: 8px 14px;
  flex-wrap: wrap;
}
.diagnostic-heading strong {
  font-size: 13px;
  font-weight: 550;
}
.source-diagnostics p {
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.8;
}
.diagnostic-location {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--blue);
  font: 11px/1.7 var(--mono);
  text-align: left;
  cursor: pointer;
}
.diagnostic-location:hover {
  text-decoration: underline;
}
.diagnostic-occurrences {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.source-diagnostics .diagnostic-related {
  margin-top: 4px;
}
@media (max-width: 700px) {
  .diagnostic-heading {
    flex-direction: column;
    gap: 4px;
  }
}
.source-error {
  overflow-wrap: anywhere;
}

/* Keep both views mounted so tab switches preserve source editing and model state. */
.source-sheet [role="tabpanel"][hidden] {
  display: none;
}
.source-tabs {
  display: flex;
  gap: 4px;
}
.source-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}
.source-tab[aria-selected="true"] {
  border-color: var(--line);
  background: #fffdf8;
  color: var(--blue);
}
.source-tab:focus-visible,
.source-copy-icon:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.source-copy-icon {
  display: inline-flex;
  padding: 8px;
}
.source-code-heading .source-copy {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.source-model-error {
  padding: 24px 26px;
  color: var(--muted);
}

/* One navigation system across the public site, with every destination on phones. */
.site-header {
  position: relative;
}
.site-header .desktop-navigation {
  gap: 22px;
  align-items: center;
}
.site-header nav a[aria-current="page"] {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.mobile-navigation {
  display: none;
}
.site-header .login-link {
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-header .desktop-navigation a {
  padding: 14px 0;
}
.navigation-footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 64px;
}
.navigation-footer p {
  max-width: 220px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 15px;
}
.navigation-footer nav {
  display: grid;
  gap: 12px;
  font-size: 12px;
}
.navigation-footer nav strong {
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 5px;
}
.navigation-footer nav a:hover {
  color: var(--blue);
  text-decoration: underline;
}
.content-page main {
  padding: 28px 0 30px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font: 11px/1.6 var(--mono);
  color: var(--muted);
  margin-bottom: 50px;
}
.breadcrumbs a:hover {
  color: var(--blue);
}
.content-intro {
  max-width: 900px;
  margin-bottom: 38px;
}
.content-intro h1 {
  font-weight: 450;
  font-size: clamp(38px, 5.5vw, 74px);
  line-height: 1.08;
  letter-spacing: -2.5px;
  margin-top: 18px;
}
.content-lead {
  font-size: 20px;
  line-height: 1.65;
  max-width: 780px;
  margin-bottom: 32px;
  color: #49453e;
}
.content-intro .content-lead {
  margin-top: 24px;
}
.content-grid,
.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.content-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  border: 1px solid var(--line);
  min-width: 0;
  background: #faf7f0;
}
.content-card h2 {
  font-size: 27px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.6px;
}
.content-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.content-card .text-link {
  margin-top: auto;
  font-size: 12px;
}
.content-card:hover {
  border-color: var(--blue);
}
.content-note {
  max-width: 850px;
  margin: 26px 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.content-note a,
.reading-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reading-content {
  max-width: 820px;
}
.reading-content section {
  margin: 42px 0;
}
.reading-content h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.reading-content h3 {
  font-size: 17px;
  font-weight: 550;
  margin: 28px 0 12px;
}
.reading-content p {
  font-size: 17px;
  line-height: 1.85;
  margin-bottom: 18px;
}
.reading-content pre {
  overflow: auto;
  padding: 24px;
  background: #faf7f0;
  border: 1px solid var(--line);
  margin: 24px 0;
}
.reading-content code {
  font: 12px/1.8 var(--mono);
}
.article-next {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.historical-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #fffdf8;
}
.historical-figure {
  margin: 32px 0 48px;
}
.historical-figure img {
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  background: #fffdf8;
}
.historical-figure figcaption {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 16px;
  max-width: 820px;
}
.historical-figure figcaption a {
  color: var(--blue);
  text-decoration: underline;
}
.content-page .syntax-section {
  padding-top: 20px;
}
@media (max-width: 1100px) {
  .site-header .desktop-navigation {
    display: none;
  }
  .site-header {
    gap: 20px;
  }
  .site-header .brand {
    margin-right: auto;
  }
  .mobile-navigation {
    display: block;
  }
  .mobile-navigation summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    font-size: 12px;
    cursor: pointer;
    list-style: none;
  }
  .mobile-navigation summary::-webkit-details-marker {
    display: none;
  }
  .mobile-navigation[open] summary {
    color: var(--blue);
    border-color: var(--blue);
  }
  .site-header .mobile-navigation nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 1px);
    z-index: 20;
    display: grid;
    gap: 0;
    padding: 12px 20px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 16px 24px #22201c0a;
    font-size: 15px;
  }
  .site-header .mobile-navigation nav a {
    display: block;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }
  .site-header .mobile-navigation nav a:last-child {
    border-bottom: 0;
  }
  .navigation-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .site-header {
    gap: 12px;
  }
  .mobile-navigation summary {
    padding: 9px;
    font-size: 11px;
  }
  .content-intro h1 {
    letter-spacing: -1.5px;
  }
  .content-lead {
    font-size: 17px;
  }
  .content-grid,
  .example-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .content-card {
    padding: 24px;
  }
  .reading-content p {
    font-size: 16px;
  }
  .breadcrumbs {
    margin-bottom: 32px;
    font-size: 10px;
  }
  .navigation-footer {
    gap: 30px 18px;
  }
  .navigation-footer > div {
    grid-column: 1/-1;
  }
  .navigation-footer nav {
    font-size: 11px;
  }
}

/* Docs layout (/spec): table of contents on the left, content on the right. */
.docs-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.docs-toc {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 70px 0 40px;
}
.docs-toc ol {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.docs-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.docs-toc .nested a {
  padding-left: 28px;
  font-size: 12px;
}
.docs-toc a:hover,
.docs-toc a[aria-current] {
  color: var(--blue);
}
.docs-toc a[aria-current] {
  border-left: 2px solid var(--blue);
  padding-left: 13px;
}
.docs-toc .nested a[aria-current] {
  padding-left: 27px;
}
.docs-body {
  max-width: 760px;
}
.docs-section,
.docs-entry {
  scroll-margin-top: 24px;
}
.docs-section + .docs-section {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 40px;
}
.docs-section h2 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
}
.docs-entry {
  margin-top: 40px;
}
.docs-entry h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}
.docs-body p,
.docs-body li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.docs-body .docs-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  margin: 18px 0 0;
}
.docs-body code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  overflow-wrap: anywhere;
}
.docs-body pre {
  white-space: pre-wrap;
  background: #e9e3d7;
  padding: 18px 20px;
  margin: 8px 0 0;
  overflow-x: auto;
}
@media (max-width: 1000px) {
  .docs-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .docs-toc {
    position: static;
    max-height: none;
    padding: 40px 0 0;
  }
  .docs-toc .nested {
    display: none;
  }
}

/* Drawing/model registration: same intrinsic image and overlay viewport. */
.drawing-overlay-workbench {
  margin: 32px 0 48px;
  padding: 24px;
  border: 1px solid var(--line);
  background: #faf7f0;
}
.drawing-overlay-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}
.drawing-overlay-heading h2 {
  font-size: 27px;
  margin: 6px 0 12px;
}
.drawing-overlay-heading p {
  max-width: 780px;
  line-height: 1.6;
}
.drawing-overlay-stage {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: #fffdf8;
}
.drawing-overlay-stage img {
  display: block;
  width: 100%;
  height: auto;
}
.drawing-overlay-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.drawing-overlay-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin: 26px 0 10px;
}
.drawing-overlay-control {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font: 12px var(--mono);
}
.drawing-overlay-control span {
  display: flex;
  justify-content: space-between;
}
.drawing-overlay-control input {
  width: 100%;
}
.drawing-overlay-upload {
  grid-column: 1 / -1;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.drawing-overlay-workbench .source-action {
  border: 1px solid var(--line);
  padding: 9px 12px;
}
@media (max-width: 700px) {
  .drawing-overlay-controls {
    grid-template-columns: 1fr 1fr;
  }
  .drawing-overlay-heading {
    flex-direction: column;
  }
}

/* Landing page: a working study, followed by its reasoning. */
.landing-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  padding: 76px 0 60px;
  align-items: start;
}
.landing-hero h1 {
  font-size: clamp(68px, 6.6vw, 100px);
  font-weight: 550;
  line-height: 0.99;
  letter-spacing: -0.065em;
  margin: 26px 0 28px;
}
.landing-page em {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--blue);
}
.landing-tagline {
  font-size: 22px;
  line-height: 1.35;
  max-width: 360px;
  letter-spacing: -0.5px;
}
.landing-intro {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 390px;
  margin: 18px 0 28px;
}
.landing-hero .hero-actions {
  gap: 22px;
  flex-wrap: wrap;
}
.landing-hero-demo {
  padding-top: 15px;
  min-width: 0;
}
.landing-study {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf7f0;
  overflow: hidden;
  box-shadow: 0 12px 35px #22201c06;
}
.landing-window-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  font: 10px var(--mono);
  color: var(--muted);
}
.landing-window-bar > span:first-child {
  color: var(--ink);
  font-size: 12px;
}
.landing-window-bar i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 7px;
}
.landing-study-tools {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  gap: 8px;
}
.landing-study-tools [role="group"] {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.landing-study-tools button {
  border: 1px solid transparent;
  padding: 7px 9px;
  background: transparent;
  color: var(--muted);
  font: 11px var(--mono);
  cursor: pointer;
  border-radius: 3px;
}
.landing-study-tools button[aria-pressed="true"] {
  color: var(--blue);
  background: #2457c50a;
  border-color: #2457c530;
}
.landing-beam {
  width: 100%;
  max-height: 320px;
  color: var(--blue);
}
.landing-verdict {
  margin: 0 20px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue);
  font: 11px var(--mono);
}
.landing-verdict > span:first-child {
  color: var(--muted);
  font-size: 9px;
}
.landing-verdict strong {
  display: block;
  margin-top: 5px;
  font: 32px var(--mono);
  color: var(--blue);
  letter-spacing: -1.5px;
}
.landing-verdict small {
  font-size: 15px;
  letter-spacing: 0;
}
.landing-fail {
  color: #a63c29;
}
.landing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font: 9px var(--mono);
  color: var(--muted);
}
.landing-legend a {
  margin-left: auto;
  color: var(--blue);
}
.landing-setup {
  margin-top: 18px;
}
.landing-prompt {
  display: flex;
  align-items: center;
  gap: 18px;
  border-left: 2px solid var(--blue);
  padding: 3px 0 3px 16px;
  font-size: 12px;
  line-height: 1.65;
}
.landing-prompt p span {
  display: block;
  font: 9px var(--mono);
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 1px;
}
.landing-prompt button {
  flex-shrink: 0;
  padding: 8px 0 8px 8px;
  border: 0;
  color: var(--blue);
  background: none;
  font: 11px var(--mono);
  cursor: pointer;
}
.landing-setup details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 20px;
  padding: 15px 0;
  font-size: 12px;
}
.landing-setup summary {
  cursor: pointer;
}
.landing-setup summary span {
  float: right;
  font: 10px var(--mono);
  color: var(--muted);
}
.landing-setup details p {
  line-height: 1.7;
  margin: 15px 0;
  color: var(--muted);
}
.landing-setup-links {
  display: grid;
  gap: 12px;
  color: var(--blue);
}
.landing-chapters {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  gap: 16px;
  font: 11px var(--mono);
}
.landing-chapters a {
  display: flex;
  gap: 10px;
}
.landing-chapters a span {
  color: var(--muted);
  font-size: 9px;
}
.landing-chapters a span:last-child {
  margin-left: auto;
}
.landing-chapters a:hover {
  color: var(--blue);
}
.landing-walkthrough {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  padding: 110px 0 40px;
}
.landing-sticky-note {
  position: sticky;
  top: 50px;
  align-self: start;
}
.landing-page h2 {
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 450;
  line-height: 1.07;
  letter-spacing: -2.5px;
}
.landing-sticky-note h2 {
  margin: 26px 0;
}
.landing-sticky-note > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 350px;
  margin-bottom: 24px;
}
.landing-equation {
  padding: 45px 0;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font: 34px var(--mono);
  letter-spacing: -2px;
}
.landing-equation small {
  display: block;
  color: var(--muted);
  font: 11px/1.8 var(--mono);
  margin-top: 20px;
  letter-spacing: 0;
}
.landing-chapter-stories article {
  padding: 0 0 90px;
  scroll-margin-top: 40px;
}
.landing-chapter-stories article + article {
  border-top: 1px solid var(--line);
  padding-top: 60px;
}
.landing-chapter-number {
  display: block;
  font: 11px var(--mono);
  color: var(--muted);
  margin-bottom: 28px;
}
.landing-chapter-stories h2 {
  margin-bottom: 25px;
}
.landing-chapter-stories p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.landing-fragment,
.landing-code {
  background: #faf7f0;
  border: 1px solid var(--line);
  padding: 26px;
  margin: 25px 0;
  font-size: 17px;
  line-height: 1.65;
}
.landing-fragment span {
  display: block;
  font: 10px var(--mono);
  color: var(--blue);
  margin-bottom: 16px;
}
.landing-code {
  font: 11px/2 var(--mono);
  overflow: auto;
  color: var(--blue);
}
.landing-comparison {
  margin: 28px 0 18px;
  font: 11px var(--mono);
}
.landing-comparison > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.landing-comparison strong {
  white-space: nowrap;
  font-weight: 400;
  color: var(--blue);
}
.landing-comparison strong.landing-fail {
  color: #a63c29;
}
.landing-chapter-stories p.landing-small {
  font-size: 12px;
}
.landing-page #live-study {
  scroll-margin-top: 30px;
}
.landing-library,
.landing-inside {
  border-top: 1px solid var(--line);
  padding: 90px 0;
  scroll-margin-top: 30px;
}
.landing-library .section-heading > p,
.landing-inside .section-heading > p {
  max-width: 350px;
}
.landing-library .study-tile {
  min-height: 240px;
}
.landing-library-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  font: 12px var(--mono);
  color: var(--blue);
}
.landing-anatomy {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.landing-anatomy > a {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px;
}
.landing-anatomy > a:hover {
  background: #faf7f0;
}
.landing-anatomy span {
  font: 10px var(--mono);
  color: var(--muted);
}
.landing-anatomy h3 {
  font-size: 25px;
  font-weight: 450;
  letter-spacing: -0.6px;
  margin: 30px 0 16px;
}
.landing-anatomy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 440px;
}
.landing-anatomy b {
  display: block;
  color: var(--blue);
  font: 11px var(--mono);
  margin-top: 25px;
}
.landing-faq {
  border-top: 1px solid var(--line);
  padding: 90px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.landing-faq h2 {
  margin-top: 25px;
}
.landing-faq details {
  border-bottom: 1px solid var(--line);
  padding: 23px 0;
}
.landing-faq details:first-child {
  border-top: 1px solid var(--line);
}
.landing-faq summary {
  font-size: 16px;
  cursor: pointer;
}
.landing-faq p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.landing-faq a {
  color: var(--blue);
}
@media (min-width: 1101px) {
  .landing-page .site-header {
    height: 88px;
  }
}
@media (max-width: 1100px) {
  .landing-hero {
    gap: 35px;
    padding-top: 50px;
  }
  .landing-walkthrough {
    gap: 50px;
  }
  .landing-hero h1 {
    font-size: 78px;
  }
  .landing-window-bar > span:last-child {
    display: none;
  }
  .landing-chapters a {
    gap: 5px;
  }
  .landing-chapters a span:last-child {
    display: none;
  }
}
@media (max-width: 760px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding: 40px 0;
    gap: 25px;
  }
  .landing-hero h1 {
    font-size: 76px;
    margin: 24px 0;
  }
  .landing-tagline {
    max-width: 330px;
  }
  .landing-intro {
    max-width: 480px;
  }
  .landing-hero-demo {
    padding-top: 0;
  }
  .landing-chapters {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 20px;
  }
  .landing-walkthrough {
    grid-template-columns: 1fr;
    gap: 55px;
    padding: 65px 0 0;
  }
  .landing-sticky-note {
    position: static;
  }
  .landing-equation {
    padding: 25px 0;
    margin-top: 25px;
  }
  .landing-chapter-stories article {
    padding-bottom: 50px;
  }
  .landing-chapter-stories article + article {
    padding-top: 40px;
  }
  .landing-page h2 {
    letter-spacing: -1.6px;
  }
  .landing-library,
  .landing-inside {
    padding: 60px 0;
  }
  .landing-anatomy {
    grid-template-columns: 1fr;
  }
  .landing-anatomy > a {
    padding: 28px;
  }
  .landing-faq {
    grid-template-columns: 1fr;
    padding: 60px 0;
    gap: 35px;
  }
  .landing-setup summary span {
    float: none;
    display: block;
    margin: 8px 0 0 15px;
  }
  .landing-comparison > div {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}
.landing-beam .beam-title {
  font: 8px var(--mono);
  fill: var(--muted);
}
@media (max-width: 760px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .landing-hero h1 {
    font-size: clamp(60px, 19.5vw, 76px);
  }
  .landing-walkthrough,
  .landing-faq {
    grid-template-columns: minmax(0, 1fr);
  }
}

.calculator-model-scope {
  line-height: 1.7;
  margin-bottom: 16px;
}
.model-comparison {
  min-height: 300px;
  padding: 20px 0;
}
.model-comparison h3 {
  font-size: 27px;
  font-weight: 450;
  margin: 20px 0 16px;
  letter-spacing: -0.5px;
}
.model-comparison > p:not(.sheet-label) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.model-comparison-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 24px 0;
}
.model-comparison table {
  width: 100%;
  border-collapse: collapse;
  font: 11px var(--mono);
}
.model-comparison th,
.model-comparison td {
  border-bottom: 1px solid var(--line);
  padding: 15px 12px;
  text-align: right;
  white-space: nowrap;
}
.model-comparison th {
  font-weight: 400;
}
.model-comparison th:first-child {
  text-align: left;
  padding-left: 0;
}
.model-comparison thead {
  color: var(--muted);
}
.model-comparison th small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
}
.model-comparison .active {
  color: var(--blue);
  background: #2457c506;
}
.model-comparison button {
  border: 0;
  padding: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.calculator-study {
  padding: 28px 0 36px;
}
.calculator-explanation {
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}
.calculator-explanation h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.6px;
  margin-bottom: 18px;
}
.calculator-explanation h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 32px 0 12px;
}
.calculator-explanation h4 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
}
.calculator-explanation p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.calculator-equations {
  margin: 24px 0;
}
.calculator-equations > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.calculator-equations dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.calculator-equations dd {
  margin: 0;
  font: 12px/1.8 var(--mono);
  overflow-wrap: anywhere;
  color: var(--blue);
}
.calculator-example-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 24px 0;
}
.calculator-example-values dl {
  margin: 0;
  font-size: 13px;
}
.calculator-example-values dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.calculator-example-values dt {
  color: var(--muted);
}
.calculator-example-values dd {
  margin: 0;
  font: 12px var(--mono);
  color: var(--blue);
  text-align: right;
}
@media (max-width: 600px) {
  .calculator-example-values {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
