:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-2: #f1f5f7;
  --text: #1d252c;
  --muted: #687481;
  --line: #dce4e9;
  --blue: #2378c8;
  --blue-soft: #e7f2fb;
  --green: #22845e;
  --green-soft: #e5f5ee;
  --coral: #d86346;
  --coral-soft: #fbeae5;
  --shadow: 0 18px 48px rgba(29, 37, 44, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 15px;
  font-weight: 720;
  gap: 10px;
  letter-spacing: 0;
}

.brand.compact {
  font-size: 14px;
}

.brand-mark {
  align-items: center;
  background: var(--text);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.top-nav {
  align-items: center;
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-button,
.primary-button,
.secondary-button,
.icon-button,
.text-button,
.segment,
.side-link {
  border: 0;
  cursor: pointer;
}

.nav-button,
.primary-button {
  background: var(--text);
  border-radius: var(--radius);
  color: white;
  font-size: 14px;
  font-weight: 680;
  padding: 10px 14px;
}

.primary-button.small {
  padding: 9px 12px;
}

.secondary-button,
.secondary-link {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  display: inline-flex;
  font-size: 14px;
  font-weight: 650;
  justify-content: center;
  padding: 10px 14px;
}

.secondary-button.full-width {
  width: 100%;
}

.hero-section {
  align-items: center;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  min-height: calc(100vh - 74px);
  padding: 58px clamp(20px, 5vw, 72px) 36px;
}

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

.hero-copy h1 {
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0 0 22px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
  margin: 0;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-height: 430px;
  padding: 18px;
}

.preview-toolbar {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 7px;
  padding: 0 0 14px;
}

.preview-toolbar span {
  background: #cfd9df;
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.preview-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.2fr 0.8fr;
  padding-top: 16px;
}

.preview-large,
.preview-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 148px;
  padding: 18px;
}

.preview-large {
  grid-row: span 2;
}

.preview-large strong {
  display: block;
  font-size: 34px;
  line-height: 1.1;
  margin-top: 26px;
}

.preview-large p,
.preview-label {
  color: var(--muted);
}

.preview-card.accent {
  background: var(--green-soft);
  border-color: #b9ddcc;
}

.preview-card strong {
  display: block;
  margin-top: 34px;
}

.utility-section,
.contact-section {
  padding: 72px clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 720px;
}

.section-heading h2,
.contact-section h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 12px;
}

.section-heading p,
.contact-section p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

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

.utility-card,
.contact-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.utility-card {
  padding: 22px;
}

.utility-icon {
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
  margin-bottom: 36px;
}

.utility-card h3 {
  font-size: 20px;
  margin: 0 0 10px;
}

.utility-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.contact-section {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 clamp(20px, 5vw, 72px) 72px;
  padding: 30px;
}

.contact-link {
  background: var(--blue-soft);
  border: 1px solid #bfdaef;
  border-radius: var(--radius);
  color: var(--blue);
  font-weight: 720;
  padding: 12px 14px;
}

.app-shell {
  background: var(--bg);
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  inset: 0;
  min-height: 100vh;
  position: fixed;
  z-index: 50;
}

.app-shell.is-hidden {
  display: none;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
  padding: 18px;
}

.sidebar-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.icon-button {
  align-items: center;
  background: var(--surface-2);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.side-nav {
  display: grid;
  gap: 5px;
}

.side-link {
  background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  padding: 11px 12px;
  text-align: left;
}

.side-link.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.login-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 14px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.login-card span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dashboard {
  min-height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  padding: 24px;
}

.dashboard-header {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dashboard-header h2 {
  font-size: 30px;
  margin: 0 0 6px;
}

.dashboard-header p {
  color: var(--muted);
  margin: 0;
}

.quick-add {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 8px;
  padding: 8px;
}

.quick-add input,
.quick-add select {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  min-height: 38px;
  padding: 0 10px;
}

.quick-add input {
  width: min(31vw, 320px);
}

.content-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(230px, 0.75fr) minmax(320px, 1.25fr) minmax(250px, 0.8fr);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.panel-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-heading h3 {
  font-size: 16px;
  margin: 0;
}

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

.agenda-list,
.task-list,
.mailbox-list,
.message-list,
.member-list,
.right-rail {
  display: grid;
  gap: 10px;
}

.agenda-item,
.task-row,
.mailbox-row,
.message-row,
.member-row {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  padding: 11px;
}

.agenda-time {
  color: var(--blue);
  flex: 0 0 62px;
  font-size: 13px;
  font-weight: 760;
}

.agenda-item strong,
.task-main strong,
.mailbox-row strong,
.message-row strong,
.member-row strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.agenda-item span,
.task-main span,
.mailbox-row span,
.message-row span,
.member-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.segmented {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  padding: 3px;
}

.segment {
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  padding: 7px 10px;
}

.segment.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(29, 37, 44, 0.08);
}

.task-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.task-row input[type="checkbox"] {
  accent-color: var(--green);
  height: 18px;
  width: 18px;
}

.task-row.is-done .task-main strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-meta {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.priority-dot {
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.priority-dot.high {
  background: var(--coral);
}

.priority-dot.normal {
  background: var(--blue);
}

.priority-dot.low {
  background: var(--green);
}

.tag {
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 720;
  padding: 5px 8px;
  white-space: nowrap;
}

.text-button {
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 720;
}

.status-dot {
  background: var(--green);
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.mailbox-row {
  align-items: start;
}

.mailbox-row div,
.message-row div,
.member-row div,
.task-main {
  min-width: 0;
}

.mailbox-icon {
  align-items: center;
  background: var(--blue-soft);
  border-radius: 7px;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 13px;
  font-weight: 760;
  height: 34px;
  justify-content: center;
}

.member-avatar {
  align-items: center;
  background: var(--text);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 13px;
  font-weight: 760;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.login-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
}

.login-dialog::backdrop {
  background: rgba(29, 37, 44, 0.32);
}

.login-dialog form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.dialog-heading h2 {
  font-size: 22px;
  margin: 0 0 6px;
}

.dialog-heading p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.login-options {
  display: grid;
  gap: 8px;
}

.login-option {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1100px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

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

@media (max-width: 780px) {
  .site-header,
  .top-nav,
  .dashboard-header,
  .contact-section {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav {
    gap: 10px;
  }

  .hero-section {
    padding-top: 36px;
  }

  .preview-grid,
  .utility-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    overflow: auto;
    position: absolute;
  }

  .sidebar {
    min-height: auto;
  }

  .quick-add {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-add input,
  .quick-add select {
    width: 100%;
  }
}
