:root {
  /* Lovable design system — different accent (safari green → teal) */
  --bg: #ffffff;
  --bg-warm: #faf9f6;
  --surface: #f4f5f8;
  --text: #1a1a23;              /* all black text */
  --muted: #6b6e7d;             /* gray secondary text */
  --line: rgba(0, 0, 0, 0.06);  /* 6% black hairline */
  --line-strong: rgba(0, 0, 0, 0.12);
  --accent-start: #16a34a;      /* safari green */
  --accent-end: #0d9488;        /* teal */
  --accent-mid: #2fbf6e;
  --bad: #dc2626;
  --warn: #b45309;
  --ok: #16a34a;
  --radius: 24px;               /* Lovable card radius */
  --radius-btn: 14px;           /* Lovable button radius */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --brand-gradient: linear-gradient(90deg, #15803d 0%, #0f766e 100%); /* original hues one step darker so white button text meets AA (4.6:1 and 5.4:1) */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* The header is fixed, so every programmatic scroll (anchor jumps, scrollIntoView, focusing the
   chat box on a phone) must stop below it. Without this the element being scrolled to ends up
   underneath the header: on a 408px-wide viewport that hid the chat input entirely. */
html { scroll-padding-top: 86px; }
#chat-shell, .chat-shell, #chat-input, .prompt-shell { scroll-margin-top: 86px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.accent { color: var(--accent-start); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }

h1, h2, h3, h4 { font-family: var(--font-sans); letter-spacing: -0.02em; color: var(--text); }

/* ---------------- topbar ---------------- */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 32px;
  border-bottom: 0;
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: -0.03em; }
/* text-to-text morph: a19i.com -> automated cyber safari */
.brand-text {
  display: inline-block; white-space: nowrap;
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease, letter-spacing 0.45s ease;
}
.brand-text.morphing { opacity: 0; transform: translateY(-6px); filter: blur(6px); }
.brand-text.morphed { font-size: 0.92rem; letter-spacing: -0.01em; font-weight: 700; }
.topbar nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.topbar nav a:hover { color: var(--text); }
/* DeepSeek-style nav: plain text that becomes a rounded pill on hover */
.topbar nav a.nav-link {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.topbar nav a.nav-link:hover {
  color: var(--text);
  background: rgba(26, 26, 35, 0.07);
  border-color: rgba(26, 26, 35, 0.10);
}
.spacer { flex: 1; }

/* ---------------- buttons: DeepSeek-style rounded pills ---------------- */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--brand-gradient);
  color: #ffffff;
  border: 0; border-radius: 999px;
  padding: 11px 22px; font-weight: 600; text-decoration: none; font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.22);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(22, 163, 74, 0.28); opacity: 0.97; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { border-color: rgba(0, 0, 0, 0.25); box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn.big { padding: 15px 30px; font-size: 1.05rem; }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }

/* ---------------- hero (first screen: ONLY the input, everything else below the fold) ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  /* Centre with auto margins on .hero-inner, not align-items: center. Once the chat panel grows
     taller than the viewport, flex centring overflows in both directions and pushes the top of the
     conversation up behind the fixed header, where it cannot be read or clicked. */
  align-items: flex-start;
  justify-content: center;
  padding: 90px 24px 60px;
  text-align: center;
  /* white at the very top/bottom so no divider line against menu and next section */
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-warm) 45%, #ffffff 100%);
}
.hero-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.elephant {
  width: 104vw; aspect-ratio: 4 / 3;
  margin-top: 6%;
  background: url('/elephant.png') center / contain no-repeat;
  filter: blur(24px);
  opacity: 0.55;
}

.hero-inner { position: relative; z-index: 1; max-width: 1140px; margin: auto; width: 100%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 7px 16px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gradient); box-shadow: 0 0 10px rgba(22, 163, 74, 0.5); }

.hero h1 {
  max-width: 960px; margin: 26px auto 18px;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; color: var(--text);
}
.grad-text { color: inherit; background: none; -webkit-background-clip: initial; background-clip: initial; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 30px; }
.hero-lead { max-width: 600px; margin: 0 auto 14px; font-size: 1.12rem; line-height: 1.5; }
/* One quiet line of plain phrases, not boxed badges — the four benefits at a glance without clutter. */
.hero-tagline { margin: 0 auto 22px; max-width: 680px; color: var(--muted); font-size: 0.95rem; font-weight: 500; line-height: 1.6; }
.hero-tagline .dot { margin: 0 10px; opacity: 0.45; }

/* ---------------- agent chat (Lovable prompt-bar pattern) ---------------- */
.chat-shell {
  max-width: 960px; margin: 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  text-align: left;
}
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.chat-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  background: var(--brand-gradient);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.chat-head .who { flex: 1; }
.chat-head .who b { display: block; font-size: 0.95rem; color: var(--text); letter-spacing: -0.01em; }
.chat-head .who span { color: var(--muted); font-size: 0.78rem; display: flex; align-items: center; gap: 6px; }
.chat-head .who .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-start); box-shadow: 0 0 8px rgba(22, 163, 74, 0.7); display: inline-block; }

.chat-msgs {
  min-height: 300px; max-height: 380px; overflow-y: auto;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(26, 26, 35, 0.08);
}
.msg { display: flex; gap: 9px; max-width: 86%; }
.msg .avatar {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  background: var(--brand-gradient);
  margin-top: 2px;
}
.msg .bubble {
  padding: 12px 16px; border-radius: 20px;
  font-size: 0.94rem; line-height: 1.5;
  animation: pop 0.22s ease;
  color: var(--text);
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
/* bubbles match the prompt shell: warm card + visible hairline border, fully rounded */
.msg.agent .bubble { background: var(--bg-warm); border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: 0 2px 10px rgba(26, 26, 35, 0.04); }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble {
  background: var(--text); color: #ffffff; font-weight: 600;
  border: 0; border-radius: 20px;
}
.msg.user .avatar { display: none; }
/* monochrome message accents: black text, gray for secondary */
.msg .bubble .g, .msg .bubble .a, .msg .bubble b { color: inherit; font-weight: 600; }
.msg .bubble .dim { color: var(--muted); }
.msg.user .bubble .dim { color: rgba(255, 255, 255, 0.75); }

.typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; background: var(--surface); border: 0; border-radius: 16px; border-top-left-radius: 6px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
.typing-note { margin-left: 6px; color: var(--muted); font-size: 0.9rem; line-height: 1.2; align-self: center; }
.typing-note:empty { display: none; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.chat-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Lovable-style prompt: textarea on top, buttons UNDER the text */
.prompt-shell {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 16px 16px 12px;
  position: relative;
  box-shadow: 0 10px 30px rgba(26, 26, 35, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.prompt-shell:focus-within { border-color: var(--accent-start); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }
.prompt-shell textarea {
  width: 100%; border: 0; outline: none; background: transparent;
  resize: none; font-family: var(--font-sans); font-size: 1.05rem; line-height: 1.5;
  color: var(--text); padding: 4px 6px; min-height: 52px;
}
.prompt-shell textarea::placeholder { color: var(--muted); }
.prompt-toolbar { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.prompt-toolbar .spacer { flex: 1; }
/* attachments */
.attach-row { display: none; flex-wrap: wrap; gap: 6px; margin: 8px 4px 0; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 4px 10px; font-size: 0.8rem; color: var(--text);
}
.attach-x { border: 0; background: transparent; color: var(--muted); font-size: 0.95rem; cursor: pointer; padding: 0 2px; }
.attach-x:hover { color: var(--text); }
/* circular icon button, Lovable-style */
.chip-add {
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.chip-add:hover { background: var(--surface); color: var(--text); }
/* "+" popover menu */
.add-menu {
  position: absolute; left: 0; bottom: 46px; z-index: 30;
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.16), rgba(255, 255, 255, 0.94));
  border: 1.5px solid rgba(22, 163, 74, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px; padding: 8px; min-width: 260px;
  box-shadow: 0 16px 40px rgba(22, 163, 74, 0.18);
  display: flex; flex-direction: column; gap: 2px;
}
.add-menu button {
  text-align: left; border: 0; background: transparent;
  color: var(--text); font-size: 0.9rem; font-weight: 500;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;

  transition: background-color 0.15s ease, box-shadow 0.15s ease;}
.add-menu button:hover { background: rgba(120, 120, 128, 0.18); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.35); }
.add-email-row { display: flex; gap: 6px; padding: 8px 6px 6px; }
.add-email-row input {
  flex: 1; min-width: 0; margin: 0; padding: 8px 10px;
  font-size: 0.85rem; border: 1px solid var(--line-strong); border-radius: 10px;
}
.add-email-row button {
  border: 0; border-radius: 10px; padding: 8px 12px;
  background: var(--brand-gradient); color: #fff; font-weight: 600; cursor: pointer;
}
.add-email-row button:hover { background: var(--brand-gradient); opacity: 0.92; }
.add-email-row.hidden { display: none; }
/* "..." chat menu */
.chat-menu {
  position: absolute; right: 44px; bottom: 46px; z-index: 30;
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.16), rgba(255, 255, 255, 0.94));
  border: 1.5px solid rgba(22, 163, 74, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px; padding: 8px; min-width: 200px;
  box-shadow: 0 16px 40px rgba(22, 163, 74, 0.18);
  display: flex; flex-direction: column; gap: 2px;
}
.chat-menu button {
  text-align: left; border: 0; background: transparent;
  color: var(--text); font-size: 0.9rem; font-weight: 500;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;

  transition: background-color 0.15s ease, box-shadow 0.15s ease;}
.chat-menu button:hover { background: rgba(120, 120, 128, 0.18); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.35); }
.chat-menu.hidden { display: none; }
/* compliance multi-select popover */
.comp-menu {
  position: absolute; left: 44px; bottom: 46px; z-index: 30;
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.16), rgba(255, 255, 255, 0.94));
  border: 1.5px solid rgba(22, 163, 74, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px; padding: 8px; min-width: 180px;
  box-shadow: 0 16px 40px rgba(22, 163, 74, 0.18);
  display: flex; flex-direction: column; gap: 2px;
}
.comp-menu label {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); font-size: 0.9rem; font-weight: 500;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; margin: 0;

  transition: background-color 0.15s ease, box-shadow 0.15s ease;}
.comp-menu label:hover { background: rgba(120, 120, 128, 0.18); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.35); }
.comp-menu input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--ink-2); }
.comp-menu.hidden { display: none; }
#compliance-btn { font-size: 0.8rem; font-weight: 700; width: auto; min-width: 40px; padding: 0 10px; border-radius: 999px; }
/* print/export chat */
.print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area {
    display: block; position: absolute; left: 0; top: 0; width: 100%;
    padding: 24px; background: #ffffff; color: #000000;
  }
  .print-area .p-head { margin-bottom: 16px; font-size: 1rem; }
  .print-area .p-bubble {
    margin-bottom: 10px; padding: 10px 14px;
    border: 1px solid #d9d9d9; border-radius: 12px; font-size: 0.85rem;
    color: #111111; white-space: pre-wrap;
  }
  .print-area .p-user { background: #111111; color: #ffffff; }
  /* The chat's own list styling is scoped to .msg .bubble, which the print area is not, so without
     these the risk and plan lists printed as default bullets with each heading glued to its
     explanation. */
  .print-area .p-bubble ul { margin: 8px 0 2px; padding: 0; list-style: none; }
  .print-area .p-bubble li { margin: 0 0 6px; padding-left: 10px; border-left: 2px solid #d9d9d9; }
  .print-area .p-bubble li b { display: block; font-weight: 700; }
  .print-area .p-bubble li span { display: block; color: #444444; }
}
/* Lovable-style dropdown: just text + chevron, not a button box */
.compliance-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: auto; min-width: 118px; margin: 0; padding: 7px 30px 7px 12px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--text);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231a1a23' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: background-color 0.15s ease;
}
.compliance-select:hover { background-color: var(--surface); }
.compliance-select:focus { outline: none; background-color: var(--surface); }
.prompt-toolbar .send {
  width: 32px; height: 32px;
  border: 0; cursor: pointer; border-radius: 50%;
  background: var(--brand-gradient); color: #fff; font-size: 1rem; line-height: 1;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  transition: transform 0.12s ease;
}
.prompt-toolbar .send:hover { transform: scale(1.05); }
.prompt-toolbar .send:disabled { opacity: 0.5; cursor: wait; }
/* the send button lights up only while a message is being typed */
.prompt-toolbar .send.idle { background: var(--line-strong); color: var(--muted); box-shadow: none; pointer-events: none; }
.prompt-toolbar .send.idle:hover { transform: none; }
.cta-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; text-align: center; }

