/* ============================================================
   _shared.css
   Caddy — The Chipin Design System
   Shared layout, typography utilities, and doc components.
   Link AFTER chipin-tokens.css on every page.
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family-switzer);
  font-size: var(--text-body-default-size);
  line-height: var(--text-body-default-lh);
  letter-spacing: var(--text-body-default-ls);
  font-weight: var(--font-weight-regular);
  color: var(--content-primary);
  background-color: var(--bg-screen);
}

a {
  color: var(--content-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code, kbd {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8125em;
}


/* --- Top Navigation ---------------------------------------- */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  transition: background-color 300ms ease-out, border-color 300ms ease-out, backdrop-filter 300ms ease-out;
}

.top-nav.is-scrolled {
  background-color: rgba(247, 247, 246, 0.8);
  backdrop-filter: blur(50px);
  border-bottom-color: var(--border-neutral);
}

.nav-inner {
  display: grid;
  grid-template-columns: var(--sidebar-width-collapsed) repeat(11, 1fr);
  gap: var(--grid-gutter);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--grid-margin);
  align-items: center;
}

.nav-logo {
  width: 32px;
  height: 32px;
  background-color: var(--bg-surface-tertiary);
  border-radius: var(--radius-xs);
  margin-left: var(--size-12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--size-24);
}

.nav-links a {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--content-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  letter-spacing: 0.005em;
}

.nav-links a:hover {
  color: var(--content-primary);
  text-decoration: none;
}

.nav-links a[aria-current="page"],
.nav-links a.active {
  color: var(--content-primary);
  font-weight: var(--font-weight-semibold);
}


/* --- Page Layout (with sidebar) ---------------------------- */

.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width-collapsed) repeat(11, 1fr);
  gap: var(--grid-gutter);
  padding: 0 var(--grid-margin);
  min-height: calc(100vh - 56px);
  max-width: 1440px;
  margin: 0 auto;
  align-items: start;
  transition: grid-template-columns 300ms ease-out;
}

.page-layout.sidebar-expanded {
  grid-template-columns: var(--sidebar-width-expanded) repeat(11, 1fr);
}

.page-layout-full {
  min-height: calc(100vh - 56px);
  max-width: 1440px;
  margin: 0 auto;
}


/* --- Sidebar ------------------------------------------------ */

.sidebar {
  grid-column: 1 / 2;
  position: sticky;
  top: calc(56px + var(--size-32));
  height: calc(100vh - 56px - var(--size-32) - var(--size-12));
  overflow: hidden;
  margin: var(--size-32) var(--size-12) var(--size-12);
  background-color: var(--bg-surface-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-fairway-base-12);
  filter: drop-shadow(0px 4px 6px rgba(58, 52, 46, 0.04));
  padding: var(--size-8);
  display: flex;
  flex-direction: column;
}


/* Sidebar nav links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--size-8);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: var(--size-8);
  font-size: 16px;
  font-weight: var(--font-weight-regular);
  color: var(--content-nav);
  text-decoration: none;
  border-radius: var(--radius-xs);
  transition: color 0.12s ease, background-color 0.12s ease;
  letter-spacing: 0.005em;
  line-height: 24px;
  white-space: nowrap;
}

.page-layout.sidebar-expanded .sidebar-nav a {
  gap: var(--size-8);
}

.sidebar-nav a:hover {
  color: var(--content-nav-hover);
  background-color: var(--interactive-ghost-hover);
  text-decoration: none;
}

.sidebar-nav a[aria-current="page"] {
  background-color: var(--interactive-ghost-active);
  color: var(--content-nav-hover);
  font-weight: var(--font-weight-semibold);
}

/* Icon inside sidebar link */
.sidebar-link-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label — invisible and shifted in collapsed, fades and slides in when expanded */
.sidebar-link-label {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.page-layout.sidebar-expanded .sidebar-link-label {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-group[hidden] { display: none; }


/* --- Page Subnav (horizontal scroll-spy, below page header) --- */

.page-subnav {
  display: flex;
  gap: var(--size-4);
  border-bottom: 1px solid var(--border-neutral);
  padding-bottom: var(--size-12);
  margin-bottom: var(--size-40);
  overflow-x: auto;
  scrollbar-width: none;
}

.page-subnav::-webkit-scrollbar { display: none; }

.page-subnav-link {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--content-secondary);
  text-decoration: none;
  padding: var(--size-4) var(--size-8);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: color 0.12s ease, background-color 0.12s ease;
  letter-spacing: 0.005em;
}

.page-subnav-link:hover {
  color: var(--content-primary);
  background-color: var(--bg-surface-overlay);
  text-decoration: none;
}

.page-subnav-link.active {
  color: var(--color-fairway-base);
  font-weight: var(--font-weight-semibold);
}


/* --- Secondary Nav ----------------------------------------- */

.secondary-nav {
  grid-column: 2 / 4;
  position: sticky;
  top: calc(56px + var(--size-32));
  display: flex;
  flex-direction: column;
  gap: var(--size-16);
  padding: var(--size-32) 0;
}

.secondary-nav-tabs {
  display: flex;
  flex-direction: row;
  height: 48px;
  padding: 4px;
  gap: var(--size-4);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-overlay);
}

