:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2ef;
  color: #101820;
  --ink: #101820;
  --muted: #5d6864;
  --line: #d6ddd8;
  --paper: #fbfcfa;
  --green: #1f7a5c;
  --blue: #245c96;
  --red: #a83a3a;
  --amber: #d58d2b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(238, 242, 239, 0.3), rgba(238, 242, 239, 1)),
    radial-gradient(circle at 80% 10%, rgba(31, 122, 92, 0.16), transparent 28rem),
    radial-gradient(circle at 10% 0%, rgba(36, 92, 150, 0.14), transparent 22rem);
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
}

.eyebrow,
.empty-kicker,
.area {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 2px 0 0;
  font-size: 2.15rem;
  line-height: 1;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(251, 252, 250, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.ready {
  color: var(--green);
}

.status-pill.demo {
  color: var(--amber);
}

.hero {
  margin: 28px 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.hero p {
  margin: 0;
  color: #29342f;
  font-size: 1.08rem;
  line-height: 1.48;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 0 14px;
  backdrop-filter: blur(16px);
}

.topic-button {
  min-height: 76px;
  border: 1px solid rgba(16, 24, 32, 0.12);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.86);
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 6px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.topic-button.active,
.topic-button:focus-visible {
  outline: none;
  border-color: rgba(31, 122, 92, 0.65);
  background: #ffffff;
  transform: translateY(-1px);
}

.button-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #101820;
  color: white;
  font-size: 1rem;
}

.brief {
  margin-top: 10px;
}

.empty-state,
.loading-state,
.error-state,
.brief-card {
  border: 1px solid rgba(16, 24, 32, 0.11);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.9);
  box-shadow: 0 18px 45px rgba(30, 39, 34, 0.08);
}

.empty-state,
.loading-state,
.error-state {
  min-height: 300px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 26px;
}

.empty-state h2,
.loading-state h2,
.error-state h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.16;
}

.error-state p,
.loading-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.brief-card {
  overflow: hidden;
  padding: 22px;
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.brief-card h2 {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.12;
}

.news-hook {
  margin: 14px 0 18px;
  color: #29342f;
  font-size: 1.02rem;
  line-height: 1.48;
}

.section-block,
.section-grid {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.section-grid {
  display: grid;
  gap: 16px;
}

h3 {
  margin: 0 0 8px;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p {
  line-height: 1.52;
}

.section-block p {
  margin: 0;
  color: #29342f;
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
  color: #29342f;
}

li + li {
  margin-top: 8px;
}

.strategy-block {
  border-left: 4px solid var(--green);
  padding-left: 14px;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.sources a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 750;
}

.sources-label {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (min-width: 460px) {
  .section-grid {
    grid-template-columns: 1fr 1fr;
  }
}
