/* TOKENS-BEGIN — generated, do not hand-edit individual entries.
 *
 * One token per colour that differs between the two themes.  The names are
 * deliberately dumb (--t001, --t002...) because they are machine-assigned: a
 * name like --card-border would be a lie the moment the same literal turned up
 * somewhere else.  Read them as a two-column table -- day above, night below.
 *
 * Anything NOT here -- black, white, true greys -- is identical in both themes
 * and stayed a plain literal, which keeps this list to what actually changes.
 */
:root {
  --t001: #020a12;
  --t002: #050b14;
  --t003: #0a0e12;
  --t004: #04101d;
  --t005: #07101b;
  --t006: #07120a;
  --t007: #04101d;
  --t008: #081524;
  --t009: #081827;
  --t010: #0b1829;
  --t011: #0c1d30;
  --t012: #06210a;
  --t013: #06210a;
  --t014: #14532d;
  --t015: #62768c;
  --t016: #657a93;
  --t017: #6f8398;
  --t018: #62768c;
  --t019: #73869d;
  --t020: #7890aa;
  --t021: #7f93a8;
  --t022: #50f27d;
  --t023: #8fa5bd;
  --t024: #8fa3b8;
  --t025: #91a3b8;
  --t026: #59e3ff;
  --t027: #16a34a;
  --t028: #9eb0c4;
  --t029: #14a84f;
  --t030: #18aa53;
  --t031: #aebdd0;
  --t032: #b6c2d2;
  --t033: #b9c9d9;
  --t034: #9cd8ff;
  --t035: #9cff00;
  --t036: #22c55e;
  --t037: #16a34a;
  --t038: #cbd5e1;
  --t039: #c9d7e6;
  --t040: #3bd677;
  --t041: #d6e4f2;
  --t042: #5fd71d;
  --t043: #55d927;
  --t044: #dbe8f6;
  --t045: #dbeafe;
  --t046: #e2f0ff;
  --t047: #22c55e;
  --t048: #4ade80;
  --t049: #54f27a;
  --t050: #86efac;
  --t051: #f4f8ff;
  --t052: #9cff00;
  --t053: #86ff2f;
  --t054: #b7ff54;
  --t055: #c6ff7a;
  --t056: #efffd9;
  --t057: #bbf7d0;
  --t058: #fb7185;
  --t059: #fda4af;
  --t060: #07120a;
  --t061: rgba(4,10,17,0.90);
  --t062: rgba(2,12,22,.42);
  --t063: rgba(2,12,22,.48);
  --t064: rgba(3,12,21,.5);
  --t065: rgba(2,12,22,.58);
  --t066: rgba(3,12,21,.96);
  --t067: rgba(20,83,45,.07);
  --t068: rgba(3,13,23,.42);
  --t069: rgba(3,13,23,.5);
  --t070: rgba(3,13,23,.66);
  --t071: rgba(122,153,185,0.17);
  --t072: rgba(80,242,125,.14);
  --t073: rgba(5,16,27,.98);
  --t074: rgba(148,163,184,.07);
  --t075: rgba(148,163,184,.1);
  --t076: rgba(148,163,184,.16);
  --t077: rgba(148,163,184,.25);
  --t078: rgba(148,163,184,.35);
  --t079: rgba(148,163,184,.4);
  --t080: rgba(148,163,184,.5);
  --t081: rgba(148,163,184,0.05);
  --t082: rgba(148,163,184,0.08);
  --t083: rgba(148,163,184,0.09);
  --t084: rgba(148,163,184,0.1);
  --t085: rgba(148,163,184,0.10);
  --t086: rgba(148,163,184,0.11);
  --t087: rgba(148,163,184,0.12);
  --t088: rgba(148,163,184,0.13);
  --t089: rgba(148,163,184,0.15);
  --t090: rgba(148,163,184,0.16);
  --t091: rgba(148,163,184,0.18);
  --t092: rgba(148,163,184,0.28);
  --t093: rgba(148,163,184,0.30);
  --t094: rgba(148,163,184,0.32);
  --t095: rgba(148,163,184,0.35);
  --t096: rgba(148,163,184,0.55);
  --t097: rgba(8,16,27,0.98);
  --t098: rgba(136,171,205,.24);
  --t099: rgba(89,227,255,.4);
  --t100: rgba(89,227,255,0.38);
  --t101: rgba(22,163,74,0.92);
  --t102: rgba(23,166,78,.95);
  --t103: rgba(6,18,30,.99);
  --t104: rgba(7,17,31,.64);
  --t105: rgba(7,17,31,.7);
  --t106: rgba(6,19,32,.9);
  --t107: rgba(6,19,32,.95);
  --t108: rgba(7,17,31,0.58);
  --t109: rgba(7,17,31,0.62);
  --t110: rgba(7,17,31,0.64);
  --t111: rgba(7,17,31,0.72);
  --t112: rgba(6,20,34,.96);
  --t113: rgba(6,20,34,.97);
  --t114: rgba(9,18,31,0.7);
  --t115: rgba(156,255,0,.16);
  --t116: rgba(156,255,0,.4);
  --t117: rgba(156,255,0,.42);
  --t118: rgba(156,255,0,.55);
  --t119: rgba(156,255,0,0.40);
  --t120: rgba(34,197,94,0.10);
  --t121: rgba(34,197,94,0.24);
  --t122: rgba(34,197,94,0.95);
  --t123: rgba(7,21,35,.72);
  --t124: rgba(8,20,34,0.6);
  --t125: rgba(8,20,34,0.85);
  --t126: rgba(8,20,34,0.86);
  --t127: rgba(8,20,34,0.9);
  --t128: rgba(203,213,225,0.92);
  --t129: rgba(8,22,37,.62);
  --t130: rgba(52,210,110,.95);
  --t131: rgba(10,19,15,0.94);
  --t132: rgba(0,230,190,0.12);
  --t133: rgba(226,240,255,0.16);
  --t134: rgba(226,240,255,0.4);
  --t135: rgba(226,240,255,0.45);
  --t136: rgba(226,240,255,0.5);
  --t137: rgba(226,240,255,0.55);
  --t138: rgba(226,240,255,0.62);
  --t139: rgba(226,240,255,0.66);
  --t140: rgba(226,240,255,0.72);
  --t141: rgba(226,240,255,0.74);
  --t142: rgba(226,240,255,0.8);
  --t143: rgba(226,240,255,0.82);
  --t144: rgba(9,24,39,.56);
  --t145: rgba(34,197,94,0.06);
  --t146: rgba(34,197,94,0.16);
  --t147: rgba(34,197,94,0.20);
  --t148: rgba(34,197,94,0.48);
  --t149: rgba(34,197,94,0.72);
  --t150: rgba(134,239,172,0.35);
  --t151: rgba(134,239,172,0.42);
  --t152: rgba(11,23,40,0.9);
  --t153: rgba(80,242,125,.17);
  --t154: rgba(80,242,125,.43);
  --t155: rgba(80,242,125,.55);
  --t156: rgba(140,255,0,.035);
  --t157: rgba(140,255,0,.06);
  --t158: rgba(140,255,0,.07);
  --t159: rgba(140,255,0,.075);
  --t160: rgba(140,255,0,.08);
  --t161: rgba(140,255,0,.09);
  --t162: rgba(140,255,0,.12);
  --t163: rgba(140,255,0,.18);
  --t164: rgba(140,255,0,.19);
  --t165: rgba(140,255,0,.22);
  --t166: rgba(108,255,0,.24);
  --t167: rgba(140,255,0,.25);
  --t168: rgba(140,255,0,.26);
  --t169: rgba(159,255,0,.28);
  --t170: rgba(140,255,0,.4);
  --t171: rgba(140,255,0,.45);
  --t172: rgba(140,255,0,.48);
  --t173: rgba(140,255,0,.5);
  --t174: rgba(156,255,0,0.05);
  --t175: rgba(156,255,0,0.06);
  --t176: rgba(156,255,0,0.07);
  --t177: rgba(156,255,0,0.10);
  --t178: rgba(156,255,0,0.13);
  --t179: rgba(108,255,0,0.14);
  --t180: rgba(156,255,0,0.15);
  --t181: rgba(156,255,0,0.18);
  --t182: rgba(156,255,0,0.20);
  --t183: rgba(156,255,0,0.22);
  --t184: rgba(156,255,0,0.28);
  --t185: rgba(156,255,0,0.30);
  --t186: rgba(156,255,0,0.45);
  --t187: rgba(156,255,0,0.5);
  --t188: rgba(156,255,0,0.50);
  --t189: rgba(156,255,0,0.55);
  --t190: rgba(156,255,0,0.58);
  --t191: rgba(156,255,0,0.6);
  --t192: rgba(156,255,0,0.78);
  --t193: rgba(116,255,41,0.24);
  --t194: rgba(105,255,53,.18);
  --t195: rgba(183,255,84,0.28);
  --t196: rgba(85,255,138,0.13);
  --t197: rgba(85,255,138,0.14);
  --t198: rgba(85,255,138,0.18);
  --t199: rgba(85,255,138,0.28);
  --t200: rgba(10,27,44,.58);
  --t201: rgba(10,27,44,.6);
  --t202: rgba(10,27,44,.66);
  --t203: rgba(10,27,44,.68);
  --t204: rgba(10,27,44,.78);
  --t205: rgba(10,27,44,.88);
  --t206: rgba(251,113,133,0.26);
  --t207: rgba(251,113,133,0.34);
  --t208: rgba(251,113,133,0.38);
  --t209: rgba(251,113,133,0.62);
  --t210: rgba(4,16,29,0.86);
  --t211: rgba(15,23,42,0.55);
  --t212: rgba(15,23,42,0.6);
  --t213: rgba(15,23,42,0.72);
  --t214: rgba(12,29,48,.62);
  --t215: rgba(16,30,50,0.68);
  --t216: rgba(12,29,48,0.86);
  --t217: rgba(15,35,56,.82);
  --t218: rgba(18,34,57,0.98);
  --t219: rgba(15,38,61,.94);
  --t220: rgba(15,38,61,.96);
  --t221: rgba(16,38,60,.99);
  --t222: rgba(18,45,70,.94);
  --t223: rgba(21,39,65,0.92);
  --t224: rgba(30,41,59,0.55);
  --t225: rgba(0,5,10,.76);
  --t226: rgba(1,5,10,0.78);
  --t227: rgba(42,72,95,0.08);
  --t228: rgba(132,166,202,.06);
  --t229: rgba(132,166,202,.30);
  --t230: rgba(132,166,202,0.14);
  --t231: rgba(132,166,202,0.44);
  --t232: rgba(2,10,18,.72);
  --t233: rgba(2,10,18,0.88);
  --t234: rgba(6,78,59,0.30);
}
:root[data-theme="night"] {
  --t001: #0b0b0d;
  --t002: #0c0b0d;
  --t003: #0d0c0e;
  --t004: #100e11;
  --t005: #100e12;
  --t006: #13060a;
  --t007: #131316;
  --t008: #151317;
  --t009: #161418;
  --t010: #18161b;
  --t011: #1a1a1d;
  --t012: #21060e;
  --t013: #241a05;
  --t014: #6f2232;
  --t015: #706a76;
  --t016: #756e7b;
  --t017: #7c7582;
  --t018: #7c7682;
  --t019: #807987;
  --t020: #888090;
  --t021: #8b8491;
  --t022: #950740;
  --t023: #9a9095;
  --t024: #9a93a0;
  --t025: #9b94a1;
  --t026: #a298ab;
  --t027: #a31640;
  --t028: #a6a0ad;
  --t029: #a81440;
  --t030: #aa1844;
  --t031: #b4aeba;
  --t032: #b8b3bd;
  --t033: #bdb7c3;
  --t034: #c1bbc7;
  --t035: #c3073f;
  --t036: #c52253;
  --t037: #c9922f;
  --t038: #c9c5cd;
  --t039: #cbc5d0;
  --t040: #d63b69;
  --t041: #d6d2da;
  --t042: #d71d55;
  --t043: #d9275c;
  --t044: #dbd7de;
  --t045: #dedbe2;
  --t046: #e2dfe5;
  --t047: #e9b44c;
  --t048: #f0b429;
  --t049: #f25483;
  --t050: #f3ce85;
  --t051: #f3eef0;
  --t052: #f50a51;
  --t053: #f73771;
  --t054: #f85b8a;
  --t055: #fa7fa4;
  --t056: #fddbe5;
  --t057: #fde68a;
  --t058: #ff4d6d;
  --t059: #ff9caf;
  --t060: #fff3f6;
  --t061: rgba(10,9,11,0.90);
  --t062: rgba(11,10,12,.42);
  --t063: rgba(11,10,12,.48);
  --t064: rgba(11,10,12,.5);
  --t065: rgba(11,10,12,.58);
  --t066: rgba(11,10,12,.96);
  --t067: rgba(111,34,50,.07);
  --t068: rgba(12,11,13,.42);
  --t069: rgba(12,11,13,.5);
  --t070: rgba(12,11,13,.66);
  --t071: rgba(144,134,155,0.17);
  --t072: rgba(149,7,64,.14);
  --t073: rgba(15,14,17,.98);
  --t074: rgba(156,150,162,.07);
  --t075: rgba(156,150,162,.1);
  --t076: rgba(156,150,162,.16);
  --t077: rgba(156,150,162,.25);
  --t078: rgba(156,150,162,.35);
  --t079: rgba(156,150,162,.4);
  --t080: rgba(156,150,162,.5);
  --t081: rgba(156,150,162,0.05);
  --t082: rgba(156,150,162,0.08);
  --t083: rgba(156,150,162,0.09);
  --t084: rgba(156,150,162,0.1);
  --t085: rgba(156,150,162,0.10);
  --t086: rgba(156,150,162,0.11);
  --t087: rgba(156,150,162,0.12);
  --t088: rgba(156,150,162,0.13);
  --t089: rgba(156,150,162,0.15);
  --t090: rgba(156,150,162,0.16);
  --t091: rgba(156,150,162,0.18);
  --t092: rgba(156,150,162,0.28);
  --t093: rgba(156,150,162,0.30);
  --t094: rgba(156,150,162,0.32);
  --t095: rgba(156,150,162,0.35);
  --t096: rgba(156,150,162,0.55);
  --t097: rgba(16,15,18,0.98);
  --t098: rgba(160,151,170,.24);
  --t099: rgba(162,152,171,.4);
  --t100: rgba(162,152,171,0.38);
  --t101: rgba(163,22,64,0.92);
  --t102: rgba(166,23,66,.95);
  --t103: rgba(17,15,19,.99);
  --t104: rgba(18,16,20,.64);
  --t105: rgba(18,16,20,.7);
  --t106: rgba(18,16,20,.9);
  --t107: rgba(18,16,20,.95);
  --t108: rgba(18,16,20,0.58);
  --t109: rgba(18,16,20,0.62);
  --t110: rgba(18,16,20,0.64);
  --t111: rgba(18,16,20,0.72);
  --t112: rgba(19,17,21,.96);
  --t113: rgba(19,17,21,.97);
  --t114: rgba(19,17,21,0.7);
  --t115: rgba(195,7,63,.16);
  --t116: rgba(195,7,63,.4);
  --t117: rgba(195,7,63,.42);
  --t118: rgba(195,7,63,.55);
  --t119: rgba(195,7,63,0.40);
  --t120: rgba(197,34,83,0.10);
  --t121: rgba(197,34,83,0.24);
  --t122: rgba(197,34,83,0.95);
  --t123: rgba(20,18,22,.72);
  --t124: rgba(20,18,22,0.6);
  --t125: rgba(20,18,22,0.85);
  --t126: rgba(20,18,22,0.86);
  --t127: rgba(20,18,22,0.9);
  --t128: rgba(201,197,205,0.92);
  --t129: rgba(21,19,23,.62);
  --t130: rgba(210,52,99,.95);
  --t131: rgba(22,7,11,0.94);
  --t132: rgba(221,9,73,0.12);
  --t133: rgba(226,223,229,0.16);
  --t134: rgba(226,223,229,0.4);
  --t135: rgba(226,223,229,0.45);
  --t136: rgba(226,223,229,0.5);
  --t137: rgba(226,223,229,0.55);
  --t138: rgba(226,223,229,0.62);
  --t139: rgba(226,223,229,0.66);
  --t140: rgba(226,223,229,0.72);
  --t141: rgba(226,223,229,0.74);
  --t142: rgba(226,223,229,0.8);
  --t143: rgba(226,223,229,0.82);
  --t144: rgba(23,20,25,.56);
  --t145: rgba(233,180,76,0.06);
  --t146: rgba(233,180,76,0.16);
  --t147: rgba(233,180,76,0.20);
  --t148: rgba(233,180,76,0.48);
  --t149: rgba(233,180,76,0.72);
  --t150: rgba(239,134,165,0.35);
  --t151: rgba(239,134,165,0.42);
  --t152: rgba(24,22,26,0.9);
  --t153: rgba(242,80,129,.17);
  --t154: rgba(242,80,129,.43);
  --t155: rgba(242,80,129,.55);
  --t156: rgba(245,10,81,.035);
  --t157: rgba(245,10,81,.06);
  --t158: rgba(245,10,81,.07);
  --t159: rgba(245,10,81,.075);
  --t160: rgba(245,10,81,.08);
  --t161: rgba(245,10,81,.09);
  --t162: rgba(245,10,81,.12);
  --t163: rgba(245,10,81,.18);
  --t164: rgba(245,10,81,.19);
  --t165: rgba(245,10,81,.22);
  --t166: rgba(245,10,81,.24);
  --t167: rgba(245,10,81,.25);
  --t168: rgba(245,10,81,.26);
  --t169: rgba(245,10,81,.28);
  --t170: rgba(245,10,81,.4);
  --t171: rgba(245,10,81,.45);
  --t172: rgba(245,10,81,.48);
  --t173: rgba(245,10,81,.5);
  --t174: rgba(245,10,81,0.05);
  --t175: rgba(245,10,81,0.06);
  --t176: rgba(245,10,81,0.07);
  --t177: rgba(245,10,81,0.10);
  --t178: rgba(245,10,81,0.13);
  --t179: rgba(245,10,81,0.14);
  --t180: rgba(245,10,81,0.15);
  --t181: rgba(245,10,81,0.18);
  --t182: rgba(245,10,81,0.20);
  --t183: rgba(245,10,81,0.22);
  --t184: rgba(245,10,81,0.28);
  --t185: rgba(245,10,81,0.30);
  --t186: rgba(245,10,81,0.45);
  --t187: rgba(245,10,81,0.5);
  --t188: rgba(245,10,81,0.50);
  --t189: rgba(245,10,81,0.55);
  --t190: rgba(245,10,81,0.58);
  --t191: rgba(245,10,81,0.6);
  --t192: rgba(245,10,81,0.78);
  --t193: rgba(246,50,109,0.24);
  --t194: rgba(247,61,117,.18);
  --t195: rgba(248,91,138,0.28);
  --t196: rgba(248,92,139,0.13);
  --t197: rgba(248,92,139,0.14);
  --t198: rgba(248,92,139,0.18);
  --t199: rgba(248,92,139,0.28);
  --t200: rgba(25,23,28,.58);
  --t201: rgba(25,23,28,.6);
  --t202: rgba(25,23,28,.66);
  --t203: rgba(25,23,28,.68);
  --t204: rgba(25,23,28,.78);
  --t205: rgba(25,23,28,.88);
  --t206: rgba(255,77,109,0.26);
  --t207: rgba(255,77,109,0.34);
  --t208: rgba(255,77,109,0.38);
  --t209: rgba(255,77,109,0.62);
  --t210: rgba(26,22,12,0.86);
  --t211: rgba(27,24,29,0.55);
  --t212: rgba(27,24,29,0.6);
  --t213: rgba(27,24,29,0.72);
  --t214: rgba(28,25,31,.62);
  --t215: rgba(31,28,34,0.68);
  --t216: rgba(31,31,35,0.86);
  --t217: rgba(33,30,37,.82);
  --t218: rgba(35,32,39,0.98);
  --t219: rgba(36,32,39,.94);
  --t220: rgba(36,32,39,.96);
  --t221: rgba(36,32,39,.99);
  --t222: rgba(41,37,45,.94);
  --t223: rgba(41,41,46,0.92);
  --t224: rgba(42,38,46,0.55);
  --t225: rgba(5,4,5,.76);
  --t226: rgba(5,5,6,0.78);
  --t227: rgba(64,58,71,0.08);
  --t228: rgba(78,78,80,.06);
  --t229: rgba(78,78,80,.30);
  --t230: rgba(78,78,80,0.14);
  --t231: rgba(78,78,80,0.44);
  --t232: rgba(9,8,10,.72);
  --t233: rgba(9,8,10,0.88);
  --t234: rgba(96,70,20,0.30);
}
/* TOKENS-END */
/* EMBER — the palette, and one decision worth explaining.
 *
 * The site used to be lime-on-navy, which is what every signals site in this
 * niche looks like; side by side with a competitor it read as a parody of
 * them.  This is charcoal and crimson instead.
 *
 * THE ONE HARD PROBLEM: crimson is now the BRAND, and red is also how a losing
 * trade has always been marked.  If both are the same red, a glance at the
 * history cannot tell a loss from a button.  So the two roles are split and
 * never share a colour:
 *
 *   --accent / --accent-2   the brand.  Buttons, active states, large slabs.
 *   --win                   gold.  A won trade, an upward direction, a plus.
 *   --loss                  a lighter pink-red, deliberately NOT the brand
 *                           crimson: brighter, pinker, and only ever used on
 *                           small status text where the brand never appears.
 *
 * Gold-versus-red also survives colour blindness, which green-versus-red -- the
 * pair this replaces -- famously does not: the two differ in lightness as well
 * as hue, so they stay apart in greyscale too.
 */
