/* =============================================================
   FTproof stylesheet — fullthrottle.ai design system
   -------------------------------------------------------------
   Foundation, component tokens, and selected building blocks
   are adopted verbatim from the ft-design-system skill so this
   app stays visually consistent with FTpricebook / FTchecker.
   Intentional deviations from the skill defaults are flagged
   inline with `// usability:` comments — the constraint here is
   that this is a frequently-used internal data-entry tool, so
   anything that delays input or competes with form labels was
   trimmed (Vanta dots background, long entry animations, the
   heavy hero block, heavy backdrop blur).
   ============================================================= */

:root {
  --bg-0: #060a12;
  --bg-1: #0b111a;
  --bg-2: #131c2a;
  --panel: rgba(13, 19, 28, 0.92);          /* usability: was 0.72 — denser forms read better */
  --panel-inner: rgba(6, 10, 18, 0.72);     /* usability: was 0.6 */
  --panel-border: rgba(0, 154, 168, 0.28);
  --panel-border-strong: rgba(0, 184, 199, 0.6);
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.12);
  --text: #f1f6fc;
  --text-dim: #a8b8cc;
  --text-faint: #6f8094;
  --teal: #009aa8;
  --teal-bright: #00b8c7;
  --teal-glow: rgba(0, 154, 168, 0.5);
  --teal-glow-soft: rgba(0, 154, 168, 0.18);
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --slate: #94a3b8;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --max-w: 980px;
  --ease-out: cubic-bezier(0.32, 0.72, 0.24, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

body {
  margin: 0;
  font-family: "helvetica-neue-lt-pro", -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 154, 168, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(0, 154, 168, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* usability: skipped Vanta dots — animation behind dense forms competes
   with label scanning. The static radial+linear gradient above carries
   the depth without the motion. */

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}
.site-header .ft-logo { width: 132px; height: auto; display: block; }

.header-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.header-link:hover {
  color: var(--text);
  border-color: var(--panel-border-strong);
  background: rgba(0, 154, 168, 0.06);
}

/* ---------- Page layout ---------- */
.site-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 8px 24px 60px;
}
.view {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* usability: dropped the 480ms fadeUp on .view — instant render = instant
   ability to start typing. Internal tool is opened many times daily. */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4px 4px;
}
.page-head .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin: 0;
  text-shadow: 0 0 18px rgba(0, 184, 199, 0.28);
}
.page-head h1 {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.page-head p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 660px;
}

/* ---------- Card (calc-card per design system) ---------- */
.calc-card {
  background: var(--panel);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  /* usability: blur was 20px in the design system; 6px keeps depth without
     hammering low-power GPUs on a page with many cards visible at once. */
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.calc-card h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-bright);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.calc-card h2 .opt {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-faint);
}
.calc-card .card-sub {
  color: var(--text-dim);
  margin: -6px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Form grid ---------- */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-1 { grid-template-columns: 1fr; }
@media (max-width: 720px) { .grid, .grid.cols-3 { grid-template-columns: 1fr; } }
.col-span-2 { grid-column: span 2 / span 2; }

label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 7px;
}
label .opt { color: var(--text-faint); font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 11.5px; }
label .req { color: var(--red); font-weight: 700; margin-left: 2px; letter-spacing: 0; }

/* ---------- Inputs ---------- */
input[type="text"],
input[type="date"],
input[type="search"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: rgba(11, 17, 26, 0.78);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 200ms var(--ease-out), box-shadow 240ms var(--ease-out), background 200ms var(--ease-out);
  appearance: none;
}
input:hover, textarea:hover, select:hover {
  border-color: rgba(0, 184, 199, 0.45);
  background: rgba(15, 22, 32, 0.85);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--panel-border-strong);
  box-shadow: 0 0 0 4px rgba(0, 184, 199, 0.14);
  background: rgba(15, 22, 32, 0.92);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
select option { background: var(--bg-1); color: var(--text); }
input[disabled], select[disabled], textarea[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Native date picker indicator: brand-tinted */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) hue-rotate(140deg) saturate(2);
  cursor: pointer;
  opacity: 0.8;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ---------- Date range pair ---------- */
.date-range {
  display: flex;
  align-items: stretch;
  background: rgba(11, 17, 26, 0.78);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 200ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.date-range:hover { border-color: rgba(0, 184, 199, 0.45); }
.date-range:focus-within {
  border-color: var(--panel-border-strong);
  box-shadow: 0 0 0 4px rgba(0, 184, 199, 0.14);
}
.date-range input[type="date"] {
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}
.date-range input[type="date"]:focus { box-shadow: none; background: transparent; }
.date-range input[type="date"]:first-of-type { border-right: 1px solid var(--hairline); }
.date-range .range-sep {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-faint);
  font-size: 14px;
  border-right: 1px solid var(--hairline);
  user-select: none;
}
.date-range button.range-clear {
  background: transparent;
  border: 0;
  color: var(--text-faint);
  padding: 0 12px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  border-left: 1px solid var(--hairline);
  transition: color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.date-range button.range-clear:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); }
.date-range.is-empty .range-clear { display: none; }

