/* Shared design for the homepage, free tests and results page (white/blue). */
  :root {
    --h-blue: #1f5eff; --h-blue-dark: #1748cc; --h-blue-soft: #eef3ff;
    --h-ink: #0b1220; --h-dim: #5b6475; --h-line: #e6e8ee; --h-soft: #f6f8fb;
    --h-green: #16a34a; --h-green-soft: #eaf7ef; --h-red: #e5484d; --h-red-soft: #fdeeee;
    --h-amber: #d97706; --h-amber-soft: #fff6e6;
  }
  body { background: #fff; color: var(--h-ink); }
  .h-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
  .h-eyebrow { font: 600 0.74rem/1.2 "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--h-dim); }
  .h-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 10px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; }
  .h-btn-primary { background: var(--h-blue); color: #fff; }
  .h-btn-primary:hover { background: var(--h-blue-dark); }
  .h-btn-ghost { background: #fff; color: var(--h-ink); border-color: var(--h-line); }
  .h-btn-ghost:hover { border-color: #c9cfdb; }
  .h-btn:focus-visible, .h-nav a:focus-visible { outline: 3px solid #9db7ff; outline-offset: 2px; }
  .h-section { padding: 88px 0; }
  .h-section h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 10px; line-height: 1.1; }
  .h-sub { color: var(--h-dim); font-size: 1.08rem; margin: 0 0 40px; max-width: 640px; line-height: 1.55; }

  /* nav */
  .h-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--h-line); }
  .h-nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
  .h-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--h-ink); text-decoration: none; }
  .h-logo-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
  .h-logo-mark i { width: 5px; background: var(--h-blue); border-radius: 1px; }
  .h-links { display: flex; gap: 24px; margin-left: 12px; padding: 0; border: 0; background: none; position: static; backdrop-filter: none; } /* reset the site-wide nav{} rule */
  .h-links a { color: var(--h-ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
  .h-links a:hover { color: var(--h-blue); }
  .h-nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
  .h-nav-right .h-btn { padding: 10px 16px; font-size: 0.92rem; }
  #nav-auth-slot { display: flex; align-items: center; gap: 8px; }
  #nav-auth-slot .btn { white-space: nowrap; }
  .h-menu { display: none; position: relative; }
  .h-menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 8px 12px; border: 1px solid var(--h-line); border-radius: 8px; }
  .h-menu summary::-webkit-details-marker { display: none; }
  .h-menu-panel { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--h-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(11,18,32,0.12); padding: 8px; display: flex; flex-direction: column; min-width: 200px; }
  .h-menu-panel a { padding: 10px 12px; color: var(--h-ink); text-decoration: none; border-radius: 8px; }
  .h-menu-panel a:hover { background: var(--h-soft); }

  /* hero */
  .h-hero { padding: 56px 0 72px; background: linear-gradient(180deg, #f7f9ff 0%, #fff 100%); }
  .h-hero-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; align-items: center; }
  .h-hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; margin: 16px 0 22px; }
  .h-hero h1 .blue { color: var(--h-blue); }
  .h-hero h1 .uline { background: linear-gradient(transparent 82%, #b6e34a 82%, #b6e34a 94%, transparent 94%); }
  .h-hero-copy { font-size: 1.22rem; color: #2b3445; line-height: 1.5; margin: 0 0 30px; max-width: 520px; }
  .h-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
  .h-micro { font-size: 0.86rem; color: var(--h-dim); margin-top: 12px; }
  .h-proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: 0.9rem; color: #2b3445; }
  .h-proof span::before { content: "✓"; color: var(--h-blue); font-weight: 800; margin-right: 7px; }

  /* sample dashboard */
  .h-dash { background: #fff; border: 1px solid var(--h-line); border-radius: 18px; box-shadow: 0 24px 60px rgba(31,94,255,0.10), 0 2px 6px rgba(11,18,32,0.05); padding: 22px; }
  .h-dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
  .h-xl { width: 34px; height: 34px; border-radius: 8px; background: #107c41; color: #fff; display: grid; place-items: center; font: 700 0.85rem "JetBrains Mono", monospace; }
  .h-dash-head h3 { margin: 0; font-size: 1.05rem; }
  .h-sample { margin-left: auto; font-size: 0.75rem; font-weight: 700; color: var(--h-amber); background: var(--h-amber-soft); padding: 4px 10px; border-radius: 999px; }
  .h-dash-body { display: grid; grid-template-columns: 112px 1fr 172px; gap: 18px; align-items: center; }
  .h-ring { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--h-blue) calc(var(--p) * 1%), #e9edf5 0); }
  .h-ring-inner { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
  .h-ring-inner b { font-size: 1.7rem; display: block; line-height: 1; }
  .h-ring-inner small { font-size: 0.72rem; color: var(--h-dim); }
  .h-bars { display: flex; flex-direction: column; gap: 9px; }
  .h-bar { display: grid; grid-template-columns: 104px 1fr 26px; gap: 8px; align-items: center; font-size: 0.78rem; }
  .h-bar > span:first-child { white-space: nowrap; }
  .h-bar-track { height: 7px; background: #eceff5; border-radius: 999px; overflow: hidden; }
  .h-bar-track span { display: block; height: 100%; border-radius: 999px; }
  .h-bar b { font-size: 0.78rem; text-align: right; }
  .h-gap { background: var(--h-red-soft); border-radius: 12px; padding: 14px; font-size: 0.82rem; }
  .h-gap .h-eyebrow { color: var(--h-red); font-size: 0.66rem; }
  .h-gap strong { display: block; font-size: 1.05rem; margin: 6px 0; }
  .h-gap p { margin: 0 0 10px; color: #3d4557; line-height: 1.4; }
  .h-gap a { display: block; text-align: center; background: var(--h-red); color: #fff; text-decoration: none; padding: 8px; border-radius: 8px; font-weight: 700; }
  .h-path { margin-top: 18px; border-top: 1px solid var(--h-line); padding-top: 14px; }
  .h-path h4 { margin: 0 0 10px; font-size: 0.9rem; }
  .h-path-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .h-step { border: 1px solid var(--h-line); border-radius: 10px; padding: 10px; font-size: 0.8rem; }
  .h-step b { display: block; font-size: 0.84rem; margin-bottom: 2px; }
  .h-step span { color: var(--h-dim); }
  .h-step i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--h-blue-soft); color: var(--h-blue); font-weight: 800; font-size: 0.72rem; margin-bottom: 6px; }
  .h-step:first-child i { background: var(--h-red); color: #fff; }

  /* tracks */
  .h-tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .h-track { border-radius: 16px; padding: 24px; display: flex; flex-direction: column; border: 1px solid transparent; }
  .h-track.excel { background: #effaf3; border-color: #d3efdc; }
  .h-track.ai { background: #eef3ff; border-color: #d8e3ff; }
  .h-track.py { background: #f4f0ff; border-color: #e4dcff; }
  .h-track-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font: 700 1rem "JetBrains Mono", monospace; margin-bottom: 14px; }
  .h-track h3 { margin: 0 0 8px; font-size: 1.25rem; }
  .h-track p { margin: 0 0 14px; color: #3d4557; line-height: 1.5; font-size: 0.95rem; }
  .h-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
  .h-chips span { background: #fff; border: 1px solid rgba(11,18,32,0.08); border-radius: 999px; padding: 4px 10px; font-size: 0.78rem; }
  .h-track a.h-go { margin-top: auto; font-weight: 700; text-decoration: none; color: var(--h-blue); }
  .h-track.excel a.h-go { color: #0f7a3d; }
  .h-track.py a.h-go { color: #6d4ae0; }

  /* how it works */
  .h-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .h-how-card { border: 1px solid var(--h-line); border-radius: 16px; padding: 24px; }
  .h-how-card .num { font: 700 0.8rem "JetBrains Mono", monospace; color: var(--h-blue); }
  .h-how-card h3 { margin: 8px 0; font-size: 1.2rem; }
  .h-how-card p { margin: 0; color: var(--h-dim); line-height: 1.55; }

  /* live task */
  .h-task-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
  /* grid items default to min-width:auto, so the 460px sheet would widen the
     whole column on phones instead of scrolling inside its wrapper */
  .h-hero-grid > *, .h-task-grid > *, .h-progress > *, .h-teams > * { min-width: 0; }
  .h-panel { border: 1px solid var(--h-line); border-radius: 16px; padding: 22px; background: #fff; }
  .h-panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
  .h-panel-head .h-tag { background: var(--h-soft); border: 1px solid var(--h-line); border-radius: 8px; padding: 4px 10px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
  .h-panel-head h3 { margin: 0 0 4px; font-size: 1.05rem; }
  .h-panel-head p { margin: 0; color: var(--h-dim); font-size: 0.9rem; }
  .h-sheet-wrap { overflow-x: auto; }
  .h-sheet { border-collapse: collapse; width: 100%; font-size: 0.88rem; min-width: 460px; }
  .h-sheet th, .h-sheet td { border: 1px solid #dfe3ea; padding: 7px 10px; }
  .h-sheet th { background: #f3f5f8; color: var(--h-dim); font-weight: 600; font-size: 0.78rem; text-align: center; }
  .h-sheet td.rn { background: #f3f5f8; color: var(--h-dim); text-align: center; width: 34px; font-size: 0.78rem; }
  .h-sheet td.hd { font-weight: 700; }
  .h-sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .h-sheet td.target { background: #fff8db; padding: 0; outline: 2px solid var(--h-blue); outline-offset: -2px; }
  .h-sheet td.target input { width: 100%; border: 0; background: transparent; padding: 7px 10px; font: 500 0.88rem "JetBrains Mono", monospace; min-width: 170px; }
  .h-sheet td.target input:focus { outline: none; }
  .h-task-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
  .h-task-actions small { color: var(--h-dim); }
  .h-fb-empty { color: var(--h-dim); font-size: 0.95rem; line-height: 1.5; }
  .h-fb-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 4px; }
  .h-fb-value { color: var(--h-dim); font-size: 0.88rem; margin: 0 0 14px; }
  .h-fb-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--h-line); font-size: 0.9rem; line-height: 1.45; }
  .h-fb-item b { display: block; }
  .h-fb-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.75rem; }
  .h-fb-dot.ok { background: var(--h-green); } .h-fb-dot.warn { background: #f59e0b; } .h-fb-dot.bad { background: var(--h-red); }
  .h-fb-next { margin-top: 14px; font-size: 0.9rem; }

  /* progress */
  .h-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  .h-chart { border: 1px solid var(--h-line); border-radius: 16px; padding: 22px; }
  .h-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
  .h-chart-head b { font-size: 1.6rem; }
  .h-chart-head .up { color: var(--h-green); font-weight: 700; }
  .h-cols { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-bottom: 6px; border-bottom: 1px solid var(--h-line); }
  .h-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.8rem; height: 100%; justify-content: flex-end; }
  .h-col span { width: 100%; max-width: 54px; border-radius: 8px 8px 3px 3px; background: var(--h-blue); }
  .h-col:first-child span { background: var(--h-red); }
  .h-col-labels { display: flex; gap: 14px; margin-top: 8px; }
  .h-col-labels small { flex: 1; text-align: center; color: var(--h-dim); font-size: 0.74rem; }
  .h-rubric { background: #fff; border: 1px solid var(--h-line); border-radius: 12px; padding: 16px 18px; margin-top: 18px; font-size: 0.92rem; line-height: 1.55; color: #2b3445; }

  /* teams */
  .h-teams { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; background: var(--h-ink); color: #fff; border-radius: 22px; padding: 44px; }
  .h-teams h2 { color: #fff; }
  .h-teams p { color: #c8cfdc; line-height: 1.6; margin: 0 0 22px; }
  .h-teams ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
  .h-teams li { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 12px 14px; font-size: 0.92rem; }
  .h-teams li b { display: block; }

  /* pricing */
  .h-bundle { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--h-blue-soft); border: 1px solid #d8e3ff; border-radius: 14px; padding: 18px 22px; margin-bottom: 18px; }
  .h-bundle b { font-size: 1.1rem; }
  .h-bundle span { display: block; color: var(--h-dim); font-size: 0.92rem; }
  .h-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .h-price { border: 1px solid var(--h-line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; }
  .h-price.featured { border: 2px solid var(--h-blue); }
  .h-price h3 { margin: 0; font-size: 1.1rem; }
  .h-price .amt { font-size: 2.2rem; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.02em; }
  .h-price .amt small { font-size: 0.9rem; font-weight: 500; color: var(--h-dim); }
  .h-price ul { list-style: none; padding: 0; margin: 14px 0 22px; color: #2b3445; font-size: 0.93rem; flex: 1; }
  .h-price li { padding: 5px 0; }
  .h-price li::before { content: "✓"; color: var(--h-green); font-weight: 800; margin-right: 8px; }
  .h-price .h-btn { justify-content: center; }
  .h-track-prices a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--h-line); color: var(--h-ink); text-decoration: none; }
  .h-track-prices a span { color: var(--h-dim); font-family: "JetBrains Mono", monospace; font-size: 0.85rem; }

  /* faq + final */
  .h-faq { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
  .h-faq details { border: 1px solid var(--h-line); border-radius: 12px; padding: 16px 18px; }
  .h-faq summary { font-weight: 700; cursor: pointer; }
  .h-faq p { margin: 10px 0 0; color: var(--h-dim); line-height: 1.6; }
  .h-final { text-align: center; background: linear-gradient(180deg, #fff 0%, #f2f6ff 100%); }
  .h-final .h-sub { margin-left: auto; margin-right: auto; }
  .h-footer { border-top: 1px solid var(--h-line); padding: 28px 0 40px; color: var(--h-dim); font-size: 0.88rem; }
  .h-footer a { color: var(--h-dim); }

  @media (max-width: 1020px) {
    .h-links { display: none; }
    .h-menu { display: block; }
    .h-hero-grid, .h-task-grid, .h-progress, .h-teams { grid-template-columns: 1fr; }
    .h-tracks, .h-how, .h-prices { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    .h-nav-right .h-nav-cta { display: none; }
    .h-nav-inner { gap: 12px; }
    .h-logo { font-size: 1.08rem; }
    .h-nav-right { gap: 8px; }
    #nav-auth-slot .nav-username, #nav-auth-slot .streak-badge, #nav-auth-slot button[onclick="logout()"] { display: none; } /* Account page has these */
    .h-dash-body { grid-template-columns: 1fr; justify-items: center; }
    .h-bars, .h-gap { width: 100%; }
    .h-path-steps { grid-template-columns: 1fr; }
    .h-section { padding: 64px 0; }
    .h-teams { padding: 28px 22px; }
  }

/* free tests + results page */
.h-page-hero { padding: 64px 0 48px; background: linear-gradient(180deg, #f7f9ff 0%, #fff 100%); }
.h-page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.02; margin: 14px 0 18px; }
.h-page-hero h1 .blue { color: var(--h-blue); }
.h-split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.h-split > * { min-width: 0; }
.h-skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.h-skill { border: 1px solid var(--h-line); border-radius: 14px; padding: 18px; background: #fff; }
.h-skill h3 { margin: 0 0 6px; font-size: 1.02rem; }
.h-skill p { margin: 0 0 10px; color: var(--h-dim); font-size: 0.9rem; line-height: 1.45; }
.h-skill code { display: inline-block; background: var(--h-soft); border: 1px solid var(--h-line); border-radius: 6px; padding: 3px 7px; font: 500 0.8rem "JetBrains Mono", ui-monospace, monospace; color: var(--h-ink); }
.h-form { display: flex; flex-direction: column; gap: 12px; }
.h-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; font-weight: 600; }
.h-form input { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid var(--h-line); border-radius: 10px; }
.h-form input:focus { outline: 2px solid #9db7ff; border-color: var(--h-blue); }
.h-form-msg { font-size: 0.9rem; min-height: 1.2em; }
.h-form-msg.err { color: var(--h-red); }
.h-linkbtn { background: none; border: 0; color: var(--h-blue); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
@media (max-width: 1020px) { .h-split, .h-skill-grid { grid-template-columns: 1fr; } }

.h-sheet.pointing td[data-ref] { cursor: cell; user-select: none; }
