:root {
  color-scheme: light;
  --ink: #203835;
  --muted: #6f7d77;
  --line: #dfe5dd;
  --page: #f5f6f1;
  --paper: #ffffff;
  --green: #1c5550;
  --lime: #d8ec9c;
  --teal: #cce6e0;
  --orange: #e7ad62;
  --radius: 14px;
  font-family: Inter, 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  font-size: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .43; }
a { color: inherit; text-decoration: none; }
button, input, textarea { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #8ba945; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 10; left: 16px; top: -70px; padding: 12px 18px; background: var(--ink); color: white; border-radius: 6px; opacity: 0; }
.skip-link:focus { top: 14px; opacity: 1; }
.site-header { background: #fdfefa; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1320px; padding: 0 24px; margin: auto; height: 76px; display: flex; align-items: center; gap: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -1px; }
.brand-light { font-weight: 400; margin-left: 2px; }
.brand-dot { color: #7c9860; }
.brand-mark { width: 36px; height: 36px; background: var(--ink); border-radius: 10px; display: grid; place-items: center; }
.brand-mark svg { width: 32px; height: 32px; }
.logo-normal { stroke: #728c79; stroke-width: 1; stroke-dasharray: 2 2; }
.logo-ray { fill: none; stroke: var(--lime); stroke-width: 2.4; }
.brand-mark circle { fill: var(--lime); }
.main-nav { display: flex; height: 100%; align-items: center; gap: 32px; font-size: 13px; }
.main-nav a { height: 100%; display: flex; align-items: center; gap: 7px; position: relative; color: var(--muted); }
.main-nav a:hover { color: var(--ink); }
.main-nav .nav-active { color: var(--ink); font-weight: 600; }
.nav-active::after { position: absolute; content: ''; bottom: -1px; height: 3px; background: var(--green); left: 0; right: 0; border-radius: 3px 3px 0 0; }
.nav-count { font-size: 10px; background: #e9ede6; color: #566a5b; border-radius: 5px; line-height: 18px; padding: 0 6px; font-weight: 600; }
.button { border: 1px solid var(--line); background: transparent; border-radius: 7px; min-height: 40px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; transition: background .15s, border-color .15s; }
.button:not(:disabled):hover { background: #eaf0e5; border-color: #b7c5b2; }
.guide-button { margin-left: auto; background: white; padding: 8px 13px; min-height: 36px; }
.primary { background: var(--ink); color: white; border-color: var(--ink); }
.primary:not(:disabled):hover { background: #2d544a; border-color: #2d544a; }
.icon-button { background: none; border: 0; border-radius: 6px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: #6e7d73; }
.icon-button:hover { background: #edf1e8; color: var(--ink); }
.text-button { background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #142e2a; }
.page-shell { max-width: 1320px; padding: 0 24px; margin: auto; }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 34px 0 29px; }
.eyebrow { display: block; font-size: 10px; letter-spacing: 1.8px; font-weight: 650; color: var(--muted); line-height: 1.5; }
.tiny-cross { font-size: 15px; color: #6b825a; vertical-align: -1px; margin-right: 5px; }
.eyebrow-divider { margin: 0 8px; color: #aab4a6; }
h1 { font-size: 43px; line-height: 1.18; font-weight: 600; letter-spacing: -1.7px; margin-top: 7px; }
.title-dot { color: #809953; }
.intro-copy { margin-top: 9px; color: var(--muted); font-size: 13px; }
.law-card { padding: 12px 22px 12px 24px; border-left: 1px solid #d5dccd; min-width: 320px; }
.law-card .eyebrow { font-size: 9px; color: #7a8671; }
.equation { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; letter-spacing: .4px; line-height: 1.5; }
.equation span { margin: 0 6px; color: #85927b; }
.law-card p { color: var(--muted); font-size: 11px; margin-top: 2px; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.diagram-card { overflow: hidden; box-shadow: 0 3px 9px #213f2b03; display: flex; flex-direction: column; }
.card-heading { min-height: 57px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; gap: 12px; }
.card-heading h2 { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; letter-spacing: -.2px; }
.section-number { color: #9aa795; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; margin-right: 3px; }
.live-badge { margin-left: 6px; display: inline-flex; gap: 5px; align-items: center; color: #577b67; background: #eef4e9; border: 1px solid #e6eddf; border-radius: 4px; padding: 2px 6px; font-size: 8px; letter-spacing: .8px; font-weight: 650; }
.live-badge span { width: 4px; height: 4px; background: #7d9b65; border-radius: 50%; }
.angles-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #67776b; cursor: pointer; }
input[type=checkbox] { accent-color: var(--green); width: 14px; height: 14px; margin: 0; cursor: pointer; }
.diagram-stage { background: #15353a; position: relative; padding: 0 12px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
#ray-diagram { width: 100%; height: 337px; display: block; overflow: visible; }
.ray-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 23px; padding: 10px 14px 16px; font-size: 10px; color: #b9ceca; }
.ray-legend > span { display: inline-flex; gap: 7px; align-items: center; }
.legend-line { display: inline-block; width: 19px; height: 2px; border-radius: 3px; }
.legend-line.incident { background: #edc46a; }
.legend-line.refracted { background: #92debf; }
.legend-line.reflected { background: #eab084; }
.legend-line.normal { background: none; border-top: 1px dashed #99b2af; height: 0; }
.model-readout { padding: 15px 22px 13px; }
.model-readout table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.model-readout th { color: #71806c; font-size: 11px; font-weight: 500; padding: 0 16px; }
.model-readout th:first-child, .model-readout td:first-child { padding-left: 0; }
.model-readout th span { color: #8d9c7e; margin-left: 3px; }
.model-readout td { font-size: 27px; font-weight: 500; letter-spacing: -.7px; padding: 3px 16px 0; line-height: 1.3; font-variant-numeric: tabular-nums; border-right: 1px solid #e7ebe1; }
.model-readout td:last-child { border-right: none; }
.model-readout td > span { font-size: 21px; color: #8fa387; }
.model-readout td.text-result { font-size: 16px; letter-spacing: -.3px; }
.model-readout td.tir-result { font-size: 17px; color: #a36836; letter-spacing: -.3px; }
.readout-caption { display: flex; align-items: center; gap: 9px; padding-top: 14px; color: #8b9585; font-size: 9px; }
.model-tag { font-size: 8px; letter-spacing: .6px; color: #6e8262; border: 1px solid #e2e9da; border-radius: 3px; padding: 1px 4px; }
.parameters-card { display: flex; flex-direction: column; }
.parameters-card .card-heading { border-bottom: 1px solid #eef0e8; padding-right: 15px; }
.parameter-body { padding: 19px 22px 17px; display: flex; flex-direction: column; flex: 1; }
.parameter-group { width: 100%; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.field-heading label { font-size: 13px; font-weight: 600; line-height: 1.4; }
.field-heading small { display: block; color: #788771; font-size: 11px; font-weight: 400; margin-top: 2px; }
.symbol { color: #8a997d; font-family: Georgia, serif; font-weight: 400; margin-left: 5px; font-size: 14px; }
.number-input { width: 73px; height: 35px; background: #f9faf6; border: 1px solid #dfe5d7; border-radius: 5px; text-align: center; font-size: 13px; padding: 7px 5px; font-weight: 500; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.parameter-slider { --fill: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 20px; border-radius: 8px; background: linear-gradient(to right, #295a50 0%, #295a50 var(--fill), #e7ebdf var(--fill), #e7ebdf 100%) center / 100% 4px no-repeat; cursor: pointer; display: block; margin: 3px 0 2px; }
.parameter-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: white; border: 4px solid #28564d; box-shadow: 0 1px 3px #0002; }
.parameter-slider::-moz-range-thumb { width: 7px; height: 7px; border-radius: 50%; background: white; border: 4px solid #28564d; box-shadow: 0 1px 3px #0002; }
.parameter-slider:focus-visible { outline-offset: 4px; }
.range-scale { display: flex; justify-content: space-between; color: #7d8c75; font-size: 10px; }
.range-scale span:first-child, .range-scale span:last-child { color: #71846b; font-variant-numeric: tabular-nums; }
.swap-row { display: flex; align-items: center; gap: 10px; margin: 13px 0; }
.swap-row > span { flex: 1; height: 1px; background: #edf0e7; }
.swap-button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: #f4f7ed; padding: 3px 7px; border-radius: 4px; color: #6f8067; font-size: 9px; }
.swap-button .icon { width: 13px; height: 13px; }
.swap-button:hover { background: #e7eedf; color: var(--green); }
.angle-group { border-top: 1px solid #ebeee5; padding-top: 17px; margin-top: 18px; }
.degree-input { position: relative; }
.degree-input input { padding-right: 19px; }
.degree-input > span { position: absolute; right: 9px; top: 7px; color: #7e8e77; font-size: 14px; pointer-events: none; }
.critical-button { margin-top: 10px; font-size: 10px; }
.critical-button .icon { width: 13px; height: 13px; }
.behavior-note { display: flex; align-items: flex-start; gap: 8px; background: #f0f5e9; padding: 10px 11px; border-radius: 6px; margin: 19px 0 14px; }
.behavior-dot { width: 5px; height: 5px; background: #6e8f54; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.behavior-note strong { font-size: 10px; font-weight: 600; display: block; line-height: 1.5; }
.behavior-note p { margin-top: 2px; font-size: 9px; color: #809271; line-height: 1.5; }
.behavior-note.is-tir { background: #fcf0e2; }
.behavior-note.is-tir strong { color: #925b2e; }
.behavior-note.is-tir p { color: #a27650; }
.behavior-note.is-tir .behavior-dot { background: #c28247; }
.save-button { width: 100%; min-height: 42px; margin-top: auto; font-size: 12px; }
.save-button .key-hint { margin-left: auto; opacity: .5; border: 1px solid #ffffff3a; border-radius: 3px; font-size: 11px; width: 19px; line-height: 18px; }
.save-caption { text-align: center; color: #909b88; font-size: 9px; margin-top: 7px; }
.explore-strip { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 17px 22px; margin-top: 17px; border: 1px solid #dce4d3; background: #edf1e4; border-radius: 10px; }
.explore-intro { display: flex; gap: 12px; align-items: center; }
.explore-intro > .icon { width: 21px; height: 21px; color: #7d906b; }
.explore-intro h2 { font-size: 12px; font-weight: 600; }
.explore-intro p { font-size: 10px; color: #7f8c76; margin-top: 2px; }
.example-buttons { display: flex; gap: 8px; }
.example-button { background: #f8faf2; border: 1px solid #d5dec9; border-radius: 6px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 8px; color: #576b4c; font-size: 10px; font-weight: 500; min-height: 35px; }
.example-button:hover, .example-button[aria-pressed=true] { background: white; border-color: #a8b994; color: var(--green); }
.example-button[aria-pressed=true] { box-shadow: 0 0 0 1px #a8b99433; }
.example-number { color: #91a280; font-size: 9px; font-variant-numeric: tabular-nums; }
.example-button .icon { width: 13px; height: 13px; color: #94a683; }
.examples-loading { color: #7c8d70; font-size: 11px; }
.example-question { font-size: 11px; color: #75876a; padding: 10px 12px 0; display: flex; align-items: center; gap: 6px; }
.notes-card { margin-top: 15px; border-color: #e1e6db; background: #fbfcf8; }
.notes-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; cursor: pointer; list-style: none; min-height: 53px; }
.notes-card summary::-webkit-details-marker { display: none; }
.notes-card summary > span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notes-card summary .icon { width: 16px; height: 16px; color: #8b997e; }
.notes-card summary strong { font-size: 11px; font-weight: 500; }
.optional-label { color: #96a08e; font-size: 10px; font-weight: 400; margin-left: 4px; }
.details-chevron { transition: transform .15s; }
.notes-card[open] .details-chevron { transform: rotate(180deg); }
.notes-body { padding: 3px 20px 20px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.notes-field label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.notes-field input, .notes-field textarea { width: 100%; border: 1px solid #dce4d2; background: white; border-radius: 6px; font-size: 11px; padding: 9px 10px; line-height: 1.6; }
.notes-field textarea { resize: vertical; min-height: 81px; }
.notes-field input { min-height: 39px; }
::placeholder { color: #9ba691; opacity: 1; }
.notes-field p { font-size: 9px; color: #8b9780; margin-top: 5px; }
.field-error { font-size: 10px; color: #a64934 !important; margin-top: 8px; line-height: 1.5; }
input[aria-invalid=true] { border-color: #c97a60; background: #fff7f2; }
.notebook-section { padding-top: 32px; scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 17px; }
.section-heading .eyebrow { font-size: 9px; letter-spacing: 1.7px; }
.section-heading h2 { font-size: 24px; font-weight: 500; letter-spacing: -.7px; line-height: 1.4; margin-top: 4px; display: flex; align-items: center; gap: 10px; }
.section-heading p:not(.eyebrow) { color: #87927d; font-size: 11px; margin-top: 4px; }
.count-badge { background: #e9eddf; border-radius: 6px; color: #7a8d6a; font-size: 11px; padding: 1px 7px; line-height: 21px; font-weight: 500; letter-spacing: 0; }
.notebook-actions { display: flex; gap: 8px; }
.notebook-actions .button { background: #fafcf7; }
.notebook-actions .export-button { background: #e8eedc; border-color: #d8e2c8; color: #5d7550; }
.notebook-empty { border-style: dashed; border-color: #ced8c5; min-height: 160px; display: flex; align-items: center; justify-content: center; gap: 23px; background: #f9fbf5; padding: 30px; }
.empty-icon { position: relative; width: 56px; height: 56px; display: grid; place-items: center; background: #edf2e5; border-radius: 13px; transform: rotate(-5deg); border: 1px solid #e3ebd9; }
.empty-icon .icon { width: 28px; height: 28px; color: #8fa37a; }
.empty-icon > span { position: absolute; right: -6px; bottom: -4px; font-size: 17px; line-height: 21px; width: 23px; text-align: center; background: #f8fbf3; border: 1px solid #dfe8d2; border-radius: 50%; color: #8a9f75; }
.notebook-empty h3 { font-size: 14px; font-weight: 500; letter-spacing: -.2px; }
.notebook-empty p { color: #87967b; font-size: 11px; margin-top: 5px; }
.empty-tip { display: block; font-size: 10px; color: #9aa88f; margin-top: 8px; }
.notebook-data { overflow: hidden; }
.notebook-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; gap: 15px; border-bottom: 1px solid #e8eddf; background: #fbfcf8; }
.notebook-toolbar > span { font-size: 10px; color: #819273; }
.compare-button { min-height: 32px; font-size: 10px; padding: 5px 10px; background: #f2f6eb; }
.compare-button .icon { width: 14px; height: 14px; }
.experiment-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; font-variant-numeric: tabular-nums; }
.experiment-table thead { background: #f2f5eb; }
.experiment-table th { font-size: 9px; color: #7d8d71; font-weight: 500; white-space: nowrap; padding: 13px 10px; }
.experiment-table th span:not(.sr-only) { display: block; color: #9da98c; font-family: Georgia, serif; font-size: 12px; line-height: 1.4; }
.experiment-table td { padding: 15px 10px; border-top: 1px solid #eef1e6; }
.experiment-table th:first-child, .experiment-table td:first-child { padding-left: 20px; width: 42px; }
.experiment-table tr.selected-row { background: #f5f9ee; }
.point-id { font-weight: 600; color: #3a5a49; }
.media-cell { white-space: nowrap; }
.media-arrow { color: #9ba98b; margin: 0 5px; }
.undefined-angle { color: #9aa78e; }
.not-recorded { color: #98a38e; font-size: 10px; }
.result-badge { display: inline-flex; align-items: center; gap: 4px; background: #edf4e3; color: #6d875b; border-radius: 4px; font-size: 9px; line-height: 1.3; padding: 4px 6px; white-space: nowrap; }
.result-badge.tir { background: #fcf0e3; color: #ad7746; }
.result-badge.critical { background: #e6f1eb; color: #527e66; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-actions .icon-button { width: 28px; height: 28px; }
.row-actions .icon { width: 14px; height: 14px; }
.delete-point:hover { background: #fff0e9; color: #a7684b; }
.row-note td { padding: 0 20px 16px 62px; border-top: 0; }
.saved-notes { display: flex; gap: 24px; font-size: 10px; color: #839276; border-top: 1px dashed #e3eadd; padding-top: 10px; }
.saved-notes > div { flex: 1; min-width: 0; }
.saved-notes strong { color: #6a7e5a; display: block; font-weight: 500; margin-bottom: 3px; }
.saved-notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.table-footer { border-top: 1px solid #e4ebd9; background: #fbfcf8; display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; font-size: 9px; color: #9aa68e; }
.table-footer > span:first-child { display: inline-flex; align-items: center; gap: 5px; color: #899b78; }
.small-dot { width: 4px; height: 4px; background: #7f9d64; border-radius: 50%; }
.comparison-section { padding-top: 28px; }
.comparison-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.comparison-heading h3 { font-size: 21px; font-weight: 500; letter-spacing: -.5px; margin-top: 3px; }
.comparison-heading .eyebrow { font-size: 9px; }
.comparison-heading .button { font-size: 10px; }
.comparison-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.comparison-cards.three-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.comparison-card { overflow: hidden; }
.comparison-card-heading { padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; }
.comparison-card-heading strong { font-size: 13px; font-weight: 500; }
.mini-diagram { background: #15353a; width: 100%; height: 174px; display: block; }
.comparison-conditions { padding: 18px; }
.comparison-conditions dl { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; margin: 0; }
.comparison-conditions dt { font-size: 9px; color: #869779; }
.comparison-conditions dd { font-size: 14px; margin: 3px 0 0; font-weight: 500; }
.comparison-conditions dd.long-value { font-size: 11px; }
.comparison-conditions .prediction-saved { font-size: 10px; border-top: 1px solid #e9efdf; margin-top: 17px; padding-top: 12px; color: #849776; white-space: pre-wrap; overflow-wrap: anywhere; }
.prediction-saved strong { color: #5e7852; display: block; font-weight: 500; margin: 5px 0 3px; }
.comparison-conditions .text-button { margin-top: 14px; }
.learning-note { display: flex; align-items: flex-start; gap: 9px; margin: 27px 0 23px; max-width: 950px; font-size: 10px; color: #8e9c83; }
.learning-note > .icon { width: 14px; height: 14px; margin-top: 1px; }
.learning-note strong { font-weight: 500; color: #74876a; }
.site-footer { padding: 19px 0 24px; border-top: 1px solid #e0e6d8; display: flex; justify-content: space-between; gap: 16px; color: #9ca992; font-size: 9px; }
.site-footer > span:first-child { color: #778a6c; font-weight: 500; }
.footer-divider { color: #bdc7b1; margin: 0 9px; }
.site-footer > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.offline-dot { width: 4px; height: 4px; background: #96ac7e; border-radius: 50%; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 14px 17px; font-size: 12px; border-radius: 8px; margin-top: 20px; }
.notice p { margin: 0; }
.notice .text-button { margin-top: 8px; font-size: 11px; color: #87562e; }
.warning { background: #fff2df; border: 1px solid #e9cfac; color: #8d632f; }
.notice > .icon { margin-top: 1px; }
.toast { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: #26493e; color: #edf6e6; padding: 11px 12px 11px 17px; border-radius: 9px; box-shadow: 0 5px 22px #163d2930; max-width: min(600px, calc(100vw - 32px)); font-size: 12px; }
.toast.error { background: #814a34; }
.toast > .icon { color: #bddb9a; }
.toast .icon-button { width: 26px; height: 26px; margin-left: 6px; color: #c4d8bd; }
.toast .icon-button:hover { background: #ffffff15; }
.toast .icon-button .icon { width: 15px; height: 15px; }
.toast-undo { background: none; border: 0; color: #d6ecb1; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; padding: 4px; margin-left: 4px; }
.guide-dialog { width: min(570px, calc(100vw - 36px)); padding: 28px 32px; border: 1px solid #c9d6be; border-radius: 16px; color: var(--ink); background: #fcfdf8; box-shadow: 0 18px 80px #08282133; max-height: calc(100dvh - 50px); overflow: auto; }
.guide-dialog::backdrop { background: #15382d6b; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.guide-dialog h2 { font-size: 32px; font-weight: 500; letter-spacing: -1px; margin-top: 10px; }
.dialog-intro { color: #839573; font-size: 12px; margin-top: 8px; }
.guide-steps { list-style: none; margin: 24px 0; padding: 0; }
.guide-steps li { display: flex; gap: 15px; margin-top: 20px; }
.guide-steps li > span { font-size: 11px; color: #91a77e; line-height: 22px; }
.guide-steps h3 { font-size: 13px; font-weight: 500; }
.guide-steps p { margin-top: 4px; font-size: 11px; color: #819772; }
.guide-model { padding: 15px 18px; border-radius: 8px; background: #edf3e5; border: 1px solid #dbe6cf; }
.guide-model h3 { font-size: 12px; font-weight: 500; }
.guide-model .equation { font-size: 22px; margin-top: 6px; }
.guide-model p:not(.equation) { font-size: 10px; color: #769065; margin-top: 8px; }
.guide-footnote { margin: 17px 0; font-size: 10px; color: #8c9f7d; }
.guide-dialog > .primary { width: 100%; }
.noscript-notice { position: fixed; inset: auto 20px 20px; background: #fff2df; border: 1px solid #d0a865; padding: 20px; color: #805f2d; }
.muted { color: #91a081; font-weight: 400; }

@media (min-width: 1500px) { .page-shell, .header-inner { max-width: 1370px; } }
@media (max-width: 1100px) {
  .header-inner { gap: 40px; }
  .workbench { grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
  .diagram-heading { padding: 0 17px; }
  .card-heading h2 { font-size: 13px; }
  .section-number { display: none; }
  .model-readout { padding-left: 18px; padding-right: 18px; }
  .model-readout td { font-size: 24px; padding-left: 11px; padding-right: 11px; }
  .model-readout th { padding-left: 11px; padding-right: 11px; }
  .model-readout td.text-result { font-size: 13px; }
  .explore-strip { padding: 15px 17px; gap: 16px; }
  .example-button { padding: 8px 9px; gap: 5px; font-size: 9px; }
  .explore-intro p { display: none; }
  .experiment-table th, .experiment-table td { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 800px) {
  .header-inner { height: 65px; gap: 26px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-mark svg { width: 28px; height: 28px; }
  .main-nav { gap: 19px; font-size: 11px; }
  .guide-button { font-size: 11px; padding: 7px 9px; }
  .page-intro { padding-top: 27px; padding-bottom: 25px; }
  h1 { font-size: 36px; }
  .intro-copy { font-size: 11px; }
  .law-card { min-width: auto; padding-left: 16px; padding-right: 0; }
  .law-card .equation { font-size: 21px; }
  .law-card p { font-size: 9px; }
  .workbench { grid-template-columns: 1fr; gap: 16px; }
  #ray-diagram { height: 340px; }
  .model-readout td.text-result { font-size: 16px; }
  .parameter-body { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .swap-row { grid-column: 1 / -1; grid-row: 2; margin: -8px 0; }
  .angle-group { margin: 0; padding: 0; border: 0; grid-column: 1; grid-row: 3; }
  .behavior-note { margin: 0; grid-column: 2; grid-row: 3; min-height: 75px; }
  .save-button { grid-column: 1 / -1; margin-top: 0; }
  .save-caption { grid-column: 1 / -1; margin-top: -16px; }
  .explore-strip { align-items: flex-start; flex-direction: column; gap: 12px; }
  .explore-intro p { display: block; }
  .example-buttons { width: 100%; }
  .example-button { flex: 1; justify-content: center; font-size: 10px; }
  .optional-label { font-size: 9px; }
  .notes-body { grid-template-columns: 1fr; gap: 17px; }
  .section-heading { align-items: flex-start; }
  .notebook-actions { flex-direction: column; }
  .notebook-actions .button { padding: 7px 9px; min-height: 32px; font-size: 10px; }
  .table-wrap { overflow-x: auto; }
  .experiment-table { min-width: 770px; }
  .comparison-cards.three-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-cards.three-cards .comparison-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .header-inner { height: 64px; padding: 0 20px; gap: 18px; }
  .brand { gap: 7px; font-size: 21px; letter-spacing: -.8px; }
  .main-nav { margin-left: auto; gap: 0; }
  .main-nav a:first-child { display: none; }
  .main-nav a:last-child { font-size: 0; gap: 5px; }
  .main-nav a:last-child::before { content: 'Notebook'; font-size: 11px; }
  .nav-count { font-size: 9px; padding: 0 5px; }
  .guide-button { margin-left: 0; border-color: #e1e6d9; width: 34px; height: 34px; padding: 0; min-height: 34px; }
  .guide-button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .page-shell { padding: 0 18px; }
  .page-intro { flex-direction: column; align-items: stretch; padding: 25px 0 23px; gap: 20px; }
  .page-intro .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
  .tiny-cross { font-size: 12px; }
  .eyebrow-divider { margin: 0 5px; }
  h1 { font-size: 36px; margin-top: 7px; letter-spacing: -1.4px; }
  .intro-copy { font-size: 11px; margin-top: 7px; max-width: 320px; }
  .law-card { padding: 11px 14px; border: 1px solid #e1e7d7; border-radius: 8px; background: #eff3e7; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 9px; }
  .law-card .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
  .law-card .equation { font-size: 20px; line-height: 1.25; grid-column: 2; grid-row: 1 / 3; white-space: nowrap; }
  .equation span { margin: 0 2px; }
  .law-card p { font-size: 9px; max-width: 120px; margin: 0; }
  .card-heading { min-height: 52px; padding: 0 15px; }
  .card-heading h2 { font-size: 12px; gap: 7px; }
  .live-badge { margin-left: 2px; font-size: 7px; padding: 2px 4px; }
  .angles-toggle { font-size: 10px; gap: 5px; }
  .angles-toggle input { width: 13px; height: 13px; }
  .diagram-stage { padding: 0; }
  #ray-diagram { height: 280px; }
  .ray-legend { padding: 7px 10px 13px; gap: 14px; font-size: 8px; }
  .ray-legend > span { gap: 5px; }
  .legend-line { width: 14px; }
  .model-readout { padding: 14px 15px 12px; }
  .model-readout th { font-size: 8px; padding-left: 9px; padding-right: 8px; }
  .model-readout th span { margin: 0; }
  .model-readout td { font-size: 23px; padding-left: 9px; padding-right: 8px; padding-top: 4px; }
  .model-readout td > span { font-size: 17px; }
  .model-readout td.text-result { font-size: 11px; line-height: 1.7; letter-spacing: -.2px; }
  .model-readout td.tir-result { font-size: 12px; }
  .readout-caption { gap: 6px; padding-top: 13px; font-size: 7px; }
  .model-tag { font-size: 6px; }
  .parameter-body { display: flex; padding: 19px 20px 17px; gap: 0; }
  .field-heading { margin-bottom: 15px; }
  .field-heading label { font-size: 13px; }
  .field-heading small { font-size: 10px; }
  .number-input { height: 39px; width: 78px; font-size: 14px; }
  .degree-input > span { top: 9px; }
  .parameter-slider { margin: 3px 0 2px; height: 24px; background-size: 100% 5px; }
  .parameter-slider::-webkit-slider-thumb { width: 18px; height: 18px; border-width: 5px; }
  .parameter-slider::-moz-range-thumb { width: 8px; height: 8px; border-width: 5px; }
  .range-scale { font-size: 10px; }
  .swap-row { margin: 17px 0; width: 100%; }
  .swap-button { font-size: 10px; min-height: 28px; padding: 5px 10px; }
  .angle-group { border-top: 1px solid #e9eedf; padding-top: 20px; margin-top: 24px; }
  .critical-button { margin-top: 14px; font-size: 11px; }
  .behavior-note { margin: 22px 0 17px; min-height: 0; width: 100%; padding: 12px; }
  .behavior-note strong { font-size: 11px; }
  .behavior-note p { font-size: 10px; }
  .save-button { min-height: 46px; font-size: 13px; }
  .save-caption { margin-top: 9px; font-size: 10px; }
  .explore-strip { padding: 16px; gap: 13px; margin-top: 17px; }
  .example-buttons { flex-direction: column; gap: 7px; }
  .example-button { justify-content: flex-start; width: 100%; padding: 10px 12px; font-size: 11px; min-height: 40px; }
  .example-number { font-size: 10px; margin-right: 3px; }
  .example-button .icon { margin-left: auto; }
  .example-question { line-height: 1.6; padding-left: 7px; padding-right: 7px; }
  .notes-card summary { padding: 14px 16px; }
  .notes-card summary > span { display: grid; grid-template-columns: 17px 1fr; gap: 1px 8px; }
  .notes-card summary .icon { grid-row: 1 / 3; align-self: center; }
  .notes-card summary strong { font-size: 11px; }
  .optional-label { font-size: 8px; margin-left: 0; grid-column: 2; }
  .notes-body { padding: 4px 16px 18px; }
  .notes-field label { font-size: 12px; }
  .notes-field textarea, .notes-field input { font-size: 12px; }
  .notes-field p { font-size: 10px; }
  .notebook-section { padding-top: 29px; }
  .section-heading { flex-direction: column; gap: 14px; margin-bottom: 15px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading p:not(.eyebrow) { font-size: 10px; }
  .notebook-actions { flex-direction: row; width: 100%; }
  .notebook-actions .button { flex: 1; min-height: 39px; font-size: 11px; }
  .notebook-actions .icon { width: 16px; height: 16px; }
  .notebook-empty { padding: 29px 22px; flex-direction: column; text-align: center; gap: 16px; }
  .notebook-empty h3 { font-size: 14px; }
  .notebook-empty p { font-size: 10px; line-height: 1.7; }
  .notebook-empty .empty-tip { font-size: 9px; }
  .notebook-toolbar { flex-direction: column; align-items: stretch; gap: 9px; padding: 14px 16px; }
  .notebook-toolbar > span { font-size: 10px; }
  .compare-button { align-self: flex-start; font-size: 11px; min-height: 36px; }
  .table-wrap { overflow: visible; }
  .experiment-table { min-width: 0; display: block; }
  .experiment-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .experiment-table tbody { display: block; }
  .experiment-table tr:not(.row-note) { display: grid; grid-template-columns: 1fr 1fr; padding: 16px; position: relative; gap: 12px 18px; border-top: 1px solid #e6eddb; }
  .experiment-table td { display: flex; flex-direction: column; padding: 0; border: 0; font-size: 12px; }
  .experiment-table td[data-label]::before { content: attr(data-label); font-size: 9px; color: #8a9c7c; margin-bottom: 4px; }
  .experiment-table td:first-child { padding: 0; width: auto; position: absolute; right: 16px; top: 20px; }
  .experiment-table td:first-child input { width: 17px; height: 17px; }
  .experiment-table td:nth-child(2) { grid-column: 1 / -1; border-bottom: 1px solid #e6eddb; padding-bottom: 10px; font-size: 13px; margin-right: 30px; }
  .experiment-table td:last-child { grid-column: 1 / -1; padding-top: 2px; }
  .row-actions { justify-content: flex-start; gap: 8px; }
  .row-actions .icon-button { width: auto; height: 30px; padding: 6px 10px; border: 1px solid #e4ebda; gap: 5px; display: flex; }
  .row-actions .load-point::after { content: 'Load'; font-size: 10px; }
  .row-actions .delete-point::after { content: 'Delete'; font-size: 10px; }
  .row-note { display: block; padding: 0 16px 17px; }
  .experiment-table .row-note td { display: block; position: static; width: auto; margin: 0; padding: 0; }
  .saved-notes { display: block; padding-top: 10px; }
  .saved-notes > div + div { margin-top: 10px; }
  .result-badge { align-self: flex-start; font-size: 9px; }
  .table-footer { flex-direction: column; gap: 4px; font-size: 8px; padding: 12px 16px; }
  .comparison-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .comparison-heading h3 { font-size: 21px; }
  .comparison-cards, .comparison-cards.three-cards { grid-template-columns: 1fr; }
  .comparison-cards.three-cards .comparison-card:last-child { grid-column: auto; }
  .mini-diagram { height: 180px; }
  .comparison-conditions dd { font-size: 14px; }
  .learning-note { margin: 25px 0 20px; font-size: 9px; line-height: 1.7; }
  .site-footer { flex-direction: column; gap: 9px; font-size: 8px; padding-top: 17px; }
  .toast { bottom: 16px; width: calc(100vw - 32px); font-size: 11px; padding: 10px 10px 10px 13px; }
  .guide-dialog { padding: 22px; border-radius: 12px; }
  .guide-dialog h2 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

@media print {
  @page { size: landscape; margin: 14mm; }
  body { background: white; color: #172b23; font-size: 10pt; }
  .site-header, .page-intro, .workbench, .explore-strip, .example-question, .notes-card, .notebook-actions, .notebook-toolbar, .site-footer, .toast, .notice, dialog, .skip-link, .comparison-section, .icon-definitions { display: none !important; }
  .page-shell { padding: 0; max-width: none; }
  .notebook-section { padding: 0; }
  .section-heading { margin-bottom: 16px; }
  .section-heading .eyebrow { color: #555; }
  .section-heading h2 { font-size: 22pt; }
  .section-heading p:not(.eyebrow) { font-size: 9pt; color: #555; }
  .count-badge { background: none; }
  .notebook-data { border: 0; border-radius: 0; overflow: visible; }
  .table-wrap { overflow: visible; }
  .experiment-table { display: table; width: 100%; min-width: 0; font-size: 9pt; }
  .experiment-table thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; background: #f1f3ef !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .experiment-table tbody { display: table-row-group; }
  .experiment-table tr:not(.row-note), .experiment-table .row-note { display: table-row; padding: 0; border: 0; break-inside: avoid; }
  .experiment-table th { font-size: 8pt; color: #333; padding: 8px; white-space: normal; }
  .experiment-table td { display: table-cell; padding: 10px 8px; font-size: 9pt; border-bottom: 1px solid #ddd; }
  .experiment-table td::before { display: none !important; }
  .experiment-table td:first-child, .experiment-table th:first-child, .experiment-table td:last-child, .experiment-table th:last-child { display: none; }
  .experiment-table td:nth-child(2) { padding: 10px 8px; margin: 0; border-bottom: 1px solid #ddd; font-size: 9pt; }
  .experiment-table .row-note td { display: table-cell; padding: 0 8px 12px; }
  .saved-notes { display: flex; gap: 24px; font-size: 8pt; border-top: 0; color: #555; }
  .saved-notes strong { color: #333; }
  .result-badge { border: 1px solid #d2d8c9; background: none; color: #333; white-space: normal; font-size: 7pt; }
  .result-badge.tir, .result-badge.critical { color: #333; background: none; }
  .undefined-angle, .not-recorded { color: #555; }
  .table-footer { border-top: 0; background: none; display: flex; flex-direction: row; color: #555; font-size: 8pt; padding: 12px 0; }
  .table-footer > span:first-child { display: none; }
  .learning-note { font-size: 8pt; color: #555; margin: 16px 0; }
  .learning-note strong { color: #333; }
  .notebook-empty { min-height: 100px; }
}
