:root {
  color-scheme: light;
  --cream: #f8f5ed;
  --paper: #fffdf8;
  --blue: #a3c7d6;
  --blue-deep: #6fa6b7;
  --ink: #2f4f4f;
  --navy: #263b4a;
  --gold: #c8a83e;
  --coral: #d88c72;
  --soft: #687778;
  --line: rgba(47, 79, 79, 0.15);
  --shadow: 0 26px 70px rgba(44, 62, 80, 0.12);
  --font-body: Georgia, "Times New Roman", serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, rgba(163, 199, 214, 0.32), transparent 27rem),
    var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

button,
select,
input,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.academy-header,
.focus-card,
.metric-card,
.domain-card,
.matrix-toolbar,
.competency-domain,
.level-legend,
.method-note,
dialog,
.eyebrow {
  font-family: var(--font-ui);
}

h1 {
  max-width: 900px;
  margin-bottom: 26px;
  color: var(--navy);
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 790;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h3 {
  color: var(--navy);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.academy-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  width: min(1240px, calc(100% - 28px));
  min-height: 68px;
  margin: 12px auto 0;
  padding: 10px 12px;
  background: rgba(248, 245, 237, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(44, 62, 80, 0.1);
  backdrop-filter: blur(20px);
}

.academy-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 820;
  text-decoration: none;
}

.academy-brand img {
  width: 40px;
  height: 40px;
}

.academy-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
}

.academy-title b {
  color: var(--navy);
}

.quiet-button,
.primary-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 760;
}

.quiet-button {
  color: var(--navy);
  background: rgba(163, 199, 214, 0.24);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-actions a {
  display: inline-grid;
  align-items: center;
  text-decoration: none;
}

.primary-button {
  color: white;
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(38, 59, 74, 0.17);
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.academy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(40px, 8vw, 100px);
  align-items: end;
  min-height: 660px;
  padding: 130px 0 90px;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
}

.focus-card {
  position: relative;
  padding: 30px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.focus-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  content: "";
  background: var(--gold);
}

.focus-card > span {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1.14;
}

.focus-card p {
  min-height: 72px;
  color: var(--soft);
  font-size: 14px;
}

.summary-section,
.radar-section,
.domain-overview,
.matrix-section,
.method-section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 38px;
}

.section-heading > p {
  margin-bottom: 5px;
  color: var(--soft);
}

.section-heading.compact {
  align-items: center;
}

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

.metric-card {
  min-height: 210px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.metric-card > span {
  display: block;
  margin-bottom: 28px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 740;
  text-transform: uppercase;
}

.metric-card > strong,
.metric-card > div strong {
  color: var(--navy);
  font-size: 46px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.metric-card small {
  color: var(--soft);
  font-size: 18px;
}

.metric-card p {
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 12px;
}

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

.metric-card.readiness span,
.metric-card.readiness p,
.metric-card.readiness small {
  color: rgba(255, 255, 255, 0.67);
}

.metric-card.readiness strong {
  color: white;
}

.metric-track {
  height: 6px;
  margin-top: 15px;
  overflow: hidden;
  background: rgba(47, 79, 79, 0.09);
  border-radius: 99px;
}

.metric-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue-deep);
  border-radius: inherit;
  transition: width 280ms ease;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
}

.radar-ritual,
.research-feed {
  padding: clamp(22px, 3vw, 32px);
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.radar-ritual {
  position: sticky;
  top: 96px;
}

.ritual-heading,
.feed-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 25px;
}

.feed-actions,
.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feed-actions {
  justify-content: flex-end;
}

.feed-actions .quiet-button {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 10px;
}

.ritual-heading span,
.feed-heading span,
.watchlist a > span,
.watchlist-intro > span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ritual-heading strong,
.feed-heading strong,
.watchlist strong {
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 20px;
  line-height: 1.2;
}

.radar-streak {
  display: grid;
  min-width: 78px;
  text-align: right;
}

.radar-streak b {
  color: var(--blue-deep);
  font-family: var(--font-ui);
  font-size: 36px;
  line-height: 0.9;
}

