:root {
  --thesis-bg: #05080b;
  --thesis-panel: #0b1117;
  --thesis-panel-strong: #101820;
  --thesis-border: rgba(226, 232, 240, 0.16);
  --thesis-muted: #9aa6b2;
  --thesis-ink: #f8fafc;
  --thesis-green: #a3e635;
  --thesis-teal: #2dd4bf;
}

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(163, 230, 53, 0.06), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(45, 212, 191, 0.06), transparent 34rem),
    var(--thesis-bg);
}

.thesis-page,
.thesis-page * {
  -webkit-user-select: text;
  user-select: text;
}

.thesis-page {
  color: var(--thesis-ink);
}

.thesis-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(3.5rem, 6vw, 5.5rem) clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--thesis-border);
  background:
    linear-gradient(110deg, rgba(163, 230, 53, 0.045), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(226, 232, 240, 0.04) 25%);
}

.thesis-hero h1 {
  max-width: 880px;
  margin-bottom: 1.4rem;
  font-size: clamp(3.8rem, 8vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.thesis-standfirst {
  max-width: 800px;
  margin-bottom: 1rem;
  color: #d7dee7;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.44;
}

.thesis-principle {
  max-width: 720px;
  color: var(--thesis-muted);
  font-size: 1rem;
  font-weight: 720;
}

.thesis-hero .hero-actions {
  margin-top: 2rem;
}

.thesis-compass {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--thesis-border);
  background: rgba(11, 17, 23, 0.86);
}

.thesis-compass h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.thesis-compass ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.thesis-compass li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--thesis-border);
}

.thesis-compass li > span {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid rgba(163, 230, 53, 0.5);
  color: var(--thesis-green);
  font-size: 0.66rem;
  font-weight: 900;
}

.thesis-compass strong,
.thesis-compass small {
  display: block;
}

.thesis-compass strong {
  color: #fff;
}

.thesis-compass small {
  margin-top: 0.14rem;
  color: var(--thesis-muted);
  line-height: 1.35;
}

.handbook-rule,
.guidance-boundary,
.thesis-section,
.review-note {
  width: min(1240px, calc(100% - 2rem));
  margin-right: auto;
  margin-left: auto;
}

