/* ============================================================
   Etiq site — the new website design (PLAN_demo_design.md)

   From the "Lead-gen website v1" design canvas. Loaded by
   templates/reskill/site_base.html, which does NOT load brand.css:
   a page is on one look or the other. Only /demo uses it so far;
   the rest of the site moves onto it later.

   daisyUI is still loaded underneath (light theme), for the shared
   fragments that use it (download dropdowns, upload dialog). So
   component names here avoid daisyUI's: .button not .btn, .sheet
   not .modal, .panel not .card.

   Sections
     1. Tokens          5. Home: hero, steps, task cards
     2. Base            6. Workspace: thread, task, composer
     3. Top bar         7. Coach panel (shared ws-* cards)
     4. Controls        8. Answer content (shared fragments)
                        9. Sheet   10. Motion   11. Small screens
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "Poppins", system-ui, sans-serif;

  --navy: #0b2540; /* chrome, headings, text on blue */
  --ink: #0f1d33; /* body text */
  --ink-2: #33445c; /* strong secondary */
  --body: #4a5b70; /* secondary */
  --muted: #5b6b80; /* labels (4.5:1 on white) */
  --faint: #7a889a; /* placeholders, captions */
  --line: #e3e9f1;
  --line-2: #edf1f6;
  --line-strong: #dfe6ef;
  --surface: #ffffff;
  --sunken: #f7fafd;
  --page: #ffffff;
  --warm: #fbf1e3; /* hero wash */

  --blue: #48a6fd; /* actions; dark text on it */
  --blue-ink: #1667b8; /* links, labels on tint */
  --blue-tint: #eef6ff;
  --blue-tint-2: #e3f1ff;
  --blue-line: #cfe5fe;

  --ok: #2e7d4f;
  --ok-tint: #e9f6ee;
  --ok-line: #b7e1c6;
  --warn: #d9731a;
  --warn-ink: #b45f0e;
  --warn-tint: #fff4e6;
  --warn-line: #f3cf9f;
  --bad: #c2413b;

  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 20px;
  --radius-xl: 26px;
  --shadow-card: 0 18px 36px -28px rgba(11, 37, 64, 0.5);
  --shadow-float: 0 40px 90px -30px rgba(11, 37, 64, 0.6);
  --focus: 0 0 0 6px var(--blue-tint-2);
}

/* ---------- 2. Base ---------- */
html,
body {
  background: var(--page);
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  color: var(--navy);
  letter-spacing: -0.03em;
  margin: 0;
}
a {
  color: var(--blue-ink);
}
:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 3px;
}
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- 3. Top bar ---------- */
.site-top {
  height: 68px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 22px var(--font-display);
  letter-spacing: -0.02em;
  color: var(--navy);
  text-decoration: none;
}
.site-logo img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy);
  padding: 3px;
}
.site-top-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pill {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--blue-tint);
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
/* "3 free messages left" with a dot per message. */
.counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}
.dots {
  display: inline-flex;
  gap: 4px;
}
.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.dots i.used {
  background: var(--line-strong);
}
.top-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-ink);
  text-decoration: none;
}
.top-link:hover {
  text-decoration: underline;
}

/* ---------- 4. Controls ---------- */
.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font: 600 16px var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.button {
  height: 52px;
  padding: 0 28px;
  background: var(--blue);
  color: var(--navy);
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 24px -12px rgba(22, 103, 184, 0.7);
}
.button:hover {
  transform: translateY(-1px);
}
.button-secondary {
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--navy);
  border: 1.5px solid var(--line-strong);
}
.button-secondary:hover {
  border-color: var(--blue);
}
.button svg,
.button-secondary svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.button,
.button-secondary {
  white-space: nowrap;
}
.button-small {
  height: 40px;
  padding: 0 16px;
  font-size: 14.5px;
}
.button-block {
  width: 100%;
}
.icon-button,
.attach-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #f1f4f8;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  cursor: pointer;
}
.icon-button:hover,
.attach-btn:hover {
  background: var(--blue-tint);
  color: var(--blue-ink);
}
.send-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--blue);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  cursor: pointer;
}
.send-button:disabled {
  background: #e9eff6;
  color: #9aa7b6;
  cursor: default;
}
.text-input {
  height: 52px;
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  padding: 0 16px;
  font: 16px var(--font-body);
  color: var(--ink);
  background: var(--surface);
}
.text-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus);
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- 5. Home: hero, steps, task cards ---------- */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 72px 48px 40px;
  background: linear-gradient(var(--warm), var(--page) 55%);
}
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.hero h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.08;
  max-width: 820px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
}
.steps li + li::before {
  content: "";
  width: 34px;
  height: 2px;
  margin-right: 4px;
  background: repeating-linear-gradient(90deg, #b6dafe 0 5px, transparent 5px 9px);
}
.steps b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.task-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1080px;
}
.task-cards form {
  display: flex;
}
.task-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  padding: 22px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.task-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: 0 24px 40px -24px rgba(22, 103, 184, 0.5);
}
.task-card .icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
}
.task-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.task-card-line {
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}
.task-card-go {
  position: absolute;
  right: 18px;
  top: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0f7ff;
  color: var(--blue-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s;
}
.task-card:hover .task-card-go,
.task-card:focus-visible .task-card-go {
  opacity: 1;
  transform: none;
}
.home .composer {
  width: 100%;
  max-width: 1080px;
}
.home-note {
  font-size: 14px;
  color: var(--faint);
  margin: -24px 0 0;
}

/* ---------- 6. Workspace: thread, picked task, composer ---------- */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  height: calc(100vh - 68px);
}
.workspace-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 48px 24px;
  background: var(--sunken);
}
.msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 4px 12px;
}
.turn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 86%;
}
.ws-turn {
  display: block;
}
.ai-avatar {
  display: none;
}
.ai-intro {
  font-size: 16px;
  line-height: 1.55;
  color: var(--body);
}
.ai-intro .hl {
  color: var(--blue-ink);
  font-weight: 600;
}
.user-row {
  display: flex;
  justify-content: flex-end;
}
.user-bubble {
  max-width: 72%;
  background: var(--blue);
  color: var(--navy);
  border-radius: 18px 18px 4px 18px;
  padding: 14px 18px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}
