/* GCBoK Base Stylesheet */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--sp-20);
  hanging-punctuation: first last;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100dvh;
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  color: var(--c-body);
  background-color: var(--c-paper);
  line-height: 1.65;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'], ol[role='list'] {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
  color: var(--c-ink);
  font-family: var(--ff-display);
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: rgba(232, 99, 42, 0.18);
  color: var(--c-ink);
}

:focus-visible {
  outline: 2px solid var(--c-amber);
  outline-offset: 3px;
  border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: var(--c-amber);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover {
  color: var(--c-amber-deep);
}

table {
  border-collapse: collapse;
  width: 100%;
}

code, kbd, samp {
  font-family: var(--ff-mono);
  font-size: 0.875em;
  background: var(--c-surface-alt);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--c-line);
}

pre {
  background: #0F172A;
  color: #E2E8F0;
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  padding: var(--sp-6);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.7;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

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

/* === LAYOUT HELPERS === */
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.container--narrow {
  max-width: var(--maxw-prose);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section {
  padding-block: clamp(var(--sp-16), 8vw, var(--sp-24));
}

.section--alt {
  background: var(--c-surface-alt);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}

/* === TYPOGRAPHY UTILITIES === */
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-amber);
  font-family: var(--ff-sans);
}

.heading-xl {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.12;
}

.heading-lg {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-ink);
}

.heading-md {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--c-ink);
}

.lead {
  font-size: var(--fs-lg);
  color: var(--c-body);
  line-height: 1.7;
  max-width: 62ch;
}

.text-muted {
  color: var(--c-muted);
}

.text-mono {
  font-family: var(--ff-mono);
}

.accent {
  color: var(--c-amber);
}

/* === BUTTON STYLES === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
}

.btn--primary {
  background: var(--c-ink);
  color: #FFFFFF;
  border-color: var(--c-ink);
}
.btn--primary:hover {
  background: #1e2d4a;
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-line);
}
.btn--outline:hover {
  border-color: var(--c-ink);
  background: var(--c-surface);
  color: var(--c-ink);
}

.btn--amber {
  background: var(--c-amber);
  color: #FFFFFF;
  border-color: var(--c-amber);
}
.btn--amber:hover {
  background: var(--c-amber-deep);
  border-color: var(--c-amber-deep);
  color: #FFFFFF;
}

/* === CARD STYLES === */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--sp-6);
}

.card--accent {
  border-left: 3px solid var(--c-amber);
}

.card--hover {
  transition: box-shadow var(--t-smooth), transform var(--t-smooth);
}
.card--hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* === BADGE / TAG === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  font-family: var(--ff-mono);
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
  line-height: 1.4;
}
.badge--amber {
  color: var(--c-amber);
  background: var(--c-amber-soft);
  border-color: rgba(232,99,42,0.25);
}
.badge--green {
  color: var(--c-green);
  background: rgba(16,169,135,0.1);
  border-color: rgba(16,169,135,0.25);
}
.badge--blue {
  color: var(--c-blue);
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.2);
}
.badge--muted {
  color: var(--c-muted);
  background: var(--c-surface-alt);
  border-color: var(--c-line);
}

/* === DIVIDER === */
.divider {
  border: none;
  border-top: 1px solid var(--c-line);
  margin-block: var(--sp-8);
}

/* === DEFINITION TABLE === */
.def-table {
  width: 100%;
  font-size: var(--fs-sm);
}
.def-table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface-alt);
  color: var(--c-ink);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--c-line);
}
.def-table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
  color: var(--c-body);
}
.def-table tr:last-child td {
  border-bottom: none;
}
.def-table tr:hover td {
  background: var(--c-surface-alt);
}
.def-table .acronym {
  font-family: var(--ff-mono);
  font-weight: 700;
  color: var(--c-ink);
  white-space: nowrap;
}
