/* MathsRead / The Rose Grid — user-facing product redesign.
   All selectors live under .product-ui; the existing graph calculator and
   3D studio are intentionally excluded. No question content or math logic. */
body.product-ui {
  --ui-bg: #f6f6f0;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f6f6f0;
  --ui-text: #172136;
  --ui-muted: #596577;
  --ui-border: #e1e4e3;
  --ui-border-strong: #b9c3ce;
  --ui-primary: #2539af;
  --ui-primary-strong: #172b93;
  --ui-primary-soft: #ecedfa;
  --ui-success: #27764e;
  --ui-radius: 18px;
  --ui-shadow: 0 10px 36px rgba(24,33,51,.045);
  --product-ink: #121c30;
  --product-lime: #e5f79a;
  --product-lavender: #daddff;
  --product-serif: Georgia, "Times New Roman", serif;
  color:var(--ui-text);
  background:var(--ui-bg);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size:16px;
  letter-spacing:-.006em;
  overflow-x:clip;
}
.product-ui *, .product-ui *::before, .product-ui *::after { box-sizing:border-box; }
.product-ui h1,.product-ui h2,.product-ui h3,.product-ui h4 { color:var(--product-ink); letter-spacing:-.055em; font-weight:760; }
.product-ui p { line-height:1.65; }
.product-ui a { color:var(--ui-primary); }
.product-ui a:hover { color:var(--ui-primary-strong); }
.product-ui :focus-visible { outline:3px solid #5268e7; outline-offset:4px; }
.product-ui .btn,.product-ui button { transition:transform .17s ease, background-color .17s ease, border-color .17s ease, box-shadow .17s ease; }
.product-ui .btn-primary, .product-ui .form-card form button[type=submit]:not(.link) { background:var(--product-ink); border-color:var(--product-ink); color:#fff; box-shadow:none; }
.product-ui .btn-primary:hover, .product-ui .form-card form button[type=submit]:not(.link):hover { background:#2a3d63; border-color:#2a3d63; color:#fff; transform:translateY(-1px); }
.product-ui .btn-outline-primary { border:1px solid #cbd1e5; color:var(--ui-primary); background:#fff; }
.product-ui .btn-outline-primary:hover { background:#eef0ff; border-color:#8b99d4; color:#1f329d; }
.product-ui .eyebrow-label { color:#4d5ab5; font-size:.72rem; font-weight:800; letter-spacing:.16em; line-height:1.5; }
.product-ui .platform-container, .product-ui .footer-inner, .product-ui .platform-header-inner { width:min(1248px,calc(100% - 64px)); max-width:none; }
.product-ui .platform-main { padding:35px 0 94px; }
.product-ui .platform-surface { isolation:isolate; }
.product-ui .skip-link { background:var(--product-ink); color:#fff; }

/* Global shell: a product tool bar rather than a series of pills. */
.product-ui .platform-header-shell { position:sticky; top:0; z-index:100; background:rgba(255,255,255,.97); border-bottom:1px solid #e4e6e3; backdrop-filter:blur(16px); box-shadow:none; }
.product-ui .platform-header-inner { min-height:78px; gap:34px; }
.product-ui .brand-lockup { gap:12px; }
.product-ui .brand-lockup .brand-logo { width:46px; height:46px; border-radius:13px; box-shadow:0 5px 14px rgba(18,28,48,.12); }
.product-ui .brand-lockup .brand-name { color:var(--product-ink); font-size:1.32rem; font-weight:860; letter-spacing:-.065em; }
.product-ui .brand-lockup .brand-name small { color:#677286; font-size:.59rem; font-weight:600; letter-spacing:.022em; }
.product-ui .modern-desktop-nav { gap:4px; }
.product-ui .modern-desktop-nav>a,.product-ui .nav-explore-menu>summary { font-weight:680; font-size:.88rem; color:#3c485a; padding:11px 14px; border-radius:8px; }
.product-ui .modern-desktop-nav>a:hover,.product-ui .modern-desktop-nav>a.active,.product-ui .nav-explore-menu>summary:hover,.product-ui .nav-explore-menu[open]>summary { background:#f1f2f8; color:#2539af; }
.product-ui .modern-desktop-nav>a.active { box-shadow:inset 0 -2px var(--ui-primary); }
.product-ui .guest-signin { font-weight:740; color:#26334a; }
.product-ui .guest-join { background:var(--product-lime); border:1px solid var(--product-lime); color:var(--product-ink); border-radius:9px; font-weight:800; padding:10px 18px; }
.product-ui .guest-join:hover { color:var(--product-ink); background:#d3ec80; border-color:#d3ec80; }
.product-ui .header-icon-button,.product-ui .account-trigger { border-color:#e2e5e7; border-radius:10px; }
.product-ui .site-menu-panel { border-radius:14px; border-color:#e1e4e8; box-shadow:0 20px 55px rgba(18,28,48,.14); }
.product-ui .nav-explore-panel a:hover,.product-ui .account-panel>a:hover,.product-ui .mobile-menu-panel a:hover { background:#eff0ff; color:#2539af; }
.product-ui .platform-footer { padding:43px 0; background:var(--product-ink); color:#bbc5d5; border:0; }
.product-ui .platform-footer strong { color:var(--product-lime); font-size:1.06rem; letter-spacing:-.035em; }
.product-ui .platform-footer p span { color:#afb8cb; }
.product-ui .platform-footer nav a { color:#d7ddeb; font-weight:600; }
.product-ui .platform-footer nav a:hover { color:var(--product-lime); }
.product-ui .platform-flashes { border-radius:14px; }

/* Landing: copy remains verbatim; the view becomes a memorable editorial composition. */
.product-ui .landing-hero { display:grid; grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr); gap:0; min-height:550px; padding:0; border:1px solid #e6e7e0; border-radius:22px; background:#f1f0e9; box-shadow:0 14px 48px rgba(21,26,39,.06); overflow:hidden; }
.product-ui .hero-copy { position:relative; padding:clamp(44px,5.4vw,92px) clamp(34px,5vw,76px); align-self:center; z-index:1; }
.product-ui .hero-copy:before { content:""; position:absolute; width:275px; height:275px; left:-140px; bottom:-156px; border:1px solid #cdd2cd; border-radius:50%; pointer-events:none; }
.product-ui .landing-hero .eyebrow-label { color:#4959ac; padding-left:32px; position:relative; }
.product-ui .landing-hero .eyebrow-label::before { content:""; width:23px; height:2px; background:#5466ba; left:0; top:50%; position:absolute; }
.product-ui .landing-hero h1 { max-width:590px; margin:23px 0 22px; font-size:clamp(2.9rem,5.2vw,5rem); line-height:1.035; letter-spacing:-.075em; font-weight:830; }
.product-ui .landing-hero h1 span { display:block; color:#384db6; }
.product-ui .landing-hero .hero-description { max-width:490px; color:#4e5968; font-size:clamp(1rem,1.3vw,1.15rem); line-height:1.68; }
.product-ui .landing-actions { gap:15px 21px; margin-top:30px; }
.product-ui .landing-actions .btn { min-height:54px; padding:14px 20px; font-size:.95rem; border-radius:10px; }
.product-ui .landing-actions .btn-primary { background:var(--product-ink); border-color:var(--product-ink); color:var(--product-lime); }
.product-ui .landing-actions .btn-primary:hover { background:#263754; border-color:#263754; color:var(--product-lime); }
.product-ui .hero-secondary-action { color:#263651; text-decoration:underline; text-decoration-color:#a9b2b5; text-underline-offset:5px; font-weight:700; }
.product-ui .hero-reassurance { margin-top:16px; color:#647081; font-size:.81rem; }
.product-ui .hero-visual { position:relative; isolation:isolate; display:grid; align-items:center; min-height:550px; padding:38px; border:0; border-radius:0; background:radial-gradient(circle at 52% 46%,#273550 0%,#18243b 55%,#111c30 100%); box-shadow:none; overflow:hidden; }
.product-ui .hero-orbit-art { position:absolute; inset:-70px -100px; z-index:-1; opacity:.95; pointer-events:none; }
.product-ui .hero-orbit-art img { display:block; width:100%; height:100%; object-fit:contain; max-width:none; animation:mathsread-orbit 42s linear infinite; }
.product-ui .hero-spotlight { width:min(100%,480px); margin:auto; padding:clamp(24px,4vw,43px); border:1px solid #ccd1c6; border-top:5px solid var(--product-lime); border-radius:14px; background:#fcfcfa; box-shadow:0 22px 64px rgba(4,8,23,.42); }
.product-ui .hero-spotlight-meta { display:flex; gap:12px; align-items:center; justify-content:space-between; color:#4a5982; font-size:.79rem; font-weight:740; }
.product-ui .hero-spotlight h2 { margin:18px 0 13px; font-size:clamp(1.65rem,3vw,2.5rem); line-height:1.12; letter-spacing:-.04em; }
.product-ui .hero-spotlight p { color:#46546b; font-size:1rem; line-height:1.6; }
.product-ui .hero-spotlight a { display:inline-flex; align-items:center; gap:.45em; min-height:44px; margin-top:10px; color:#26389d; font-weight:780; }
.product-ui .landing-workspace-actions { display:flex; flex-wrap:wrap; gap:8px; }
.product-ui #community { scroll-margin-top:120px; }
.product-ui .landing-section { margin-top:75px; }
.product-ui .landing-section-heading { margin-bottom:26px; }
.product-ui .landing-section-heading h2 { font-size:clamp(2rem,3vw,3.05rem); line-height:1.08; max-width:620px; margin-top:9px; }
.product-ui .math-paths-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; }
.product-ui .landing-feature-grid .feature-card { position:relative; display:flex; flex-direction:column; min-height:205px; padding:25px; background:#fff; border:1px solid #e1e5e3; border-radius:15px; overflow:hidden; transition:border-color .2s,transform .2s,box-shadow .2s; }
.product-ui .landing-feature-grid .feature-card::before { content:""; position:absolute; width:150px; height:150px; right:-70px; top:-70px; border-radius:50%; border:1px dashed #c3c9e9; box-shadow:0 0 0 13px #f7f8fc,0 0 0 14px #edf0f7; pointer-events:none; }
.product-ui .landing-feature-grid .feature-card:nth-child(2) { background:#ebedfc; }
.product-ui .landing-feature-grid .feature-card:nth-child(3) { background:#f1f3e8; }
.product-ui .landing-feature-grid .feature-card:nth-child(4) { background:#f7f2e8; }
.product-ui .landing-feature-grid .feature-card:hover { transform:translateY(-5px); box-shadow:0 15px 34px rgba(20,32,54,.1); border-color:#bfc6d9; }
.product-ui .landing-feature-grid h3 { margin:0 0 9px; color:#172136; font-size:1.24rem; letter-spacing:-.045em; }
.product-ui .landing-feature-grid p { margin:0; min-height:0; color:#566477; font-size:.91rem; line-height:1.6; }
.product-ui .landing-feature-grid .feature-card a { margin-top:auto; padding-top:24px; display:flex; align-items:center; color:#24389e; font-weight:780; font-size:.86rem; text-decoration:none; }
.product-ui .landing-feature-grid .feature-card a:hover { text-decoration:underline; }
.product-ui .landing-how { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-top:75px; padding:44px 45px; border:1px solid #dfe4e4; border-radius:16px; background:#fff; }
.product-ui .landing-how h2 { margin:6px 0 10px; font-size:clamp(1.7rem,2.5vw,2.4rem); }
.product-ui .landing-how p:last-child { color:#647081; max-width:720px; }
.product-ui .landing-text-link { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; min-height:49px; padding:12px 17px; border:1px solid #cbd2e1; border-radius:9px; text-decoration:none; font-weight:730; color:#273ba4; }
.product-ui .landing-text-link:hover { background:#f1f3ff; text-decoration:none; }
.product-ui .brahmagupta-tribute { position:relative; gap:28px; padding:33px 39px; margin-top:24px; border:1px solid #e1e2d9; border-radius:16px; background:#eeefe7; }
.product-ui .tribute-mark { background:var(--product-ink); border-color:var(--product-ink); color:var(--product-lime); border-radius:50%; width:78px; height:78px; flex-basis:78px; }
.product-ui .brahmagupta-tribute .eyebrow-label { color:#626d3c; }
.product-ui .brahmagupta-tribute h2 { font-size:1.6rem; }
.product-ui .brahmagupta-tribute p:not(.eyebrow-label) { color:#566276; }

/* Product discovery: functional search + live level filters over server-rendered content. */
.product-ui .public-problems { max-width:1220px; }
.product-ui .public-problems .compute-breadcrumb { margin:4px 0 28px; color:#6e7886; font-size:.83rem; }
.product-ui .public-problems .compute-breadcrumb a { color:#3c4d7d; }
.product-ui .public-problem-intro { margin:0 0 20px; padding:0 0 26px; border:0; }
.product-ui .public-problem-intro h1 { margin:10px 0 14px; max-width:920px; color:var(--product-ink); font-size:clamp(2.4rem,4vw,4.4rem); line-height:1.06; letter-spacing:-.065em; }
.product-ui .public-problem-intro p:not(.eyebrow-label) { max-width:760px; color:#566375; font-size:1rem; }
.product-ui .discovery-controls,.product-ui .dashboard-find { display:flex; flex-wrap:wrap; align-items:center; gap:14px; padding:17px; margin:22px 0 26px; background:#fff; border:1px solid #e2e6e6; border-radius:13px; box-shadow:0 5px 18px rgba(15,27,47,.03); }
.product-ui .discovery-search { position:relative; display:flex; flex:1 1 270px; align-items:center; min-width:0; margin:0; }
.product-ui .discovery-search .search-magnifier { position:absolute; z-index:1; left:16px; width:17px; height:17px; border:2px solid #657389; border-radius:50%; pointer-events:none; }
.product-ui .discovery-search .search-magnifier:after { content:""; position:absolute; right:-6px; bottom:-3px; width:8px; height:2px; background:#657389; transform:rotate(45deg); border-radius:2px; }
.product-ui .discovery-search input[type=search] { display:block; width:100%; min-height:46px; margin:0; padding:11px 16px 11px 45px; border:1px solid #cfd6df; border-radius:9px; background:#fbfcfd; color:#172136; font-size:.91rem; box-shadow:none; }
.product-ui .discovery-search input[type=search]::placeholder { color:#758195; opacity:1; }
.product-ui .discovery-search input[type=search]:focus { border-color:#6779cc; box-shadow:0 0 0 3px rgba(64,82,195,.13); }
.product-ui .discovery-difficulties { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.product-ui .discovery-difficulties button { min-height:41px; padding:8px 12px; border:1px solid transparent; border-radius:8px; color:#556276; background:transparent; cursor:pointer; font-size:.8rem; font-weight:700; }
.product-ui .discovery-difficulties button:hover { background:#eff0f6; }
.product-ui .discovery-difficulties button[aria-pressed=true] { background:var(--product-ink); border-color:var(--product-ink); color:#fff; }
.product-ui .discovery-count { width:100%; display:block; font-size:.78rem; font-weight:690; color:#586883; padding:0 2px; }
.product-ui .discovery-count:empty { display:none; }
.product-ui .discovery-empty { margin:12px 0 28px; padding:32px; border:1px dashed #bcc8d8; border-radius:12px; text-align:center; background:#fff; color:#4b5b71; }
.product-ui .discovery-empty[hidden],.product-ui [hidden] { display:none!important; }
.product-ui .discovery-empty button { min-height:36px; margin-left:6px; padding:5px 13px; border:1px solid #b5c3da; border-radius:7px; color:#2435a0; background:#edf0ff; cursor:pointer; }
.product-ui .public-problem-module { padding:0; margin:0 0 39px; border:1px solid #dce2e4; border-radius:15px; background:#fff; overflow:hidden; }
.product-ui .public-problem-module>h2 { font-size:1.42rem; margin:0; padding:27px 29px 0; }
.product-ui .public-problem-module>h2 a { color:#172136; font-weight:800; }
.product-ui .public-problem-module>h2 a:hover { color:#263fa3; }
.product-ui .public-problem-module>p { padding:0 29px; margin:7px 0 0; color:#637086; font-size:.9rem; }
.product-ui .public-problem-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:23px 0 0; border-top:1px solid #e8ebed; }
.product-ui .public-problem-module .public-problem-grid { border-left:0; }
.product-ui .public-problem-tile { min-width:0; border-right:1px solid #e8ebed; border-bottom:1px solid #e8ebed; background:#fff; }
.product-ui .public-problem-tile-link { display:flex; flex-direction:column; gap:11px; height:100%; min-height:205px; padding:23px 25px; border:0; border-radius:0; background:transparent; box-shadow:none; text-decoration:none; }
.product-ui .public-problem-tile-link:hover,.product-ui .public-problem-tile-link:focus-visible { position:relative; z-index:1; background:#f2f3ff; border:0; box-shadow:inset 0 0 0 2px #8e9add; }
.product-ui .public-problem-tile-link strong { color:#1c2941; font-size:1.04rem; font-weight:790; letter-spacing:-.02em; }
.product-ui .public-problem-tile-meta { color:#627186; font-size:.77rem; font-weight:600; line-height:1.5; }
.product-ui .public-problem-tile-summary { color:#697487; font-size:.86rem; line-height:1.58; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.product-ui .public-problem-tile-action { margin-top:auto; font-weight:800; color:#283cb2; font-size:.82rem; }
.product-ui .difficulty { display:inline-flex; align-items:center; border-radius:5px; padding:3px 8px; font-size:.7rem; letter-spacing:.015em; font-weight:770; text-transform:capitalize; }
.product-ui .difficulty-easy { background:#e3f3e4; color:#20633b; }
.product-ui .difficulty-medium { background:#fff0cf; color:#845206; }
.product-ui .difficulty-hard { background:#ffe7e5; color:#a23535; }
.product-ui .public-problems>.public-problem-grid,.product-ui #catalogue-results>.public-problem-grid { border:1px solid #e3e7e8; border-radius:12px; overflow:hidden; background:#fff; }

/* Canonical public problem detail: more readable headings, keep iframe and solver isolated. */
.product-ui .public-problem-detail .public-problem-article { padding:clamp(22px,3.5vw,48px); border:1px solid #e0e5e6; border-radius:17px; box-shadow:0 12px 45px rgba(20,27,43,.035); }
.product-ui .public-problem-detail .public-problem-article>header { padding-bottom:28px; border-bottom:1px solid #e4e8eb; }
.product-ui .public-problem-detail .public-problem-article>header h1 { color:var(--product-ink); font-size:clamp(2rem,3.4vw,3.4rem); line-height:1.1; letter-spacing:-.06em; }
.product-ui .public-workspace-heading { gap:18px; }
.product-ui .public-workspace-heading h2 { color:#172136; font-size:clamp(1.3rem,2vw,1.65rem); }
.product-ui .public-workspace-eyebrow { color:#3343aa; }
.product-ui .public-workspace-expand { padding:10px 13px; border-radius:8px; border:1px solid #c7cde7; color:#253ba0; }
.product-ui .public-solver-frame-box { border:1px solid #d7dce5; border-radius:13px; overflow:hidden; box-shadow:none; }
.product-ui .public-problem-text-alternative { border-radius:10px; }
.product-ui .public-problem-detail .public-problem-cta { border-top:1px solid #e4e7e9; }
.product-ui .public-related-problems { padding:24px 26px; border:1px solid #e3e7e8; border-radius:14px; background:#fff; }

/* Signed-in home becomes a learning dashboard, not a long list. */
.product-ui .curriculum-dashboard { max-width:1220px; }
.product-ui .curriculum-hero { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,275px); align-items:center; gap:35px; padding:38px 42px; overflow:hidden; border:0; border-radius:17px; background:var(--product-ink); color:#f6f7ff; }
.product-ui .curriculum-hero:before { content:""; position:absolute; top:-185px; right:-100px; width:570px; height:570px; background:url('/static/images/mathsread-rose.svg') center/contain no-repeat; opacity:.12; pointer-events:none; }
.product-ui .curriculum-hero>div { position:relative; }
.product-ui .curriculum-hero h1 { max-width:600px; color:white; font-size:clamp(2.2rem,3.5vw,3.4rem); line-height:1.08; letter-spacing:-.065em; }
.product-ui .curriculum-hero .eyebrow-label { color:var(--product-lime); }
.product-ui .curriculum-hero p:last-child { max-width:750px; color:#c3ccdc; }
.product-ui .progress-summary { min-width:0; padding:23px; border:1px solid #43516f; border-radius:13px; background:rgba(255,255,255,.09); backdrop-filter:blur(6px); }
.product-ui .progress-numbers strong { color:var(--product-lime); font-size:2.9rem; }
.product-ui .progress-numbers strong span, .product-ui .progress-numbers>span { color:#d8e1f0; }
.product-ui .progress-track { background:#50617c; border-radius:99px; }
.product-ui .progress-track>span { background:var(--product-lime); border-radius:99px; }
.product-ui .challenge-category-nav { display:flex; flex-wrap:wrap; gap:9px; margin:22px 0!important; padding:3px 0; }
.product-ui .challenge-category-nav a { display:inline-flex; align-items:center; min-height:44px; padding:10px 16px; border:1px solid #d6dbe6; border-radius:999px; background:#fff; color:#303e61; font-size:.83rem; font-weight:750; }
.product-ui .challenge-category-nav a:hover { background:#eef0ff; border-color:#b9c6db; }
.product-ui .dashboard-find { margin:0 0 19px; padding:13px 17px; }
.product-ui .modules-intro { display:flex; flex-wrap:wrap; gap:15px; align-items:center; justify-content:space-between; color:#617085; font-size:.9rem; }
.product-ui .module-section { margin:14px 0; border:1px solid #dfe5e8; border-radius:15px; background:#fff; overflow:hidden; scroll-margin-top:105px; }
.product-ui .module-heading { display:flex; gap:18px; align-items:center; min-height:96px; padding:21px 26px; background:#fff; cursor:pointer; }
.product-ui .module-section[open]>.module-heading { border-bottom:1px solid #e6eaec; background:#fff; }
.product-ui .module-heading:hover { background:#f4f6fc; }
.product-ui .module-number { display:grid; place-items:center; width:50px; height:50px; flex-shrink:0; border-radius:12px; background:#eaf0ff; color:#293bb1; font-weight:850; font-size:1.02rem; }
.product-ui .module-name strong { display:block; color:#172136; font-size:1.12rem; letter-spacing:-.025em; font-weight:790; }
.product-ui .module-name span { color:#647286; font-size:.86rem; }
.product-ui .module-progress { padding:6px 11px; border-radius:6px; background:#eff2f0; color:#3d5662; font-weight:750; font-size:.79rem; }
.product-ui .challenge-grid { gap:12px; padding:20px; }
.product-ui .challenge-card { background:#fbfcfd; border:1px solid #e2e6eb; border-radius:10px; box-shadow:none; }
.product-ui .challenge-card:hover { background:#eef0ff; border-color:#acb6dd; transform:translateY(-2px); }
.product-ui .challenge-card strong { color:#202d44; }
.product-ui .challenge-card-footer { color:#627085; }
.product-ui .challenge-card.solved { border-left:3px solid #3b9563; }
.product-ui .challenge-card.attempted { border-left:3px solid #c38a38; }
.product-ui .more-challenges { margin:0 20px 20px; }

/* Information, auth, discovery examples, community and profile inherit consistent components. */
.product-ui .info-page { max-width:1000px; padding:clamp(30px,5vw,70px); border:1px solid #e1e4e5; border-radius:16px; background:#fff; }
.product-ui .info-page h1 { font-size:clamp(2.4rem,4.4vw,4rem); line-height:1.08; letter-spacing:-.065em; }
.product-ui .info-page p { color:#5e6c7b; }
.product-ui .about-platform-intro { position:relative; overflow:hidden; border-top:7px solid var(--product-ink); }
.product-ui .about-platform-intro:after { content:""; position:absolute; top:-100px; right:-125px; width:350px; height:350px; background:url('/static/images/mathsread-rose.svg') center/contain no-repeat; opacity:.06; pointer-events:none; }
.product-ui .about-details { grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.product-ui .about-details article { border-radius:13px; border:1px solid #e0e5e7; padding:27px; }
.product-ui .about-details h2 { font-size:1.19rem; }
.product-ui .contact-panel { min-height:395px; border-top:7px solid var(--product-ink); }
.product-ui .contact-email { display:inline-flex; max-width:100%; word-break:break-word; color:#263ba4!important; background:#ecedff; border-radius:10px; }
.product-ui .form-card { position:relative; max-width:510px; padding:clamp(26px,4vw,46px); margin:clamp(18px,4vw,45px) auto; border:1px solid #e0e5e8; border-top:5px solid var(--product-ink); border-radius:15px; box-shadow:0 23px 68px rgba(18,28,48,.075); }
.product-ui .form-card:before { content:""; position:absolute; width:58px; height:58px; top:-27px; right:27px; background:url('/static/images/mathsread-mark.svg') center/contain no-repeat; border:5px solid var(--ui-bg); border-radius:17px; }
.product-ui .form-card h1 { font-size:clamp(2rem,3vw,2.75rem); }
.product-ui .form-card label { color:#303d53; }
.product-ui .form-card input:not([type=checkbox]) { border:1px solid #c9d0db; background:#fff; border-radius:8px; }
.product-ui .form-card form button[type=submit] { min-height:49px; border-radius:8px; }
.product-ui .login-captcha { background:#f5f6f9; border:1px solid #e2e5eb; border-radius:10px; }
.product-ui .graph-examples-page h1 { font-size:clamp(2.3rem,4vw,3.7rem); }
.product-ui .graph-examples-page .plotted-example { border-radius:11px; }
.product-ui .graph-examples-page .plotted-example:hover { box-shadow:0 11px 26px rgba(18,28,48,.08); border-color:#a4afd6; transform:translateY(-2px); }
.product-ui .community-hero { border-radius:16px; background:var(--product-ink); color:#fff; }
.product-ui .community-hero h2,.product-ui .community-hero h1 { color:#fff; }
.product-ui .community-hero p { color:#c2cada; }
.product-ui .community-hero .eyebrow-label { color:var(--product-lime); }
.product-ui .people-search-panel,.product-ui .network-grid>section,.product-ui .profile-summary-card,.product-ui .profile-settings-card { border:1px solid #e0e5e7; border-radius:14px; background:#fff; }
.product-ui .people-search-panel input { border-radius:9px; }
.product-ui .profile-avatar { background:#e5e9ff; color:#293bb1; }
.product-ui .member-section,.product-ui .member-profile-card { border-color:#e0e5e7; }
.product-ui .member-btn-primary { background:var(--product-ink); }

/* Tablet + phone: usable controls, legible content, and no horizontal layout traps. */
@media(max-width:1120px) {
  .product-ui .platform-container,.product-ui .footer-inner,.product-ui .platform-header-inner { width:calc(100% - 42px); }
  .product-ui .landing-hero h1 { font-size:clamp(2.6rem,5.4vw,4.4rem); }
  .product-ui .math-paths-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-ui .landing-feature-grid .feature-card { min-height:195px; }
  .product-ui .public-problem-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:920px) {
  .product-ui .landing-hero { grid-template-columns:1fr; }
  .product-ui .hero-copy { padding:52px clamp(28px,6vw,65px) 44px; }
  .product-ui .landing-hero h1 { max-width:770px; font-size:clamp(2.8rem,7vw,4.6rem); }
  .product-ui .hero-visual { width:100%; min-height:350px; padding:33px; }
  .product-ui .hero-orbit-art { inset:-160px -30px; }
  .product-ui .landing-how { align-items:flex-start; flex-direction:column; }
  .product-ui .about-details { grid-template-columns:1fr; }
}
@media(max-width:760px) {
  .product-ui .platform-container,.product-ui .footer-inner,.product-ui .platform-header-inner { width:calc(100% - 32px); }
  .product-ui .platform-main { padding:22px 0 65px; }
  .product-ui .platform-header-inner { min-height:68px; }
  .product-ui .landing-section { margin-top:52px; }
  .product-ui .landing-how { padding:29px; margin-top:48px; }
  .product-ui .brahmagupta-tribute { padding:25px; }
  .product-ui .public-problem-module>h2 { padding:23px 22px 0; }
  .product-ui .public-problem-module>p { padding-inline:22px; }
  .product-ui .public-problem-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .product-ui .public-problem-tile-link { padding:20px; }
  .product-ui .curriculum-hero { grid-template-columns:1fr; padding:32px; }
  .product-ui .progress-summary { max-width:340px; }
  .product-ui .discovery-controls { gap:10px; }
  .product-ui .discovery-difficulties { width:100%; }
}
@media(max-width:560px) {
  .product-ui .platform-container,.product-ui .footer-inner,.product-ui .platform-header-inner { width:calc(100% - 26px); }
  .product-ui .platform-main { padding-top:14px!important; }
  .product-ui .platform-header-inner { min-height:64px; gap:10px; }
  .product-ui .brand-lockup .brand-logo { width:36px; height:36px; border-radius:9px; }
  .product-ui .brand-lockup .brand-name { font-size:1.1rem; }
  .product-ui .brand-lockup .brand-name small { font-size:.53rem; }
  .product-ui .guest-join { padding:8px 10px; font-size:.78rem; }
  .product-ui .landing-hero { border-radius:13px; min-height:0; }
  .product-ui .hero-copy { padding:39px 25px 31px; }
  .product-ui .landing-hero h1 { margin:19px 0; font-size:clamp(2.65rem,11.8vw,4.3rem); }
  .product-ui .landing-hero .hero-description { font-size:.99rem; }
  .product-ui .landing-actions { flex-direction:column; align-items:stretch; gap:8px; }
  .product-ui .landing-actions .btn { width:100%; }
  .product-ui .hero-secondary-action { display:block; text-align:center; padding:12px; }
  .product-ui .hero-visual { min-height:280px; padding:24px 18px 42px; }
  .product-ui .math-paths-grid { grid-template-columns:1fr; }
  .product-ui .landing-feature-grid .feature-card { min-height:0; padding:23px; }
  .product-ui .landing-section-heading h2 { font-size:2rem; }
  .product-ui .landing-how { padding:25px; }
  .product-ui .brahmagupta-tribute { align-items:flex-start; gap:14px; }
  .product-ui .tribute-mark { width:51px; height:51px; flex-basis:51px; font-size:2rem; }
  .product-ui .brahmagupta-tribute h2 { font-size:1.35rem; }
  .product-ui .public-problem-intro h1 { font-size:clamp(2rem,8.5vw,2.9rem); }
  .product-ui .discovery-controls,.product-ui .dashboard-find { margin-top:18px; padding:13px; }
  .product-ui .discovery-search { flex-basis:100%; }
  .product-ui .discovery-difficulties { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; }
  .product-ui .discovery-difficulties button { min-width:0; padding:8px 2px; font-size:.72rem; }
  .product-ui .public-problem-grid { grid-template-columns:1fr; }
  .product-ui .public-problem-tile { border-right:0; }
  .product-ui .public-problem-module>h2 { font-size:1.23rem; }
  .product-ui .public-problem-tile-link { min-height:0; }
  .product-ui .public-problem-detail .public-problem-article { padding:20px 15px; }
  .product-ui .public-workspace-heading { display:flex; flex-direction:column; align-items:flex-start; }
  .product-ui .curriculum-hero { padding:26px 22px; }
  .product-ui .curriculum-hero h1 { font-size:2.25rem; }
  .product-ui .module-heading { gap:10px; padding:17px 13px; }
  .product-ui .module-number { width:39px; height:39px; font-size:.83rem; }
  .product-ui .module-name strong { font-size:1rem; }
  .product-ui .module-progress { font-size:.72rem; }
  .product-ui .challenge-grid { padding:12px; }
  .product-ui .info-page { padding:30px 24px; }
  .product-ui .form-card { margin-top:30px; }
  .product-ui .footer-inner { gap:15px; }
}
@media(prefers-reduced-motion:reduce) {
  .product-ui .hero-orbit-art img { animation:none; }
  .product-ui .feature-card,.product-ui .btn,.product-ui button { transition:none; }
}
@keyframes mathsread-orbit { to { transform:rotate(360deg); } }
/* Specificity guard: the previous theme targets `body.platform-body`.
   Keep the signed-in dashboard legible after both themes are loaded. */
body.product-ui .curriculum-hero { background:var(--product-ink); color:#f6f7ff; border:0; box-shadow:none; }
body.product-ui .curriculum-hero h1 { color:#fff; }
body.product-ui .curriculum-hero p:last-child { color:#c3ccdc; }
body.product-ui .progress-summary { background:rgba(255,255,255,.09); border:1px solid #43516f; }
body.product-ui .progress-numbers strong { color:var(--product-lime); }
body.product-ui .progress-numbers strong span,body.product-ui .progress-numbers>span { color:#e2e8f3; }
body.product-ui .progress-track { background:#50617c; }
body.product-ui .progress-track>span { background:var(--product-lime); }
body.product-ui .modules-intro { display:block; }
body.product-ui .module-status-guide { margin-left:14px; }
/* Personal space and community retain their functionality but share the mark. */
body.product-ui .member-area .member-hero,body.product-ui .member-area .member-section { border-color:#e0e6e6; border-radius:16px; box-shadow:0 9px 30px rgba(18,28,48,.035); }
body.product-ui .member-cover { background:#121c30; color:#eef4e6; }
body.product-ui .member-cover::before { width:470px; height:470px; top:-185px; right:-28px; border:0; border-radius:0; box-shadow:none; background:url('/static/images/mathsread-rose.svg') center/contain no-repeat; opacity:.5; }
body.product-ui .member-cover-label { color:#e5f79a; }
body.product-ui .member-cover-mark { color:#e5f79a; opacity:.42; }
body.product-ui .member-avatar-owner { color:#1b2943; background:#e5f79a; }
body.product-ui .member-eyebrow { color:#3c4ba5; }
body.product-ui .member-btn-primary { background:#121c30!important; border-color:#121c30!important; color:#fff!important; }
body.product-ui .member-btn-primary:hover { background:#293a5d!important; }
body.product-ui .member-btn-soft { background:#eef0fb!important; border-color:#dce1f1!important; color:#253a98!important; }
body.product-ui .member-progress-track>span { background:#3e51b9; }
body.product-ui .member-side-nav { top:99px; border-color:#e0e5e7; border-radius:13px; }
body.product-ui .member-side-nav>a:hover { background:#eff0fb; }
body.product-ui .member-side-note { background:#eef0fa; }
body.product-ui .member-username-check-button { background:#eef0fa; color:#2c3e9a; border-color:#c6cde8; }
body.product-ui .member-area .activity-calendar { border-color:#e0e5e7; border-radius:14px; box-shadow:none; }
body.product-ui .activity-level-4 { background:#293caa; }
body.product-ui .activity-level-3 { background:#6d82c1; }
body.product-ui .activity-level-2 { background:#b0bbe0; }
@media(max-width:900px) { body.product-ui .member-side-nav { position:static; } }

/* Global learner identity, nationality preference, and rotating mathematical tributes. */
body.product-ui .nationality-select { display:block; width:100%; min-height:48px; padding:11px 14px; border:1px solid #b9c5d3; border-radius:11px; background:#fff; color:#142137; font:inherit; line-height:1.45; cursor:pointer; }
body.product-ui .nationality-select:focus-visible { outline:3px solid #4a69d5; outline-offset:2px; }
body.product-ui .product-auth-card > form > label[for="signup-nationality"] { display:block; margin:15px 0 6px; font-weight:750; color:#263653; }
body.product-ui .nationality-help { margin:7px 0 14px; color:#5a6679; font-size:.81rem; line-height:1.5; }
body.product-ui .member-nationality-field { margin:7px 0 19px; }
body.product-ui .member-nationality-field > label { display:block; font-weight:750; color:#283b57; margin-bottom:7px; }
body.product-ui .member-nationality-field small { display:block; color:#6b7a8f; margin-top:7px; line-height:1.45; }
body.product-ui .member-nationality-public { color:#415276; font-size:.92rem; font-weight:700; margin:0 0 14px; }
body.product-ui .mathsread-minds-tribute { position:relative; isolation:isolate; overflow:hidden; margin:34px 0; }
body.product-ui .mathsread-minds-copy { position:relative; z-index:1; max-width:690px; }
body.product-ui .mathsread-minds-origin { font-size:.82rem; opacity:.78; font-weight:700; letter-spacing:.015em; }
body.product-ui .mathsread-minds-thought { font-size:.85rem; font-weight:770; color:#bddf61; }
body.product-ui .mathsread-minds-rose { position:absolute; pointer-events:none; inset:-70px -40px -70px auto; width:350px; opacity:.16; background:url('/static/images/mathsread-rose.svg') center/contain no-repeat; }
body.product-ui .mathsread-mathematicians { margin:30px 0; }
body.product-ui .mathematician-history-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:22px 0 34px; }
body.product-ui .mathematician-history-card { border:1px solid #dce4ed; border-radius:16px; background:#fff; padding:22px; min-width:0; }
body.product-ui .mathematician-history-card h3 { margin:10px 0 8px; font-size:1.22rem; color:#18243b; }
body.product-ui .mathematician-history-card p { color:#55657d; line-height:1.58; font-size:.88rem; margin:0; }
body.product-ui .mathematician-history-symbol { display:grid; place-items:center; height:45px; width:45px; border-radius:12px; background:#eef4e7; color:#1f5255; font-size:1.5rem; }
@media(max-width:950px) { body.product-ui .mathematician-history-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { body.product-ui .mathematician-history-grid { grid-template-columns:1fr; } body.product-ui .mathsread-minds-tribute { margin:24px 0; } body.product-ui .mathsread-minds-rose { width:240px; opacity:.08; } }


/* Shared contact + careers mailbox: same visual form and controlled states. */
body.product-ui .contact-hub { position:relative; max-width:1070px; margin-inline:auto; padding:clamp(24px,4.5vw,64px); display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1fr); gap:clamp(24px,4vw,58px); align-items:start; }
body.product-ui .contact-hub-intro { position:relative; z-index:1; min-width:0; }
body.product-ui .contact-hub-intro h1 { margin:10px 0 20px; font-size:clamp(2.4rem,4.8vw,4.4rem); }
body.product-ui .contact-hub-intro .contact-hub-lede { color:#162640; font-weight:730; font-size:clamp(1.1rem,1.7vw,1.35rem); line-height:1.45; }
body.product-ui .contact-hub-intro p { line-height:1.65; }
body.product-ui .contact-hub-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:30px; }
body.product-ui .contact-hub-links a { display:inline-flex; align-items:center; padding:10px 16px; min-height:44px; border:1px solid #ced8e6; border-radius:99px; background:#f7f9fb; color:#2d3c55; font-size:.86rem; font-weight:750; }
body.product-ui .contact-hub-links a[aria-current="page"] { color:#fff; border-color:#121c30; background:#121c30; }
body.product-ui .contact-hub-form-shell { position:relative; z-index:1; padding:clamp(22px,3vw,35px); min-width:0; border:1px solid #dce3eb; border-radius:16px; background:#fbfcff; box-shadow:0 15px 48px rgba(17,28,48,.05); }
body.product-ui .contact-form-heading { display:flex; gap:14px; align-items:center; margin-bottom:26px; }
body.product-ui .contact-form-heading h2 { margin:0; color:#17233b; font-size:1.35rem; }
body.product-ui .contact-form-heading p { margin:4px 0 0; font-size:.84rem; }
body.product-ui .contact-form-symbol { display:grid; place-items:center; flex:0 0 43px; height:43px; color:#dae8a1; background:#132341; border-radius:12px; font-size:1.8rem; }
body.product-ui .contact-message-form { display:grid; gap:23px; }
body.product-ui .contact-field label { display:block; margin-bottom:9px; color:#263a55; font-size:.9rem; font-weight:750; }
body.product-ui .contact-field label span { color:#af392e; }
body.product-ui .contact-field input,body.product-ui .contact-field textarea { box-sizing:border-box; display:block; width:100%; min-width:0; padding:13px 15px; border:1px solid #b8c5d5; border-radius:10px; background:#fff; color:#16243d; font:inherit; line-height:1.5; }
body.product-ui .contact-field input { min-height:49px; }
body.product-ui .contact-field textarea { min-height:155px; resize:vertical; }
body.product-ui .contact-field input:focus-visible,body.product-ui .contact-field textarea:focus-visible { outline:3px solid #6880da; outline-offset:2px; }
body.product-ui .contact-character-help { margin:7px 0 0; font-size:.78rem; line-height:1.5; color:#5b6d80; }
body.product-ui .contact-send-button { display:inline-flex; justify-content:center; align-items:center; gap:20px; min-height:50px; border-radius:10px; font-weight:800; cursor:pointer; }
body.product-ui .contact-global-note { grid-column:1/-1; margin:0; padding-top:24px; border-top:1px solid #e3e8ed; font-size:.86rem; }
@media(max-width:800px) { body.product-ui .contact-hub { grid-template-columns:1fr; } body.product-ui .contact-hub-links { margin-top:20px; } }
@media(max-width:480px) { body.product-ui .contact-hub { padding:25px 17px; } body.product-ui .contact-hub-form-shell { padding:20px 16px; } }
