/* Daktari Online Meet: tokens and components shared with the original front door (branding/meet). */
:root {
  --paper: #f3f7fa;
  --paper-2: #e9eff4;
  --rule: #cfd9e1;
  --muted: #4b5a66;
  --ink: #111a21;
  --accent: #00598a;
  --accent-strong: #0b4a72;
  --accent-ink: #f3f7fa;
  --night: #0e151b;
  --night-ink: #eef2f5;
  --focus: #1a6fa8;
  --ok: #1e7a4c;
  --bad: #b3261e;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Figtree", var(--font);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
}
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--rule);
}
.bar img { display: block; height: 40px; width: auto; }
.bar nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }

.home {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(32px, 7vw, 96px) clamp(16px, 4vw, 48px);
}

h1 {
  font: 800 clamp(2rem, 4.2vw, 3.16rem)/1.05 var(--display);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 16ch;
}
h2 { font: 600 1.333rem/1.2 var(--display); margin: 20px 0 4px; }
.lede { font-size: 1.125rem; color: var(--muted); max-width: 44ch; margin: 0 0 32px; }
.muted { color: var(--muted); margin: 0 0 16px; font-size: 0.9375rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.join { display: flex; gap: 8px; flex: 1 1 18rem; }
.join input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  border: 1px solid var(--rule); border-radius: 6px; background: #fff;
  font: inherit; color: var(--ink);
}
.join input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(0 89 138 / 0.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 6px;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 120ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--rule); }
.btn.ghost:hover { background: var(--paper-2); }

.hint { font-size: 0.9375rem; margin: 12px 0 0; color: var(--muted); min-height: 1.6em; }
.hint.bad { color: var(--bad); }
.hint.good { color: var(--ok); }

.check { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 16px 16px 20px; }
.preview {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--night); color: var(--night-ink);
}
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.preview-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #a9b5bf; }
.meter { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 6px; border-radius: 3px; background: rgb(255 255 255 / 0.15); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: #7cbde6; transition: width 80ms linear; }
.row { display: flex; gap: 8px; }

.foot {
  display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap;
  padding: 20px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem;
}

@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; }
}

/* ---- App ---------------------------------------------------------------- */
.bar { background: #fff; gap: 16px; }
.bar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.bar nav form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; }
.linklike:hover { color: var(--ink); }
.page { flex: 1; width: 100%; max-width: 64rem; margin: 0 auto; padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 48px); }
.page--narrow { max-width: 40rem; }
.page h1 { max-width: none; font-size: clamp(1.75rem, 3.4vw, 2.4rem); }
.card { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: clamp(16px, 3vw, 28px); }
.card + .card { margin-top: 20px; }
.card h2:first-child { margin-top: 0; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 16px; }
.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-weight: 500; }
.flash.ok { background: #e6f4ec; color: #14522f; border: 1px solid #b7dfc6; }
.flash.bad { background: #fbeaea; color: #7a1a14; border: 1px solid #f0c2bf; }

label.field { display: block; font-weight: 600; font-size: .9375rem; }
label.field > span.help { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.input, select.input, textarea.input {
  display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: 6px; background: #fff; font: inherit; color: var(--ink);
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(0 89 138 / 0.18); }
.error { color: var(--bad); font-size: .875rem; margin: 4px 0 0; }
.actions--end { justify-content: flex-end; }
.btn.danger { background: transparent; color: var(--bad); border-color: #e7b9b5; }
.btn.danger:hover { background: #fbeaea; }
.btn.small { height: 36px; padding: 0 14px; font-size: .9375rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.meetings { list-style: none; margin: 0; padding: 0; }
.meetings li { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--paper-2); flex-wrap: wrap; }
.meetings li:first-child { border-top: 0; }
.meetings .when { color: var(--muted); font-size: .9375rem; }
.meetings .title { font-weight: 600; color: var(--ink); text-decoration: none; }
.meetings .title:hover { color: var(--accent); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.tag.live { background: #e6f4ec; color: #14522f; }
.tag.off { background: #fbeaea; color: #7a1a14; }

.copy { display: flex; gap: 8px; }
.copy .input { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9375rem; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.waiting { display: flex; gap: 12px; align-items: center; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s var(--ease) infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(0 89 138 / .45); } 100% { box-shadow: 0 0 0 14px rgb(0 89 138 / 0); } }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.16rem); max-width: 16ch; }
.perks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; color: var(--muted); }
.perks li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }
table.list { width: 100%; border-collapse: collapse; font-size: .9375rem; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--paper-2); vertical-align: middle; }
table.list th { color: var(--muted); font-weight: 600; border-top: 0; }
.stat { font: 800 1.75rem/1 var(--display); color: var(--accent); }
.stat + span { color: var(--muted); font-size: .875rem; }
.foot a { color: var(--muted); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .copy { flex-direction: column; } .bar img { height: 32px; } }
a.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 8px 14px; background: #fff; border: 2px solid var(--focus); border-radius: 6px; z-index: 10; }
.btn { white-space: nowrap; }
.stack > input[type="hidden"] + * { margin-top: 0; }
.stack > .hint:empty { display: none; }
