:root {
  --p6-ink: #17243b;
  --p6-muted: #58677d;
  --p6-line: #d9e2ec;
  --p6-paper: #fffdf8;
  --p6-navy: #173b6d;
  --p6-blue: #245ea8;
  --p6-teal: #0f766e;
  --p6-amber: #e59a24;
  --p6-coral: #c8584b;
  --p6-soft: #f2f6fa;
  --p6-shadow: 0 18px 45px rgba(29, 52, 79, .09);
}

.p6-page {
  color: var(--p6-ink);
  background: #fff;
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.75;
}

.p6-page *, .p6-page *::before, .p6-page *::after { box-sizing: border-box; }
.p6-page [hidden] { display: none !important; }
.p6-page button, .p6-page a { -webkit-tap-highlight-color: transparent; }
.p6-page button { font: inherit; }
.p6-page a { color: inherit; }
.p6-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.p6-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 2px 15px; color: #6a788b; font-size: 13px; }
.p6-crumbs a { text-decoration: none; }
.p6-crumbs a:hover { color: var(--p6-blue); text-decoration: underline; }

.p6-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 58px;
  align-items: center;
  min-height: 420px;
  padding: 58px 68px;
  overflow: hidden;
  border: 1px solid #d5e1ed;
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 18%, rgba(65, 152, 166, .17), transparent 30%),
    linear-gradient(135deg, #f7fbff 0%, #eef5fb 56%, #f8f5e9 100%);
}

.p6-hero::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(31, 95, 156, .15);
  border-radius: 50%;
  content: "";
}

