:root {
  --bg-page: #f7f8fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f5fa;
  --border-soft: #e5e7ee;
  --border-strong: #d6dbe7;
  --text-strong: #141a26;
  --text-body: #334155;
  --text-muted: #667085;
  --accent: #3f51b5;
  --accent-hover: #33439a;
  --accent-soft: rgba(63, 81, 181, 0.08);
  --success: #13795b;
  --danger: #b42318;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 18px 40px rgba(15, 23, 42, 0.10);
  --shell-width: 1120px;
  --transition-fast: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-strong);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.instant-page {
  min-height: 100vh;
}

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

button,
input {
  font: inherit;
}

.site-shell {
  width: min(100% - 32px, var(--shell-width));
  margin: 0 auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 248, 251, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 238, 0.7);
}

.site-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-wordmark {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-strong);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--transition-fast);
}

.site-nav a:hover {
  color: var(--accent);
}

/* Hero */

.hero-section {
  padding: 40px 0 18px;
}

.hero-inner {
  display: flex;
  justify-content: center;
}

.hero-copy {
  width: min(100%, 680px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}

.hero-subtitle {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-body);
}

.hero-meta {
  margin: 16px auto 0;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--text-muted);
}

[hidden] {
  display: none !important;
}

/* Utility section */

.utility-section {
  padding: 8px 0 56px;
}

.instant-card {
  width: min(100%, 720px);
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.instant-card.is-in-call {
  opacity: 0.4;
  pointer-events: none;
}

.instant-card-header {
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.instant-card-header h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--text-strong);
}

.instant-card-header p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.instant-card-body {
  padding: 20px 24px 24px;
}

.field-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-body);
}

.link-row {
  display: block;
}

.link-field {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--bg-subtle);
  color: var(--text-strong);
  font-size: 0.95rem;
  line-height: 1.4;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;  
}

.link-field::placeholder {
  color: #98a2b3;
}

.link-field[readonly] {
  cursor: text;
}

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

.helper-text {
  margin: 12px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.primary-action-wrap {
  margin-top: 20px;
}

.status-text {
  margin-top: 14px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-body);
  font-size: 0.93rem;
  line-height: 1.4;
}

.status-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: 0 0 auto;
}

.status-label.is-success {
  color: var(--success);
}

.status-label.is-error {
  color: var(--danger);
}

/* Buttons */

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  font-weight: 600;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(63, 81, 181, 0.22);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-body);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fbfcff;
}

.btn-large {
  min-height: 52px;
  padding: 0 24px;
  width: 100%;
  font-size: 1rem;
}

.security-note {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.security-note-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.security-note-text {
  white-space: nowrap;
}

/* Exit call button */

.exit-call-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 65;
  display: none;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--danger);
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  font-weight: 600;
}

.exit-call-btn.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Runtime overlay */

.runtime-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
}

.overlay-card {
  width: min(100%, 420px);
  background: #ffffff;
  border: 1px solid rgba(229, 231, 238, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow-medium);
  padding: 24px;
}

.overlay-card.is-hidden {
  display: none;
}

.overlay-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.overlay-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-strong);
}

.overlay-subtitle {
  margin-top: 6px;
  color: var(--text-muted);
  line-height: 1.5;
}

.overlay-links {
  margin-top: 18px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.secondary-link {
  color: var(--accent);
  font-weight: 600;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(63, 81, 181, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: evap-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes evap-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Notice overlay */

.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
}

.notice-overlay.is-open {
  display: grid;
}

.notice-card {
  width: min(100%, 480px);
  background: #ffffff;
  border: 1px solid rgba(229, 231, 238, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow-medium);
  padding: 24px;
}

.notice-header {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
}

.notice-content {
  flex: 1 1 auto;
}

.notice-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-strong);
}

.notice-message {
  margin-top: 8px;
  color: var(--text-body);
  line-height: 1.6;
}

.notice-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

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

/* EVAP runtime container + generated iframe wrappers */

#evapQVContainer_id {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0f172a;
}

#evapQVContentFrame_id,
#evapQVIFrameContainer_id {
  width: 100%;
  height: 100%;
}

#evapQVIFrame_id {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0f172a;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.7);
}

.site-footer-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer-inner a:hover {
  color: var(--accent);
}

/* Utility helpers */

.is-hidden {
  display: none !important;
}

.status-text-center {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.security-note {
  margin-top: 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
}

.security-note-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.security-note-text {
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 720px) {
  .site-header-inner {
    min-height: 60px;
  }

  .site-nav {
    gap: 14px;
  }

  .hero-section {
    padding: 28px 0 14px;
  }

  .hero-copy {
    width: min(100%, 420px);
  }

  .hero-copy h1 {
    font-size: 2.35rem;
    line-height: 1.05;
  }

  .hero-subtitle {
    margin-top: 12px;
    font-size: 1rem;
  }

  .instant-card {
    border-radius: 18px;
  }

  .instant-card-header,
  .instant-card-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .instant-card-header {
    padding-top: 18px;
    padding-bottom: 12px;
  }

  .instant-card-body {
    padding-top: 18px;
    padding-bottom: 20px;
  }

  .link-actions,
  .notice-actions {
    flex-direction: column;
  }

  .link-actions .btn,
  .notice-actions .btn {
    width: 100%;
  }

  .security-note {
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .status-text {
    margin-top: 10px;
    font-size: 0.91rem;
  }

  .site-footer-inner {
    padding: 14px 0;
    gap: 12px 16px;
  }

  .exit-call-btn {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }
}