:root{--background:#fefbf5;--surface:#fff;--surface-warm:#fff8eb;--ink:#082218;--muted:#47605a;--line:#ded6c8;--gold:#d39e50;--gold-light:#f6e5c8;--green-soft:#e8f1ed;--opposite:#b84632;--adjacent:#267064;--hypotenuse:#72529b;--shadow:0 14px 38px #08221817;color:var(--ink);background:var(--background);font-synthesis:none;text-rendering:optimizelegibility;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth}body{background:var(--background);min-width:320px;min-height:100vh;margin:0}button,input,a{font:inherit}:where(button,input,a,[tabindex]):focus-visible{outline-offset:3px;outline:3px solid #315f50}button{min-height:44px}.site-shell{flex-direction:column;min-height:100vh;display:flex}.brand-header{border-bottom:1px solid var(--gold);background:var(--background);width:100%;padding:18px 22px}.brand-inner{justify-content:space-between;align-items:center;gap:24px;width:min(1180px,100%);margin:0 auto;display:flex}.brand-link{color:var(--ink);white-space:nowrap;align-items:center;gap:22px;text-decoration:none;display:inline-flex}.brand-logo{object-fit:contain;width:auto;max-width:170px;height:46px;display:block}.brand-name{color:var(--ink);letter-spacing:0;font:400 32px/1 Georgia,Times New Roman,serif}.brand-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:16px;display:flex}.nav-link,.home-link{border:1px solid var(--gold);border-radius:8px;justify-content:center;align-items:center;min-height:46px;padding:10px 26px;font-size:15px;font-weight:800;line-height:1;text-decoration:none;display:inline-flex}.nav-link{color:var(--background);background:var(--ink)}.nav-link:hover{background:#133d2c}.home-link{color:var(--ink);background:var(--background)}.home-link:hover{background:var(--gold-light)}main{flex:1;width:min(1460px,100%);margin:0 auto;padding:18px}.tabs{border:1px solid var(--line);background:#eee8dd;border-radius:12px;gap:6px;width:fit-content;max-width:100%;margin:0 0 14px;padding:5px;display:flex}.tabs button{color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;gap:9px;padding:10px 20px;font-weight:850;display:inline-flex}.tabs button span{font:700 22px Georgia,serif}.tabs button[aria-selected=true]{color:var(--background);background:var(--ink);box-shadow:0 4px 12px #0822182e}.simulator-panel{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:12px;overflow:hidden}.panel-heading{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:20px;padding:18px 22px;display:flex}.panel-heading h1{margin:2px 0 5px;font:400 clamp(1.75rem,3vw,2.35rem)/1.1 Georgia,Times New Roman,serif}.panel-heading p:last-child{color:var(--muted);margin:0;line-height:1.5}.eyebrow{color:#8a5c1c;letter-spacing:.09em;text-transform:uppercase;margin:0;font-size:.75rem;font-weight:900}.button{border:1px solid var(--ink);cursor:pointer;border-radius:8px;padding:10px 16px;font-weight:850}.button-primary{color:var(--background);background:var(--ink)}.button-primary:hover{background:#133d2c}.button-secondary{color:var(--ink);background:var(--background)}.button-secondary:hover{background:var(--gold-light)}.workspace-grid{grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr);gap:18px;padding:18px;display:grid}.visual-card,.results-panel,.discovery-stage{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-width:0}.visual-card{overflow:hidden}.geometry{background:radial-gradient(circle at 50% 45%,#fff 0 35%,#f9f5ed 100%);width:100%;height:min(58vh,500px);min-height:370px;display:block}.circle-halo{fill:none;stroke:#d39e502e;stroke-width:20px}.circle-shape{fill:#d39e5017;stroke:var(--gold);stroke-width:6px}.diameter-line{stroke:var(--ink);stroke-width:5px;stroke-linecap:round}.center-dot{fill:var(--ink)}.svg-label{fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round;font-size:18px}.svg-label-strong{font-weight:850}.svg-value{fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:6px;font-size:20px;font-weight:900}.perimeter-callout path{fill:none;stroke:var(--gold);stroke-width:3px;stroke-dasharray:7 6}.perimeter-callout text{fill:var(--ink);font-size:18px;font-weight:850}.slider-field{border-top:1px solid var(--line);background:var(--surface-warm);padding:16px 20px 18px}.slider-heading{justify-content:space-between;align-items:baseline;gap:20px;display:flex}.slider-heading label{font-size:1rem;font-weight:850}.slider-heading output{color:var(--ink);font-weight:900}input[type=range]{width:100%;min-height:30px;accent-color:var(--ink);cursor:pointer;margin:10px 0 0}.range-labels{color:var(--muted);justify-content:space-between;font-size:.75rem;font-weight:750;display:flex}.results-panel{background:linear-gradient(145deg,#fffaf0,#fff);border-color:#d39e50a6;padding:24px}.results-panel h2{margin:5px 0 22px;font:400 1.6rem Georgia,serif}.fraction{vertical-align:middle;grid-template-rows:auto auto;place-items:center;line-height:1.16;display:inline-grid}.fraction>span:first-child{text-align:center;border-bottom:2px solid;width:100%;padding:0 .24em .16em}.fraction>span:last-child{text-align:center;padding:.16em .24em 0}.pi-equation{border-block:1px solid var(--gold);justify-content:center;align-items:center;gap:clamp(8px,2vw,18px);padding:22px 12px;font:500 clamp(1.1rem,2.4vw,1.55rem) Georgia,serif;display:flex}.pi-equation strong{color:var(--background);background:var(--ink);border-radius:7px;padding:8px 12px;font-family:Inter,sans-serif}.identity-formula{justify-content:center;align-items:center;gap:9px;margin:18px 0;font:500 1.2rem Georgia,serif;display:flex}.measurement-list{grid-template-columns:1fr 1fr;gap:10px;display:grid}.measurement-list div{border:1px solid var(--line);background:#fff;border-radius:8px;gap:4px;padding:12px;display:grid}.measurement-list span{color:var(--muted);font-size:.82rem;font-weight:750}.measurement-list strong{font-size:1.1rem}.conclusion{border-left:4px solid var(--gold);background:var(--gold-light);margin:18px 0 0;padding:14px;line-height:1.55}.triangle-layout{grid-template-columns:minmax(440px,.95fr) minmax(0,1.25fr);align-items:start;gap:18px;padding:18px;display:grid}.triangle-card{position:sticky;top:12px}.angle-controls{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;display:flex}.angle-controls>span{font-weight:850}.segmented{background:#eee8dd;border-radius:9px;gap:5px;padding:4px;display:flex}.segmented button{color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:6px;padding:7px 12px;font-weight:850}.segmented button.active{color:var(--background);background:var(--ink)}.hypotenuse-note{color:#4b3567;background:#f0eaf7;border-radius:7px;margin:12px 16px 0;padding:10px 12px;line-height:1.4}.triangle-geometry{background:radial-gradient(circle,#fff 0,#f9f5ed 100%);height:min(50vh,460px);min-height:390px}.triangle-fill{fill:#d39e5012}.triangle-side{stroke-width:6px;stroke-linecap:round;transition:all .18s}.opposite-side{stroke:var(--opposite)}.adjacent-side{stroke:var(--adjacent)}.hypotenuse-side{stroke:var(--hypotenuse)}.right-angle{fill:none;stroke:var(--ink);stroke-width:3px}.right-angle-label{fill:var(--muted);font-size:13px;font-weight:800}.angle-target{cursor:pointer}.angle-target circle{fill:#fff;stroke:var(--line);stroke-width:3px;transition:all .16s}.angle-target text{fill:var(--ink);pointer-events:none;font:700 23px Georgia,serif}.angle-target:hover circle{fill:var(--gold-light)}.angle-target.angle-selected circle{fill:var(--ink);stroke:var(--gold);stroke-width:5px}.angle-target.angle-selected text{fill:#fff}.angle-target:focus-visible circle{stroke:#315f50;stroke-width:7px}.side-label text{fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:7px;stroke-linejoin:round;font-size:15px;font-weight:850}.hyp-label text{fill:#4b3567}.legend{color:var(--muted);flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:0 16px 14px;font-size:.78rem;font-weight:800;display:flex}.legend span{align-items:center;gap:6px;display:inline-flex}.legend-line{border-radius:4px;width:24px;height:4px}.legend-line.opposite{background:var(--opposite)}.legend-line.adjacent{background:var(--adjacent)}.legend-line.hypotenuse{background:var(--hypotenuse)}.discovery-column{gap:14px;display:grid}.discovery-stage{padding:18px;position:relative;overflow:hidden}.discovery-stage h2{margin:3px 0 14px;padding-right:46px;font:400 1.55rem Georgia,serif}.stage-number{border:1px solid var(--gold);width:38px;height:38px;color:var(--gold);background:var(--ink);border-radius:50%;place-items:center;font-weight:900;display:grid;position:absolute;top:14px;right:16px}.ratio-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}.ratio-card{border:1px solid var(--line);text-align:center;background:#fff;border-radius:8px;min-width:0;padding:13px 9px}.ratio-card h3{color:var(--ink);margin:0 0 8px;font-size:1rem}.formula-row{justify-content:center;align-items:center;gap:5px;min-height:45px;font-family:Georgia,serif;display:flex}.formula-row .fraction{font-size:clamp(.72rem,1.15vw,.9rem)}.formula-name{font-weight:700}.formula-values{border-top:1px solid var(--line);margin-top:7px;padding-top:7px;font-family:Inter,sans-serif}.formula-values strong{color:#fff;background:var(--ink);border-radius:5px;min-width:48px;padding:5px}.discovery-message{border-left:4px solid var(--gold);background:var(--surface-warm);margin:14px 0;padding:12px;line-height:1.5}.reveal-button{width:100%}.revealed{animation:.35s ease-out both reveal}@keyframes reveal{0%{opacity:0;transform:translateY(8px)}}.named-grid .ratio-card{border-top:4px solid var(--gold)}.interpretations{gap:7px;margin:14px 0;display:grid}.interpretations p{background:var(--green-soft);border-radius:7px;margin:0;padding:9px 12px;line-height:1.45}.reciprocal-callout{color:#4b3567;background:#f0eaf7;border-radius:7px;margin:0 0 14px;padding:9px 12px;display:inline-block}.clarification{background:#faf7fd;border:1px solid #d6c5e8;border-radius:7px;margin:14px 0 0;padding:12px;line-height:1.5}footer{min-height:68px;color:var(--background);background:var(--ink);text-align:center;justify-content:center;align-items:center;margin-top:18px;padding:16px;font-size:14px;font-weight:700;display:flex}@media (width<=1120px){.workspace-grid,.triangle-layout{grid-template-columns:1fr}.triangle-card{position:static}.geometry{height:440px}.results-panel{max-width:none}}@media (width<=760px){.brand-header{padding:12px 14px}.brand-inner{flex-direction:column;align-items:stretch;gap:12px}.brand-actions{flex-wrap:nowrap;gap:10px;width:100%}.brand-actions a{text-align:center;flex:1 1 0;padding:9px 12px}main{padding:12px}.tabs{width:100%}.tabs button{flex:1;padding:9px 10px}.panel-heading{padding:15px}.workspace-grid,.triangle-layout{gap:10px;padding:10px}.ratio-grid{grid-template-columns:1fr}.ratio-card{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;display:grid}.ratio-card h3{grid-column:1/-1}.formula-values{border:0;margin:0;padding:0}.angle-controls{flex-direction:column;align-items:stretch}.segmented button{flex:1}}@media (width<=520px){.brand-header{padding:10px}.brand-link{gap:10px}.brand-logo{max-width:120px;height:32px}.brand-name{font-size:22px}.brand-actions{grid-template-columns:1fr;gap:8px;display:grid}.brand-actions a{min-height:42px}.tabs button{font-size:.8rem}.tabs button span{font-size:18px}.panel-heading{flex-direction:column;align-items:stretch}.panel-heading .button{align-self:flex-start}.geometry{height:350px;min-height:330px}.triangle-geometry{height:360px;min-height:350px}.slider-heading{flex-direction:column;align-items:flex-start;gap:4px}.results-panel{padding:17px 12px}.measurement-list{grid-template-columns:1fr}.pi-equation{gap:7px;font-size:.98rem}.discovery-stage{padding:15px 11px}.ratio-card{grid-template-columns:1fr}.formula-values{padding-top:7px}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}