.user-bubble.prose p {
  margin: 0;
  line-height: 1.5;
}
.chat-elapsed {
  color: var(--faint);
}
/* The picked task: tag, example file, preview. */
.demo-task {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
}
.task-tag .icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.task-tag .icon svg {
  width: 18px;
  height: 18px;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: 500 14px var(--font-body);
  color: var(--blue-ink);
  text-decoration: underline;
  cursor: pointer;
}
.task-files {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px;
}
.file-card .icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-s);
}
.file-card .icon svg {
  width: 20px;
  height: 20px;
}
.file-card small {
  display: block;
  color: var(--faint);
  font-size: 13px;
}
.file-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 18px;
  max-width: 760px;
  overflow-x: auto;
  box-shadow: 0 20px 40px -32px rgba(11, 37, 64, 0.4);
}
.file-preview table {
  border-collapse: collapse;
  font-size: 13.5px;
  width: 100%;
  margin-top: 6px;
}
.file-preview th {
  text-align: left;
  color: var(--faint);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.file-preview td {
  padding: 7px 8px;
  border-bottom: 1px solid #f1f4f8;
  white-space: nowrap;
}
/* Composer: the prompt box with paperclip and send. */
.composer {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.composer-box {
  border: 1.5px solid var(--blue-line);
  border-radius: var(--radius-l);
  background: var(--surface);
  padding: 12px 12px 12px 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  box-shadow: 0 0 0 6px #f0f7ff;
}
.composer-box:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus);
}
.composer-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-self: center;
}
.composer-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.composer-box textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font: 17px/1.5 var(--font-body);
  color: var(--ink);
  max-height: 220px;
}
.composer-box textarea::placeholder {
  color: var(--faint);
}
.composer.is-busy .composer-box {
  border-color: var(--line);
  box-shadow: none;
}
.composer.is-busy textarea {
  color: #9aa7b6;
}
.composer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.composer-row .composer-box {
  flex: 1 1 320px;
}
/* The coach tip: appends its words to the prompt. */
.tip-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1.5px dashed var(--blue);
  background: #f0f7ff;
  border-radius: 12px;
  padding: 9px 13px;
  font: 15px var(--font-body);
  color: var(--navy);
  cursor: pointer;
}
.tip-chip b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tip-chip:disabled {
  border-style: solid;
  border-color: var(--ok-line);
  background: #effaf3;
  cursor: default;
}
.tip-chip:disabled b {
  background: var(--ok);
  color: #fff;
}
.tip-chip-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.composer-hint {
  font-size: 13px;
  color: var(--faint);
}
/* Uploaded files under the composer (dataset_list.fragment.html). */
.composer [id^="dataset-list-"] > span {
  border-radius: 10px !important;
  border-color: var(--line) !important;
}
.signup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-2);
}
.new-task {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.new-task[hidden] {
  display: none;
}

/* ---------- 7. Coach panel and the shared Work Mode cards (ws-*) ---------- */
.coach-panel {
  width: 420px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.coach-panel-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--navy);
  color: #fff;
  font: 600 16px var(--font-display);
}
.coach-panel-head span {
  font: 400 13px var(--font-body);
  opacity: 0.8;
}
.coach-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--sunken);
}
.ws-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ws-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ws-muted {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--faint);
}
.ws-pending {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--body);
}
.ws-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  animation: site-spin 0.7s linear infinite;
  flex: none;
}
.ws-progress {
  height: 6px;
  border-radius: 3px;
  background: #e9eff6;
  overflow: hidden;
}
.ws-progress div {
  height: 100%;
  background: var(--blue);
  transition: width 0.4s;
}
.ws-verdict-text {
  margin: 0;
  font: 600 16px/1.45 var(--font-display);
  color: var(--navy);
  letter-spacing: -0.01em;
}
.ws-verdict-count {
  font-weight: 600;
}
.ws-verdict-count.warn {
  color: var(--warn-ink);
}
.ws-verdict-count.ok {
  color: var(--ok);
}
.ws-verdict:has(.ws-verdict-count.warn) {
  border-color: var(--warn-line);
  box-shadow: 0 0 0 4px var(--warn-tint);
}
.ws-btn {
  align-self: flex-start;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--blue-ink);
}
.ws-score {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ws-ring {
  position: relative;
  width: 68px;
  height: 68px;
  flex: none;
}
.ws-ring svg {
  width: 68px;
  height: 68px;
}
.ws-ring svg circle:last-child {
  stroke: var(--blue);
}
.ws-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 20px var(--font-display);
  color: var(--navy);
}
.ws-score-num {
  font-size: 15px;
  color: var(--body);
}
.ws-next {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}
.ws-add {
  border: 1.5px dashed var(--blue-line);
  background: #f7fbff;
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 14.5px;
  color: var(--navy);
}
.ws-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line-2);
  font-size: 15px;
  line-height: 1.4;
}
.ws-label + .ws-check {
  border-top: 0;
  padding-top: 2px;
}
.ws-check-ic {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--bad);
}
.ws-check-ic.ok {
  background: var(--ok);
}
.ws-check-ic.warn {
  background: var(--warn);
}
.ws-check-ic svg {
  width: 13px;
  height: 13px;
}
.ws-check-text {
  flex: 1;
  min-width: 0;
}
.ws-check-title {
  font-weight: 600;
  color: var(--ink);
}
.ws-check-sub {
  font-size: 14px;
  color: var(--muted);
}
/* /demo has no skill path (PLAN_demo_design.md, D5). */
.demo-page .ws-fix,
.demo-page #skill-path {
  display: none;
}