:root {
  --bg: var(--t007);
  --bg-deep: var(--t001);
  --panel: var(--t216);
  --panel-solid: var(--t011);
  --panel-soft: var(--t230);
  --line: var(--t231);
  --line-strong: var(--t119);
  --text: var(--t051);
  --muted: var(--t023);
  --ash: #4E4E50;
  --maroon: var(--t014);
  --crimson: var(--t022);
  --accent: var(--t035);
  --accent-2: var(--t022);
  --on-accent: var(--t060);
  --win: var(--t047);
  --loss: var(--t058);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.portal-body {
  margin: 0;
  min-height: 100vh;
  padding-top: 76px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 5%, var(--t179), transparent 29rem),
    radial-gradient(circle at 88% 3%, var(--t132), transparent 31rem),
    linear-gradient(var(--t227) 1px, transparent 1px),
    linear-gradient(90deg, var(--t227) 1px, transparent 1px),
    linear-gradient(145deg, var(--bg-deep), var(--bg));
  background-size: auto, auto, 64px 64px, 64px 64px, auto;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-nav {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto 0;
  height: 76px;
  border-bottom: 1px solid var(--t071);
  background: var(--t233);
  backdrop-filter: blur(20px);
}
.nav-shell {
  width: min(calc(100% - 40px), 1480px);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 245px minmax(520px, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 1px var(--t169), 0 10px 28px rgba(0,0,0,.35); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 18px; letter-spacing: .055em; }
.brand-copy small { margin-top: 6px; color: var(--t020); font-size: 11px; font-weight: 650; }
.nav-links { min-width: 0; display: flex; justify-content: space-evenly; align-items: center; gap: clamp(8px, 1.3vw, 24px); }
.nav-link, .nav-dropdown-toggle {
  min-height: 42px;
  padding: 0 clamp(10px, 1.1vw, 18px);
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--t031);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-link:hover, .nav-dropdown-toggle:hover, .nav-link.active, .nav-dropdown-toggle.active {
  color: var(--text);
  border-color: var(--t164);
  background: var(--t159);
  transform: translateY(-1px);
}
.nav-link.active::after, .nav-dropdown-toggle.active::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 220px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: grid;
  background: var(--t073);
  box-shadow: var(--shadow);
  transform: translate(-50%, -8px);
  opacity: 0;
  visibility: hidden;
  transition: .18s ease;
}
.nav-dropdown.open .dropdown-menu { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.dropdown-menu a { padding: 11px 12px; border-radius: 10px; color: var(--t031); font-size: 13px; font-weight: 700; }
.dropdown-menu a:hover { color: var(--text); background: var(--t160); }
.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.language-select, .profile-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--t205);
  font-weight: 800;
}
.language-select { padding: 0 9px; cursor: pointer; }

