:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --text: #17212b;
  --muted: #627080;
  --line: #d8e0e8;
  --brand: #145c65;
  --brand-strong: #0d454d;
  --accent: #b4442f;
  --ok: #28724f;
  --warn: #9a6a10;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 28px;
}

.brand {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 12px;
  min-width: 220px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  width: 40px;
}

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

.brand small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

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

.topnav a,
.logout-form button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 9px 12px;
}

.topnav a:hover,
.logout-form button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.topnav .nav-action {
  border-color: var(--brand);
  color: var(--brand);
}

.logout-form {
  margin: 0;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px 24px 56px;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.welcome-hero {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 380px;
}

.welcome-copy {
  background:
    linear-gradient(90deg, rgba(13, 69, 77, 0.92), rgba(13, 69, 77, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='640' viewBox='0 0 1200 640'%3E%3Crect width='1200' height='640' fill='%2398b7af'/%3E%3Cpath d='M0 490 C170 430 250 470 390 405 C560 326 705 350 850 270 C1010 182 1080 200 1200 132 L1200 640 L0 640 Z' fill='%235e8279'/%3E%3Cpath d='M0 560 C210 510 340 545 520 486 C710 424 800 450 980 360 C1075 312 1140 298 1200 282 L1200 640 L0 640 Z' fill='%233d685f'/%3E%3Ccircle cx='970' cy='125' r='54' fill='%23f2d38b'/%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 38px;
}

.welcome-copy .eyebrow,
.welcome-copy .lead {
  color: rgba(255, 255, 255, 0.84);
}

.welcome-copy h1 {
  color: #fff;
  font-size: 44px;
  max-width: 720px;
}

.welcome-copy .button.ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.welcome-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
}

.welcome-aside strong {
  display: block;
  font-size: 24px;
  line-height: 1.22;
  margin: 10px 0 12px;
}

.welcome-aside p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.aside-label {
  align-self: flex-start;
  background: #e4f4ec;
  border-radius: 999px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.hero-copy,
.panel,
.status-panel,
.login-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 34px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 36px;
  line-height: 1.15;
  margin-bottom: 14px;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 10px;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
}

.button:hover {
  text-decoration: none;
}

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

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

.button.secondary {
  background: var(--surface-2);
  color: var(--text);
}

.button.ghost {
  background: var(--surface);
  color: var(--brand);
}

.button.full {
  width: 100%;
}

.status-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.status-panel > div,
.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
  padding: 24px;
}

.metric {
  color: var(--brand-strong);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.label {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.workbench,
.metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.notice-band {
  align-items: center;
  background: var(--brand-strong);
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px 22px;
}

.notice-band div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notice-band span {
  color: rgba(255, 255, 255, 0.78);
}

.notice-band a {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.home-section {
  margin-top: 32px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 28px;
  margin-bottom: 0;
}

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

.service-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 210px;
  padding: 22px;
}

.service-icon {
  color: var(--accent);
  display: block;
  font-weight: 800;
  margin-bottom: 24px;
}

.service-grid h3 {
  font-size: 19px;
  margin: 0 0 10px;
}

.service-grid p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.home-split {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.compact-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-metrics > div {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 18px;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.contact-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.contact-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
}

.workbench article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.workbench p,
.muted {
  color: var(--muted);
}

.page-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-head h1 {
  margin-bottom: 0;
}

.split-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  margin-top: 18px;
}

.panel {
  padding: 22px;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: -2px 0 14px;
  padding-bottom: 12px;
}

.panel-head h2 {
  margin-bottom: 0;
}

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

.row-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}

.row-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

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

.task-list {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
  padding-left: 20px;
}

.meeting-list {
  display: grid;
  gap: 12px;
}

.meeting-item {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.meeting-item h2 {
  margin: 8px 0 6px;
}

.meeting-item p {
  color: var(--muted);
  margin-bottom: 0;
}

.status {
  background: var(--surface-2);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
  padding: 4px 9px;
}

.status.open {
  background: #e4f4ec;
  color: var(--ok);
}

.status.closed {
  background: #eeeef0;
}

.status.draft,
.status.neutral {
  background: #fbf1df;
  color: var(--warn);
}

.question-count {
  align-items: center;
  background: var(--surface-2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 14px;
}

.question-count strong {
  font-size: 24px;
}

.question-count span {
  color: var(--muted);
  font-size: 13px;
}

.auth-layout {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.auth-copy {
  padding-top: 28px;
}

.login-card {
  padding: 24px;
}

.login-card form {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.login-card label {
  display: block;
  margin-bottom: 16px;
}

.login-card label span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}

.login-card input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

.login-card input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(20, 92, 101, 0.15);
}

.form-error {
  background: #fff0ed;
  border: 1px solid #f0c7bd;
  border-radius: 6px;
  color: #96341f;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.form-grid label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.form-grid input,
.form-grid select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 42px;
  padding: 9px 10px;
}

.document-body {
  color: var(--text);
  line-height: 1.65;
  max-width: 880px;
}

@media (max-width: 860px) {
  .topbar,
  .page-head,
  .meeting-item {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    padding: 14px 18px;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hero,
  .welcome-hero,
  .workbench,
  .metrics-grid,
  .split-layout,
  .auth-layout,
  .service-grid,
  .home-split,
  .compact-metrics {
    grid-template-columns: 1fr;
  }

  .notice-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy {
    padding: 24px;
  }

  .welcome-copy {
    min-height: 420px;
    padding: 26px;
  }

  h1 {
    font-size: 30px;
  }

  .welcome-copy h1 {
    font-size: 34px;
  }
}
