:root{
  --placement-ink: #102a43;
  --placement-muted: #62748a;
  --placement-line: #dce6ed;
  --placement-green: #087f62;
  --placement-green-dark: #075742;
  --placement-blue: #2457a7;
  --placement-paper: #f7fafc;
}

.placement-page{
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 0%, rgba(89, 214, 169, .22), transparent 27rem),
    linear-gradient(145deg, #edf8f4 0%, #f7fafc 45%, #edf3f9 100%);
  color: var(--placement-ink);
}

.placement-main{
  width: min(1180px, calc(100% - var(--sidebarW) - 40px));
  min-height: 100vh;
  margin-left: var(--sidebarW);
  padding: 24px clamp(18px, 3vw, 42px) 56px;
}

.placement-topbar{
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.placement-topbar a{
  padding: 9px 12px;
  border: 1px solid rgba(16, 42, 67, .1);
  border-radius: 10px;
  background: rgba(255,255,255,.7);
  color: #38536d;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.placement-intro{
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 20px;
}

.placement-intro-copy,
.placement-note,
.placement-runner,
.placement-results{
  border: 1px solid rgba(16, 42, 67, .1);
  background: rgba(255,255,255,.94);
  box-shadow: 0 22px 50px rgba(16,42,67,.1);
}

.placement-intro-copy{
  position: relative;
  min-height: 470px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 62px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 16%, rgba(125, 246, 202, .34), transparent 15rem),
    linear-gradient(135deg, #082f3f 0%, #075c4a 55%, #0d9270 100%);
  color: #fff;
}

.placement-intro-copy::after{
  content: "A1  A2  B1  B2";
  position: absolute;
  right: -14px;
  bottom: 18px;
  color: rgba(255,255,255,.08);
  font-size: clamp(58px, 8vw, 108px);
  font-weight: 950;
  letter-spacing: -.08em;
  white-space: nowrap;
  pointer-events: none;
}

.placement-eyebrow{
  display: inline-flex;
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.placement-intro h1{
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 18px 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
}

.placement-lead{
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0;
  color: rgba(255,255,255,.83);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

.placement-facts{
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0;
}

.placement-facts span{
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px;
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 800;
}

.placement-facts strong{ color: #fff; font-size: 16px; }

.placement-intro-actions,
.placement-result-actions,
.placement-question-actions{
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.placement-primary,
.placement-secondary,
.placement-finish,
.placement-sheet-head button{
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 900;
  cursor: pointer;
}

.placement-primary{
  background: linear-gradient(135deg, #f8d65a, #f3b933);
  color: #3c2a00;
  box-shadow: 0 12px 25px rgba(210,153,22,.24);
}

.placement-primary:disabled{
  cursor: wait;
  opacity: .72;
  box-shadow: none;
}

.placement-secondary{
  border: 1px solid #ccd8e1;
  background: #fff;
  color: #38536d;
}

.placement-intro .placement-secondary{
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
}

.placement-resume{
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.placement-note{
  align-self: end;
  display: flex;
  gap: 14px;
  padding: 23px;
  border-radius: 22px;
}

.placement-note-icon{
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background: #e0f6ee;
  color: var(--placement-green);
  font-size: 25px;
  font-weight: 900;
}

.placement-note strong{ display: block; margin-bottom: 7px; }
.placement-note p{ margin: 0; color: var(--placement-muted); font-size: 13px; line-height: 1.58; }

.placement-runner,
.placement-results{
  border-radius: 26px;
  padding: clamp(18px, 3vw, 32px);
}

.placement-runner-head,
.placement-progress-meta,
.placement-sheet-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.placement-section-name{
  color: var(--placement-green);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.placement-runner-head h2{ margin: 5px 0 0; font-size: 27px; letter-spacing: -.03em; }

.placement-timer{
  min-width: 90px;
  padding: 10px 13px;
  border: 1px solid var(--placement-line);
  border-radius: 12px;
  background: var(--placement-paper);
  text-align: right;
}

.placement-timer small{ display: block; color: var(--placement-muted); font-size: 10px; }
.placement-timer strong{ font-variant-numeric: tabular-nums; }

.placement-progress-meta{ margin-top: 22px; color: var(--placement-muted); font-size: 12px; font-weight: 850; }
.placement-progress{ height: 8px; margin: 8px 0 24px; overflow: hidden; border-radius: 999px; background: #e6edf2; }
.placement-progress span{ display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0a8265, #37bd91); transition: width .25s ease; }

.placement-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 18px;
  align-items: start;
}

.placement-question-card,
.placement-sheet{
  border: 1px solid var(--placement-line);
  border-radius: 20px;
  background: #fff;
}

.placement-question-card{ min-height: 520px; padding: clamp(18px, 3vw, 30px); }

.placement-context,
.placement-heading-bank{
  margin-bottom: 21px;
  padding: 16px;
  border: 1px solid #dce8f4;
  border-radius: 15px;
  background: #f5f9fd;
}

.placement-context > span,
.placement-heading-bank > span{
  display: block;
  margin-bottom: 7px;
  color: var(--placement-blue);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.placement-context p{ margin: 0; color: #3f5266; font-size: 14px; line-height: 1.7; }
.placement-heading-bank{ background: #fffbeb; border-color: #eadcae; }
.placement-heading-bank > span{ color: #8b6413; }
.placement-heading-bank div{ display: grid; gap: 5px; color: #5b4a26; font-size: 12px; line-height: 1.45; }

.placement-prompt{
  margin: 0 0 22px;
  color: var(--placement-ink);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 850;
  line-height: 1.35;
}

.placement-options{ display: grid; gap: 10px; }

.placement-option{
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 56px;
  padding: 9px 13px;
  border: 1px solid #d8e2ea;
  border-radius: 14px;
  background: #fff;
  color: #243b53;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.placement-option:hover{ border-color: #7ac5ad; background: #f5fffb; transform: translateY(-1px); }
.placement-option.is-selected{ border-color: #0a8b69; background: #e9f9f3; box-shadow: 0 0 0 2px rgba(10,139,105,.1); }
.placement-option-key{ display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eef3f7; color: #476176; font-weight: 950; }
.placement-option.is-selected .placement-option-key{ background: var(--placement-green); color: #fff; }

.placement-question-actions{ justify-content: flex-end; margin-top: 26px; }
.placement-question-actions .placement-secondary:first-child{ margin-right: auto; }
.placement-question-actions button:disabled{ cursor: default; opacity: .48; }

.placement-sheet{ position: sticky; top: 18px; padding: 15px; }
.placement-sheet-head small{ display: block; color: var(--placement-muted); font-size: 10px; }
.placement-sheet-head strong{ display: block; margin-top: 2px; }
.placement-sheet-head button{ min-height: 36px; padding: 8px 10px; background: #eef4f7; color: #38536d; font-size: 11px; }
.placement-sheet-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-height: 330px; margin: 15px 0; overflow-y: auto; padding-right: 3px; }

.placement-sheet-cell{
  aspect-ratio: 1;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  background: #fff;
  color: #577086;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.placement-sheet-cell.is-answered{ border-color: #8dd7bf; background: #e8f8f2; color: #087257; }
.placement-sheet-cell.is-active{ outline: 2px solid #2457a7; outline-offset: 1px; }
.placement-finish{ width: 100%; background: linear-gradient(135deg, #0a8265, #087257); color: #fff; box-shadow: 0 11px 22px rgba(8,114,87,.2); }

.placement-results{ max-width: 980px; margin: 0 auto; }
.placement-results .placement-eyebrow{ border-color: #b8ded1; background: #e8f8f2; color: #087257; }
.placement-results h2{ margin: 14px 0 8px; font-size: clamp(32px, 5vw, 50px); letter-spacing: -.045em; }
.placement-results-lead{ margin: 0; color: var(--placement-muted); line-height: 1.6; }
.placement-score-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 25px 0; }
.placement-score-card{ padding: 17px; border: 1px solid var(--placement-line); border-radius: 16px; background: var(--placement-paper); }
.placement-score-card small{ display: block; min-height: 29px; color: var(--placement-muted); font-size: 11px; font-weight: 850; }
.placement-score-card strong{ display: block; margin-top: 6px; font-size: 25px; }
.placement-score-card span{ color: #6b7f91; font-size: 11px; }
.placement-calibration-note{ margin: 20px 0; padding: 18px; border: 1px solid #eadcae; border-radius: 15px; background: #fffbeb; }
.placement-calibration-note strong{ display: block; margin-bottom: 6px; color: #765515; }
.placement-calibration-note p{ margin: 0; color: #6e5b31; font-size: 13px; line-height: 1.6; }
.placement-result-actions{ margin-top: 20px; }

.placement-study-plan{
  margin: 24px 0;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid #cfe4dc;
  border-radius: 20px;
  background: linear-gradient(145deg, #f2fbf7, #f8fbfd);
}

.placement-study-head{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.placement-study-kicker{
  display: block;
  margin-bottom: 5px;
  color: #087257;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.placement-study-head h3,
.placement-share h3{
  margin: 0;
  color: var(--placement-ink);
  font-size: clamp(21px, 3vw, 28px);
  letter-spacing: -.03em;
}

.placement-study-head > p{
  max-width: 390px;
  margin: 0;
  color: var(--placement-muted);
  font-size: 12px;
  line-height: 1.55;
}

.placement-study-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.placement-study-group{
  padding: 17px;
  border: 1px solid #d9e7e1;
  border-radius: 17px;
  background: rgba(255,255,255,.9);
}

.placement-study-group > header{
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.placement-study-icon{
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: #dff7ee;
  color: #087257;
  font-size: 16px;
  font-weight: 950;
}

.placement-study-group--reading .placement-study-icon{
  background: #e4f1ff;
  color: #2457a7;
}

.placement-study-group header small{
  display: block;
  color: var(--placement-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.placement-study-group header strong{
  display: block;
  margin-top: 2px;
  color: #1d364d;
  font-size: 13px;
  line-height: 1.35;
}

.placement-topic-list{ display: grid; gap: 9px; }

.placement-topic{
  padding: 12px;
  border: 1px solid #e1e8ed;
  border-radius: 13px;
  background: #fbfdfe;
}

.placement-topic-head{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.placement-topic-head strong{
  color: #253f55;
  font-size: 12px;
  line-height: 1.35;
}

.placement-topic-head span{
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff0e8;
  color: #a34619;
  font-size: 8px;
  font-weight: 950;
}

.placement-topic.is-review .placement-topic-head span{ background: #fff8d9; color: #85620c; }
.placement-topic.is-strong .placement-topic-head span{ background: #e6f8f0; color: #087257; }

.placement-topic-progress{
  height: 5px;
  margin: 9px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef2;
}

.placement-topic-progress span{
  display: block;
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: #e7783f;
}

.placement-topic.is-review .placement-topic-progress span{ background: #d5a51d; }
.placement-topic.is-strong .placement-topic-progress span{ background: #16a77d; }

.placement-topic p{
  margin: 0;
  color: #617487;
  font-size: 10px;
  line-height: 1.5;
}

.placement-study-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #e8f8f2;
  color: #087257;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.placement-study-group--reading .placement-study-link{ background: #edf5ff; color: #2457a7; }

.placement-share{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 21px;
  border: 1px solid rgba(22,119,179,.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 0%, rgba(85,190,255,.2), transparent 14rem),
    linear-gradient(145deg, #edf8ff, #f7fbff);
}

.placement-share-copy{ display: flex; align-items: center; gap: 13px; }
.placement-share-icon{
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: #229ed9;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(34,158,217,.22);
}

.placement-share h3{ font-size: 22px; }
.placement-share-copy p{
  max-width: 480px;
  margin: 5px 0 0;
  color: var(--placement-muted);
  font-size: 11px;
  line-height: 1.5;
}

.placement-share-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.placement-share-actions a,
.placement-share-actions button{
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid #cbdce8;
  border-radius: 11px;
  background: #fff;
  color: #38536d;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.placement-share-actions .placement-share-telegram{
  border-color: #229ed9;
  background: #229ed9;
  color: #fff;
}

.placement-share-status{
  grid-column: 1 / -1;
  min-height: 14px;
  margin: -7px 0 0;
  color: #087257;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.placement-error{ max-width: 720px; margin: 30px auto; padding: 18px; border: 1px solid #efb6b6; border-radius: 14px; background: #fff1f1; color: #9f2d2d; font-weight: 800; }
.placement-inline-error{ margin: 17px 0 0; padding: 13px 15px; border: 1px solid #efb6b6; border-radius: 12px; background: #fff1f1; color: #9f2d2d; font-size: 13px; font-weight: 800; line-height: 1.5; }

@media (max-width: 1050px){
  .placement-intro{ grid-template-columns: 1fr; }
  .placement-note{ align-self: auto; }
  .placement-layout{ grid-template-columns: 1fr; }
  .placement-sheet{ position: static; }
  .placement-sheet-grid{ grid-template-columns: repeat(10, 1fr); max-height: none; }
  .placement-score-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .placement-share{ grid-template-columns: 1fr; }
  .placement-share-actions{ justify-content: flex-start; }
  .placement-share-status{ text-align: left; }
}

@media (max-width: 768px){
  .placement-main{ width: 100%; margin-left: 0; padding: 74px 14px 40px; }
  .placement-topbar{ display: none; }
  .placement-intro-copy{ min-height: auto; padding: 30px 22px 38px; border-radius: 22px; }
  .placement-intro h1{ font-size: clamp(40px, 13vw, 58px); }
  .placement-intro-copy::after{ display: none; }
  .placement-note{ padding: 18px; }
  .placement-runner, .placement-results{ padding: 16px; border-radius: 20px; }
  .placement-question-card{ min-height: 0; padding: 17px; }
  .placement-prompt{ font-size: 20px; }
  .placement-option{ grid-template-columns: 34px minmax(0, 1fr); min-height: 54px; }
  .placement-option-key{ width: 32px; height: 32px; }
  .placement-question-actions{ display: grid; grid-template-columns: 1fr 1fr; }
  .placement-question-actions .placement-secondary:first-child{ margin: 0; }
  .placement-question-actions .placement-primary{ grid-column: 1 / -1; }
  .placement-sheet-grid{ grid-template-columns: repeat(8, 1fr); }
  .placement-score-grid{ grid-template-columns: 1fr 1fr; }
  .placement-study-head{ display: block; }
  .placement-study-head > p{ margin-top: 8px; }
  .placement-study-grid{ grid-template-columns: 1fr; }
  .placement-share{ padding: 17px; }
  .placement-share-actions{ display: grid; grid-template-columns: 1fr; }
  .placement-share-actions a,
  .placement-share-actions button{ display: grid; place-items: center; width: 100%; text-align: center; }
}

@media (max-width: 430px){
  .placement-facts{ display: grid; grid-template-columns: 1fr 1fr; }
  .placement-facts span{ justify-content: center; }
  .placement-sheet-grid{ grid-template-columns: repeat(7, 1fr); }
  .placement-score-grid{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  .placement-option, .placement-progress span{ transition: none; }
}
