/* Light and dark themes, the language/theme switchers and the Feedback button. Loaded last on every page.
   Every page's own stylesheet uses the tokens below for its colors. Dark applies when the device is dark
   (prefers-color-scheme) unless the visitor picked Light, or when they picked Dark (ui.js sets <html data-theme>).
   The black hero scenes (.crew, .dig, .leads, black cards) are black in both themes on purpose. The phone and
   the sample email show the real email, so they stay light. Contrast is checked for both sets (AA, 4.5:1 for
   body text; the orange --hot is a fill color, text uses --hot-text). */
:root {
  --surface: #ffffff; --surface-2: #fbfbfd; --glass: rgba(255,255,255,.8);
  --nav-bg: rgba(250,250,252,.8); --nav-ink: rgba(0,0,0,.8);
  --hot-text: #bd4706; --hot-ink: #c4330a; --warn-ink: #8a3a0c; --ok-soft: #eef6ee; --ok-ink: #1a5c2e;
  --control: #b0b0b5; --switch-off: #e9e9ea;
  --pill-bg: rgba(210,210,215,.64); --dot: rgba(0,0,0,.42); --dot-on: rgba(0,0,0,.2); --dot-fill: rgba(0,0,0,.65);
  --faint: #76767b;
  --shadow-pop: 0 24px 60px -20px rgba(0,0,0,.35), 0 0 0 .5px rgba(0,0,0,.08);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000; --bg-2: #161617; --ink: #f5f5f7; --ink-2: #d2d2d7; --muted: #a1a1a6; --faint: #8e8e93; --hair: #424245;
  --blue: #0071e3; --blue-hover: #0a84ff; --link: #2997ff;
  --hot-soft: #3a2414; --ok: #30d158;
  --night-2: #1c1c1e; --concrete: #2c2c2e; --concrete-2: #3a3a3c; --steel: #a1a1a6; --rule: #48484a;
  --paint-soft: #0b2a4a; --paint-ink: #6cb4ff;
  --surface: #1c1c1e; --surface-2: #141416; --glass: rgba(22,22,23,.8);
  --nav-bg: rgba(22,22,23,.8); --nav-ink: rgba(255,255,255,.82);
  --hot-text: #ff8a4c; --hot-ink: #ff9f5a; --warn-ink: #ffb37a; --ok-soft: #10291a; --ok-ink: #7ee2a0;
  --control: #636366; --switch-off: #3a3a3c;
  --pill-bg: rgba(66,66,69,.72); --dot: rgba(255,255,255,.5); --dot-on: rgba(255,255,255,.25); --dot-fill: rgba(255,255,255,.8);
  --shadow-pop: 0 24px 60px -20px rgba(0,0,0,.8), 0 0 0 1px #38383a;
}
/* The same dark set when scripts are off. Keep it identical to the block above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #000000; --bg-2: #161617; --ink: #f5f5f7; --ink-2: #d2d2d7; --muted: #a1a1a6; --faint: #8e8e93; --hair: #424245;
    --blue: #0071e3; --blue-hover: #0a84ff; --link: #2997ff;
    --hot-soft: #3a2414; --ok: #30d158;
    --night-2: #1c1c1e; --concrete: #2c2c2e; --concrete-2: #3a3a3c; --steel: #a1a1a6; --rule: #48484a;
    --paint-soft: #0b2a4a; --paint-ink: #6cb4ff;
    --surface: #1c1c1e; --surface-2: #141416; --glass: rgba(22,22,23,.8);
    --nav-bg: rgba(22,22,23,.8); --nav-ink: rgba(255,255,255,.82);
    --hot-text: #ff8a4c; --hot-ink: #ff9f5a; --warn-ink: #ffb37a; --ok-soft: #10291a; --ok-ink: #7ee2a0;
    --control: #636366; --switch-off: #3a3a3c;
    --pill-bg: rgba(66,66,69,.72); --dot: rgba(255,255,255,.5); --dot-on: rgba(255,255,255,.25); --dot-fill: rgba(255,255,255,.8);
    --shadow-pop: 0 24px 60px -20px rgba(0,0,0,.8), 0 0 0 1px #38383a;
  }
}

/* Light in both themes: pictures of the real email, and the daylight truck scenes. */
.screen, .scrub.day, .mailframe {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #f5f5f7; --ink: #1d1d1f; --ink-2: #424245; --muted: #6e6e73; --faint: #76767b; --hair: #d2d2d7;
  --link: #0066cc; --hot-soft: #fff3e8; --surface: #ffffff; --hot-text: #bd4706; --hot-ink: #c4330a;
}
.scrub.day { color: var(--ink); }

