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

/* ── Base ── */
:root {
  /* ── Primitive tokens (scale values, never change between themes) ── */

  /* Copper scale */
  --copper-50: #FFF1E4;  --copper-100: #FFE3C2;  --copper-200: #FFC58F;
  --copper-300: #F8A96B;  --copper-400: #E79145;  --copper-500: #D4792F;
  --copper-600: #AF5D20;  --copper-700: #8A4215;  --copper-800: #68280C;
  --copper-900: #470E00;  --copper-950: #310A03;

  /* Slate scale */
  --slate-50: #EDF2F7;  --slate-100: #DCE4ED;  --slate-200: #BDC9D5;
  --slate-300: #9FAFBE;  --slate-400: #8395A5;  --slate-500: #697B8C;
  --slate-600: #526372;  --slate-700: #394B5A;  --slate-800: #283845;
  --slate-900: #11202A;  --slate-950: #0B1520;

  /* Patina scale */
  --patina-50: #EBFAF5;  --patina-100: #C1E4DA;  --patina-200: #93D0C0;
  --patina-300: #60BBA6;  --patina-400: #47A28E;  --patina-500: #008C76;
  --patina-600: #00715D;  --patina-700: #005645;  --patina-800: #063C30;
  --patina-900: #08241C;  --patina-950: #001508;

  /* Ember scale */
  --ember-50: #FFF3F2;  --ember-100: #FAD2D0;  --ember-200: #F5AFAC;
  --ember-300: #ED8C8A;  --ember-400: #DB6D6D;  --ember-500: #C25154;
  --ember-600: #A5383E;  --ember-700: #812A2C;  --ember-800: #5D1E1E;
  --ember-900: #331816;  --ember-950: #240400;

  /* ── Semantic tokens (swap between themes) ── */
  --color-copper: var(--copper-500);
  --color-copper-light: var(--copper-300);
  --color-copper-dark: var(--copper-600);
  --color-slate: var(--slate-800);
  --color-patina: var(--patina-500);
  --color-ember: var(--ember-600);
  --color-black: var(--slate-900);
  --color-gray-700: var(--slate-700);
  --color-gray-500: var(--slate-500);
  --color-gray-300: var(--slate-300);
  --color-gray-200: var(--slate-200);
  --color-gray-100: var(--slate-50);
  --color-white: #fff;
  --sidebar-width: 220px;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Fira Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --color-black: var(--slate-50);
  --color-gray-700: var(--slate-200);
  --color-gray-500: var(--slate-400);
  --color-gray-300: var(--slate-700);
  --color-gray-200: var(--slate-800);
  --color-gray-100: var(--slate-900);
  --color-white: var(--slate-950);
}

/* ── Theme Toggle ── */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--color-gray-300);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Invert black SVG logos/icons to white in dark mode */
[data-theme="dark"] .nav-icon,
[data-theme="dark"] .logo-preview img,
[data-theme="dark"] .clearspace-box img,
[data-theme="dark"] .dont-preview img {
  filter: invert(1);
}

/* The dark bg demo already shows a white logo via .logo-inverted — undo the double invert */
[data-theme="dark"] .logo-inverted {
  filter: none;
}

/* Combine invert with existing filters in dark mode */
[data-theme="dark"] .dont-shadow {
  filter: invert(1) drop-shadow(4px 4px 6px rgba(255, 255, 255, 0.3));
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-black);
  background: var(--color-white);
}

/* Source Serif 4 for long-form prose */
section > p,
.subsection > p,
.mural-principle p,
.mural-reading-item p,
.personality-trait p,
.tone-desc,
.tone-example p,
.icon-rule p,
.photo-principle p,
.type-guidelines li,
.placeholder-note,
.sample-body,
.sample-small {
  font-family: var(--font-serif);
}

/* ── Sidebar Nav ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--color-gray-200);
  background: var(--color-white);
  overflow-y: auto;
}

.nav-header {
  margin: -2rem -1.5rem 1.5rem;
}

.nav-icon {
  width: 100%;
  opacity: 0.07;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 0.25rem;
}

.sidebar a {
  display: block;
  padding: 0.375rem 0;
  color: var(--color-gray-700);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}

.sidebar a:hover {
  color: var(--color-copper);
}

.sidebar li.nav-group {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-gray-200);
}

/* ── Main Content ── */
main {
  margin-left: var(--sidebar-width);
  max-width: 860px;
  padding: 3rem 3rem 4rem;
}