/* The theme switch.  A word, not just an icon: a lone sun/moon glyph is a
   coin-flip about which state it means, and this one changes the whole site. */
.theme-toggle {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: var(--panel-soft);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.theme-toggle:hover { border-color: var(--line-strong); }
/* THE DOT SHOWS THE THEME IT OFFERS, NOT THE ONE YOU ARE IN.
 *
 * It used to be var(--accent) -- the CURRENT palette -- so on the green site a
 * green dot sat next to the word "Night", which reads as "green means night".
 * The label already names where the button takes you; the colour now agrees
 * with it.  Both values are literals on purpose: they must NOT follow the
 * theme, because each one belongs to the other theme. */
.theme-glyph {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #C3073F;                 /* on the day site: pressing gives night */
  box-shadow: 0 0 12px rgba(195,7,63,.55);
  transition: background .3s ease, box-shadow .3s ease;
}
:root[data-theme="night"] .theme-glyph {
  background: #9cff00;                 /* on the night site: pressing gives day */
  box-shadow: 0 0 12px rgba(156,255,0,.5);
}

/* The full-screen wave.
 *
 * Where the browser can snapshot the page (View Transitions), the NEW palette
 * is clipped to a circle growing from the button and the old one simply stays
 * put underneath -- no cross-fade, so text never doubles.  Where it cannot, the
 * .theme-veil below does the same thing with a plain painted layer. */
:root.theme-switching::view-transition-old(root) { animation: none; }
:root.theme-switching::view-transition-new(root) {
  animation: theme-wave .62s cubic-bezier(.22,.61,.36,1) forwards;
  mix-blend-mode: normal;
}
@keyframes theme-wave {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to   { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 50%)); }
}