/* ---------- 8. Answer content (prompt_run_result.html and friends) ---------- */
.answer-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow-x: clip;
}
.answer-head {
  display: none;
}
.answer-body {
  padding: 18px 22px;
}
.prose {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0.9em 0 0.4em;
  line-height: 1.25;
}
.prose h1 {
  font-size: 1.5em;
}
.prose h2 {
  font-size: 1.3em;
}
.prose h3 {
  font-size: 1.12em;
}
.prose h4 {
  font-size: 1em;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p {
  margin: 0.7em 0;
}
.prose ul {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0.7em 0;
}
.prose ol {
  list-style: decimal;
  padding-left: 1.4em;
  margin: 0.7em 0;
}
.prose li {
  margin: 0.25em 0;
}
.prose strong {
  font-weight: 700;
}
.prose em {
  font-style: italic;
}
.prose code {
  font-family: ui-monospace, monospace;
  background: #f1f4f8;
  padding: 0.1em 0.3em;
  border-radius: 4px;
  font-size: 0.88em;
}
.prose pre {
  background: #f4f7fb;
  padding: 1em;
  border-radius: var(--radius-s);
  overflow-x: auto;
  margin: 1em 0;
}
.prose blockquote {
  border-left: 3px solid var(--line);
  padding-left: 1em;
  color: var(--body);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.2em 0;
}
.prose a {
  color: var(--blue-ink);
  text-decoration: underline;
}
.prose table {
  border-collapse: collapse;
  font-size: 0.9em;
  display: block;
  overflow-x: auto;
  margin: 0.8em 0;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
}
.prose th {
  background: var(--sunken);
  color: var(--navy);
}
.document-card {
  margin-top: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.document-card-title {
  font: 600 18px var(--font-display);
  color: var(--navy);
  margin-bottom: 8px;
}
.artifact-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.artifact-table-scroll {
  max-height: 14rem;
  overflow: auto;
}
.artifact-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.answer-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.export-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--navy);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.export-download-btn::after {
  content: "▾";
  font-size: 11px;
}
.export-download-btn:hover,
.export-download-btn:focus-visible {
  border-color: var(--blue);
}
.export-download-link {
  text-decoration: none;
}
.export-download-link::after {
  content: none;
}
.table-download-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.table-download-btn:hover,
.table-download-btn:focus-visible {
  background: var(--blue-tint);
  color: var(--navy);
}
.table-download-menu {
  z-index: 20;
  width: max-content;
  min-width: 150px;
  padding: 4px;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-card);
  font-size: 13px;
}
.table-download-menu .menu-title {
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
  padding: 4px 10px;
}
/* Verification highlights in the answer (answer_highlight.js). */
.rv-hl {
  background: var(--ok-tint);
  color: inherit;
  border-bottom: 2px solid var(--ok);
  border-radius: 3px;
  padding: 0 3px;
  cursor: pointer;
}
.rv-hl.warn {
  background: #fff1dc;
  border-bottom-color: #e08a1e;
}
.rv-hl.selected {
  outline: 2px solid var(--blue-ink);
}
.rv-tick {
  margin-left: 1px;
  font-size: 9px;
  font-weight: 700;
  color: var(--ok);
}
.rv-hl.warn .rv-tick {
  color: var(--warn);
}
.rv-art {
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  outline: 2px solid var(--ok);
  cursor: pointer;
}
.rv-art.warn {
  outline-color: var(--warn);
}
.lineage-graph {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  overflow: hidden;
}
.lineage-graph-surface {
  height: 420px;
  overflow: hidden;
  background: var(--sunken);
}
.lineage-graph-surface svg {
  display: block;
  user-select: none;
}
.lineage-graph-message {
  font-size: 12px;
  color: var(--faint);
  padding: 10px 12px;
  margin: 0;
}
.lineage-graph-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}
.lineage-graph-controls button {
  font-size: 12px;
  font-weight: 600;
  min-width: 27px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

/* ---------- 9. Sheet (a dialog; a bottom sheet on small screens) ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(11, 37, 64, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: site-fade 0.3s;
}
.scrim[hidden] {
  display: none;
}
.sheet {
  position: relative;
  width: 520px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-float);
  animation: site-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.sheet h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
}
.sheet p {
  margin: 0;
  font-size: 16px;
  color: var(--body);
}
.sheet-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
}
.sheet-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--blue-tint);
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
}
.kept {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kept span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--blue-tint);
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
}
.sheet form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9aa7b6;
  font-size: 13px;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.social {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.social .button-secondary {
  padding: 0 10px;
  font-size: 15px;
}
.social svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.sheet-foot {
  font-size: 14.5px;
  color: var(--body);
}

/* ---------- 10. Motion ---------- */
.anim {
  animation: site-up 0.35s ease-out;
}
@keyframes site-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes site-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes site-fade {
  from {
    opacity: 0;
  }
}
@keyframes site-pop {
  from {
    transform: scale(0.94);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* A spinner is how you know something is still happening, so it keeps turning, slowly.
     Without this the rule above made infinite spinners loop thousands of times a second.
     The answer's loading spinner sets its animation inline (prompt_chat_loading). */
  .ws-spinner,
  [style*="animation:spin"] {
    animation-duration: 1.5s !important;
    animation-iteration-count: infinite !important;
  }
}

/* ---------- 11. Small screens ---------- */
@media (max-width: 1080px) {
  .coach-panel {
    width: 360px;
  }
  .workspace-main {
    padding: 20px 24px;
  }
}
@media (max-width: 820px) {
  .site-top {
    height: 58px;
    padding: 0 16px;
    gap: 10px;
  }
  .site-top .pill,
  .top-link.optional {
    display: none;
  }
  .counter {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }
  .home {
    padding: 32px 16px 24px;
    gap: 24px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .steps li {
    font-size: 14.5px;
  }
  .steps li + li::before {
    display: none;
  }
  .task-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .task-card {
    flex-direction: row;
    align-items: center;
    padding: 14px;
    gap: 12px;
  }
  .task-card .icon {
    width: 44px;
    height: 44px;
  }
  .task-card-line {
    font-size: 15px;
  }
  .task-card-go {
    display: none;
  }
  .home-note {
    margin-top: -12px;
  }
  /* The panel goes under the chat and the page scrolls as one. */
  .workspace {
    flex-direction: column;
    height: auto;
  }
  .workspace-main {
    padding: 16px;
    gap: 12px;
  }
  .msgs {
    overflow: visible;
  }
  .turn {
    max-width: 100%;
  }
  .user-bubble {
    max-width: 90%;
    font-size: 15px;
  }
  .prose {
    font-size: 15.5px;
  }
  .answer-body {
    padding: 16px;
  }
  .composer-box textarea {
    font-size: 15.5px;
  }
  .coach-panel {
    width: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .scrim {
    align-items: flex-end;
    padding: 0;
  }
  .sheet {
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    gap: 14px;
    max-height: 92vh;
  }
  .sheet h2 {
    font-size: 24px;
  }
}
