:root {
  --navy: #102033;
  --charcoal: #293241;
  --muted: #667085;
  --line: #d8dee8;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --accent: #00689d;
  --accent-strong: #004b73;
  --yellow: #f9bc26;
  --red: #e5243b;
  --green: #4c9f38;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(16, 32, 51, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--charcoal);
  background: var(--soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.sdg-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  background:
    conic-gradient(
      #e5243b 0 21deg,
      #dda63a 21deg 42deg,
      #4c9f38 42deg 63deg,
      #c5192d 63deg 84deg,
      #ff3a21 84deg 105deg,
      #26bde2 105deg 126deg,
      #fcc30b 126deg 147deg,
      #a21942 147deg 168deg,
      #fd6925 168deg 189deg,
      #dd1367 189deg 210deg,
      #fd9d24 210deg 231deg,
      #bf8b2e 231deg 252deg,
      #3f7e44 252deg 273deg,
      #0a97d9 273deg 294deg,
      #56c02b 294deg 315deg,
      #00689d 315deg 336deg,
      #19486a 336deg 360deg
    );
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.95);
}

.sdg-logo span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #102033;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 1.15rem;
  margin-bottom: 0;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--navy);
  margin-bottom: 12px;
}

h3 {
  color: var(--navy);
  margin-bottom: 10px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 8px;
}

.sidebar .eyebrow {
  color: #94d7ff;
}

.tagline {
  color: #dcecff;
  line-height: 1.5;
}

.step-nav {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.step-nav button {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: #e8f4ff;
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
}

.step-nav button.active {
  background: #ffffff;
  color: var(--navy);
}

.workspace {
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-panel,
.screen {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-panel {
  min-height: 260px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  border-top: 5px solid var(--accent);
}

.hero-panel p {
  max-width: 830px;
  line-height: 1.55;
  color: var(--muted);
}

.screen {
  display: none;
  padding: 28px;
}

.screen.active {
  display: block;
}

.screen-header {
  max-width: 820px;
  margin-bottom: 24px;
}

.screen-header p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.form-grid,
.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 700;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--charcoal);
  background: white;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: var(--radius);
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.primary {
  color: white;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-strong);
}

.ghost {
  color: var(--navy);
  background: #eef4fa;
  border: 1px solid #d9e5f0;
}

.sidebar .ghost {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.full {
  width: 100%;
}

.sidebar-credit {
  margin-top: auto;
  margin-bottom: 0;
  color: #dcecff;
  font-size: 0.86rem;
  line-height: 1.45;
}

.sidebar-credit a {
  color: #94d7ff;
  font-weight: 800;
  text-decoration: none;
}

.sidebar-credit a:hover {
  text-decoration: underline;
}

.option-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 14px;
}

.option-card,
.info-card,
.method-card,
.day-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 17px;
}

.option-card {
  min-height: 96px;
  text-align: left;
}

.option-card.selected,
.info-card.selected,
.method-card.selected,
.day-card.selected {
  outline: 3px solid rgba(0, 104, 157, 0.2);
  border-color: var(--accent);
}

.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-row,
.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.helper {
  color: var(--muted);
  font-size: 0.92rem;
}

.sdg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  color: white;
  background: var(--accent);
}

.info-card ul,
.brief-card ul,
.blueprint ul {
  padding-left: 18px;
  line-height: 1.58;
}

.info-card p,
.day-card p,
.method-card p {
  color: var(--muted);
  line-height: 1.5;
}

.insight-panel {
  margin-top: 18px;
  border-left: 5px solid var(--yellow);
  background: #fff9e8;
  padding: 18px;
  border-radius: var(--radius);
}

.story-methods {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

.method-card.primary-method {
  border-top: 5px solid var(--accent);
}

.brief-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.brief-card,
.prompt-card,
.blueprint {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 22px;
}

.brief-card {
  line-height: 1.6;
}

.brief-card section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.prompt-card textarea {
  min-height: 430px;
  background: #f8fafc;
}

.pager {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(12px);
  padding: 14px 0 0;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #dbe5ef;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(120%);
  transition: transform 0.2s ease;
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.toast.show {
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .hero-panel,
  .brief-layout,
  .story-methods {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar,
  .screen,
  .hero-panel {
    padding: 18px;
  }

  .form-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .step-nav {
    grid-template-columns: 1fr;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .progress {
    order: -1;
  }
}
