:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #637083;
  --line: #d7dee8;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --accent: #176b87;
  --accent-strong: #0f536a;
  --accent-soft: #e5f4f7;
  --warn: #ad6b00;
  --shadow: 0 18px 40px rgba(25, 38, 52, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf1f5;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.workspace {
  display: grid;
  gap: 18px;
}

.topbar,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  padding: 8px 0 4px;
}

.brand-actions {
  display: grid;
  justify-items: end;
  gap: 14px;
}

.brand-logo {
  width: min(320px, 32vw);
  height: auto;
  display: block;
  transform: translateY(12px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  font-family:
    "Omnes Medium", Omnes, Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: 0;
}

.ig-library-title {
  color: #009fe3;
}

.complete-questionnaire-title {
  color: #009fe3;
}

p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 8px;
}

.tagline {
  font-size: 1.35rem;
  font-family:
    "Omnes Medium Italic", "Omnes Medium", Omnes, Inter, ui-sans-serif,
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: italic;
  font-weight: 500;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.memory-panel,
.answer-panel {
  display: grid;
  gap: 18px;
}

.dropzone {
  min-height: 154px;
  border: 1px dashed #9fb0c2;
  background: var(--surface-soft);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.compact {
  min-height: 104px;
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dropzone span {
  font-weight: 720;
}

.dropzone small {
  color: var(--muted);
}

.primary-button,
.ghost-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 42px;
  padding: 0 16px;
  font: inherit;
  font-weight: 680;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

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

#answerButton {
  background: #009fe3;
  justify-self: center;
  width: min(100%, 33.333%);
  min-width: 220px;
}

#answerButton:hover {
  background: #0089c4;
}

.ghost-button {
  background: #ffffff;
  color: var(--accent-strong);
  border-color: var(--line);
}

.small-button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.memory-actions {
  display: flex;
  justify-content: flex-end;
}

.counter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.9rem;
}

.results-panel {
  display: grid;
  gap: 18px;
}

.suggestions {
  display: grid;
  gap: 10px;
}

.suggestion {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.suggestion h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.suggestion p {
  margin: 0;
}

.answer {
  color: var(--ink);
  font-weight: 650;
}

.meta {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 10px;
}

.confidence {
  min-width: 74px;
  text-align: center;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 760;
  align-self: start;
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  background: #18212d;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1160px);
    padding: 18px 0 32px;
  }

  .topbar,
  .section-heading,
  .suggestion {
    display: grid;
  }

  .brand-actions {
    justify-items: start;
    width: 100%;
  }

  .brand-logo {
    width: min(280px, 78vw);
  }

  .primary-button,
  .download {
    width: 100%;
  }

  #answerButton {
    width: 33.333%;
    min-width: 180px;
  }

  .confidence {
    justify-self: start;
  }
}
