:root {
  color-scheme: light;
  --page: #f5f7fa;
  --ink: #101624;
  --muted: #626b7d;
  --line: #dfe4ec;
  --surface: #ffffff;
  --accent: #1d4ed8;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(245, 247, 250, 0.86);
  border-bottom: 1px solid rgba(16, 22, 36, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.topbar nav a {
  text-decoration: none;
  font-weight: 800;
}

.brand {
  font-size: 1.05rem;
}

.topbar nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

main {
  padding: 0 clamp(18px, 5vw, 64px) 56px;
}

.hero {
  display: grid;
  align-content: end;
  min-height: 46svh;
  max-width: 1120px;
  padding: clamp(68px, 9vw, 120px) 0 44px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p:last-child {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.55;
}

.stage-wrap,
.source-note {
  border-top: 1px solid var(--line);
}

.stage-wrap {
  padding: 30px 0 44px;
}

.stage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.stage-head h2,
.source-note h2 {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.7rem, 3vw, 3rem);
  letter-spacing: 0;
}

.stage-links,
.design-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-links a,
.design-card footer a,
.source-note > a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 8px 0 48px;
}

.design-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.design-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
}

.preview-button {
  display: grid;
  width: 100%;
  padding: 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.card-meta {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-title {
  margin-top: 6px;
  font-size: 1.35rem;
  font-weight: 900;
}

.design-card footer {
  padding: 0 16px 16px;
}

.sample-site,
.mini-site {
  --bg: #ffffff;
  --fg: #111827;
  --subtle: #697386;
  --soft: #f4f6fb;
  --strong: #635bff;
  --strong-2: #00d66f;
  --radius: 14px;
  --font: Inter, system-ui, sans-serif;
  --display: "Space Grotesk", Inter, sans-serif;
  --border: rgba(17, 24, 39, 0.13);
  --shadow: 0 24px 80px rgba(22, 34, 51, 0.14);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
}

.sample-large {
  min-height: 540px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sample-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
  padding: 0 clamp(18px, 4vw, 42px);
  border-bottom: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.9rem;
  font-weight: 700;
}

.sample-nav strong {
  margin-right: auto;
  color: var(--fg);
  font-size: 1rem;
}

.sample-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  padding: clamp(34px, 7vw, 86px) clamp(20px, 5vw, 70px);
}

.sample-kicker {
  margin: 0 0 18px;
  color: var(--strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sample-copy h3 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 6vw, 6.4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
}

.sample-copy p:not(.sample-kicker) {
  max-width: 580px;
  margin: 24px 0 0;
  color: var(--subtle);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.55;
}

.sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.sample-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 900;
}

.sample-actions span:first-child {
  border-color: var(--strong);
  background: var(--strong);
  color: var(--button-fg, #ffffff);
}

.sample-panel {
  display: grid;
  align-content: center;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--soft);
  box-shadow: var(--panel-shadow, none);
}

.panel-row {
  height: 14px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 16%, transparent);
}

.panel-row.strong {
  width: 62%;
  background: var(--strong);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0 28px;
}

.panel-grid i {
  aspect-ratio: 1;
  border-radius: calc(var(--radius) * 0.7);
  background: color-mix(in srgb, var(--strong) 24%, var(--bg));
}

.panel-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 110px;
}

.panel-chart span {
  flex: 1;
  min-height: 26px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--strong), var(--strong-2));
}

.panel-chart span:nth-child(1) { height: 42%; }
.panel-chart span:nth-child(2) { height: 72%; }
.panel-chart span:nth-child(3) { height: 54%; }
.panel-chart span:nth-child(4) { height: 86%; }
.panel-chart span:nth-child(5) { height: 64%; }

.mini-site {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 250px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.mini-nav,
.mini-hero,
.mini-panel {
  display: block;
  border-radius: var(--radius);
}

.mini-nav {
  height: 22px;
  background: color-mix(in srgb, var(--fg) 14%, transparent);
}

.mini-hero {
  height: 88px;
  background: linear-gradient(135deg, var(--strong), color-mix(in srgb, var(--strong-2) 78%, var(--bg)));
}

.mini-panel {
  min-height: 92px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--fg) 16%, transparent) 12px, transparent 12px) 18px 18px / 42px 12px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--strong) 28%, var(--bg)), var(--soft));
  border: 1px solid var(--border);
}

.theme-apple {
  --bg: #fbfbfd;
  --fg: #1d1d1f;
  --subtle: #6e6e73;
  --soft: #f5f5f7;
  --strong: #0071e3;
  --strong-2: #86b7ff;
  --radius: 18px;
  --display: Inter, system-ui, sans-serif;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.08);
}

.theme-stripe {
  --bg: #ffffff;
  --fg: #061b31;
  --subtle: #5f6b7a;
  --soft: #f6f9fc;
  --strong: #635bff;
  --strong-2: #00d66f;
  --radius: 12px;
  --display: "Space Grotesk", Inter, sans-serif;
  --panel-shadow: 0 20px 70px rgba(99, 91, 255, 0.18);
}

.theme-figma {
  --bg: #ffffff;
  --fg: #0d0d0d;
  --subtle: #555555;
  --soft: #f3f3f3;
  --strong: #a259ff;
  --strong-2: #1abcfe;
  --radius: 6px;
  --display: Inter, system-ui, sans-serif;
  --border: #d9d9d9;
}

.theme-slack {
  --bg: #fff7ec;
  --fg: #1d1c1d;
  --subtle: #5d4b59;
  --soft: #ffffff;
  --strong: #611f69;
  --strong-2: #ecb22e;
  --radius: 10px;
  --display: "Instrument Serif", Georgia, serif;
  --button-fg: #ffffff;
}

