:root {
  --ink: #12181F;
  --ink-2: #3D4753;
  --ink-3: #5A6472;
  --ink-4: #6B7580;
  --muted: #8A94A1;
  --rule-numeral: #C2CCD9;
  --blue: #2B62AD;
  --blue-deep: #10294A;
  --blue-tint: #EDF2FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --border: rgba(0,0,0,.09);
  --border-2: rgba(0,0,0,.07);
  --border-3: rgba(0,0,0,.11);
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Public Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

body {
  margin: 0;
}

.gate-pending body {
  visibility: hidden;
}

.gate-pending body.gate-ready,
.gate-unlocked body {
  visibility: visible;
}

.gate-locked body {
  overflow: hidden;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  background: var(--surface);
}

.gate-frame {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
}

.gate-wordmark {
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.gate-status {
  color: var(--ink-4);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  line-height: 1;
}

.gate-panel {
  align-self: center;
  width: min(100% - 96px, 620px);
  margin: 72px 48px;
  padding: 0;
}

.gate-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: 46px;
  font-weight: 300;
  line-height: 1.08;
}

.gate-panel p {
  max-width: 500px;
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 19px;
  line-height: 1.6;
}

.gate-eyebrow {
  margin: 0 0 26px;
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  line-height: 1;
}

.gate-form {
  max-width: 500px;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.gate-form label {
  color: var(--blue-deep);
  font-size: 13.5px;
  font-weight: 600;
}

.gate-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.gate-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-3);
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
}

.gate-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.gate-footer {
  padding: 20px 48px;
  border-top: 1px solid var(--border);
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-3);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
}

.home-hero {
  max-width: 700px;
  padding: 72px 48px 52px;
}

.eyebrow,
.section-label,
.meta,
.file-tag,
.small-meta {
  font-family: ui-monospace, Menlo, monospace;
}

.eyebrow {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.home-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 60px;
  font-weight: 300;
  line-height: 1.05;
}

.home-hero h1 em {
  color: var(--blue);
  font-style: italic;
  font-weight: 400;
}

.home-hero p:last-child {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--ink-2);
  font-size: 17.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

.contents-list {
  border-top: 1px solid var(--border);
}

.contents-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  min-height: 104px;
  padding: 30px 48px;
  border-bottom: 1px solid var(--border-2);
}

.contents-row:hover {
  background: var(--surface-2);
  color: inherit;
}

.contents-no {
  color: var(--rule-numeral);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
}

.contents-copy strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.contents-copy span {
  display: block;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.contents-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  white-space: nowrap;
}

.contents-meta span {
  color: var(--blue);
  font-family: "Public Sans", Arial, sans-serif;
  font-size: 16px;
}

.resources-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin: 22px 48px 0;
  padding: 26px 30px;
  border-radius: 7px;
  background: var(--blue-tint);
}

.resources-promo h2 {
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.resources-promo p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.button,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.button {
  padding: 0 16px;
  background: var(--blue);
  color: var(--surface);
}

.button:hover {
  color: var(--surface);
}

.site-footer {
  margin-top: 22px;
  padding: 20px 48px;
  border-top: 1px solid var(--border);
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.4;
}

.chapter-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 90px);
}

.chapter-nav {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 49px);
  padding: 36px 26px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}

.chapter-nav a:not(.back-link) {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  border-radius: 5px;
  color: var(--ink-2);
  font-size: 13px;
}

.chapter-nav a:not(.back-link):hover {
  background: #EEF1F5;
  color: var(--ink);
}