.handbook-rule {
  margin-top: clamp(2rem, 3.5vw, 3.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 2px solid var(--thesis-green);
  background:
    linear-gradient(112deg, rgba(163, 230, 53, 0.11), transparent 62%),
    var(--thesis-panel);
}

.handbook-rule h2 {
  max-width: 1100px;
  margin: 0 0 1.3rem;
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.handbook-rule > p:last-child {
  max-width: 980px;
  margin: 0;
  color: #d7dee7;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

.handbook-rule > p:last-child strong {
  color: #d9f99d;
}

.guidance-boundary {
  margin-top: 1.25rem;
  padding: clamp(1.3rem, 2.5vw, 2rem);
  border: 1px solid rgba(45, 212, 191, 0.48);
  background: rgba(45, 212, 191, 0.055);
}

.guidance-boundary h2 {
  max-width: 1100px;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 3.8rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.guidance-boundary > p:last-child {
  max-width: 980px;
  margin: 0;
  color: #d7dee7;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.thesis-jump-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(1240px, calc(100% - 2rem));
  margin: clamp(1.5rem, 2.5vw, 2.25rem) auto 0;
  border: 1px solid var(--thesis-border);
  background: var(--thesis-border);
}

.thesis-jump-nav a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.7rem;
  align-content: start;
  min-width: 0;
  padding: 1.1rem;
  border-radius: 0;
  background: var(--thesis-panel);
  text-decoration: none;
}

.thesis-jump-nav a + a {
  border-left: 1px solid var(--thesis-border);
}

.thesis-jump-nav a::after {
  display: none;
}

.thesis-jump-nav a:hover,
.thesis-jump-nav a:focus-visible {
  background: var(--thesis-panel-strong);
}

.thesis-jump-nav span {
  grid-row: 1 / span 2;
  color: var(--thesis-green);
  font-size: 0.68rem;
  font-weight: 900;
}

.thesis-jump-nav strong {
  color: #fff;
  font-size: 0.92rem;
}

.thesis-jump-nav small {
  margin-top: 0.35rem;
  color: var(--thesis-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.thesis-section {
  padding-top: clamp(4rem, 6vw, 6rem);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.25fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3.5rem);
  margin-bottom: clamp(1.75rem, 3vw, 3rem);
}

.section-number {
  margin: 0;
  color: var(--thesis-green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-heading h2 {
  max-width: 920px;
  margin-bottom: 1rem;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.section-heading > div > p {
  max-width: 820px;
  margin: 0;
  color: var(--thesis-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
}

.prompt-grid,
.principle-grid,
.feedback-grid,
.audit-grid {
  display: grid;
  gap: 1px;
  padding: 1px;
  background: var(--thesis-border);
}

.prompt-grid,
.principle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prompt-grid article,
.principle-grid article,
.feedback-grid article,
.audit-grid article {
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  background: var(--thesis-panel);
}

.prompt-grid article {
  min-height: 15rem;
}

.prompt-grid article > span,
.principle-grid article > span,
.feedback-grid article > span,
.chapter-grid article > span,
.resource-grid a > span {
  display: block;
  margin-bottom: 1.4rem;
  color: var(--thesis-green);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-grid h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  line-height: 1.08;
}

.prompt-grid p,
.principle-grid p,
.chapter-grid p,
.feedback-grid p {
  color: var(--thesis-muted);
}

.writing-line {
  height: 2.5rem;
  margin-top: 1rem;
  border-bottom: 1px solid rgba(163, 230, 53, 0.52);
  background: repeating-linear-gradient(transparent 0, transparent 1.15rem, rgba(226, 232, 240, 0.1) 1.18rem);
}

.question-test {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  margin-top: clamp(1.75rem, 3vw, 3rem);
  padding-top: clamp(1.75rem, 3vw, 3rem);
  border-top: 1px solid var(--thesis-border);
}

.question-test-heading h3 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.question-test-heading > p:last-child {
  margin: 0;
  color: var(--thesis-muted);
}

.question-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--thesis-border);
}

.question-test-grid article {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--thesis-panel);
}

.question-test-grid article > span {
  display: block;
  margin-bottom: 1.3rem;
  color: var(--thesis-green);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-test-grid h4 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.08;
}

.question-test-grid ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.question-test-grid li {
  padding: 0.72rem 0;
  border-top: 1px solid var(--thesis-border);
  color: #cbd5e1;
  font-size: 0.9rem;
}

.meaning-chain {
  grid-column: 1 / -1;
}

.meaning-chain > div {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1.3rem;
  overflow-x: auto;
}

.meaning-chain > div strong {
  color: #fff;
  font-size: 0.78rem;
  white-space: nowrap;
}

.meaning-chain > div i {
  width: clamp(1rem, 2vw, 2.5rem);
  height: 1px;
  background: linear-gradient(90deg, var(--thesis-green), var(--thesis-teal));
}

.meaning-chain p {
  max-width: 860px;
  margin: 0;
  color: var(--thesis-muted);
}

.principle-grid article {
  min-height: 15rem;
}

.principle-grid h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.principle-grid small {
  display: block;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--thesis-border);
  color: #d9f99d;
  font-size: 0.82rem;
  line-height: 1.45;
}

.reader-test,
.paragraph-test {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  margin-top: 1px;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border: 1px solid rgba(45, 212, 191, 0.34);
  background: rgba(45, 212, 191, 0.055);
}

.reader-test > p:last-child,
.paragraph-test > p:last-child {
  align-self: end;
  margin: 0;
  color: #d7dee7;
  font-size: 1.08rem;
}

.reader-test > p:first-child {
  align-self: start;
}

.craft-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--thesis-border);
  list-style: none;
}

.craft-list > li {
  display: grid;
  grid-template-columns: minmax(70px, 0.18fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
  padding: clamp(1.35rem, 2.6vw, 2.25rem) 0;
  border-bottom: 1px solid var(--thesis-border);
}

.craft-number {
  color: var(--thesis-muted);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.craft-label {
  margin-bottom: 0.4rem;
  color: var(--thesis-green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.craft-list h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.craft-list li > div > p:not(.craft-label) {
  max-width: 860px;
  margin-bottom: 1rem;
  color: #cbd5e1;
}

.craft-list small {
  display: block;
  max-width: 860px;
  padding-left: 1rem;
  border-left: 2px solid var(--thesis-teal);
  color: var(--thesis-muted);
  font-size: 0.94rem;
}

.craft-list small strong {
  color: #fff;
}

.golden-thread {
  display: grid;
  grid-template-columns: repeat(11, auto);
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 1.2rem;
  border: 1px solid var(--thesis-border);
  background: var(--thesis-panel);
  overflow-x: auto;
}

.golden-thread span {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.golden-thread i {
  width: clamp(1.5rem, 3vw, 3.5rem);
  height: 1px;
  background: linear-gradient(90deg, var(--thesis-green), var(--thesis-teal));
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1px;
  padding: 1px;
  background: var(--thesis-border);
}

.chapter-grid article {
  grid-column: span 3;
  min-height: 13.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--thesis-panel);
}

.chapter-grid article:nth-last-child(3):nth-child(5),
.chapter-grid article:nth-last-child(2):nth-child(6),
.chapter-grid article:last-child:nth-child(7) {
  grid-column: span 4;
}

.chapter-grid h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.1;
}

.chapter-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.paragraph-test h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.04;
}

.feedback-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feedback-grid article {
  min-height: 13rem;
}

.feedback-grid h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.resource-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--thesis-border);
}

.resource-boundary {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 1.5rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid rgba(45, 212, 191, 0.42);
  background: rgba(45, 212, 191, 0.055);
}

.resource-boundary strong {
  color: #fff;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.1;
}

.resource-boundary p {
  margin: 0;
  color: #cbd5e1;
}

.resource-group:last-child {
  border-bottom: 1px solid var(--thesis-border);
}

.resource-group-title {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.resource-group-title > span {
  display: grid;
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid rgba(163, 230, 53, 0.48);
  color: var(--thesis-green);
  font-size: 0.7rem;
  font-weight: 900;
}

.resource-group-title h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--thesis-border);
}

.resource-grid a {
  display: flex;
  grid-column: span 2;
  min-height: 18rem;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 0;
  background: var(--thesis-panel);
  text-decoration: none;
  transition: background 180ms ease;
}

.resource-grid a:nth-last-child(2):nth-child(4),
.resource-grid a:last-child:nth-child(5) {
  grid-column: span 3;
}

.resource-grid a::after {
  display: none;
}

.resource-grid a:hover,
.resource-grid a:focus-visible {
  background: var(--thesis-panel-strong);
}

.resource-grid strong {
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.12;
}

.resource-grid small {
  display: block;
  margin-top: 0.8rem;
  color: var(--thesis-muted);
  font-size: 0.86rem;
  line-height: 1.47;
}

.resource-grid small b {
  color: #fff;
}

.resource-grid em {
  margin-top: auto;
  padding-top: 1.3rem;
  color: #d9f99d;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 780;
  line-height: 1.4;
}

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

.audit-grid h3 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.audit-grid ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-grid li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--thesis-border);
  color: #cbd5e1;
}

