/* Shared stylesheet for the admin console (/admin), tenant portal (/portal)
   and host portal (/host). Same palette and type as the landing page, kept
   plain and quiet: these screens are for signing in and managing things. */

:root {
  --cream: #f6f4ec;
  --cream-2: #efece1;
  --ink: #122024;
  --ink-2: #3b4a4d;
  --muted: #6b7a7d;
  --teal: #0e3a42;
  --teal-2: #0e7490;
  --cyan: #22b8cf;
  --pale: #8ed0de;
  --cyan-soft: rgba(34, 184, 207, 0.14);
  --line: rgba(18, 32, 36, 0.1);
  --danger: #b4321f;
  --danger-soft: #fbeae6;
  --ok: #0e7490;
  --ok-soft: #e4f4f7;
  --radius: 18px;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Legacy names still referenced by older rules/components. */
  --accent: var(--teal-2);
  --accent-soft: var(--cyan-soft);
  --text: var(--ink);
  --border: var(--line);
  --bg: var(--cream);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--cream); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(34, 184, 207, 0.16), transparent 70%),
    radial-gradient(700px 380px at -10% 100%, rgba(142, 208, 222, 0.18), transparent 70%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-2); }
code { font-family: var(--mono); }

/* --- brand bar + footer (static, in each html shell) -------------------- */
.brandbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(246, 244, 236, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-word {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 19px;
}
.brand-word em { font-style: normal; color: var(--teal-2); }
.brand-area {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-2);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
}
.brandbar nav { display: flex; gap: 18px; font-size: 14px; font-weight: 500; }
.brandbar nav a { color: var(--ink-2); text-decoration: none; }
.brandbar nav a:hover { color: var(--teal-2); }
.brandfoot {
  margin-top: auto;
  padding: 28px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.brandfoot a { color: var(--teal-2); text-decoration: none; font-weight: 600; }
.brandfoot a:hover { text-decoration: underline; }

.page {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}
.page:has(> .layout) { max-width: 1260px; }

.loading {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 15px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(18, 32, 36, 0.04), 0 18px 40px -30px rgba(14, 58, 66, 0.35);
}

/* --- top bar ----------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 22px;
}
.topbar h1 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
.topbar h1 .dim { color: var(--muted); font-weight: 500; font-family: var(--body); font-size: 15px; letter-spacing: 0; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-logo {
  max-height: 40px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex: none;
}

/* --- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(18, 32, 36, 0.16);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--cream);
  box-shadow: 0 8px 22px -12px rgba(14, 58, 66, 0.7);
}
.btn.primary:hover { background: #0b2e35; border-color: #0b2e35; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* --- sign-in gate ------------------------------------------------------- */
.gate {
  position: relative;
  overflow: hidden;
  max-width: 420px;
  margin: clamp(24px, 8vh, 80px) auto 0;
  padding: 34px 30px 28px;
  text-align: center;
}
.gate::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2), var(--cyan), var(--pale));
}
.gate h1 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 6px 0 8px;
}
.gate p { color: var(--ink-2); font-size: 14px; margin: 0 0 22px; }
.gate form { display: flex; flex-direction: column; gap: 10px; }
.gate form .btn { margin-top: 4px; padding: 12px 18px; font-size: 15px; }
.gate .form-error { margin-top: 12px; }
.gate .form-error:empty { display: none; }
.gate-alt { margin: 18px 0 0; font-size: 13px; }
.gate-alt a { color: var(--teal-2); text-decoration: none; font-weight: 500; }
.gate-alt a:hover { text-decoration: underline; }

/* --- forms ------------------------------------------------------------- */
input[type="text"],
input[type="password"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="time"],
textarea,
select {
  width: 100%;
  border: 1px solid rgba(18, 32, 36, 0.18);
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: #9aa6a8; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-2);
  box-shadow: 0 0 0 4px var(--cyan-soft);
}
textarea { resize: vertical; }