/* ---------------- sections ---------------- */
.section { padding: 80px 24px; position: relative; }
.section h2 { text-align: center; font-size: clamp(1.7rem, 3.5vw, 2.3rem); letter-spacing: -0.025em; margin: 0 0 10px; color: var(--text); }
.section .sub { text-align: center; color: var(--text); max-width: 560px; margin: 0 auto 40px; font-size: 1.05rem; }

/* min(230px, 100%) rather than a bare 230px floor: the track can still shrink when the viewport is
   narrower than one card, which is what made the cards overrun their section below ~262px. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; max-width: 1060px; margin: 0 auto; }
.card {
  position: relative;
  background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(0px) saturate(1);
  -webkit-backdrop-filter: blur(0px) saturate(1);
  transition:
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    backdrop-filter 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    -webkit-backdrop-filter 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* green tint fades via opacity (animatable) instead of swapping a gradient */
.card::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.25), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.65);
  background-color: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 14px 40px rgba(22, 163, 74, 0.20);
}
/* pricing CTAs appear only on hover (avoid two buttons on screen nearby) */
.card.price .btn {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.card.price:hover .btn,
.card.price:focus-within .btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-gradient);
  color: #fff; font-weight: 700; font-size: 0.95rem;
}
.card h3 { margin: 14px 0 6px; font-size: 1.15rem; color: var(--text); }
.card p { color: var(--muted); margin: 0; font-size: 0.96rem; }

.engines { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 900px; margin: 0 auto; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
  color: var(--text); font-weight: 500; font-size: 0.9rem;
  background: #ffffff;
}
.chip b { font-weight: 600; }
/* chat service chips */
.msg .bubble .chip { display: inline-block; margin: 2px 3px 2px 0; padding: 4px 12px; font-size: 0.82rem; }
.msg .bubble .chip.saas { background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.30); color: #0d7a6a; font-weight: 600; }
.msg .bubble .chip.svc {
  background: #ffffff; border: 1px solid rgba(22, 163, 74, 0.45);
  padding: 6px 14px; font-size: 0.82rem;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}