.theme-netflix {
  --bg: #050505;
  --fg: #ffffff;
  --subtle: #b3b3b3;
  --soft: #141414;
  --strong: #e50914;
  --strong-2: #7b1117;
  --radius: 4px;
  --display: "Archivo Black", Impact, sans-serif;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 30px 110px rgba(0, 0, 0, 0.6);
}

.theme-airbnb {
  --bg: #ffffff;
  --fg: #222222;
  --subtle: #6a6a6a;
  --soft: #f7f6f2;
  --strong: #ff385c;
  --strong-2: #92174d;
  --radius: 24px;
  --display: Inter, system-ui, sans-serif;
  --border: #dddddd;
}

.theme-shopify {
  --bg: #07120d;
  --fg: #ffffff;
  --subtle: #c6d7cf;
  --soft: #10241a;
  --strong: #95bf47;
  --strong-2: #00ff85;
  --radius: 16px;
  --display: "Instrument Serif", Georgia, serif;
  --border: rgba(149, 191, 71, 0.28);
  --button-fg: #07120d;
  --shadow: 0 30px 110px rgba(7, 18, 13, 0.5);
}

.theme-linear {
  --bg: #08090c;
  --fg: #f7f8f8;
  --subtle: #a0a4ad;
  --soft: #111318;
  --strong: #5e6ad2;
  --strong-2: #b7bdf8;
  --radius: 8px;
  --display: Inter, system-ui, sans-serif;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 28px 100px rgba(8, 9, 12, 0.55);
}

.theme-nike {
  --bg: #f5f5f5;
  --fg: #000000;
  --subtle: #3b3b3b;
  --soft: #ffffff;
  --strong: #000000;
  --strong-2: #ff4d00;
  --radius: 0px;
  --display: "Archivo Black", Impact, sans-serif;
  --border: #000000;
  --button-fg: #ffffff;
}

.theme-nike .sample-copy h3,
.theme-netflix .sample-copy h3 {
  text-transform: uppercase;
}

.theme-airbnb .sample-panel,
.theme-apple .sample-panel {
  background:
    radial-gradient(circle at 72% 28%, color-mix(in srgb, var(--strong) 18%, transparent), transparent 34%),
    var(--soft);
}

.component-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr);
  gap: 18px;
  padding: 0 clamp(20px, 5vw, 70px) clamp(28px, 5vw, 58px);
}

.component-zone {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--soft) 82%, var(--bg));
  padding: 18px;
}

.component-label {
  margin: 0 0 12px;
  color: var(--strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.button-row.compact {
  margin-bottom: 0;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.72);
  color: var(--fg);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.ui-button.primary {
  border-color: var(--strong);
  background: var(--strong);
  color: var(--button-fg, #ffffff);
}

.ui-button.secondary {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}

.ui-button.quiet {
  color: var(--subtle);
  background: transparent;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 800;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.64);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0 12px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plan-grid article {
  min-height: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 16px;
}

.plan-grid h4 {
  margin: 28px 0 8px;
  font-family: var(--display);
  font-size: 1.22rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.plan-grid p,
.mock-modal p {
  margin: 0;
  color: var(--subtle);
  font-size: 0.86rem;
  line-height: 1.45;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--strong) 38%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--strong) 14%, var(--bg));
  color: var(--fg);
  font-size: 0.68rem;
  font-weight: 900;
}

.status-chip.alt {
  border-color: color-mix(in srgb, var(--strong-2) 42%, var(--border));
  background: color-mix(in srgb, var(--strong-2) 18%, var(--bg));
}

.table-zone {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.84rem;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--subtle);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.mock-modal {
  max-width: 430px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--panel-shadow, 0 16px 45px rgba(0, 0, 0, 0.12));
  padding: 18px;
}

.mock-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.mock-modal header span {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 46%, var(--subtle) 47%, var(--subtle) 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, var(--subtle) 47%, var(--subtle) 53%, transparent 54%);
}

.mock-modal .button-row {
  margin-top: 18px;
}

.theme-apple .component-zone,
.theme-airbnb .component-zone {
  background: var(--bg);
}

.theme-figma .component-board {
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
}

.theme-netflix .component-zone,
.theme-linear .component-zone,
.theme-shopify .component-zone {
  background: color-mix(in srgb, var(--soft) 90%, #000000);
}

.theme-nike .ui-button,
.theme-nike .component-zone,
.theme-nike .plan-grid article,
.theme-nike table,
.theme-nike .mock-modal,
.theme-nike input,
.theme-nike select {
  border-width: 2px;
}

.theme-nike .status-chip {
  border-radius: 0;
  text-transform: uppercase;
}

.source-note {
  max-width: 860px;
  padding-top: 30px;
}

.source-note p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1060px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-hero,
  .component-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar,
  .stage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

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

  .sample-large {
    min-height: auto;
  }

  .sample-nav {
    gap: 14px;
    min-height: 58px;
    overflow: hidden;
    font-size: 0.78rem;
  }

  .sample-nav span:nth-of-type(2) {
    display: none;
  }

  .sample-hero {
    padding: 26px 18px;
  }

  .sample-panel {
    min-height: 250px;
  }

  .component-board {
    gap: 12px;
    padding: 0 18px 24px;
  }

  .component-zone {
    padding: 14px;
  }

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

  .table-zone {
    overflow-x: auto;
  }

  table {
    min-width: 320px;
  }
}
