/* ==========================================================================
   Mockup chrome, shared layout for design-guidelines.
   Imports tokens.css for colors + fonts.
   ========================================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-top: 64px;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-inter);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }

/* === HEADER (fixed, full width) === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--background);
  border-bottom: 1px solid var(--divider);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .site-header { padding: 0 32px; }
}

.wordmark {
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--foreground); display: inline-flex; align-items: center; gap: 10px;
  letter-spacing: -0.01em;
}
.wordmark .sep { color: var(--divider); font-weight: 400; }
.wordmark .sub { color: var(--text-muted); font-weight: 400; }

.ext-link {
  font-size: 13px; color: var(--text-muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s ease;
}
.ext-link:hover { color: var(--accent); }
.ext-link .arrow-icon { transition: transform .2s ease; }
.ext-link:hover .arrow-icon { transform: translate(2px, -2px); }

/* === SHELL (sidebar + main + footer) === */
.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 1fr auto;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

/* === SIDEBAR (sticky) === */
.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 40px 24px 32px;
  overflow-y: auto;
  border-right: 1px solid var(--divider);
  grid-row: 1 / -1;
}

.sidebar-group { margin-top: 28px; }
.sidebar-group:first-child { margin-top: 0; }

.sidebar-group-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-faint);
  margin: 0 0 10px; padding: 0 10px;
}

.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { margin: 0; }
.sidebar-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px; color: var(--text-muted);
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.sidebar-nav a:hover { color: var(--foreground); }
.sidebar-nav a.active {
  color: var(--accent); font-weight: 500;
  background: rgba(28, 24, 86, 0.06);
}
.sidebar-nav .num {
  font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.sidebar-nav a.active .num { color: var(--accent); opacity: 0.55; }

.sidebar-foot {
  margin-top: 48px;
  padding: 16px 10px 0;
  border-top: 1px solid var(--divider);
  font-size: 11px; color: var(--text-faint);
  line-height: 1.5;
}

/* === MAIN === */
main { padding: 56px 48px 96px; min-width: 0; }
@media (min-width: 1024px) { main { padding: 64px 64px 120px; } }

.content { max-width: 720px; }
.content-wide  { max-width: 960px; }
.content-xwide { max-width: 1080px; }

/* === TYPE === */
.section-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-faint);
  margin: 0 0 24px;
}

h1.page-title {
  font-size: 40px; font-weight: 600; line-height: 1.05;
  letter-spacing: -0.025em; margin: 0; color: var(--foreground);
}
@media (min-width: 768px) { h1.page-title { font-size: 52px; } }

.accent-line {
  width: 40px; height: 3px; border-radius: 999px;
  background: var(--accent);
  margin: 24px 0 0;
}

.lede {
  margin: 36px 0 0;
  font-size: 18px; line-height: 1.65;
  color: var(--text-secondary);
  max-width: 640px;
}

.meta {
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.meta .dot { display: inline-block; margin: 0 8px; opacity: 0.5; }

.prose h2 {
  margin: 72px 0 16px;
  font-size: 24px; font-weight: 600; letter-spacing: -0.015em;
  color: var(--foreground);
}
.prose h3 {
  margin: 40px 0 10px;
  font-size: 16px; font-weight: 600; color: var(--foreground);
}
.prose p {
  margin: 0 0 16px;
  font-size: 16px; line-height: 1.75; color: var(--text-secondary);
}
.prose strong { color: var(--foreground); font-weight: 500; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  background: rgba(28, 24, 86, 0.06);
  color: var(--accent);
  padding: 2px 6px; border-radius: 4px;
  font-size: 0.92em;
}
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li {
  font-size: 16px; line-height: 1.75; color: var(--text-secondary);
  margin-bottom: 6px;
}

/* === FOOTER === */
.site-footer {
  grid-column: 2;
  border-top: 1px solid var(--divider);
  padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-faint);
  flex-wrap: wrap; gap: 12px;
}
@media (min-width: 1024px) { .site-footer { padding: 24px 64px; } }
.site-footer a {
  color: var(--text-faint); text-decoration: none;
  transition: color .2s ease;
}
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 20px; }

/* === REUSABLE: arrow icon === */
.arrow-icon { width: 12px; height: 12px; flex-shrink: 0; }

/* === REUSABLE: pill button === */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  background: transparent;
  border: 1.5px solid;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.pill .arrow-icon { transition: transform .2s ease; }
.pill:hover .arrow-icon { transform: translate(2px, -2px); }
.pill-default   { border-color: rgba(26,26,26,.15); color: var(--foreground); }
.pill-prominent { border-color: var(--foreground);  color: var(--foreground); }
.pill-filled    { background: var(--accent); border-color: var(--accent); color: var(--background); }
.pill-default:hover, .pill-prominent:hover {
  background: var(--accent); border-color: var(--accent); color: var(--background);
}

/* === REUSABLE: card === */
.card {
  display: block;
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease;
  background: var(--background);
  position: relative;
}
.card:hover { border-color: rgba(155, 155, 155, 0.55); }
.card .card-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-faint);
  margin: 0 0 10px;
}
.card h3 {
  margin: 0 0 6px; font-size: 17px; font-weight: 600;
  color: var(--foreground); letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card h3 .arrow-icon { color: var(--text-faint); transition: transform .2s ease, color .2s ease; }
.card:hover h3 .arrow-icon { transform: translate(2px, -2px); color: var(--accent); }
.card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* === MOBILE === */
@media (max-width: 899px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--divider);
    padding: 24px;
  }
  main { padding: 40px 24px 80px; }
  .site-footer { grid-column: 1; padding: 24px; }
}
