.pg-review-route {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 16px;
  margin-bottom: 20px;
}
.pg-review-route p {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 14px;
}
.pg-review-route > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.pg-review-route a {
  font-size: 13px;
}
.pg-page {
  --pg-sidebar: 220px;
  --blue: #5e6ad2;
  --blue-dark: #4f58b2;
  --soft: #f7f7f8;
  background: var(--white);
  font-size: 14px;
  line-height: 1.55;
}
.pg-page [hidden] {
  display: none !important;
}
.pg-page button,
.pg-page input,
.pg-page select,
.pg-page textarea {
  font: inherit;
  color: var(--ink);
}
.pg-page button,
.pg-page select {
  cursor: pointer;
}
.pg-page button,
.pg-primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}
.pg-page button:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--muted-light);
}
.pg-page button:disabled {
  opacity: 0.45;
  cursor: default;
}
.pg-page .pg-primary {
  background: var(--accent, var(--blue-dark));
  border-color: var(--accent, var(--blue-dark));
  color: var(--on-accent, #fff);
}
.pg-page .pg-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent, var(--blue)) 90%, black);
}
.pg-page :focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.pg-page :is(h1, h2, h3)[tabindex="-1"]:focus {
  outline: none;
}
.pg-page h1 {
  font-size: clamp(23px, 2.2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 12px 0 16px;
}
.pg-page h2 {
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.pg-page h3 {
  font-size: 15px;
  line-height: 1.5;
}
.pg-sidebar {
  width: var(--pg-sidebar);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--soft);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
}
.pg-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 0 8px;
}
.pg-workspace {
  display: grid;
  gap: 3px;
  padding: 0 8px;
}
.pg-workspace span {
  font-size: 12px;
  color: var(--muted);
}
.pg-page .pg-search-button {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  background: transparent;
}
.pg-sidebar nav {
  display: grid;
  gap: 4px;
}
.pg-sidebar nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
}
.pg-sidebar nav a:hover {
  background: var(--line);
  color: var(--ink);
}
.pg-sidebar nav a[aria-current] {
  background: #ededf3;
  color: var(--ink);
  box-shadow: none;
  font-weight: 600;
}
.pg-sidebar nav span {
  font-size: 11px;
  color: var(--muted);
}
.pg-sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.pg-sidebar-bottom button {
  font-size: 12px;
}
.pg-sidebar-bottom p {
  font-size: 11px;
  line-height: 1.7;
  margin: 4px 0 0;
}
.pg-frame {
  margin-left: var(--pg-sidebar);
  min-width: 0;
}
.pg-topbar {
  height: 48px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  gap: 18px;
}
.pg-topbar strong {
  font-weight: 500;
}
.pg-topbar span span {
  padding: 0 9px;
  color: var(--muted-light);
}
#pg-save {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.pg-topbar > span:first-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pg-save {
  flex: 0 0 auto;
  max-width: 42%;
}
.pg-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 36px 64px;
}
.pg-heading {
  margin-bottom: 24px;
  max-width: 790px;
}
.pg-heading > p:not(.pg-eyebrow) {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.75;
}
.pg-eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}
.pg-muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.pg-error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 24px 0;
}
.pg-error-actions a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pg-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--soft);
  margin-bottom: 24px;
}
.pg-next p {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
  max-width: 650px;
}
.pg-next button,
.pg-next > a {
  flex-shrink: 0;
}
.pg-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  gap: 20px;
}
.pg-metrics > div {
  padding: 0 0 24px;
}
.pg-metrics strong {
  display: block;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.pg-metrics span {
  color: var(--muted);
  font-size: 12px;
}
.pg-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 44px;
}
.pg-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pg-row strong {
  font-weight: 500;
  font-size: 13px;
}
.pg-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.pg-row > span {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.pg-row button {
  align-self: center;
  flex-shrink: 0;
}
.pg-row progress {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 12px;
  accent-color: var(--blue);
}
.pg-row > div {
  flex: 1;
  min-width: 0;
}
.pg-link-list {
  display: grid;
}
.pg-link-list a {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
}
.pg-link-list a:hover {
  color: var(--blue-dark);
}
.pg-section-gap {
  margin-top: 34px !important;
}
.pg-footnote {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.pg-builder {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.pg-builder label {
  flex: 1;
  min-width: 120px;
}
.pg-page label {
  font-size: 12px;
  color: var(--muted);
}
.pg-page input[type="search"],
.pg-page input[type="date"],
.pg-page select,
.pg-page textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  background: var(--white);
}
.pg-builder select,
.pg-builder input {
  margin-top: 7px;
}
.pg-filter-label {
  display: block;
  margin-bottom: 7px;
}
.pg-selection {
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
}
.pg-selection p {
  margin: 0 0 6px;
  color: var(--muted);
}
.pg-selection a {
  text-underline-offset: 3px;
}
.pg-question-list {
  margin-top: 18px;
}
.pg-list-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.pg-list-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}
.pg-list-item span {
  font-size: 11px;
  color: var(--muted);
}
.pg-list-item small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}
.pg-list-item button {
  font-size: 12px;
}
.pg-empty {
  border: 1px dashed var(--line);
  padding: 36px;
  border-radius: 10px;
  color: var(--muted);
  margin: 20px 0;
}
.pg-empty a {
  display: inline-block;
  color: var(--blue-dark);
  margin-top: 10px;
}
.pg-checkbox {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 18px 0;
}
.pg-study-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}
.pg-study-head h1 {
  margin: 5px 0;
}
.pg-case {
  max-width: 870px;
}
.pg-case-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin: 24px 0;
}
.pg-case h2 {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.65;
  margin-bottom: 25px;
}
.pg-case-meta button[aria-pressed="true"] {
  color: var(--blue-dark);
  border-color: var(--blue);
}
.pg-options {
  display: grid;
  gap: 10px;
}
.pg-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.pg-page .pg-option {
  font-size: 14px;
  color: var(--ink);
}
.pg-option input {
  margin-top: 5px;
  accent-color: var(--blue);
}
.pg-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--soft);
}
.pg-option.is-correct {
  border-width: 2px;
  border-color: var(--blue-dark);
}
.pg-option span {
  margin-left: auto;
  font-size: 11px;
  color: var(--blue-dark);
}
.pg-case-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.pg-hint-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.pg-hint {
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  background: var(--soft);
  margin-top: 18px;
}
.pg-hint p {
  margin: 8px 0;
}
.pg-performance {
  margin: -16px 0 24px;
}
.pg-performance summary {
  cursor: pointer;
  font-size: 13px;
}
.pg-support-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.pg-support-results strong {
  font-size: 13px;
  font-weight: 500;
}
.pg-support-results p {
  font-size: 12px;
  margin: 6px 0;
  color: var(--muted);
}
#pg-assisted-next a {
  color: var(--blue-dark);
  text-decoration: underline;
}
.pg-feedback {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
  line-height: 1.85;
}
.pg-feedback li + li {
  margin-top: 9px;
}
.pg-feedback a,
#pg-review-answer > a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pg-note {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin: 28px 0;
}
.pg-note summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}
.pg-note label {
  display: block;
  margin-bottom: 10px;
}
.pg-note button {
  margin-top: 10px;
}
.pg-note p {
  font-size: 13px;
  line-height: 1.8;
}
.pg-note textarea {
  resize: vertical;
  min-height: 110px;
}
.pg-note > span {
  margin-left: 14px;
  font-size: 12px;
  color: var(--muted);
}
.pg-grade {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.pg-grade button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pg-grade span {
  font-size: 11px;
  color: var(--muted);
}
.pg-review-details {
  margin: 22px 0;
}
.pg-review-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.pg-review-details li {
  padding: 8px 0 8px 6px;
}
.pg-review-rationales {
  list-style: none;
  padding: 0;
}
.pg-review-rationales li + li {
  border-top: 1px solid var(--line);
}
.pg-review-answer {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  line-height: 1.8;
}
#pg-review-key {
  font-size: 18px;
  font-weight: 600;
}
.pg-review-clue {
  font-weight: 500;
}
.pg-review-previous {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 2px solid var(--line);
  background: var(--soft);
  border-radius: 0 8px 8px 0;
}
.pg-review-previous h3 {
  margin: 0;
}
.pg-review-previous p:last-child {
  margin-bottom: 0;
}
.pg-review-answer .pg-grade {
  padding-bottom: 20px;
}
.pg-notice:empty {
  display: none;
}
.pg-notice {
  padding: 13px 16px;
  border-left: 3px solid var(--blue);
  background: var(--soft);
  font-size: 12px;
  margin-bottom: 24px;
}
.pg-page dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  max-width: min(610px, calc(100vw - 32px));
  width: 100%;
  max-height: 85dvh;
  color: var(--ink);
  background: var(--white);
}
.pg-page dialog::backdrop {
  background: #0006;
  backdrop-filter: blur(3px);
}
.pg-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.pg-dialog-heading h2 {
  margin: 0;
}
#pg-command-results {
  display: grid;
  gap: 5px;
  max-height: 45dvh;
  overflow: auto;
  margin: 15px 0;
}
#pg-command-results button {
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  flex-shrink: 0;
}
.pg-page kbd {
  font-family: inherit;
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 4px;
}
@media (max-width: 1100px) {
  .pg-page {
    --pg-sidebar: 210px;
  }
  .pg-main {
    padding: 32px 26px 65px;
  }
  .pg-two-column {
    gap: 28px;
  }
  .pg-next {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .pg-page {
    --pg-sidebar: 0px;
  }
  .pg-sidebar {
    position: static;
    width: auto;
    overflow: visible;
    gap: 14px;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .pg-brand {
    padding: 0;
  }
  .pg-workspace {
    position: absolute;
    right: 16px;
    top: 17px;
    text-align: right;
  }
  .pg-workspace span {
    font-size: 10px;
  }
  .pg-sidebar nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }
  .pg-sidebar nav a {
    white-space: nowrap;
    padding: 10px;
  }
  .pg-sidebar nav span {
    margin-left: 7px;
  }
  .pg-sidebar-bottom {
    display: none;
  }
  .pg-topbar {
    padding: 0 18px;
    height: 50px;
  }
  .pg-main {
    padding: 25px 18px 60px;
  }
  .pg-two-column {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .pg-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 26px;
  }
  .pg-metrics > div {
    padding-bottom: 10px;
  }
  .pg-next {
    padding: 20px;
  }
  .pg-case h2 {
    font-size: 19px;
  }
  .pg-builder label {
    min-width: 130px;
  }
  .pg-builder button {
    width: 100%;
  }
  .pg-list-item {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
  }
  .pg-list-item button {
    grid-column: 2;
    justify-self: start;
  }
  .pg-grade {
    grid-template-columns: repeat(2, 1fr);
  }
  .pg-empty {
    padding: 24px;
  }
  .pg-study-head {
    align-items: flex-start;
  }
  .pg-study-head > button {
    font-size: 11px;
  }
  .pg-topbar > #pg-save {
    max-width: 150px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pg-page {
    scroll-behavior: auto;
  }
  .pg-page * {
    scroll-behavior: auto;
  }
}
