/* Shared design tokens + base reset, loaded on every page (marketing and the
   /app tool alike) - see redon-api/.claude/scratch/redon-landing.html for the
   layout/type/motif system this was drawn from (that reference used a warm
   putty palette; this one swaps in a cooler pair of complementary unsaturated
   neutrals instead - same structure, different tone). A single fixed
   aesthetic, deliberately not adapted to OS dark mode - inverting a
   considered palette on a system toggle would undercut the point of having
   one. */
:root {
  color-scheme: light;
  --paper: #e9edf0; /* cool neutral - page background, and inset controls within a --paper-2 panel */
  --paper-2: #f0ece9; /* warm neutral, complementary to --paper - recessed panels/cards */
  --ink: #23262a;
  --muted: #6d7178;
  --line: #c7cbce;
  --accent: #5b6e82; /* dusty slate-blue - the one accent used sparingly, for interactive/attention states */
  --accent-wash: #dce3e9; /* tinted accent background - disclosure banner, drag-over, soft badges */
  --ochre: #b98f72; /* reserved for the decorative signature motif only - not general UI chrome */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  /* --wall-dark is the site-wide backdrop the user picks on the homepage (persisted in
     localStorage, applied early by the wall-theme head script). Falls back to --paper when unset. */
  background: var(--wall-dark, var(--paper));
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
}

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

a {
  color: inherit;
}

/* Mono uppercase label with a leading hairline tick - the "engineered" tell
   used throughout for small section/status labels (see .eyebrow in the
   reference mockup). */
.eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* Text + arrow link motif - the site's one recurring "go do this" affordance. */
.go {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  display: inline-block;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.go .arw {
  display: inline-block;
  transition: transform 0.2s ease;
}

.go:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.go:hover .arw {
  transform: translateX(4px);
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Ink-filled pill-free button - the one primary-action treatment used
   everywhere (analyze, send, buy). Hover inverts to an outline instead of
   darkening, matching the reference's .btn hover motif. */
.btn-primary {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: transparent;
  color: var(--ink);
}

.btn-primary:disabled {
  background: var(--line);
  border-color: var(--line);
  color: var(--paper);
  cursor: not-allowed;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.header .eyebrow {
  margin-bottom: 0.9rem;
}

.header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.dropzone {
  position: relative;
  border: 1px dashed var(--line);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.dropzone-prompt {
  text-align: center;
  color: var(--muted);
  padding: 1rem;
}

.dropzone-prompt p {
  margin: 0.25rem 0;
}

.dropzone-prompt .or {
  font-size: 0.85rem;
}

#preview-image {
  display: none;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

#preview-image.visible {
  display: block;
}

.dropzone.has-image .dropzone-prompt {
  display: none;
}

#file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

button#analyze-btn {
  margin-top: 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.status-message {
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.status-message.error {
  color: #a3402f;
}

.status-message.loading {
  color: var(--muted);
}

.results-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.recommendations-panel {
  margin-top: 1.5rem;
}

.recommendations-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.recommendation-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.6rem;
}

.recommendation-swatch {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.recommendation-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recommendation-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.recommendation-reason {
  font-size: 0.78rem;
  color: var(--muted);
}

.recommendation-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.art-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.find-art-btn {
  align-self: flex-start;
  font-family: "Space Mono", monospace;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.find-art-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.find-art-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.art-results {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.art-card {
  display: flex;
  flex-direction: column;
  width: 120px;
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
}

.art-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  background: var(--paper-2);
  /* Discourage saving artwork: no drag-to-save, no long-press callout (see the JS blocker in chat-widget.js). */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.art-info {
  padding: 0.4rem;
}

.art-title {
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.art-price {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.3rem;
}

.art-meta {
  font-family: "Space Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* "Final price varies by size / options" - the honest caption under a "From $X" price. */
.art-price-note {
  font-size: 0.64rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* Mono "spec label" tags, matching the .cap caption style used on the
   signature illustration - budget is a soft outline, splurge is a solid
   ink fill (the one place a filled badge outranks an outline). */
.price-tier-badge {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.1rem 0.35rem;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-tier-budget {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.price-tier-splurge {
  background: var(--ink);
  color: var(--paper);
}

/* Format + price-tier tags share one wrapping row under the price/marketplace. */
.art-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.art-badge-row .price-tier-badge {
  margin-top: 0;
}

.art-format-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Original = the one-of-a-kind good stuff, called out with a solid accent fill;
   print = the affordable reproduction, a quieter outline. */
.art-format-original {
  background: var(--accent);
  color: var(--paper);
}

.art-format-print {
  border: 1px solid var(--line);
  color: var(--muted);
}

/* "Why this?" - a low-key, keyboard-focusable disclosure on each result card.
   Collapsed by default (keeps the grid clean); expands to a short reason list. */
.art-why {
  margin-top: 0.4rem;
}

.art-why-toggle {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.art-why-toggle::after {
  content: "\25B8"; /* ▸ */
  font-size: 0.6rem;
  transition: transform 0.15s ease;
}

.art-why-toggle.art-why-open {
  color: var(--ink, var(--accent));
}

.art-why-toggle.art-why-open::after {
  transform: rotate(90deg); /* ▸ -> ▾ */
}

.art-why-toggle:hover {
  color: var(--accent);
}

.art-why-list {
  display: none;
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.art-why-list.open {
  display: block;
}

.art-why-list li {
  position: relative;
  padding-left: 0.85rem;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}

.art-why-list li::before {
  content: "\2022"; /* • */
  position: absolute;
  left: 0.1rem;
  color: var(--accent);
}

.perspective-note {
  margin: -0.5rem 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.perspective-note.corrected::before {
  content: "\2713 ";
}

/* FTC 16 CFR Part 255 disclosure, shown immediately above any set of affiliate-linked
   art results (find-art panel and each chat response) - see app.js's buildDisclosureBanner.
   Deliberately restrained rather than a heavy colored slab (which read as "in the way"):
   still clear and conspicuous per the FTC standard - distinct accent left-rule, its own
   tinted background, legible size, and always the first thing rendered directly above the
   results it applies to (no scrolling/clicking to reach it) - just not shouting. */
.affiliate-disclosure {
  background: var(--paper-2);
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding: 0.4rem 0.7rem;
  margin-bottom: 0.7rem;
  font-size: 0.75rem;
  line-height: 1.45;
  border-radius: 0 6px 6px 0;
}

.perspective-note.uncorrected::before {
  content: "\26A0 ";
}

.results {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.swatch-color {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.swatch-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.swatch-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.swatch-meta {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.swatch-bar-track {
  margin-top: 0.3rem;
  height: 3px;
  background: var(--line);
  overflow: hidden;
}

.swatch-bar-fill {
  height: 100%;
}

.chat-panel {
  margin-top: 1.5rem;
  border-radius: 16px;
}

.chat-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: -0.25rem;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.saved-pill {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.saved-pill strong {
  color: var(--ink);
  font-weight: 700;
}

/* Editable running summary of gathered preferences - see
   RedonChatWidget.renderSummary. Each chip's × re-asks the real chat to drop
   that preference (style keywords) or reopens the price card (price range). */
.chat-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.chat-summary:empty {
  display: none;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.chip-fact {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 0.35rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
}

.chip-fact button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}

.chip-fact button:hover {
  color: var(--accent);
}

/* The "More like this" pivot chip - tinted so it reads as a mode, not just another keyword. */
.chip-fact.chip-similar {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip-fact.chip-similar button { color: rgba(255, 255, 255, 0.75); }
.chip-fact.chip-similar button:hover { color: #fff; }

/* Quick-reply chips - a one-shot alternative to typing, see RedonChatWidget.renderChips. */
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 0.6rem;
}

.chat-chip {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  border-radius: 999px;
}

.chat-chip:hover {
  background: var(--accent);
  color: var(--paper);
}

.chat-chip:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Leading color swatch on a chip - used for room-accent picks. */
.chip-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: -2px;
  border: 1px solid var(--line);
}

/* Inline upload dropzone dropped into the chat stream - see RedonChatWidget.showImageDropzone. */
.chat-dropzone {
  position: relative;
  border: 1px dashed var(--line);
  border-radius: 12px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--paper-2);
  transition: border-color 0.15s ease, background 0.15s ease;
  margin: 0.3rem 0 0.6rem;
}

.chat-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.chat-dropzone-prompt {
  color: var(--muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.chat-dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* User bubble holding an uploaded-photo thumbnail. */
.chat-image-bubble {
  padding: 0.3rem;
}

.chat-uploaded-thumb {
  display: block;
  max-width: 160px;
  max-height: 160px;
  border-radius: 8px;
  object-fit: cover;
}

/* Inline price-range card - see RedonChatWidget.showPriceCard. Reuses the
   same .dual-range slider as everywhere else on the site, just built
   dynamically and dropped into the message stream instead of living as a
   persistent control outside the conversation. */
.price-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}

.price-card-eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-card-label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
}

.price-card-scale {
  display: flex;
  justify-content: space-between;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: -0.2rem;
}

.price-card-confirm {
  align-self: flex-start;
  margin-top: 0.4rem;
  padding: 0.6rem 1.1rem;
}

.price-card.confirmed {
  opacity: 0.55;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  /* Tall enough to show a full 6-card result batch (2 rows) at once, capped so it
     doesn't get absurd on large monitors; still scrolls internally past that, with
     the composer pinned below. On short screens min() falls back near the old height. */
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding: 0.25rem 0;
}

.chat-message {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 14px;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-top-right-radius: 4px;
}

.chat-message.note {
  align-self: flex-start;
  font-style: italic;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
}

/* Word-by-word typewriter reveal for assistant replies (see RedonChatWidget.typeInto): each word is
   its own span that softly fades in as it lands, and a caret blinks at the end while the line types. */
.type-word {
  animation: type-word-in 0.22s ease both;
}

@keyframes type-word-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chat-message.assistant.typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--muted);
  animation: type-caret 0.9s step-end infinite;
}

@keyframes type-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Three bouncing dots shown in an assistant-style bubble while a reply is
   pending - see RedonChatWidget.appendTypingIndicator. */
.chat-message.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.9rem;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-artwork-results {
  margin-top: 0.4rem;
  align-self: flex-start;
  max-width: 100%;
  width: 100%;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

@media (max-width: 720px) {
  .art-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.chat-art-card {
  position: relative;
  width: auto;
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-radius: 12px;
}

.chat-art-card .art-thumb {
  aspect-ratio: 4 / 5;
  height: auto;
}

.chat-art-card.leaving {
  opacity: 0;
  transform: scale(0.96);
}

.chat-art-feedback {
  display: flex;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem;
}

/* Round icon reaction buttons - see chat-widget.js's SAVE_ICON_SVG/DISMISS_ICON_SVG.
   Selected states mirror the accent (save) vs ink (dismiss) split used
   throughout for "the thing you want" vs "the thing that closes/removes". */
.feedback-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.feedback-btn svg {
  width: 13px;
  height: 13px;
  display: block;
}

.feedback-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.feedback-btn.up.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.feedback-btn.down.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.feedback-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Two overlapping <input type="range"> elements sharing one track - see
   RedonChatWidget.createPriceRangeSlider in chat-widget.js. Each input's own
   track/fill is made transparent so only .dual-range-track/.dual-range-fill show,
   and pointer-events are routed to the thumb only so the two inputs don't fight
   over drag events along the rest of the track. Sized for an easy grab target
   (not a hairline) since it's a primary in-conversation control. */
.dual-range {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
}

.dual-range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
}

.dual-range-fill {
  position: absolute;
  height: 5px;
  border-radius: 3px;
  background: var(--accent);
}

.dual-range input[type="range"] {
  position: absolute;
  left: 0;
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: transparent;
}

.dual-range input[type="range"]::-moz-range-track {
  background: transparent;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  margin-top: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: grab;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.dual-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  cursor: grab;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

#chat-form {
  margin-top: 0.75rem;
}

/* Composer row holding the textarea and the send button together, bounded by
   one hairline instead of two separately-bordered controls. */
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.15s ease;
  border-radius: 24px;
}

.chat-input-row:focus-within {
  border-color: var(--accent);
}

#chat-input {
  flex: 1;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  padding: 0.45rem 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}

#chat-input:focus {
  outline: none;
}

/* The site's "go" arrow motif, applied as a round button instead of a link. */
#chat-send-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Mono", monospace;
  font-size: 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-radius: 50%;
}

#chat-send-btn:hover:not(:disabled) {
  background: transparent;
  color: var(--ink);
}

#chat-send-btn:disabled {
  background: var(--line);
  border-color: var(--line);
  color: var(--paper);
  cursor: not-allowed;
}

#chat-input:disabled {
  color: var(--muted);
  cursor: not-allowed;
}