.secondary-nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--content-nav);
  text-decoration: none;
  border-radius: var(--radius-xs);
  transition: color 0.12s ease, background-color 0.12s ease;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.secondary-nav-tab:hover {
  color: var(--content-nav-hover);
  background-color: var(--bg-surface-primary);
  text-decoration: none;
}

.secondary-nav-tab.active {
  background-color: var(--bg-surface-primary);
  color: var(--content-nav-hover);
  font-weight: var(--font-weight-semibold);
}

.secondary-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--size-4);
}

.secondary-nav-link {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--content-tertiary);
  text-decoration: none;
  padding: var(--size-4) var(--size-8);
  border-radius: var(--radius-xs);
  transition: color 0.12s ease;
  letter-spacing: 0.005em;
}

.secondary-nav-link:hover {
  color: var(--content-primary);
  text-decoration: none;
}

.secondary-nav-link.active {
  color: var(--content-primary);
  font-weight: var(--font-weight-semibold);
}


/* --- Main Content Area ------------------------------------- */

.main-content {
  grid-column: 2 / 10;
  padding: var(--size-32) var(--size-56) var(--size-96) var(--size-32);
  min-width: 0;
}

.has-secondary-nav .main-content {
  grid-column: 4 / 12;
}

/* sections */
section[data-section] {
  margin-bottom: 400px;
}

section[data-section]:last-of-type {
  margin-bottom: 0;
}


/* --- Page Header ------------------------------------------- */

.page-header {
  padding-bottom: var(--size-48);
}

.page-title {
  font-family: var(--font-family-special-gothic);
  font-size: var(--text-display-2-size); /* 96px */
  line-height: var(--text-display-2-lh); /* 0.85 */
  text-transform: lowercase;
  color: var(--content-primary);
  margin-bottom: var(--size-16);
}

.page-subtitle {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.1px;
  font-weight: var(--font-weight-regular);
  color: var(--content-secondary);
}


/* --- Hero Block -------------------------------------------- */

.hero-block {
  min-height: 400px;
  border-radius: var(--radius-xs);
  background-color: var(--color-fairway-base);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* background overrides via data attribute or modifier */
.hero-block[data-bg="putting"]  { background-color: var(--color-putting-base); }
.hero-block[data-bg="dark"]     { background-color: var(--color-dark-1); }
.hero-block[data-bg="sand"]     { background-color: var(--color-sand-2); }

/* palette specimen used inside the colour page hero */
.hero-palette {
  display: flex;
  gap: var(--size-8);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 480px;
  padding: var(--size-32);
}

.hero-swatch {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}


/* --- Section Header (two-column) --------------------------- */
/*
   Left:  Special Gothic Display 3 (64px, uppercase)
   Right: Switzer Regular (20px, --content-secondary)
   Equal 1fr / 1fr columns, 24px gap
*/

.section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-24);
  padding: var(--size-56) 0 var(--size-40);
  align-items: start;
  margin-bottom: var(--size-40);
}

.section-header-title {
  font-family: var(--font-family-special-gothic);
  font-size: var(--text-display-3-size); /* 64px */
  line-height: var(--text-display-3-lh); /* 0.85 */
  text-transform: lowercase;
  color: var(--content-primary);
}

.section-header-desc {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.1px;
  color: var(--content-secondary);
}


/* --- Subsection Header (two-column) ------------------------ */
/*
   Left:  Switzer Semibold (30px)
   Right: Switzer Regular (20px, --content-secondary)
   Equal 1fr / 1fr columns, 24px gap
*/

.subsection-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-24);
  padding: var(--size-48) 0 var(--size-24);
  align-items: start;
}

.subsection-header-title {
  font-family: var(--font-family-switzer);
  font-size: 30px;
  font-weight: var(--font-weight-semibold);
  line-height: 34px;
  letter-spacing: -0.025em;
  color: var(--content-primary);
}

.subsection-header-desc {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.1px;
  color: var(--content-secondary);
}