/* --- avatar upload (host portal profile) --------------------------------- */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 14px;
}
.avatar-row > div { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pale);
}
input[type="file"] { font-size: 13px; }
.avatar-placeholder {
  display: grid;
  place-items: center;
  background: var(--cyan-soft);
  color: var(--teal);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.file-btn { position: relative; overflow: hidden; margin: 0; color: var(--ink); }
.file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar-row .meta { font-size: 12.5px; }
.sidenav-avatar {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pale);
  margin-bottom: 8px;
}
.sidenav-initials {
  display: grid;
  place-items: center;
  background: var(--cyan-soft);
  color: var(--teal);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  border-color: transparent;
}
@media (max-width: 860px) { .sidenav-avatar { display: none; } }

/* --- tenant branding (portal settings) ------------------------------------- */
.logo-preview {
  max-height: 56px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
}
.modal-sub {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 18px 0 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.color-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; }
.color-row input[type="text"] { max-width: 180px; font-family: var(--mono); }
.color-row input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 3px;
  border: 1px solid rgba(18, 32, 36, 0.18);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
label { font-size: 13px; color: var(--ink-2); font-weight: 500; display: block; margin-bottom: 5px; }
.field { margin-bottom: 12px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 8px; }

/* --- banner ------------------------------------------------------------ */
.banner {
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.banner.error { background: var(--danger-soft); color: var(--danger); border-color: rgba(180, 50, 31, 0.25); }
.banner.ok { background: var(--ok-soft); color: var(--teal); border-color: rgba(34, 184, 207, 0.4); }

/* --- tables -------------------------------------------------------------- */
.tenants { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
}
th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-2);
  font-weight: 600;
  background: var(--cream);
}
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; }
th.num { text-align: right; }
.slug { color: var(--muted); font-size: 13px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.host-head .row-actions { flex-wrap: wrap; }
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 14px;
}

/* --- tenant detail ------------------------------------------------------ */
.detail-cell { white-space: normal; background: var(--cream); }
.detail { padding: 6px 2px; }
.detail h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.host-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.et-actions { margin-left: 8px; display: inline-flex; gap: 4px; vertical-align: 1px; }
.host {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.host .meta, .meta { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: 1px;
}
.badge.ok { background: var(--cyan-soft); color: var(--teal); }
.badge.off { background: var(--cream-2); color: var(--muted); border: 1px solid var(--line); }
.event-types { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.event-types li { padding: 3px 0; }
.event-types a { color: var(--teal-2); text-decoration: none; font-weight: 500; }
.event-types a:hover { text-decoration: underline; }

/* --- sections ----------------------------------------------------------- */
.section { margin-bottom: 18px; overflow: hidden; }
.section-body { padding: 18px 20px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

/* --- modal -------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 58, 66, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 30px 80px -30px rgba(14, 58, 66, 0.6);
  animation: modalIn 0.35s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 580px; max-height: 90vh; overflow-y: auto; }
.modal.preview { max-width: 900px; }
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.preview-head h2 { margin: 0; }
.preview-frame {
  width: 100%;
  height: 65vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.modal h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.modal p { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.modal .form-actions { justify-content: flex-end; margin-top: 16px; }
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  margin: 4px 0 14px;
}
.check-label input { width: auto; }
input[type="checkbox"] { accent-color: var(--teal-2); }

/* --- weekly schedule editor ---------------------------------------------- */
.schedule {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 12px;
  margin: 6px 0 12px;
  background: var(--cream);
}
.day-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.day-row:last-child { border-bottom: 0; }
.day-label {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 58px;
  flex-shrink: 0;
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.day-label input { width: auto; }
.day-row.off .day-body { display: none; }
.day-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.intervals { display: flex; flex-direction: column; gap: 6px; }
.intervals:empty { display: none; }
.interval { display: flex; align-items: center; gap: 6px; }
.interval input[type="time"] { width: 132px; padding: 6px 8px; }

/* --- embed code dialog ------------------------------------------------------ */
.embed-block { margin: 0 0 14px; }
.embed-block label { margin-bottom: 6px; }
.embed-code {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--cream);
  border: 1px solid var(--pale);
  border-radius: 12px;
  padding: 10px 12px;
}
.embed-code code {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--teal);
  white-space: pre-wrap;
  word-break: break-all;
}

/* --- api key / link reveal ------------------------------------------------ */
.key-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--pale);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
}
.key-box code {
  flex: 1;
  font-size: 13px;
  color: var(--teal);
  word-break: break-all;
  white-space: normal;
}
.key-warning { color: var(--danger); font-size: 13px; }