.audit-grid li > span {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.28rem;
  border: 1px solid rgba(163, 230, 53, 0.62);
}

.closing-rule {
  margin-top: 1px;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(163, 230, 53, 0.36);
  background:
    linear-gradient(110deg, rgba(163, 230, 53, 0.08), transparent 58%),
    var(--thesis-panel);
}

.closing-rule > p:last-child {
  max-width: 980px;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.thesis-page .review-note {
  margin-top: 2rem;
  margin-bottom: clamp(3rem, 5vw, 5rem);
  border-top-color: var(--thesis-border);
}

.thesis-page .review-note .source-of-truth {
  max-width: 1050px;
  margin-top: 1rem;
  color: #ff4d4f;
  font-size: clamp(1.7rem, 4vw, 3.7rem);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

@media (max-width: 1080px) {
  .thesis-hero {
    grid-template-columns: 1fr;
  }

  .thesis-compass {
    width: min(680px, 100%);
  }

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

  .thesis-jump-nav a {
    border-top: 1px solid var(--thesis-border);
    border-left: 0 !important;
  }

  .thesis-jump-nav a:nth-child(-n + 2) {
    border-top: 0;
  }

  .thesis-jump-nav a:nth-child(even) {
    border-left: 1px solid var(--thesis-border) !important;
  }

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

  .chapter-grid article,
  .resource-grid a,
  .chapter-grid article:nth-last-child(3):nth-child(5),
  .chapter-grid article:nth-last-child(2):nth-child(6),
  .chapter-grid article:last-child:nth-child(7),
  .resource-grid a:nth-last-child(2):nth-child(4),
  .resource-grid a:last-child:nth-child(5) {
    grid-column: auto;
  }

  .chapter-grid article:last-child:nth-child(odd),
  .resource-grid a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .thesis-hero {
    padding-top: 3.5rem;
  }

  .thesis-hero h1 {
    font-size: clamp(3.4rem, 15vw, 5.4rem);
  }

  .section-heading,
  .reader-test,
  .paragraph-test,
  .resource-boundary,
  .resource-group {
    grid-template-columns: 1fr;
  }

  .prompt-grid,
  .principle-grid,
  .feedback-grid,
  .question-test {
    grid-template-columns: 1fr;
  }

  .prompt-grid article,
  .principle-grid article,
  .feedback-grid article {
    min-height: auto;
  }

  .section-heading {
    gap: 0.8rem;
  }

  .craft-list > li {
    grid-template-columns: 3.2rem minmax(0, 1fr);
    gap: 1rem;
  }

  .craft-number {
    font-size: 2.2rem;
  }

  .resource-group {
    gap: 1rem;
  }

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

@media (max-width: 520px) {
  .thesis-jump-nav,
  .resource-grid,
  .chapter-grid,
  .question-test-grid {
    grid-template-columns: 1fr;
  }

  .meaning-chain {
    grid-column: auto;
  }

  .thesis-jump-nav a,
  .thesis-jump-nav a:nth-child(even),
  .thesis-jump-nav a:nth-child(-n + 2) {
    border-top: 1px solid var(--thesis-border);
    border-left: 0 !important;
  }

  .thesis-jump-nav a:first-child {
    border-top: 0;
  }

  .craft-list > li {
    grid-template-columns: 1fr;
  }

  .chapter-grid article,
  .resource-grid a,
  .chapter-grid article:last-child:nth-child(odd),
  .resource-grid a:last-child:nth-child(odd) {
    grid-column: auto;
    min-height: auto;
  }
}

@media print {
  body {
    padding: 0;
    background: #fff;
    color: #111;
  }

  .site-header,
  .story-trail,
  .thesis-jump-nav,
  .hero-actions,
  .site-footer {
    display: none !important;
  }

  .thesis-page,
  .thesis-page *,
  .heading-accent {
    background: transparent !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  .thesis-hero,
  .handbook-rule,
  .thesis-section,
  .review-note {
    width: 100%;
    margin: 0;
    padding: 1.2rem 0;
  }

  .thesis-hero,
  .section-heading,
  .reader-test,
  .paragraph-test,
  .resource-group {
    grid-template-columns: 1fr;
  }

  .handbook-rule,
  .thesis-compass,
  .prompt-grid article,
  .principle-grid article,
  .chapter-grid article,
  .feedback-grid article,
  .resource-grid a,
  .audit-grid article {
    border: 1px solid #bbb;
  }

  .prompt-grid article,
  .principle-grid article,
  .chapter-grid article,
  .feedback-grid article,
  .resource-grid a,
  .audit-grid article,
  .craft-list > li {
    min-height: 0;
    break-inside: avoid;
  }
}