/* Simple subsection label — no description column */
.subsection-label {
  font-family: var(--font-family-switzer);
  font-size: 30px;
  font-weight: var(--font-weight-semibold);
  line-height: 34px;
  letter-spacing: -0.025em;
  color: var(--content-primary);
  padding: var(--size-40) 0 var(--size-20);
}


/* --- Doc Item Card Grids ----------------------------------- */
/*
   For use in component/pattern grids. No card border — content
   floats on the page background.
*/

.doc-item-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--size-12); }
.doc-item-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--size-12); }
.doc-item-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--size-12); }

.doc-item-card {
  display: flex;
  flex-direction: column;
  gap: var(--size-16);
}

.doc-item-preview {
  aspect-ratio: 4 / 3;
  background-color: var(--bg-surface-tertiary);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.doc-item-caption {
  display: flex;
  flex-direction: column;
  gap: var(--size-8);
}

.doc-item-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--content-primary);
  letter-spacing: 0.225px;
  line-height: 26px;
}

.doc-item-desc {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.2px;
  color: var(--content-secondary);
}


/* --- Legacy / compat --------------------------------------- */
/*
   These classes remain for backwards compatibility with any existing
   content that hasn't been migrated to the new layout system.
*/

.section-heading {
  font-size: var(--text-section-title-size);
  font-weight: var(--text-section-title-weight);
  line-height: var(--text-section-title-lh);
  letter-spacing: var(--text-section-title-ls);
  color: var(--content-primary);
  margin-bottom: var(--size-24);
}

.section-divider {
  height: 1px;
  background-color: var(--border-neutral);
  margin-bottom: var(--size-24);
}

.subsection-heading {
  font-size: var(--text-body-title-size);
  font-weight: var(--text-body-title-weight);
  line-height: var(--text-body-title-lh);
  letter-spacing: var(--text-body-title-ls);
  color: var(--content-secondary);
  margin-bottom: var(--size-16);
  margin-top: var(--size-32);
}

.section-intro {
  font-size: 15px;
  line-height: 24px;
  color: var(--content-secondary);
  margin-bottom: var(--size-24);
  max-width: 640px;
}

/* legacy content-header (index + any older pages) */
.content-header {
  margin-bottom: var(--size-48);
  padding-bottom: var(--size-32);
  border-bottom: 1px solid var(--border-neutral);
}

.content-header .breadcrumb {
  font-size: 13px;
  color: var(--content-tertiary);
  margin-bottom: var(--size-12);
  letter-spacing: 0.01em;
}

.content-header h1 {
  font-size: var(--text-screen-title-size);
  font-weight: var(--text-screen-title-weight);
  line-height: var(--text-screen-title-lh);
  letter-spacing: var(--text-screen-title-ls);
  color: var(--content-primary);
  margin-bottom: var(--size-12);
}

.content-header .lead {
  font-size: 17px;
  line-height: 26px;
  color: var(--content-secondary);
  max-width: 560px;
}


/* --- Swatch Components ------------------------------------- */

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--size-12);
}

.swatch-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--size-12);
}

.swatch-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--size-12);
}

.swatch-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--size-12);
}

/* Card IS the colour — background-color and color set inline per card */
.swatch-card {
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 28px;
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: pointer;
}

/* Hero card: spans 2 cols × 2 rows in .core-colour-layout */
.swatch-card.swatch-hero {
  grid-column: span 2;
  grid-row: span 2;
}

/* Alpha cards: white bg, alpha colour applied via absolute .alpha-fill child */
.swatch-card.is-alpha {
  background-color: #ffffff;
  color: var(--content-secondary);
}

.swatch-card.is-alpha .alpha-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.swatch-card.is-alpha .swatch-name,
.swatch-card.is-alpha .swatch-info {
  position: relative;
  z-index: 1;
}

.swatch-name {
  font-family: var(--font-family-switzer);
  font-size: var(--text-body-small-size); /* 14px */
  font-weight: var(--font-weight-semibold);
  line-height: var(--text-body-small-lh); /* 22px */
  letter-spacing: var(--text-body-small-ls);
}

