:root {
  --ink: #071a44;
  --ink-2: #102a5c;
  --muted: #5f6f89;
  --paper: #fffdf8;
  --paper-2: #f7f3ea;
  --line: #dfe5ee;
  --line-strong: #b9c4d4;
  --orange: #f26a13;
  --orange-2: #ff8c2a;
  --gold: #f4b452;
  --white: #ffffff;
  --navy: #031a3b;
  --shadow: 0 18px 45px rgba(7, 26, 68, 0.12);
  --radius: 8px;
  --max: 1180px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 7%, rgba(244, 180, 82, 0.12), transparent 28rem),
    linear-gradient(180deg, #fffdfa 0%, #fbf8f1 52%, #ffffff 100%);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(7, 26, 68, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 26, 68, 0.028) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 58%);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid rgba(7, 26, 68, 0.12);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(var(--max), calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.brand-text {
  display: grid;
  font-size: 17px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 800;
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--orange);
}

.nav-search {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  color: var(--ink);
  border-radius: 999px;
}

.nav-search:hover,
.nav-search:focus-visible {
  border-color: var(--line-strong);
  color: var(--orange);
}

.hero {
  min-height: 610px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(7, 26, 68, 0.08);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.96) 0%, rgba(255, 253, 248, 0.9) 42%, rgba(255, 253, 248, 0.18) 68%, rgba(255, 253, 248, 0.02) 100%),
    url("../images/hero/clipboard-court-hero.png") right center / auto 100% no-repeat;
}

.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 92px;
}

.hero-copy {
  max-width: 620px;
}

.hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--ink);
}

.accent-rule {
  width: 86px;
  height: 4px;
  margin: 28px 0 24px;
  background: var(--orange);
}

.hero p {
  max-width: 500px;
  margin: 0;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

@media (min-width: 821px) and (max-width: 980px) {
  .nav {
    gap: 18px;
  }

  .nav-links {
    gap: 20px;
    font-size: 13px;
  }

  .hero {
    background:
      linear-gradient(90deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 253, 248, 0.94) 44%, rgba(255, 253, 248, 0.42) 70%, rgba(255, 253, 248, 0.08) 100%),
      url("../images/hero/clipboard-court-hero.png") right bottom / 470px auto no-repeat;
  }

  .hero-copy,
  .hero h1 {
    max-width: 540px;
  }

  .category-card .card-link {
    font-size: 10px;
  }

  .category-card {
    padding-inline: 12px;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--orange);
  color: var(--white);
  background: var(--orange);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(7, 26, 68, 0.13);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0;
}

.section-tight {
  padding-top: 48px;
}

.section-label {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section h2,
.page-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-link {
  color: var(--orange);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

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

.category-card,
.breakdown-card,
.vault-card,
.resource-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(7, 26, 68, 0.03);
}

.category-card {
  min-height: 246px;
  padding: 22px 18px 18px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.category-card:hover,
.category-card:focus-visible {
  border-color: rgba(242, 106, 19, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  color: var(--ink);
}

.category-card h3,
.breakdown-card h3,
.vault-card h3,
.resource-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
}

.category-card p,
.breakdown-card p,
.vault-card p,
.resource-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

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

.breakdown-card {
  overflow: hidden;
  min-height: 404px;
  display: flex;
  flex-direction: column;
}

.diagram-frame {
  aspect-ratio: 1.55;
  background: #f8ddb2;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.diagram-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  mix-blend-mode: multiply;
  filter: contrast(1.05) saturate(0.86);
}

.breakdown-body {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  color: #a64b05;
  background: #fff0df;
  font-size: 12px;
  font-weight: 800;
}

.card-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.newsletter-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  padding: 38px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 42%, rgba(242, 106, 19, 0.12), transparent 18rem),
    linear-gradient(90deg, #fbf4e9 0%, #fffaf3 100%);
  border: 1px solid rgba(7, 26, 68, 0.08);
}

.clipboard-sketch {
  width: min(100%, 240px);
  justify-self: center;
  color: var(--ink);
}

.newsletter-copy h2 {
  margin-bottom: 12px;
}

.newsletter-copy p {
  max-width: 620px;
  margin: 0 0 22px;
  color: var(--ink-2);
}

.newsletter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  max-width: 620px;
}

.newsletter-form input,
.vault-search input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  font: 600 14px/1 var(--font-sans);
}

.form-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.vault-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink-2);
  padding: 0 18px;
  font: 800 13px/1 var(--font-sans);
  cursor: pointer;
}

.filter-button.is-active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.vault-search {
  position: relative;
  width: min(100%, 310px);
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.vault-card {
  overflow: hidden;
}

.vault-cover {
  aspect-ratio: 0.78;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(238, 225, 204, 0.72)),
    repeating-linear-gradient(0deg, rgba(7, 26, 68, 0.05) 0, rgba(7, 26, 68, 0.05) 1px, transparent 1px, transparent 12px);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.04;
}

.vault-body {
  padding: 16px;
}

.vault-body p {
  margin-top: 8px;
}

.site-footer {
  margin-top: 50px;
  color: #d8e5f7;
  background: var(--navy);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 42px;
  padding: 46px 0 32px;
}

