@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================================
   geemlabs.com - styles.css
   Shared with gabemunro.com: Space Grotesk + DM Sans, sparse
   static-site architecture, dark/light mode variables.
   ============================================================ */

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

:root {
  --bg: #111111;
  --bg2: #1c1c1c;
  --text: #f7f7f7;
  --muted: #999999;
  --text-muted: #999999;
  --accent: #7a9e72;
  --border: rgba(240, 237, 232, 0.08);
  --border-hover: rgba(240, 237, 232, 0.18);
  --nav-bg: rgba(17, 17, 17, 0.92);
  --panel-bg: linear-gradient(180deg, rgba(28, 28, 28, 0.98), rgba(17, 17, 17, 0.98));
  --overlay: rgba(17, 17, 17, 0.82);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.4);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --site-nav-height: 73px;
  --styleguide-subnav-height: 50px;

  --sg-light-bg-primary: #f7f7f7;
  --sg-light-bg-secondary: #eeeeee;
  --sg-light-text-primary: #111111;
  --sg-light-text-secondary: #666666;
  --sg-light-accent: #3d5e38;
  --sg-light-divider: rgba(17, 17, 17, 0.08);

  --sg-dark-bg-primary: #111111;
  --sg-dark-bg-secondary: #1c1c1c;
  --sg-dark-text-primary: #f7f7f7;
  --sg-dark-text-secondary: #999999;
  --sg-dark-accent: #7a9e72;
  --sg-dark-divider: rgba(240, 237, 232, 0.08);

  --sg-verdict-yes: #6a9a6a;
  --sg-verdict-no: #9a6a6a;
}

html[data-theme='light'] {
  --bg: #f7f7f7;
  --bg2: #eeeeee;
  --text: #111111;
  --muted: #666666;
  --text-muted: #666666;
  --accent: #3d5e38;
  --border: rgba(17, 17, 17, 0.08);
  --border-hover: rgba(17, 17, 17, 0.18);
  --nav-bg: rgba(247, 247, 247, 0.92);
  --panel-bg: linear-gradient(180deg, rgba(238, 238, 238, 0.98), rgba(247, 247, 247, 0.98));
  --overlay: rgba(247, 247, 247, 0.76);
  --shadow-lg: 0 24px 80px rgba(17, 17, 17, 0.14);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a,
button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 500;
  transform: translateY(-180%);
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}

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

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

.accent,
.accent-word {
  color: var(--accent);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 3rem;
}