/* The fallback wave: a ring leaving the button, over a page that has ALREADY
   changed.  Driven entirely from script (Web Animations), so it carries no
   transition of its own -- a CSS transition here would race the keyframes.
   The colour is the accent, which by then is the new theme's. */
.theme-wave {
  position: fixed;
  z-index: 4000;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 22px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  :root.theme-switching::view-transition-new(root) { animation: none; }
  .theme-wave { display: none; }
}
@media (max-width: 980px) { .theme-toggle .theme-label { display: none; } .theme-toggle { padding: 0 10px; } }
.profile-button { min-width: 86px; padding: 0 16px; border-color: var(--t154); background: linear-gradient(135deg, var(--t102), var(--t130)); cursor: pointer; }
.profile-wrap { position: relative; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 235px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; display: none; background: var(--t073); box-shadow: var(--shadow); }
.profile-wrap.open .profile-menu { display: grid; gap: 6px; }
.profile-email { padding: 9px 10px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.profile-menu-link, .profile-menu button { width: 100%; padding: 11px; border: 0; border-radius: 10px; text-align: left; color: var(--t044); background: transparent; cursor: pointer; }
.profile-menu-link:hover, .profile-menu button:hover { background: var(--t160); }

.portal-main { width: min(calc(100% - 36px), 1280px); margin: 0 auto; }
.page-hero { min-height: 600px; padding: clamp(70px, 9vw, 128px) 0 80px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); align-items: center; gap: clamp(38px, 7vw, 90px); }
.hero-copy { max-width: 720px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.kicker::before { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.page-hero h1, .inner-hero h1 { margin: 0; max-width: 840px; font-size: clamp(48px, 6.2vw, 88px); line-height: .96; letter-spacing: -.055em; }
.page-hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p, .inner-hero p { max-width: 700px; margin: 26px 0 0; color: var(--muted); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.75; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.button-primary, .button-secondary { min-height: 54px; padding: 0 24px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 900; transition: transform .18s ease, filter .18s ease, border-color .18s ease; }
.button-primary { color: var(--t006); background: linear-gradient(100deg, var(--accent), var(--accent-2)); box-shadow: 0 15px 35px var(--t194); }
.button-secondary { border: 1px solid var(--line); color: var(--t044); background: var(--t214); }
.button-primary:hover, .button-secondary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.hero-proof { margin-top: 38px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.proof-item { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--t144); }
.proof-item strong { display: block; font-size: 22px; color: var(--text); }
.proof-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.visual-glow { position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--t163), transparent 66%); filter: blur(16px); }
.preview-card { position: relative; width: min(100%, 520px); padding: 26px; border: 1px solid var(--t098); border-radius: 28px; background: linear-gradient(155deg, var(--t220), var(--t113)); box-shadow: 0 38px 90px rgba(0,0,0,.42); overflow: hidden; }
.preview-card::after { content: ""; position: absolute; inset: auto -20% -45% 30%; height: 68%; background: radial-gradient(circle, var(--t166), transparent 65%); pointer-events: none; }
.preview-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 15px var(--accent-2); }
.preview-main { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--t062); }
.preview-market { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.preview-signal { margin-top: 10px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.preview-signal h3 { margin: 0; font-size: clamp(27px, 4vw, 42px); }
.preview-direction { color: var(--win); font-size: 18px; font-weight: 900; }
.preview-score { min-width: 90px; padding: 14px; border: 1px solid var(--t169); border-radius: 17px; text-align: center; background: var(--t161); }
.preview-score strong { font-size: 30px; }
.preview-metrics { margin-top: 15px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.preview-metrics div { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--t123); }
.preview-metrics span { display: block; color: var(--muted); font-size: 10px; }
.preview-metrics strong { display: block; margin-top: 6px; font-size: 13px; }

.content-section { padding: 88px 0; }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading h2 { margin: 0; font-size: clamp(34px, 4.2vw, 58px); letter-spacing: -.04em; }
.section-heading p { margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.feature-card, .content-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, var(--t217), var(--t106)); box-shadow: 0 18px 50px rgba(0,0,0,.17); }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--t006); background: linear-gradient(135deg,var(--accent),var(--accent-2)); font-size: 20px; font-weight: 900; }
.feature-card h3, .content-card h3 { margin: 22px 0 0; font-size: 21px; }
.feature-card p, .content-card p { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; counter-reset: steps; }
.step-card { position: relative; padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--t203); counter-increment: steps; }
.step-card::before { content: "0" counter(steps); display: block; color: var(--accent); font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.step-card h3 { margin: 28px 0 0; font-size: 22px; }
.step-card p { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.cta-panel { margin: 30px 0 90px; padding: clamp(32px,5vw,68px); border: 1px solid var(--t165); border-radius: 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: radial-gradient(circle at 85% 40%, var(--t153), transparent 35%), linear-gradient(145deg, var(--t222), var(--t107)); box-shadow: var(--shadow); }
.cta-panel h2 { margin: 0; font-size: clamp(30px,4vw,52px); letter-spacing: -.035em; }
.cta-panel p { max-width: 680px; margin: 13px 0 0; color: var(--muted); line-height: 1.65; }

.inner-hero { min-height: 410px; padding: 100px 0 70px; display: grid; align-content: center; }
.inner-hero h1 { font-size: clamp(48px,6vw,78px); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.value-list { display: grid; gap: 12px; }
.value-row { padding: 20px; border: 1px solid var(--line); border-radius: 16px; display: grid; grid-template-columns: 38px 1fr; gap: 15px; background: var(--t200); }
.value-row b { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--t006); background: var(--accent); }
.value-row h3 { margin: 0; }
.value-row p { margin: 7px 0 0; color: var(--muted); line-height: 1.65; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--t203); overflow: hidden; }
.faq summary { padding: 19px 22px; cursor: pointer; font-weight: 850; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--muted); line-height: 1.7; }