section {
  margin-bottom: 5rem;
}

/* ── Hero ── */
#overview {
  padding-top: 1rem;
  padding-bottom: 4rem;
}

#overview > p {
  animation: hero-in 0.6s ease-out 0.2s both;
}

.hero-logo {
  width: 48px;
  margin-bottom: 2rem;
  animation: hero-in 0.6s ease-out both;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 0.9;
  margin-bottom: 0;
  animation: hero-in 0.6s ease-out 0.08s both;
}

.hero-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-copper);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-title,
  #overview > p {
    animation: none;
  }
}

/* ── Typography ── */
h1 {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin-bottom: 0.5rem;
}

.lead {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--color-gray-500);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-slate);
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

p {
  max-width: 60ch;
}

section > p {
  margin-bottom: 2rem;
  color: var(--color-gray-700);
}

.subsection {
  margin-bottom: 2.5rem;
}

.subsection > p {
  color: var(--color-gray-700);
  margin-bottom: 1rem;
}

.placeholder-note {
  font-style: italic;
  color: var(--color-gray-500);
  border-left: 3px solid var(--color-gray-300);
  padding-left: 1rem;
}

/* ── Logo Grid ── */
.logo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.logo-card {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: var(--color-gray-100);
  min-height: 160px;
}

.logo-preview img {
  max-width: 80%;
  max-height: 100px;
}

.logo-label {
  padding: 1rem 1.25rem;
}

.logo-label h3 {
  margin-bottom: 0.25rem;
}

.logo-label p {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin: 0;
}

/* ── Clear Space Demo ── */
.clearspace-demo {
  margin-top: 1rem;
}

.clearspace-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  border: 2px dashed var(--color-gray-300);
  border-radius: 8px;
  background: var(--color-gray-100);
}

.clearspace-box img {
  width: 280px;
}

/* ── Background Demos ── */
.background-demos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.bg-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  border-radius: 8px;
  min-height: 120px;
}

.bg-demo img {
  width: 200px;
}

.bg-light {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
}

.bg-dark {
  background: var(--slate-900);
}

.logo-inverted {
  filter: invert(1);
}

/* ── Don'ts Grid ── */
.donts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.dont-card {
  text-align: center;
}

.dont-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  min-height: 100px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.dont-preview img {
  width: 100px;
}

.dont-card > p {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

.dont-stretch {
  width: 100px;
  transform: scaleY(2);
}

.dont-rotate {
  transform: rotate(15deg);
}

.dont-opacity {
  opacity: 0.3;
}

.dont-shadow {
  filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.4));
}

/* ── Favicon ── */
.favicon-grid {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.favicon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.favicon-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  margin-top: auto;
}

.favicon-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-gray-500);
  text-align: center;
  line-height: 1.4;
  min-height: 2.1em;
}

/* ── Color Swatches ── */
.color-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-card {
  width: 140px;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.color-swatch {
  height: 80px;
}

.color-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.color-info strong {
  font-size: 0.875rem;
}

.color-info span {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  font-family: var(--font-mono);
}

/* ── Color Scale ── */
.color-scale {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}

.color-scale-step {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  position: relative;
}

.color-scale-swatch {
  position: relative;
}

.color-scale-step .copy-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.color-scale-step:hover .copy-icon {
  opacity: 1;
}

.color-scale-step .copy-icon svg {
  width: 11px;
  height: 11px;
  stroke: #333;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.color-scale-step .copy-toast {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 0.5625rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0.2rem 0.375rem;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 10;
}

.color-scale-step .copy-toast.show {
  opacity: 1;
}

.color-scale-swatch {
  height: 80px;
}

.color-scale-info {
  padding: 0.5rem;
  text-align: center;
}

.color-scale-info strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
}

.color-scale-info span {
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--color-gray-500);
}

.color-scale-active .color-scale-swatch {
  height: 96px;
}

.color-scale-active .color-scale-info strong {
  color: var(--color-copper);
}

.color-scale-active-slate .color-scale-swatch {
  height: 96px;
}

