/* Homepage. */
.landing-hero { position: relative; padding: 58px 0 44px; overflow: hidden; }
.landing-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .32; background-image: radial-gradient(var(--rule) .7px, transparent .7px); background-size: 7px 7px; mask-image: linear-gradient(transparent, #000); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.12fr; gap: 3.5rem; align-items: start; }
.hero-copy { padding-block: 14px; }
.hero-copy, .world-column { min-width: 0; }
.hero-kicker { display: flex; align-items: flex-start; gap: 11px; font: 600 clamp(.9375rem, .9rem + .2vw, 1.0625rem)/1.6 var(--mono); letter-spacing: .015em; color: var(--green); margin-bottom: 29px; }
.hero-kicker .status-dot { margin-top: .6em; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: none; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent); border-radius: 50%; }
.landing-hero h1 { font-size: clamp(3.5rem, 5.8vw, 5.4rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.07; margin: 0 0 26px; }
.landing-hero h1 span { display: block; }
.landing-hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.headline-spark { display: inline-block; vertical-align: top; width: 31px; height: 39px; margin: 3px 0 0 7px; color: var(--accent); }
.hero-intro { font-size: var(--text-body); line-height: 1.8; max-width: 390px; color: var(--ink-soft); margin-bottom: 25px; }
.hero-intro strong { font-weight: 700; color: var(--ink); }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }
.hero-smallprint { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font: var(--text-small)/1.6 var(--mono); color: var(--ink-faint); margin-top: 21px; }
.hero-smallprint .separator { padding-inline: 5px; color: var(--rule); }
.hero-note { margin: 18px 0 0; max-width: 390px; font-size: 1rem; line-height: 1.65; color: var(--ink-soft); }
.world { min-width: 0; background: #222d31; border: 1px solid #374447; border-radius: 9px; color: #f3eeda; box-shadow: 7px 9px 0 #d7d8c7; transform: rotate(-1deg); overflow: hidden; }
[data-power="out"] .world { box-shadow: 7px 9px 0 #354638; }
.world-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 15px 19px; border-bottom: 1px solid #43504d; background: #253236; font: var(--text-small)/1.4 var(--mono); letter-spacing: .09em; }
.world-top__title { display: flex; align-items: center; gap: 8px; color: #e0e6d2; }
.world-top__title i { height: 7px; width: 7px; background: #e9b870; }
.world-top__right { color: #a9b7ad; }
.world-view { position: relative; aspect-ratio: 640 / 492; overflow: hidden; background: #202b31; }
.world-view::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(transparent 0 3px, #0d182509 3px 4px); }
.world-art { display: block; width: 100%; height: 100%; }
.world svg text { font-family: var(--mono); }
.world-note { position: absolute; top: 18px; left: 20px; font: var(--text-small)/1.6 var(--mono); color: #a9bbaf; max-width: 180px; margin: 0; }
.world-note strong { display: block; font-weight: 500; color: #f0c88f; }
.world-controls { padding: 17px 19px 19px; border-top: 1px solid #42514c; background: #263338; }
.world-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding-bottom: 17px; }
.world-stat span { display: block; font: var(--text-small)/1.5 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: #a7b8ae; }
.world-stat b { font: 500 var(--text-small)/1.7 var(--mono); color: #d5e8b6; }
.world-stat:first-child b { color: #c7c3eb; }
.world-stat:last-child b { color: #ffc880; }
.world-action-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.unplug { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #e9b978; border-bottom: 4px solid #ad724b; background: #ffd498; color: #283027; min-height: 43px; padding: 9px 17px; border-radius: 4px; font: 700 var(--text-small) var(--mono); cursor: pointer; transition: background 180ms, transform 180ms; }
.unplug:hover { background: #ffe3b3; transform: translateY(-1px); }
.unplug:active { transform: translateY(2px); }
.unplug svg { width: 16px; height: 16px; }
.world-prompt { margin: 0; max-width: 250px; flex: 1 1 160px; font: var(--text-small)/1.6 var(--mono); color: #bcc7b9; }
.world-prompt kbd { font-size: inherit; border: 1px solid #6a7b6e; border-radius: 2px; padding: 1px 4px; color: #e2e9d4; }
.scene-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 0; font: var(--text-small)/1.6 var(--mono); color: var(--ink-faint); }
.scene-caption p { margin: 0; max-width: 430px; flex: 1 1 240px; }
.motion-toggle { white-space: nowrap; background: none; border: none; color: var(--ink-faint); padding: 7px 0 7px 10px; min-height: 44px; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.hero-bottom { position: relative; margin-top: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; color: var(--ink-soft); font: 1rem/1.65 var(--sans); letter-spacing: 0; }
.hero-bottom a { text-decoration: none; color: var(--ink-soft); }
.hero-bottom a:hover { color: var(--accent); }
.home-section { padding-block: 80px; }
.section-top { display: flex; justify-content: space-between; align-items: start; gap: 30px; margin-bottom: 36px; }
.section-top .eyebrow { margin-bottom: 13px; color: var(--green); }
.section-top h2 { font-size: clamp(2rem, 3.5vw, 3rem); margin: 0; }
.section-top > p { margin: 2rem 0 0; max-width: 330px; color: var(--ink-soft); font-size: 1rem; line-height: 1.75; }
.home-section .wrap > :last-child { margin-bottom: 0; }
.pattern-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.dependency-cases { padding-bottom: 0; }
.case-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.case-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 5px; padding: 25px; background: var(--paper); }
.case-card__signal { display: flex; align-items: center; gap: 13px; margin: -25px -25px 25px; padding: 19px 25px; background: #ecdfd0; border-radius: 4px 4px 0 0; color: #914e36; }
.case-card:nth-child(2) .case-card__signal { color: #446263; background: #e0e7df; }
.case-card:nth-child(3) .case-card__signal { color: #846232; background: #eee5cc; }
.case-card__signal span { font: 700 28px/1 var(--mono); width: 32px; }
.case-card__signal b { font: 600 var(--text-small)/1.5 var(--mono); letter-spacing: .07em; }
.case-card .case-card__date { font: var(--text-small)/1.6 var(--mono); color: var(--ink-faint); }
.case-card h3 { font-size: 1.35rem; line-height: 1.35; margin: 0 0 17px; }
.case-card > p { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); }
.case-card .case-card__lesson { margin-top: auto; padding-top: 10px; font-size: 1rem; color: var(--ink); font-weight: 600; }
.case-card .case-card__sources { display: flex; gap: 8px 15px; flex-wrap: wrap; padding-top: 13px; margin: 0; border-top: 1px solid var(--rule); font: var(--text-small)/1.7 var(--mono); }
.case-card__sources a { text-underline-offset: 3px; }
.pricing-warning { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; padding: 35px; margin-top: 24px; color: #f2ecd9; background: #30493a; border-radius: 5px; }
.pricing-warning .eyebrow { color: #e7bc86; margin-bottom: 16px; }
.pricing-warning h3 { font-size: clamp(1.5rem,2.2vw,2rem); line-height: 1.35; margin: 0; }
.pricing-warning p:not(.eyebrow) { font-size: 1rem; line-height: 1.8; color: #d6dfcb; }
.pricing-warning p:last-child { margin-bottom: 0; }
.pricing-warning strong { color: #f2ecd9; }
.case-footnote { color: var(--ink-faint); font: var(--text-small)/1.8 var(--mono); margin-top: 17px; }
@media (max-width: 760px) {
  .case-grid, .pricing-warning { grid-template-columns: minmax(0,1fr); }
  .pricing-warning { padding: 26px; gap: 21px; }
  .case-card h3 br { display: none; }
}
.pattern-step { padding: 30px; position: relative; }
.pattern-step + .pattern-step { border-left: 1px solid var(--rule); }
.pattern-step__top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.pattern-step__top > span { font: var(--text-small) var(--mono); color: var(--ink-faint); }
.pixel-icon { width: 56px; height: 56px; color: var(--green); }
.pattern-step h3 { font-size: 1.28rem; margin-bottom: 12px; }
.pattern-step p { font-size: 1rem; color: var(--ink-soft); line-height: 1.8; margin-bottom: 20px; }
.pattern-step a { font: var(--text-small) var(--mono); color: var(--accent); text-decoration: none; }
.pattern-step a:hover { text-decoration: underline; }
.pattern-note { margin: 20px 0 0; font: var(--text-small)/1.8 var(--mono); color: var(--ink-faint); }
.field-manual { background: var(--green-wash); border-block: 1px solid var(--rule); }
.manual-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; }
.manual-grid + .quickstart { margin-top: 28px; }
.manual-card { display: flex; flex-direction: column; text-decoration: none; padding: 27px; background: var(--paper); border: 1px solid var(--rule); border-radius: 5px; min-height: 245px; transition: transform 200ms, box-shadow 200ms; }
.manual-card:hover { transform: translateY(-4px); box-shadow: 0 5px 0 var(--rule); }
.manual-card__tag { display: flex; justify-content: space-between; align-items: center; color: var(--ink-faint); font: var(--text-small) var(--mono); margin-bottom: 27px; letter-spacing: .09em; }
.manual-card h3 { font-size: 1.4rem; }
.manual-card p { font-size: 1rem; color: var(--ink-soft); line-height: 1.7; }
.manual-card__bottom { margin-top: auto; font: var(--text-small) var(--mono); color: var(--accent); }
.manual-card--featured { background: #30493a; color: #f8f2df; border-color: #30493a; }
.manual-card--featured p, .manual-card--featured .manual-card__tag { color: #d4dfc8; }
.manual-card--featured .manual-card__bottom { color: #f3c68b; }
.level-guide { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-top: 28px; }
.level-guide > p { font: var(--text-small) var(--mono); color: var(--green); margin: 0; }
.level-guide__stages { display: flex; gap: 23px; flex-wrap: wrap; }
.level-guide a { font: var(--text-small) var(--mono); text-decoration: none; }
.level-guide a:hover { text-decoration: underline; }
.level-guide a span { color: var(--ink-faint); font-size: var(--text-small); margin-right: 6px; }
.level-guide i { display: inline-block; width: 7px; height: 7px; background: #74776b; margin-right: 7px; border-radius: 50%; }
.level-guide a:nth-child(2) i { background: #ba7043; }
.level-guide a:nth-child(3) i { background: #698058; }
.level-guide a:nth-child(4) i { background: #3e624b; box-shadow: 0 0 0 3px #3e624b18; }
.risks-accordions { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.risk-entry { border-top: 1px solid var(--rule); }
.risk-entry:last-child, .risk-entry:nth-last-child(2) { border-bottom: 1px solid var(--rule); }
.risk-entry summary { display: grid; grid-template-columns: 25px 1fr 15px; align-items: center; gap: 12px; padding: 22px 0; cursor: pointer; list-style: none; }
.risk-entry summary::-webkit-details-marker { display: none; }
.risk-entry summary > span:first-child { color: var(--accent); font: var(--text-small) var(--mono); }
.risk-entry summary h3 { font-size: 1rem; margin: 0; }
.risk-entry summary::after { content: '+'; font: 20px var(--mono); color: var(--ink-faint); }
.risk-entry[open] summary::after { content: '−'; }
.risk-entry > p { font-size: 1rem; color: var(--ink-soft); padding-left: 37px; }
.risk-entry .risk__src { font-size: var(--text-small); }
.evidence-note { background: var(--paper-sunk); border-left: 3px solid var(--accent); padding: 20px 24px; margin-top: 30px; }
.evidence-note > summary { font-size: 1rem; cursor: pointer; font-weight: 600; }
.evidence-note .esrb__in { padding-top: 23px; max-width: 900px; }
.evidence-note .esrb__quote p { font-size: 1.05rem; line-height: 1.7; }
.evidence-note .esrb__quote strong { color: var(--accent); }
.evidence-note .esrb__quote .mark { opacity: 1; }
.evidence-note .esrb__cite, .evidence-note .esrb__note { color: var(--ink-soft); opacity: 1; font-size: 1rem; }
/* Keep the explanations aligned with the full-width continuity table above. */
.continuity-notes { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.continuity-notes__context { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem 3rem; }
.continuity-notes p { max-width: none; }
.continuity-notes__context > p { margin: 0; min-width: 0; }
.continuity-notes .evidence-note, .continuity-notes .case-footnote { margin: 0; }
.continuity-notes .esrb__in { max-width: none; }
@media (min-width: 960px) {
  .continuity-notes__context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.final-mission { padding: 0 0 80px; }
.mission-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 46px 50px; border: 1px solid var(--rule); border-radius: 7px; background: var(--paper-sunk); }
.mission-panel .eyebrow { color: var(--accent); margin-bottom: 15px; }
.mission-panel h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.mission-panel p:not(.eyebrow) { color: var(--ink-soft); font-size: 1rem; max-width: 570px; margin: 0; }
.mission-panel .btn { white-space: nowrap; }
.mission-panel .mission-steps { margin: 18px 0 0; padding-left: 1.3em; max-width: 570px; color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }
.mission-panel .mission-steps li { margin-top: 8px; }
.signal-path { fill: none; stroke: #b4aedb; stroke-width: 3; stroke-dasharray: 5 7; animation: flow 1.4s linear infinite; }
.fallback-path { fill: none; stroke: #efc17b; stroke-width: 4; stroke-dasharray: 5 6; opacity: .25; }
.window-light { fill: #f8d191; filter: drop-shadow(0 0 5px #ffb45a77); }
.lamp-light { filter: drop-shadow(0 0 7px #ffd179); }
.antenna-light { animation: signal 3s ease-in-out infinite; }
.star { animation: twinkle 5s ease-in-out infinite alternate; }
.star:nth-child(3n) { animation-delay: -2s; }
.star:nth-child(4n) { animation-delay: -3.4s; }
.smoke { animation: drift 4.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.smoke--second { animation-delay: -2.2s; }
.worker { animation: worker-bob 2.4s steps(2,end) infinite; }
.firefly { animation: firefly 6s ease-in-out infinite alternate; }
.ai-tower { transition: opacity 500ms; }
[data-power="out"] .ai-tower { opacity: .3; }
[data-power="out"] .signal-path { opacity: .18; stroke: #849590; animation: none; }
[data-power="out"] .fallback-path { opacity: 1; }
[data-power="out"] .generator-light { fill: #ffdb91; filter: drop-shadow(0 0 7px #ffc77d); }
[data-power="out"] .world-stat:first-child b { color: #f3b58c; }
[data-power="out"] .antenna-light { opacity: .3; }
.world-art .signal-path, .world-art .fallback-path { transition: opacity 450ms; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes signal { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes twinkle { from { opacity: .25; } to { opacity: .9; } }
@keyframes drift { 0% { transform: translate(0,0); opacity: 0; } 25% { opacity: .5; } 100% { transform: translate(8px,-24px); opacity: 0; } }
@keyframes worker-bob { 50% { transform: translateY(-2px); } }
@keyframes firefly { from { transform: translate(-3px,5px); opacity: .1; } to { transform: translate(9px,-6px); opacity: .9; } }
[data-motion="paused"] *, [data-motion="paused"] *::before, [data-motion="paused"] *::after { animation-play-state: paused !important; }
[data-power="out"] .world-art *, html:not(.js) .world-art * { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .world-art * { animation: none !important; }
  .world { transform: none; }
  .manual-card:hover, .btn:hover, .unplug:hover { transform: none; }
  .motion-toggle { display: none; }
}
@media (min-width: 1600px) { .landing-hero { padding-block: 70px 45px; } }
@media (max-width: 1100px) {
  .hero-grid { gap: 2.4rem; grid-template-columns: 1fr 1.05fr; }
  .landing-hero h1 { font-size: 5.8vw; }
  .hero-actions .btn { padding: .75rem 1rem; }
  .manual-card, .pattern-step { padding: 23px; }
  .headline-spark { width: 24px; height: 30px; }
  .level-guide { align-items: flex-start; }
  .level-guide__stages { gap: 16px; }
}
@media (max-width: 760px) {
  .landing-hero { padding-block: 30px; }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .hero-copy { padding-block: 0; }
  .hero-kicker { margin-bottom: 21px; }
  .landing-hero h1 { font-size: clamp(2.6rem, 12vw, 5.4rem); line-height: 1.08; margin-bottom: 22px; }
  .headline-spark { width: 26px; height: 33px; }
  .hero-intro { max-width: 500px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { min-height: 47px; }
  .hero-smallprint { margin-top: 16px; }
  .world { transform: none; box-shadow: 4px 5px 0 var(--rule); }
  .world-top { padding: 13px 15px; font-size: var(--text-small); }
  .world-note { top: 13px; left: 14px; font-size: var(--text-small); }
  .world-controls { padding: 15px; }
  .world-stat span { font-size: var(--text-small); }
  .world-stat b { font-size: var(--text-small); }
  .unplug { padding-inline: 12px; font-size: var(--text-small); min-height: 45px; }
  .scene-caption { margin-top: 13px; font-size: var(--text-small); }
  .hero-bottom { margin-top: 30px; align-items: start; flex-direction: column; }
  .hero-bottom > span { max-width: 36rem; }
  .home-section { padding-block: 48px; }
  .section-top { display: block; margin-bottom: 28px; }
  .section-top h2 { font-size: 2.1rem; }
  .section-top > p { margin-top: 20px; max-width: 500px; font-size: 1rem; }
  .pattern-grid, .manual-grid { grid-template-columns: minmax(0,1fr); }
  .pattern-step { padding: 27px; }
  .pattern-step + .pattern-step { border-left: none; border-top: 1px solid var(--rule); }
  .pattern-step__top { margin-bottom: 16px; }
  .pattern-step p { max-width: 480px; }
  .manual-card { min-height: 225px; padding: 25px; }
  .manual-card__tag { margin-bottom: 22px; }
  .level-guide { display: block; margin-top: 24px; }
  .level-guide__stages { display: grid; grid-template-columns: 1fr 1fr; margin-top: 20px; gap: 20px 10px; }
  .risks-accordions { grid-template-columns: minmax(0,1fr); }
  .risk-entry:nth-last-child(2) { border-bottom: 0; }
  .risk-entry summary { padding-block: 20px; }
  .risk-entry summary h3 { font-size: .92rem; }
  .evidence-note { padding: 20px; }
  .evidence-note > summary { font-size: 1rem; }
  .mission-panel { grid-template-columns: minmax(0,1fr); padding: 27px; gap: 24px; }
  .mission-panel .btn { justify-self: start; }
  .final-mission { padding-bottom: 45px; }
}
@media (max-width: 360px) {
  .hero-actions { display: grid; }
  .hero-actions .btn { justify-content: center; }
  .world-stats { gap: 7px; }
  .world-stat b { font-size: var(--text-small); }
  .world-action-row { flex-wrap: wrap; }
  .world-prompt { max-width: none; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .hero-copy { max-width: 620px; }
  .landing-hero h1 { font-size: 4.5rem; }
  .hero-intro { max-width: 500px; }
  .world-column { width: 100%; max-width: 660px; margin-inline: auto; }
}
@media print {
  .world-column, .hero-bottom, .hero-actions { display: none; }
  .hero-grid, .pattern-grid, .manual-grid, .risks-accordions { display: block; }
  .landing-hero h1 { font-size: 36pt; }
  .home-section { padding-block: 25px; }
  .manual-card, .pattern-step { break-inside: avoid; }
}

/* "What KLOD is not", three cards under the five principles on the home page. */
.principles__list { max-width: 52rem; }
.home #principles .principles__list h3 { font-size: clamp(1.2rem, 1rem + .4vw, 1.4rem); line-height: 1.35; margin-bottom: .5rem; }
.principle-example { max-width: 52rem; margin-top: 2rem; }
.principle-example p:not(.callout__label) { font-size: var(--text-body); line-height: 1.75; }
.home .principles__more { max-width: 52rem; font-size: 1rem; line-height: 1.75; }
@media (max-width: 480px) { .home #principles .principles__list li { grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0 .75rem; } }