.tool-layout { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; align-items: start; }
.tool-card { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--t204); }
.tool-card h2 { margin: 0; font-size: 25px; }
.tool-card > p { color: var(--muted); line-height: 1.65; }
.tool-field { display: grid; gap: 7px; margin-top: 16px; }
.tool-field span { color: var(--t039); font-size: 12px; font-weight: 800; }
.tool-field input, .tool-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; color: var(--text); background: var(--t070); outline: none; }
.tool-field textarea { min-height: 130px; resize: vertical; }
.tool-field input:focus, .tool-field textarea:focus { border-color: var(--t172); }
.goal-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal-mode { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--t070); }
.goal-mode-btn { padding: 5px 11px; border: 0; border-radius: 999px; color: var(--t024); background: transparent; font-size: 11px; font-weight: 900; cursor: pointer; transition: color .15s ease, background .15s ease; }
.goal-mode-btn:hover { color: var(--text); }
.goal-mode-btn.active { color: var(--t006); background: linear-gradient(100deg,var(--accent),var(--accent-2)); }
.goal-mode-hint { color: var(--muted); font-size: 11px; font-weight: 700; }
.goal-mode-hint:empty { display: none; }
/* The X2 cover, said out loud beside the ordinary entry rather than left for
   the person to discover on their own balance. Amber, not red: it is a real
   number to plan around, not an error. */