.nav-logo {
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-logo--mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.nav-wordmark {
  line-height: 1;
}

.nav-utilities {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-meta {
  min-width: 104px;
  color: var(--muted);
  text-align: right;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.theme-switcher {
  position: relative;
}

.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
}

.theme-toggle .theme-icon {
  transform: translateY(1px);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  right: 0;
  z-index: 220;
  display: none;
  width: 236px;
  padding: 0.5rem;
  border: 1px solid var(--border-hover);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
}

.theme-menu.is-visible {
  display: block;
}

.theme-menu-label {
  margin: 0.25rem 0.5rem 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.theme-menu-button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-menu-button:hover,
.theme-menu-button:focus-visible,
.theme-menu-button.is-active {
  border-color: var(--border);
  background: var(--bg);
  color: var(--text);
}

.theme-menu-glyph {
  color: var(--accent);
}

.divider {
  margin: 0 3rem;
  border: none;
  border-top: 1px solid var(--border);
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: min(620px, calc(100vh - var(--site-nav-height)));
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 3rem 5rem;
  align-items: center;
}

.hero-dot-grid {
  position: absolute;
  top: 0;
  right: calc((100vw - min(1100px, 100vw)) / -2);
  width: min(760px, 68vw);
  height: min(760px, 68vw);
  background-image: radial-gradient(circle, rgba(240, 237, 232, 0.18) 0 1.15px, transparent 1.45px);
  background-size: 18px 18px;
  background-position: top right;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom left, rgba(0, 0, 0, 1), transparent 72%);
  mask-image: linear-gradient(to bottom left, rgba(0, 0, 0, 1), transparent 72%);
}

html[data-theme='light'] .hero-dot-grid {
  background-image: radial-gradient(circle, rgba(17, 17, 17, 0.15) 0 1.15px, transparent 1.45px);
}

.hero-flask-mark {
  position: absolute;
  top: 50%;
  right: 3rem;
  width: clamp(240px, 25vw, 300px);
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.hero > :not(.hero-dot-grid):not(.hero-flask-mark) {
  position: relative;
  z-index: 2;
}

.hero-copy {
  width: min(58%, 680px);
  max-width: calc(100% - 360px);
}

.hero-headline {
  position: relative;
  max-width: 100%;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-subtext {
  margin-top: 1.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-subtext.is-visible {
  opacity: 1;
}

.typewriter-measure {
  display: block;
  visibility: hidden;
}

.typewriter-output {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
}

.typewriter-char {
  color: var(--text);
}

.typewriter-char.is-accent {
  color: var(--accent);
}

.typewriter-char.is-selected {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

.typewriter-cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.88em;
  margin-left: 0.02em;
  background: var(--text);
  transform: translateY(0.1em);
  animation: cursor-blink 1s steps(2, start) infinite;
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.stats-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.stats-bar {
  display: flex;
}

.stat {
  flex: 1;
  margin-right: 3rem;
  padding: 0 3rem 0 0;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  margin-right: 0;
  border-right: none;
}

.stat-number {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-showcase {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 3rem 5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.project-card {
  padding: 1.5rem;
  background: var(--bg);
  transition: background 0.2s;
}

.project-card:hover {
  background: var(--bg2);
}

.project-card--expanded {
  display: flex;
  flex-direction: column;
}

.project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.project-tag {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-title {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.project-desc {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.75;
}

.project-card--expanded .project-desc + .project-desc {
  margin-top: -0.5rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 1px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-meta {
  margin-top: 1.5rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 300;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

footer p {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.site-footer p:nth-child(1) {
  text-align: left;
}

.site-footer p:nth-child(2) {
  text-align: center;
}

.site-footer p:nth-child(3) {
  text-align: right;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 3rem 7rem;
}

.page-title {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.sg-hero-title {
  max-width: 860px;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
}

.page-sub {
  max-width: 720px;
  margin-bottom: 5rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
}

.sg-subnav {
  position: sticky;
  top: var(--site-nav-height);
  z-index: 90;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.sg-subnav-inner {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 3rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sg-subnav-inner::-webkit-scrollbar {
  display: none;
}

.sg-subnav-link {
  padding: 1rem 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}

.sg-subnav-link:focus-visible,
.sg-subnav-link:hover,
.sg-subnav-link.is-active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.sg-section {
  padding: 0;
  margin-bottom: 5rem;
  scroll-margin-top: calc(var(--site-nav-height) + var(--styleguide-subnav-height) + 0.5rem);
}

.sg-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sg-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sg-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
}

.sg-copy--spaced {
  margin-bottom: 1.5rem;
}

.sg-intro-block {
  margin-bottom: 1.5rem;
}

.sg-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sg-tab {
  padding: 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.sg-tab:hover,
.sg-tab:focus-visible,
.sg-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.sg-tab-panel {
  display: none;
}

.sg-tab-panel.is-active {
  display: block;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background: var(--border);
}

.color-card {
  overflow: hidden;
  background: var(--bg);
}

.color-swatch {
  width: 100%;
  height: 80px;
}

.color-swatch--light-divider {
  border-bottom: 1px solid var(--sg-light-divider);
}

.color-swatch--dark-divider {
  border-bottom: 1px solid var(--sg-dark-divider);
}

.color-swatch--light-bg-primary {
  background: var(--sg-light-bg-primary);
}

.color-swatch--light-bg-secondary {
  background: var(--sg-light-bg-secondary);
}

.color-swatch--light-text-primary {
  background: var(--sg-light-text-primary);
}

.color-swatch--light-text-secondary {
  background: var(--sg-light-text-secondary);
}

.color-swatch--light-accent {
  background: var(--sg-light-accent);
}

.color-swatch--dark-bg-primary {
  background: var(--sg-dark-bg-primary);
}

.color-swatch--dark-bg-secondary {
  background: var(--sg-dark-bg-secondary);
}

.color-swatch--dark-text-primary {
  background: var(--sg-dark-text-primary);
}

.color-swatch--dark-text-secondary {
  background: var(--sg-dark-text-secondary);
}

.color-swatch--dark-accent {
  background: var(--sg-dark-accent);
}

.color-info {
  padding: 1rem;
}

.color-name {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
}

.color-role {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.color-codes {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.color-code {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.color-code span {
  color: var(--text);
  font-weight: 500;
}

.color-note {
  max-width: 780px;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-style: italic;
  line-height: 1.6;
}

.type-row {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.type-row:first-child {
  padding-top: 0;
}

.type-row:last-child,
.type-row--last {
  border-bottom: none;
}

.type-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.type-label {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.type-label a,
.print-copy a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.type-label a:hover,
.type-label a:focus-visible,
.print-copy a:hover,
.print-copy a:focus-visible {
  color: var(--text);
}

.type-spec {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.type-use {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.5;
}

.sample-display-xl {
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.sample-display-lg {
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sample-display-md {
  color: var(--text);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sample-stat {
  color: var(--text);
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sample-nav {
  color: var(--text);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sample-eyebrow {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sample-body {
  max-width: 600px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.sample-body strong {
  color: var(--text);
  font-weight: 500;
}

.sample-label {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sample-caption {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.5;
}

.accent-demo {
  margin: 1rem 0;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.accent-demo--compact {
  margin-top: 1rem;
  font-size: 1.4rem;
}

.component-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.component-row--column {
  display: block;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 1rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.btn-secondary {
  border-color: var(--border-hover);
  background: transparent;
  color: var(--text);
}

.btn-primary:not(:disabled):not([aria-disabled='true']):hover,
.btn-primary:not(:disabled):not([aria-disabled='true']):focus-visible {
  background: color-mix(in srgb, var(--accent) 86%, var(--text));
  border-color: color-mix(in srgb, var(--accent) 86%, var(--text));
}

.btn-secondary:not(:disabled):not([aria-disabled='true']):hover,
.btn-secondary:not(:disabled):not([aria-disabled='true']):focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary:not(:disabled):not([aria-disabled='true']):active,
.btn-secondary:not(:disabled):not([aria-disabled='true']):active {
  transform: translateY(1px);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-primary[aria-disabled='true'],
.btn-secondary[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.45;
}

.stack-tag-sample,
.stack-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 1px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.component-note {
  max-width: 760px;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: italic;
  line-height: 1.5;
}

.sg-mini-label {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sg-mini-label--spaced {
  margin-top: 1.5rem;
}

.sg-spacer {
  height: 1.5rem;
}

.spacing-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.spacing-row--last {
  border-bottom: none;
}

.spacing-swatch {
  height: 16px;
  flex-shrink: 0;
  background: var(--accent);
  opacity: 0.4;
}

.spacing-swatch--4 { width: 4px; }
.spacing-swatch--8 { width: 8px; }
.spacing-swatch--16 { width: 16px; }
.spacing-swatch--24 { width: 24px; }
.spacing-swatch--48 { width: 48px; }
.spacing-swatch--80 { width: 80px; }
.spacing-swatch--112 { width: 112px; }

.spacing-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.spacing-meta strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-weight: 500;
}

.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background: var(--border);
}

.voice-card {
  padding: 1.5rem;
  background: var(--bg);
}

.voice-card-label {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.voice-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.voice-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.voice-list li::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.example-pair {
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.example-row {
  display: grid;
  grid-template-columns: 80px 1fr;
}

.example-row + .example-row {
  border-top: 1px solid var(--border);
}

.example-verdict {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-right: 1px solid var(--border);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.example-verdict.yes {
  color: var(--sg-verdict-yes);
}

.example-verdict.no {
  color: var(--sg-verdict-no);
}

.example-verdict--accent {
  color: var(--accent);
}

.example-text {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.example-text em {
  color: var(--text);
  font-style: normal;
}

.checklist {
  margin-top: 1.5rem;
}

.check-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.check-indicator {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-top: 0.25rem;
  border: 1px solid var(--accent);
  border-radius: 1px;
}

.check-text {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.print-group {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.print-copy {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
}

.identity-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background: var(--border);
}

.identity-panel {
  background: var(--bg);
  padding: 1.5rem 3rem;
}

.identity-wordmark {
  color: var(--text);
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.identity-wordmark--nav {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-note {
  margin-top: 0.5rem;
}

.identity-hero-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 3rem;
}

.identity-hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 3rem;
}

.identity-hero-panel--light {
  background: var(--sg-light-bg-primary);
}

.identity-hero-panel--dark {
  background: var(--sg-dark-bg-primary);
}

.identity-hero-panel img {
  display: block;
  width: clamp(180px, 22vw, 200px);
  height: auto;
}

.lockup-hero-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 3rem;
}

.lockup-hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 3rem;
}

.lockup-hero-panel--light,
.lockup-tile--light {
  background: var(--sg-light-bg-primary);
}

.lockup-hero-panel--dark,
.lockup-tile--dark {
  background: var(--sg-dark-bg-primary);
}

.lockup-tile--nori {
  background: var(--sg-light-accent);
}

.lockup-hero-panel img {
  display: block;
  width: min(100%, 520px);
  height: auto;
}

.lockup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 1.5rem;
}

.lockup-card {
  display: grid;
  gap: 0.5rem;
  align-items: start;
}

.lockup-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 3rem;
}

.lockup-tile--stacked {
  min-height: 280px;
}

.lockup-img {
  display: block;
  width: 100%;
  height: auto;
}

.lockup-img--horizontal {
  max-width: 440px;
}

.lockup-img--stacked {
  max-width: 210px;
}

.lockup-size-table {
  max-width: 620px;
  margin: 1.5rem 0 1rem;
  border-top: 1px solid var(--border);
}

.lockup-size-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

.lockup-size-row--head {
  color: var(--text);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lockup-rules {
  display: grid;
  gap: 0.5rem;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  list-style-position: inside;
}

.mark-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 3rem 0 1.5rem;
}

.variant-tabset {
  margin-top: 3rem;
}

.variant-tabs {
  margin-bottom: 0;
}

.variant-panel {
  padding-top: 1.5rem;
}

.variant-card--feature {
  grid-column: 1 / -1;
}

.variant-asset-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 168px;
  padding: 1.5rem;
}

.variant-asset-panel--feature {
  height: 260px;
  padding: 3rem;
}

.variant-asset-panel--light {
  background: var(--sg-light-bg-primary);
  border-bottom: 1px solid var(--sg-light-divider);
}

.variant-asset-panel--dark {
  background: var(--sg-dark-bg-primary);
  border-bottom: 1px solid var(--sg-dark-divider);
}

.variant-asset-panel--nori {
  background: var(--sg-light-accent);
  border-bottom: 1px solid color-mix(in srgb, var(--sg-light-accent) 78%, var(--sg-light-text-primary));
}

.variant-flask-img {
  display: block;
  width: clamp(128px, 18vw, 180px);
  height: auto;
}

.variant-card--feature .variant-flask-img {
  width: clamp(170px, 22vw, 220px);
}

.variant-lockup-img {
  display: block;
  width: 100%;
  height: auto;
}

.variant-lockup-img--horizontal {
  max-width: 340px;
}

.variant-lockup-img--stacked {
  max-width: 150px;
}

.variant-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  width: 100%;
  border: 1px dashed var(--border-hover);
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.mark-card {
  display: grid;
  gap: 0.5rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--bg);
}

.mark-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 132px;
  padding: 1.5rem;
}

.mark-tile--dark {
  background: var(--sg-dark-bg-primary);
}

.mark-tile--light {
  background: var(--sg-light-bg-primary);
}

.mark-tile--nori {
  background: var(--sg-light-accent);
}

.mark-img {
  display: block;
  width: 64px;
  height: 64px;
}

.mark-caption {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.mark-guidance {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
}

.code-token {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

.mark-size-scale {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.mark-size-item {
  display: flex;
  min-width: 72px;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.mark-size-label {
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
}

.mark-size-note {
  max-width: 80px;
  line-height: 1.35;
}

.mark-size-img {
  display: block;
  height: auto;
}

.mark-size-img--16 {
  width: 16px;
}

.mark-size-img--32 {
  width: 32px;
}

.mark-size-img--64 {
  width: 64px;
}

.mark-size-img--128 {
  width: 128px;
}

.identity-example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.identity-example {
  padding: 1rem;
  background: var(--bg);
}

.identity-example-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  margin: 0.5rem 0;
}

.identity-example-surface--light {
  background: var(--sg-light-bg-primary);
}

.identity-example-surface--dark {
  background: var(--sg-dark-bg-primary);
}

.identity-example-surface img {
  display: block;
  width: 72px;
  height: auto;
}

.identity-example-surface--wordmark {
  gap: 0.5rem;
  color: var(--sg-light-text-primary);
  font-family: var(--display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.identity-example-surface--wordmark img {
  width: 36px;
}

.identity-example-surface--wordmark-bad img {
  width: 56px;
}

.identity-too-small {
  width: 20px !important;
}

.bad-flask-svg {
  width: 72px;
  height: 72px;
}

.bad-flask-outline {
  fill: none;
  stroke: var(--sg-light-text-primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8.96px;
}

.bad-flask-fill {
  fill: var(--sg-light-accent);
}

.bad-flask-bubble {
  fill: var(--sg-light-accent);
}

.bad-flask-svg--wrong-bubbles .bad-flask-bubble {
  fill: #c0392b;
}

.principle-quote {
  max-width: 880px;
}

.principle-quote figcaption {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.principle-quote blockquote {
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.error-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 3rem 7rem;
}

.error-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 3rem;
  align-items: start;
}

.error-eyebrow {
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.error-title {
  max-width: 680px;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.error-sub {
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.error-console-frame {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--border-hover);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
}

.error-console-label {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.error-meter {
  margin-bottom: 1rem;
}

.error-meter-track {
  width: 100%;
  height: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.error-meter-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.error-meter-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-output {
  height: 260px;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.error-line {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.error-line--ok {
  color: var(--accent);
}

.error-line--command {
  color: var(--text);
}

.error-line--error {
  color: var(--sg-verdict-no);
}

.error-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 1rem;
}

.error-input {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}

.error-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.error-shortcut {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-shortcut:hover,
.error-shortcut:focus-visible {
  color: var(--text);
  border-color: var(--border-hover);
}

@media (max-width: 760px) {
  .site-nav-inner {
    padding: 1rem 1.5rem;
  }

  .nav-meta {
    display: none;
  }

  .hero,
  .stats-section,
  .projects-showcase,
  .page,
  .error-page {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .hero {
    min-height: 520px;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-headline {
    font-size: clamp(2.2rem, 7vw, 3.2rem);
    max-width: 100%;
  }

  .divider {
    margin: 0 1.5rem;
  }

  .stats-bar {
    display: block;
  }

  .stat {
    margin-right: 0;
    margin-bottom: 1.5rem;
    padding: 0 0 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .sg-subnav-inner {
    justify-content: flex-start;
    gap: 1.5rem;
    padding: 0 1.5rem;
    scroll-padding-inline: 1.5rem;
  }

  .sg-tabs {
    overflow-x: auto;
  }

  .voice-grid,
  .error-grid {
    grid-template-columns: 1fr;
  }

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

  .identity-hero-display,
  .lockup-hero-display,
  .lockup-grid,
  .mark-grid,
  .identity-example-grid {
    grid-template-columns: 1fr;
  }

  .identity-hero-panel,
  .lockup-hero-panel {
    min-height: 240px;
    padding: 3rem 1.5rem;
  }

  .lockup-tile {
    min-height: 170px;
    padding: 1.5rem;
  }

  .lockup-size-row {
    gap: 0.5rem;
    font-size: 0.76rem;
  }

  .mark-size-scale {
    flex-wrap: wrap;
    align-items: flex-end;
  }

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

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

  footer {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
  }

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

  .site-footer p:nth-child(1),
  .site-footer p:nth-child(2),
  .site-footer p:nth-child(3) {
    text-align: center;
  }
}

@media (max-width: 1100px) {
  .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero-flask-mark {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav-wordmark {
    display: inline;
  }

  .site-nav-inner {
    gap: 1rem;
  }

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

  .example-row {
    grid-template-columns: 60px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor {
    animation: none;
  }
}
