:root {
  --ink: #16302d;
  --muted: #5c6d69;
  --line: #d7e3df;
  --paper: #f8fbfa;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0d4f4a;
  --warm: #f0a35b;
  --danger: #b42318;
  --danger-bg: #fff0ed;
  --blue: #1f5f8b;
  --shadow: 0 22px 60px rgba(22, 48, 45, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(248, 251, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.top-nav a {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--accent-dark);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px) 28px;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 44%),
    linear-gradient(180deg, #ffffff, #f5faf8);
}

.hero-copy {
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  max-width: 760px;
  font-size: clamp(38px, 5.8vw, 68px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.2;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

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

.button.secondary {
  background: #fff;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  min-height: 340px;
  max-height: 620px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice-band {
  padding: 16px clamp(18px, 4vw, 56px);
  color: #4a2607;
  background: #fff4df;
  border-block: 1px solid #f1d6aa;
}

.room-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
  padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 56px);
  background: #eef8f6;
}

.room-main,
.room-sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.room-main {
  padding: clamp(18px, 3vw, 30px);
}

.room-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.room-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.room-head p {
  color: var(--muted);
}

.room-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 230px;
}

.room-badges span {
  padding: 7px 9px;
  color: var(--accent-dark);
  background: #eef8f6;
  border: 1px solid #cce6e1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.room-warning {
  margin: 14px 0 18px;
  padding: 12px 14px;
  color: #4a2607;
  background: #fff4df;
  border: 1px solid #f1d6aa;
  border-radius: 8px;
}

.message-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.message-card {
  padding: 14px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message-card p {
  margin-bottom: 12px;
}

.message-meta,
.message-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.message-meta {
  margin-bottom: 10px;
}

.message-meta span,
.message-meta time {
  padding: 5px 8px;
  color: var(--muted);
  background: #f1f6f4;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.message-meta span:first-child {
  color: #fff;
  background: var(--accent-dark);
}

.message-actions button,
.room-sidebar button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.composer {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f5fbf9;
  border: 1px solid #cce6e1;
  border-radius: 8px;
}

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

.composer label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.composer select,
.composer textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.composer textarea {
  resize: vertical;
}

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

.composer-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.room-sidebar {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.room-sidebar h3 {
  margin-bottom: 2px;
}

.mod-card {
  padding: 14px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mod-card p {
  margin: 0;
  color: var(--muted);
}

.room-open {
  margin-top: 14px;
}

.chat-shell,
.section {
  padding: clamp(36px, 6vw, 76px) clamp(18px, 4vw, 56px);
}

.network-strip {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  gap: 22px;
  padding: clamp(30px, 5vw, 58px) clamp(18px, 4vw, 56px);
  align-items: start;
}

.chat-panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.chat-panel {
  padding: clamp(18px, 3vw, 32px);
}

.hero-chat {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.side-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 22px;
}

.side-panel h2 {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 22px;
}

.network-media {
  margin: 0;
}

.network-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.side-panel a,
.specialist-grid a {
  padding: 11px 12px;
  color: var(--accent-dark);
  background: #eef8f6;
  border: 1px solid #cce6e1;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 24px;
}

.section-heading p {
  color: var(--muted);
}

.symptom-form {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.symptom-form label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.symptom-form input {
  flex: 1 1 360px;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.quick-grid button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f9fcfb;
  font-weight: 800;
  cursor: pointer;
}

.quick-grid button:hover {
  border-color: var(--accent);
}

.result-card {
  padding: 18px;
  background: #f5fbf9;
  border: 1px solid #cce6e1;
  border-radius: 8px;
}

.result-card.urgent {
  color: #4a120d;
  background: var(--danger-bg);
  border-color: #f3b8af;
}

.result-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.red-section {
  background: #ffffff;
}

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

.card-grid article {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card-grid article p {
  color: var(--muted);
}

.room-table {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.room-row:first-child {
  border-top: 0;
}

.room-row span {
  padding: 14px;
  border-left: 1px solid var(--line);
}

.room-row span:first-child {
  border-left: 0;
}

.room-row.header {
  color: #fff;
  background: var(--accent-dark);
  font-weight: 800;
}

.specialist-section {
  background: #ffffff;
}

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

.site-footer {
  padding: 24px clamp(18px, 4vw, 56px);
  color: var(--muted);
  background: #102724;
}

.site-footer p {
  margin: 0;
  max-width: 980px;
  color: #d7e3df;
}

@media (max-width: 860px) {
  .hero,
  .network-strip,
  .room-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

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

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

  .room-head {
    display: block;
  }

  .room-badges {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: 40px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .input-row .button,
  .composer-actions .button {
    width: 100%;
  }

  .quick-grid,
  .card-grid,
  .specialist-grid,
  .side-panel {
    grid-template-columns: 1fr;
  }

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

  .room-row {
    grid-template-columns: 1fr;
  }

  .room-row span {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .room-row span:first-child {
    border-top: 0;
  }
}
