/* ═════════════════════════════════════════════════════
   APL ARTWORK PROMPT GENERATOR
   Visual identity per APL Brand Guidelines v2.0 (Feb 2026)
   ═════════════════════════════════════════════════════ */

:root {
  /* APL brand colours */
  --apl-green-dark: #208420;
  --apl-green: #0ba244;
  --apl-green-bright: #8ff934;
  --apl-black: #000000;

  /* Surface palette built around brand */
  --bg-0: #000000;
  --bg-1: #0a0d0a;
  --bg-2: #11171a;
  --bg-3: #19211f;
  --surface: #0f1411;
  --surface-2: #161e1b;
  --line: rgba(143, 249, 52, 0.12);
  --line-strong: rgba(143, 249, 52, 0.32);

  /* Type */
  --text: #f3faf2;
  --text-soft: #b3c2b6;
  --text-dim: #6e7c70;
  --text-on-bright: #051908;

  /* Accents */
  --gradient-apl: linear-gradient(135deg, #0ba244 0%, #8ff934 100%);
  --gradient-apl-deep: linear-gradient(135deg, #208420 0%, #0ba244 50%, #8ff934 100%);
  --danger: #ff5b5b;
  --warn: #ffc24d;

  /* Shape */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadow */
  --shadow-glow: 0 0 0 1px rgba(143, 249, 52, 0.15), 0 24px 60px -20px rgba(11, 162, 68, 0.4);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -22px rgba(0, 0, 0, 0.9);

  /* Type scale */
  --font-display: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow Condensed', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ─────────── RESET ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: 0.005em; }
p { margin: 0; }
button { font-family: inherit; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }

a { color: var(--apl-green-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─────────── AMBIENT BG ─────────── */
.bg-effects {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(143, 249, 52, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 249, 52, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}
.bg-glow-1 {
  width: 540px; height: 540px;
  top: -180px; left: -160px;
  background: radial-gradient(circle, #0ba244 0%, transparent 70%);
}
.bg-glow-2 {
  width: 620px; height: 620px;
  top: 38%; right: -240px;
  background: radial-gradient(circle, #8ff934 0%, transparent 70%);
  opacity: 0.18;
}

/* ─────────── LAYOUT ─────────── */
.page { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 28px 80px; }

/* ─────────── HEADER ─────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 11, 9, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-mark {
  display: flex; align-items: center; gap: 14px;
  color: var(--text); text-decoration: none;
}
.brand-mark:hover { text-decoration: none; }
.brand-mark img { display: block; height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line-1 {
  font-family: var(--font-display);
  font-weight: 900; font-style: italic;
  font-size: 22px;
  letter-spacing: 0.5px;
  background: var(--gradient-apl);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.brand-line-2 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 3px;
}
.version-pill {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--apl-green-bright);
  background: rgba(143, 249, 52, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─────────── HERO ─────────── */
.hero {
  padding: 84px 0 56px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--apl-green-bright);
  background: rgba(143, 249, 52, 0.05);
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900; font-style: italic;
  text-transform: uppercase;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 auto 24px;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: keep-all;
  overflow-wrap: normal;
}
.gradient-text {
  background: var(--gradient-apl);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 60ch;
  margin: 0 auto 32px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-apl);
  color: var(--text-on-bright);
  box-shadow: 0 8px 24px -8px rgba(11, 162, 68, 0.7);
}
.btn-primary:hover { box-shadow: 0 12px 32px -8px rgba(11, 162, 68, 0.85); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(143, 249, 52, 0.06); }

/* Secondary: outlined green, mid-weight */
.btn-secondary {
  background: rgba(143, 249, 52, 0.06);
  color: var(--apl-green-bright);
  border-color: var(--apl-green-bright);
}
.btn-secondary:hover {
  background: rgba(143, 249, 52, 0.14);
  box-shadow: 0 8px 24px -10px rgba(143, 249, 52, 0.5);
}

/* Launch: filled green-to-dark gradient — pulls the eye as the "go" action */
.btn-launch {
  background: linear-gradient(135deg, #0ba244 0%, #208420 100%);
  color: #fff;
  border-color: rgba(143, 249, 52, 0.4);
  box-shadow: 0 8px 24px -10px rgba(11, 162, 68, 0.6);
}
.btn-launch:hover {
  background: linear-gradient(135deg, #0dbb4f 0%, #259125 100%);
  box-shadow: 0 12px 32px -10px rgba(11, 162, 68, 0.8);
}
.btn-launch[disabled] {
  background: transparent;
  border-color: var(--line);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-launch[disabled]:hover { transform: none; }

.btn-lg { padding: 18px 32px; font-size: 16px; }
.btn-sm { padding: 9px 14px; font-size: 12px; letter-spacing: 0.06em; }

/* ─────────── HOW IT WORKS ─────────── */
.section-title {
  font-family: var(--font-display);
  font-weight: 900; font-style: italic;
  text-transform: uppercase;
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: 0.005em;
  margin-bottom: 18px;
}
.how { padding: 32px 0 16px; }
.how-steps {
  list-style: none;
  padding: 0; margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.how-steps li {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.how-steps li::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gradient-apl);
  opacity: 0; transition: opacity 0.3s;
  border-radius: var(--r-lg);
  z-index: -1;
}
.how-num {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--apl-green-bright);
  display: block;
  margin-bottom: 14px;
}
.how-steps h3 {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 18px;
  margin-bottom: 6px;
}
.how-steps p { color: var(--text-soft); font-size: 15px; }

/* ─────────── GENERATOR / FORM ─────────── */
.generator { padding: 56px 0 24px; }
.gen-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap; gap: 10px;
}

.brief-form {
  display: flex; flex-direction: column;
  gap: 28px;
}

.q-block {
  background: linear-gradient(180deg, var(--surface), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px 28px 26px;
  position: relative;
  box-shadow: var(--shadow-card);
}
.q-legend {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: 0.005em;
  margin-bottom: 6px;
}
.q-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient-apl);
  color: var(--text-on-bright);
  font-family: var(--font-mono);
  font-style: normal; font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.q-tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.08em;
  font-weight: 500; font-style: normal;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(143, 249, 52, 0.12);
  color: var(--apl-green-bright);
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}
.q-help {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 18px;
  max-width: 70ch;
}
.q-help-inline { color: var(--text-dim); font-size: 13px; }

/* ─── Radio cards ─── */
.radio-grid { display: grid; gap: 12px; }
.radio-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.radio-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.radio-card { cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card-inner {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
  height: 100%;
}
.radio-card-inner strong {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  font-size: 16px;
}
.radio-card-inner span { color: var(--text-soft); font-size: 14px; line-height: 1.45; }
.radio-card:hover .radio-card-inner { border-color: var(--line-strong); background: var(--surface-2); }
.radio-card input:checked + .radio-card-inner {
  border-color: var(--apl-green-bright);
  background: linear-gradient(180deg, rgba(143, 249, 52, 0.1), rgba(11, 162, 68, 0.05));
  box-shadow: 0 0 0 1px var(--apl-green-bright), 0 12px 30px -12px rgba(143, 249, 52, 0.4);
}
.radio-card input:focus-visible + .radio-card-inner { outline: 2px dashed var(--apl-green-bright); outline-offset: 3px; }

/* ─── Theme cards (radio-card with visual swatch sample) ─── */
.theme-card-inner {
  flex-direction: row !important;
  align-items: center;
  gap: 14px !important;
  padding: 12px 14px !important;
}
.theme-swatch {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3), 0 4px 14px -6px rgba(0,0,0,0.6);
  background: #222;
  position: relative;
  overflow: hidden;
}
.theme-swatch::after {
  /* subtle inner highlight to give a cinematic feel */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}
.theme-swatch-custom::after { background: none; }
.theme-text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; /* allows the text to truncate inside flex */
}
.theme-text strong {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  font-size: 15px;
  line-height: 1.15;
}
.theme-text span {
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.35;
}
.theme-card input:checked + .theme-card-inner .theme-swatch {
  border-color: rgba(143, 249, 52, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3), 0 0 0 2px rgba(143, 249, 52, 0.35), 0 6px 18px -6px rgba(0,0,0,0.6);
}

/* ─── Fields ─── */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-inline { margin-top: 14px; }
.field-label {
  font-family: var(--font-display);
  font-weight: 600; font-style: italic;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}
.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-0);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--apl-green-bright);
  box-shadow: 0 0 0 3px rgba(143, 249, 52, 0.15);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }

/* ─── Event slots ─── */
.event-slots { display: flex; flex-direction: column; gap: 18px; }
.event-slot {
  background: var(--bg-0);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 18px;
  position: relative;
}
.event-slot-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.event-slot-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(143, 249, 52, 0.14);
  color: var(--apl-green-bright);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
}
.event-slot-title {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 15px;
}
.sub-heading {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 16px;
  margin: 0 0 6px;
}

/* ─── Schedule table ─── */
.schedule-section { margin-top: 24px; }
.schedule-head { margin-bottom: 12px; }
.schedule-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-0);
}
.schedule-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.schedule-table th,
.schedule-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.schedule-table th {
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  font-size: 11px;
  background: var(--bg-1);
}
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}
.schedule-table input:hover { border-color: var(--line); }
.schedule-table input:focus { border-color: var(--apl-green-bright); background: var(--bg-1); }
.schedule-table td.col-num {
  font-family: var(--font-mono);
  color: var(--text-dim);
  width: 32px;
  font-size: 12px;
}
.schedule-table th.col-num { width: 32px; }

