:root {
  color-scheme: light;
  --ink: #14395b;
  --navy: #0b3358;
  --deep: #062642;
  --muted: #5f7182;
  --line: #d4dde5;
  --paper: #f4f6f8;
  --white: #ffffff;
  --accent: #d26f22;
  --accent-dark: #a95016;
  --sky: #e8f1f8;
  --red: #b44d3d;
  --green: #2f7f67;
  --shadow: 0 18px 42px rgba(20, 57, 91, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.utility-bar {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  min-height: 38px;
  padding: 0 clamp(18px, 4vw, 54px);
  background: var(--deep);
  color: var(--white);
}

.utility-bar a {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.section-block h2,
.focus-copy h2 {
  margin: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 230px;
}

.brand-mark > span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: var(--navy);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 900;
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1;
}

.brand-mark small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a,
.resource-link,
.answer-button,
.filter,
.primary-action,
.secondary-action {
  min-height: 42px;
  border-radius: 2px;
  text-decoration: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--navy);
  font-weight: 700;
  border-bottom: 3px solid transparent;
}

.top-nav a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 58px;
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border-left: 5px solid var(--accent);
  background: var(--white);
  box-shadow: 0 4px 16px rgba(20, 57, 91, 0.06);
}

.notice-bar strong {
  color: var(--navy);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.notice-bar span {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  min-height: 320px;
}

.focus-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.4fr);
  gap: 20px;
  align-items: stretch;
  padding: clamp(22px, 4vw, 44px);
  background:
    linear-gradient(rgba(6, 38, 66, 0.9), rgba(6, 38, 66, 0.88)),
    radial-gradient(circle at 82% 16%, rgba(210, 111, 34, 0.28), transparent 26%),
    var(--deep);
  color: var(--white);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.focus-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.focus-copy .eyebrow {
  color: #f2a15c;
}

.focus-copy h2 {
  max-width: 700px;
  font-size: clamp(2rem, 4.4vw, 4.25rem);
  line-height: 1;
}

.focus-copy p:last-child {
  max-width: 620px;
  margin: 18px 0 0;
  color: #d4dde5;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.primary-action {
  background: var(--accent);
  color: var(--white);
}

.primary-action:hover {
  background: var(--accent-dark);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: var(--white);
}

.secondary-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.stats-grid {
  display: grid;
  gap: 12px;
  align-content: center;
}

.stats-grid div,
.score-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.stats-grid strong,
.score-card strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
}

.stats-grid span,
.score-card span {
  display: block;
  margin-top: 8px;
  color: #d4dde5;
  font-size: 0.9rem;
}

.exam-strip {
  position: relative;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  min-height: 320px;
}

.image-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 8px 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.exam-strip img {
  width: 100%;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
}

.controls,
.section-block {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 18px;
}

.search-box {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfa;
}

.search-box input:focus {
  outline: 3px solid rgba(210, 111, 34, 0.16);
  border-color: var(--accent);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter,
.answer-button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fbfcfa;
  color: var(--ink);
}

.filter {
  padding: 0 12px;
  font-weight: 800;
}

.filter:hover,
.filter.is-active {
  border-color: var(--accent);
  background: #fff1e5;
  color: var(--accent-dark);
}

.section-block {
  padding: clamp(18px, 3vw, 30px);
}

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

.section-heading h2,
.practice-intro h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.6rem);
  line-height: 1.05;
  color: var(--navy);
}

.result-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  background: #fbfcfa;
  border-top: 5px solid var(--navy);
}

.resource-card h3,
.plan-grid h3,
.question-card h3 {
  margin: 0;
  line-height: 1.16;
}

.resource-card p,
.plan-grid p,
.practice-intro p {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: start;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 2px;
  background: #e9ece6;
  color: #4f5a64;
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.kind-pdf {
  background: #f5e5e2;
  color: var(--red);
}

.tag.kind-video {
  background: var(--sky);
  color: var(--navy);
}

.tag.kind-exam {
  background: #f8edda;
  color: #835400;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  align-self: end;
  padding: 0 14px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.resource-link:hover {
  background: var(--accent-dark);
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.35fr) minmax(0, 0.65fr);
  gap: 22px;
}

.practice-intro {
  display: grid;
  align-content: start;
  gap: 14px;
}

.score-card {
  background: var(--navy);
  color: var(--white);
}

.quiz-area {
  display: grid;
  gap: 12px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  background: #fbfcfa;
  border-left: 5px solid var(--accent);
}

.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.answer-button {
  padding: 10px 12px;
  text-align: left;
}

.answer-button:hover {
  border-color: var(--accent);
}

.answer-button.is-correct {
  border-color: var(--green);
  background: #e1f0eb;
}

.answer-button.is-wrong {
  border-color: var(--red);
  background: #f7e6e3;
}

.explanation {
  display: none;
  margin: 12px 0 0;
  color: var(--muted);
}

.explanation.is-visible {
  display: block;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.plan-grid article {
  min-height: 180px;
  border-left: 5px solid var(--accent);
  padding: 16px;
  background: #fbfcfa;
}

.plan-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-weight: 900;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 30px;
  color: var(--muted);
}

code {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 940px) {
  .workspace,
  .controls,
  .practice-layout {
    grid-template-columns: 1fr;
  }

  .focus-panel {
    grid-template-columns: 1fr;
  }

  .exam-strip {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    min-height: 150px;
  }

  .resource-grid,
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .utility-bar,
  .app-header,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .utility-bar {
    justify-content: flex-start;
    padding-block: 8px;
  }

  .notice-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-grid,
  .plan-grid,
  .answer-grid,
  .exam-strip {
    grid-template-columns: 1fr;
  }

  .exam-strip {
    grid-template-rows: repeat(3, 120px);
  }
}
