:root {
  --ink: #101820;
  --ink-2: #18242e;
  --steel: #314350;
  --muted: #647480;
  --paper: #f4f6f5;
  --white: #ffffff;
  --line: #d7deda;
  --orange: #ff7a21;
  --orange-2: #ffb15f;
  --orange-soft: #fff0e4;
  --cyan: #63d7d1;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(16, 24, 32, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.65; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.6rem, 6vw, 5.8rem); max-width: 850px; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 0; }
h3 { font-size: 1.35rem; }
ul, ol { margin-top: 0; }

.skip-link { position: fixed; top: -60px; left: 16px; z-index: 999; background: var(--orange); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 12px; }
.section-shell { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }
.section-block { padding-block: 100px; }
.eyebrow, .card-label { margin: 0 0 12px; color: var(--orange); font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.lead { color: #dce4e7; font-size: clamp(1.05rem, 2vw, 1.35rem); max-width: 700px; }
.lead-small { color: #d6dfe2; font-size: 1.1rem; max-width: 680px; }

.site-header { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 max(20px, calc((100vw - 1220px) / 2)); position: sticky; top: 0; z-index: 100; color: var(--white); background: rgba(16, 24, 32, .94); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.1); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); color: var(--ink); font-size: 1.35rem; font-weight: 950; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .96rem; }
.brand small { margin-top: 5px; color: var(--orange-2); font-size: .62rem; letter-spacing: .25em; }
.primary-nav { display: flex; align-items: center; gap: 24px; }
.primary-nav a { color: #d7e0e4; text-decoration: none; font-size: .9rem; font-weight: 700; }
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--orange-2); }
.menu-button { display: none; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; padding: 7px 11px; color: var(--white); background: transparent; }

.overview { width: 100%; max-width: none; min-height: 610px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .6fr); align-items: center; gap: clamp(40px, 7vw, 100px); padding: 90px max(20px, calc((100vw - 1220px) / 2)); color: var(--white); background:
  radial-gradient(circle at 82% 28%, rgba(255,122,33,.22), transparent 22%),
  linear-gradient(125deg, #101820 0%, #15232c 58%, #23313a 100%);
  position: relative; overflow: hidden;
}
.overview::after { content: ""; width: 520px; height: 1px; position: absolute; right: -80px; top: 150px; background: linear-gradient(90deg, transparent, var(--orange)); transform: rotate(-28deg); box-shadow: 0 110px 0 rgba(255,122,33,.25), 0 220px 0 rgba(255,122,33,.12); }
.overview-copy, .overview-panel { position: relative; z-index: 1; }
.audience-switch { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(255,255,255,.06); }
.audience-button { padding: 10px 15px; border: 0; border-radius: 9px; color: #d7e0e4; background: transparent; cursor: pointer; font-weight: 800; }
.audience-button.active { color: var(--ink); background: var(--orange); }
.overview-panel { padding: 28px; border: 1px solid rgba(255,255,255,.17); border-radius: var(--radius); background: rgba(10,17,22,.46); box-shadow: 0 25px 70px rgba(0,0,0,.24); backdrop-filter: blur(14px); }
.panel-kicker { color: var(--orange-2); font-size: .75rem; font-weight: 900; letter-spacing: .18em; }
.mini-flow { list-style: none; padding: 0; }
.mini-flow li { display: flex; align-items: center; gap: 15px; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-weight: 800; }
.mini-flow span { color: var(--orange-2); font-size: .76rem; font-variant-numeric: tabular-nums; }
.panel-note { margin: 18px 0 0; color: #b9c5ca; font-size: .9rem; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 48px; }
.section-heading > p { max-width: 520px; margin-bottom: 0; color: var(--muted); }
.section-heading.light { color: var(--white); }
.section-heading.light > p { color: #c1ccd0; }
.process-layout { display: grid; grid-template-columns: 310px 1fr; gap: 28px; align-items: start; }
.process-rail { display: grid; max-height: 775px; overflow-y: auto; padding-right: 9px; scrollbar-width: thin; scrollbar-color: var(--steel) transparent; }
.stage-button { width: 100%; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; padding: 15px 13px; border: 0; border-left: 2px solid var(--line); color: var(--steel); background: transparent; cursor: pointer; }
.stage-button span { grid-row: 1 / 3; color: var(--muted); font-size: .75rem; font-weight: 900; }
.stage-button strong { font-size: .98rem; }
.stage-button small { color: var(--muted); font-size: .78rem; }
.stage-button:hover { background: var(--white); }
.stage-button.active { border-left-color: var(--orange); background: var(--white); box-shadow: 0 9px 24px rgba(16,24,32,.06); }
.stage-button.active span { color: var(--orange); }
.stage-detail { min-height: 690px; padding: clamp(26px, 4vw, 50px); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.stage-detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.stage-detail-head > span { min-width: 62px; min-height: 62px; display: grid; place-items: center; border-radius: 16px; color: var(--ink); background: var(--orange); font-size: 1.2rem; font-weight: 950; }
.stage-detail-head p { margin-bottom: 5px; color: var(--muted); font-size: .75rem; font-weight: 900; letter-spacing: .13em; }
.stage-detail-head h3 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.stage-summary { max-width: 780px; color: var(--steel); font-size: 1.08rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 30px 0; }
.detail-grid > div { padding: 21px; border: 1px solid var(--line); border-radius: 13px; }
.detail-grid h4 { margin-bottom: 12px; color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.detail-grid ul, .quality-gates ul, .method-columns ul, .method-columns ol { margin-bottom: 0; padding-left: 18px; }
.detail-grid li, .quality-gates li, .method-columns li { margin: 6px 0; }
.audience-note { display: grid; grid-template-columns: 130px 1fr; gap: 15px; padding: 18px 20px; border-radius: 12px; margin-top: 12px; }
.audience-note strong { font-size: .85rem; }
.audience-note p { margin: 0; }
.student-note { background: #e8f7f6; }
.customer-note { background: var(--orange-soft); }
body[data-audience="student"] .customer-note, body[data-audience="customer"] .student-note { display: none; }

.drawing-section { color: var(--white); background: var(--ink); }
.drawing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.drawing-card { padding: clamp(25px, 4vw, 42px); border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius); background: var(--ink-2); }
.drawing-card h3 { font-size: 1.8rem; }
.cad-card { background: linear-gradient(145deg, #1c2b35, #19242b); }
.number-list { list-style: none; padding: 0; margin: 28px 0 0; }
.number-list li { display: grid; grid-template-columns: 34px 1fr; gap: 15px; padding: 17px 0; border-top: 1px solid rgba(255,255,255,.1); }
.number-list li > span { color: var(--orange-2); font-weight: 900; }
.number-list p { margin: 5px 0 0; color: #b9c6cc; font-size: .94rem; }
.spec-panel { display: grid; grid-template-columns: 280px 1fr; gap: 45px; margin-top: 28px; padding: clamp(27px, 4vw, 45px); border-radius: var(--radius); color: var(--ink); background: var(--white); }
.spec-intro p:last-child { color: var(--muted); }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 30px; }
.spec-grid div { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.spec-grid p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.comparison-wrap { margin-top: 60px; }
.comparison-wrap > h3, .selection-matrix > h3 { margin-bottom: 20px; font-size: 1.7rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .93rem; }
th { padding: 14px 16px; text-align: left; color: var(--orange-2); background: rgba(255,255,255,.06); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 15px 16px; border-bottom: 1px solid rgba(255,255,255,.11); vertical-align: top; }

.method-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.method-tabs button { padding: 10px 17px; border: 1px solid var(--line); border-radius: 999px; color: var(--steel); background: var(--white); cursor: pointer; font-weight: 800; }
.method-tabs button[aria-selected="true"] { border-color: var(--ink); color: var(--white); background: var(--ink); }
.method-detail { padding: clamp(26px, 4vw, 46px); border-radius: var(--radius); color: var(--white); background: var(--ink-2); box-shadow: var(--shadow); }
.method-title { display: flex; align-items: center; gap: 18px; }
.method-title > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--orange); font-weight: 950; }
.method-title p { margin-bottom: 4px; color: var(--orange-2); font-size: .72rem; letter-spacing: .11em; font-weight: 900; }
.method-title h3 { margin-bottom: 0; font-size: 2rem; }
#method-summary { max-width: 850px; margin-top: 22px; color: #c6d1d6; }
.method-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.method-metrics span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: #dbe3e6; font-size: .83rem; }
.method-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.method-columns > div { padding: 22px; border-radius: 13px; background: rgba(255,255,255,.06); }
.method-columns h4 { margin-bottom: 13px; color: var(--orange-2); }
.selection-matrix { margin-top: 55px; }
.selection-matrix table { background: var(--white); }
.selection-matrix th { color: var(--steel); background: #e6ece9; }
.selection-matrix td { border-bottom-color: var(--line); }

.quality-section { color: var(--white); background: #15212a; }
.quality-gates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.quality-gates article { padding: 23px 20px; border-top: 3px solid var(--orange); background: rgba(255,255,255,.055); }
.quality-gates span { color: var(--orange-2); font-size: .75rem; font-weight: 900; }
.quality-gates h3 { margin: 12px 0; font-size: 1.18rem; }
.quality-gates p, .quality-gates li { color: #bbc7cc; font-size: .88rem; }
.defect-guide { margin-top: 60px; }
.defect-guide table { background: rgba(255,255,255,.04); }
.caution { margin: 18px 0 0; color: #b8c5ca; font-size: .9rem; }

.calculator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.calculator { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 12px 35px rgba(16,24,32,.06); }
.calc-head { display: flex; align-items: center; gap: 13px; }
.calc-head > span { color: var(--orange); font-size: .75rem; font-weight: 900; }
.calc-head p { margin-bottom: 3px; color: var(--muted); font-size: .68rem; letter-spacing: .12em; font-weight: 900; }
.calc-head h3 { margin-bottom: 0; }
.formula { min-height: 54px; margin: 20px 0; padding: 11px 13px; border-radius: 9px; background: #eef2f0; color: var(--steel); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; }
.calculator label { display: grid; gap: 6px; margin-bottom: 13px; color: var(--steel); font-size: .86rem; font-weight: 750; }
.calculator input, .search-label input { width: 100%; padding: 10px 11px; border: 1px solid #bdc8c4; border-radius: 8px; color: var(--ink); background: var(--white); }
.input-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.calculator button, .quiz-submit { margin-top: auto; padding: 11px 15px; border: 0; border-radius: 9px; color: var(--white); background: var(--ink); cursor: pointer; font-weight: 850; }
.calculator button:hover, .quiz-submit:hover { background: var(--steel); }
.calculator output { display: block; margin-top: 15px; padding: 13px; border-left: 3px solid var(--orange); color: var(--ink); background: var(--orange-soft); font-weight: 850; }

.customer-section { color: var(--white); background: linear-gradient(135deg, #23333d 0%, #101820 72%); }
.customer-layout { display: grid; grid-template-columns: 1.5fr .7fr; gap: clamp(40px, 8vw, 100px); align-items: start; }
.customer-list { margin-top: 34px; }
.customer-list > div { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 19px 0; border-top: 1px solid rgba(255,255,255,.12); }
.customer-list span { color: var(--orange-2); font-size: .76rem; font-weight: 900; }
.customer-list p { margin: 0; color: #c1ccd0; }
.customer-list strong { display: block; color: var(--white); }
.handoff-card { padding: 30px; border-radius: var(--radius); color: var(--ink); background: var(--white); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.handoff-card h3 { font-size: 1.8rem; }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 950; }
.handoff-note { margin-top: 18px; padding: 16px; border-radius: 10px; background: var(--orange-soft); }
.handoff-note p { margin: 5px 0 0; font-size: .9rem; }

.quiz { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.quiz fieldset { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.quiz legend { padding: 0 6px; font-weight: 850; line-height: 1.35; }
.quiz legend span { margin-right: 8px; color: var(--orange); }
.quiz label { display: block; margin: 11px 0; color: var(--steel); }
.quiz input { accent-color: var(--orange); }
.quiz-submit { justify-self: start; padding-inline: 22px; }
.quiz-result { grid-column: 1 / -1; }
.quiz-score { padding: 20px; border-radius: 12px; background: var(--orange-soft); }
.quiz-score h3 { margin-bottom: 7px; }
.quiz-score p { margin-bottom: 0; }

.glossary-section { color: var(--white); background: var(--ink); }
.search-label { display: grid; gap: 5px; min-width: min(100%, 320px); color: #c2cdd1; font-size: .78rem; font-weight: 800; }
.glossary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.glossary-grid article { padding: 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.045); }
.glossary-grid h3 { margin-bottom: 8px; color: var(--orange-2); font-size: 1.05rem; }
.glossary-grid p { margin-bottom: 0; color: #b9c5ca; font-size: .9rem; }
.empty-message { padding: 20px; border: 1px dashed rgba(255,255,255,.25); text-align: center; color: #b9c5ca; }

footer { padding: 55px 0; color: #aebbc0; background: #0a1015; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 60px; }
.footer-grid h2 { margin-bottom: 15px; color: var(--white); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-grid a:not(.brand) { display: block; margin: 8px 0; text-decoration: none; }
.footer-grid a:hover { color: var(--orange-2); }
.footer-brand { margin-bottom: 20px; color: var(--white); }
.footer-grid p { max-width: 470px; font-size: .9rem; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 1050px) {
  .primary-nav { gap: 15px; }
  .primary-nav a { font-size: .8rem; }
  .quality-gates { grid-template-columns: repeat(3, 1fr); }
  .calculator-grid { grid-template-columns: 1fr 1fr; }
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .section-block { padding-block: 75px; }
  .menu-button { display: block; }
  .primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 66px; flex-direction: column; align-items: stretch; gap: 0; padding: 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; background: var(--ink-2); box-shadow: var(--shadow); }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 11px; font-size: .9rem; }
  .overview { grid-template-columns: 1fr; padding-block: 70px; }
  .overview-panel { max-width: 520px; }
  .section-heading { display: grid; gap: 20px; }
  .process-layout { grid-template-columns: 1fr; }
  .process-rail { grid-auto-flow: column; grid-auto-columns: 180px; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 0 0 10px; }
  .stage-button { border-left: 0; border-top: 2px solid var(--line); }
  .stage-button.active { border-top-color: var(--orange); }
  .stage-detail { min-height: 0; }
  .drawing-grid, .customer-layout { grid-template-columns: 1fr; }
  .spec-panel { grid-template-columns: 1fr; }
  .method-columns { grid-template-columns: 1fr; }
  .quality-gates { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 590px) {
  .section-shell { width: min(100% - 28px, 1220px); }
  .overview { padding-inline: 14px; }
  .overview-copy { padding-inline: 0; }
  h1 { font-size: 2.7rem; }
  .audience-switch { display: grid; width: 100%; grid-template-columns: 1fr; }
  .detail-grid, .spec-grid, .calculator-grid, .quiz, .glossary-grid, .quality-gates, .footer-grid { grid-template-columns: 1fr; }
  .audience-note { grid-template-columns: 1fr; }
  .stage-detail { padding: 22px 18px; }
  .stage-detail-head > span { min-width: 49px; min-height: 49px; border-radius: 12px; }
  .input-pair { grid-template-columns: 1fr; gap: 0; }
  .quiz-result { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