.plan-cover { margin-top: 6px; color: var(--t048); font-size: 11px; font-weight: 800; }
.plan-cover:empty { display: none; }

/* The tools entry, when the gate has not been passed.  Dimmed and labelled
   rather than hidden: a menu item that vanishes looks like a bug, one that
   explains itself is an invitation to finish registering. */
.nav-dropdown.locked > .nav-dropdown-toggle { opacity: .62; }
.nav-dropdown.locked > .nav-dropdown-toggle::after { content: "\1F512"; margin-left: 2px; font-size: 11px; opacity: .8; }
.dropdown-menu a.locked { color: var(--t018); cursor: pointer; }
.dropdown-menu a.locked:hover { color: var(--t028); background: var(--t074); }
.dropdown-lock { margin: 6px 4px 2px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.5; }

.step-link { margin: 12px 0 0; }
.step-link a { color: var(--accent); font-weight: 800; font-size: 13px; border-bottom: 1px solid var(--t116); }
.step-link a:hover { color: var(--text); border-bottom-color: var(--text); }

.pace-picker { margin-top: 14px; }
.pace-label { display: block; color: var(--t039); font-size: 12px; font-weight: 800; }
.pace-buttons { margin-top: 8px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pace { display: grid; gap: 3px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--t070); color: var(--t031); text-align: center; cursor: pointer; transition: border-color .18s ease, color .18s ease; }
.pace:hover { border-color: var(--t171); color: var(--text); }
.pace.active { color: var(--t012); border-color: transparent; background: linear-gradient(135deg,var(--accent),var(--accent-2)); }
.pace b { font-size: 11px; font-weight: 900; line-height: 1.25; }
.pace i { font-size: 13px; font-weight: 800; font-style: normal; }
.pace.active i { color: var(--t012); }
.pace-note { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.pace-note:empty { display: none; }
.pace-note.warn { color: var(--t048); }
@media (max-width: 520px) { .pace-buttons { grid-template-columns: 1fr; } }

.tool-result { margin-top: 18px; padding: 18px; border: 1px solid var(--t167); border-radius: 15px; background: var(--t158); }
.tool-result strong { display: block; margin-top: 5px; color: var(--accent); font-size: 30px; }
.tool-button { width: 100%; min-height: 46px; margin-top: 14px; border: 0; border-radius: 13px; color: var(--t006); background: linear-gradient(100deg,var(--accent),var(--accent-2)); font-weight: 900; cursor: pointer; }
.status-pill { display: inline-flex; padding: 7px 10px; border: 1px solid var(--t166); border-radius: 999px; color: var(--accent); background: var(--t158); font-size: 11px; font-weight: 900; }

.site-footer { border-top: 1px solid var(--line); background: var(--t232); }
.footer-shell { width: min(calc(100% - 36px),1280px); min-height: 170px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.footer-shell strong { font-size: 19px; }
.footer-shell p { max-width: 520px; margin: 9px 0 0; color: var(--muted); }
.footer-shell small { grid-column: 1/-1; padding-bottom: 28px; color: var(--t015); }
.footer-links { display: flex; gap: 20px; color: var(--t028); font-size: 13px; font-weight: 700; }
.footer-links a:hover { color: var(--accent); }

.support-button { position: fixed; z-index: 850; right: 20px; bottom: 20px; min-height: 48px; padding: 0 18px; border: 1px solid var(--t155); border-radius: 15px; display: inline-flex; align-items: center; gap: 9px; color: white; background: linear-gradient(135deg,var(--t029),var(--t040)); box-shadow: 0 15px 38px rgba(0,0,0,.3); font-size: 13px; font-weight: 900; transition: transform .18s ease; }
.support-button:hover { transform: translateY(-2px); }
.support-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--t030); background: #fff; font-size: 11px; }

.modal-backdrop { position: fixed; z-index: 1500; inset: 0; padding: 20px; display: grid; place-items: center; background: var(--t225); backdrop-filter: blur(10px); }
.modal-backdrop[hidden] { display: none; }
.auth-modal { width: min(100%,430px); padding: 25px; border: 1px solid var(--line); border-radius: 24px; background: var(--t009); box-shadow: 0 35px 90px rgba(0,0,0,.52); }
.auth-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-head h2 { margin: 0; font-size: 25px; }
.modal-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.03); cursor: pointer; }
.auth-tabs { margin-top: 20px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; display: grid; grid-template-columns: 1fr 1fr; background: var(--t063); }
.auth-tab { min-height: 40px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 850; cursor: pointer; }
.auth-tab.active { color: var(--t006); background: linear-gradient(100deg,var(--accent),var(--accent-2)); }
.auth-field { display: grid; gap: 7px; margin-top: 15px; }
.auth-field span { color: var(--t041); font-size: 12px; font-weight: 800; }
.auth-field input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; color: var(--text); background: var(--t065); outline: none; }
.auth-field input:focus { border-color: var(--t173); }
.auth-submit { width: 100%; min-height: 48px; margin-top: 18px; border: 0; border-radius: 13px; color: var(--t006); background: linear-gradient(100deg,var(--accent),var(--accent-2)); font-weight: 900; cursor: pointer; }
.auth-error { min-height: 18px; margin: 11px 0 0; color: var(--loss); font-size: 12px; }
.auth-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