.color-scale-active-slate .color-scale-info strong {
  color: var(--color-slate);
}

.color-scale-active-patina .color-scale-swatch {
  height: 96px;
}

.color-scale-active-patina .color-scale-info strong {
  color: var(--color-patina);
}

.color-scale-active-ember .color-scale-swatch {
  height: 96px;
}

.color-scale-active-ember .color-scale-info strong {
  color: var(--color-ember);
}

/* ── Mural System ── */
.mural-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.75rem;
}

.mural-tile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.mural-tile-preview {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.mural-tile-preview img,
.mural-tile-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mural-tile-label {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--color-gray-500);
  text-align: center;
}

.mural-tile-regions {
  font-size: 0.5625rem;
  font-family: var(--font-mono);
  color: var(--color-gray-300);
  text-align: center;
}

.mural-scale-row {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.mural-scale-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.mural-scale-preview {
  border-radius: 6px;
  overflow: hidden;
}

.mural-scale-preview img {
  display: block;
  width: 100%;
  height: 100%;
}

.mural-scale-3x { width: 180px; height: 180px; }
.mural-scale-2x { width: 120px; height: 120px; }
.mural-scale-1x { width: 60px; height: 60px; }

.mural-scale-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gray-700);
}

.mural-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mural-principles-3col {
  grid-template-columns: 1fr 1fr 1fr;
}

.mural-principle {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.25rem;
}

.mural-principle strong {
  display: block;
  margin-bottom: 0.375rem;
}

.mural-principle p {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  margin: 0;
  max-width: none;
}

/* Mural Example */
.mural-example-wrap {
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  overflow: hidden;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.mural-example-img {
  display: block;
  width: 480px;
  max-width: 100%;
  height: auto;
}

.mural-reading {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.mural-reading-item strong {
  display: block;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  margin-bottom: 0.25rem;
}

.mural-reading-item p {
  font-size: 0.8125rem;
  color: var(--color-gray-700);
  margin: 0;
  max-width: none;
}

@media (max-width: 768px) {
  .mural-principles,
  .mural-principles-3col {
    grid-template-columns: 1fr;
  }

  .mural-scale-3x { width: 140px; height: 140px; }
  .mural-scale-2x { width: 96px; height: 96px; }
  .mural-scale-1x { width: 48px; height: 48px; }

  .mural-reading {
    grid-template-columns: 1fr;
  }

  .mural-example-img {
    width: 100%;
  }
}

/* ── Typeface Showcase ── */
.typeface-showcase {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.typeface-name {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: none;
}

.typeface-alphabet {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-gray-700);
  margin-bottom: 0.25rem;
  max-width: none;
}

.typeface-weights {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.weight-sample {
  font-size: 1.125rem;
  color: var(--color-gray-700);
}

/* ── Type Scale ── */
.type-scale {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.type-sample {
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 1.5rem;
}

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

.type-label {
  display: block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-gray-500);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sample-hero {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 0.9;
}

.sample-display {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.sample-h1 {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.0;
}

.sample-h2 {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.sample-h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.sample-body {
  font-size: 1rem;
}

.sample-small {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.sample-caption {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Type Usage Grid ── */
.type-usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.type-usage-card {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.25rem;
}

.type-usage-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.type-usage-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.type-usage-card li {
  font-size: 0.8125rem;
  color: var(--color-gray-700);
  line-height: 1.4;
}

/* ── Type Guidelines ── */
.type-guidelines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.type-guidelines li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--color-gray-700);
  max-width: 60ch;
}

.type-guidelines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-copper);
}

/* ── Voice & Tone ── */
.personality-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.personality-trait {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.25rem;
}

.personality-trait strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.personality-trait p {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  margin: 0;
  max-width: none;
}

.tone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tone-card {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.25rem;
}

.tone-card h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.375rem;
}

.tone-desc {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin-bottom: 0.75rem;
  max-width: none;
}

.tone-example {
  border-radius: 6px;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.5rem;
}

.tone-example:last-child {
  margin-bottom: 0;
}

.tone-example p {
  font-size: 0.8125rem;
  font-style: italic;
  margin: 0;
  max-width: none;
}

.tone-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.tone-do {
  background: var(--patina-50);
}

.tone-do .tone-tag {
  color: var(--color-patina);
}

.tone-dont {
  background: var(--ember-50);
}

.tone-dont .tone-tag {
  color: var(--color-ember);
}

[data-theme="dark"] .tone-do {
  background: rgba(0, 140, 118, 0.15);
}

[data-theme="dark"] .tone-dont {
  background: rgba(165, 56, 62, 0.15);
}

/* ── Iconography ── */
.icon-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.icon-rule {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.25rem;
}

.icon-rule strong {
  display: block;
  margin-bottom: 0.375rem;
}

.icon-rule p {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  margin: 0;
  max-width: none;
}

.icon-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 72px;
}

.icon-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  color: var(--color-black);
}

.icon-preview svg {
  width: 24px;
  height: 24px;
}

.icon-item span {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--color-gray-500);
  text-align: center;
}