.radar-streak span {
  margin-top: 7px;
  color: var(--soft);
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
}

.ritual-steps {
  display: grid;
  gap: 0;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.ritual-steps li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.ritual-steps b {
  color: var(--blue-deep);
  font-family: var(--font-ui);
  font-size: 11px;
}

.ritual-steps span {
  color: var(--soft);
  font-size: 13px;
}

.radar-log-form {
  display: grid;
  gap: 14px;
}

.radar-log-form label {
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 720;
}

.radar-log-form .primary-button {
  justify-self: start;
}

#radar-last-caption {
  margin: -2px 0 0;
  color: var(--soft);
  font-family: var(--font-ui);
  font-size: 10px;
}

.feed-heading .quiet-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.feed-status,
.feed-empty,
.translation-note {
  color: var(--soft);
  font-family: var(--font-ui);
  font-size: 11px;
}

.translation-note {
  margin: 2px 0 12px;
  padding: 12px;
  background: rgba(200, 168, 62, 0.09);
  border-radius: 8px;
}

.research-results {
  display: grid;
  margin: 14px 0 18px;
}

.research-item {
  display: grid;
  gap: 7px;
  padding: 17px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.research-item:first-child {
  border-top: 1px solid var(--line);
}

.research-item > span {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--soft);
  font-family: var(--font-ui);
  font-size: 10px;
}

.research-item > span b {
  color: var(--coral);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.research-title {
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
  text-decoration: none;
}

.research-item > small {
  color: var(--soft);
  font-size: 11px;
}

.research-title:hover,
.feed-fallback:hover {
  color: var(--blue-deep);
}

.research-actions {
  margin-top: 4px;
}

.research-actions a {
  padding: 6px 9px;
  color: var(--navy);
  background: rgba(163, 199, 214, 0.18);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 760;
  text-decoration: none;
}

.research-actions a:hover {
  background: rgba(163, 199, 214, 0.34);
}

.feed-fallback {
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 760;
  text-underline-offset: 3px;
}

.watchlist {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, 1fr);
  margin-top: 16px;
  overflow: hidden;
  background: var(--navy);
  border-radius: 16px;
}

.watchlist-intro,
.watchlist > a {
  min-height: 176px;
  padding: 23px;
}

.watchlist-intro {
  background: rgba(255, 255, 255, 0.035);
}

.watchlist-intro strong,
.watchlist > a strong {
  display: block;
  color: white;
  font-size: 15px;
}

.watchlist-intro p,
.watchlist > a small {
  display: block;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-ui);
  font-size: 10px;
  line-height: 1.5;
}

.watchlist > a {
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 160ms ease;
}

.watchlist > a:hover {
  background: rgba(163, 199, 214, 0.12);
}

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

.domain-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 108px;
  padding: 18px;
  color: inherit;
  text-align: left;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.domain-card:hover {
  transform: translateY(-2px);
  background: var(--paper);
  border-color: rgba(111, 166, 183, 0.55);
}

.domain-number {
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--navy);
  background: rgba(163, 199, 214, 0.32);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 820;
  place-items: center;
}

.domain-card strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.25;
}

.domain-card p {
  margin: 5px 0 0;
  color: var(--soft);
  font-size: 11px;
}

.domain-score {
  color: var(--blue-deep);
  font-size: 20px;
  font-weight: 780;
}

.matrix-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 28px;
}

.matrix-toolbar label,
dialog label {
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 720;
}

select,
input,
textarea {
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

select,
input {
  min-height: 44px;
  padding: 8px 12px;
}

textarea {
  width: 100%;
  padding: 12px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px rgba(111, 166, 183, 0.14);
}

.competency-domain {
  margin-bottom: 18px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.74);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.competency-domain:target {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 4px rgba(111, 166, 183, 0.12);
}

.domain-heading {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.domain-heading h3 {
  margin: 0 0 3px;
  font-size: 20px;
}

.domain-heading p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
}

.domain-heading > b {
  color: var(--blue-deep);
  font-size: 22px;
}

.competency-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(250px, 1fr) 190px 150px;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.competency-row:last-child {
  border-bottom: 0;
}

.competency-row.is-hidden {
  display: none;
}

.competency-name strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 15px;
}

