﻿* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  background: #f4f6fb;
  color: #0f172a;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
}

.app-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem;
}

.app-header {
  padding: 1.5rem 1.25rem;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #2563eb;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: 2.2rem;
}

.lead {
  margin: 0.75rem 0 0;
  color: #475569;
  line-height: 1.6;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tab-button,
.pill,
button.primary,
button.secondary {
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tab-button,
.pill {
  background: #e2e8f0;
  color: #0f172a;
  padding: 0.85rem 1rem;
  font-weight: 600;
}

.tab-button.active,
.pill.active {
  background: #2563eb;
  color: #ffffff;
}

.tab-button:hover,
.pill:hover,
button:hover {
  transform: translateY(-1px);
}

.page-content {
  display: grid;
  gap: 1.5rem;
}

.page-section {
  display: block;
}

.visually-hidden {
  display: none !important;
}

.section-header,
.card-header,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header h2,
.card-header h3,
.section-title-row h3 {
  margin: 0;
  font-size: 1.2rem;
}

.section-header p,
.card p,
.meta {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.card-header span,
.section-title-row span,
.badge-meta {
  color: #64748b;
  font-size: 0.95rem;
}

button.primary {
  background: #2563eb;
  color: #ffffff;
  padding: 0.95rem 1.4rem;
  font-weight: 700;
}

button.secondary {
  background: #e2e8f0;
  color: #0f172a;
  padding: 0.85rem 1rem;
}

button.small {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

.search-panel {
  display: grid;
  gap: 1rem;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.search-box input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  font-size: 1rem;
}

.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.item-list,
.result-list {
  display: grid;
  gap: 0.9rem;
}

.list-item,
.result-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.list-item.vertical {
  flex-direction: column;
}

.news-card {
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.75rem;
}

.item-title,
.result-card a {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.item-subtitle,
.meta,
.snippet {
  color: #475569;
  font-size: 0.95rem;
}

.row-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}

.form-grid label {
  display: block;
  margin-bottom: 0.35rem;
  color: #475569;
  font-size: 0.95rem;
}

.form-grid input,
.form-grid select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  border: none;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.debug-panel {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 20px;
}

.debug-panel pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #1e293b;
  border-radius: 16px;
  padding: 1rem;
  margin: 0;
}