/* ─── Chip grid (hero element) ─── */
.chip-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: var(--bg-1);
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.chip:has(input:checked) {
  border-color: var(--apl-green-bright);
  background: var(--gradient-apl);
  color: var(--text-on-bright);
}

/* ─── Checkbox grid (formats) ─── */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.check-card { cursor: pointer; }
.check-card input { position: absolute; opacity: 0; pointer-events: none; }
.check-card-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.check-mark {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg-0);
  transition: background 0.15s, border-color 0.15s;
}
.check-mark svg { display: none; }
.check-card input:checked ~ .check-card-inner .check-mark {
  background: var(--gradient-apl);
  border-color: var(--apl-green-bright);
}
.check-card input:checked ~ .check-card-inner .check-mark svg { display: block; }
.check-card input:checked ~ .check-card-inner {
  border-color: var(--apl-green-bright);
  background: rgba(143, 249, 52, 0.06);
}
.check-card-inner strong {
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.check-card-inner small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ─── Zone picker ─── */
.zone-picker { display: flex; justify-content: center; padding: 8px 0; }
.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  grid-template-rows: repeat(3, 72px);
  gap: 6px;
  background: var(--bg-0);
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.zone-cell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.zone-cell:hover { border-color: var(--apl-green-bright); color: var(--text); }
.zone-cell input { position: absolute; opacity: 0; pointer-events: none; }
.zone-cell:has(input:checked) {
  border-style: solid;
  border-color: var(--apl-green-bright);
  background: var(--gradient-apl);
  color: var(--text-on-bright);
}
.zone-center {
  cursor: default;
  border-style: solid;
  border-color: var(--line);
  background: rgba(143, 249, 52, 0.04);
  color: var(--text-dim);
}
.zone-center:hover { border-color: var(--line); color: var(--text-dim); }

/* Simplified 5-cell layout: top L/C/R, center artwork, bottom-center */
.zone-grid-simple .zone-cell:nth-child(1) { grid-column: 1; grid-row: 1; } /* top-left */
.zone-grid-simple .zone-cell:nth-child(2) { grid-column: 2; grid-row: 1; } /* top-center */
.zone-grid-simple .zone-cell:nth-child(3) { grid-column: 3; grid-row: 1; } /* top-right */
.zone-grid-simple .zone-cell:nth-child(4) { grid-column: 2; grid-row: 2; } /* artwork center */
.zone-grid-simple .zone-cell:nth-child(5) { grid-column: 2; grid-row: 3; } /* bottom-center */

/* ─── Form actions ─── */
.form-actions { display: flex; justify-content: center; padding: 8px 0 0; }

/* ─────────── OUTPUT ─────────── */
.output { padding: 32px 0; scroll-margin-top: 100px; }
.output-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap; gap: 12px;
}
#outputCountSuffix { font-style: italic; color: var(--text-soft); margin-left: 8px; font-size: 0.7em; }
.output-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
}
.meta-tag {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.meta-tag.accent {
  border-color: var(--apl-green-bright);
  background: rgba(143, 249, 52, 0.08);
  color: var(--apl-green-bright);
}

.output-cards { display: flex; flex-direction: column; gap: 18px; }
.output-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.output-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.output-card-title {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.005em;
  display: flex; align-items: center; gap: 10px;
}
.output-card-title .badge {
  font-family: var(--font-mono);
  font-style: normal; font-weight: 500;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(143, 249, 52, 0.12);
  color: var(--apl-green-bright);
  letter-spacing: 0.04em;
}
.output-textarea {
  width: 100%;
  min-height: 280px;
  padding: 18px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  white-space: pre-wrap;
}
.output-textarea:focus { border-color: var(--apl-green-bright); }

/* Action row under prompt — 3 single-purpose buttons */
.action-btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.action-btn {
  width: 100%;
  padding: 14px 16px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .action-btn-row {
    grid-template-columns: 1fr;
  }
  .action-btn {
    padding: 14px 18px;
  }
}

/* Legacy alias — keep in case referenced elsewhere */
.copy-btn-row {
  display: flex; gap: 10px; flex-wrap: wrap;
}

/* ─── Logo card ─── */
.logo-card { margin-top: 28px; }
.logo-card-inner {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--apl-green-bright);
  background: linear-gradient(135deg, rgba(11, 162, 68, 0.12), rgba(143, 249, 52, 0.06));
  box-shadow: 0 0 0 1px rgba(143, 249, 52, 0.1), 0 30px 60px -30px rgba(143, 249, 52, 0.4);
}
/* APL Million card — gold/purple accent per brand colours */
.logo-card-million .logo-card-inner {
  border-color: #fde790;
  background: linear-gradient(135deg, rgba(253, 231, 144, 0.10), rgba(107, 44, 145, 0.10));
  box-shadow: 0 0 0 1px rgba(253, 231, 144, 0.12), 0 30px 60px -30px rgba(107, 44, 145, 0.4);
}
.logo-card-million h3 { color: #fde790; }
.logo-card-million .btn-primary {
  background: linear-gradient(135deg, #fde790 0%, #c9a85a 100%);
  color: #1A0E28;
  box-shadow: 0 8px 24px -8px rgba(253, 231, 144, 0.5);
}
.logo-card-million .btn-primary:hover {
  box-shadow: 0 12px 32px -8px rgba(253, 231, 144, 0.7);
}
.logo-preview {
  flex-shrink: 0;
  width: 130px; height: 96px;
  border-radius: var(--r-md);
  background: #000;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.logo-preview-million {
  background: radial-gradient(ellipse at 50% 60%, #1A0E28 0%, #000 100%);
  border-color: rgba(253, 231, 144, 0.3);
}
.logo-preview img { max-width: 100%; max-height: 100%; height: auto; width: auto; }
.logo-card-text { flex: 1; min-width: 0; }
.logo-card h3 {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 22px;
  margin-bottom: 8px;
}
.logo-card p { color: var(--text-soft); font-size: 15px; margin-bottom: 14px; }
.logo-instructions {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.55;
}
.logo-instructions code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(143, 249, 52, 0.08);
  color: var(--apl-green-bright);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ─── Brand reminder ─── */
.brand-reminder {
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(143, 249, 52, 0.04), transparent);
}
.brand-reminder strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--apl-green-bright);
  letter-spacing: 0.04em;
}
.brand-reminder ul {
  margin: 0; padding-left: 22px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}
