/* HSPT online practice test simulator */
:root {
  --hs-top: 60px;               /* height of the fixed site header */
  --hs-ink: #1b2433;
  --hs-muted: #5b6678;
  --hs-line: #dfe4ec;
  --hs-bg: #f4f6fa;
  --hs-card: #ffffff;
  --hs-brand: #0D47A1;
  --hs-brand-2: #1976D2;
  --hs-brand-soft: #e7effb;
  --hs-ok: #1e7b45;
  --hs-ok-soft: #e4f4ea;
  --hs-bad: #b3261e;
  --hs-bad-soft: #fbe9e7;
  --hs-amber: #a66300;
  --hs-amber-soft: #fff3dc;
  --hs-flag: #c77700;
}

body.hs-body { background: var(--hs-bg); color: var(--hs-ink); }
.hidden { display: none !important; }
.hs-app { padding-top: calc(var(--hs-top) + 24px); padding-bottom: 64px; min-height: 80vh; }
.hs-loading { text-align: center; padding: 80px 16px; color: var(--hs-muted); }
.hs-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.hs-narrow { max-width: 820px; }
.hs-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--hs-brand-2); margin-bottom: .4rem; }

/* buttons */
.hs-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 10px; border: 1px solid transparent;
  padding: .6rem 1.1rem; font-weight: 600; font-size: .98rem; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.hs-btn:focus-visible { outline: 3px solid #90b8f0; outline-offset: 2px; }
.hs-btn[disabled] { opacity: .45; cursor: not-allowed; }
.hs-btn-primary { background: var(--hs-brand); color: #fff; }
.hs-btn-primary:hover { background: #0b3a84; }
.hs-btn-ghost { background: #fff; color: var(--hs-ink); border-color: var(--hs-line); }
.hs-btn-ghost:hover { border-color: var(--hs-brand-2); color: var(--hs-brand); }
.hs-btn-ghost.on { background: var(--hs-amber-soft); border-color: var(--hs-flag); color: var(--hs-amber); }
.hs-btn-lg { padding: .85rem 1.5rem; font-size: 1.08rem; }
.hs-btn-sm { padding: .42rem .75rem; font-size: .9rem; }
.hs-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.hs-center { justify-content: center; }

/* lobby */
.hs-hero { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.hs-hero h1 { font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .6rem; }
.hs-hero p { color: var(--hs-muted); font-size: 1.05rem; }
.hs-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.hs-how-item { background: var(--hs-card); border: 1px solid var(--hs-line); border-radius: 14px; padding: 18px; }
.hs-how-item i { font-size: 1.5rem; color: var(--hs-brand-2); }
.hs-how-item h3 { font-size: 1.05rem; font-weight: 700; margin: .5rem 0 .3rem; }
.hs-how-item p { font-size: .94rem; color: var(--hs-muted); margin: 0; }
.hs-details { background: var(--hs-card); border: 1px solid var(--hs-line); border-radius: 12px; padding: 12px 16px; margin-bottom: 24px; }
.hs-details summary { cursor: pointer; font-weight: 600; }
.hs-sections-table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.hs-sections-table th, .hs-sections-table td { padding: 6px 8px; border-bottom: 1px solid var(--hs-line); text-align: left; }
.hs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.hs-card { position: relative; background: var(--hs-card); border: 1px solid var(--hs-line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.hs-card-num { width: 44px; height: 44px; border-radius: 12px; background: var(--hs-brand-soft); color: var(--hs-brand); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.hs-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .3rem; }
.hs-status { font-size: .9rem; color: var(--hs-muted); margin-bottom: 14px; flex: 1; }
.hs-status-done { color: var(--hs-ok); font-weight: 600; }
.hs-status-progress { color: var(--hs-amber); font-weight: 600; }
.hs-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hs-note { text-align: center; color: var(--hs-muted); font-size: .9rem; margin-top: 24px; }

/* panels & subtest intro */
.hs-panel { background: var(--hs-card); border: 1px solid var(--hs-line); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.hs-panel h2 { font-size: 1.3rem; font-weight: 800; }
.hs-intro h1 { font-weight: 800; font-size: 2rem; margin-bottom: 1rem; }
.hs-facts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.hs-facts div { background: var(--hs-bg); border-radius: 12px; padding: 10px 16px; min-width: 110px; }
.hs-facts b { display: block; font-size: 1.4rem; }
.hs-facts span { font-size: .85rem; color: var(--hs-muted); }
.hs-callout { background: var(--hs-brand-soft); border-radius: 10px; padding: 12px 14px; }
.hs-callout i { color: var(--hs-brand); margin-right: 4px; }
.hs-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; counter-reset: s; }
.hs-steps li { counter-increment: s; font-size: .82rem; padding: 6px 10px; border-radius: 999px; background: #e8ecf2; color: var(--hs-muted); }
.hs-steps li::before { content: counter(s) ". "; }
.hs-steps li.current { background: var(--hs-brand); color: #fff; font-weight: 700; }
.hs-steps li.done { background: var(--hs-ok-soft); color: var(--hs-ok); }
.hs-steps li.done::before { content: "✓ "; }

/* test screen */
body.hs-testing .hs-app { padding-top: var(--hs-top); }
.hs-bar { position: sticky; top: var(--hs-top); z-index: 50; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--hs-line); padding: 10px 16px; box-shadow: 0 2px 8px rgba(20, 30, 50, .06); }
.hs-bar-title span { display: block; font-weight: 800; font-size: 1.05rem; }
.hs-bar-title small { color: var(--hs-muted); font-size: .8rem; }
.hs-bar-tools { display: flex; gap: 8px; }
.hs-clock { font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: 800; padding: 4px 14px; border-radius: 10px; background: var(--hs-brand-soft); color: var(--hs-brand); white-space: nowrap; }
.hs-clock small { font-size: .8rem; font-weight: 600; color: var(--hs-muted); }
.hs-clock-amber { background: var(--hs-amber-soft); color: var(--hs-amber); }
.hs-clock-red { background: var(--hs-bad-soft); color: var(--hs-bad); animation: hs-pulse 1s infinite; }
@keyframes hs-pulse { 50% { opacity: .65; } }
.hs-progress { height: 4px; background: #e3e8f0; position: sticky; z-index: 49; }
.hs-progress div { height: 100%; background: var(--hs-brand-2); transition: width .2s; }

.hs-map { max-width: 1080px; margin: 12px auto 0; background: #fff; border: 1px solid var(--hs-line); border-radius: 14px; padding: 14px 16px; }
.hs-map-legend { font-size: .85rem; color: var(--hs-muted); margin-bottom: 10px; }
.hs-map-legend .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; border: 1px solid var(--hs-line); }
.hs-map-legend .k:first-child { margin-left: 0; }
.k-ans { background: var(--hs-brand-2); } .k-flag { background: var(--hs-amber-soft); border-color: var(--hs-flag) !important; } .k-cur { box-shadow: 0 0 0 2px var(--hs-ink); }
.hs-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.hs-cell { border: 1px solid var(--hs-line); background: #fff; border-radius: 8px; padding: 6px 0; font-weight: 600; font-size: .88rem; cursor: pointer; }
.hs-cell.ans { background: var(--hs-brand-2); color: #fff; border-color: var(--hs-brand-2); }
.hs-cell.flag { background: var(--hs-amber-soft); color: var(--hs-amber); border-color: var(--hs-flag); }
.hs-cell.ans.flag { background: var(--hs-brand-2); color: #fff; box-shadow: inset 0 -4px 0 var(--hs-flag); }
.hs-cell.cur { outline: 2px solid var(--hs-ink); outline-offset: 1px; }

.hs-qwrap { max-width: 820px; margin: 20px auto 0; padding: 0 16px; }
.hs-qwrap.hs-with-passage { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.hs-passage { background: #fffdf7; border: 1px solid #eadfc4; border-radius: 14px; padding: 20px 22px; line-height: 1.7; font-size: 1.02rem;
  position: sticky; top: calc(var(--hs-top) + 80px); max-height: calc(100vh - var(--hs-top) - 100px); overflow: auto; }
.hs-passage h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .8rem; }
.hs-qcard { background: var(--hs-card); border: 1px solid var(--hs-line); border-radius: 16px; padding: 24px; }
.hs-qnum { font-weight: 700; color: var(--hs-brand); margin-bottom: 10px; }
.hs-qnum small { color: var(--hs-muted); font-weight: 500; }
.hs-flag-badge { color: var(--hs-flag); font-size: .85rem; margin-left: 6px; }
.hs-stem { font-size: 1.12rem; line-height: 1.6; margin-bottom: 18px; }
.hs-stem svg { max-width: 100%; height: auto; display: block; margin: 10px 0; }
.hs-choices { display: flex; flex-direction: column; gap: 10px; }
.hs-choice { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; background: #fff; border: 2px solid var(--hs-line);
  border-radius: 12px; padding: 12px 14px; font-size: 1.04rem; cursor: pointer; transition: border-color .12s, background .12s; color: var(--hs-ink); }
.hs-choice:hover { border-color: var(--hs-brand-2); background: #f7faff; }
.hs-choice.sel { border-color: var(--hs-brand); background: var(--hs-brand-soft); }
.hs-letter { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--hs-line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--hs-muted); }
.hs-choice.sel .hs-letter { background: var(--hs-brand); border-color: var(--hs-brand); color: #fff; }
.hs-ctext svg { max-width: 160px; height: auto; vertical-align: middle; }
.hs-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hs-keys { text-align: center; color: var(--hs-muted); font-size: .8rem; margin: 14px 0 0; }

/* dialog & toast */
.hs-dialog { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.hs-dialog-box { background: #fff; border-radius: 16px; max-width: 480px; width: 100%; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.hs-dialog-box h3 { font-weight: 800; font-size: 1.3rem; }
.hs-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hs-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--hs-ink); color: #fff; padding: 10px 18px;
  border-radius: 999px; z-index: 2100; transition: all .3s; font-weight: 600; }
.hs-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* results */
.hs-result-hero h1 { font-size: 3.4rem; }
.hs-result-hero h1 small { font-size: 1.6rem; color: var(--hs-muted); }
.hs-big-pct { font-size: 1.2rem !important; font-weight: 700; color: var(--hs-ink) !important; }
.hs-table-wrap { overflow-x: auto; }
.hs-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.hs-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--hs-muted); border-bottom: 2px solid var(--hs-line); padding: 8px; text-align: left; }
.hs-table td { padding: 10px 8px; border-bottom: 1px solid var(--hs-line); vertical-align: top; }
.hs-table small { color: var(--hs-muted); }
.hs-pile { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.hs-pile-low { background: var(--hs-bad-soft); color: var(--hs-bad); }
.hs-pile-mid { background: var(--hs-amber-soft); color: var(--hs-amber); }
.hs-pile-high { background: var(--hs-ok-soft); color: var(--hs-ok); }
.hs-type { margin-bottom: 12px; }
.hs-type-top { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 4px; }
.hs-type-top small { color: var(--hs-muted); }
.hs-bar-track { height: 10px; background: #edf0f5; border-radius: 999px; overflow: hidden; }
.hs-bar-fill { height: 100%; border-radius: 999px; }
.hs-bar-fill.hs-pile-low { background: #d9534f; } .hs-bar-fill.hs-pile-mid { background: #e0a030; } .hs-bar-fill.hs-pile-high { background: #2e9e5b; }

/* review */
.hs-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.hs-filters select { padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--hs-line); background: #fff; }
.hs-review-sec { font-size: 1.3rem; font-weight: 800; margin: 26px 0 10px; }
.hs-review-passage { margin-bottom: 12px; }
.hs-passage-inline { margin-top: 10px; line-height: 1.7; }
.hs-review-item { background: #fff; border: 1px solid var(--hs-line); border-left: 5px solid var(--hs-line); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.hs-review-item.ok { border-left-color: var(--hs-ok); }
.hs-review-item.bad { border-left-color: var(--hs-bad); }
.hs-review-choices { list-style: none; padding: 0; margin: 0 0 10px; }
.hs-review-choices li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.hs-review-choices li em { margin-left: auto; font-style: normal; font-size: .8rem; font-weight: 700; }
.hs-review-choices li.right { background: var(--hs-ok-soft); }
.hs-review-choices li.right em { color: var(--hs-ok); }
.hs-review-choices li.wrong { background: var(--hs-bad-soft); }
.hs-review-choices li.wrong em { color: var(--hs-bad); }
.hs-review-choices .hs-letter { width: 26px; height: 26px; font-size: .85rem; }
.hs-expl { background: var(--hs-bg); border-radius: 8px; padding: 10px 12px; margin: 0; }
.hs-pill { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--hs-muted); margin-left: 6px; }
.hs-pill.ok { background: var(--hs-ok-soft); color: var(--hs-ok); }
.hs-pill.bad { background: var(--hs-bad-soft); color: var(--hs-bad); }

/* small screens */
@media (max-width: 900px) {
  .hs-qwrap.hs-with-passage { grid-template-columns: 1fr; }
  .hs-passage { position: static; max-height: 45vh; }
}
@media (max-width: 720px) {
  .hs-how { grid-template-columns: 1fr; }
  .hs-hide-sm { display: none; }
  .hs-bar { flex-wrap: wrap; padding: 8px 12px; }
  .hs-bar-title { flex: 1 1 100%; }
  .hs-bar-title small { display: none; }
  .hs-clock { font-size: 1.1rem; }
  .hs-qcard { padding: 18px; }
  .hs-stem { font-size: 1.04rem; }
  .hs-intro h1 { font-size: 1.6rem; }
}

/* quantitative figure comparisons */
.q-figs { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0 4px; }
.q-figs figure { margin: 0; text-align: center; }
.q-figs figcaption { font-weight: 700; font-size: .9rem; margin-top: 4px; }
.q-figs svg { margin: 0 auto; }

/* skill drills */
.hs-drills-head { margin: 44px 0 6px; text-align: center; }
.hs-drills-head h2 { font-weight: 800; font-size: 1.7rem; }
.hs-drills-head p { color: var(--hs-muted); max-width: 680px; margin: 0 auto; }
.hs-drill-group { font-size: 1.1rem; font-weight: 800; margin: 22px 0 10px; }
.hs-grid-drills { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.hs-card-drill { padding: 16px; }
.hs-card-drill h3 { font-size: 1rem; }

/* dialog close button */
.hs-dialog-box { position: relative; }
.hs-dialog-box h3 { padding-right: 36px; }
.hs-dialog-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--hs-muted); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.hs-dialog-x:hover { background: var(--hs-bg); color: var(--hs-ink); }
.hs-dialog-x:focus-visible { outline: 3px solid #90b8f0; }

/* time's up: finishing skipped questions */
.hs-clock-off { background: var(--hs-amber-soft); color: var(--hs-amber); font-size: 1rem; }
.hs-catchup-note { background: var(--hs-amber-soft); color: #6b4200; border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin-bottom: 14px; }
.hs-cell.locked { opacity: .35; cursor: not-allowed; }

/* score after each subtest */
.hs-verdict { border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; background: var(--hs-bg); }
.hs-verdict .hs-pile { margin-right: 6px; }
.hs-callout-amber { background: var(--hs-amber-soft); }
.hs-sub { font-size: 1.1rem !important; font-weight: 800; margin: 18px 0 10px; }
.hs-guide ul { list-style: none; padding: 0; margin: 0; }
.hs-guide li { margin-bottom: 8px; }
.hs-guide .hs-pile { min-width: 100px; text-align: center; margin-right: 6px; }