.chapter-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.chapter-nav .nav-no {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.article-wrap {
  padding: 56px;
}

.article,
.resources-page {
  max-width: 660px;
}

.meta {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.article h1,
.resources-page h1 {
  margin: 0;
  color: var(--ink);
  font-size: 46px;
  font-weight: 300;
  line-height: 1.08;
}

.lede,
.resources-intro {
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 19px;
  line-height: 1.6;
  text-wrap: pretty;
}

.article-rule {
  margin: 34px 0 30px;
  border: 0;
  border-top: 1px solid var(--border);
}

.article-section + .article-section {
  margin-top: 30px;
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.article-section p,
.article p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.pullquote {
  margin: 34px 0;
  padding-left: 20px;
  border-left: 3px solid var(--blue);
  color: var(--blue-deep);
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
}

.file-panel {
  margin: 34px 0 30px;
  padding: 24px 26px;
  border-radius: 7px;
  background: var(--blue-tint);
}

.section-label {
  margin: 0 0 14px;
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}

.file-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 52px;
}

.file-row + .file-row {
  margin-top: 8px;
}

.file-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border: 1px solid rgba(16,41,74,.15);
  border-radius: 4px;
  background: var(--surface);
  color: var(--blue-deep);
  font-size: 9.5px;
  font-weight: 700;
}

.file-name {
  display: block;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.small-meta {
  display: block;
  margin-top: 2px;
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.4;
}

.file-action {
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.next-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--border-3);
  border-radius: 7px;
}

.next-card:hover,
.resource-card:hover {
  border-color: var(--blue);
  color: inherit;
}

.next-card strong {
  display: block;
  margin: 10px 0 7px;
  font-size: 17px;
  line-height: 1.3;
}

.next-card span:last-child {
  display: block;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.resources-main {
  padding: 48px;
}

.resources-page {
  max-width: 620px;
}

.resource-section {
  margin-top: 40px;
}

.figma-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 900px;
}

.resource-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border-3);
  border-radius: 7px;
  background: var(--surface);
}

.cover {
  min-height: 120px;
  border-bottom: 1px solid var(--border);
  background:
    repeating-linear-gradient(135deg, rgba(43,98,173,.08) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, #f8fbff, var(--blue-tint));
}

.card-body {
  padding: 16px 17px 17px;
}

.card-body strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.card-body .button {
  margin-top: 14px;
  min-height: 32px;
  font-size: 13px;
}

.resource-columns {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.resource-list {
  flex: 1 1 420px;
}

.standards {
  flex: 0 1 320px;
}

.resource-list .file-row {
  padding: 14px 0;
  border-top: 1px solid var(--border-2);
}

.resource-list .file-row:last-child {
  border-bottom: 1px solid var(--border-2);
}

.resource-list .file-tag {
  min-height: 24px;
  background: var(--blue-tint);
}

.action-button {
  padding: 0 13px;
  border: 1px solid rgba(43,98,173,.4);
  color: var(--blue);
  font-size: 13px;
}

.standard-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: 5px;
  background: var(--blue-tint);
  color: var(--blue-deep);
  font-size: 13.5px;
  font-weight: 600;
}

@media (max-width: 899px) {
  .site-header,
  .home-hero,
  .contents-row,
  .resources-main,
  .site-footer {
    padding-left: 28px;
    padding-right: 28px;
  }

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

  .chapter-shell {
    display: block;
  }

  .chapter-nav {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .article-wrap {
    padding: 40px 28px;
  }

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

  .resource-columns {
    display: block;
  }

  .standards {
    margin-top: 40px;
  }

  .resources-promo {
    margin-left: 28px;
    margin-right: 28px;
  }
}

@media (max-width: 639px) {
  .site-header {
    padding: 16px 20px;
  }

  .top-nav {
    gap: 14px;
  }

  .home-hero,
  .resources-main {
    padding: 48px 20px 40px;
  }

  .home-hero h1 {
    font-size: 34px;
    line-height: 1.1;
  }

  .contents-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 20px;
  }

  .contents-no {
    font-size: 28px;
  }

  .contents-meta {
    justify-content: space-between;
  }

  .resources-promo {
    display: block;
    margin: 20px;
    padding: 22px;
  }

  .resources-promo .button {
    margin-top: 18px;
  }

  .article h1,
  .resources-page h1 {
    font-size: 36px;
  }

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

  .file-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .file-action,
  .action-button {
    grid-column: 2;
    justify-self: start;
  }
}
