/* v70: the supplied regional-home reference, adapted to the current product contract. */
:root {
  --region70-navy: #12295c;
  --region70-forest: #24503a;
  --region70-forest-hover: #1c5c3b;
  --region70-ink: #241a06;
  --region70-muted: #5b5344;
  --region70-paper: #fbf6ea;
  --region70-surface: #fffdf8;
  --region70-white: #ffffff;
  --region70-wash: #f7f1e1;
  --region70-rule: #d8cdb0;
  --region70-focus: #765300;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) {
  margin: 0;
  background: var(--region70-paper) !important;
  color: var(--region70-ink) !important;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  line-height: 1.55;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) :where(h1, h2, h3, h4, p, button, input, select, summary) {
  font-family: inherit !important;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) :where(h1, h2, h3) {
  color: var(--region70-navy) !important;
  letter-spacing: -.02em !important;
  text-wrap: balance;
}

/* The reference header: compact, pale, strongly outlined, and useful at every width. */
body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell {
  background: var(--region70-paper) !important;
  border: 0 !important;
  border-bottom: 2px solid var(--region70-ink) !important;
  box-shadow: none !important;
  color: var(--region70-ink) !important;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-inner {
  width: min(calc(100% - 2rem), 70rem) !important;
  min-height: 5rem;
  gap: 1rem;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-brand {
  flex: none;
  color: var(--region70-ink) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-brand-full,
body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-icon {
  display: none !important;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-region-field {
  min-width: 0;
  width: min(52vw, 24rem);
  max-width: 24rem;
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-region-field::after {
  right: 1.15rem;
  width: .55rem;
  height: .55rem;
  border-color: var(--region70-ink);
}

body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-region-select {
  width: 100%;
  max-width: none;
  min-height: 3.5rem;
  padding: .75rem 3rem .75rem 1rem;
  border: 2px solid var(--region70-ink) !important;
  border-radius: .65rem !important;
  background: var(--region70-white) !important;
  color: var(--region70-ink) !important;
  font-size: 1rem !important;
  font-weight: 800;
}

/* Geographic regional catalogues. */
body.tta-region-inventory .inventory-wrap,
body.tta-region-inventory .inventory-main {
  width: min(calc(100% - 2rem), 70rem) !important;
  max-width: 70rem !important;
}

body.tta-region-inventory .inventory-hero {
  padding: 2.1rem 0 1.4rem !important;
  border: 0 !important;
  background: transparent !important;
}

body.tta-region-inventory .inventory-hero .inventory-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

body.tta-region-inventory .inventory-kicker {
  order: 1;
  display: inline-flex;
  margin: 0 0 1rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: #fff1e5 !important;
  color: var(--region70-focus) !important;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

body.tta-region-inventory .inventory-hero h1 {
  order: 2;
  max-width: 18ch;
  margin: 0 0 .75rem;
  color: var(--region70-navy) !important;
  font-size: 2.35rem !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -.025em !important;
}

body.tta-region-inventory .inventory-intro {
  order: 3;
  max-width: 45rem;
  margin: 0;
  color: var(--region70-muted) !important;
  font-size: 1.08rem;
  line-height: 1.5;
  text-wrap: pretty;
}

body.tta-region-inventory .inventory-intro-secondary {
  order: 4;
  margin-top: .85rem;
}

body.tta-region-inventory .tta-v64-connection-key {
  order: 5;
  box-sizing: border-box;
  width: min(100%, 45rem);
  margin: 1.25rem 0 0 !important;
  padding: 1rem 1.1rem !important;
  border: 1px solid var(--region70-rule) !important;
  border-radius: .7rem;
  background: var(--region70-surface) !important;
  color: var(--region70-muted) !important;
  font-size: 1rem;
  line-height: 1.45;
}

body.tta-region-inventory .tta-v64-connection-key strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--region70-navy);
  font-size: 1.15rem;
  line-height: 1.25;
}

body.tta-region-inventory .inventory-main {
  padding: .5rem 0 4.5rem !important;
}

/* Controls are independent field-guide sections, not a card nested inside a card. */
body.tta-region-inventory .plan-finder-controls {
  margin: 0 0 2.25rem;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.tta-region-inventory .plan-finder-control-grid {
  gap: 1rem;
}

body.tta-region-inventory .plan-finder-control,
body.tta-region-inventory .plan-finder-refine {
  min-width: 0;
  padding: 1.1rem !important;
  border: 1.5px solid var(--region70-ink) !important;
  border-radius: .75rem !important;
  background: var(--region70-surface) !important;
  box-shadow: none !important;
}

body.tta-region-inventory .plan-finder-refine {
  margin-top: 1rem;
}

body.tta-region-inventory .plan-finder-control legend,
body.tta-region-inventory .plan-finder-field label,
body.tta-region-inventory .plan-finder-skill-heading {
  color: var(--region70-navy) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
}

body.tta-region-inventory .plan-finder-control legend {
  margin-bottom: .75rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

body.tta-region-inventory .plan-finder-buttons {
  gap: .55rem;
}

body.tta-region-inventory .plan-finder-button,
body.tta-region-inventory .plan-finder-skill-button,
body.tta-region-inventory .plan-finder-skill-clear {
  min-height: 2.9rem;
  border: 1.5px solid var(--region70-ink) !important;
  border-radius: .55rem !important;
  background: var(--region70-white) !important;
  color: var(--region70-ink) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

body.tta-region-inventory .plan-finder-button:hover,
body.tta-region-inventory .plan-finder-skill-button:hover,
body.tta-region-inventory .plan-finder-skill-clear:hover {
  border-color: var(--region70-forest) !important;
  background: var(--region70-wash) !important;
  color: var(--region70-ink) !important;
}

body.tta-region-inventory .plan-finder-button:not([data-grade-filter])[aria-pressed="true"],
body.tta-region-inventory .plan-finder-skill-button[aria-pressed="true"] {
  border-color: var(--region70-ink) !important;
  background: var(--region70-forest) !important;
  color: #fff !important;
}

body.tta-region-inventory .plan-finder-button[data-grade-filter] {
  min-width: 3rem;
  color: var(--region70-navy) !important;
  border-color: #9eafc4 !important;
}

body.tta-region-inventory .plan-finder-button[data-grade-filter][aria-pressed="true"] {
  border-color: var(--region70-navy) !important;
  color: var(--region70-navy) !important;
  box-shadow: inset 0 0 0 2px var(--region70-navy) !important;
}

body.tta-region-inventory .plan-finder-skill-prompt {
  border: 1px solid #d7dfec;
  border-radius: .6rem;
  background: #f4f7fb;
  color: #52617b;
}

body.tta-region-inventory .plan-finder-field select,
body.tta-region-inventory .plan-finder-field input {
  height: 3rem;
  min-height: 3rem;
  border: 1.5px solid #9eafc4;
  border-radius: .55rem;
  background: var(--region70-white);
  color: var(--region70-ink);
}

body.tta-region-inventory :where(.plan-finder-button, .plan-finder-skill-button, .plan-finder-skill-clear, .plan-finder-field select, .plan-finder-field input):focus-visible {
  outline: 3px solid var(--region70-focus) !important;
  outline-offset: 3px !important;
}

body.tta-region-inventory .inventory-results {
  gap: 2.5rem;
}

body.tta-region-inventory .inventory-grade-head {
  border-bottom: 2px solid var(--region70-ink);
}

body.tta-region-inventory .inventory-grade-head h2,
body.tta-region-inventory .inventory-section-heading h2,
body.tta-region-inventory .inventory-duration-head h3 {
  color: var(--region70-navy) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
}

body.tta-region-inventory .inventory-card,
body.tta-region-inventory .inventory-book-group,
body.tta-region-inventory .inventory-family-variants {
  border: 1px solid var(--region70-rule) !important;
  border-radius: .65rem !important;
  background: var(--region70-white) !important;
  box-shadow: none !important;
}

body.tta-region-inventory .inventory-card:hover,
body.tta-region-inventory .inventory-book-summary:hover {
  border-color: #a99b79 !important;
  background: var(--region70-wash) !important;
  box-shadow: none !important;
}

body.tta-region-inventory .inventory-card-title,
body.tta-region-inventory .inventory-book-title {
  color: var(--region70-navy) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
}

body.tta-region-inventory :where(.inventory-card-subtitle, .inventory-card-book, .inventory-card-status, .inventory-grade-count, .inventory-duration-count, .inventory-resource-description) {
  color: var(--region70-muted) !important;
}

body.tta-region-inventory :where(.inventory-card-open, .inventory-book-label) {
  color: var(--region70-forest) !important;
}

body.tta-region-inventory .inventory-book-disclosure {
  border-radius: .55rem !important;
  background: var(--region70-forest) !important;
  color: #fff !important;
}

body.tta-region-inventory .inventory-book-group[open] .inventory-book-disclosure {
  background: var(--region70-wash) !important;
  color: var(--region70-ink) !important;
}

body.tta-region-inventory .tta-plan-footer {
  background: var(--region70-paper) !important;
  color: var(--region70-muted) !important;
  border-top: 1px solid var(--region70-rule) !important;
}

/* IB programme pages use the same regional visual language without changing their content model. */
body.tta-pyp-page :where(.pyp-wrap, .pyp-main),
body.tta-myp-page .myp-wrap {
  width: min(calc(100% - 2rem), 70rem) !important;
  max-width: 70rem !important;
  margin-inline: auto !important;
}

body.tta-pyp-page .pyp-hero {
  padding: 2.1rem 0 1.8rem !important;
  border-bottom: 1px solid var(--region70-rule) !important;
  background: transparent !important;
}

body.tta-pyp-page .pyp-hero h1,
body.tta-myp-page .myp-wrap > h1 {
  max-width: 22ch;
  margin: .35rem 0 .7rem;
  color: var(--region70-navy) !important;
  font-size: 2.35rem !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  text-wrap: wrap;
}

body.tta-pyp-page :where(.pyp-eyebrow, .pyp-kicker),
body.tta-myp-page .kicker {
  color: var(--region70-focus) !important;
  font-size: .85rem !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
}

body.tta-pyp-page .pyp-hero > .pyp-wrap > p:not(.pyp-truth),
body.tta-myp-page .lede {
  max-width: 46rem;
  color: var(--region70-muted) !important;
  font-size: 1.08rem;
  line-height: 1.55;
}

body.tta-pyp-page .pyp-truth,
body.tta-pyp-page .pyp-evidence-note,
body.tta-myp-page .boundary {
  border: 1px solid var(--region70-rule) !important;
  border-radius: .7rem !important;
  background: var(--region70-surface) !important;
  color: var(--region70-ink) !important;
  box-shadow: none !important;
}

body.tta-myp-page .myp-wrap {
  padding-top: 2.1rem !important;
  padding-bottom: 4rem !important;
}

body.tta-pyp-page :where(.pyp-theme-card, .pyp-book),
body.tta-myp-page .book-card {
  border: 1px solid var(--region70-rule) !important;
  border-radius: .7rem !important;
  background: var(--region70-white) !important;
  box-shadow: none !important;
}

body.tta-pyp-page :where(.pyp-theme-card h2, .pyp-book h2, .pyp-book h3),
body.tta-myp-page :where(.grouphead h2, .book-card h3) {
  color: var(--region70-navy) !important;
}

body.tta-pyp-page :where(.pyp-chip, .pyp-counts > *),
body.tta-myp-page .tag {
  background: #edf3fb !important;
  color: var(--region70-navy) !important;
  border-color: #cbd8ea !important;
}

body.tta-pyp-page :where(button, .pyp-open-book),
body.tta-myp-page :where(.filter, .book-link) {
  min-height: 2.75rem;
  border: 1.5px solid var(--region70-ink) !important;
  border-radius: .55rem !important;
  box-shadow: none !important;
}

body.tta-myp-page .filter[aria-pressed="true"] {
  background: var(--region70-forest) !important;
  color: #fff !important;
}

body.tta-pyp-page :where(button, .pyp-open-book):focus-visible,
body.tta-myp-page :where(.filter, .book-link):focus-visible {
  outline: 3px solid var(--region70-focus) !important;
  outline-offset: 3px !important;
}

@media (max-width: 53.125rem) {
  body.tta-region-inventory .plan-finder-control-grid {
    grid-template-areas: "grade" "skill" "type";
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 40rem) {
  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-inner {
    width: calc(100% - 1rem) !important;
    min-height: 4.8rem;
    gap: .75rem;
  }

  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-brand {
    font-size: .95rem !important;
  }

  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-region-field {
    flex: 1 1 auto;
    width: auto;
    max-width: 15.5rem;
  }

  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-region-select {
    min-height: 3.3rem;
    font-size: .95rem !important;
  }

  body.tta-region-inventory .inventory-wrap,
  body.tta-region-inventory .inventory-main,
  body.tta-pyp-page :where(.pyp-wrap, .pyp-main),
  body.tta-myp-page .myp-wrap {
    width: min(calc(100% - 1.25rem), 70rem) !important;
  }

  body.tta-region-inventory .inventory-hero {
    padding-top: 1.8rem !important;
  }

  body.tta-region-inventory .inventory-hero h1,
  body.tta-pyp-page .pyp-hero h1,
  body.tta-myp-page .myp-wrap > h1 {
    font-size: 2rem !important;
  }

  body.tta-region-inventory .inventory-intro,
  body.tta-pyp-page .pyp-hero > .pyp-wrap > p:not(.pyp-truth),
  body.tta-myp-page .lede {
    font-size: 1.03rem;
  }

  body.tta-region-inventory .plan-finder-control,
  body.tta-region-inventory .plan-finder-refine {
    padding: .85rem !important;
  }

  body.tta-region-inventory .plan-finder-button[data-grade-filter] {
    flex: 1 1 calc(25% - .55rem);
  }
}

@media (max-width: 20rem) {
  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-inner {
    width: calc(100% - .75rem) !important;
    gap: .5rem;
  }

  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell-brand {
    font-size: .82rem !important;
  }

  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-region-select {
    padding-left: .7rem;
    padding-right: 2.2rem;
    font-size: .85rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) {
    background: #fff !important;
    color: #000 !important;
  }

  body.tta-region-inventory .plan-finder-controls,
  body.tta-teacher-page:is(.tta-region-inventory, .tta-pyp-page, .tta-myp-page) .tta-shell {
    display: none !important;
  }
}
