:root {
  --ink: #14213d;
  --muted: #5f6b7a;
  --line: #dbe3ea;
  --paper: #ffffff;
  --soft: #f5f8fb;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --gold: #f5b642;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

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

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

.nav a {
  text-decoration: none;
}

.button,
button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  color: white;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  color: var(--accent-dark);
  background: white;
}

.button.danger,
button.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: white;
}

.admin-row-action {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(42px, 7vw, 90px) clamp(20px, 5vw, 72px) 48px;
  background: linear-gradient(180deg, #f9fbfd 0%, #ffffff 100%);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
}

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

.visual {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 26% 24%, rgba(245, 182, 66, 0.34), transparent 19%),
    linear-gradient(135deg, #e9f5f3 0%, #ffffff 54%, #f5f8fb 100%);
  padding: 28px;
}

.learning-map {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.map-node {
  min-height: 112px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(20, 33, 61, 0.08);
}

.map-node strong {
  display: block;
  margin-bottom: 8px;
}

.map-node span {
  color: var(--muted);
  font-size: 14px;
}

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

.section.alt {
  background: var(--soft);
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

.section > p {
  max-width: 850px;
  color: var(--muted);
  font-size: 18px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: white;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

.form-band {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: start;
}

form {
  display: grid;
  gap: 14px;
}

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

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  font: inherit;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-message {
  min-height: 24px;
  font-weight: 700;
}

.form-message.error {
  color: var(--danger);
}

.form-message.ok {
  color: var(--accent-dark);
}

.voice-shell {
  min-height: calc(100vh - 72px);
  padding: 40px clamp(20px, 5vw, 72px);
  background: var(--soft);
}

.voice-panel {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 36px);
  background: white;
}

.transcript {
  min-height: 180px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfd;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: white;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .hero,
  .form-band,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .visual {
    min-height: 320px;
  }

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

  .site-footer {
    flex-direction: column;
  }
}


.admin-body {
  background: var(--soft);
}

.admin-topbar button {
  min-height: 36px;
  padding: 8px 12px;
}

.admin-shell {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: 230px minmax(0, 1fr);
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding: 18px;
  background: white;
}

.admin-nav {
  min-height: 38px;
  justify-content: flex-start;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.admin-nav.active,
.admin-nav:hover {
  color: var(--accent-dark);
  border-color: var(--line);
  background: var(--soft);
}

.admin-content {
  min-width: 0;
  padding: 24px clamp(16px, 3vw, 38px);
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background: white;
}

.admin-card h1,
.admin-card h2 {
  margin: 0 0 10px;
}

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

.admin-heading p {
  margin: 0;
  color: var(--muted);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.admin-stat strong {
  display: block;
  font-size: 24px;
}

.admin-stat span {
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.admin-actions {
  margin-bottom: 14px;
}

.inline-admin-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.form-field small,
.admin-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-help {
  margin: 8px 0 0;
}

.org-id-list {
  border-left: 3px solid var(--brand);
  padding-left: 10px;
}

.help-tip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: help;
  font-size: 11px;
  font-weight: 700;
  height: 18px;
  line-height: 16px;
  margin-left: 4px;
  padding: 0;
  width: 18px;
}

.admin-invite-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
}

.admin-invite-link input {
  font-size: 13px;
  width: 100%;
}

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

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

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

@media (max-width: 920px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-stats,
  .inline-admin-form {
    grid-template-columns: 1fr;
  }

  .admin-heading {
    display: grid;
  }
}

.signup-page {
  display: grid;
  min-height: calc(100vh - 76px);
  padding: clamp(24px, 5vw, 56px) 18px;
  place-items: center;
}

.signup-panel {
  display: grid;
  gap: 22px;
  max-width: 860px;
  width: min(100%, 860px);
}

.signup-copy {
  margin: 0 auto;
  max-width: 660px;
  text-align: center;
}

.signup-copy h1 {
  margin-bottom: 10px;
}

.signup-copy p:last-child {
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
  max-width: 620px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.signup-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 760px;
  padding: clamp(18px, 4vw, 30px);
  width: 100%;
}

.signup-form-head,
.signup-section-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.signup-section-title {
  justify-content: flex-start;
}

.signup-section-title small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
}

.signup-section {
  border: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin: 0;
  min-inline-size: 0;
  padding: 18px 0 0;
}

.signup-section[disabled] {
  opacity: .62;
}

.signup-section.no-border {
  border-top: 0;
  padding-top: 0;
}

.compact-section {
  margin-top: 4px;
}

.step-pill {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #cfe6ff;
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  margin-right: 8px;
  width: 24px;
}

.segmented {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
}

.segmented label,
.check-row {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.segmented label {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 12px;
}

.segmented label:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(43, 108, 176, .12);
  color: var(--brand);
}

.signup-subform {
  display: grid;
  gap: 14px;
}

.signup-subform[disabled] {
  opacity: .55;
}

.signup-subform[disabled] input,
.signup-subform[disabled] select {
  cursor: not-allowed;
}

.signup-complete {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}


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

.voip-status-item {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 10px 12px;
}

.voip-status-item.error {
  background: #fff5f5;
  border-color: #fecaca;
  color: #991b1b;
}

.voip-detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.voip-detail-grid div {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.voip-detail-grid span,
.small-note {
  color: var(--muted);
  font-size: 12px;
}

.voip-app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voip-app-links .small-note {
  flex-basis: 100%;
}

.signup-complete img {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 240px;
  width: 100%;
}

.otp-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(160px, 1fr) auto;
}

.signup-submit {
  width: 100%;
}

@media (max-width: 760px) {
  .signup-form-head,
  .signup-section-title {
    align-items: flex-start;
    display: grid;
  }

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