.icon-status-success { color: var(--color-patina); }
.icon-status-error { color: var(--color-ember); }
.icon-status-warning { color: var(--color-copper); }
.icon-status-info { color: var(--color-slate); }

/* ── Photography ── */
.photo-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.photo-principle {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.25rem;
}

.photo-principle strong {
  display: block;
  margin-bottom: 0.375rem;
}

.photo-principle p {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  margin: 0;
  max-width: none;
}

/* ── Layout & Grid — Spacing Scale ── */
.spacing-scale {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
}

.spacing-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.spacing-block {
  background: var(--color-copper);
  border-radius: 2px;
}

.spacing-item span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-gray-500);
  white-space: nowrap;
}

.spacing-item em {
  font-style: normal;
  color: var(--color-gray-300);
}

/* ── Applications ── */
.app-spec {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.app-mockup {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-details ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.app-details li {
  font-size: 0.8125rem;
  color: var(--color-gray-700);
  padding-left: 1rem;
  position: relative;
}

.app-details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-gray-300);
}

/* Business Card */
.biz-card {
  width: 240px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}

.biz-card-front {
  width: 100%;
  height: 100%;
  background: var(--color-white);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.biz-card-logo {
  width: 90px;
}

[data-theme="dark"] .biz-card-logo {
  filter: invert(1);
}

.biz-card-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.biz-card-info strong {
  font-size: 0.75rem;
  font-weight: 700;
}

.biz-card-info span {
  font-size: 0.625rem;
  color: var(--color-gray-500);
}

.biz-card-back-wrap .biz-card-back {
  width: 100%;
  height: 100%;
  background: var(--color-slate);
  display: flex;
  align-items: center;
  justify-content: center;
}

.biz-card-icon {
  width: 40px;
}

/* Member Card */
.member-card {
  width: 280px;
  height: 175px;
  background: var(--color-slate);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--slate-50);
  position: relative;
  overflow: hidden;
}

.member-card-icon {
  width: 32px;
}

.member-card-info strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-white);
}

[data-theme="dark"] .member-card-info strong {
  color: var(--slate-50);
}

.member-card-info span {
  font-size: 0.6875rem;
  color: var(--copper-300);
}

.member-card-number {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--slate-300);
}

/* Email Signature */
.email-sig {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 380px;
}

.email-sig-divider {
  width: 40px;
  height: 2px;
  background: var(--color-copper);
  margin-bottom: 1rem;
}

.email-sig-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.email-sig-logo {
  width: 80px;
  margin-top: 2px;
}

[data-theme="dark"] .email-sig-logo {
  filter: invert(1);
}

.email-sig-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.email-sig-info strong {
  font-size: 0.8125rem;
  font-weight: 700;
}

.email-sig-info span {
  font-size: 0.6875rem;
  color: var(--color-gray-500);
}

/* ── Footer ── */
footer {
  margin-left: var(--sidebar-width);
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--color-gray-200);
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-200);
    padding: 1.5rem;
  }

  .sidebar ul {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .sidebar li {
    margin-bottom: 0;
  }

  main,
  footer {
    margin-left: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

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

  .background-demos {
    grid-template-columns: 1fr;
  }

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

  .type-usage-grid,
  .personality-grid,
  .tone-grid,
  .icon-rules,
  .photo-principles {
    grid-template-columns: 1fr;
  }

  .app-spec {
    flex-direction: column;
  }

  #overview {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
}