/* Dark-only touches the tokens can't express. */
:root[data-theme="dark"] .logo i { background: #2c2c2e; }
:root[data-theme="dark"] .tile:not(.black), :root[data-theme="dark"] .card.light, :root[data-theme="dark"] .signup,
:root[data-theme="dark"] .j-list, :root[data-theme="dark"] .ask-card, :root[data-theme="dark"] .up-card, :root[data-theme="dark"] .pl-card,
:root[data-theme="dark"] .chat { box-shadow: 0 0 0 1px #2c2c2e; }
:root[data-theme="dark"] .pp { color: var(--ink); }
/* Outline buttons use the link blue: plain --blue text is under 4.5:1 on the grey bands and on dark cards. */
:is(.btn-ghost, .btn-outline) { color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
:is(.btn-ghost, .btn-outline):hover { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .logo i { background: #2c2c2e; } }

/* The hand-edited pages' own CSS lacks this rule, so their footer links ran together. */
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
/* Spanish labels run longer: keep nav pills on one line. */
nav .btn, .localnav .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-links { gap: 12px; }
  .nav-links .btn { padding: 0 10px; font-size: 11px; }
  nav .bsa-sw-btn[data-bsa-theme] { display: none; }  /* the footer has the theme picker */
  nav .logo { font-size: 13px; }
}

/* ---- language and theme switchers */
.bsa-sw { display: inline-flex; gap: 4px; align-items: center; }
.bsa-sw-btn { min-width: 28px; height: 26px; padding: 0 7px; border: 0; border-radius: 99px; background: transparent; color: var(--nav-ink);
  font: 600 11px/1 var(--f-body); letter-spacing: .02em; cursor: pointer; display: inline-grid; place-items: center; }
.bsa-sw-btn:hover { background: var(--pill-bg); color: var(--ink); }
.bsa-sw-btn svg { display: block; }
.bsa-prefs { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: .5px solid var(--hair); font-size: 12px; color: var(--muted); }
.bsa-prefs label { display: inline-flex; gap: 8px; align-items: center; }
.bsa-prefs select { font: 400 12px var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; padding: 4px 6px; }

/* ---- Feedback button and modal */
.fb-launch { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px 0 13px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--ink); color: var(--bg); font: 600 14px/1 var(--f-body); letter-spacing: -.01em; box-shadow: var(--shadow-pop); transition: transform .2s ease; }
.fb-launch:hover { transform: translateY(-1px); }
.fb-launch svg { flex: 0 0 auto; }
body:has(.sticky-cta.show) .fb-launch { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
body:has(.toast.show) .fb-launch { opacity: 0; pointer-events: none; }
@media (max-width: 560px) { .fb-launch { padding: 0 12px; min-height: 38px; } .fb-launch span { display: none; } }
@media print { .fb-launch, .bsa-sw, .bsa-prefs { display: none !important; } }

.fb-back { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; }
.fb-back[hidden] { display: none; }
.fb-box { width: min(640px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--ink); border-radius: 22px; box-shadow: var(--shadow-pop); text-align: left; }
.fb-hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: .5px solid var(--hair); flex-wrap: wrap; }
.fb-hd h2 { font: 700 19px var(--f-display); letter-spacing: -.02em; margin-right: auto; }
.fb-tabs { display: flex; gap: 4px; background: var(--bg-2); border-radius: 99px; padding: 3px; }
.fb-tabs button { border: 0; background: transparent; color: var(--ink); border-radius: 99px; padding: 7px 12px; font: 500 13px var(--f-body); cursor: pointer; }
.fb-tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.18); font-weight: 600; }
.fb-x { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.fb-x:hover { background: var(--bg-2); color: var(--ink); }
.fb-body { padding: 18px 20px 20px; overflow-y: auto; display: grid; gap: 14px; }
.fb-body p { margin: 0; }
.fb-body label { display: grid; gap: 6px; font: 600 14px var(--f-body); }
.fb-body label small { font-weight: 400; color: var(--muted); }
.fb-body select, .fb-body input, .fb-body textarea { width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--ink); background: var(--surface);
  border: 0; box-shadow: inset 0 0 0 1px var(--hair); border-radius: 12px; padding: 11px 13px; }
.fb-body textarea { resize: vertical; min-height: 110px; }
.fb-body textarea.fb-spec { min-height: 220px; font: 400 14px/1.5 var(--f-num); }
.fb-body select:focus, .fb-body input:focus, .fb-body textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.fb-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.fb-row .btn { min-height: 40px; font-size: 15px; padding: 0 18px; }
.fb-row .btn:disabled { opacity: .55; cursor: default; }
.fb-hint { font-size: 14px; color: var(--muted); line-height: 1.45; }
.fb-msg { padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-ink); font-size: 15px; line-height: 1.45; }
.fb-msg.bad { background: var(--hot-soft); color: var(--warn-ink); }
.fb-list { display: grid; gap: 8px; }
.fb-item { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.fb-item b { font: 600 15px/1.35 var(--f-body); }
.fb-item small { color: var(--muted); font-size: 13px; }
.fb-item .fb-row { justify-content: flex-start; margin-top: 4px; }
.fb-tag { display: inline-block; font: 600 12px/1 var(--f-body); padding: 5px 8px; border-radius: 99px; background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--hair); }
.fb-tag.open { color: var(--link); } .fb-tag.done { color: var(--ok-ink); background: var(--ok-soft); box-shadow: none; }
.fb-tag.high { color: var(--hot-ink); background: var(--hot-soft); box-shadow: none; }
.fb-qs { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.fb-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--hair); border-top-color: var(--blue); animation: fbspin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes fbspin { to { transform: rotate(360deg); } }
@media (max-width: 560px) { .fb-back { padding: 0; place-items: end stretch; } .fb-box { max-height: 92vh; border-radius: 22px 22px 0 0; } }
/* write-up as plain sections: a name and a text box each, add or remove */
.fb-secs { display: grid; gap: 10px; }
.fb-sec { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--bg-2); }
.fb-sec-hd { display: flex; gap: 8px; align-items: center; }
.fb-body .fb-sec-h { font-weight: 600; background: transparent; box-shadow: none; padding: 4px 2px; border-radius: 8px; }
.fb-body .fb-sec-h:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue); padding: 4px 8px; }
.fb-body .fb-sec-t { min-height: 64px; background: var(--surface); resize: vertical; }
.fb-sec-x { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.fb-sec-x:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.fb-sec-x:disabled { opacity: .3; cursor: default; }
/* My requests: where each one stands */
.fb-stages { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.fb-stage { font: 600 12px/1 var(--f-body); padding: 6px 9px; border-radius: 99px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }
.fb-stage.on { color: var(--ok-ink); background: var(--ok-soft); box-shadow: none; }
.fb-stage.now { color: var(--surface); background: var(--ok-ink); }
.fb-stage.declined { color: var(--warn-ink); background: var(--hot-soft); }
.fb-item.fresh { box-shadow: inset 0 0 0 2px var(--blue); }
.fb-reply { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.fb-reply small { display: block; font: 600 11px var(--f-body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fb-reply p { margin: 4px 0 0; white-space: pre-wrap; font-size: 15px; }
/* a dot on the Feedback button when one of your requests changed */
.fb-launch { position: fixed; }
.fb-dot { position: absolute; top: 4px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 2px var(--ink); }
.fb-dot[hidden] { display: none; }
