:root {
  --ink: #16161d;
  --paper: #f2f0e9;
  --acid: #dfff00;
  --line: rgba(22, 22, 29, 0.18);
  --soft-line: rgba(22, 22, 29, 0.09);
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "Space Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--soft-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--soft-line) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--sans);
}

button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.app-shell { max-width: 1440px; margin: 0 auto; padding: 28px 36px 22px; }

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 29px;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; width: 235px; max-width: 100%; min-width: 0; flex: 0 1 235px; color: inherit; text-decoration: none; }
.brand-logo { display: block; width: 235px; max-width: 100%; height: auto; object-fit: contain; }
.header-note, .eyebrow, .palette-id, .lock-hint, .control-strip, .site-footer { font-family: var(--mono); }
.header-note { margin: 4px 0 0; font-size: 11px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 370px);
  gap: 54px;
  align-items: end;
  padding: 90px 0 78px;
}

.eyebrow { margin: 0 0 17px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
h1 { max-width: 780px; margin: 0; font-size: clamp(48px, 8.2vw, 118px); line-height: 0.84; letter-spacing: -0.085em; font-weight: 700; }
.intro-side { display: grid; gap: 27px; padding-bottom: 3px; }
.intro-side p { max-width: 335px; margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -0.035em; }

.generate-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.generate-button:hover { transform: translate(-4px, -4px); background: var(--acid); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.button-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border: 1px solid currentColor; font-size: 18px; }
kbd { margin-left: auto; border: 1px solid currentColor; padding: 2px 5px; font: 9px var(--mono); text-transform: uppercase; }

.palette-zone { border-top: 1px solid var(--ink); }
.palette-meta { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 17px 0 14px; }
.palette-meta .eyebrow { margin: 0 0 5px; }
.palette-id, .lock-hint { margin: 0; font-size: 11px; }
.lock-hint { color: rgba(22, 22, 29, 0.7); }
.lock-symbol { font-size: 15px; vertical-align: -1px; }

.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); }
.swatch {
  --swatch-color: #ffffff;
  position: relative;
  min-height: clamp(230px, 32vw, 460px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px;
  color: var(--swatch-ink, var(--ink));
  background: var(--swatch-color);
  border-right: 1px solid var(--ink);
  overflow: hidden;
  transition: flex-basis 400ms cubic-bezier(.22,.86,.29,.99), filter 250ms ease, transform 250ms ease;
  isolation: isolate;
}
.swatch:last-child { border-right: none; }
.swatch::after { content: ""; position: absolute; inset: 10px; z-index: -1; border: 1px solid currentColor; opacity: 0.22; pointer-events: none; }
.swatch:hover { flex-basis: 150%; filter: saturate(1.12); }
.swatch-number { margin: 0; font: 11px var(--mono); opacity: 0.8; }
.swatch-actions { display: grid; gap: 10px; align-items: start; }
.hex-button, .lock-button { border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.hex-button { padding: 0; font: 700 clamp(19px, 2vw, 31px)/1 var(--mono); letter-spacing: -0.07em; }
.hex-button:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lock-button { width: max-content; padding: 6px 8px; border: 1px solid currentColor; font: 10px var(--mono); text-transform: uppercase; opacity: 0.85; transition: background 160ms ease, color 160ms ease; }
.lock-button:hover, .lock-button[data-locked="true"] { background: var(--swatch-ink); color: var(--swatch-color); border-color: var(--swatch-ink); }
.lock-button[data-locked="true"] { opacity: 1; }

.control-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.control-strip p { margin: 0; }
.control-actions { display: flex; align-items: center; gap: 10px; }
.text-button { padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #1748ce; }
.share-button { display: inline-flex; align-items: center; gap: 5px; }
.share-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 1.75; }
.divider { opacity: 0.45; }

.site-footer { display: flex; justify-content: space-between; gap: 22px; padding-top: 18px; font-size: 10px; color: rgba(22, 22, 29, 0.67); }
.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .app-shell { padding: 20px 18px 18px; }
  .intro { grid-template-columns: 1fr; gap: 38px; padding: 65px 0 50px; }
  .intro-side { max-width: none; grid-template-columns: 1fr; }
  .intro-side p { font-size: 17px; }
  .swatches { grid-template-columns: 1fr; }
  .swatch { min-height: 132px; flex-direction: row; align-items: stretch; }
  .swatch::after { inset: 8px; }
  .swatch-actions { justify-items: end; align-content: space-between; }
  .swatch-number { writing-mode: vertical-rl; transform: rotate(180deg); }
  .hex-button { font-size: 30px; }
  .swatch { border-right: 0; border-bottom: 1px solid var(--ink); }
  .swatch:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  .site-header { padding-bottom: 21px; }
  .brand { width: 210px; flex-basis: 210px; }
  .header-note { display: none; }
  h1 { font-size: clamp(47px, 15vw, 74px); line-height: 0.87; }
  .palette-meta { align-items: start; flex-direction: column; gap: 12px; }
  .lock-hint { font-size: 10px; }
  .control-strip { align-items: flex-start; flex-direction: column; }
  .control-actions { flex-wrap: wrap; row-gap: 8px; }
  .site-footer { display: grid; gap: 7px; }
  .generate-button { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Pre-launch campaign: retain the laboratory visual system. */
h1 { letter-spacing: -0.055em; line-height: 0.94; font-size: clamp(46px, 7.1vw, 104px); }
.header-note { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.header-note a { color: inherit; text-underline-offset: 4px; }
.independence { margin: 0 0 28px; max-width: 920px; font-size: 12px; line-height: 1.6; color: #4b4b54; }
.independence a { color: inherit; text-underline-offset: 3px; }
.shared-notice { border: 1px solid var(--ink); padding: 15px 18px; font-size: 14px; background: #e3f4ee; }
[hidden] { display: none !important; }
.campaign-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; padding: 76px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.section-copy h2 { margin: 0 0 24px; max-width: 640px; font-size: clamp(33px, 4.1vw, 58px); line-height: 1.05; letter-spacing: -0.05em; }
.section-copy > p:not(.eyebrow) { max-width: 480px; font-size: 18px; line-height: 1.5; letter-spacing: -0.018em; }
.muted-heading { color: #696a70; }
.section-copy .platform-note { margin-top: 32px; font: 11px/1.8 var(--mono); letter-spacing: 0; }
.small-copy, .section-copy .small-copy { font-size: 12px !important; line-height: 1.6 !important; color: #55555f; letter-spacing: 0 !important; }
.share-workspace { min-width: 0; }
.share-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.share-selectors label, .caption-label { display: block; font: 11px/1.6 var(--mono); }
select, textarea { width: 100%; font: inherit; color: var(--ink); background: #faf9f4; border: 1px solid var(--line); border-radius: 0; }
select { margin-top: 6px; padding: 11px 9px; }
textarea { display: block; margin: 8px 0 18px; padding: 14px; font: 13px/1.6 var(--sans); resize: vertical; }
select:focus-visible, textarea:focus-visible { outline: 2px solid #0066ff; outline-offset: 3px; }
.card-preview-frame { min-height: 260px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); background: #e6e5de; gap: 12px; }
.card-preview-frame img { display: block; width: auto; max-width: 100%; height: auto; max-height: 350px; object-fit: contain; box-shadow: 0 10px 28px #16161d20; }
.card-preview-frame p { margin: 0; font: 11px/1.5 var(--mono); text-align: center; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.solid-button, .outline-button { display: inline-flex; justify-content: center; align-items: center; min-height: 45px; padding: 12px 16px; border: 1px solid var(--ink); border-radius: 0; font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: background 160ms ease, color 160ms ease; }
.solid-button { background: var(--ink); color: var(--paper); }
.outline-button { background: transparent; color: var(--ink); }
.solid-button:hover:not(:disabled), .outline-button:hover:not(:disabled) { background: var(--acid); color: var(--ink); }
button:disabled { cursor: wait; opacity: .5; }
.lesson-card, .launch-panel { padding: 30px; border: 1px solid var(--ink); background: #faf9f4; min-width: 0; align-self: start; }
.lesson-steps { margin: 0 0 26px; padding-left: 22px; font-size: 16px; line-height: 1.6; }
.lesson-steps li { padding-left: 7px; margin-bottom: 10px; }
.safety-note { padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; color: #55555f; }
.launch-section { border-bottom: 1px solid var(--ink); }
.launch-panel p { font-size: 16px; line-height: 1.6; }
.launch-panel .eyebrow { font-size: 11px; }
.launch-panel .solid-button { margin-top: 12px; }
@media (max-width: 820px) {
  .campaign-section { grid-template-columns: 1fr; gap: 30px; padding: 50px 0; }
  .share-workspace { width: 100%; max-width: 600px; }
  .section-copy h2 { font-size: 41px; }
  .section-copy > p:not(.eyebrow) { font-size: 17px; }
  .intro { gap: 30px; padding: 52px 0 32px; }
  .card-preview-frame img { max-height: 350px; }
}
@media (max-width: 520px) {
  h1 { font-size: clamp(43px, 12.4vw, 63px); line-height: .98; letter-spacing: -.055em; }
  .header-note { display: none; }
  .independence { font-size: 11px; margin-bottom: 20px; }
  .section-copy h2 { font-size: 35px; }
  .share-selectors { grid-template-columns: 1fr; gap: 10px; }
  .share-actions { gap: 8px; }
  .solid-button, .outline-button { font-size: 12px; padding: 12px 9px; }
  .lesson-card, .launch-panel { padding: 22px; }
  .card-preview-frame { padding: 16px; }
}

.privacy-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 12px; line-height: 1.6; }
.privacy-details summary { cursor: pointer; font-family: var(--mono); font-size: 11px; }
.privacy-details p { font-size: 12px; line-height: 1.6; }
.privacy-details a { color: inherit; text-underline-offset: 3px; }
.privacy-details summary:focus-visible { outline: 2px solid #0066ff; outline-offset: 3px; }

.destination-picker { margin-top: 24px; }
.destination-picker .eyebrow { margin-bottom: 10px; }
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.platform-button { display: flex; flex-direction: column; gap: 6px; justify-content: center; align-items: flex-start; min-height: 77px; border: 1px solid var(--ink); padding: 12px; background: #faf9f4; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; font: inherit; }
.platform-button strong { font-size: 14px; }
.platform-button span { font: 9px/1.5 var(--mono); color: #55555f; }
.platform-button:hover:not(:disabled) { background: #e3f4ee; }
@media (max-width: 520px) {
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
