/* Kitchen Verdict — slate, brass, and ember */
:root {
  --bg-deep: #080b10;
  --bg-mid: #0f1419;
  --bg-top: #151c26;
  --surface: rgba(30, 41, 59, 0.72);
  --surface-raised: rgba(51, 65, 85, 0.55);
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(251, 191, 36, 0.22);
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --accent-bright: #fbbf24;
  --accent-deep: #d97706;
  --ember: #f97316;
  --ember-deep: #ea580c;
  --cream: #fffbeb;
  --glow-amber: rgba(245, 158, 11, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --shadow-panel: 0 4px 6px rgba(0, 0, 0, 0.15), 0 24px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image: radial-gradient(ellipse 100% 80% at 50% -30%, rgba(245, 158, 11, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 50%, rgba(249, 115, 22, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(59, 130, 246, 0.06), transparent),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 55%, #06080c 100%);
  background-attachment: fixed;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--cream);
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--cream);
  color: var(--bg-deep);
  z-index: 100;
  border-radius: 8px;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.75rem 1.15rem 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top: creator link */
.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.creator-site {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.creator-site:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 0 0 1px var(--glow-amber);
  color: var(--cream);
}
.creator-site__label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.creator-site__url {
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 0.02em;
}
.creator-site:hover .creator-site__url {
  color: var(--cream);
}

/* Header + logo */
.brand {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(251, 191, 36, 0.15);
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.15rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  line-height: 1.12;
  background: linear-gradient(120deg, var(--cream) 0%, var(--accent-bright) 45%, var(--ember) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 38ch;
  line-height: 1.5;
}

/* Panel */
.panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 0.35rem;
  background: rgba(0, 0, 0, 0.15);
}

.tab {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 1rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab:hover {
  color: var(--text-soft);
}

.tab[aria-selected="true"] {
  color: var(--cream);
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--ember), var(--accent-bright));
  box-shadow: 0 -2px 12px var(--glow-amber);
}

.panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.1rem 1.15rem 1.2rem;
}

.view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.view.is-active {
  display: flex;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.9rem;
}

.heat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.heat-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 160px;
}

.heat-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 6px;
}

.btn-ghost {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: rgba(51, 65, 85, 0.75);
  color: var(--cream);
}

.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.starters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.chip {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.chip:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--cream);
  background: rgba(245, 158, 11, 0.08);
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.35rem 0 0.5rem;
  min-height: 200px;
  max-height: min(52vh, 480px);
}

.msg {
  max-width: 92%;
  padding: 0.8rem 1.05rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.45;
  animation: pop 0.28s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 88, 12, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-bottom-right-radius: 5px;
}

.msg-chef {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}

.msg-chef .chef-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.msg-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
}

.btn-mini {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
}

.btn-mini:hover {
  color: var(--cream);
  border-color: var(--muted);
}

.typing {
  align-self: flex-start;
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: none;
}

.typing.on {
  display: block;
}

.typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  margin: 0 2px;
  animation: bounce 0.55s ease infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.12s;
}
.typing span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.compose {
  display: flex;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.compose input {
  flex: 1;
  padding: 0.8rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 11, 16, 0.55);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.compose input::placeholder {
  color: var(--muted);
}

.compose input:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px var(--glow-amber);
}

.compose .btn-send {
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 0.8rem 1.35rem;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--ember) 55%, var(--ember-deep) 100%);
  color: #0f0a05;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.compose .btn-send:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(249, 115, 22, 0.4);
}

.compose .btn-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.45;
}

.inline-code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--accent-bright);
  font-family: ui-monospace, monospace;
}

.compare-stack {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 180px;
  max-height: min(48vh, 440px);
  padding: 0.25rem 0;
}

.compare-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(8, 11, 16, 0.35);
}

.compare-block .prompt {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-style: italic;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.compare-cell {
  padding: 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  min-height: 4rem;
}

.compare-cell + .compare-cell {
  border-left: 1px solid var(--border);
}

.compare-cell h4 {
  margin: 0 0 0.45rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

.compare-cell.chef h4 {
  color: var(--accent-bright);
}

.compare-cell.loading {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 560px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .compare-cell + .compare-cell {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .chat-scroll {
    max-height: 45vh;
  }
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-strong);
  color: var(--cream);
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.35rem 1rem;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.footer-logo svg {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
  font-weight: 700;
}

.footer-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.footer-links {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.footer-links a {
  font-weight: 600;
}

.footer-dot {
  margin: 0 0.4rem;
  color: var(--muted);
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
