:root {
  --bg: #f6efe4;
  --bg-strong: #f1e3c8;
  --paper: rgba(255, 252, 247, 0.8);
  --paper-solid: #fffaf1;
  --line: rgba(74, 58, 42, 0.14);
  --text: #1f2933;
  --muted: #65594a;
  --teal: #0d6e6e;
  --teal-soft: #d7f0ec;
  --coral: #d76d4f;
  --coral-soft: #ffe0d6;
  --amber: #cc8b2f;
  --amber-soft: #ffecc5;
  --good: #2f8f6b;
  --warning: #c97218;
  --critical: #be4b3d;
  --shadow: 0 22px 56px rgba(110, 84, 47, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(215, 109, 79, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(13, 110, 110, 0.18), transparent 30%),
    linear-gradient(180deg, #f9f3ea 0%, #efe3d0 100%);
  font-family: "Noto Sans SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea,
input {
  font: inherit;
}

.atlas-shell,
.phone-shell {
  position: relative;
  z-index: 1;
}

.atlas-shell {
  width: min(1440px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.atlas-shell-landing {
  padding-top: 36px;
}

.atlas-badge-row,
.quick-chip-row,
.action-row,
.topbar-actions,
.question-banner-meta,
.phone-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.atlas-badge,
.signal-pill,
.quick-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  backdrop-filter: blur(14px);
}

.atlas-badge-accent {
  background: var(--teal-soft);
  color: var(--teal);
}

.atlas-kicker,
.panel-eyebrow,
.hero-stat-label,
.decision-label {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

.atlas-hero,
.question-banner,
.phone-hero-card {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 32px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.92), rgba(255, 244, 223, 0.75)),
    rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.atlas-hero-copy {
  margin: 20px 0 24px;
  max-width: 860px;
}

.atlas-hero h1,
.workbench-topbar h1,
.phone-topbar h1,
.question-banner h2,
.phone-hero-card h2 {
  margin: 8px 0 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  line-height: 1.02;
}

.atlas-hero h1 {
  font-size: clamp(44px, 7vw, 78px);
}

.atlas-lead {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.atlas-hero-grid,
.landing-grid,
.desktop-grid,
.metric-grid,
.benchmark-list,
.phone-signal-list,
.phone-post-list,
.phone-action-list {
  display: grid;
  gap: 18px;
}

.atlas-hero-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stat-card,
.glass-panel,
.phone-panel,
.signal-card,
.post-card,
.action-card,
.agenda-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(102, 78, 48, 0.08);
  backdrop-filter: blur(16px);
}

.hero-stat-card {
  padding: 18px 18px 20px;
}

.hero-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.15;
}

.hero-stat-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-stat-card-coral {
  background: linear-gradient(180deg, rgba(255, 234, 227, 0.85), rgba(255, 255, 255, 0.8));
}

.hero-stat-card-amber {
  background: linear-gradient(180deg, rgba(255, 243, 215, 0.9), rgba(255, 255, 255, 0.8));
}

.landing-grid {
  margin-top: 24px;
  grid-template-columns: 1.2fr 0.8fr;
}

.landing-grid .benchmark-panel {
  grid-column: 1 / -1;
}

.glass-panel,
.phone-panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.discussion-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.compact-heading h2 {
  font-size: 24px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

#question-input,
.link-preview-group input {
  width: 100%;
  border: 1px solid rgba(90, 71, 47, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 18px 20px;
  color: var(--text);
}

#question-input {
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
}

.action-row {
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border-radius: 999px;
  border: none;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.quick-chip:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, #0d6e6e, #1c8c8c);
  color: #f7fffd;
  box-shadow: 0 14px 30px rgba(13, 110, 110, 0.24);
}

.secondary-button {
  background: linear-gradient(135deg, #d76d4f, #c85d40);
  color: #fff7f3;
  box-shadow: 0 14px 30px rgba(215, 109, 79, 0.24);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid var(--line);
}

.small-button {
  padding: 10px 16px;
}

.full-button {
  width: 100%;
}

.quick-chip {
  cursor: pointer;
}

.link-preview-group + .link-preview-group {
  margin-top: 16px;
}

.micro-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.benchmark-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benchmark-item {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.benchmark-item h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.benchmark-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.workbench-topbar,
.phone-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.workbench-topbar h1,
.phone-topbar h1 {
  font-size: clamp(28px, 4vw, 46px);
}

.ghost-inline-link {
  color: var(--teal);
  font-weight: 700;
}

.question-banner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.question-banner h2 {
  font-size: clamp(24px, 3vw, 42px);
  max-width: 900px;
}

.signal-pill {
  font-size: 13px;
}

.signal-critical {
  color: var(--critical);
  background: rgba(190, 75, 61, 0.1);
}

.signal-warning {
  color: var(--warning);
  background: rgba(201, 114, 24, 0.12);
}

.signal-good {
  color: var(--good);
  background: rgba(47, 143, 107, 0.12);
}

.desktop-grid {
  grid-template-columns: 290px minmax(0, 1fr) 320px;
  align-items: start;
}

.desktop-center-column {
  display: grid;
  gap: 18px;
}

.agenda-list,
.discussion-list,
.action-list {
  display: grid;
  gap: 14px;
}

.agenda-card,
.post-card,
.action-card {
  padding: 16px;
}

.task-status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.task-status-pill[data-status="queued"] {
  color: var(--muted);
}

.task-status-pill[data-status="running"] {
  color: var(--warning);
}

.task-status-pill[data-status="done"] {
  color: var(--good);
}

.agenda-card.active-card,
.metric-card.active-card {
  border-color: rgba(13, 110, 110, 0.35);
  background: linear-gradient(180deg, rgba(215, 240, 236, 0.82), rgba(255, 255, 255, 0.84));
}

.agenda-card h3,
.metric-card h3,
.post-card h3,
.action-card h3,
.phone-note-card h3 {
  margin: 0;
  font-size: 20px;
}

.agenda-card p,
.metric-card p,
.post-card p,
.action-card p,
.phone-note-card p,
.phone-action-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
  padding: 18px;
}

.metric-topline,
.post-meta,
.action-meta,
.phone-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.metric-value-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: baseline;
}

.metric-value {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 42px;
  line-height: 1;
}

.metric-target {
  color: var(--muted);
}

.metric-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.metric-status[data-tone="critical"] {
  color: var(--critical);
}

.metric-status[data-tone="warning"] {
  color: var(--warning);
}

.metric-status[data-tone="good"] {
  color: var(--good);
}

.post-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 242, 233, 0.84));
}

.post-card.live-card {
  border-color: rgba(13, 110, 110, 0.32);
  background: linear-gradient(180deg, rgba(215, 240, 236, 0.78), rgba(255, 255, 255, 0.84));
}

.post-tag,
.action-tag {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(13, 110, 110, 0.09);
  color: var(--teal);
}

.decision-card,
.share-card {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.decision-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.decision-card p:last-child,
.share-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.share-link {
  display: block;
  margin: 10px 0 12px;
  color: var(--teal);
  font-weight: 700;
}

.phone-shell {
  width: min(430px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

.phone-topbar {
  align-items: center;
  margin-bottom: 14px;
}

.phone-topbar h1 {
  margin-top: 4px;
  font-size: 32px;
}

.phone-hero-card {
  padding: 22px;
}

.phone-hero-card h2 {
  font-size: 28px;
  line-height: 1.14;
}

.phone-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.phone-panel {
  padding: 18px;
}

.signal-card,
.phone-note-card,
.phone-action-card {
  padding: 16px;
}

.phone-note-card,
.phone-action-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.phone-note-card h3,
.phone-action-card h3 {
  font-size: 18px;
}

.phone-action-card strong {
  display: block;
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .atlas-shell {
    width: min(100vw - 28px, 1200px);
  }

  .landing-grid,
  .desktop-grid,
  .atlas-hero-grid,
  .benchmark-list,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .question-banner {
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .atlas-shell {
    width: min(100vw - 20px, 1200px);
    padding-top: 18px;
  }

  .atlas-hero,
  .question-banner,
  .glass-panel {
    border-radius: 24px;
    padding: 18px;
  }

  .panel-heading h2 {
    font-size: 22px;
  }

  .atlas-hero h1 {
    font-size: 42px;
  }
}