.swatch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.swatch-token {
  font-family: var(--font-family-switzer);
  font-size: var(--text-body-small-size); /* 14px */
  font-weight: var(--font-weight-regular);
  line-height: var(--text-body-small-lh); /* 22px */
  letter-spacing: var(--text-body-small-ls);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swatch-hex {
  font-family: var(--font-family-switzer);
  font-size: var(--text-body-small-size); /* 14px */
  font-weight: var(--font-weight-regular);
  line-height: var(--text-body-small-lh); /* 22px */
  letter-spacing: var(--text-body-small-ls);
  display: block;
}

/* Swatch item: card + below-card caption for swatches with guidelines */
.swatch-item {
  display: flex;
  flex-direction: column;
  gap: var(--size-12);
}

.swatch-caption {
  display: flex;
  flex-direction: column;
  gap: var(--size-4);
}

.swatch-caption-name {
  font-family: var(--font-family-switzer);
  font-size: var(--text-editorial-body-1-size);
  font-weight: var(--font-weight-semibold);
  line-height: var(--text-editorial-body-1-lh);
  letter-spacing: var(--text-editorial-body-1-ls);
  color: var(--content-primary);
}

.swatch-caption-desc {
  font-size: 16px;
  line-height: 24px;
  color: var(--content-secondary);
}


/* Core colour layout: 1:1 hero spanning 2×2, variants filling remaining cols */
.core-colour-layout {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* hero(2) + 3 variant cols */
  gap: var(--size-12);
  margin-bottom: var(--size-32);
}

.core-colour-layout.cols-4 {
  grid-template-columns: repeat(4, 1fr); /* hero(2) + 2 variant cols */
}


/* --- On-Surface Demo Cards --------------------------------- */

.on-surface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--size-12);
}

.on-surface-card {
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-surface-primary);
}

.on-surface-demo {
  padding: var(--size-20) var(--size-16);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}

.on-surface-text-demo {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}


/* --- Callout ----------------------------------------------- */

.callout {
  display: flex;
  gap: var(--size-12);
  padding: var(--size-16) var(--size-20);
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  margin-bottom: var(--size-24);
}

.callout-body {
  flex: 1;
}

.callout-title {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 4px;
  line-height: 20px;
}

.callout-text {
  font-size: 14px;
  line-height: 21px;
}

.callout-warning {
  background-color: var(--interactive-bg-warning);
  border-left-color: var(--color-warning);
  color: var(--content-warning);
}

.callout-info {
  background-color: var(--bg-surface-overlay);
  border-left-color: var(--color-fairway-base);
  color: var(--color-fairway-darker);
}

.callout-negative {
  background-color: var(--interactive-bg-negative);
  border-left-color: var(--color-negative);
  color: var(--content-negative);
}


/* --- Token table (semantic sections) ----------------------- */

.token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.token-table th {
  text-align: left;
  font-weight: var(--font-weight-semibold);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--content-tertiary);
  padding: var(--size-8) var(--size-12);
  border-bottom: 1px solid var(--border-neutral);
}

.token-table td {
  padding: var(--size-10) var(--size-12);
  border-bottom: 1px solid var(--border-neutral);
  vertical-align: middle;
  color: var(--content-secondary);
  line-height: 20px;
}

.token-table tr:last-child td {
  border-bottom: none;
}

.token-table .swatch-cell {
  width: 48px;
}

.token-swatch-inline {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-neutral);
  display: inline-block;
  vertical-align: middle;
}

.token-swatch-inline.alpha-bg {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
    linear-gradient(135deg, #e0e0e0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
    linear-gradient(135deg, transparent 75%, #e0e0e0 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 0, 4px -4px, 0px 4px;
  position: relative;
}

.token-swatch-inline.alpha-bg .alpha-fill {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-xs) - 1px);
}

.token-name {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--content-primary);
  font-weight: var(--font-weight-semibold);
}

.token-value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--content-tertiary);
}


/* --- Index page -------------------------------------------- */

.index-hero {
  background-color: var(--color-fairway-base);
  color: var(--color-putting-base);
  padding: var(--size-96) var(--size-64) var(--size-80);
  position: relative;
  overflow: hidden;
}

.index-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, var(--color-fairway-base) 30%, var(--color-fairway-darker) 100%);
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1376px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-putting-lighter);
  margin-bottom: var(--size-16);
  opacity: 0.8;
}

.hero-display {
  font-family: var(--font-family-special-gothic);
  font-size: clamp(64px, 9vw, var(--text-display-2-size));
  line-height: var(--text-display-2-lh);
  text-transform: lowercase;
  color: var(--color-putting-base);
  margin-bottom: var(--size-24);
  max-width: 900px;
}

.hero-lead {
  font-size: 20px;
  line-height: 30px;
  color: var(--color-putting-lightest);
  max-width: 560px;
  margin-bottom: var(--size-40);
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: var(--size-12);
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--size-8);
  height: var(--interactive-size-md);
  padding: 0 var(--padding-md);
  background-color: var(--color-putting-base);
  color: var(--color-fairway-darker);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-family-switzer);
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  letter-spacing: -0.005em;
}