/* Overrides for the scanner page, whose core styles remain inline. */
body:not(.portal-body) .nav-shell { width: min(calc(100% - 40px),1480px); grid-template-columns:245px minmax(520px,1fr) auto; gap:24px; }
body:not(.portal-body) .nav-links { justify-content:space-evenly; margin-left:0; gap:clamp(8px,1.3vw,24px); }
body:not(.portal-body) .nav-link, body:not(.portal-body) .nav-dropdown-toggle { padding:0 clamp(10px,1.1vw,18px); }
body:not(.portal-body) .nav-link.active, body:not(.portal-body) .nav-dropdown-toggle.active { color:#fff; border-color:var(--t164); background:var(--t159); }
body:not(.portal-body) .site-footer { margin-top:80px; }

@media (max-width: 1050px) {
  .nav-shell, body:not(.portal-body) .nav-shell { grid-template-columns: 205px 1fr auto; gap: 10px; }
  .nav-links, body:not(.portal-body) .nav-links { justify-content: flex-end; gap: 2px; }
  .nav-link, .nav-dropdown-toggle, body:not(.portal-body) .nav-link, body:not(.portal-body) .nav-dropdown-toggle { padding: 0 9px; font-size: 12px; }
  .page-hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 850px; }
  .hero-visual { min-height: 450px; }
  .feature-grid, .steps-grid, .tool-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body.portal-body { padding-top: 68px; }
  .site-nav { height: 68px; }
  .nav-shell, body:not(.portal-body) .nav-shell { width: min(calc(100% - 16px),1480px); display:flex; gap:8px; }
  .brand-copy small { display:none; }
  .brand-copy strong { font-size:15px; }
  .logo { width:38px; height:38px; }
  .nav-links { margin-left:auto; }
  .nav-link { display:none; }
  .nav-dropdown-toggle span { display:none; }
  .nav-dropdown-toggle { width:40px; padding:0; }
  .nav-actions { gap:6px; }
  .language-select { min-height:38px; }
  .profile-button { min-width:70px; min-height:38px; padding:0 11px; font-size:12px; }
  .portal-main { width:min(calc(100% - 24px),1280px); }
  .page-hero { min-height:auto; padding:70px 0 55px; }
  .page-hero h1, .inner-hero h1 { font-size:clamp(42px,13vw,62px); }
  .hero-proof, .feature-grid, .steps-grid, .two-column, .tool-layout { grid-template-columns:1fr; }
  .hero-visual { min-height:390px; }
  .preview-card { padding:18px; }
  .preview-metrics { grid-template-columns:1fr; }
  .content-section { padding:58px 0; }
  .cta-panel { align-items:flex-start; flex-direction:column; }
  .footer-shell { grid-template-columns:1fr; padding:44px 0; }
  .footer-shell small { grid-column:auto; padding:0; }
  .footer-links { flex-wrap:wrap; }
  .support-button { right:12px; bottom:12px; }
}

/* Risk disclaimer: the one thing a signals site must say out loud. */
.footer-risk { grid-column: 1/-1; max-width: 900px; margin: 4px 0 0; color: var(--t017); font-size: 12px; line-height: 1.65; }

