/* Approved Graphite direction: neutral learning surfaces, vivid cube colours. */
:root{
  --panel:#181a1d;
  --graphite-tile:#23262a;
  --graphite-raised:#2b2e32;
  --graphite-text:#f2f3f1;
  --graphite-muted:#a5aaa8;
  --graphite-line:#ffffff16;
  --muted:var(--graphite-muted);
  --line:var(--graphite-line);
}
/* The page background and the marketing hero retain the Turnform atmosphere. */
.eyebrow,.pane-top,.lesson-kicker,.lesson-footer,.cube-caption,.pll-legend,
.clue-summary,.learn-context,.learning-block summary span,
.learning-block summary small,.learning-block summary::after,
.guide,.guide summary,.empty-guide,.no-results,.typing-feedback{
  color:var(--graphite-muted);
}
.btn.primary,.btn.lime{
  background:linear-gradient(135deg,#f1f3f0,#dce1dd);
  border-color:#e3e8e3;
  color:#18201b;
  box-shadow:none;
}
.btn:hover{border-color:#929d96}
.text-btn,.guide-links a,.reading-guide a,.app-help a,
.resume-link,.learn-context a,.formula-choices summary,
.site-footer a,.topnav .app-nav{color:#ccd6cf}
.text-btn:hover,.guide-links a:hover,.reading-guide a:hover,
.site-footer a:hover,.learn-context a:hover{color:#86ddb0}
/* A single quiet lesson surface replaces the green outline and nested fills. */
.solve-section,.solve-section.current,.focused-lesson,.finder-question,
.learning-block,.workspace,.lesson-pane,.block-body,.move-keypad,
.result-check,.situation-help,.matched-case,.match-plan{
  background:var(--panel);
  color:var(--graphite-text);
  border-color:var(--graphite-line);
  box-shadow:none;
}
.solve-section,.focused-lesson{border-radius:20px;padding:28px;margin-bottom:20px}
.flow-title h2{font-size:24px;letter-spacing:-.7px}
.flow-hint,.lesson-desc,.tip,.reading-guide p,.reading-guide li,
.finder-question p,.match-plan p{color:var(--graphite-muted)}
.flow-hint{margin-top:10px}
.starting-hold,.focused-lesson .starting-hold{
  background:transparent;
  color:var(--graphite-muted);
  border:0;
  border-radius:0;
  padding:0;
  margin:18px 0 26px;
  line-height:1.7;
}
.starting-hold strong{color:#d1d6d2;font-weight:500}
.choose-heading{margin:24px 0 14px}
.choose-heading h3{font-size:15px;font-weight:550}
.choose-heading span{color:var(--graphite-muted)}
/* Cards no longer flash white against the dark canvas. */
.case-diagram,.block-cases .case-diagram,.recognition-grid .case-diagram{
  background:var(--graphite-tile);
  color:var(--graphite-text);
  border:1px solid #ffffff09;
  border-radius:16px;
  padding:16px 12px;
  box-shadow:none;
}
.case-diagram:hover,.block-cases .case-diagram:hover,
.recognition-grid .case-diagram:hover{
  background:#292d31;
  border-color:#89928b;
  box-shadow:none;
}
.case-diagram.active,.case-diagram[aria-pressed=true]{
  background:#292d31;border-color:#a9b3ad88;
}
.case-diagram small,.block-cases .case-diagram small,
.recognition-grid .case-diagram small{color:var(--graphite-muted)}
.case-diagram span,.case-diagram strong{font-weight:550}
.case-diagram svg{max-width:190px}
.focused-lesson .case-diagrams:has(>button:nth-child(2)):not(:has(>button:nth-child(4))){
  max-width:680px;gap:14px;
}
/* Masked stickers and diagram annotations need to read on charcoal too. */
:is(.case-diagram,.cube-stage,.result-diagram,.visual-filters,.move-comparison) svg [fill="#cdd2da"]{fill:#626973}
:is(.case-diagram,.cube-stage,.result-diagram,.visual-filters,.move-comparison) svg text[fill="#536173"]{fill:#a5aaa8}
:is(.case-diagram,.cube-stage,.result-diagram) svg [stroke="#111827"],
:is(.case-diagram,.cube-stage,.result-diagram) svg [stroke="#17202d"]{stroke:#d0d5d2}
:is(.case-diagram,.cube-stage,.result-diagram) svg [fill="#111827"],
:is(.case-diagram,.cube-stage,.result-diagram) svg [fill="#17202d"]{fill:#d0d5d2}
/* Completion becomes a light divider and an ordinary action, not a green box. */
.step-check{
  background:transparent;
  border:0;
  border-top:1px solid var(--graphite-line);
  border-radius:0;
  padding:24px 0 0;
  margin-top:28px;
  gap:8px 30px;
}
.step-check h3{font-size:14px;font-weight:550}
.step-check p{color:var(--graphite-muted);font-size:13px;max-width:560px}
.step-check small{color:var(--graphite-muted)}
.step-check .btn.lime{
  background:transparent;color:var(--graphite-text);
  border-color:#69756d;font-size:12px;box-shadow:none;
}
.step-check .btn.lime:hover{background:#ffffff08;border-color:#abb8af}
.solve-route button,.look-route button,.segmented,.segmented button,
.finder-tabs button,.pll-view-controls button,.lookup-navigation a,
.visual-filters button,.cube-view-buttons button{
  background:#1b1e21;color:#b5bbb7;border-color:var(--graphite-line);
}
.solve-route button[aria-current=step],.look-route button[aria-current=step],
.segmented [aria-pressed=true],.finder-tabs [aria-pressed=true],
.pll-view-controls [aria-pressed=true],.lookup-navigation a[aria-current=page],
.formula-choices .btn[aria-pressed=true],.visual-filters button.active,
.cube-view-buttons .selected{
  background:#dce3dd;color:#18211b;border-color:#dce3dd;
}
.solve-route button span,.look-route button span{background:#ffffff12;color:inherit}
.solve-route button[aria-current=step] span,.look-route button[aria-current=step] span{background:#17211a12;color:inherit}
.pill{background:#ffffff07;color:#bec5bf;border-color:var(--graphite-line)}
.method-picker select,.filters input,.filters select,select{
  background:#222529;color:var(--graphite-text);border-color:#616762;
}
.cube-pane{
  background:radial-gradient(ellipse at 50% 35%,#303338,#202326 78%);
  border-color:var(--graphite-line);
}
.hold{background:#ffffff04;color:#c8ceca;border:1px solid var(--graphite-line);border-radius:12px}
.hold strong{color:#a5aaa8;font-weight:500}
.turn{background:#292d31;color:var(--graphite-text)}
.turn.current{background:#dce3dd;color:#18211b}
.turn.done,.turn.answer-correct{background:#20372b;color:#99e4ba}
.turn.answer-wrong,.typing-row .answer-wrong{background:#4b252d;color:#ffc5ce}
.typing-row .answer-box{background:#202326;border-color:#91b09c;color:var(--graphite-text)}
.move-keypad button{background:#292c30;border-color:#ffffff0c;color:var(--graphite-text)}
.move-keypad button:active{background:#414a44}
.formula-choices{border-color:var(--graphite-line)}
.finder-note{background:#1e2125;color:var(--graphite-muted)}
.row-choices button{background:#222529;border-color:#ffffff0b}
.row-choices small{color:var(--graphite-muted)}
.row-choices .captured{background:#293a30;border-color:#77bb93}
.side-progress span{background:#25292c;color:#adb5af}
.side-progress .current{border-color:#a5b1a8;color:#edf0ed}
.side-progress .complete{background:#2c3931;color:#9bdbb5}
/* Learning-path cards retain their small colour identifiers, without a colour wash. */
.path-card{background:linear-gradient(145deg,#212427,#171a1d);border-color:var(--graphite-line)}
.path-symbol{background:#25292c;box-shadow:none;border-color:#ffffff1c}
.resume-card{background:#202627;border-color:#ffffff20}
.resume-card span{color:var(--graphite-muted)}
.path-card>span:last-child,.tool-card p{color:var(--graphite-muted)}
.tool-card{background:linear-gradient(145deg,#202326,#14181a);border-color:var(--graphite-line)}
.tool-card strong{color:#c5d2c9}
.tool-card:hover,.path-card:hover{border-color:#88948c}
.learning-block summary::after{color:var(--graphite-muted)}
.block-body{background:transparent}
/* Marketing keeps the atmosphere; information and signup surfaces stay neutral. */
.app-promo{background:linear-gradient(135deg,#242a28,#151a18);border-color:#ffffff18}
.story-card{background:linear-gradient(150deg,#23272a,#15191a);border-color:var(--graphite-line)}
.floating-note{background:#222a26ec;border-color:#ffffff25}
.promo-moves span{background:#ffffff07;border-color:#ffffff20}
.promo-moves span:last-child{background:#273b2f;border-color:#648c74;color:#a8dfbd}
#launch-dialog,dialog{background:#181b1e;border-color:#ffffff24;color:var(--graphite-text)}
.modal-head,dialog .modal-head,.modal-bottom{background:#1c1f22;border-color:var(--graphite-line)}
.modal-head button,.modal-bottom{color:var(--graphite-muted)}
#launch-dialog p,#launch-dialog small{color:#adb4af}
#launch-dialog input[type=email]{background:#22262a;color:var(--graphite-text);border-color:#7c867e}
.launch-close{background:#252a2d;color:#dbe4dd;border-color:#ffffff25}
.launch-feedback{color:#a8dfbd}
.symbol-legend{background:#252c28;color:#c9d9ce}
/* Native button/focus/validation semantics remain unchanged. */
@media(max-width:700px){
  .solve-section,.focused-lesson{padding:20px 16px;border-radius:18px}
  .flow-title h2{font-size:21px}
  .starting-hold,.focused-lesson .starting-hold{margin:15px 0 22px;padding:0}
  .focused-lesson .case-diagrams:has(>button:nth-child(2)):not(:has(>button:nth-child(4))){gap:8px}
  .case-diagram,.block-cases .case-diagram,.recognition-grid .case-diagram{padding:12px 7px;border-radius:12px}
  .case-diagram span,.case-diagram strong{font-size:12px}
  .case-diagram small{font-size:11px}
  .choose-heading{margin:20px 0 12px}
  .step-check{padding:22px 0 0;margin-top:24px}
  .step-check .btn.lime{margin-top:16px;min-height:44px}
}
/* Older mobile and utility components share the same neutral surfaces. */
.controls{background:var(--panel);border-color:var(--graphite-line)}
.controls .btn:not(.primary){background:#25292d;color:var(--graphite-text);border-color:var(--graphite-line)}
.quick-card,.algorithm-card,.pattern-option,.pair-intro>div,
.step-menu summary,.step-menu nav,.flash-top select,.method-mobile select{
  background:var(--graphite-tile);color:var(--graphite-text);border-color:var(--graphite-line);
}
.segmented button.active,.cube-view-buttons button.selected,
.segmented[aria-label="Learning block set"] [aria-pressed=true]{
  background:#dce3dd;color:#18211b;border-color:#dce3dd;box-shadow:none;
}
.pair-phases button.active{background:#343c37;color:#f1f3f0;border-color:#68746b}
/* TB-0100: explicit CTA layout, including wrapped phone-sized buttons. */
.promo-actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:24px}
.promo-actions .btn{margin:0;min-height:48px;white-space:normal;text-align:center}
/* TB-0101: colour lives in the light falling across the card, not its base. */
.path-card{
  background:
    radial-gradient(ellipse at 0% 0%,color-mix(in srgb,var(--path-color) 15%,transparent),transparent 65%),
    linear-gradient(135deg,#282d31,#191d21 75%);
  border-color:#ffffff19;
  box-shadow:inset 0 1px 0 #ffffff09,0 12px 36px #0000000e;
}
.path-card:hover{border-color:color-mix(in srgb,var(--path-color) 42%,#ffffff25)}
.path-symbol{
  background:linear-gradient(140deg,color-mix(in srgb,var(--path-color) 13%,transparent),#ffffff03);
  border-color:color-mix(in srgb,var(--path-color) 25%,#ffffff15);
  box-shadow:0 0 24px color-mix(in srgb,var(--path-color) 9%,transparent),inset 0 1px 0 #ffffff0b;
}
.resume-card{
  background:radial-gradient(ellipse at 0 0,#3a7a571c,transparent 70%),linear-gradient(120deg,#262d2d,#1c2224);
  box-shadow:inset 0 1px 0 #ffffff09;
}
/* TB-0102: numbered steps with readable ink, rather than pale unlabelled dots. */
.cross-start{gap:26px;margin:26px 0}
.cross-start li{padding-left:44px;min-width:0}
.cross-start li::before{
  content:counter(cross,decimal-leading-zero);
  width:30px;height:30px;line-height:28px;
  border-radius:8px;background:#343d3c;border:1px solid #81988b55;
  color:#e3f1e9;font-size:12px;font-weight:700;
  font-variant-numeric:tabular-nums;text-align:center;
  box-shadow:inset 0 1px 0 #ffffff0a;
}
.cross-start strong{display:block;font-size:16px;line-height:1.4;color:#edf1ed}
/* TB-0103: comfortable instructional typography and deliberate contrast. */
.cross-start p,.situation-help p,.guide p,.empty-guide,
.lesson-desc,.hold,.flow-hint,.starting-hold,.focused-lesson .starting-hold,
.step-check p,.finder-question p,.match-plan p{
  font-size:16px;line-height:1.7;color:#bdc5c1;
}
.cross-start p{margin-top:8px}
.situation-help p,.guide p{max-width:68ch;margin-top:10px}
.situation-help details{padding:16px 0;font-size:16px}
.situation-help summary,.guide summary{font-size:16px;color:#e1e7e2;line-height:1.5}
.starting-hold strong,.hold strong{font-size:13px;color:#d1ddd5}
.step-check h3{font-size:16px}
.step-check small,.lesson-footer,.match-plan small{font-size:14px;color:#aebbb3;line-height:1.6}
.case-diagram span,.case-diagram strong{font-size:14px;line-height:1.45}
.case-diagram small,.cube-caption{font-size:13px;line-height:1.6;color:#aeb8b2}
.lesson-kicker,.pane-top{font-size:12px;line-height:1.6;color:#aeb8b2}
.controls .btn,.step-check .btn.lime{font-size:14px}
/* TB-0104: a lit studio backdrop, with a quiet neutral reading surface. */
.cube-pane{
  background:
    radial-gradient(ellipse at 8% 8%,#446d922e,transparent 65%),
    radial-gradient(ellipse at 95% 90%,#8048531c,transparent 57%),
    radial-gradient(ellipse at 38% 85%,#34715c1c,transparent 55%),
    linear-gradient(145deg,#30363b,#20262b 70%);
  box-shadow:inset 0 1px 0 #ffffff08;
}
.workspace{border-color:#ffffff1b;box-shadow:0 15px 50px #00000012}
.lesson-pane{
  background:radial-gradient(ellipse at 100% 0,#c9dfd606,transparent 60%),#1b1f22;
}
dialog{background:linear-gradient(140deg,#252a2e,#191e21 75%);box-shadow:0 35px 110px #0009,inset 0 1px 0 #ffffff10}
.modal-head,dialog .modal-head{background:linear-gradient(110deg,#272e32,#202629)}
.controls{background:#1b1f22}
.turn{background:linear-gradient(145deg,#363d42,#2a3035);border:1px solid #ffffff0a;box-shadow:inset 0 1px 0 #ffffff08}
.turn.done,.turn.answer-correct{background:#20372b}
.turn.current{background:#dce3dd}
@media(max-width:700px){
  .promo-actions{gap:12px;align-items:stretch;margin-top:22px}
  .promo-actions .btn{flex:1 1 190px}
  .cross-start{gap:22px}
  .cross-start li{padding-left:44px}
  .cross-start p,.situation-help p,.guide p,.lesson-desc,.hold,.flow-hint,
  .starting-hold,.focused-lesson .starting-hold,.step-check p,.finder-question p{font-size:16px}
  .case-diagram span,.case-diagram strong{font-size:13px}
  .controls{flex-wrap:wrap;gap:8px}
  .controls .btn{font-size:13px}
  .controls .btn.primary{flex:1 1 125px}
  .controls .btn:not(.primary):not(.icon){flex:1 1 110px}
}
.app-promo>div>.btn{margin:16px 12px 0 0}
@media(max-width:700px){
  .controls{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr) 44px;gap:8px}
  .controls .btn{min-width:0;min-height:48px;white-space:normal;padding:8px 6px;gap:4px}
  .typing-player .controls{display:flex;flex-wrap:wrap}
}