.footer-title {
  margin: 12px 0 8px;
  color: var(--white);
  font-weight: 900;
}

.footer-col h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
}

.footer-col a,
.footer-brand p {
  display: block;
  color: #bfd0e9;
  font-size: 13px;
  text-decoration: none;
  margin: 0 0 8px;
}

.footer-bottom {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #a9bad2;
  font-size: 12px;
}

.page-hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 42px;
}

.page-hero p {
  max-width: 720px;
  color: var(--ink-2);
  font-size: 18px;
}

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

.resource-card {
  padding: 24px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.library-toolbar label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-toolbar select,
.library-toolbar input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 13px;
  background: var(--white);
  color: var(--ink);
  font: 700 14px/1 var(--font-sans);
}

.library-count {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

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

.drill-library-card {
  min-height: 330px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 1px 0 rgba(7, 26, 68, 0.03);
}

.drill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.drill-badges span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff0df;
  color: #a84709;
  font-size: 11px;
  font-weight: 900;
}

.drill-library-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.12;
}

.drill-library-card p {
  margin: 13px 0 18px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.drill-library-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.library-empty {
  margin-top: 18px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.library-empty h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 22px;
}

.library-empty p {
  margin: 0;
  color: var(--muted);
}

.compact-panel {
  grid-template-columns: 180px 1fr;
}

.compact-panel h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

.compact-panel p {
  margin: 0 0 18px;
  color: var(--ink-2);
}

.compact-panel form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  max-width: 620px;
}

.compact-panel input {
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  font: 600 14px/1 var(--font-sans);
}

.article-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 70px;
}

.article-hero-image {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 34px;
}

.article-hero-image img {
  width: 100%;
}

.article-meta {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-shell h1 {
  margin: 10px 0 14px;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.article-subtitle {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.65;
}

.article-byline {
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.article-content {
  color: #14264b;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.85;
}

.article-content h2,
.article-content h3 {
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.15;
}

.article-content h2 {
  margin: 46px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 30px;
}

.article-content h3 {
  margin: 32px 0 10px;
  font-size: 22px;
}

.article-content p,
.article-content li {
  margin-bottom: 18px;
}

.article-content img {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.article-content .toc,
.article-content .diagram-section,
.article-content .quote-box,
.article-content .callout,
.article-content .key-point,
.article-content .coach-cheatsheet {
  font-family: var(--font-sans);
  border-radius: var(--radius);
}

.article-content .toc,
.article-content .diagram-section {
  padding: 22px;
  background: #f7f3ea;
  border: 1px solid var(--line);
}

.article-content .coach-cheatsheet {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid rgba(245, 106, 0, 0.28);
  border-left: 5px solid var(--orange);
  background: #fff8ee;
  box-shadow: var(--shadow);
}

.article-content .coach-cheatsheet h2,
.article-content .coach-cheatsheet h3 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 22px;
}

.article-content .coach-cheatsheet ul {
  margin: 0;
  padding-left: 20px;
}

.article-content .coach-cheatsheet li {
  margin-bottom: 10px;
}

.article-content .quote-box {
  padding: 22px;
  border-left: 4px solid var(--orange);
  background: #fff7ee;
}

.article-content .callout,
.article-content .key-point {
  padding: 20px;
  border-left: 4px solid var(--gold);
  background: #fbf4e9;
}

.article-content .cta-box {
  padding: 30px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  text-align: center;
  font-family: var(--font-sans);
}

.article-content .cta-button {
  display: inline-flex;
  padding: 12px 20px;
  border-radius: 6px;
  color: var(--white);
  background: var(--orange);
  text-decoration: none;
  font-weight: 900;
}

.article-content .related-breakdowns {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-content .related-breakdowns h2 {
  margin-top: 0;
}

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

.related-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-sans);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

.related-card div {
  padding: 16px;
}

.related-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.related-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.15;
}

.related-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .article-shell h1 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 253, 248, 0.82) 68%, rgba(255, 253, 248, 0.4) 100%),
      url("../images/hero/clipboard-court-hero.png") center bottom / min(100%, 720px) auto no-repeat;
  }

  .hero-inner {
    padding-bottom: 360px;
  }

  .category-grid,
  .breakdown-grid,
  .vault-grid,
  .resource-grid,
  .related-grid,
  .drill-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

@media (max-width: 680px) {
  .nav,
  .section,
  .page-hero,
  .footer-inner,
  .footer-bottom,
  .article-shell {
    width: min(calc(100vw - 28px), var(--max));
  }

  .article-shell {
    max-width: calc(100vw - 28px);
    padding: 36px 0 56px;
  }

  .article-shell h1 {
    font-size: 34px;
    line-height: 1.08;
    word-break: break-word;
  }

  .article-subtitle,
  .article-content {
    overflow-wrap: break-word;
  }

  .nav-links {
    max-width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    font-size: 14px;
  }

  .brand-text {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-inner {
    width: min(100% - 28px, var(--max));
    padding-top: 48px;
    padding-bottom: 280px;
  }

  .hero-actions,
  .section-head,
  .vault-controls,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .newsletter-form {
    width: 100%;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .breakdown-grid,
  .vault-grid,
  .resource-grid,
  .related-grid,
  .drill-library-grid,
  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