/* Anchored sections must not slide under the sticky header. */
[id] { scroll-margin-top: 96px; }


/* ==========================================================================
   MOTION
   The rule this follows: CSS defines the FINISHED state, and motion.js moves
   things back to a start position only after confirming it can animate them.
   So with JavaScript off, or reduced motion asked for, every element below is
   already where it belongs -- a broken script can never hide content.
   ========================================================================== */

/* EMBER MOTION.
 *
 * The old layer was quick and mechanical -- an 18px hop and a scan line -- and
 * it matched a site that looked like every other signals site.  This one is
 * slower and warmer: things surface out of the dark rather than snapping into
 * place, and the accent behaves like something catching light instead of a
 * laser sweeping a screen.
 *
 * The safety property is unchanged and is the reason this file is written the
 * way it is: the CSS below describes the FINISHED state, and only `.motion`,
 * added by the script after it has checked for reduced-motion support, pulls
 * elements back to a starting position.  A script that never runs, or a person
 * who asked for less motion, simply gets the finished page.
 */

.motion .reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(6px);
  transition: opacity .85s cubic-bezier(.16,.84,.36,1),
              transform .85s cubic-bezier(.16,.84,.36,1),
              filter .85s cubic-bezier(.16,.84,.36,1);
  will-change: opacity, transform, filter;
}
.motion .reveal.in { opacity: 1; transform: none; filter: none; }

/* Headings arrive by being uncovered rather than by moving: the text is
   revealed from below an edge, which reads as something surfacing.
 *
 * THE CLIP GOES ON AN INNER SPAN, NEVER ON THE OBSERVED ELEMENT.  Chrome
 * applies clip-path when it computes an intersection ratio, so an element
 * clipped to nothing reports 0 and its own IntersectionObserver never fires --
 * the heading then sat invisible until the failsafe timer released it two and a
 * half seconds later, which looked exactly like a broken page.  The heading
 * stays unclipped and observable; the span inside it is what moves. */
.motion .rise > .rise-in {
  display: block;
  clip-path: inset(0 0 110% 0);
  transform: translateY(.22em);
}
.motion .rise.in > .rise-in {
  /* Negative on every side, not just the bottom.  A right inset of 0 clips at
     the content box, and a long word that overflows its max-width -- which is
     most of the display headings here -- was being sliced down the middle. */
  clip-path: inset(-14% -8% -18% -6%);
  transform: none;
  transition: clip-path 1s cubic-bezier(.16,.84,.36,1),
              transform 1s cubic-bezier(.16,.84,.36,1);
}

/* The ember: a heading catches light as it comes into view, then cools.  This
   replaces the scan line -- a laser was the right idea for a scanner and the
   wrong one for a brand built on warmth. */
.motion .ember { position: relative; }
.motion .ember::before {
  content: "";
  position: absolute;
  left: -6%;
  top: 50%;
  width: 46%;
  height: 190%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--t117), var(--t072) 55%, transparent 78%);
  filter: blur(22px);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.motion .ember.lit::before { animation: ember 2.4s cubic-bezier(.22,.61,.36,1) 1 forwards; }
@keyframes ember {
  0%   { opacity: 0;   transform: translateY(-50%) scale(.72); }
  35%  { opacity: 1;   transform: translateY(-50%) scale(1.04); }
  100% { opacity: .34; transform: translateY(-50%) scale(1); }
}

/* A warm pool of light that follows the cursor across a card. */
.motion .trace { position: relative; isolation: isolate; }
.motion .trace::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, -999px) var(--my, -999px),
                              var(--t115), var(--t067) 45%, transparent 72%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: -1;
}
.motion .trace:hover::before { opacity: 1; }

/* A rail down the left edge that fills as the page is read.  Ember House uses
   stage-by-stage navigation to say "you are partway through a story"; this is
   the same idea at the width of a hairline, with no furniture added. */
.scroll-rail {
  position: fixed;
  z-index: 900;
  left: 0;
  top: 76px;
  width: 2px;
  height: calc(100vh - 76px);
  background: linear-gradient(180deg, var(--t229), var(--t228));
  pointer-events: none;
}
.scroll-rail i {
  display: block;
  width: 100%;
  height: var(--read, 0%);
  background: linear-gradient(180deg, var(--accent), var(--maroon));
  box-shadow: 0 0 14px var(--t118);
  transition: height .12s linear;
}
@media (max-width: 720px) { .scroll-rail { display: none; } }

/* Film grain over the whole page.  Flat gradients are what every site in this
   niche looks like; a little noise is the cheapest thing that stops the
   background reading as a template. */
body.portal-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter>\
<rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* Interactive surfaces lift a little; the shadow does the work, not the size. */
.feature-card, .step-card, .tool-card, .content-card, .proof-item {
  transition: transform .28s cubic-bezier(.22,.61,.36,1),
              border-color .28s ease, box-shadow .28s ease;
}
@media (hover: hover) {
  .feature-card:hover, .step-card:hover, .tool-card:hover,
  .content-card:hover, .proof-item:hover {
    transform: translateY(-3px);
    border-color: var(--t168);
    box-shadow: 0 22px 48px rgba(0,0,0,.3);
  }
}

/* The live dot breathes rather than blinking: a blink reads as an alarm. */
.live-dot::before { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 10px var(--accent-2); opacity: .75; }
  50%      { box-shadow: 0 0 22px var(--accent-2); opacity: 1; }
}

@media print {
  /* Nothing may be hidden on paper: a reveal that never fired must not print
     a blank page. */
  .motion .reveal { opacity: 1 !important; transform: none !important; }
  .motion .trace::before { display: none; }
  .motion .rise > .rise-in { clip-path: none !important; transform: none !important; }
  .scroll-rail, body.portal-body::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .motion .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .motion .ember.lit::before { animation: none; opacity: .3; }
  .motion .rise > .rise-in { clip-path: none; transform: none; }
  .live-dot::before { animation: none; }
  .feature-card, .step-card, .tool-card, .content-card, .proof-item { transition: none; }
}
