:root {
  color-scheme: light;
  --ink: #172022;
  --soft-ink: #5b676b;
  --line: #d8e0df;
  --paper: #f8faf8;
  --panel: #ffffff;
  --red: #d12b2b;
  --teal: #0d7f82;
  --blue: #275d83;
  --gold: #b77a1b;
  --shadow: 0 20px 50px rgba(23, 32, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  min-height: 36vh;
  display: flex;
  align-items: flex-end;
  padding: 32px clamp(18px, 4vw, 56px);
  color: white;
  background:
    linear-gradient(90deg, rgba(14, 20, 22, 0.84), rgba(14, 20, 22, 0.48), rgba(14, 20, 22, 0.1)),
    url("assets/amsterdam-helpdesk.png") center / cover;
}

.hero-copy {
  width: min(680px, 100%);
  padding-bottom: 16px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9ff0e9;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.15rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.intro {
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-actions button,
.ask-box button,
.admin-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: white;
  background: var(--red);
  font-weight: 800;
}

.quick-actions button {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 64vh;
}

.side-panel {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #edf4f1;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-row span {
  display: block;
  color: var(--soft-ink);
  font-size: 0.88rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-weight: 900;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.search-input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.ask-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.search-input {
  height: 44px;
  margin-bottom: 18px;
  padding: 0 12px;
}

.topic-list {
  display: grid;
  gap: 8px;
}

.topic-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.topic-button:hover,
.topic-button.is-selected {
  border-color: #bad4cf;
  background: white;
}

.topic-count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #dcebed;
  font-size: 0.82rem;
  font-weight: 800;
}

.notice {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #d5c39e;
  border-radius: 8px;
  background: #fff8e8;
}

.notice p,
.muted {
  color: var(--soft-ink);
  line-height: 1.55;
}

.main-panel {
  min-width: 0;
  padding: 24px clamp(18px, 4vw, 44px) 44px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--soft-ink);
  font-weight: 800;
}

.tab.is-active {
  color: white;
  background: var(--blue);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.assistant-top,
.library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--soft-ink);
  font-weight: 800;
  white-space: nowrap;
}

.ask-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.ask-box textarea,
.admin-form textarea {
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

.answer-card,
.faq-card,
.admin-layout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.answer-card {
  margin-top: 18px;
  padding: 20px;
}

.answer-title {
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 900;
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.source-pill,
.answer-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--blue);
  background: #e7f0f2;
  font-size: 0.82rem;
  font-weight: 800;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.faq-card {
  padding: 18px;
}

.faq-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.faq-card p {
  margin-bottom: 14px;
  color: var(--soft-ink);
  line-height: 1.5;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-footer span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--gold);
  background: #fff3d5;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: 26px;
  padding: 22px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--soft-ink);
  font-weight: 800;
}

.admin-form input,
.admin-form select {
  height: 42px;
  padding: 0 12px;
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topic-list,
  .faq-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .ask-box,
  .assistant-top,
  .library-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .ask-box button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  body {
    padding-bottom: 72px;
  }

  .hero {
    min-height: 42vh;
    padding: 24px 16px;
  }

  .side-panel,
  .main-panel {
    padding: 18px 16px;
  }

  .tabs {
    width: 100%;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    box-shadow: 0 12px 34px rgba(23, 32, 34, 0.22);
  }

  .tab {
    flex: 1;
    padding: 0 8px;
    font-size: 0.88rem;
  }

  .quick-actions button {
    flex: 1 1 100%;
  }

  .answer-card,
  .faq-card,
  .admin-layout {
    box-shadow: none;
  }
}