.p6-eyebrow, .p6-kicker, .p6-label {
  margin: 0;
  color: var(--p6-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.p6-hero h1 {
  margin: 14px 0 20px;
  max-width: 720px;
  font-size: clamp(36px, 4.6vw, 58px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.25;
}

.p6-hero h1 em { color: var(--p6-teal); font-style: normal; }
.p6-hero__lead { max-width: 710px; margin: 0; color: #44566c; font-size: 17px; line-height: 1.9; }
.p6-hero__actions, .p6-dashboard__actions, .p6-feedback__actions, .p6-review-actions, .p6-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.p6-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.p6-action:hover:not(:disabled) { transform: translateY(-2px); }
.p6-action:focus-visible, .p6-page button:focus-visible, .p6-page a:focus-visible { outline: 3px solid rgba(36, 94, 168, .3); outline-offset: 3px; }
.p6-action:disabled, .p6-action[aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
.p6-action--primary { color: #fff; background: linear-gradient(135deg, var(--p6-navy), var(--p6-blue)); box-shadow: 0 10px 22px rgba(28, 75, 127, .2); }
.p6-action--quiet { color: var(--p6-navy); border-color: #bdd0e4; background: #fff; }
.p6-action--accent { color: #fff; background: linear-gradient(135deg, #0f766e, #15968b); box-shadow: 0 10px 22px rgba(15, 118, 110, .18); }
.p6-action--text { color: var(--p6-navy); border-color: rgba(23, 59, 109, .18); background: rgba(255, 255, 255, .65); }

.p6-hero__visual { position: relative; z-index: 1; min-height: 245px; }
.p6-paper {
  position: absolute;
  top: 5px;
  right: 10px;
  width: min(100%, 320px);
  min-height: 235px;
  padding: 28px;
  border: 1px solid #c7d5e3;
  border-radius: 18px;
  background: var(--p6-paper);
  box-shadow: 0 25px 50px rgba(33, 55, 80, .16);
  transform: rotate(2.5deg);
}

.p6-paper::before {
  position: absolute;
  top: 50px;
  left: -18px;
  width: 44px;
  height: 44px;
  border: 6px solid #f6c663;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.p6-paper > span { display: block; margin-bottom: 20px; color: var(--p6-navy); font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.p6-paper > i { display: block; height: 8px; margin: 10px 0; border-radius: 20px; background: #dfe7ee; }
.p6-paper > i:nth-of-type(2) { width: 76%; }
.p6-paper > b { display: flex; gap: 8px; margin: 23px 0; }
.p6-paper small { display: grid; width: 34px; height: 34px; place-items: center; border: 2px solid #56a19b; border-radius: 9px; color: #286c67; background: #ecf8f6; font-size: 13px; }
.p6-context-mark {
  position: absolute;
  right: 85px;
  bottom: 2px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid #d5c7a4;
  border-radius: 999px;
  color: #765d2b;
  background: #fff9ea;
  box-shadow: 0 10px 24px rgba(90, 76, 44, .12);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.p6-context-mark strong { color: var(--p6-coral); font-size: 18px; }

.p6-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid var(--p6-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 52, 77, .06);
}
.p6-facts div { padding: 20px 25px; border-right: 1px solid var(--p6-line); }
.p6-facts div:last-child { border-right: 0; }
.p6-facts strong, .p6-facts span { display: block; }
.p6-facts strong { color: var(--p6-navy); font-size: 21px; }
.p6-facts span { margin-top: 3px; color: var(--p6-muted); font-size: 13px; }

.p6-section { padding: 86px 0; }
.p6-section--soft { background: var(--p6-soft); }
.p6-section__head { max-width: 760px; margin-bottom: 34px; }
.p6-section__head h2 { margin: 8px 0 14px; font-size: clamp(27px, 3vw, 39px); line-height: 1.42; }
.p6-section__head > p:last-child { margin: 0; color: var(--p6-muted); font-size: 16px; }
.p6-section__head--light .p6-kicker { color: #93d7d1; }
.p6-section__head--light h2 { color: #fff; }
.p6-section__head--light > p:last-child { color: #d1deeb; }
.p6-method-grid, .p6-skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.p6-method-grid article, .p6-skill-grid article {
  padding: 28px;
  border: 1px solid var(--p6-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28, 49, 75, .055);
}
.p6-method-grid span, .p6-skill-grid span { color: var(--p6-teal); font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.p6-method-grid h3, .p6-skill-grid h3 { margin: 9px 0 7px; font-size: 19px; }
.p6-method-grid p, .p6-skill-grid p { margin: 0; color: var(--p6-muted); font-size: 14px; }
.p6-skill-grid { grid-template-columns: repeat(4, 1fr); }

.p6-static-sample {
  position: relative;
  border-top: 1px solid #e3eaf1;
  border-bottom: 1px solid #dbe5ee;
  background:
    radial-gradient(circle at 92% 18%, rgba(15, 118, 110, .11), transparent 27%),
    linear-gradient(145deg, #f5f9fc, #fffdf8);
}
.p6-sample-card {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border: 1px solid #cedbe7;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--p6-shadow);
}
.p6-sample-guide {
  padding: 34px;
  color: #eaf4fb;
  background:
    linear-gradient(155deg, rgba(15, 118, 110, .94), rgba(23, 59, 109, .98)),
    #173b6d;
}
.p6-sample-guide .p6-label { color: #9ce4dc; }
.p6-sample-guide h3 { margin: 9px 0 20px; color: #fff; font-size: 23px; line-height: 1.45; }
.p6-sample-guide ol { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; counter-reset: sample-step; }
.p6-sample-guide li {
  position: relative;
  min-height: 30px;
  padding-left: 42px;
  color: #e2eef7;
  font-size: 14px;
  counter-increment: sample-step;
}
.p6-sample-guide li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  content: counter(sample-step, decimal-leading-zero);
  font-size: 10px;
  font-weight: 900;
}
.p6-sample-note { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .19); color: #bdd1e0; font-size: 12px; }
.p6-sample-question { min-width: 0; padding: 34px 38px; }
.p6-sample-subject { margin: 0 0 17px; color: var(--p6-navy); font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 700; }
.p6-sample-subject span { color: var(--p6-muted); font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.p6-sample-text { margin: 0; color: #23344b; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.9; }
.p6-sample-text mark {
  display: inline-block;
  padding: 0 7px;
  border-radius: 5px;
  color: #0b625b;
  background: #def3ef;
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  font-weight: 800;
  letter-spacing: .08em;
}
.p6-sample-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 24px 0 0;
  padding: 0;
  list-style-position: inside;
  counter-reset: sample-choice;
}
.p6-sample-choices li {
  padding: 11px 14px;
  border: 1px solid #d5e0e9;
  border-radius: 11px;
  color: #34475f;
  background: #f9fbfd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  list-style: none;
  counter-increment: sample-choice;
}
.p6-sample-choices li::before {
  margin-right: 8px;
  color: var(--p6-teal);
  content: counter(sample-choice, upper-alpha) ".";
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 12px;
  font-weight: 900;
}
.p6-sample-answer { margin-top: 20px; border: 1px solid #bbd3ce; border-radius: 13px; background: #f4fbf9; }
.p6-sample-answer summary { padding: 13px 16px; color: #0d665f; font-weight: 800; cursor: pointer; }
.p6-sample-answer[open] summary { border-bottom: 1px solid #cfe2de; }
.p6-sample-answer > div { padding: 16px; }
.p6-sample-answer p { margin: 0; color: #405267; font-size: 14px; }
.p6-sample-answer p + p { margin-top: 9px; }
.p6-sample-answer strong { color: #0d665f; }
.p6-sample-answer .p6-sample-ja { padding-top: 11px; border-top: 1px solid #d8e7e4; color: #5b6979; }

.p6-practice { padding: 86px 0; background: linear-gradient(155deg, #122a49, #173f69 60%, #164b5a); }
.p6-app { overflow: visible; border: 1px solid rgba(255, 255, 255, .18); border-radius: 26px; background: #f7f9fb; box-shadow: 0 28px 65px rgba(3, 16, 32, .28); }
.p6-live { min-height: 0; margin: 0; padding: 10px 24px; border-radius: 25px 25px 0 0; color: #d4e5f5; background: #0e2038; font-size: 12px; }
.p6-dashboard { padding: 34px; }
.p6-migration-notice { margin: 0 0 20px; padding: 13px 15px; border: 1px solid #d6bd7e; border-radius: 12px; color: #624d21; background: #fff8e7; font-size: 13px; }
.p6-load-error { margin: 24px; padding: 28px; border: 1px solid #dfada7; border-radius: 18px; color: #6a3731; background: #fff5f3; }
.p6-load-error h3, .p6-load-error p { margin: 0; }
.p6-load-error p { margin-top: 6px; }
.p6-load-error button { min-height: 44px; margin-top: 16px; padding: 9px 15px; border: 1px solid #bd6e65; border-radius: 11px; color: #743c35; background: #fff; font-weight: 800; cursor: pointer; }
.p6-dashboard__lead { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 24px; align-items: center; }
.p6-dashboard__lead h3 { margin: 5px 0 4px; font-size: 25px; }
.p6-dashboard__lead p:last-child { margin: 0; color: var(--p6-muted); }
.p6-progress-ring {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--p6-teal) calc(var(--progress) * 1%), #dbe5ec 0);
}
.p6-progress-ring::before { position: absolute; width: 88px; height: 88px; border-radius: 50%; background: #fff; content: ""; }
.p6-progress-ring { position: relative; }
.p6-progress-ring span { position: relative; z-index: 1; text-align: center; }
.p6-progress-ring strong, .p6-progress-ring small { display: block; }
.p6-progress-ring strong { color: var(--p6-navy); font-size: 32px; line-height: 1; }
.p6-progress-ring small { margin-top: 5px; color: var(--p6-muted); font-size: 11px; }

.p6-dashboard__stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 28px 0; }
.p6-dashboard__stats div { padding: 18px; border: 1px solid var(--p6-line); border-radius: 15px; background: #fff; }
.p6-dashboard__stats span, .p6-dashboard__stats strong { display: block; }
.p6-dashboard__stats span { color: var(--p6-muted); font-size: 12px; }
.p6-dashboard__stats strong { margin-top: 3px; color: var(--p6-navy); font-size: 20px; }
.p6-dashboard__stats b { font-weight: 800; }

.p6-mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 17px;
  border: 1px solid var(--p6-line);
  border-radius: 18px;
  background: #eef3f7;
}
.p6-mode-picker > div { align-self: center; padding: 4px 10px; }
.p6-mode-picker h3 { margin: 4px 0 0; font-size: 18px; }
.p6-mode-picker button, .p6-type-grid button {
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid #c7d5e2;
  border-radius: 14px;
  color: var(--p6-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.p6-mode-picker button[aria-pressed="true"] { border-color: var(--p6-teal); background: #e9f8f5; box-shadow: inset 0 0 0 1px var(--p6-teal); }
.p6-mode-picker strong, .p6-mode-picker span { display: block; }
.p6-mode-picker strong { color: var(--p6-navy); font-size: 15px; }
.p6-mode-picker span { margin-top: 3px; color: var(--p6-muted); font-size: 12px; line-height: 1.55; }

.p6-type-launch { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--p6-line); }
.p6-type-launch h3 { margin: 0 0 5px; font-size: 18px; }
.p6-type-launch p { margin: 0; color: var(--p6-muted); font-size: 13px; }
.p6-type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.p6-type-grid button { min-height: 54px; padding: 10px; text-align: center; }
.p6-type-grid button:hover { border-color: var(--p6-blue); color: var(--p6-blue); background: #f5f9ff; }
.p6-reset { display: block; margin: 24px 0 0 auto; padding: 7px 2px; border: 0; color: #69778a; background: transparent; font-size: 12px; text-decoration: underline; cursor: pointer; }

.p6-player { background: #f4f7fa; }
.p6-player__top {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  padding: 20px 28px;
  color: #fff;
  background: #132d4d;
}
.p6-player__top > div:first-child { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; }
.p6-player__top .p6-label { width: 100%; color: #95c8ef; }
.p6-player-mode { padding: 4px 9px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; font-size: 11px; }
.p6-player__meter { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.p6-player__meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5bc8bd, #ffd36b); transition: width .25s ease; }
.p6-elapsed { min-width: 138px; text-align: right; }
.p6-elapsed span, .p6-elapsed small { display: block; }
.p6-elapsed span { color: #fff; font-size: 13px; font-weight: 750; }
.p6-elapsed small { max-width: 190px; margin-top: 2px; color: #b9cbdd; font-size: 10px; line-height: 1.4; }
.p6-close { min-height: 42px; padding: 8px 13px; border: 1px solid rgba(255, 255, 255, .27); border-radius: 12px; color: #fff; background: rgba(255, 255, 255, .07); cursor: pointer; }
.p6-document-head { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--p6-line); background: #fff; }
.p6-document-head > div:first-child { display: flex; gap: 8px; }
.p6-document-head > div:last-child { display: grid; grid-template-columns: 155px 1fr; gap: 10px; align-items: center; }
.p6-document-head p { margin: 0; }
.p6-document-badge, .p6-level, .p6-question-type {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #195c57;
  background: #e5f5f2;
  font-size: 11px;
  font-weight: 800;
}
.p6-level { color: #79591f; background: #fff4d8; }

.p6-workspace { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 18px; padding: 24px; }
.p6-passage-panel, .p6-question-panel { min-width: 0; border: 1px solid var(--p6-line); border-radius: 20px; background: #fff; box-shadow: 0 10px 25px rgba(31, 53, 78, .045); }
.p6-passage-panel { overflow: hidden; }
.p6-question-panel { position: sticky; top: 85px; align-self: start; padding: 24px; scroll-margin-top: 100px; }
.p6-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--p6-line); background: #fafcfe; }
.p6-question-panel > .p6-panel-head { margin: -24px -24px 20px; border-radius: 20px 20px 0 0; }
.p6-panel-head h3 { margin: 3px 0 0; font-size: 19px; }
.p6-panel-head > span { flex: 0 0 auto; color: var(--p6-muted); font-size: 12px; }
.p6-address { padding: 12px 25px 0; color: var(--p6-muted); font-size: 12px; }
.p6-address span { display: inline-block; margin-right: 14px; }
.p6-passage, .p6-completed-text {
  padding: 25px;
  color: #26354a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.p6-blank {
  display: inline-flex;
  min-width: 42px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 0 3px;
  padding: 2px 9px;
  border: 1px dashed #7f98b2;
  border-radius: 8px;
  color: var(--p6-navy);
  background: #edf4fa;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}
.p6-blank--current { border-style: solid; border-color: var(--p6-teal); color: #fff; background: var(--p6-teal); box-shadow: 0 0 0 4px rgba(15, 118, 110, .12); }
.p6-blank--answered { border-style: solid; border-color: #7aa4c7; background: #e7f1fa; }
.p6-blank--correction { gap: 5px; border-color: #d36d61; background: #fff3f1; }
.p6-blank--correction del { color: #9a5149; font-weight: 650; }
.p6-blank--correction strong { color: #14695a; }
.p6-correction-arrow { color: #66788b; font-size: 13px; }
.p6-question-panel h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.55; }
.p6-hint-control { margin: 0 0 18px; }
.p6-hint-control[hidden], .p6-hint-control > button[hidden], .p6-question-hint[hidden] { display: none !important; }
.p6-hint-control > button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid #b8cee1;
  border-radius: 999px;
  color: var(--p6-navy);
  background: #f5f9fc;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.p6-hint-control > button::before { content: "?"; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: var(--p6-blue); font-size: 11px; }
.p6-hint-control > button:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--p6-blue); background: #edf6fd; }
.p6-hint-control > button:disabled { border-color: #c9ddd6; color: #176653; background: #eff9f5; cursor: default; }
.p6-hint-control > button:disabled::before { content: "✓"; background: var(--p6-teal); }
.p6-question-hint {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--p6-teal);
  border-radius: 0 10px 10px 0;
  color: #3c5269;
  background: #f1f8f6;
  font-size: 13px;
  line-height: 1.75;
}
.p6-exam-note { margin: 0 0 18px; color: var(--p6-muted); font-size: 13px; }
.p6-exam-note { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: #edf4fa; }
.p6-mobile-context, .p6-mobile-dock { display: none; }
.p6-choices { display: grid; gap: 10px; }
.p6-choice {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  min-height: 58px;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #cdd9e4;
  border-radius: 14px;
  color: var(--p6-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.p6-choice:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--p6-blue); background: #f7fbff; }
.p6-choice > b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--p6-navy); background: #edf3f8; }
.p6-choice > span { min-width: 0; overflow-wrap: anywhere; }
.p6-choice > span strong, .p6-choice > span small { display: block; }
.p6-choice > span small { margin-top: 2px; color: var(--p6-muted); }
.p6-choice[aria-checked="true"] { border-color: var(--p6-blue); background: #eaf3fc; box-shadow: inset 0 0 0 1px var(--p6-blue); }
.p6-choice--correct { border-color: #3c9c78 !important; background: #eaf8f2 !important; }
.p6-choice--wrong { border-color: #d36d61 !important; background: #fff0ee !important; }
.p6-exam-controls { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--p6-line); }
.p6-exam-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.p6-exam-nav__item {
  min-height: 42px;
  border: 1px solid #c8d6e3;
  border-radius: 11px;
  color: #5b6d80;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.p6-exam-nav__item.is-answered { color: #155f58; border-color: #83bdb6; background: #edf8f6; }
.p6-exam-nav__item.is-current { box-shadow: inset 0 0 0 2px var(--p6-blue); }
.p6-exam-controls > p { margin: 10px 0; color: var(--p6-muted); font-size: 12px; }
.p6-exam-controls > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p6-exam-controls [data-p6-submit-document] { grid-column: 1 / -1; }
.p6-exam-controls [data-p6-submit-document]:not(.is-ready) { box-shadow: none; filter: saturate(.55); }

.p6-feedback, .p6-document-review { margin: 0 24px 24px; padding: 25px; border: 1px solid var(--p6-line); border-radius: 20px; background: #fff; scroll-margin-top: 100px; }
.p6-feedback__result { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--p6-line); }
.p6-feedback__result > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: #fff; background: var(--p6-teal); font-size: 24px; font-weight: 900; }
.p6-feedback__result.is-wrong > span { background: var(--p6-coral); }
.p6-feedback__result p, .p6-feedback__result h3 { margin: 0; }
.p6-feedback__result p { color: var(--p6-teal); font-size: 12px; font-weight: 900; }
.p6-feedback__result.is-wrong p { color: var(--p6-coral); }
.p6-feedback__result h3 { margin-top: 2px; font-size: 20px; }
.p6-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.p6-evidence > div { padding: 18px; border-radius: 14px; background: #f3f7fa; }
.p6-evidence p { margin: 0; }
.p6-evidence p + p { margin-top: 7px; }
.p6-evidence p[lang="en"] { color: var(--p6-navy); font-family: Georgia, serif; font-size: 16px; font-weight: 700; }
.p6-trap { padding-left: 12px; border-left: 3px solid var(--p6-amber); color: #6a552d; }
.p6-choice-review { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.p6-choice-reason { padding: 13px 15px; border: 1px solid var(--p6-line); border-radius: 13px; background: #fff; }
.p6-choice-reason.is-correct { border-color: #8bc9b0; background: #f0faf6; }
.p6-choice-reason.is-selected:not(.is-correct) { border-color: #e6a198; background: #fff4f2; }
.p6-choice-reason strong { display: block; color: var(--p6-navy); font-size: 14px; overflow-wrap: anywhere; }
.p6-choice-reason > small { display: block; margin-top: 2px; color: var(--p6-muted); font-size: 11px; }
.p6-choice-reason p { margin: 4px 0 0; color: var(--p6-muted); font-size: 12px; }
.p6-answer-line span[lang="en"] { color: var(--p6-navy); font-family: Georgia, serif; font-weight: 700; }
.p6-choice-details { width: 100%; }
[data-p6-choice-review] > .p6-choice-details { grid-column: 1 / -1; }
.p6-choice-details > summary, .p6-answer-card > summary, .p6-lifetime-breakdown > summary {
  padding: 12px 14px;
  border: 1px solid #cbd9e6;
  border-radius: 12px;
  color: var(--p6-navy);
  background: #f7fafc;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.p6-choice-details[open] > summary, .p6-answer-card[open] > summary, .p6-lifetime-breakdown[open] > summary { margin-bottom: 12px; }

.p6-review-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.p6-review-head h3, .p6-review-head p { margin: 0; }
.p6-review-head h3 { margin-top: 3px; font-size: 23px; }
.p6-review-head p:last-child { margin-top: 5px; color: var(--p6-muted); }
.p6-review-head > strong { padding: 10px 14px; border-radius: 13px; color: #fff; background: var(--p6-navy); font-size: 22px; white-space: nowrap; }
.p6-review-flow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 22px 0; }
.p6-review-flow span { padding: 8px 12px; border-radius: 999px; color: #195c57; background: #e9f7f5; font-size: 12px; font-weight: 750; }
.p6-review-flow b { color: #9a7c43; }
.p6-completed-grid { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--p6-line); border-radius: 17px; }
.p6-completed-grid > div { min-width: 0; padding: 20px; }
.p6-completed-grid > div + div { border-left: 1px solid var(--p6-line); background: #fafbfd; }
.p6-completed-text { padding: 12px 0 0; font-size: 15px; line-height: 1.9; }
.p6-completed-answer { padding: 1px 4px; border-radius: 4px; color: #0e635b; background: #dff4ef; font-weight: 700; }
.p6-translation { padding-top: 12px; color: #4d5d70; font-size: 14px; }
.p6-translation p { margin: 0 0 12px; }
.p6-all-answers { display: grid; gap: 10px; margin-top: 18px; }
.p6-answer-card { padding: 16px; border: 1px solid var(--p6-line); border-radius: 14px; }
.p6-answer-card.is-correct { border-left: 5px solid var(--p6-teal); }
.p6-answer-card.is-wrong { border-left: 5px solid var(--p6-coral); }
.p6-answer-card__body p { margin: 5px 0 0; color: var(--p6-muted); font-size: 13px; }

.p6-result { padding: 34px; }
.p6-result__hero { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; padding: 28px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #173b6d, #126d72); }
.p6-score { display: flex; align-items: baseline; justify-content: center; }
.p6-score strong { font-size: 55px; line-height: 1; }
.p6-score span { margin-left: 6px; color: #cfe6e5; }
.p6-result__hero .p6-label { color: #9edbd6; }
.p6-result__hero h3 { margin: 4px 0; font-size: 25px; }
.p6-result__hero p:last-child { margin: 0; color: #dce9f0; }
.p6-result__skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.p6-skill-result { padding: 17px; border: 1px solid var(--p6-line); border-radius: 15px; background: #fff; }
.p6-skill-result span, .p6-skill-result strong { display: block; }
.p6-skill-result span { color: var(--p6-muted); font-size: 12px; }
.p6-skill-result strong { margin-top: 3px; color: var(--p6-navy); font-size: 21px; }
.p6-result__weakness { margin-top: 14px; padding: 17px 19px; border-radius: 15px; color: #654e22; background: #fff6df; }
.p6-result__weakness h4, .p6-result__weakness p { margin: 0; }
.p6-result__weakness p { margin-top: 5px; font-size: 13px; }
.p6-result__metadata { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.p6-result__metadata > div { padding: 15px 17px; border: 1px solid var(--p6-line); border-radius: 14px; background: #f8fafc; }
.p6-result__metadata > div span, .p6-result__metadata > div strong { display: block; }
.p6-result__metadata > div span { color: var(--p6-muted); font-size: 11px; }
.p6-result__metadata > div strong { margin-top: 3px; color: var(--p6-navy); font-size: 14px; }
.p6-lifetime-breakdown { grid-column: 1 / -1; padding: 0; }
.p6-lifetime-breakdown ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 0; padding: 0; list-style: none; }
.p6-lifetime-breakdown li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 10px; background: #f5f8fb; }
.p6-lifetime-breakdown li span { color: var(--p6-ink); font-size: 12px; }
.p6-lifetime-breakdown li strong { color: var(--p6-navy); font-size: 13px; }
.p6-lifetime-breakdown li small { grid-column: 1 / -1; color: var(--p6-muted); font-size: 10px; }
.p6-remediation-link { display: inline-flex; margin-top: 12px; padding: 8px 12px; border: 1px solid #d4ba7c; border-radius: 10px; color: #5e471a; background: #fffaf0; font-size: 12px; font-weight: 800; text-decoration: none; }
.p6-remediation-link:hover { border-color: #a47b26; background: #fff4d9; }
.p6-noscript { margin: 0; padding: 20px; color: #6b3d38; background: #fff0ee; }

.p6-boundary { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; padding: 36px; border: 1px solid #d6e0e8; border-radius: 22px; background: #fff; box-shadow: var(--p6-shadow); }
.p6-boundary h2 { margin: 8px 0 12px; font-size: 27px; }
.p6-boundary p { margin: 0; color: var(--p6-muted); }
.p6-boundary__notes { display: grid; gap: 10px; }
.p6-boundary__notes p { padding: 14px; border-radius: 13px; background: #f3f7fa; }
.p6-boundary__notes strong, .p6-boundary__notes span, .p6-boundary__notes a { display: block; }
.p6-boundary__notes strong { color: var(--p6-navy); font-size: 12px; }
.p6-boundary__notes span, .p6-boundary__notes a { margin-top: 4px; font-size: 13px; }
.p6-boundary__notes a { color: var(--p6-blue); font-weight: 700; }
.p6-next { display: grid; grid-template-columns: 1fr auto; gap: 35px; align-items: center; margin: 72px 0; padding: 32px; border: 1px solid var(--p6-line); border-radius: 22px; background: #fff; box-shadow: var(--p6-shadow); }
.p6-next h2 { margin: 7px 0 8px; font-size: 25px; }
.p6-next p { margin: 0; color: var(--p6-muted); }
.p6-next > div:last-child { display: grid; gap: 8px; min-width: 230px; }
.p6-next a { padding: 11px 14px; border: 1px solid #cbd9e6; border-radius: 12px; color: var(--p6-navy); background: #f8fbfe; font-size: 13px; font-weight: 750; text-decoration: none; }
.p6-next a:hover { border-color: var(--p6-blue); background: #edf5fc; }

@media (max-width: 980px) {
  .p6-hero { grid-template-columns: 1fr 300px; gap: 25px; padding: 50px 42px; }
  .p6-hero h1 { font-size: 42px; }
  .p6-workspace { grid-template-columns: 1fr; }
  .p6-question-panel { position: static; }
  .p6-type-launch { grid-template-columns: 1fr; }
  .p6-type-grid { grid-template-columns: repeat(5, 1fr); }
  .p6-skill-grid { grid-template-columns: repeat(2, 1fr); }
  .p6-dashboard__stats { grid-template-columns: repeat(3, 1fr); }
  .p6-player__top { grid-template-columns: auto minmax(100px, 1fr) auto; }
  .p6-elapsed { grid-column: 1 / 3; text-align: left; }
}

@media (max-width: 760px) {
  .p6-shell { width: min(100% - 24px, 1180px); }
  .p6-hero { grid-template-columns: 1fr; min-height: auto; padding: 38px 26px; border-radius: 22px; }
  .p6-hero h1 { font-size: clamp(32px, 10vw, 44px); }
  .p6-hero__lead { font-size: 15px; }
  .p6-hero__visual { display: none; }
  .p6-facts { grid-template-columns: 1fr 1fr; }
  .p6-facts div { border-bottom: 1px solid var(--p6-line); }
  .p6-facts div:nth-child(2) { border-right: 0; }
  .p6-facts div:nth-child(n+3) { border-bottom: 0; }
  .p6-section, .p6-practice { padding: 62px 0; }
  .p6-method-grid { grid-template-columns: 1fr; }
  .p6-sample-card { grid-template-columns: 1fr; }
  .p6-sample-guide, .p6-sample-question { padding: 26px; }
  .p6-dashboard { padding: 22px; }
  .p6-dashboard__lead { grid-template-columns: 92px 1fr; }
  .p6-progress-ring { width: 88px; height: 88px; }
  .p6-progress-ring::before { width: 66px; height: 66px; }
  .p6-progress-ring strong { font-size: 25px; }
  .p6-dashboard__stats { grid-template-columns: 1fr 1fr; }
  .p6-mode-picker { grid-template-columns: 1fr; }
  .p6-type-grid { grid-template-columns: 1fr 1fr; }
  .p6-player__top { grid-template-columns: 1fr auto; padding: 17px 18px; }
  .p6-player__meter { grid-column: 1 / -1; grid-row: 2; }
  .p6-elapsed { grid-column: 1 / -1; grid-row: 3; min-width: 0; text-align: left; }
  .p6-elapsed small { max-width: none; }
  .p6-document-head { grid-template-columns: 1fr; padding: 15px 18px; }
  .p6-document-head > div:last-child { grid-template-columns: 1fr; gap: 2px; }
  .p6-workspace { padding: 14px; }
  .p6-panel-head { padding: 17px; }
  .p6-passage { padding: 20px; font-size: 16px; }
  .p6-question-panel { padding: 20px; }
  .p6-question-panel > .p6-panel-head { margin: -20px -20px 18px; }
  .p6-feedback, .p6-document-review { margin: 0 14px 14px; padding: 19px; }
  .p6-evidence, .p6-choice-review, .p6-completed-grid { grid-template-columns: 1fr; }
  .p6-completed-grid > div + div { border-top: 1px solid var(--p6-line); border-left: 0; }
  .p6-result { padding: 20px; }
  .p6-result__hero { grid-template-columns: 1fr; text-align: center; }
  .p6-result__skills { grid-template-columns: 1fr 1fr; }
  .p6-mobile-context { display: block; margin: 0 0 16px; padding: 13px; border: 1px solid #d7e2ec; border-radius: 12px; background: #f8fafc; }
  .p6-mobile-context p { margin: 0; }
  .p6-mobile-context p[lang="en"] { margin-top: 4px; color: #33465d; font-family: Georgia, serif; font-size: 13px; line-height: 1.6; }
  .p6-mobile-context button { margin-top: 8px; padding: 6px 0; border: 0; color: var(--p6-blue); background: transparent; font-size: 12px; font-weight: 800; text-decoration: underline; cursor: pointer; }
  .p6-mobile-dock {
    position: sticky;
    z-index: 30;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid #cad8e4;
    background: rgba(244, 247, 250, .96);
    box-shadow: 0 -8px 24px rgba(23, 48, 77, .1);
    backdrop-filter: blur(9px);
  }
  .p6-mobile-dock button { min-height: 44px; border: 1px solid #b8ccdf; border-radius: 11px; color: var(--p6-navy); background: #fff; font-size: 12px; font-weight: 800; }
  .p6-result__metadata { grid-template-columns: 1fr; }
  .p6-lifetime-breakdown, .p6-lifetime-breakdown li { grid-column: 1; }
  .p6-lifetime-breakdown ul { grid-template-columns: 1fr; }
  .p6-boundary, .p6-next { grid-template-columns: 1fr; }
  .p6-next > div:last-child { min-width: 0; }
}

@media (max-width: 460px) {
  .p6-hero__actions, .p6-dashboard__actions, .p6-feedback__actions, .p6-review-actions, .p6-result__actions { display: grid; grid-template-columns: 1fr; }
  .p6-facts { grid-template-columns: 1fr; }
  .p6-facts div { border-right: 0; border-bottom: 1px solid var(--p6-line) !important; }
  .p6-facts div:last-child { border-bottom: 0 !important; }
  .p6-sample-choices { grid-template-columns: 1fr; }
  .p6-sample-text { font-size: 16px; }
  .p6-dashboard__lead { grid-template-columns: 1fr; }
  .p6-dashboard__stats, .p6-type-grid, .p6-skill-grid, .p6-result__skills { grid-template-columns: 1fr; }
  .p6-player__top { grid-template-columns: 1fr; }
  .p6-close { justify-self: start; }
  .p6-player__meter { grid-column: 1; grid-row: auto; width: 100%; }
  .p6-elapsed { grid-column: 1; grid-row: auto; }
  .p6-review-head { display: grid; }
  .p6-review-head > strong { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .p6-page *, .p6-page *::before, .p6-page *::after { scroll-behavior: auto !important; transition: none !important; }
}