.brand-reminder em {
  font-style: italic;
  color: var(--text);
  background: rgba(143, 249, 52, 0.08);
  padding: 0 4px;
  border-radius: 3px;
}

/* ─────────── BRAND RULES PANEL ─────────── */
.brand-rules { padding: 56px 0 24px; }
.rules-intro {
  color: var(--text-soft);
  margin-bottom: 24px;
  max-width: 70ch;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.rule-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.rule-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 16px;
}
.rule-allow .rule-icon { background: rgba(143, 249, 52, 0.15); color: var(--apl-green-bright); }
.rule-deny .rule-icon { background: rgba(255, 91, 91, 0.15); color: var(--danger); }
.rule-rule .rule-icon { background: rgba(255, 194, 77, 0.15); color: var(--warn); }
.rule-card h3 {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 17px;
  margin-bottom: 12px;
  letter-spacing: 0.005em;
}
.rule-card ul {
  margin: 0; padding-left: 18px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}
.rule-tagline {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 0.005em;
  line-height: 1.1;
  background: var(--gradient-apl);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.rule-foot { color: var(--text-soft); font-size: 13px; line-height: 1.55; }

/* ─────────── USEFUL LINKS ─────────── */
.useful-links { padding: 24px 0; }
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.link-card {
  display: block;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: border-color 0.2s ease, transform 0.18s ease, background 0.2s ease;
}
.link-card:hover {
  border-color: var(--apl-green-bright);
  transform: translateY(-2px);
  background: var(--surface-2);
  text-decoration: none;
}
.link-card h3 {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  font-size: 18px;
  margin-bottom: 6px;
}
.link-card p { color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.link-arrow {
  position: absolute; top: 22px; right: 22px;
  color: var(--apl-green-bright);
  font-size: 20px;
  transition: transform 0.2s;
}
.link-card:hover .link-arrow { transform: translateX(4px); }

/* ─────────── FOOTER ─────────── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 28px 0 36px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
}
.footer-visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(143, 249, 52, 0.03);
  color: var(--text-soft);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.footer-visit:hover {
  border-color: var(--apl-green-bright);
  background: rgba(143, 249, 52, 0.08);
  color: var(--text);
  text-decoration: none;
}
.footer-visit img {
  height: 18px;
  width: auto;
  opacity: 0.95;
}
.footer-visit strong {
  color: var(--apl-green-bright);
  font-weight: 700;
}
.footer-note {
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ─────────── TOAST ─────────── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translate(-50%, 30px);
  background: var(--text-on-bright);
  background: linear-gradient(135deg, #0ba244, #8ff934);
  color: var(--text-on-bright);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  box-shadow: 0 16px 40px -10px rgba(11, 162, 68, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 700px) {
  .page { padding: 0 20px 60px; }
  .header-inner { padding: 12px 20px; gap: 10px; }
  .brand-line-2 { font-size: 11px; }
  .version-pill { font-size: 10px; padding: 5px 8px; }
  .footer-inner { padding: 0 20px; flex-direction: column; align-items: flex-start; }
  .hero { padding: 56px 0 36px; }
  .hero-title { font-size: clamp(34px, 9.5vw, 56px); }
  .q-block { padding: 22px 18px; }
  .q-legend { font-size: 18px; gap: 10px; }
  .q-num { width: 28px; height: 28px; font-size: 13px; }
  .logo-card-inner { flex-direction: column; gap: 18px; }
  .logo-preview { width: 110px; height: 80px; }
  .zone-grid { grid-template-columns: repeat(3, 78px); grid-template-rows: repeat(3, 58px); }
  .zone-cell { font-size: 10px; }
}

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

/* Smooth reveal on form sections */
.q-block {
  animation: revealUp 0.5s ease backwards;
}
.q-block:nth-child(1) { animation-delay: 0.05s; }
.q-block:nth-child(2) { animation-delay: 0.1s; }
.q-block:nth-child(3) { animation-delay: 0.15s; }
.q-block:nth-child(4) { animation-delay: 0.2s; }
.q-block:nth-child(5) { animation-delay: 0.25s; }
.q-block:nth-child(6) { animation-delay: 0.3s; }
.q-block:nth-child(7) { animation-delay: 0.35s; }
.q-block:nth-child(8) { animation-delay: 0.4s; }

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