.msg .bubble .chip.svc b { color: #0d7a6a; font-weight: 700; }
.msg .bubble .chip.more { cursor: pointer; background: transparent; border-style: dashed; color: var(--muted); min-height: 32px; padding: 5px 12px; }
.msg .bubble .chip.more:hover { color: var(--text); }
.subs-hidden.hidden { display: none; }
/* clickable AI suggestions */
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.suggestions .chip.sug {
  cursor: pointer; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 0.86rem; line-height: 1.3; padding: 7px 12px; border-radius: 999px; min-height: 32px; text-align: left;
}
.suggestions .chip.sug:hover { background: #ffffff; border-color: rgba(0, 0, 0, 0.3); }

.pricing .cards { max-width: 800px; }
.price { text-align: center; background: #ffffff; }
.price .amount { font-size: 2.4rem; font-weight: 800; color: var(--text); margin: 14px 0; letter-spacing: -0.03em; }
.price .amount span { font-size: 1rem; color: var(--muted); }
.price.featured { border: 1.5px solid rgba(22, 163, 74, 0.35); background: linear-gradient(180deg, rgba(134, 239, 172, 0.10), #ffffff); }
.fineprint { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 28px; }
/* Scoped offer: the bracket ladder under the pricing cards, and the quote above the package buttons. */
.scoped-ladder { max-width: 800px; margin: 24px auto 0; overflow-x: auto; }
.scoped-ladder-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.scoped-ladder-table th, .scoped-ladder-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-2); }
.scoped-ladder-table thead th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.scoped-ladder-table td { font-variant-numeric: tabular-nums; font-weight: 600; }
.fineprint.scoped-ladder-note { margin-top: 14px; }
.chat-actions.package-choices > .quote-why { grid-column: 1 / -1; margin: 0 0 6px; }

/* trust / lifetime note bands */
.note-band {
  max-width: 1060px; margin: 18px auto 0;
  background: #ffffff; border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 22px;
  text-align: center; color: var(--muted); font-size: 0.98rem;
}
.note-band b { color: var(--text); }

/* Lovable-style scroll reveal + prompt line */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.mini-prompt {
  max-width: 680px; margin: 0 auto 14px;
  background: #ffffff; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 12px 22px;
  color: var(--muted); font-size: 0.98rem; text-align: center;
  box-shadow: 0 8px 24px rgba(26, 26, 35, 0.06);
}
.tag-preview {
  display: inline-block; margin: 6px auto 0;
  color: var(--muted); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* verification guide: code values + copyable AI prompt */
.code-val {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 2px 8px; color: var(--text);
  word-break: break-all;
}
.copy-box {
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0;
  white-space: pre-wrap; color: var(--muted); word-break: break-word;
}

/* compliance typographic table */
.comp-grid { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; }
.comp-row {
  display: flex; gap: 24px; align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.comp-row:last-child { border-bottom: 0; }
.comp-row span { width: 140px; flex-shrink: 0; font-weight: 700; color: var(--text); font-size: 1rem; letter-spacing: -0.01em; }
.comp-row p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) {
  .comp-row { flex-direction: column; gap: 6px; }
  .comp-row span { width: auto; }
}

.footer { border-top: 1px solid var(--line); padding: 28px 24px; text-align: center; color: var(--muted); font-size: 0.85rem; line-height: 1.8; }
.footer-entity { display: inline-block; max-width: 720px; overflow-wrap: anywhere; }
.footer a { color: var(--text); display: inline-block; padding: 4px 2px; }

/* ---------------- auth ---------------- */
.auth-wrap { display: flex; justify-content: center; padding: 60px 20px; }
.auth-card { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; width: 100%; max-width: 420px; box-shadow: 0 14px 40px rgba(26, 26, 35, 0.08); }
.auth-card h2 { margin-top: 0; }
label { display: block; margin: 14px 0; font-weight: 600; font-size: 0.95rem; color: var(--text); }
input, select {
  width: 100%; margin-top: 6px; padding: 11px 12px;
  background: #ffffff; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px; font-size: 1rem;
}
input:focus, select:focus { outline: none; border-color: var(--accent-start); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; margin: 0; }
.switch { margin-top: 16px; text-align: center; color: var(--muted); }
.switch a { color: var(--accent-start); font-weight: 600; }
.form-msg { color: var(--muted); min-height: 1.4em; margin-top: 10px; text-align: center; }

/* ---------------- dashboard ---------------- */
.dash { max-width: 1060px; margin: 0 auto; padding: 40px 24px 80px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.dash-actions { display: flex; gap: 10px; }
.list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 30px; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #ffffff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px;
}
.row-main { display: flex; flex-direction: column; gap: 2px; }
.row-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 26px; text-align: center; color: var(--muted); }
.badge { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.06); }
.badge.warn { color: #9a4a0a; border-color: rgba(180, 83, 9, 0.35); background: rgba(180, 83, 9, 0.06); }
.badge.bad { color: var(--bad); border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.06); }

/* ---------------- modal ---------------- */
.modal-root {
  position: fixed; inset: 0; background: rgba(20, 20, 30, 0.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 50; overflow-y: auto;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: #ffffff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 28px; width: 100%; max-width: 760px;
  box-shadow: 0 24px 60px rgba(26, 26, 35, 0.18);
}
.modal-card h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vbox { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.vbox h4 { margin-top: 0; color: var(--text); }
.vbox ol { padding-left: 18px; color: var(--muted); font-size: 0.92rem; }
.loading { text-align: center; color: var(--muted); padding: 30px; }
.report-head { display: flex; justify-content: space-between; align-items: center; }
.report-body pre {
  background: var(--text); border-radius: 16px;
  padding: 18px; overflow-x: auto; white-space: pre-wrap; font-family: var(--font-mono); font-size: 0.9rem;
  max-height: 60vh; color: #e8e8ee;
}

@media (max-width: 720px) {
  .verify-grid { grid-template-columns: 1fr; }

  /* one-line menu on mobile: hide section links, keep brand + auth */
  .topbar { gap: 8px; padding: 10px 14px; flex-wrap: nowrap; }
  .topbar nav { gap: 6px; min-width: 0; flex-wrap: nowrap; }
  .topbar nav a.nav-link[data-nav],
  .topbar nav a#nav-how,
  .topbar nav a#nav-pricing { display: none; }
  .topbar nav a.nav-link { padding: 6px 10px; font-size: 0.85rem; white-space: nowrap; }
  .brand { font-size: 1.02rem; }
  .brand-text { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .brand-text.morphed { font-size: 0.78rem; }
  #auth-area { display: flex; align-items: center; gap: 4px; min-width: 0; }
  #auth-area .muted { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* elephant big and visible on mobile */
  .elephant { width: max(92vw, 512px); margin-top: 12%; opacity: 0.45; }

  /* hero + prompt fit small screens */
  .hero { padding: 76px 14px 36px; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); margin: 10px auto 14px; }
  .hero-lead { font-size: 1.02rem; margin-bottom: 12px; }
  .hero-tagline { font-size: 0.88rem; margin-bottom: 18px; }
  .hero-tagline .dot { margin: 0 7px; }
  .chat-shell { max-width: 100%; }
  .prompt-shell { padding: 14px 12px 10px; }
  .prompt-shell textarea { font-size: 0.95rem; min-height: 44px; padding: 4px 2px; }
  .prompt-toolbar { flex-wrap: wrap; gap: 6px; }
  .compliance-select { min-width: 104px; padding: 6px 24px 6px 10px; font-size: 0.8rem; }
  .chip-add, .prompt-toolbar .send { width: 30px; height: 30px; font-size: 1rem; }
  .chat-msgs { max-height: 300px; }
  .section { padding: 48px 16px; }
  .section h2 { font-size: 1.6rem; }
  .cta-note { font-size: 0.78rem; }
  .card.price .btn { opacity: 1; transform: none; pointer-events: auto; }
  .row { flex-direction: column; align-items: flex-start; }
  .dash-head { flex-direction: column; align-items: flex-start; }
}

/* ---------------- aliases: later components (workspace, package dialog, legal pages) use these names; mapped to the original palette ---------------- */
:root {
  --ink: var(--text); --ink-2: #3f4350; --mute: #5d6070;
  --paper: #ffffff; --paper-2: var(--bg-warm); --paper-3: var(--surface);
  --line-2: var(--line-strong);
  --forest: #15803d; --forest-2: #166534; --forest-soft: rgba(22, 163, 74, 0.10); --forest-ink: #0f6b5c;
  --amber: var(--warn); --amber-soft: rgba(180, 83, 9, 0.08); --rust: var(--bad); --rust-soft: rgba(220, 38, 38, 0.08);
  --focus: var(--accent-start);
  --radius-s: 8px; --radius-l: 20px;
  --shadow-1: 0 1px 2px rgba(26, 26, 35, 0.05), 0 10px 30px -14px rgba(26, 26, 35, 0.16);
  --shadow-2: 0 24px 60px -30px rgba(26, 26, 35, 0.3), 0 2px 6px rgba(26, 26, 35, 0.06);
  --display: var(--font-sans); --sans: var(--font-sans);
  --topbar-h: 64px;
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; }
.brand { display: inline-flex; align-items: center; min-height: 36px; }
.btn svg { width: 16px; height: 16px; }
.btn.small { min-height: 36px; }
.eyebrow { margin-bottom: 12px; }
.section#faq { padding: 56px 24px 72px; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-head.center { text-align: center; margin-bottom: 40px; }
.bottom-chat { padding: 40px 24px 90px; }
.bottom-chat .chat-shell { max-width: 960px; }
.bottom-chat .bottom-lead { text-align: center; color: var(--muted); font-size: 1.05rem; margin: 0 0 18px; }

/* ---------------- extensions for pages built after the original landing ---------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 16px; background: var(--text); color: #fff; border-radius: 10px; transform: translateY(-200%); font-weight: 600; }
.skip-link:focus { transform: none; }

/* ---------- forms ---------- */
label { display: block; margin: 0 0 14px; font-weight: 500; font-size: 14px; color: var(--ink); }
label > span.hint, .hint { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--mute); line-height: 1.55; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select {
  display: block; width: 100%; margin-top: 7px; padding: 12px 14px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; font-family: inherit; font-size: 16px; line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* Plain text links stay on brand; the browser's visited purple is never shown. */
a:not([class]), a:not([class]):visited { color: var(--forest); }
textarea { min-height: 112px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa49e; }
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 4px rgba(29, 92, 61, 0.12); }
select { appearance: none; padding-right: 44px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%233b4842' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center; }
input[type="checkbox"], input[type="radio"] { appearance: none; width: 20px; height: 20px; margin: 0; padding: 0; border: 1.5px solid #9fb0a6; background: #fff; display: inline-grid; place-content: center; flex-shrink: 0; cursor: pointer; transition: border-color 0.12s ease, background-color 0.12s ease; }
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { border-color: var(--forest); background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 3 3 6-6'/%3E%3C/svg%3E") no-repeat center; }
input[type="radio"]:checked { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 4.5px, #fff 5px); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.45; cursor: not-allowed; }
@media (forced-colors: active) { input[type="checkbox"], input[type="radio"] { appearance: auto; } }
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 450; line-height: 1.55; cursor: pointer; }
.check input { margin-top: 2px; }
.form-msg { min-height: 1.5em; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.form-msg:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- status pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.badge.ok { color: var(--forest-ink); background: var(--forest-soft); border-color: rgba(29, 92, 61, 0.22); }
.badge.warn { color: #8a4208; background: var(--amber-soft); border-color: rgba(165, 107, 20, 0.25); }
.badge.go { color: var(--forest-ink); background: #fff; border-color: rgba(29, 92, 61, 0.3); }
.badge.bad { color: var(--rust); background: var(--rust-soft); border-color: rgba(163, 68, 43, 0.25); }
.badge.live::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.chat-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chat-actions .btn { margin-top: 6px; }
.prompt-shell.auth-mode #btn-add, .prompt-shell.auth-mode #compliance-btn, .prompt-shell.auth-mode .add-menu, .prompt-shell.auth-mode .comp-menu { display: none; }
.prompt-shell.auth-mode textarea { min-height: 52px; font-size: 18px; letter-spacing: 0.01em; }
/* faq */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 2px; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2316211b' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M11 6.5v9M6.5 11h9'/%3E%3C/svg%3E") no-repeat center; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 2px 24px; max-width: 640px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }

.legal { max-width: 720px; margin: 0 auto; padding: calc(var(--topbar-h) + 48px) 24px 80px; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 10px; }
.legal .legal-meta { color: var(--mute); font-size: 14px; margin-bottom: 28px; }
.legal .lead { font-size: 17px; color: var(--ink-2); line-height: 1.65; margin-bottom: 28px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.legal ul { padding-left: 20px; margin: 0 0 12px; }
.legal li { margin-bottom: 8px; }
.legal b { color: var(--ink); }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--mute); font-size: 13.5px; }
.footer-inner nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-inner > span { min-width: 0; overflow-wrap: anywhere; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-2); }
/* ---------- workspace: dashboard + assessment ---------- */
.dash, .assessment-setup { max-width: 1040px; margin: 0 auto; padding: calc(var(--topbar-h) + 44px) 32px 96px; }
.eyebrow { display: block; margin: 0 0 10px; color: var(--forest); font-size: 14px; font-weight: 500; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.dash h2 { font-size: 40px; letter-spacing: -0.03em; }
.workspace-intro { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; }
.dash-actions { display: flex; gap: 10px; flex-shrink: 0; }
/* Tabbed section nav: one section at a time, so the workspace is easy to navigate. */
.dash-tabs, .setup-tabs { display: flex; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.dash-tabs { margin: 22px 0 26px; }
.dash-tabs::-webkit-scrollbar, .setup-tabs::-webkit-scrollbar { display: none; }
.dash-tabs button, .setup-tabs button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.dash-tabs button:hover, .setup-tabs button:hover { color: var(--text); }
.dash-tabs button span, .setup-tabs button span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); font-size: 12px; font-weight: 600; transition: background 0.15s, color 0.15s; }
.dash-tabs button.on, .setup-tabs button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(26, 26, 35, 0.1); }
.dash-tabs button.on span, .setup-tabs button.on span { background: var(--text); color: var(--bg); }
.dash-tabs button:focus-visible, .setup-tabs button:focus-visible { outline: 2px solid var(--accent-start); outline-offset: 2px; }

/* The primary section (assessments) stays in view; setup (domains/projects) is a clearly secondary band below it. */
.dash-section.primary { margin-top: 26px; }
.dash-setup { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.dash-setup-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-setup-head .setup-title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.dash-setup-head .setup-tabs { margin: 0; }

/* A domain still needs its DNS proof before testing: surface it rather than leaving it buried in a tab. */
.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; padding: 16px 20px; border-radius: var(--radius-l, 16px); background: var(--paper-2); border: 1px solid var(--line-strong); }
.verify-banner > div { display: flex; flex-direction: column; gap: 2px; }
.verify-banner b { font-size: 1rem; }
.verify-banner span { font-size: 0.86rem; color: var(--ink-2); }
.verify-banner .btn { flex-shrink: 0; }
.dash-section[hidden] { display: none; }
.workspace-section-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 0 0 16px; }
.workspace-section-head h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.workspace-section-head h3 span { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); font-family: var(--sans); font-size: 13px; font-weight: 600; }
.workspace-section-head > .muted { font-size: 13.5px; }
.live-caption { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13.5px; }
.live-caption i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); animation: pulse 1.6s ease-in-out infinite; }
.list { display: flex; flex-direction: column; gap: 12px; margin: 0 0 48px; }
/* First-load skeleton: the real structure with shimmer placeholders, so the dashboard reads as instant. */
.skeleton-row { pointer-events: none; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 25%, color-mix(in srgb, var(--surface) 55%, var(--bg)) 37%, var(--surface) 63%); background-size: 400% 100%; animation: sk-shimmer 1.4s ease infinite; }
.sk-eyebrow { width: 150px; height: 11px; margin-bottom: 11px; }
.sk-title { width: 230px; height: 19px; margin-bottom: 9px; }
.sk-sub { width: 130px; height: 11px; }
.sk-pill { width: 96px; height: 30px; border-radius: 999px; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 26px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.row:hover { border-color: rgba(22, 33, 27, 0.28); box-shadow: var(--shadow-1); }
.row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-main b { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.row-main .muted { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.row-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.assessment-kind { display: block; margin-bottom: 4px; color: var(--forest); font-size: 13px; font-weight: 500; }
.assessment-row { padding: 24px 28px; }
/* The assessment's main area opens its detail page, matching the clickable project rows. The action buttons stay separate in .row-side. */
a.row-main { color: inherit; text-decoration: none; cursor: pointer; border-radius: 10px; margin: -6px -8px; padding: 6px 8px; flex: 1 1 auto; }
a.row-main:hover b { text-decoration: underline; text-underline-offset: 2px; }
a.row-main:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.scope-count { display: inline-block; margin-left: 10px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--mute); vertical-align: 2px; letter-spacing: 0; }
.domain-row .row-main b { font-size: 17px; }
.empty { padding: 44px 28px; text-align: center; background: var(--paper-2); border: 1px dashed rgba(22, 33, 27, 0.22); border-radius: var(--radius-l); color: var(--ink-2); }
.empty strong { display: block; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.empty p { max-width: 460px; margin: 8px auto 0; font-size: 15px; line-height: 1.6; }
.empty .btn { margin-top: 20px; }

/* assessment setup */
.setup-back svg { width: 16px; height: 16px; }
.setup-back { display: inline-flex; align-items: center; min-height: 36px; gap: 6px; margin-bottom: 28px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.assessment-setup > h1 { max-width: 760px; margin: 0 0 14px; font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -0.03em; }
.setup-intro { max-width: 680px; margin: 0 0 32px; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.setup-flash { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 22px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--forest-ink); font-size: 14px; font-weight: 500; }
.setup-flash svg { width: 16px; height: 16px; color: var(--forest); }
.proof-steps { margin: 14px 0 0; padding-left: 22px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.proof-steps li { margin-bottom: 4px; }
.dns-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.dns-hint:empty { display: none; }
.dns-how { flex-basis: 100%; font-size: 13.5px; color: var(--mute); }
.proof-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; font-size: 13.5px; color: var(--mute); }
.proof-tools span:empty { display: none; }
.proof-tools span { flex-basis: 100%; }
.setup-steps { display: flex; gap: 0; margin: 0 0 32px; padding: 0; list-style: none; counter-reset: s; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: #fff; }
.setup-steps li { flex: 1; display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 14.5px; font-weight: 500; color: var(--mute); }
.setup-steps li + li { border-left: 1px solid var(--line); }
.setup-steps li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); flex-shrink: 0; }
.setup-steps li.done { color: var(--forest-ink); }
.setup-steps li.done::before { content: ""; border-color: var(--forest); background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 3 3 6-6'/%3E%3C/svg%3E") no-repeat center; }
.setup-steps li.current { color: var(--ink); background: var(--paper-2); }
.setup-steps li.current::before { border-color: var(--forest); color: var(--forest); }
.setup-steps.setup-finished { display: none; }
.setup-panel { padding: 30px 32px; margin-bottom: 20px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-l); }
.setup-panel > h2 { font-size: 24px; margin-bottom: 10px; }
.setup-panel p { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.setup-panel > p + .btn { margin-top: 20px; }
.setup-panel > .btn { margin-top: 14px; }
.assessment-overview { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 20px; padding: 26px 30px; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: var(--radius-l); }
.overview-label { display: block; margin-bottom: 10px; color: var(--mute); font-size: 13.5px; font-weight: 500; }
.assessment-overview p { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; }
.scope-origin { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.execution-stage { margin-left: 12px; color: var(--mute); font-size: 14px; }
.assessment-pending { display: grid; gap: 10px; justify-items: end; max-width: 280px; color: var(--ink-2); font-size: 14px; line-height: 1.6; text-align: right; }
.assessment-overview > .btn { flex-shrink: 0; }
.proof-card { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.proof-card:first-of-type { margin-top: 20px; }
.proof-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.proof-heading h3 { font-size: 19px; overflow-wrap: normal; word-break: keep-all; min-width: 0; }
@media (max-width: 420px) { .proof-heading h3 { font-size: 17px; } }
.proof-card dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0 0 16px; padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.proof-card dt { color: var(--mute); padding-top: 6px; font-weight: 500; }
.proof-card dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.proof-card code { flex: 1 1 auto; font-family: var(--font-mono); font-size: 13.5px; padding: 6px 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 7px; color: var(--forest-ink); overflow-wrap: anywhere; max-width: 100%; }
.proof-card [data-proof-status] { margin-top: 10px; font-size: 14px; }
.proof-card [data-proof-status]:empty { display: none; }
.preserve-lines { white-space: pre-wrap; }
.final-confirmation { background: var(--paper-2); border-color: rgba(29, 92, 61, 0.35); }
.final-confirmation .check { font-size: 15.5px; margin-bottom: 20px; }
.final-confirmation .check input { margin-top: 3px; }
.final-confirmation > .btn { margin: 0 0 14px; }
.final-confirmation .muted { font-size: 14px; }
.assessment-brief { background: #fff; }
.assessment-brief > summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.assessment-brief > summary::-webkit-details-marker { display: none; }
.assessment-brief > summary span { margin-left: auto; font-family: var(--sans); font-size: 13.5px; font-weight: 400; color: var(--mute); letter-spacing: 0; }
.assessment-brief > summary::after { content: ""; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2316211b' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M11 6.5v9M6.5 11h9'/%3E%3C/svg%3E") no-repeat center; transition: transform 0.2s ease; }
.assessment-brief[open] > summary::after { transform: rotate(45deg); }
.brief-content { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.brief-content p { margin: 0 0 16px; line-height: 1.7; }
.brief-content p:last-child { margin-bottom: 0; }
.brief-content p b { display: block; margin-bottom: 4px; color: var(--mute); font-size: 13.5px; font-weight: 500; }
.attempt-history { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.attempt-history > summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600; color: var(--ink); }
.attempt-history > summary::-webkit-details-marker { display: none; }
.attempt-history > summary span { font-size: 13.5px; font-weight: 400; color: var(--mute); }
.attempt-history > summary::after { content: ""; margin-left: auto; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%233b4842' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 4 4 4-4'/%3E%3C/svg%3E") no-repeat center; transition: transform 0.2s ease; }
.attempt-history[open] > summary::after { transform: rotate(180deg); }
.attempt-timeline { list-style: none; margin: 20px 0 0; padding: 0; }
.attempt-timeline li { position: relative; display: flex; align-items: center; gap: 16px; padding: 12px 0 20px 30px; min-height: 64px; }
.attempt-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 32px; bottom: -4px; width: 1px; background: var(--line-2); }
.timeline-node { position: absolute; left: 0; top: 22px; width: 13px; height: 13px; border: 2px solid #b6c6bd; border-radius: 50%; background: #fff; }
.timeline-node.active { border-color: var(--forest); background: var(--forest); box-shadow: 0 0 0 4px var(--forest-soft); }
.attempt-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.attempt-info strong, .attempt-info a { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.attempt-info a { display: inline-block; padding: 8px 0; margin: -8px 0; }
.attempt-info span { font-size: 13.5px; color: var(--mute); }
.attempt-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.setup-footer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.setup-footer p { width: 100%; }
.signoff-note { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding: 18px 20px; background: var(--forest-soft); border: 1px solid rgba(29, 92, 61, 0.2); border-radius: 12px; }
.signoff-note svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--forest); margin-top: 2px; }
.signoff-note b { display: block; color: var(--forest-ink); margin-bottom: 4px; }
.signoff-note p { font-size: 15px; }
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 20px; }
.progress-grid div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; }
.progress-grid b { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 500; color: var(--mute); }

/* ---------- modal ---------- */
.modal-root { --modal-pad-b: 40px; position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px var(--modal-pad-b); background: rgba(22, 33, 27, 0.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { position: relative; width: 100%; max-width: 640px; padding: 34px 36px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-2); animation: rise 0.22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal-card:focus { outline: none; }
.modal-card h3 { font-size: 26px; margin-bottom: 8px; }
.modal-card > p, .modal-card .scan-intro { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-bottom: 22px; }
.modal-card form > label { margin-bottom: 18px; }
.modal-card textarea { min-height: 110px; }
.modal-card fieldset { margin: 0 0 18px; }
.modal-card legend { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: var(--ink); }
.modal-card fieldset label.check { margin: 0; padding: 8px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.modal-close { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); }
.modal-close:hover { background: var(--paper-3); color: var(--ink); }
.modal-close svg { width: 18px; height: 18px; }
.loading { padding: 40px; text-align: center; color: var(--mute); }
.verify-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.vbox { padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; }
.vbox h4 { margin: 0 0 10px; font-size: 16px; }
.vbox .mono { font-size: 13px; overflow-wrap: anywhere; color: var(--ink-2); margin: 6px 0; }
.vbox .mono b { color: var(--forest-ink); }
.vbox ol { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.package-help, .scan-payment-note { margin: -6px 0 18px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.scan-payment-note { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 0; padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; }
.scan-payment-note svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--forest); margin-top: 2px; }

/* package selection (conversion step) */
.modal-card:has(.package-form) { max-width: 680px; }
.package-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.package-heading h3 { flex: 1; }
.package-close { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; margin: -6px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--mute); font-size: 26px; line-height: 1; }
.package-close:hover { background: var(--paper-3); color: var(--ink); }
.package-form { display: grid; gap: 20px; margin-top: 22px; }
.package-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.package-form legend { grid-column: 1 / -1; margin-bottom: 2px; font-size: 14px; font-weight: 500; }
.package-option { position: relative; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 20px 20px 18px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
.package-option:hover { border-color: rgba(22, 33, 27, 0.3); }
.package-option:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: #fcfdfb; }
.package-option input { position: absolute; top: 20px; right: 18px; }
.package-option > span { display: block; padding-right: 34px; }
.package-option b { display: flex; align-items: flex-start; min-height: 0; font-family: var(--display); font-size: 16.5px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.package-option .price-tag { display: block; margin: 8px 0 8px; font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.package-option .price-tag small { display: inline; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--mute); margin-left: 6px; letter-spacing: 0; }
.package-option small { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.package-form label:not(.package-option):not(.check) { margin: 0; }
.package-guide { margin: -6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.package-scope { display: grid; gap: 8px; margin: -4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.package-scope:empty { display: none; }
.package-scope span { display: block; padding: 10px 12px; border: 1px solid rgba(165, 107, 20, 0.3); background: var(--amber-soft); border-radius: 10px; }
.package-scope svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; color: var(--amber); }
.package-scope .btn { display: inline-flex; margin: 8px 0 0; }
.package-suggest { display: grid; gap: 8px; margin: -4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.package-suggest:empty { display: none; }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest-chips .chip { min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 500; color: var(--forest-ink); cursor: pointer; }
.suggest-chips .chip:hover { border-color: var(--forest); background: var(--forest-soft); }
.package-files { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.package-files svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--forest); margin-top: 2px; }
.package-form details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.package-form details summary { cursor: pointer; padding: 13px 0; font-size: 14.5px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.package-form details summary::-webkit-details-marker { display: none; }
.package-form details summary::after { content: "+"; color: var(--mute); font-size: 18px; }
.package-form details[open] summary::after { content: "−"; }
.package-form details label { margin: 0 0 16px; }
.package-form .check { padding: 2px 0; font-size: 14.5px; }
.package-footer .check { padding: 0 0 4px; font-size: 14px; line-height: 1.45; }
.scope-requests { border-color: rgba(165, 107, 20, 0.45); background: var(--amber-soft); }
.scope-request-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.scope-request-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; }
.scope-request-list li > div:first-child { display: grid; gap: 4px; min-width: 0; }
.scope-request-list code { font-family: var(--font-mono); font-size: 13.5px; color: var(--forest-ink); overflow-wrap: anywhere; }
.scope-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scope-requests [role=status]:empty { display: none; }
.upgrade-offer { position: relative; border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); background: #fcfdfb; }
.upgrade-offer .price-flag { position: static; margin-right: 10px; }
.upgrade-offer > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 500; color: var(--forest-ink); }
.upgrade-offer > summary::-webkit-details-marker { display: none; }
.upgrade-offer > summary .upgrade-summary { flex: 1 1 260px; }
.upgrade-offer > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s ease; margin-left: auto; }
.upgrade-offer[open] > summary::after { transform: rotate(45deg); }
.upgrade-offer[open] > summary { margin-bottom: 12px; }
.upgrade-offer:not([open]) { border-color: var(--line-2); box-shadow: none; background: #fff; }
.upgrade-points { list-style: none; margin: 12px 0 18px; padding: 0; display: grid; gap: 8px; }
.upgrade-points li { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.upgrade-points svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--forest); margin-top: 2px; }
.upgrade-offer .btn { margin-top: 2px; }
.upgrade-offer [role=status]:empty { display: none; }
.proof-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.package-form .package-footer { position: sticky; bottom: calc(-1 * var(--modal-pad-b, 40px)); display: grid; gap: 8px; margin: 0 calc(-1 * var(--card-pad-x, 36px)) calc(-1 * var(--card-pad-b, 34px)); padding: 14px var(--card-pad-x, 36px) 18px; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-l) var(--radius-l); }
.package-form .package-footer { border-top: 1px solid var(--line-2); }
.package-form details textarea { min-height: 96px; }
.package-form .package-footer > button { width: 100%; min-height: 52px; font-size: 16px; }
.package-trust { display: block; margin: 0; font-size: 13px; line-height: 1.5; color: var(--mute); text-align: center; }
.package-trust svg { width: 14px; height: 14px; margin: -2px 6px 0 0; vertical-align: middle; color: var(--forest); }
.nowrap { white-space: nowrap; }
.package-trust a { display: inline-block; padding: 10px 6px; margin: -10px -6px; color: var(--forest-ink); font-weight: 500; }
.package-form [data-package-error] { margin: -6px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.package-form [data-package-error]:empty { display: none; }
.package-next { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: pn; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.package-next li { flex: 1; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.package-next li + li { border-left: 1px solid var(--line); }
.package-next li::before { counter-increment: pn; content: counter(pn); flex-shrink: 0; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); font-size: 11px; font-weight: 600; color: var(--ink); }
.package-next b { color: var(--ink); font-weight: 600; }

/* report modal chrome */
.modal-card:has(.security-report) { max-width: 880px; padding: 30px 44px 40px; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 14px; }
.report-head h3 { margin: 0; }
.report-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.report-toolbar .muted { margin-right: auto; font-size: 14px; }
.report-download { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; font-size: 14px; font-weight: 600; }
.report-body { padding: 10px 0 0; }

@media (max-width: 760px) {
  .package-footer .check { font-size: 13.5px; }
  .package-form details textarea { min-height: 120px; font-size: 15px; }
  .package-trust { font-size: 12.5px; }
  .package-form .package-footer { position: static; margin-bottom: 0; padding-bottom: 0; border-radius: 0; }
  .auth-wrap { padding: calc(var(--topbar-h) + 20px) 16px 48px; align-items: flex-start; }
  .auth-card { padding: 28px 24px; }
  .dash, .assessment-setup { padding: calc(var(--topbar-h) + 28px) 18px 72px; }
  .dash-head { flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 30px; }
  .dash h2 { font-size: 32px; }
  .dash-actions { width: 100%; }
  .dash-actions .btn { flex: 1; padding: 0 12px; }
  .workspace-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .row { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  .row-side { justify-content: space-between; width: 100%; }
  .assessment-row { padding: 20px; }
  .assessment-setup > h1 { font-size: 30px; }
  .setup-intro { font-size: 15.5px; }
  .setup-steps { flex-direction: column; }
  .setup-steps li + li { border-left: 0; border-top: 1px solid var(--line); }
  .setup-panel { padding: 22px 20px; }
  .assessment-overview { flex-direction: column; align-items: stretch; padding: 22px 20px; }
  .assessment-pending { max-width: none; text-align: left; }
  .proof-card dl { grid-template-columns: 1fr; gap: 4px 0; padding: 16px; }
  .proof-card dt { padding-top: 8px; }
  .proof-card dd { margin-bottom: 6px; }
  .proof-card dd code { flex-basis: 100%; }
  .progress-grid { grid-template-columns: 1fr; }
  .final-confirmation > .btn { width: 100%; }
  .btn { white-space: normal; text-align: center; }
  .setup-footer .btn, .assessment-overview > .btn, .setup-panel > .btn { width: 100%; }
  .assessment-brief > summary { flex-wrap: wrap; font-size: 19px; }
  .assessment-brief > summary span { display: none; }
  .attempt-history > summary { flex-wrap: wrap; gap: 4px 12px; }
  .attempt-history > summary span { flex-basis: calc(100% - 30px); order: 3; }
  .attempt-timeline li { flex-wrap: wrap; gap: 10px 12px; padding-left: 26px; }
  .attempt-info { flex-basis: 100%; }
  .attempt-timeline .btn, .attempt-link { margin-left: 0; }
  .modal-root { --modal-pad-b: 32px; padding: 16px 10px var(--modal-pad-b); }
  .modal-card { padding: 26px 20px; --card-pad-x: 20px; --card-pad-b: 26px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .vbox .mono b { display: block; margin-top: 2px; }
  .verify-grid { grid-template-columns: 1fr; }
  .package-form fieldset { grid-template-columns: 1fr; gap: 10px; }
  .package-option { padding: 14px 16px 14px; }
  .package-option .price-tag { margin: 4px 0 6px; font-size: 24px; }
  .package-option small { font-size: 13px; line-height: 1.45; }
  .package-trust { font-size: 12.5px; }
  .package-next { flex-direction: column; }
  .package-next li + li { border-left: 0; border-top: 1px solid var(--line); }
  .modal-card:has(.security-report) { padding: 22px 18px 30px; }
  .report-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
/* Static crawler summary: replaced by app.js at runtime; readable if scripts are off. */
.static-summary { max-width: 760px; margin: 0 auto; padding: calc(var(--topbar-h) + 48px) 24px 80px; }
.static-summary h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 14px; }
.static-summary h2 { font-size: 22px; margin: 28px 0 8px; }
.static-summary p, .static-summary li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.static-summary ol, .static-summary ul { padding-left: 22px; }
.static-summary li { margin-bottom: 8px; }

/* returning visitors and pre-commitment capture (round 9) */
.resume-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 12px 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-l); background: var(--paper-2); font-size: 14px; color: var(--forest-ink); }
.resume-banner svg { width: 16px; height: 16px; color: var(--forest); margin: -2px 6px 0 0; vertical-align: middle; }
.resume-banner .btn { flex: none; }
@media (max-width: 560px) { .resume-banner { flex-direction: column; align-items: stretch; text-align: left; } }
.package-handoff { margin: 10px 0 0; font-size: 13px; color: var(--mute); text-align: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--forest); text-decoration: underline; cursor: pointer; }
.linklike:disabled { opacity: 0.6; cursor: default; }

/* tap targets: inline text links keep their line box but gain a 31px+ clickable height (WCAG 2.5.8) */
p a:not(.btn), li a:not(.btn), .proof-tools span a, .linklike { padding-top: 7px; padding-bottom: 7px; }

/* running page: the 300-minute budget as clock times; verification page: plain-language DNS note and phone-first handoff */
.execution-window { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.proof-plain { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 560px) { .proof-tools .proof-handoff { flex-basis: 100%; justify-content: center; } }
.proof-help { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.proof-help summary { cursor: pointer; font-weight: 500; color: var(--forest-ink); padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.proof-help summary::-webkit-details-marker { display: none; }
.proof-help summary::before { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s ease; }
.proof-help[open] summary::before { transform: rotate(45deg); }
.proof-help .proof-plain { margin-top: 8px; }
.proof-card code.rec-name { overflow-wrap: normal; word-break: keep-all; }

/* ---- one green action at a time (chat + package dialog) ---- */
.chat-actions .btn:not(.cta) { background: transparent; color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.chat-actions .btn:not(.cta):hover { border-color: rgba(0, 0, 0, 0.25); box-shadow: none; transform: none; }
.btn.cta { background: var(--brand-gradient); color: #fff; border: 0; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.22); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink-2); }
.package-options { display: grid; gap: 10px; margin: 0 0 16px; }
.package-form label { display: block; margin: 0 0 12px; }
.package-form .hint { color: var(--mute); font-size: 13.5px; line-height: 1.5; margin: 6px 0 0; }
.package-form p.hint:empty { display: none; }
.package-form .chip.more { cursor: pointer; margin-left: 6px; }
/* secondary actions in the workspace are quiet; a disabled button is never green */
.btn.small:not(.cta) { background: transparent; color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.small:not(.cta):hover { border-color: rgba(0, 0, 0, 0.25); box-shadow: none; transform: none; }
.btn:disabled, .btn:disabled:hover { background: var(--line-strong); color: var(--muted); border-color: var(--line-strong); box-shadow: none; opacity: 1; transform: none; }
/* the chat composer draws its focus ring on the shell, never on the textarea inside it */
.prompt-shell textarea, .prompt-shell textarea:focus { border: 0; outline: none; box-shadow: none; background: transparent; border-radius: 0; }

/* colour fix (owner-allowed class of change): secondary copy over the blurred background reads darker; headline wraps balanced on phones */
.card p, .note-band, .lead, .fineprint, .cta-note { color: var(--ink-2); }
.faq summary { color: var(--text); }
.hero h1 { text-wrap: balance; }

/* phone: once a conversation exists the headline shrinks so the chat gets the screen (owner-approved item 5) */
@media (max-width: 600px) {
  .hero:has(#chat-msgs .msg) h1 { font-size: 1.05rem; line-height: 1.2; margin: 4px auto 10px; }
  .hero:has(#chat-msgs .msg) { padding-top: calc(var(--topbar-h) + 8px); }
}
.package-form .pkg-hold { text-align: center; margin: 10px 0 0; }

/* owner rule: nothing green except the next action. Status marks, trackers, pills and notes use ink. */
.badge.ok { color: var(--ink); background: var(--paper-2, #f4f5f3); border-color: var(--line-2); }
.setup-flash svg { color: var(--ink); }
.setup-steps li.done { color: var(--ink); }
.setup-steps li.done::before { border-color: var(--ink); background-color: var(--ink); }
.timeline-node.active { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 4px rgba(26, 26, 35, 0.12); }
.signoff-note { background: var(--paper-2, #f4f5f3); border-color: var(--line-2); }
.suggest-chips .chip:hover { border-color: var(--line-strong); background: #fff; }
.eyebrow, .proof-help summary, .linklike, .scan-intro a, .setup-panel a:not(.btn) { color: var(--ink-2); }

/* chat chips and record values in ink, never green */
.msg .bubble .chip, .msg .bubble .chip.svc, .msg .bubble .chip b { color: var(--text); border-color: var(--line-strong); background: #fff; }
.proof-row code, code.rec-name, .proof-grid code, .setup-panel code { color: var(--ink); }
.msg .bubble .chip.saas, .msg .bubble .chip.svc b, .msg .bubble .chip.saas b { color: var(--text); background: #fff; border-color: var(--line-strong); }

.add-email-row.hidden { display: none; }
.dc-slot:empty { display: none; }
.dc-slot { margin: 6px 0 10px; }
.dc-slot .proof-plain { margin: 6px 0 0; }
.share-link { display: inline-block; word-break: break-all; font-size: 12px; margin-top: 4px; }

/* Chat-native purchase: package cards and DNS records inside the agent bubble */
.chat-actions.package-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
/* The heading, the hint and the status line span the full row so they sit above / below the cards,
   not in a grid cell beside them. */
.chat-actions.package-choices > .pay-head,
.chat-actions.package-choices > .hint,
.chat-actions.package-choices > .form-msg { grid-column: 1 / -1; }
.package-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.package-choice:hover, .package-choice:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); outline: none; }
.package-choice b { font-family: var(--display); font-size: 16px; }
.package-choice .price-tag { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.package-choice small { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.chat-actions .pkg-hold, .chat-actions .hint { flex-basis: 100%; margin: 2px 0 0; }
.chat-actions .form-msg { flex-basis: 100%; text-align: left; margin-top: 4px; }
.chat-verify .chat-record { flex-basis: 100%; margin-top: 8px; }
.chat-record dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 8px 0 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; }
.chat-record dt { color: var(--mute); padding-top: 6px; }
.chat-record dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.chat-record code { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 13px; padding: 5px 8px; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 7px; overflow-wrap: anywhere; }
.chat-record .dns-hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.chat-record .dns-hint:empty, .chat-record .dc-slot:empty { display: none; }
.chat-record .dc-slot { margin-top: 6px; }
.msg .bubble a:not(.btn) { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Projects, settings and member view */
.project-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; text-decoration: none; color: inherit; }
.project-row:hover strong { text-decoration: underline; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.project-domain { display: block; }
.project-domain .row-main { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-record { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 12px 0 8px; padding: 12px 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; }
.project-record dt { color: var(--mute); padding-top: 6px; }
.project-record dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.project-record code { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 13px; padding: 5px 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 7px; overflow-wrap: anywhere; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 14px 0 26px; }
.inline-form label { flex: 1 1 240px; }
.inline-form .form-msg, .inline-form .hint { flex-basis: 100%; margin: 0; text-align: left; }
.inline-form.hidden { display: none; }
.settings-page .setup-panel { margin-top: 20px; }
.settings-page .setup-panel h3 { margin: 0 0 6px; }
.auth-passkey { width: 100%; margin-top: 10px; }
.nav-account { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-note { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); color: var(--ink-2); font-size: 14px; }
.member-view .final-confirmation, .member-view #release-authorization, .member-view .upgrade-offer, .member-view #assessment-retry, .member-view #assessment-retest,
.member-view [data-scope-approve], .member-view [data-scope-decline], .member-view #setup-recheckout, .member-view #setup-stop { display: none !important; }
.project-page .row-main a { color: inherit; text-decoration: none; }
.project-page .row-main a:hover strong { text-decoration: underline; }
.project-page .row .badge, .project-page .row > .btn { align-self: flex-start; width: auto; }
.inline-form { align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.inline-form label .hint { margin: 0; }

/* ---------------- run workspace: the chat at full screen once the run is paid ---------------- */
html.ws-open, html.ws-open body { overflow: hidden; }
.ws {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "top top top" "agents main scope";
  text-align: left; animation: ws-open 0.32s cubic-bezier(.2,.8,.2,1);
}
@keyframes ws-open { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.ws-top { grid-area: top; display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line-strong); font-size: 0.92rem; }
.ws-brand { font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.ws-target { font-weight: 600; }
.ws-state { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 0.82rem; }
.ws[data-state="running"] .ws-state { color: var(--text); border-color: var(--text); }
.ws-clock { display: inline-flex; flex-direction: column; gap: 4px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ws-clock .ws-time { width: 100%; height: 3px; }
.ws-stats { display: flex; gap: 18px; margin-left: 10px; overflow-x: auto; scrollbar-width: none; }
.ws-stat { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 12px; white-space: nowrap; }
.ws-stat b { font-size: 0.95rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ws-stat em { grid-row: 2; font-style: normal; font-size: 0.72rem; color: var(--muted); line-height: 1.1; }
.ws-stat svg { grid-column: 2; grid-row: 1 / span 2; color: var(--text); opacity: 0.55; }
.ws-link { margin-left: auto; color: var(--text); font-size: 0.88rem; }
.ws-min { background: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 5px 12px; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--text); }
.ws-min:hover { border-color: rgba(0,0,0,0.25); }

.ws-agents { grid-area: agents; overflow-y: auto; padding: 10px 8px 24px; border-right: 1px solid var(--line); background: var(--ws-side); }
.ws-col-title { margin: 18px 10px 4px; font-size: 0.75rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ws-col-title span { font-weight: 500; margin-left: 2px; }
.ws-col-note { margin: 2px 10px 0; line-height: 1.4; }
.ws-scope { grid-area: scope; overflow-y: auto; padding: 14px 16px 24px; border-left: 1px solid var(--line); }
.ws-scope-list { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.ws-scope-list li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; }
.ws-scope-list li span { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.ws-scope-list code .nb { white-space: nowrap; }
.ws-text { margin: 0; font-size: 0.86rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
/* One flat row per team member or feature: no borders, a soft fill on hover and when open (as in ChatGPT's sidebar). */
.ws-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; row-gap: 5px;
  width: 100%; margin: 1px 0; padding: 7px 10px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 0.86rem; color: var(--text); text-align: left; cursor: pointer;
}
.ws-row:hover { background: var(--ws-hover); }
.ws-row.on { background: var(--ws-on); }
.ws-row:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.ws-chat-row { grid-template-columns: minmax(0, 1fr); font-weight: 600; }
.ws-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-row-name em { font-style: normal; font-size: 0.76rem; color: var(--muted); }
.ws-row-meta { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.ws-row-trophy { font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Feature rows read in two lines: name and trophies, then coverage and state. */
.ws-row .ws-cov-bar { grid-column: 2 / 4; grid-row: 2; height: 4px; margin: 0; }
.ws-row:has(.ws-cov-bar) .ws-row-meta { grid-column: 4; grid-row: 2; }
.ws-row:has(.ws-cov-bar) .ws-row-name { grid-column: 2 / 4; }
.ws-row:has(.ws-cov-bar) .ws-row-trophy { grid-column: 4; grid-row: 1; justify-self: end; }
.ws-row[data-state="needs"] .ws-row-meta { color: var(--warn); font-weight: 600; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #b8bac4; }
.ws-row[data-state="running"] .ws-dot { background: var(--text); border-color: var(--text); animation: ws-pulse 1.4s ease-in-out infinite; }
.ws-row[data-state="done"] .ws-dot { background: #b8bac4; }
.ws-row[data-state="partly"] .ws-dot { background: linear-gradient(90deg, #b8bac4 50%, transparent 50%); }
.ws-row[data-state="needs"] .ws-dot, .ws-row[data-state="waiting"] .ws-dot { border-color: var(--warn); }
.ws-row[data-state="stopped"] .ws-dot { border-color: var(--bad); }
@keyframes ws-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(26,26,35,0.35); } 50% { box-shadow: 0 0 0 5px rgba(26,26,35,0); } }

.ws-main { grid-area: main; min-height: 0; display: flex; flex-direction: column; padding: 16px 24px 18px; }
.ws .chat-shell { flex: 1; min-height: 0; width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; }
.ws .chat-shell.hidden { display: none; }
.ws .chat-msgs { flex: 1; min-height: 0; max-height: none; border: 0; box-shadow: none; background: transparent; padding: 6px 2px; }
.ws-live .bubble { display: flex; align-items: flex-start; gap: 10px; background: transparent !important; border: 1px dashed var(--line-strong) !important; box-shadow: none !important; }
.ws-live .typing { padding: 8px 10px; flex-shrink: 0; }
.ws-live-text { align-self: center; overflow-wrap: anywhere; }
.ws code, .ws-log code { font-family: var(--font-mono); font-size: 0.84em; overflow-wrap: anywhere; }

.ws-agent { flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: 780px; margin: 0 auto; }
.ws-agent.hidden { display: none; }
.ws-back { background: none; border: 0; padding: 0; font: inherit; font-size: 0.88rem; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ws-agent h2 { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; font-size: 1.5rem; }
.ws-pill { font-size: 0.78rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.ws-pill[data-state="running"] { color: var(--text); border-color: var(--text); }
.ws-why { margin: 0 0 10px; color: var(--muted); }
.ws-objective { margin: 0 0 10px; }
.ws-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ws-tags span { font-size: 0.78rem; padding: 2px 9px; border-radius: 999px; background: var(--surface); }
.ws-handoff { padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--bg-warm); }
.ws-handoff h3 { margin: 0 0 4px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.ws-handoff p { margin: 0 0 10px; font-size: 0.92rem; }
.ws-handoff p:last-child { margin-bottom: 0; }

.ws-log { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.ws-log li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.45; overflow-wrap: anywhere; }
.ws-log li time { display: block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.ws-log.compact { font-size: 0.8rem; max-height: none; }
.ws-log.compact li { padding: 6px 0; }
.ws-log li[data-kind="command"], .ws-log li[data-kind="endpoint"] { color: var(--muted); }
.ws-log li[data-kind="command"] b, .ws-log li[data-kind="endpoint"] b { color: var(--text); }

.ws-box { padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.ws-box:last-child { border-bottom: 0; }
.ws-box h3 { margin: 0 0 8px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.ws-sub { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }
.ws-time { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.ws-time i { display: block; height: 100%; width: 0; background: var(--text); border-radius: inherit; transition: width 1s linear; }
.ws-findings { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.ws-findings li { padding: 6px 0; }
.ws-return { position: fixed; right: 20px; bottom: 20px; z-index: 900; }

@media (max-width: 1280px) { .ws-stat svg { display: none; } }
@media (max-width: 1100px) {
  .ws { grid-template-columns: 230px minmax(0, 1fr) 260px; }
  .ws-stats { display: none; }
}
@media (max-width: 760px) {
  .ws { display: flex; flex-direction: column; overflow-y: auto; }
  .ws-top { order: -2; flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
  .ws-stats { order: 9; width: 100%; margin-left: 0; }
  .ws-agents { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 10px 16px; border-left: 0; border-bottom: 1px solid var(--line); flex-shrink: 0; order: -1; }
  .ws-main { padding: 10px 16px; flex: 0 0 auto; height: 72vh; }
  .ws-scope { display: block; border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .ws { animation: none; }
  .ws-time i { transition: none; }
}
.ws-scope-list a { color: var(--text); }

/* coverage: a bar in the side column, the full map in the center */
.ws-cov-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 6px; }
.ws-cov-bar i, .ws-legend i, .ws-cov td i { display: block; background: var(--surface); }
[data-state="tested_no_issue"] { --cell: #3f4250; }
[data-state="finding_confirmed"] { --cell: var(--bad); }
[data-state="in_progress"] { --cell: #9aa0b4; }
[data-state="blocked"] { --cell: var(--warn); }
[data-state="deferred"] { --cell: #d9dbe3; }
[data-state="untested"] { --cell: #f0f1f5; }
[data-state="not_applicable"] { --cell: transparent; }
.ws-cov-bar i[data-state], .ws-legend i[data-state], .ws-cov td i[data-state] { background: var(--cell, var(--surface)); }
.ws-cov-open { margin-top: 10px; }
.ws-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font-size: 0.8rem; color: var(--muted); }
.ws-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ws-legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-strong); }
.ws-cov-wrap { overflow-x: auto; }
.ws-cov { border-collapse: separate; border-spacing: 3px; font-size: 0.82rem; }
.ws-cov thead th { font-weight: 500; color: var(--muted); vertical-align: bottom; text-align: center; padding: 0 2px 6px; }
.ws-cov thead th span { display: inline-block; min-width: 64px; max-width: 96px; font-size: 0.76rem; line-height: 1.2; white-space: pre-line; overflow-wrap: anywhere; }
.ws-cov thead th:first-child { text-align: left; }
.ws-cov tbody th { text-align: left; font-weight: 400; padding-right: 12px; white-space: nowrap; }
.ws-cov tbody th span { display: block; font-size: 0.72rem; color: var(--muted); }
.ws-cov td i { width: 26px; height: 22px; margin: 0 auto; border-radius: 5px; border: 1px solid var(--line); }
.ws-cov td i[data-state="none"] { background: transparent; border-style: dashed; }
.ws-cov td i[data-state="in_progress"] { animation: ws-pulse 1.4s ease-in-out infinite; }
.ws-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 8px; }
@media (prefers-reduced-motion: reduce) { .ws-cov td i[data-state="in_progress"] { animation: none; } }
.ws-untested { margin: 4px 0 0; padding-left: 18px; font-size: 0.88rem; }
.ws-untested li { margin: 2px 0; }
.ws[data-state="incomplete"] .ws-state, .ws[data-state="completed"] .ws-state { color: var(--text); border-color: var(--text); }
html.ws-open .modal-root { z-index: 1100; } /* the report and other dialogs open above the run workspace */
.ws-legend i[data-state="none"] { background: transparent; border-style: dashed; }
/* deferred is striped and testing-now is an outlined, pulsing cell, so neither reads as the other */
.ws-cov-bar i[data-state="deferred"], .ws-legend i[data-state="deferred"], .ws-cov td i[data-state="deferred"] { background: repeating-linear-gradient(135deg, #c3c6d1 0 2px, #f4f5f8 2px 6px); }
.ws-cov-bar i[data-state="in_progress"], .ws-legend i[data-state="in_progress"], .ws-cov td i[data-state="in_progress"] { background: #fff; border: 2px solid #3f4250; }
.ws-question { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ws-question .form-msg { flex-basis: 100%; margin: 0; }
.ws-agents { overflow-x: hidden; }
.ws-clock { white-space: nowrap; flex-shrink: 0; }
.ws-stats { flex: 0 1 auto; min-width: 0; gap: 8px; }
.ws-stat svg { width: 40px; }
@media (max-width: 1500px) { .ws-stat svg { display: none; } }
@media (max-width: 760px) {
  .ws-stats { display: flex; order: 9; width: 100%; margin: 2px 0 0; overflow-x: auto; }
}
.ws-live-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .ws-agents { align-items: flex-start; } .ws-live .typing { display: none; } .ws-live .bubble { max-width: 100%; } }

/* run workspace polish: quiet scrollbars, no boxed-in gaps between the chat and the side panels */
.ws-agents, .ws-scope, .ws .chat-msgs, .ws-agent, .ws-side, .ws-cov-wrap {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.16) transparent;
}
.ws-agents::-webkit-scrollbar, .ws-scope::-webkit-scrollbar, .ws .chat-msgs::-webkit-scrollbar, .ws-agent::-webkit-scrollbar { width: 7px; height: 7px; }
.ws-agents::-webkit-scrollbar-thumb, .ws-scope::-webkit-scrollbar-thumb, .ws .chat-msgs::-webkit-scrollbar-thumb, .ws-agent::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.16); border-radius: 999px; }
.ws-agents::-webkit-scrollbar-track, .ws-scope::-webkit-scrollbar-track, .ws .chat-msgs::-webkit-scrollbar-track, .ws-agent::-webkit-scrollbar-track { background: transparent; }
/* one hairline divider per side, no heavy border, and the warm panel fill carries to the edge */
.ws-agents { border-right: 1px solid var(--line); }
.ws-scope { border-left: 1px solid var(--line); }
.ws-main { padding: 14px 20px 16px; }
.ws .chat-shell, .ws-agent { max-width: 680px; }
.ws .chat-msgs { padding: 6px 0; }
/* give the scrollable columns a little right breathing room so text never sits under the thumb */
.ws-agents { padding-right: 10px; }
.ws-scope { padding-right: 12px; }

/* findings: clickable trophies + a colourful detail view with PoC */
.ws-findings li { display: flex; align-items: flex-start; }
.ws-trophy { width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; margin: 0; font: inherit; font-size: 0.88rem; color: var(--text); cursor: pointer; border-radius: 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; border-left: 3px solid var(--sev, var(--line-strong)); }
.ws-trophy:hover { background: var(--bg-warm); }
.ws-trophy > span { grid-column: 1 / -1; font-size: 0.74rem; font-weight: 700; color: var(--sev, var(--muted)); letter-spacing: 0.01em; }
.ws-finding-open { display: inline-block; margin-top: 6px; background: none; border: 0; padding: 0; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ws-finding { border-left: 4px solid var(--sev, var(--line-strong)); padding-left: 16px; }
.ws-finding h2 { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; }
.ws-sevtag { font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--sev, var(--muted)); padding: 2px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.ws-finding-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; }
.ws-finding h3 { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 16px 0 5px; }
.ws-poc { background: #0f1117; color: #e6e8ef; border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.82rem; margin: 0; }
.ws-poc code { color: inherit; font-family: inherit; }
.ws-finding .ws-text code { background: var(--surface); padding: 1px 5px; border-radius: 5px; font-family: var(--font-mono); font-size: 0.86em; }
.ws-cvss code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }

/* richer finding detail: classification chips, PoC code blocks, criteria */
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ws-chip { font-size: 0.74rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.ws-chip.crit { background: var(--sev, #c0152f); color: #fff; border-color: transparent; }
.ws-finding .ws-text { margin: 0 0 6px; }
.ws-finding .ws-text p { margin: 0 0 8px; overflow-wrap: anywhere; }
.ws-finding .ws-text pre, .ws-finding pre.ws-poc { background: #0f1117; color: #e6e8ef; border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.5; margin: 0 0 8px; white-space: pre; }
.ws-finding .ws-text pre code, .ws-finding pre.ws-poc code { color: inherit; font-family: inherit; background: none; padding: 0; white-space: pre; }
.ws-finding .ws-text :not(pre) > code { background: var(--surface); padding: 1px 5px; border-radius: 5px; font-family: var(--font-mono); font-size: 0.86em; overflow-wrap: anywhere; }
.ws-crit { list-style: none; margin: 0 0 8px; padding: 0; }
.ws-crit li { padding: 3px 0; }
.ws-crit code { font-family: var(--font-mono); font-size: 0.82rem; background: var(--surface); padding: 1px 6px; border-radius: 5px; }

/* mid-run test-account card */
.ws-cred { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ws-cred input { flex: 1 1 160px; min-width: 0; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 0.88rem; background: var(--bg); color: var(--text); }
.ws-cred input:focus { outline: none; border-color: var(--text); }
.ws-cred button { flex: 1 1 100%; }
.ws-cred .form-msg { flex-basis: 100%; margin: 0; }
.ws-cred select, .ws-cred textarea { flex: 1 1 100%; min-width: 0; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 0.88rem; background: var(--bg); color: var(--text); }
.ws-cred select:focus, .ws-cred textarea:focus { outline: none; border-color: var(--text); }
.ws-cred .ws-cred-fields { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ws-cred .ws-cred-fields input, .ws-cred .ws-cred-fields textarea { flex: 1 1 160px; }

/* nicer workspace controls: pill buttons instead of plain 2000s links */
.ws-link, .ws-min { font-size: 0.85rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); text-decoration: none; cursor: pointer; line-height: 1; display: inline-flex; align-items: center; }
.ws-link:hover, .ws-min:hover { border-color: var(--text); }
.ws-back { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; color: var(--text); text-decoration: none; cursor: pointer; margin-bottom: 4px; }
.ws-back::before { content: '‹'; font-size: 1.1em; line-height: 1; }
.ws-back:hover { border-color: var(--text); }
.chip-expand { margin-left: auto; font-weight: 600; border-color: var(--text) !important; }

/* prominent "Watch live" entry so the live view is one click, never a typed URL */
.watch-live { display: inline-flex; align-items: center; gap: 7px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.7); animation: live-pulse 1.4s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); } 70% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* use the available width: let the chat and agent views fill more of the centre column */
.ws .chat-shell { max-width: none; width: 100%; }
.ws-agent { max-width: 980px; margin: 0 auto; }
.ws .chat-msgs { align-items: stretch; }
.ws .msg { max-width: min(760px, 100%); }
.ws .msg.user { align-self: flex-end; }
.ws-main { padding: 14px 28px 16px; }

/* ---- UI audit: remove dated tells, make affordances consistent ---- */
/* no all-caps tracked-out eyebrows (the classic generated-page tell) */
.eyebrow { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.8rem; background: var(--bg-warm); }
/* back link as a quiet pill, not a 2000s text link */
.setup-back { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 11px; min-height: 34px; color: var(--text); background: var(--bg); text-decoration: none; margin-bottom: 22px; }
.setup-back:hover { border-color: var(--text); }
/* "Current execution" label and its badge on one clean row; report action balanced right */
.overview-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.overview-label { margin: 0 !important; }
.assessment-overview { align-items: flex-start; }
.assessment-overview > div:first-child { display: flex; flex-direction: column; gap: 10px; }
/* expanders look clickable and consistent: pointer, hover, a rotating chevron */
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '›'; margin-left: auto; font-size: 1.2em; color: var(--muted); transition: transform 0.18s ease; }
details[open] > summary::after { transform: rotate(90deg); }
details > summary:hover { color: var(--text); }

/* one consistent expander affordance everywhere (was a mix of +, chevrons) */
.faq summary::after, .assessment-brief > summary::after, .attempt-history > summary::after, .upgrade-offer > summary::after {
  content: '›' !important; background: none !important; border: 0 !important;
  width: auto !important; height: auto !important; border-radius: 0 !important; border-right: 0 !important; border-bottom: 0 !important;
  font-size: 1.25em; line-height: 1; color: var(--muted); transform: none !important;
}
.faq details[open] summary::after, .assessment-brief[open] > summary::after, .attempt-history[open] > summary::after, .upgrade-offer[open] > summary::after { transform: rotate(90deg) !important; }

/* dashboard: a running assessment is impossible to miss */
.live-banner { display: grid; gap: 10px; margin: 0 0 28px; }
.live-banner-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius-l, 16px); background: var(--brand-gradient); color: #fff; text-decoration: none; box-shadow: 0 8px 24px rgba(22,99,70,0.22); }
.live-banner-card .live-dot { background: #fff; width: 9px; height: 9px; flex-shrink: 0; }
.live-banner-card > div { display: flex; flex-direction: column; gap: 2px; }
.live-banner-card b { font-size: 1rem; }
.live-banner-card span:not(.live-dot):not(.live-go) { font-size: 0.86rem; opacity: 0.92; }
.live-banner-card .live-go { margin-left: auto; font-weight: 700; white-space: nowrap; }
.live-banner-card:hover { filter: brightness(1.05); }

/* form field + action on one aligned row (fixes buttons sitting lower than their input) */
.field-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: nowrap; }
.field-row > label { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.field-row > label input { margin: 0; width: 100%; box-sizing: border-box; }
.field-row > .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 520px) { .field-row { flex-wrap: wrap; } .field-row > label, .field-row > .btn { flex: 1 1 100%; } }
/* Form buttons sit level with the input they act on — same 48px height, aligned to the input's bottom — not
   dropped below the taller label box. This fixes the add-domain and invite buttons across project pages. */
.inline-form > .btn, .field-row > .btn { align-self: flex-end; min-height: 48px; }
/* Let a field-row fill the form width so its inputs are wide enough for their placeholders. */
.inline-form > .field-row { width: 100%; }


/* assessment row: status badge always rightmost, actions grouped to its left (consistent across rows) */
.row-side .row-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-side .row-actions:empty { display: none; }
.assessment-row .row-side .badge, .domain-row .row-side .badge { order: 2; }
/* Which project a row belongs to, and whether it's shared from another member. */
.row-project { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.row-shared { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent-start) 10%, transparent); color: var(--accent-start); font-size: 11.5px; font-weight: 600; text-transform: none; }
.domain-row .row-main .muted .row-shared { margin-left: 0; }
/* inputs must fit their placeholder */
.field-row > label { flex: 1 1 240px; }
.field-row > label input { min-width: 0; }
.ws-cred input { flex: 1 1 180px; }
.ws-cred input[name="label"] { flex: 1 1 100%; }

/* ---------------- run workspace: calm surfaces, colour only for severity ---------------- */
.ws {
  --ws-side: #f9f9f9; --ws-hover: rgba(0, 0, 0, 0.045); --ws-on: rgba(0, 0, 0, 0.075);
}
/* Severity palette shared with the PDF report: 🐘 critical deep red, 🦁 high orange, 🦓 medium amber, 🐾 low blue.
   Darkness also differs, so the order reads without telling hues apart; the animal and label always show too. */
.ws [data-sev="critical"] { --sev: #991b1b; }
.ws [data-sev="high"] { --sev: #ea580c; }
.ws [data-sev="medium"] { --sev: #b45309; }
.ws [data-sev="low"], .ws [data-sev="info"] { --sev: #2563eb; }
/* The run chat reads like a conversation: the assistant on plain white, the customer in a light grey bubble. */
.ws .msg.agent .bubble { background: var(--bg); border: 0; box-shadow: none; border-radius: 0; padding: 6px 2px; }
.ws .msg.user .bubble { background: #f1f1f3; color: var(--text); font-weight: 500; }
.ws .msg.user .bubble .dim { color: var(--muted); }
.ws .ws-live .bubble { border: 0 !important; padding: 6px 2px; color: var(--muted); }
/* A paid run's chat is only for questions about the run: no uploads, sharing, restart or export. */
.ws #btn-add, .ws #add-menu, .ws #chat-menu-btn, .ws #chat-menu, .ws #chat-expand, .ws .attach-row { display: none !important; }

/* Progress through Breachloom's stages, right after the counters; click for every step. */
.ws-top { position: relative; z-index: 6; }
/* Shrinkable rather than fixed: flex only takes the slack when the header actually runs out of
   room, so the normal look is unchanged but the bar can never overrun a very narrow viewport. */
.ws-progress { position: relative; flex: 0 1 auto; min-width: 0; }
.ws-prog { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); font: inherit; font-size: 0.82rem; color: var(--text); cursor: pointer; white-space: nowrap; min-width: 0; max-width: 100%; }
.ws-prog:hover { background: var(--ws-hover); }
.ws-prog:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ws-prog-label { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-prog-bar { flex: 0 1 96px; width: 96px; min-width: 24px; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.ws-prog-bar i { display: block; height: 100%; background: var(--text); border-radius: inherit; transition: width 0.6s ease; }
.ws-prog b { font-variant-numeric: tabular-nums; font-weight: 700; }
.ws-prog-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 250px; max-width: calc(100vw - 24px); padding: 12px 14px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 10px 30px rgba(26, 26, 35, 0.12); }
.ws-prog-menu p { margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.ws-prog-menu ol { list-style: none; margin: 0; padding: 0; }
.ws-prog-menu li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; padding: 4px 0; font-size: 0.86rem; }
.ws-prog-menu li span { text-align: center; }
.ws-prog-menu li em { font-style: normal; font-size: 0.74rem; color: var(--muted); }
.ws-prog-menu li[data-s="current"] { font-weight: 600; }
.ws-prog-menu li[data-s="pending"], .ws-prog-menu li[data-s="skipped"] { color: var(--muted); }

/* A group's agents as tabs (done, live, queued), plus the feature's routes. */
.ws-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ws-tabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 8px; font: inherit; font-size: 0.82rem; color: var(--muted); cursor: pointer; }
.ws-tabs button:hover { background: var(--ws-hover); }
.ws-tabs button[aria-selected="true"] { background: var(--ws-on); color: var(--text); font-weight: 600; }
.ws-tabs button[data-state="running"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--text); vertical-align: middle; animation: ws-pulse 1.4s ease-in-out infinite; }
.ws-tabs em { font-style: normal; color: var(--muted); margin-left: 2px; }
.ws-objective time { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-left: 6px; }
.ws-agent .ws-chips .ws-chip { cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 600; }

/* Side trophies: animal, then title; the colour comes from the severity. */
.ws-box h3 span { font-weight: 500; margin-left: 2px; }
.ws-trophy { grid-template-columns: 22px minmax(0, 1fr); align-items: start; border-left-color: var(--sev, var(--line-strong)); }
.ws-trophy:hover { background: var(--ws-hover); }
.ws-trophy > span { grid-column: 1; font-size: 0.95rem; line-height: 1.3; color: inherit; }
.ws-more, .ws-cov-open { margin-top: 8px; }
.ws-featmap { list-style: none; margin: 0; padding: 0; }
.ws-featmap button { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: 10px; width: 100%; padding: 5px 6px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 0.84rem; color: var(--text); text-align: left; cursor: pointer; }
.ws-featmap button:hover { background: var(--ws-hover); }
.ws-featmap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-featmap .ws-cov-bar { height: 6px; margin: 0; }

/* The full trophy list: filter by severity, expand any row in place. */
.ws-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.ws-filters button { border: 1px solid var(--line-strong); background: var(--bg); border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 0.8rem; color: var(--text); cursor: pointer; }
.ws-filters button:hover { background: var(--ws-hover); }
.ws-filters button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.ws-flist { border-top: 1px solid var(--line); }
.ws-frow { border-bottom: 1px solid var(--line); }
.ws-frow > summary { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto 14px; align-items: baseline; gap: 10px; padding: 10px 6px; cursor: pointer; list-style: none; border-radius: 8px; }
.ws-frow > summary::-webkit-details-marker { display: none; }
.ws-frow > summary:hover { background: var(--ws-hover); }
.ws-fsev { font-size: 0.76rem; font-weight: 700; color: var(--sev); white-space: nowrap; }
.ws-ftitle { font-size: 0.9rem; font-weight: 500; overflow-wrap: anywhere; }
.ws-frow[open] > summary .ws-ftitle { font-weight: 700; }
.ws-fmeta { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.ws-frow > .ws-finding { margin: 2px 0 16px 6px; padding: 2px 0 2px 16px; border-left: 3px solid var(--sev, var(--line-strong)); }

/* Trail map by feature: one row each, the route matrix inside. */
.ws-covf { border-bottom: 1px solid var(--line); }
.ws-covf > summary { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto 14px; align-items: center; gap: 12px; padding: 10px 6px; cursor: pointer; list-style: none; border-radius: 8px; }
.ws-covf > summary::-webkit-details-marker { display: none; }
.ws-covf > summary:hover { background: var(--ws-hover); }
.ws-covf-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-covf > summary .ws-cov-bar { height: 6px; margin: 0; }
.ws-covf-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.ws-covf[open] { padding-bottom: 14px; }

/* The finish line: the trophies by animal. */
.ws-tallies { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 6px; font-size: 1.5rem; line-height: 1; }
.ws-tally b { font-size: 0.9rem; margin-left: 2px; color: var(--sev); }

@media (max-width: 1100px) { .ws-prog-bar { width: 64px; } }
@media (max-width: 760px) {
  .ws-progress { order: 8; }
  /* On a phone the team and features become one swipeable strip of chips above the chat. */
  .ws-agents { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 8px 12px; align-items: center; }
  .ws-agents .ws-col-title, .ws-agents .ws-col-note { display: none; }
  .ws-row { width: auto; flex-shrink: 0; max-width: 240px; grid-template-columns: 10px auto auto; background: var(--bg); border: 1px solid var(--line-strong); }
  .ws-chat-row { grid-template-columns: auto; }
  .ws-row .ws-cov-bar, .ws-row-meta { display: none; }
  .ws-frow > summary { grid-template-columns: minmax(0, 1fr) 14px; gap: 2px 8px; }
  .ws-frow > summary > * { grid-column: 1; }
  .ws-frow > summary::after { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .ws-covf > summary { grid-template-columns: minmax(0, 1fr) 72px 14px; }
  .ws-covf-meta { grid-column: 1 / 3; grid-row: 2; }
  .ws-covf > summary::after { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .ws-prog-menu { left: 0; right: auto; }
}
@media (prefers-reduced-motion: reduce) { .ws-row[data-state="running"] .ws-dot, .ws-tabs button[data-state="running"]::before { animation: none; } .ws-prog-bar i { transition: none; } }

/* ---------------- workspace pages: a project and an assessment never look alike; denser lists ---------------- */
.kind-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; }
.kind-tag svg { width: 15px; height: 15px; }
.kind-tag[data-kind="project"] { background: #eef2ff; color: #3730a3; }
.kind-tag[data-kind="assessment"] { background: #ecfdf3; color: #166534; }
.dash { padding-top: 28px; }
.dash-head { margin-bottom: 24px; }
.dash h2 { font-size: 34px; }
.list { gap: 8px; margin: 0 0 30px; }
.row { padding: 14px 18px; gap: 14px; border-radius: 16px; }
.row-main b, .row-main strong { font-size: 17px; }
.row-main .muted { font-size: 13.5px; }
.workspace-section-head { margin: 0 0 10px; }
.workspace-section-head h3 { font-size: 17px; }
.project-page .inline-form { margin: -14px 0 28px; }

/* New assessment from a project: scope, package and brief on one screen. */
#pscan-form fieldset { border: 0; padding: 0; margin: 0 0 16px; }
#pscan-form legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
#pscan-form legend .muted { font-weight: 400; }
.pscan-scope .check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; }
.pscan-scope .check .badge { margin-left: auto; }
.pscan-add { margin-top: 6px; }
.pscan-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pscan-plans legend { grid-column: 1 / -1; }
.plan-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; }
.plan-card:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.plan-card > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; }
.plan-card input { margin-top: 3px; }
#pscan-form textarea { width: 100%; }
@media (max-width: 560px) { .pscan-plans { grid-template-columns: 1fr; } }
#pscan-form textarea { font-family: var(--font-sans); font-size: 15px; line-height: 1.5; }
.setup-panel { padding: 22px 24px; margin-bottom: 14px; }
.progress-grid { margin: 12px 0 12px; }
/* Trail map by feature: rows open the feature's page. */
.ws-cov-features tbody th { white-space: normal; min-width: 180px; font-weight: 600; }
.ws-cov-features tbody th span { font-weight: 400; }
.ws-cov-link { cursor: pointer; }
.ws-cov-link:hover th, .ws-cov-link:focus-visible th { text-decoration: underline; text-underline-offset: 3px; }
.ws-cov-link:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ws-cov thead th span { overflow-wrap: normal; word-break: normal; hyphens: manual; min-width: 92px; max-width: 120px; }
.ws-cov-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ws-cov-name:hover, .ws-cov-name:focus-visible { text-decoration-color: currentColor; }
/* Long target hosts stay on one line in the run header and never push the counters out of view. */
.ws-target { min-width: 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }
.ws-stat { flex-shrink: 0; }
@media (max-width: 1500px) { .ws-prog-bar { width: 56px; } .ws-stat { padding: 3px 8px; } .ws-stats { gap: 6px; } .ws-top { gap: 10px; } }
@media (max-width: 1500px) { .ws-stats .ws-stat:first-child { display: none; } }
/* Run header: stable widths; decorative sparklines and then the least-needed counters give way before anything overlaps. */
.ws-prog-label { min-width: 118px; }
.ws-stats { overflow: hidden; }
@media (max-width: 1700px) { .ws-stat svg { display: none; } }
@media (max-width: 1350px) { .ws-stats .ws-stat:nth-child(3) { display: none; } }
.ws-state { white-space: nowrap; }

/* paid-search message match (AD_HEROES in app.js): headline + one-line offer above the prompt */
.hero h1.ad-hero { margin-bottom: 16px; }
.hero-lead { max-width: 720px; margin: 0 auto 30px; text-align: center; }
.hero:has(#chat-msgs .msg) .hero-lead { display: none; }
@media (max-width: 600px) { .hero-lead { font-size: 0.98rem; margin-bottom: 22px; } }

/* ---- the opening analysis and the map-then-pay steps in the chat ---- */
/* The agent's read of the business and the planned hunt: a list that stays readable inside a chat
   bubble at any width, with the explanation subordinate to the title. */
.msg .bubble .risk-read { margin: 10px 0 2px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.msg .bubble .risk-read li { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.msg .bubble .risk-read li b { font-weight: 600; }
.msg .bubble .risk-read li span { color: var(--muted); font-size: 0.92em; line-height: 1.45; }
/* The "Nothing has been tested yet" note is an inline .dim right after the list; without this it
   sat flush under the last risk and read as part of it. Put it on its own line with a gap. */
.msg .bubble .risk-read + .dim { display: block; margin-top: 10px; }
.chat-actions .pay-head { margin: 0 0 8px; }
/* The package the buyer has picked, while Stripe opens. */
.package-choice.chosen { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.package-choice[disabled] { opacity: 0.6; cursor: default; }

@media (max-width: 560px) {
  /* Long DNS names and risk titles must wrap rather than widen the bubble past the screen. */
  .msg .bubble .risk-read li { padding-left: 10px; }
  .chat-actions .package-choice { width: 100%; }
}

/* Smallest phones still in use (320px). The header keeps the brand and the auth action on one
   line; without this the last nav link is clipped by the viewport edge. */
@media (max-width: 360px) {
  .topbar { gap: 6px; padding: 10px 10px; }
  .topbar nav { gap: 2px; }
  .topbar nav a.nav-link { padding: 6px 8px; font-size: 0.8rem; }
  .brand-text { max-width: 76px; }
  #auth-area .muted { max-width: 64px; }
}

/* Below any current phone (240-300px: folded devices, split-screen, heavy browser zoom). The header
   keeps the brand and the sign-in action on one line rather than letting the last link run past the
   viewport edge. */
@media (max-width: 300px) {
  .topbar { padding: 8px 8px; gap: 4px; }
  .topbar nav { gap: 0; }
  .topbar nav a.nav-link { padding: 5px 6px; font-size: 0.74rem; }
  .brand { font-size: 0.92rem; }
  .brand-text { max-width: 52px; }
  #auth-area .muted { display: none; }
}

/* ---------------- language menu (topbar, far right) ---------------- */
.lang-menu { position: relative; display: flex; align-items: center; }
.lang-menu select.lang-switch { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 0.95rem; font-weight: 500; line-height: 1.2; color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  padding: 8px 12px; cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.lang-btn:hover, .lang-btn:focus-visible, .lang-btn[aria-expanded="true"] {
  color: var(--text); background: rgba(26, 26, 35, 0.07); border-color: rgba(26, 26, 35, 0.10);
}
.lang-menu .flag { display: block; flex: none; border-radius: 2px; }
.lang-caret { flex: none; opacity: 0.7; }
.lang-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  margin: 0; padding: 6px; list-style: none; min-width: 172px;
  background: #fff; border: 1px solid rgba(26, 26, 35, 0.12); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26, 26, 35, 0.14);
}
.lang-list.hidden { display: none; }
.lang-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--text); text-align: left;
  background: transparent; border: 0; border-radius: 9px; padding: 9px 10px; cursor: pointer;
}
.lang-option:hover, .lang-option:focus-visible { background: rgba(26, 26, 35, 0.07); outline: none; }
.lang-option[aria-selected="true"] { font-weight: 700; }
@media (max-width: 720px) {
  .lang-btn { padding: 6px 8px; gap: 5px; font-size: 0.85rem; }
  .lang-caret { display: none; }
}

/* One-click sign-in buttons at the account step (Google/GitHub), email as fallback. */
.oauth-row{display:flex;flex-direction:column;gap:8px;margin:12px 0}
.oauth-row .oauth-btn{display:block;text-align:center;text-decoration:none}
.oauth-or{margin:6px 0 0;font-size:13px}
