.meaning-pipeline { display: grid; margin-top: 25px; grid-template-columns: 1fr 34px 1fr 34px 1fr 42px 1.2fr; align-items: stretch; }
.meaning-box { display: grid; min-width: 0; min-height: 138px; padding: 15px; align-content: center; justify-items: center; border: 1px solid var(--line); border-radius: 12px; background: #091216; text-align: center; }
.meaning-box small { color: var(--muted); font: 500 .54rem/1.3 var(--mono); text-transform: uppercase; }
.meaning-box strong { margin: 8px 0; color: var(--text); font: 600 1.15rem/1 var(--mono); }
.meaning-box span { color: var(--muted); font-size: .69rem; }
.raw-value { border-color: rgba(255, 209, 102, .42); }
.raw-value strong { color: var(--yellow); font-size: 2rem; }
.type-value { border-color: rgba(184, 161, 255, .42); }
.type-value strong { color: var(--purple); }
.context-value { border-color: rgba(107, 188, 255, .42); }
.context-value strong { color: var(--blue); }
.meaningful-value { border: 2px solid var(--green); background: rgba(97, 227, 165, .07); }
.meaningful-value strong { color: var(--green); }
.meaning-arrow { display: grid; place-items: center; color: var(--line-strong); }
.result-arrow { color: var(--green); }

.primitive-examples { display: grid; margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.primitive-examples article { display: grid; padding: 12px; grid-template-columns: minmax(190px, .8fr) minmax(0, 1fr); align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .022); }
.primitive-examples code { color: var(--green); font-size: .65rem; }
.primitive-examples span { color: var(--muted); font-size: .74rem; }
.primitive-examples strong { color: var(--text); }
.definition-note { display: grid; margin-top: 15px; padding: 15px; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 11px; border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; background: rgba(107, 188, 255, .055); }
.definition-note i { display: grid; width: 38px; height: 38px; place-items: center; color: var(--blue); }
.definition-note p { margin: 0; color: #d5e0e4; font-size: .8rem; }

.record-anatomy { display: grid; grid-template-columns: minmax(310px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: stretch; }
.record-visual { overflow: hidden; border: 1px solid rgba(97, 227, 165, .35); border-radius: 13px; background: #091216; }
.record-title { display: grid; padding: 15px; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 11px; border-bottom: 1px solid var(--line); background: rgba(97, 227, 165, .07); }
.record-title > i { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 9px; color: var(--green); background: #143426; }
.record-title span, .record-title small, .record-title strong { display: block; }
.record-title small { color: var(--muted); font: 400 .54rem/1.3 var(--mono); text-transform: uppercase; }
.record-title strong { color: var(--green); font-size: 1rem; }
.record-field { display: grid; min-height: 48px; padding: 10px 14px; grid-template-columns: minmax(90px, .8fr) minmax(80px, 1fr) 70px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.record-field:last-child { border-bottom: 0; }
.record-field > span { color: var(--muted); font: 500 .63rem/1 var(--mono); }
.record-field code { color: var(--text); font-size: .7rem; }
.record-field small { color: var(--purple); font: 400 .56rem/1 var(--mono); text-align: right; }
.record-explanation { display: grid; gap: 9px; }
.record-explanation article { display: grid; padding: 15px; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .022); }
.record-explanation article > span { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(107, 188, 255, .35); border-radius: 9px; color: var(--blue); background: rgba(107, 188, 255, .07); font: 500 .68rem/1 var(--mono); }
.record-explanation h3 { margin: 0 0 3px; font-size: .89rem; }
.record-explanation p { margin: 0; color: var(--muted); font-size: .76rem; }
.compact-code { margin-top: 15px; }
.compact-code pre { max-height: 330px; }
.code-string { color: #ffb86c; }

.progression-diagram { display: grid; margin-top: 24px; grid-template-columns: 1fr 42px 1fr 42px 1.25fr; align-items: stretch; }
.progression-diagram > i { display: grid; place-items: center; color: var(--yellow); }
.progress-level { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #091216; }
.progress-level > small { display: block; margin-bottom: 11px; color: var(--green); font: 500 .56rem/1.3 var(--mono); text-transform: uppercase; }
.field-level > div { display: flex; flex-wrap: wrap; gap: 5px; }
.field-level span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: 500 .62rem/1 var(--mono); }
.one-record div, .record-collection div { display: grid; gap: 7px; }
.progress-level strong { color: var(--blue); font: 500 .72rem/1.3 var(--mono); }
.progress-level div > span { color: var(--muted); font: 400 .61rem/1.4 var(--mono); }
.record-collection { border-color: rgba(97, 227, 165, .38); background: rgba(97, 227, 165, .045); }
.record-collection strong { color: var(--green); }
.structure-operations { display: grid; margin-top: 15px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.structure-operations article { display: grid; min-width: 0; padding: 13px 10px; justify-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .022); text-align: center; }
.structure-operations i { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 8px; color: var(--green); background: rgba(97, 227, 165, .07); }
.structure-operations span, .structure-operations strong { display: block; }
.structure-operations strong { margin-bottom: 4px; color: var(--text); font-size: .75rem; }
.structure-operations span { color: var(--muted); font-size: .66rem; }
.why-structure { display: grid; margin-top: 15px; padding: 15px; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 11px; border-left: 3px solid var(--yellow); border-radius: 0 10px 10px 0; background: rgba(255, 209, 102, .055); }
.why-structure i { display: grid; width: 38px; height: 38px; place-items: center; color: var(--yellow); }
.why-structure p { margin: 0; color: #dedacb; font-size: .8rem; }

.choice-question { max-width: 650px; margin: 0 auto; padding: 17px; border: 2px solid var(--green); border-radius: 12px; background: #10251c; text-align: center; }
.choice-question small, .choice-question strong { display: block; }
.choice-question small { color: var(--green); font: 500 .56rem/1.3 var(--mono); text-transform: uppercase; }
.choice-question strong { margin-top: 5px; font-size: 1rem; }
.choice-branches { position: relative; display: grid; margin-top: 58px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-branches::before { position: absolute; top: -31px; left: 50%; width: 1px; height: 31px; border-left: 2px dashed var(--line-strong); content: ""; }
.choice-branches article { display: grid; padding: 16px; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .022); }
.choice-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 9px; color: var(--green); background: rgba(97, 227, 165, .07); }
.hash-choice { color: var(--blue); background: rgba(107, 188, 255, .07); }
.queue-choice { color: var(--yellow); background: rgba(255, 209, 102, .07); }
.priority-choice { color: var(--purple); background: rgba(184, 161, 255, .07); }
.choice-branches small { color: var(--muted); font: 400 .54rem/1.3 var(--mono); text-transform: uppercase; }
.choice-branches h3 { margin: 4px 0; font-size: .86rem; }
.choice-branches h3 code { color: var(--green); }
.choice-branches p { margin: 0; color: var(--muted); font-size: .73rem; }

.records-lab { display: grid; grid-template-columns: minmax(290px, .7fr) minmax(0, 1.3fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #091216; }
.record-form { padding: clamp(20px, 4vw, 30px); border-right: 1px solid var(--line); }
.form-heading { display: grid; margin-bottom: 18px; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; }
.form-heading > i { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 9px; color: var(--green); background: rgba(97, 227, 165, .08); }
.form-heading span, .form-heading small, .form-heading strong { display: block; }
.form-heading small { color: var(--muted); font: 400 .54rem/1.3 var(--mono); text-transform: uppercase; }
.form-heading strong { font-size: .96rem; }
.record-form label { display: grid; margin-top: 11px; gap: 5px; color: var(--muted); font: 500 .58rem/1.3 var(--mono); text-transform: uppercase; }
.record-form input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--surface); }
.field-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.record-form button, .collection-actions button { display: inline-flex; min-height: 42px; padding: 9px 12px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--surface-2); font-size: .73rem; font-weight: 700; cursor: pointer; }
.record-form .primary-action { width: 100%; margin-top: 15px; border-color: var(--green); color: var(--ink); background: var(--green); }
.record-preview { margin-top: 16px; padding: 11px; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 8px; }
.record-preview small, .record-preview code { display: block; }
.record-preview small { margin-bottom: 5px; color: var(--muted); font: 400 .54rem/1.3 var(--mono); text-transform: uppercase; }
.record-preview code { overflow: hidden; color: var(--yellow); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.collection-stage { min-width: 0; padding: clamp(20px, 4vw, 30px); }
.collection-toolbar { display: flex; margin-bottom: 13px; align-items: center; justify-content: space-between; gap: 12px; }
.collection-toolbar span, .collection-toolbar small, .collection-toolbar strong { display: block; }
.collection-toolbar small { color: var(--muted); font: 400 .54rem/1.3 var(--mono); text-transform: uppercase; }
.collection-toolbar span strong { color: var(--green); font: 500 .7rem/1.4 var(--mono); }
.collection-toolbar > strong { color: var(--blue); font: 500 .6rem/1.3 var(--mono); }
.record-table { display: grid; gap: 6px; }
.record-row { display: grid; min-width: 0; min-height: 42px; padding: 8px 10px; grid-template-columns: 50px minmax(90px, 1fr) 55px 55px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, .022); font-size: .69rem; }
.record-row.header-row { min-height: 32px; border: 0; color: var(--green); background: transparent; font: 500 .54rem/1.3 var(--mono); text-transform: uppercase; }
.record-row.is-found { border-color: var(--yellow); background: rgba(255, 209, 102, .07); }
.record-row span:first-child { color: var(--blue); font-family: var(--mono); }
.record-row span:last-child { color: var(--yellow); font-family: var(--mono); }
.collection-actions { display: flex; margin-top: 13px; flex-wrap: wrap; gap: 7px; }
.collection-actions button:hover { border-color: var(--green); }
.collection-status { margin: 13px 0 0; padding: 11px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; color: #d2dfe3; background: rgba(107, 188, 255, .055); font-size: .74rem; }
.collection-status.is-error { border-left-color: var(--red); background: rgba(255, 133, 133, .055); }

.full-program pre { max-height: 760px; }
.code-reading { display: grid; margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.code-reading article { display: grid; padding: 13px; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .022); }
.code-reading span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: var(--green); background: rgba(97, 227, 165, .07); font: 500 .63rem/1 var(--mono); }
.code-reading p { margin: 0; color: var(--muted); font-size: .73rem; }
.summary-chain { display: grid; grid-template-columns: 1fr 42px 1fr 42px 1fr; align-items: stretch; }
.summary-chain > i { display: grid; place-items: center; color: var(--yellow); }
.summary-chain article { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #091216; text-align: center; }
.summary-chain span, .summary-chain strong { display: block; }
.summary-chain span { color: var(--green); font: 500 .56rem/1.3 var(--mono); text-transform: uppercase; }
.summary-chain strong { margin: 8px 0; }
.summary-chain strong code { color: var(--blue); font-size: .72rem; }
.summary-chain p { margin: 0; color: var(--muted); font-size: .7rem; }
.records-review { margin-top: 15px; }

@media (max-width: 980px) {
  .meaning-pipeline { grid-template-columns: 1fr; gap: 7px; }
  .meaning-arrow { min-height: 25px; transform: rotate(90deg); }
  .meaning-box { min-height: 118px; }
  .record-anatomy,
  .records-lab { grid-template-columns: 1fr; }
  .record-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .structure-operations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .primitive-examples,
  .choice-branches,
  .code-reading { grid-template-columns: 1fr; }
  .primitive-examples article { grid-template-columns: 1fr; gap: 5px; }
  .progression-diagram,
  .summary-chain { grid-template-columns: 1fr; gap: 7px; }
  .progression-diagram > i,
  .summary-chain > i { min-height: 25px; transform: rotate(90deg); }
  .structure-operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-field { grid-template-columns: minmax(80px, 1fr) minmax(70px, 1fr); }
  .record-field small { display: none; }
  .choice-branches { margin-top: 45px; }
  .field-pair { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 42px minmax(75px, 1fr) 43px 43px; padding-inline: 7px; gap: 5px; font-size: .61rem; }
  .collection-actions { display: grid; grid-template-columns: 1fr; }
}