.competency-name span,
.competency-indicator {
  color: var(--soft);
  font-size: 12px;
}

.competency-indicator {
  margin: 0;
}

.level-select {
  width: 100%;
  font-size: 12px;
}

.evidence-box {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.evidence-box button {
  padding: 0;
  color: var(--navy);
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: rgba(111, 166, 183, 0.7);
  text-underline-offset: 3px;
}

.evidence-box span {
  color: var(--soft);
  font-size: 10px;
}

.empty-filter {
  padding: 50px 20px;
  color: var(--soft);
  text-align: center;
}

.method-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
  gap: 60px;
  padding-bottom: 120px;
}

.level-legend {
  display: grid;
  gap: 8px;
}

.level-legend article {
  display: grid;
  grid-template-columns: 44px 155px 1fr;
  gap: 15px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.level-legend b {
  display: grid;
  width: 36px;
  height: 36px;
  color: var(--navy);
  background: rgba(163, 199, 214, 0.3);
  border-radius: 50%;
  place-items: center;
}

.level-legend strong {
  color: var(--navy);
  font-size: 13px;
}

.level-legend p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
}

.method-note {
  grid-column: 2;
  margin-top: 12px;
  padding: 20px;
  color: var(--soft);
  background: rgba(163, 199, 214, 0.14);
  border-radius: 10px;
  font-size: 12px;
}

.method-note p:last-child {
  margin-bottom: 0;
}

.method-note a {
  color: var(--navy);
  font-weight: 700;
}

dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 30px 100px rgba(38, 59, 74, 0.28);
}

dialog::backdrop {
  background: rgba(38, 59, 74, 0.42);
  backdrop-filter: blur(4px);
}

dialog form {
  position: relative;
  display: grid;
  gap: 17px;
  padding: 32px;
}

dialog h2 {
  margin-bottom: 5px;
  font-size: 27px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  color: var(--soft);
  background: rgba(47, 79, 79, 0.06);
  border: 0;
  border-radius: 50%;
  font-size: 22px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: 340px;
  padding: 13px 17px;
  color: white;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-family: var(--font-ui);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .academy-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .focus-card {
    max-width: 580px;
  }

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

  .radar-layout {
    grid-template-columns: 1fr;
  }

  .radar-ritual {
    position: static;
  }

  .watchlist {
    grid-template-columns: repeat(2, 1fr);
  }

  .watchlist-intro {
    grid-column: 1 / -1;
  }

  .watchlist > a:nth-of-type(odd) {
    border-left: 0;
  }

  .competency-row {
    grid-template-columns: 1fr 1fr;
  }

  .method-section {
    grid-template-columns: 1fr;
  }

  .method-note {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .academy-header {
    grid-template-columns: 1fr auto;
  }

  .academy-title {
    display: none;
  }

  .academy-header .quiet-button {
    padding-inline: 11px;
    font-size: 11px;
  }

  .header-actions a {
    display: none;
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .academy-hero {
    padding: 90px 0 70px;
  }

  .section-heading,
  .metric-grid,
  .domain-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .watchlist {
    grid-template-columns: 1fr;
  }

  .feed-heading {
    display: grid;
  }

  .feed-actions {
    justify-content: flex-start;
  }

  .watchlist > a,
  .watchlist > a:nth-of-type(odd) {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .watchlist-intro,
  .watchlist > a {
    min-height: auto;
  }

  .metric-card {
    min-height: 170px;
  }

  .matrix-toolbar {
    display: grid;
  }

  .competency-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .domain-heading {
    grid-template-columns: 42px 1fr;
  }

  .domain-heading > b {
    grid-column: 2;
  }

  .level-legend article {
    grid-template-columns: 42px 1fr;
  }

  .level-legend p {
    grid-column: 2;
  }
}

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