.btn-hero-primary:hover {
  background-color: var(--color-putting-lighter);
  text-decoration: none;
  color: var(--color-fairway-darker);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--size-8);
  height: var(--interactive-size-md);
  padding: 0 var(--padding-md);
  background-color: transparent;
  color: var(--color-putting-base);
  border: 1px solid var(--color-fairway-base-12);
  border-color: rgba(132, 237, 178, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-family-switzer);
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: -0.005em;
}

.btn-hero-secondary:hover {
  background-color: rgba(132, 237, 178, 0.1);
  text-decoration: none;
  color: var(--color-putting-lighter);
}

/* Card grid on index */
.index-section {
  padding: var(--size-80) var(--size-64);
  max-width: 1440px;
  margin: 0 auto;
}

.index-section-title {
  font-size: var(--text-section-title-size);
  font-weight: var(--text-section-title-weight);
  line-height: var(--text-section-title-lh);
  letter-spacing: var(--text-section-title-ls);
  color: var(--content-primary);
  margin-bottom: var(--size-8);
}

.index-section-lead {
  font-size: 16px;
  line-height: 24px;
  color: var(--content-secondary);
  margin-bottom: var(--size-36);
  max-width: 480px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--size-16);
}

.doc-card {
  background-color: var(--bg-surface-primary);
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-md);
  padding: var(--size-32);
  text-decoration: none;
  display: block;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.doc-card:hover {
  box-shadow: var(--shadow-impact);
  transform: translateY(-2px);
  border-color: var(--border-overlay);
  text-decoration: none;
}

.doc-card-eyebrow {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fairway-base);
  margin-bottom: var(--size-12);
  display: block;
}

.doc-card-title {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.015em;
  line-height: 26px;
  color: var(--content-primary);
  margin-bottom: var(--size-8);
}

.doc-card-desc {
  font-size: 14px;
  line-height: 21px;
  color: var(--content-secondary);
  margin-bottom: var(--size-20);
}

.doc-card-items {
  display: flex;
  flex-direction: column;
  gap: var(--size-4);
}

.doc-card-item {
  font-size: 13px;
  color: var(--content-tertiary);
  display: flex;
  align-items: center;
  gap: var(--size-6);
}

.doc-card-item::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-putting-base);
  flex-shrink: 0;
}

.doc-card.coming-soon {
  opacity: 0.5;
  pointer-events: none;
}

.doc-card.coming-soon .doc-card-eyebrow {
  color: var(--content-tertiary);
}

/* --- Type pages -------------------------------------------- */

.type-font-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-16);
}

.type-font-card {
  border-radius: var(--radius-md);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.type-font-placeholder {
  width: 72%;
  height: 88px;
  background-color: rgba(0, 0, 0, 0.09);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.3);
}

.type-font-placeholder.on-dark {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.35);
}

.type-font-caption {
  margin-top: var(--size-16);
}

.type-font-name {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  line-height: 24px;
  color: var(--content-primary);
  margin-bottom: var(--size-8);
}

.type-font-desc {
  font-size: 14px;
  line-height: 22px;
  color: var(--content-secondary);
}

.type-styles-list {
  margin-top: var(--size-32);
}

.type-style-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--size-32);
  padding: var(--size-24) 0;
  border-top: 1px solid var(--border-neutral);
  align-items: center;
  min-height: 0;
}

.type-style-row:last-child {
  border-bottom: 1px solid var(--border-neutral);
}

.type-style-specimen {
  overflow: hidden;
}

.type-spec-name {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--content-primary);
  line-height: 22px;
  margin-bottom: var(--size-4);
}

.type-spec-detail {
  font-size: 14px;
  color: var(--content-secondary);
  line-height: 22px;
}

.type-body-content {
  max-width: 600px;
  margin-top: var(--size-32);
}

.type-body-content p {
  font-size: 16px;
  line-height: 24px;
  color: var(--content-secondary);
  margin-bottom: var(--size-12);
}

.type-body-content ul {
  margin: var(--size-4) 0 var(--size-16) var(--size-20);
}

.type-body-content li {
  font-size: 16px;
  line-height: 24px;
  color: var(--content-secondary);
  margin-bottom: var(--size-4);
}

.type-placeholder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-16);
  margin-top: var(--size-32);
}

.type-placeholder-rect {
  min-height: 280px;
  background-color: var(--bg-surface-tertiary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--content-tertiary);
  letter-spacing: 0.01em;
}


/* Utility */
.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;
}