/* ---------- Tactic toggle pills ---------- */
/* usability: kept the pill row instead of the design system's .switch
   track-and-thumb because for 4 mutually-independent on/off choices, a
   horizontal pill row scans 3× faster than four switch rows. Styling
   below uses the same design tokens so they still feel on-brand. */
.toggle-row { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel-inner);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out),
              border-color 200ms var(--ease-out), box-shadow 240ms var(--ease-out),
              transform 160ms var(--ease-out);
}
.toggle-pill:hover {
  color: var(--text);
  border-color: var(--panel-border);
  background: rgba(0, 154, 168, 0.06);
}
.toggle-pill:active { transform: scale(0.98); }
.toggle-pill:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
.toggle-pill.is-on {
  background: rgba(0, 184, 199, 0.12);
  border-color: var(--panel-border-strong);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 184, 199, 0.16), 0 6px 18px rgba(0, 154, 168, 0.18);
}
.toggle-pill .pill-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline-strong);
  transition: background 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.toggle-pill.is-on .pill-dot {
  background: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(0, 184, 199, 0.22);
}
.toggle-pill .pill-glyph { display: inline-block; min-width: 14px; text-align: center; opacity: 0.85; }

/* ---------- Channel section (per-tactic card) ---------- */
.channel {
  background: var(--panel);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.channel-head {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-bright) 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}
.channel-head .glyph { width: 22px; display: inline-block; text-align: center; }
.channel-head .channel-remove {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out);
  font-family: inherit;
}
.channel-head .channel-remove:hover { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.3); }
.channel-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Dropzone ---------- */
.dropzone {
  background: var(--panel-inner);
  border: 1.5px dashed rgba(0, 184, 199, 0.28);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out);
  position: relative;
}
.dropzone:hover,
.dropzone.is-dragging {
  background: rgba(0, 154, 168, 0.07);
  border-color: var(--teal-bright);
}
.dropzone input[type="file"] { display: none; }
.dropzone .dz-title { font-weight: 600; color: var(--text); margin-bottom: 3px; font-size: 14px; }
.dropzone .dz-sub { color: var(--text-faint); font-size: 12px; }
.dropzone .dz-preview {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.dropzone .dz-file { font-size: 12px; color: var(--text-dim); }
.dropzone .dz-clear {
  background: transparent;
  border: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Thumbnail grid inside a multi-file dropzone */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  width: 100%;
}
.thumb {
  position: relative;
  background: rgba(11, 17, 26, 0.72);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.thumb img {
  max-height: 72px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}
.thumb-name {
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(6, 10, 18, 0.78);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.thumb-remove:hover { background: var(--red); }

/* ---------- Places autocomplete ---------- */
.autocomplete-wrap { position: relative; }
.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-1);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  z-index: 20;
  max-height: 320px;
  overflow: auto;
}
.suggestion {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--hairline);
}
.suggestion:last-child { border-bottom: 0; }
.suggestion:hover, .suggestion.is-active { background: rgba(0, 154, 168, 0.08); }
.suggestion .primary { font-weight: 600; font-size: 13px; color: var(--text); }
.suggestion .secondary { color: var(--text-faint); font-size: 12px; }

/* ---------- Buttons / CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out),
              transform 160ms var(--ease-out), box-shadow 220ms var(--ease-out),
              filter 160ms var(--ease-out);
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-bright) 100%);
  color: #fff;
  box-shadow: 0 6px 22px rgba(0, 154, 168, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 30px rgba(0, 154, 168, 0.48); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.98); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; filter: none; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--hairline-strong);
  color: var(--text-dim);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--panel-border-strong);
  background: rgba(0, 154, 168, 0.08);
}
.btn-link {
  background: transparent;
  color: var(--teal-bright);
  padding: 4px 0;
  font-family: inherit;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}

/* Action bar (Reset + Generate row) */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
}

/* ---------- Banners ---------- */
.banner {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid;
}
.banner.info {
  background: rgba(0, 184, 199, 0.08);
  color: var(--text-dim);
  border-color: var(--panel-border);
}
.banner.success {
  background: rgba(74, 222, 128, 0.08);
  color: #b7f0c9;
  border-color: rgba(74, 222, 128, 0.34);
}
.banner.error {
  background: rgba(248, 113, 113, 0.08);
  color: #ffd0d0;
  border-color: rgba(248, 113, 113, 0.36);
}
.banner.warning {
  background: rgba(251, 191, 36, 0.08);
  color: #ffe9b3;
  border-color: rgba(251, 191, 36, 0.36);
}

/* ---------- Validation ---------- */
.field-error {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 500;
}
.is-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16) !important;
}
.date-range.is-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16) !important;
}

/* ---------- Misc ---------- */
.row-flex { display: flex; gap: 12px; align-items: center; }
.tiny { font-size: 12px; color: var(--text-faint); }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 18px 20px 28px;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .site-header { padding: 14px 18px; }
  .site-header .ft-logo { width: 116px; }
  .calc-card { padding: 18px; }
  .page-head h1 { font-size: 22px; }
}

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