/* --- side navigation ---------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.main { min-width: 0; }
.sidenav {
  position: sticky;
  top: 74px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 10px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(18, 32, 36, 0.04), 0 18px 40px -30px rgba(14, 58, 66, 0.35);
}
.sidenav-head { padding: 4px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sidenav-logo { display: block; max-height: 36px; max-width: 150px; width: auto; height: auto; object-fit: contain; margin-bottom: 8px; }
.sidenav-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.sidenav-sub { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-2); margin-top: 3px; }
.sidenav-list { display: flex; flex-direction: column; gap: 2px; }
.sidenav-divider { height: 1px; background: var(--line); margin: 6px 8px; }
.sidenav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  font: 500 14px/1.2 var(--body);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, color 0.2s;
}
.sidenav-item:hover { background: var(--cream); color: var(--ink); }
.sidenav-item.active { background: var(--cyan-soft); color: var(--teal); }
.sidenav-item.danger { color: var(--danger); }
.sidenav-item.danger:hover { background: var(--danger-soft); }
.nav-icon { flex: none; width: 18px; height: 18px; display: inline-flex; }
.nav-icon svg { width: 18px; height: 18px; }
.sidenav-item.active .nav-icon { color: var(--teal-2); }
.sidenav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav-count {
  flex: none;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.sidenav-item.active .sidenav-count { background: #fff; color: var(--teal); }
.sidenav-item.attention::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 184, 207, 0.6);
  animation: helpPing 2s infinite;
}
.section, .card { scroll-margin-top: 78px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 14px; }
  .sidenav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
  }
  .sidenav-head { display: none; }
  .sidenav-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .sidenav-divider { display: none; }
  .sidenav-item { width: auto; padding: 7px 12px; white-space: nowrap; border-radius: 999px; }
  .sidenav-item.attention::after { top: 4px; left: auto; right: 6px; }
}

/* --- help drawer ------------------------------------------------------------ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(14, 58, 66, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s;
}
.drawer-backdrop.open { opacity: 1; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px -40px rgba(14, 58, 66, 0.6);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.drawer-eyebrow {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-2);
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 22px 24px; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--line); background: var(--cream); }
.drawer-foot .meta { margin: 0; }
.help-section { border-bottom: 1px solid var(--line); }
.help-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.help-section summary::-webkit-details-marker { display: none; }
.help-section summary::after {
  content: "+";
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan-soft);
  color: var(--teal-2);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.3s var(--ease);
}
.help-section[open] summary::after { content: "–"; }
.help-content { padding: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.help-content p { margin: 0 0 10px; }
.help-content ol, .help-content ul { margin: 0 0 12px; padding-left: 20px; }
.help-content li { margin: 5px 0; }
.help-content li::marker { color: var(--teal-2); font-weight: 600; }
.help-content a { color: var(--teal-2); font-weight: 500; }
.help-host {
  margin: 16px 0 6px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.help-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 4px; }
.help-code {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--cream);
  border: 1px solid var(--pale);
  border-radius: 10px;
  padding: 9px 12px;
  margin: 0 0 12px;
}
.help-code code {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--teal);
  white-space: pre-wrap;
  word-break: break-all;
}
.help-tip {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--cyan);
  background: var(--cyan-soft);
  border-radius: 0 10px 10px 0;
  font-size: 13.5px;
  color: var(--ink);
}
/* Nudges first-time visitors toward the Help button. */
.btn.attention { position: relative; }
.btn.attention::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 184, 207, 0.6);
  animation: helpPing 2s infinite;
}
@keyframes helpPing { 70% { box-shadow: 0 0 0 8px rgba(34, 184, 207, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 184, 207, 0); } }

/* --- small screens --------------------------------------------------------- */
@media (max-width: 600px) {
  .brandbar { padding: 10px 16px; }
  .brandbar nav { display: none; }
  .page { padding: 20px 14px 32px; }
  .gate { padding: 28px 20px 24px; }
  .topbar h1 { font-size: 24px; }
  .section-body, .section-head { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .modal { transition: none; animation: none; }
  .btn:hover { transform: none; }
}
