/* Landing + header + footer, translated from Paper get_jsx (file 01M7HCSX8PA6B4BTCTC3DAK1MS, page p-3-0):
   15D-0 / 1GL-0 desktop (1440), 1AP-0 / 1ML-0 mobile (390). Load after final.css. */

/* ---------- Page background ---------- */
html body:has(#app.landing-c){background:linear-gradient(rgba(144,186,219,.16) 1px,transparent 1px) 0 0/28px 28px,linear-gradient(90deg,rgba(144,186,219,.16) 1px,transparent 1px) 0 0/28px 28px,#fffaf1}

/* ---------- Header ---------- */
html body .topbar.topbar{background:#fffaf1eb;border-bottom:1px solid #e6e1d4;height:auto;padding:0;display:block}
html body .topbar .topbar-inner.topbar-inner{box-sizing:border-box;display:flex;grid-template-columns:none;grid-template-rows:none;align-items:center;justify-content:space-between;gap:0;width:100%;max-width:1440px;height:87px;margin:0 auto;padding:0 64px} /* 88px incl. 1px border */
html body .topbar .brand.brand{display:flex;align-items:center;flex-shrink:0;padding:0;justify-self:auto}
html body .topbar .brand.brand img{display:block;width:210px;height:52px;max-width:none;max-height:none}
html body .topbar .topbar-inner nav{display:flex;align-items:center;gap:8px;margin:0;width:auto;height:auto;justify-content:flex-end}
html body .topbar nav .nav-item.nav-item{display:inline-block;position:static;min-height:0;min-width:0;padding:8px 16px;border-radius:999px;background:none;font:600 16px/20px IBM,sans-serif;color:#273740;text-decoration:none;white-space:nowrap}
html body .topbar nav .nav-item.nav-item.active{background:#e3eefb;color:#1e61af;font-weight:700}
html body .topbar nav .nav-item.nav-item::after{display:none}
html body .topbar .sound-toggle.sound-toggle{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;min-width:0;min-height:0;margin:0 0 0 8px;padding:0;background:#fff;border:1px solid #d6dcdc;border-radius:14px;box-shadow:0 3px 0 #c7cfcf;color:#273740}
html body .topbar .sound-toggle.sound-toggle svg{width:20px;height:20px;display:block}
html body .topbar .sound-toggle.sound-toggle .sound-label{display:none}

/* ---------- Footer ---------- */
html body .site-footer.site-footer{box-sizing:border-box;display:flex;justify-content:space-between;width:calc(100% - 128px);max-width:1312px;margin:40px auto 0;padding:20px 0 32px;border-top:1px solid #e6e1d4;gap:0;font:400 13px/16px IBM,sans-serif;color:#8a979e;text-align:left}
html body .site-footer.site-footer>span{display:inline-block;width:auto}

/* ---------- Page frame ---------- */
#app.f-page.landing-c{box-sizing:border-box;width:100%;max-width:1440px;margin:0 auto;padding:48px 64px 32px;display:flex;flex-direction:column;gap:48px;background:transparent}

/* ---------- Hero ---------- */
#app.landing-c .f-hero.f-hero{display:flex;align-items:flex-start;gap:56px}
#app.landing-c .f-preview.lobby-calculator{display:block;flex-shrink:0;width:520px;max-width:none;margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
#app.landing-c .f-calc.f-calc{box-sizing:border-box;width:520px;display:flex;flex-direction:column;align-items:center;padding:0 18px 22px;background:#e7e7e7;border:1px solid #d0d1d3;border-radius:40px;box-shadow:inset 0 2px 0 #ffffffa6,0 7px 0 #b5b6b7,0 22px 40px #2737401f}
#app.landing-c .f-calc .f-cap{display:block;width:150px;height:16px;margin:0;background:#2ffafe;border-radius:0 0 10px 10px;box-shadow:0 3px 0 #16b4c3}
#app.landing-c .f-calc .f-bezel{box-sizing:border-box;width:100%;margin:16px 0 0;padding:8px;background:#9a9a9a;border-radius:26px;box-shadow:none}
#app.landing-c .f-calc .f-screen.f-screen{display:flex;flex-direction:column;gap:6px;width:100%;padding:16px 22px 22px;border-radius:20px;background:#232528;text-align:left}
#app.landing-c .f-screen .f-status{display:flex;align-items:center;justify-content:space-between;gap:0;margin:0}
#app.landing-c .f-screen .f-status .preview-label{margin:0;font:600 15px/18px IBM,sans-serif;color:#a9b9cf}
#app.landing-c .f-screen .f-status .calculator-face{display:block;width:48px;height:22px;object-fit:contain;margin:0;position:static}
#app.landing-c .f-screen .f-equation.f-equation{display:flex!important;align-items:center;justify-content:center;gap:22px;margin:0!important;padding:6px 0 0;overflow:visible;white-space:nowrap;letter-spacing:0;font:700 84px/96px IBM,sans-serif;color:#fff}
#app.landing-c .f-equation #preview-a,#app.landing-c .f-equation #preview-b{display:inline-block;width:auto;font:700 84px/96px IBM,sans-serif;color:#fff}
#app.landing-c .f-equation span.f-op{font:700 60px/96px IBM,sans-serif;color:#ffb36b}
#app.landing-c .f-equation span.f-eq{font:700 60px/96px IBM,sans-serif;color:#8d9aab}
#app.landing-c .f-equation .preview-answer.f-slot{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:auto;min-width:110px;height:84px;padding:0 8px;border-radius:16px;background:#2d3035;box-shadow:inset 0 0 0 2px #2ffafe;font:700 64px/78px IBM,sans-serif;color:#2ffafe;text-align:center}

/* Keypad (same calculator keys; Paper: 100px keys, wrap, space-between, 16px gap) */
#app.landing-c .f-keys.f-keys{box-sizing:border-box;width:100%;margin:22px 0 0;padding:0 8px;background:none!important;border:0!important;box-shadow:none!important;pointer-events:auto}
#app.landing-c .f-keys .keypad.keypad{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;margin:0;padding:0}
#app.landing-c .f-keys .keypad.keypad button{box-sizing:border-box;flex:0 0 100px;width:100px;height:100px;aspect-ratio:auto;min-height:0;padding:0;border:0;border-radius:999px;background:#fffaf1;box-shadow:0 5px 0 #b3b7be;font:700 32px/40px IBM,sans-serif;color:#20263a}
#app.landing-c .f-keys .keypad.keypad button.small-key{border-radius:20px;background:#edf0f6;box-shadow:0 5px 0 #bfc6d2;font:700 26px/32px IBM,sans-serif;color:#55607a}
#app.landing-c .f-keys .keypad.keypad button.small-key svg{width:26px;height:26px}

/* Right column */
#app.landing-c .f-right.f-right{display:flex;flex-direction:column;flex:1 1 0;gap:20px;min-width:0}
#app.landing-c .f-title.landing-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:0;width:100%;margin:0;padding:0}
#app.landing-c .f-title.landing-heading>div{display:flex;flex-direction:column;gap:6px}
#app.landing-c .f-title.landing-heading h1{margin:0;font:700 64px/92px IBM,sans-serif;letter-spacing:-.02em;color:#273740;white-space:normal}
#app.landing-c .f-title.landing-heading h1 span{color:#1e61af}
#app.landing-c .f-title.landing-heading .f-note{margin:0;font:500 18px/22px Mali,IBM,sans-serif;color:#5f7179}
#app.landing-c .f-title .f-mascot.f-mascot{width:128px;height:100px;flex-shrink:0}

/* Sprint card */
#app.landing-c .f-sprint.landing-sprint{box-sizing:border-box;display:flex;flex-direction:column;gap:18px;width:100%;margin:0;padding:24px 26px 26px;background:#fff1c2;border:2px solid #f3d27a;border-radius:28px;box-shadow:0 6px 0 #ead08a}
#app.landing-c .f-sprint .f-sprint-head{display:flex;align-items:center;justify-content:space-between;gap:0;flex-wrap:nowrap}
#app.landing-c .f-sprint .f-sprint-head h2{margin:0;font:700 40px/48px IBM,sans-serif;letter-spacing:0;color:#273740}
#app.landing-c .f-sprint .f-tabs.kind-picker{display:flex;gap:0;margin:0;padding:4px;background:#f3dfa0;border-radius:16px}
#app.landing-c .f-sprint .f-tabs .kind-option.kind-option{min-height:0;margin:0;padding:8px 18px;border:0;border-radius:12px;background:none;box-shadow:none;font:600 16px/20px IBM,sans-serif;color:#6b5a26}
#app.landing-c .f-sprint .f-tabs .kind-option.kind-option[aria-checked="true"]{background:#fff;box-shadow:0 2px 0 #d8c27f;font-weight:700;color:#273740}
#app.landing-c .f-sprint .set-picker.set-picker{display:flex;gap:12px;margin:0}
#app.landing-c .f-sprint .set-picker .set-option.set-option{flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;min-height:0;padding:12px 0;border:0;border-radius:18px;background:#fff;box-shadow:0 5px 0 #d8c27f;color:#273740}
#app.landing-c .f-sprint .set-picker .set-option.set-option strong{font:700 19px/24px IBM,sans-serif;color:#273740}
#app.landing-c .f-sprint .set-picker .set-option.set-option small{font:400 14px/18px IBM,sans-serif;color:#5f7179}
#app.landing-c .f-sprint .set-picker .set-option.set-option[aria-checked="true"]{background:#2e87fb;box-shadow:0 5px 0 #1d5fb8;color:#fff}
#app.landing-c .f-sprint .set-picker .set-option.set-option[aria-checked="true"] strong{color:#fff}
#app.landing-c .f-sprint .set-picker .set-option.set-option[aria-checked="true"] small{color:#dbeaff}
#app.landing-c .f-sprint .f-start.f-start{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:72px;min-height:0;flex-shrink:0;padding:0;border:0;border-radius:22px;background:#ffc83d;box-shadow:0 6px 0 #c99516;font:700 26px/32px IBM,sans-serif;color:#273740}
#app.landing-c .f-sprint .f-best.f-best{align-self:center;margin:0;font:400 15px/18px Mali,IBM,sans-serif;color:#7a6526;text-align:center}

/* Mode tiles */
#app.landing-c .f-modes.f-modes{display:flex;gap:14px;width:100%;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
#app.landing-c .f-modes .f-mode.f-mode{box-sizing:border-box;flex:1 1 0;display:flex;flex-direction:column;align-items:stretch;gap:10px;min-width:0;min-height:0;padding:18px;background:#fff;border:1px solid #e3e7ea;border-radius:22px;box-shadow:0 5px 0 #dfe3e8;color:#273740;text-align:left;text-decoration:none}
#app.landing-c .f-modes .f-mode .f-mode-top{display:flex;align-items:center;justify-content:space-between}
#app.landing-c .f-modes .f-mode .f-mode-icon{display:flex;flex-shrink:0;width:64px;height:64px;border-radius:18px;background-color:#e3eefb;background-position:50%;background-repeat:no-repeat;background-size:86%;box-shadow:inset 0 -3px 0 #0000000f}
#app.landing-c .f-modes .f-mode:nth-child(1) .f-mode-icon{background-color:#e3eefb;background-size:118%}
#app.landing-c .f-modes .f-mode:nth-child(2) .f-mode-icon{background-color:#fde7d2}
#app.landing-c .f-modes .f-mode:nth-child(3) .f-mode-icon{background-color:#dcf5e5}
#app.landing-c .f-modes .f-mode .f-arrow{font:400 22px/28px IBM,sans-serif;color:#8a979e}
#app.landing-c .f-modes .f-mode .f-mode-name{font:700 22px/28px IBM,sans-serif;color:#273740}
#app.landing-c .f-modes .f-mode .f-mode-detail{font:400 14px/18px IBM,sans-serif;color:#5f7179}

/* ---------- Mastery card ---------- */
#app.landing-c .mastery.f-card{box-sizing:border-box;display:flex;flex-direction:column;gap:18px;width:100%;max-width:none;margin:0;padding:26px 28px 28px;background:#fff;border:1px solid #e3e7ea;border-radius:28px;box-shadow:0 5px 0 #dfe3e8}
#app.landing-c .mastery .mastery-head.f-card-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:nowrap;margin:0}
#app.landing-c .mastery .mastery-head>div:first-child{display:flex;flex-direction:column;gap:2px}
#app.landing-c .mastery .mastery-head h2{margin:0;font:700 28px/36px IBM,sans-serif;color:#273740}
#app.landing-c .mastery .mastery-head .mastery-hint{display:block;margin:0;font:400 15px/18px Mali,IBM,sans-serif;color:#5f7179}
#app.landing-c .mastery .mastery-head .f-head-side{display:flex;align-items:center;gap:18px;flex-wrap:nowrap}
#app.landing-c .mastery .f-head-side .f-link.f-link{font:700 15px/18px IBM,sans-serif;color:#1e61af}
/* Legend: 5 swatches 18x12 r4 with 6px gaps, drawn from one .heat-scale via box-shadow */
#app.landing-c .mastery .heat-legend{display:flex;align-items:center;gap:6px;margin:0;width:auto;flex-wrap:nowrap;font:400 13px/16px IBM,sans-serif;color:#5f7179}
#app.landing-c .mastery .heat-legend .heat-scale{display:block;flex-shrink:0;width:18px;height:12px;margin:0 96px 0 0;border-radius:4px;background:#c6392f;box-shadow:24px 0 0 #dda66e,48px 0 0 #ece6ac,72px 0 0 #88dd6e,96px 0 0 #2fc64d}
#app.landing-c .mastery .heat-legend .heat-none{display:block;flex-shrink:0;width:18px;height:12px;margin:0 0 0 8px;border:0;border-radius:4px;background:#e9ece9}
/* Chips */
#app.landing-c .mastery .f-chips.twelve{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;margin:0;padding:0;border:0}
#app.landing-c .mastery .f-chips .f-chip.f-chip{box-sizing:border-box;height:60px;min-height:0;padding:0;border:0;border-radius:16px;background:var(--heat-bg);color:var(--heat-fg);box-shadow:inset 0 -3px 0 #0000001f;font:700 22px/28px IBM,sans-serif}
#app.landing-c .mastery .f-chips .f-chip.f-chip[style*="--heat-bg:#eceeec"]{background:#e9ece9;color:#9aa5aa;box-shadow:inset 0 -3px 0 #0000000f}
#app.landing-c .mastery .f-chips .f-chip.f-chip[aria-pressed="true"]{box-shadow:inset 0 0 0 3px #273740,inset 0 -3px 0 #0000001f;outline:0}
#app.landing-c .mastery .f-chips .f-chip.f-chip[aria-pressed="true"]::after{display:none}
/* Note bar */
#app.landing-c .mastery .f-note-bar{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap;width:100%;margin:0;padding:16px 20px;border-radius:18px;background:#f4f7fb;font:400 16px/20px IBM,sans-serif;color:#273740}
#app.landing-c .mastery .f-note-bar.warn,#app.landing-c .mastery .f-note-bar.picked{background:#fff4cf}
#app.landing-c .mastery .f-note-bar b{font-weight:700}
#app.landing-c .mastery .f-note-bar .f-link.f-link,#app.landing-c .mastery .f-note-bar .f-btn-small.f-btn-small{padding:0;border:0;border-radius:0;background:none;box-shadow:none;font:700 15px/18px IBM,sans-serif;color:#1e61af;white-space:nowrap}

/* Between phone and the 1440 desktop layout (not designed in Paper): stack the hero */
@media (max-width:1100px) and (min-width:761px){
  #app.f-page.landing-c{padding-inline:40px}
  #app.landing-c .f-hero.f-hero{flex-direction:column;align-items:center}
  #app.landing-c .f-right.f-right{width:100%}
}

/* ---------- Phone (Paper 390) ---------- */
@media (max-width:760px){
  html body:has(#app.landing-c){background:linear-gradient(rgba(144,186,219,.16) 1px,transparent 1px) 0 0/24px 24px,linear-gradient(90deg,rgba(144,186,219,.16) 1px,transparent 1px) 0 0/24px 24px,#fff}

  html body .topbar.topbar{background:#fffaf1}
  html body .topbar .topbar-inner.topbar-inner{height:63px;padding:0 16px}
  html body .topbar .brand.brand img{width:136px!important;max-width:136px;height:34px}
  html body .topbar nav .nav-item.nav-item{padding:7px 12px;font:600 14px/18px IBM,sans-serif}
  html body .topbar .sound-toggle.sound-toggle{width:40px;height:40px;margin-left:0;border-radius:12px}
  html body .topbar .sound-toggle.sound-toggle svg{width:18px;height:18px}
  /* Landing phone header shows only the profile link, as a pill */
  html body:has(#app.landing-c) .topbar nav .nav-item.nav-item[data-page="home"],
  html body:has(#app.landing-c) .topbar nav .nav-item.nav-item[data-page="practice"]{display:none}
  html:not(.fastmath-embed) body:has(#app.landing-c) .topbar nav .nav-item.nav-item[data-page="profile"]{background:#e3eefb;color:#1e61af;font-weight:700}
  /* Phone landing artboards have no footer */
  html body:has(#app.landing-c) .site-footer.site-footer{display:none}
  html body .site-footer.site-footer{width:calc(100% - 32px)}

  #app.f-page.landing-c{padding:16px 16px 28px;gap:16px}
  #app.landing-c .f-hero.f-hero{display:flex;flex-direction:column;align-items:stretch;gap:16px}
  #app.landing-c .f-right.f-right{display:contents}
  #app.landing-c .f-title.landing-heading{order:1;align-items:center;padding:4px 0 0}
  #app.landing-c .f-preview.lobby-calculator{order:2;width:100%}
  #app.landing-c .f-sprint.landing-sprint{order:3}
  #app.landing-c .f-modes.f-modes{order:4}

  #app.landing-c .f-title.landing-heading>div{gap:4px}
  #app.landing-c .f-title.landing-heading h1{font-size:34px;line-height:52px;letter-spacing:-.02em;white-space:nowrap}
  #app.landing-c .f-title.landing-heading .f-note{font:400 14px/18px Mali,IBM,sans-serif}
  #app.landing-c .f-title .f-mascot.f-mascot{width:84px;height:66px}

  /* Phone shows the screen only (no case, cap or keys) */
  #app.landing-c .f-calc.f-calc{width:100%;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
  #app.landing-c .f-calc .f-cap{display:none}
  #app.landing-c .f-calc .f-bezel{margin:0;padding:8px;border-radius:22px;box-shadow:0 5px 0 #b5b6b7}
  #app.landing-c .f-calc .f-screen.f-screen{gap:2px;padding:12px 16px 16px;border-radius:16px}
  #app.landing-c .f-keys.f-keys{display:none}
  #app.landing-c .f-screen .f-status .preview-label{font:600 13px/16px IBM,sans-serif}
  #app.landing-c .f-screen .f-status .calculator-face{width:38px;height:17px}
  #app.landing-c .f-screen .f-equation.f-equation{gap:14px;padding:0}
  #app.landing-c .f-equation #preview-a,#app.landing-c .f-equation #preview-b{font:700 54px/62px IBM,sans-serif}
  #app.landing-c .f-equation span.f-op,#app.landing-c .f-equation span.f-eq{font-size:40px;line-height:48px}
  #app.landing-c .f-equation .preview-answer.f-slot{min-width:72px;height:56px;padding:0 6px;border-radius:12px;font:700 40px/48px IBM,sans-serif}

  #app.landing-c .f-sprint.landing-sprint{gap:14px;padding:18px 16px;border-radius:24px;box-shadow:0 5px 0 #ead08a}
  #app.landing-c .f-sprint .f-sprint-head h2{font-size:30px;line-height:36px}
  #app.landing-c .f-sprint .f-tabs.kind-picker{padding:3px;border-radius:14px}
  #app.landing-c .f-sprint .f-tabs .kind-option.kind-option{padding:6px 12px;border-radius:11px;font-size:14px;line-height:18px}
  #app.landing-c .f-sprint .set-picker.set-picker{gap:8px}
  #app.landing-c .f-sprint .set-picker .set-option.set-option{padding:10px 0;border-radius:16px;box-shadow:0 4px 0 #d8c27f}
  #app.landing-c .f-sprint .set-picker .set-option.set-option[aria-checked="true"]{box-shadow:0 4px 0 #1d5fb8}
  #app.landing-c .f-sprint .set-picker .set-option.set-option strong{font-size:16px;line-height:20px}
  #app.landing-c .f-sprint .set-picker .set-option.set-option small{font-size:12px;line-height:16px}
  #app.landing-c .f-sprint .f-start.f-start{height:60px;border-radius:20px;box-shadow:0 5px 0 #c99516;font-size:22px;line-height:28px}
  #app.landing-c .f-sprint .f-best.f-best{font-size:13px;line-height:16px}

  #app.landing-c .f-modes.f-modes{flex-direction:column;gap:10px}
  #app.landing-c .f-modes .f-mode.f-mode{flex:0 0 auto;display:grid;grid-template-columns:54px 1fr auto;grid-template-rows:auto auto;column-gap:14px;row-gap:0;align-items:center;padding:14px 16px;border-radius:20px;box-shadow:0 4px 0 #dfe3e8}
  #app.landing-c .f-modes .f-mode .f-mode-top{display:contents}
  #app.landing-c .f-modes .f-mode .f-mode-icon{grid-column:1;grid-row:1/3;width:54px;height:54px;border-radius:16px;box-shadow:none}
  #app.landing-c .f-modes .f-mode .f-arrow{grid-column:3;grid-row:1/3;font-size:20px;line-height:24px}
  #app.landing-c .f-modes .f-mode .f-mode-name{grid-column:2;grid-row:1;align-self:end;font-size:19px;line-height:24px}
  #app.landing-c .f-modes .f-mode .f-mode-detail{grid-column:2;grid-row:2;align-self:start;font-size:13px;line-height:16px}

  #app.landing-c .mastery.f-card{gap:12px;margin-top:4px;padding:18px 16px;border-radius:24px;box-shadow:0 4px 0 #dfe3e8}
  /* Head becomes: [title | link] row, then hint row; legend hidden */
  #app.landing-c .mastery .mastery-head.f-card-head{display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:12px;row-gap:12px}
  #app.landing-c .mastery .mastery-head>div:first-child,#app.landing-c .mastery .mastery-head .f-head-side{display:contents}
  #app.landing-c .mastery .mastery-head h2{grid-column:1;grid-row:1;font-size:22px;line-height:30px}
  #app.landing-c .mastery .mastery-head .mastery-hint{grid-column:1/3;grid-row:2;font-size:13px;line-height:16px}
  #app.landing-c .mastery .mastery-head .f-head-side .f-link.f-link{grid-column:2;grid-row:1;font-size:14px;line-height:18px}
  #app.landing-c .mastery .mastery-head .heat-legend{display:none}
  #app.landing-c .mastery .f-chips.twelve{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
  #app.landing-c .mastery .f-chips .f-chip.f-chip{height:46px;border-radius:12px;font-size:17px;line-height:22px}
  #app.landing-c .mastery .f-chips .f-chip.f-chip[style*="--heat-bg:#eceeec"]{box-shadow:none}
  #app.landing-c .mastery .f-note-bar{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;padding:12px 14px;border-radius:14px;font-size:14px;line-height:18px}
  #app.landing-c .mastery .f-note-bar .f-link.f-link,#app.landing-c .mastery .f-note-bar .f-btn-small.f-btn-small{font-size:14px;line-height:18px}
}
#app .mastery.f-card .mastery-detail{border:0;padding:0;margin:0}
