/*
 * APT Voice Clarity Guide 1.2.0
 * Front-end interface, private clarity history, and tool handoff styling.
 */
:root {
  --aptvcg-ink: #f7fbff;
  --aptvcg-muted: #a8bad1;
  --aptvcg-muted-2: #7e94af;
  --aptvcg-bg: #061326;
  --aptvcg-bg-2: #081a32;
  --aptvcg-card: #0b223f;
  --aptvcg-card-2: #102c4f;
  --aptvcg-line: rgba(130, 189, 255, 0.22);
  --aptvcg-line-strong: rgba(93, 208, 255, 0.52);
  --aptvcg-cyan: #31d6ee;
  --aptvcg-blue: #3188ff;
  --aptvcg-violet: #7444f8;
  --aptvcg-gold: #ffd66b;
  --aptvcg-green: #46e3ad;
  --aptvcg-red: #ff667d;
  --aptvcg-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
  --aptvcg-radius-xl: 28px;
  --aptvcg-radius-lg: 21px;
  --aptvcg-radius-md: 15px;
  --aptvcg-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html.aptvcg-open,
body.aptvcg-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.aptvcg-overlay[hidden],
.aptvcg-type-form[hidden],
.aptvcg-recommendation[hidden],
.aptvcg-providers[hidden],
.aptvcg-account[hidden] {
  display: none !important;
}

.aptvcg-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.5vw, 30px);
  background:
    radial-gradient(circle at 10% 0%, rgba(48, 166, 255, 0.2), transparent 35%),
    radial-gradient(circle at 90% 100%, rgba(116, 68, 248, 0.22), transparent 38%),
    rgba(1, 8, 20, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  animation: aptvcg-fade-in 180ms ease-out both;
}

.aptvcg-modal {
  position: relative;
  width: min(880px, 100%);
  max-height: min(900px, calc(100dvh - 28px));
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--aptvcg-ink);
  background:
    linear-gradient(145deg, rgba(19, 53, 91, 0.92), rgba(4, 18, 38, 0.98) 55%),
    var(--aptvcg-bg);
  border: 1px solid var(--aptvcg-line-strong);
  border-radius: var(--aptvcg-radius-xl);
  box-shadow: var(--aptvcg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(104, 180, 255, 0.55) transparent;
  animation: aptvcg-rise-in 240ms cubic-bezier(.2,.75,.25,1) both;
}

.aptvcg-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(58, 216, 243, 0.1), transparent 32%),
    radial-gradient(circle at 92% 6%, rgba(122, 69, 248, 0.22), transparent 28%);
}

.aptvcg-modal::-webkit-scrollbar { width: 8px; }
.aptvcg-modal::-webkit-scrollbar-track { background: transparent; }
.aptvcg-modal::-webkit-scrollbar-thumb { background: rgba(104, 180, 255, 0.44); border-radius: 999px; }

.aptvcg-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  padding: clamp(24px, 4.5vw, 42px) clamp(22px, 5vw, 48px) 20px;
}

.aptvcg-kicker,
.aptvcg-card-label {
  display: inline-block;
  color: #71eafa;
  font: 800 0.72rem/1.1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.aptvcg-header h2 {
  margin: 9px 0 8px;
  color: #fff;
  font: 800 clamp(2rem, 5.2vw, 3.8rem)/0.98 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.045em;
}

.aptvcg-header p {
  max-width: 680px;
  margin: 0;
  color: #c8d8e9;
  font: 500 clamp(0.96rem, 2.3vw, 1.1rem)/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aptvcg-icon-button {
  appearance: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #d9eaff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(176, 213, 255, 0.22);
  border-radius: 50%;
  font: 300 2rem/1 system-ui, sans-serif;
  cursor: pointer;
  transition: 150ms ease;
}

.aptvcg-icon-button:hover,
.aptvcg-icon-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(111, 226, 255, 0.7);
  transform: rotate(4deg);
  outline: none;
}

.aptvcg-safety {
  position: relative;
  z-index: 1;
  margin: 0 clamp(22px, 5vw, 48px) 20px;
  padding: 12px 15px;
  color: #c6d6e6;
  background: rgba(3, 13, 28, 0.64);
  border: 1px solid rgba(142, 183, 223, 0.17);
  border-left: 3px solid var(--aptvcg-cyan);
  border-radius: 11px;
  font: 600 0.78rem/1.45 system-ui, sans-serif;
}

.aptvcg-conversation {
  position: relative;
  z-index: 1;
  min-height: 132px;
  max-height: 310px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 clamp(22px, 5vw, 48px);
  padding: 4px 4px 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(90, 180, 255, 0.38) transparent;
}

.aptvcg-message {
  width: min(84%, 630px);
  padding: 14px 16px;
  border-radius: 17px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.aptvcg-message > span {
  display: block;
  margin-bottom: 5px;
  font: 800 0.68rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.aptvcg-message p {
  margin: 0;
  color: inherit;
  font: 520 0.98rem/1.52 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aptvcg-message-assistant {
  align-self: flex-start;
  color: #eaf5ff;
  background: linear-gradient(145deg, rgba(17, 58, 101, 0.96), rgba(11, 38, 70, 0.96));
  border: 1px solid rgba(104, 194, 255, 0.25);
  border-bottom-left-radius: 5px;
}

.aptvcg-message-user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, #176ee7, #6747ee);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-right-radius: 5px;
}

.aptvcg-message.is-crisis {
  color: #fff;
  background: linear-gradient(145deg, rgba(93, 20, 38, 0.98), rgba(52, 12, 28, 0.98));
  border-color: rgba(255, 104, 126, 0.72);
}

.aptvcg-recommendation,
.aptvcg-providers,
.aptvcg-account {
  position: relative;
  z-index: 1;
  margin: 16px clamp(22px, 5vw, 48px) 0;
  padding: clamp(18px, 3vw, 26px);
  color: #e9f4ff;
  background: linear-gradient(145deg, rgba(12, 39, 70, 0.94), rgba(7, 27, 52, 0.96));
  border: 1px solid rgba(103, 183, 255, 0.27);
  border-radius: var(--aptvcg-radius-lg);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
  scroll-margin-top: 92px;
}

.aptvcg-recommendation::before,
.aptvcg-account::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(var(--aptvcg-cyan), var(--aptvcg-violet));
}

.aptvcg-recommendation.is-crisis {
  background: linear-gradient(145deg, rgba(82, 22, 43, 0.97), rgba(42, 12, 28, 0.98));
  border-color: rgba(255, 102, 125, 0.72);
}
.aptvcg-recommendation.is-crisis::before { background: var(--aptvcg-red); }
.aptvcg-recommendation.is-crisis .aptvcg-card-label { color: #ffb7c3; }

.aptvcg-recommendation h3,
.aptvcg-providers h3,
.aptvcg-account h3,
.aptvcg-history h1,
.aptvcg-history h2,
.aptvcg-dashboard-history h2 {
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
}

.aptvcg-recommendation h3,
.aptvcg-providers h3,
.aptvcg-account h3 {
  margin: 8px 0 7px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.12;
}

.aptvcg-recommendation > p,
.aptvcg-providers > p,
.aptvcg-account > p {
  margin: 0;
  color: #bbcee2;
  font: 500 0.94rem/1.55 system-ui, sans-serif;
}

.aptvcg-followup {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 13px 14px;
  color: #d8e9f8;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(122, 185, 244, 0.16);
  border-radius: 12px;
}
.aptvcg-followup strong { color: #7ee9fa; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.aptvcg-followup span { font-size: 0.93rem; line-height: 1.45; }

.aptvcg-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 17px;
}

.aptvcg-action-row a,
.aptvcg-action-row button,
.aptvcg-history-actions a,
.aptvcg-history-actions button,
.aptvcg-inline-trigger,
.aptvcg-history-hero > button,
.aptvcg-view-all,
.aptvcg-dashboard-grid a,
.aptvcg-handoff-banner button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 17px;
  color: #e9f5ff;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(121, 190, 255, 0.28);
  border-radius: 12px;
  box-shadow: none;
  font: 750 0.88rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.aptvcg-action-row a:hover,
.aptvcg-action-row button:hover,
.aptvcg-history-actions a:hover,
.aptvcg-history-actions button:hover,
.aptvcg-inline-trigger:hover,
.aptvcg-history-hero > button:hover,
.aptvcg-dashboard-grid a:hover,
.aptvcg-handoff-banner button:hover {
  color: #fff;
  border-color: rgba(95, 225, 255, 0.76);
  background: rgba(73, 153, 255, 0.13);
  transform: translateY(-1px);
}

.aptvcg-action-row .primary,
.aptvcg-action-row button.primary,
.aptvcg-history-actions .primary,
.aptvcg-inline-trigger,
.aptvcg-history-hero > button,
.aptvcg-handoff-banner .primary {
  color: #fff;
  background: linear-gradient(115deg, #25cfe8, #287fff 52%, #7745f5);
  border-color: rgba(138, 234, 255, 0.62);
  box-shadow: 0 10px 28px rgba(44, 114, 248, 0.25);
}

.aptvcg-action-row .primary:hover,
.aptvcg-history-actions .primary:hover,
.aptvcg-inline-trigger:hover,
.aptvcg-history-hero > button:hover,
.aptvcg-handoff-banner .primary:hover {
  background: linear-gradient(115deg, #42e4f5, #3c8cff 52%, #8758ff);
  box-shadow: 0 13px 32px rgba(44, 114, 248, 0.34);
}

.aptvcg-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.aptvcg-provider-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  color: #e6f1fb;
  background: linear-gradient(155deg, rgba(5, 25, 48, 0.88), rgba(3, 17, 35, 0.76));
  border: 1px solid rgba(106, 178, 239, 0.22);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.aptvcg-provider-card-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.aptvcg-provider-card > img,
.aptvcg-provider-card-head > img,
.aptvcg-provider-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  display: grid;
  place-items: center;
  margin: 0;
  color: #031327;
  background: linear-gradient(135deg, var(--aptvcg-cyan), var(--aptvcg-gold));
  border: 1px solid rgba(131, 224, 249, .35);
  border-radius: 50%;
  font: 850 1.35rem/1 system-ui, sans-serif;
}

.aptvcg-provider-card h4 {
  margin: 7px 0 4px;
  color: #fff;
  font: 800 1rem/1.22 system-ui, sans-serif;
}
.aptvcg-provider-card p { margin: 0; color: #aebfd1; font: 500 0.8rem/1.45 system-ui, sans-serif; }
.aptvcg-provider-card .aptvcg-provider-meta { color: #82dff0; font-weight: 700; text-transform: capitalize; }
.aptvcg-provider-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.aptvcg-provider-availability,
.aptvcg-provider-featured {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(153, 181, 214, .25);
  border-radius: 999px;
  color: #b8c9db;
  background: rgba(255,255,255,.035);
  font: 800 .62rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.aptvcg-provider-availability.is-open { color: #9bf3d3; border-color: rgba(70, 227, 173, .35); background: rgba(70, 227, 173, .08); }
.aptvcg-provider-featured { color: #ffe49b; border-color: rgba(255, 214, 107, .34); background: rgba(255, 214, 107, .08); }

.aptvcg-fit-reason {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: rgba(49, 136, 255, .075);
  border: 1px solid rgba(90, 180, 255, .18);
  border-radius: 12px;
}
.aptvcg-fit-reason strong { color: #76e6f7; font: 850 .68rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .09em; text-transform: uppercase; }
.aptvcg-fit-reason span { color: #d8e7f5; font: 600 .82rem/1.42 system-ui, sans-serif; }
.aptvcg-provider-bio { flex: 1; }

.aptvcg-provider-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}
.aptvcg-provider-card-actions a,
.aptvcg-provider-card-actions button {
  appearance: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  color: #e9f5ff;
  text-align: center;
  text-decoration: none !important;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(121,190,255,.25);
  border-radius: 10px;
  font: 780 .75rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.aptvcg-provider-card-actions a.primary { color: #fff; background: linear-gradient(115deg, #25cfe8, #287fff 52%, #7745f5); border-color: rgba(138, 234, 255, .54); }
.aptvcg-provider-card-actions a:hover,
.aptvcg-provider-card-actions button:hover { color: #fff; border-color: rgba(95,225,255,.7); background-color: rgba(73,153,255,.12); }
.aptvcg-provider-card-actions button:disabled { opacity: .62; cursor: default; }
.aptvcg-provider-section-actions { padding-top: 3px; }

.aptvcg-summary-preview {
  margin-top: 14px;
  padding: 13px 14px;
  color: #e8f3fd;
  background: rgba(2, 15, 31, 0.58);
  border: 1px solid rgba(108, 180, 244, 0.18);
  border-radius: 12px;
  font: 500 0.91rem/1.48 system-ui, sans-serif;
}

.aptvcg-account ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}
.aptvcg-account li { position: relative; padding-left: 19px; color: #c6d6e7; font: 550 0.84rem/1.4 system-ui, sans-serif; }
.aptvcg-account li::before { content: "✓"; position: absolute; left: 0; color: var(--aptvcg-green); font-weight: 900; }
.aptvcg-account-note { margin-top: 12px !important; color: #879db4 !important; font-size: 0.76rem !important; }

.aptvcg-status {
  position: relative;
  z-index: 1;
  min-height: 24px;
  margin: 20px clamp(22px, 5vw, 48px) 0;
  color: #adc3d9;
  text-align: center;
  font: 700 0.83rem/1.4 system-ui, sans-serif;
}
.aptvcg-status[data-tone="listening"] { color: #74e9fa; }
.aptvcg-status[data-tone="thinking"] { color: #bfa9ff; }
.aptvcg-status[data-tone="warn"] { color: var(--aptvcg-gold); }
.aptvcg-status[data-tone="danger"] { color: #ff93a4; }
.aptvcg-status[data-tone="success"] { color: var(--aptvcg-green); }

.aptvcg-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px clamp(22px, 5vw, 48px) 20px;
}

.aptvcg-mic {
  --mic-size: 118px;
  position: relative;
  appearance: none;
  width: var(--mic-size);
  height: var(--mic-size);
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 2px;
  padding: 20px 10px 15px;
  color: #fff;
  background: linear-gradient(145deg, #21cce7, #287fff 53%, #7746f4);
  border: 1px solid rgba(169, 242, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 16px 38px rgba(28, 112, 238, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  cursor: pointer;
  overflow: visible;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.aptvcg-mic:hover,
.aptvcg-mic:focus-visible {
  transform: scale(1.035);
  box-shadow: 0 19px 44px rgba(28, 112, 238, 0.43), 0 0 0 6px rgba(57, 211, 242, 0.1);
  outline: none;
}
.aptvcg-mic:disabled { cursor: wait; opacity: 0.6; filter: grayscale(0.2); }
.aptvcg-mic-icon { align-self: end; font-size: 2rem; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.22)); }
.aptvcg-mic-label { align-self: start; max-width: 90px; font: 800 0.69rem/1.1 system-ui, sans-serif; }

.aptvcg-mic-ring {
  position: absolute;
  inset: -1px;
  border: 2px solid rgba(91, 227, 255, 0.7);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}
.aptvcg-mic.is-recording { background: linear-gradient(145deg, #f34f7a, #8d3cef); box-shadow: 0 17px 45px rgba(229, 56, 111, 0.42); }
.aptvcg-mic.is-recording .aptvcg-mic-ring { animation: aptvcg-pulse 1.25s ease-out infinite; }
.aptvcg-mic.is-complete { background: linear-gradient(145deg, #24bf94, #2384c7); }

.aptvcg-secondary {
  appearance: none;
  min-height: 42px;
  padding: 10px 14px;
  color: #bad0e5;
  background: transparent;
  border: 1px solid rgba(124, 181, 235, 0.2);
  border-radius: 999px;
  font: 700 0.78rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.aptvcg-secondary:hover { color: #fff; border-color: rgba(89, 222, 250, 0.64); }

.aptvcg-type-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 0 clamp(22px, 5vw, 48px) 18px;
  padding: 17px;
  background: rgba(2, 16, 34, 0.65);
  border: 1px solid rgba(101, 181, 246, 0.22);
  border-radius: 15px;
}
.aptvcg-type-form label { color: #e6f4ff; font: 800 0.83rem/1.2 system-ui, sans-serif; }
.aptvcg-type-form textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  box-sizing: border-box;
  padding: 13px 14px;
  color: #fff;
  caret-color: var(--aptvcg-cyan);
  background: #06172d;
  border: 1px solid rgba(117, 184, 242, 0.27);
  border-radius: 11px;
  outline: none;
  font: 500 1rem/1.45 system-ui, sans-serif;
}
.aptvcg-type-form textarea:focus { border-color: var(--aptvcg-cyan); box-shadow: 0 0 0 3px rgba(49, 214, 238, 0.11); }
.aptvcg-type-form button {
  justify-self: end;
  min-height: 42px;
  padding: 10px 22px;
  color: #fff;
  background: linear-gradient(115deg, var(--aptvcg-blue), var(--aptvcg-violet));
  border: 1px solid rgba(156, 215, 255, 0.4);
  border-radius: 11px;
  font: 800 0.88rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}

.aptvcg-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px clamp(22px, 5vw, 48px) calc(17px + var(--aptvcg-safe-bottom));
  color: #7189a1;
  background: rgba(1, 10, 23, 0.36);
  border-top: 1px solid rgba(126, 181, 237, 0.12);
  border-radius: 0 0 var(--aptvcg-radius-xl) var(--aptvcg-radius-xl);
  font: 600 0.72rem/1.4 system-ui, sans-serif;
}
.aptvcg-footer button { appearance: none; padding: 0; color: #9db4ca; background: transparent; border: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.aptvcg-footer button:hover { color: #fff; }

/* Private history */
.aptvcg-history,
.aptvcg-dashboard-history {
  --aptvcg-history-width: 1180px;
  width: min(var(--aptvcg-history-width), calc(100% - 28px));
  box-sizing: border-box;
  margin: clamp(24px, 5vw, 60px) auto;
  color: #eaf4ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aptvcg-history-hero,
.aptvcg-history-gate {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 68px);
  color: #fff;
  background:
    radial-gradient(circle at 88% 5%, rgba(114, 68, 248, 0.34), transparent 34%),
    linear-gradient(135deg, #0a2849, #07162b 65%);
  border: 1px solid rgba(92, 196, 255, 0.38);
  border-radius: 27px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}
.aptvcg-history-hero::after,
.aptvcg-history-gate::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -130px;
  border: 1px solid rgba(79, 221, 247, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(79, 221, 247, 0.035), 0 0 0 90px rgba(119, 69, 245, 0.035);
}
.aptvcg-history-hero h1,
.aptvcg-history-gate h1 { max-width: 790px; margin: 10px 0 12px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 0.98; }
.aptvcg-history-hero p,
.aptvcg-history-gate p { max-width: 760px; margin: 0 0 18px; color: #bfd0e1; font-size: clamp(0.98rem, 2vw, 1.12rem); line-height: 1.58; }
.aptvcg-history-gate .small { margin-top: 15px; color: #8198af; font-size: 0.78rem; }

.aptvcg-history-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.aptvcg-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.aptvcg-history-card,
.aptvcg-history-empty {
  padding: clamp(20px, 3vw, 30px);
  background: linear-gradient(145deg, #0c2441, #07192e);
  border: 1px solid rgba(103, 182, 246, 0.24);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}
.aptvcg-history-card h2 { margin: 8px 0 9px; font-size: 1.35rem; }
.aptvcg-history-card > p { margin: 0; color: #b9cadd; line-height: 1.55; }
.aptvcg-history-date { color: #69dfef; font: 800 0.7rem/1.2 ui-monospace, monospace; letter-spacing: 0.09em; text-transform: uppercase; }
.aptvcg-history-next { display: grid; gap: 4px; margin-top: 16px; padding: 13px; background: rgba(255,255,255,.04); border-radius: 12px; }
.aptvcg-history-next strong { color: #7ae6f5; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.aptvcg-history-next span { color: #dceaf7; font-size: .9rem; line-height: 1.45; }
.aptvcg-history-meta { margin-top: 12px; color: #93abc2; font-size: .79rem; text-transform: capitalize; }
.aptvcg-history-empty { grid-column: 1 / -1; margin-top: 18px; text-align: center; }
.aptvcg-history-empty h2 { margin: 0 0 8px; }
.aptvcg-history-empty p { margin: 0; color: #9db1c7; }

/* Member dashboard insertion */
.aptvcg-dashboard-history {
  padding: clamp(22px, 4vw, 38px);
  background: linear-gradient(145deg, #09233f, #07172c);
  border: 1px solid rgba(96, 189, 253, .28);
  border-radius: 22px;
}
.aptvcg-dashboard-history h2 { margin: 7px 0 16px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.aptvcg-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aptvcg-dashboard-grid article { padding: 16px; background: rgba(4, 20, 39, .64); border: 1px solid rgba(112, 182, 240, .18); border-radius: 14px; }
.aptvcg-dashboard-grid strong { color: #fff; }
.aptvcg-dashboard-grid p { min-height: 62px; color: #9eb3c8; font-size: .84rem; line-height: 1.45; }
.aptvcg-dashboard-grid a { min-height: 36px; padding: 8px 12px; font-size: .78rem; }
.aptvcg-view-all { margin-top: 15px; }

/* Cross-tool handoff */
.aptvcg-handoff-banner {
  position: fixed;
  z-index: 2147482000;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + var(--aptvcg-safe-bottom));
  width: min(430px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 18px;
  color: #e9f4ff;
  background: linear-gradient(145deg, rgba(13, 43, 76, .98), rgba(5, 19, 39, .99));
  border: 1px solid rgba(86, 215, 244, .49);
  border-radius: 18px;
  box-shadow: 0 22px 65px rgba(0, 0, 0, .46);
  animation: aptvcg-slide-up 230ms ease-out both;
}
.aptvcg-handoff-banner strong { display: block; margin: 6px 28px 5px 0; color: #fff; font-size: 1.04rem; }
.aptvcg-handoff-banner p { margin: 0; color: #aebfd1; font-size: .84rem; line-height: 1.45; }
.aptvcg-handoff-banner > div { display: flex; gap: 8px; margin-top: 13px; }
.aptvcg-handoff-banner button { min-height: 38px; padding: 8px 12px; font-size: .78rem; }
.aptvcg-handoff-close { position: absolute; top: 10px; right: 10px; min-width: 32px !important; min-height: 32px !important; padding: 0 !important; border-radius: 50% !important; }

.aptvcg-inline-trigger { margin: 8px 0; }

/* Settings page small polish */
.aptvcg-admin { max-width: 1120px; }
.aptvcg-admin .form-table { background: #fff; border: 1px solid #dcdcde; }
.aptvcg-admin .form-table th,
.aptvcg-admin .form-table td { padding: 16px 18px; }
.aptvcg-admin .form-table tr + tr { border-top: 1px solid #eef0f2; }

@media (max-width: 760px) {
  .aptvcg-overlay { place-items: stretch; padding: 0; background: #031025; }
  .aptvcg-modal {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .aptvcg-header { position: sticky; top: 0; z-index: 8; padding: 18px 18px 14px; background: rgba(4, 18, 38, .93); border-bottom: 1px solid rgba(112, 184, 239, .13); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .aptvcg-header h2 { font-size: 2rem; }
  .aptvcg-header p { font-size: .85rem; line-height: 1.45; }
  .aptvcg-safety,
  .aptvcg-conversation,
  .aptvcg-recommendation,
  .aptvcg-providers,
  .aptvcg-account,
  .aptvcg-status,
  .aptvcg-type-form { margin-left: 16px; margin-right: 16px; }
  .aptvcg-safety { margin-top: 14px; }
  .aptvcg-conversation { min-height: 150px; max-height: 38dvh; }
  .aptvcg-message { width: 90%; }
  .aptvcg-provider-grid { grid-template-columns: 1fr; }
  .aptvcg-provider-card { display: flex; }
  .aptvcg-provider-card-head { grid-template-columns: 54px minmax(0, 1fr); }
  .aptvcg-provider-card > img,
  .aptvcg-provider-card-head > img,
  .aptvcg-provider-avatar { width: 54px; height: 54px; }
  .aptvcg-account ul { grid-template-columns: 1fr; }
  .aptvcg-controls {
    position: sticky;
    bottom: 0;
    z-index: 9;
    padding: 12px 14px calc(13px + var(--aptvcg-safe-bottom));
    background: linear-gradient(to top, rgba(3, 14, 31, .99) 72%, rgba(3,14,31,.8));
    border-top: 1px solid rgba(113, 183, 240, .13);
  }
  .aptvcg-mic { --mic-size: 98px; padding-top: 16px; }
  .aptvcg-mic-icon { font-size: 1.7rem; }
  .aptvcg-secondary { min-height: 38px; padding: 8px 11px; font-size: .7rem; }
  .aptvcg-footer { border-radius: 0; padding-left: 16px; padding-right: 16px; }
  .aptvcg-footer span { max-width: 64%; }
  .aptvcg-history-list,
  .aptvcg-dashboard-grid { grid-template-columns: 1fr; }
  .aptvcg-dashboard-grid p { min-height: 0; }
}

@media (max-width: 430px) {
  .aptvcg-header { grid-template-columns: 1fr 38px; gap: 8px; }
  .aptvcg-icon-button { width: 38px; height: 38px; }
  .aptvcg-safety { font-size: .7rem; }
  .aptvcg-recommendation,
  .aptvcg-providers,
  .aptvcg-account { padding: 17px; }
  .aptvcg-action-row { display: grid; grid-template-columns: 1fr; }
  .aptvcg-action-row > * { width: 100%; box-sizing: border-box; }
  .aptvcg-provider-card-actions { grid-template-columns: 1fr; }
  .aptvcg-controls { gap: 7px; }
  .aptvcg-mic { margin: 0 12px; }
  .aptvcg-history-actions { display: grid; }
  .aptvcg-history-actions > * { width: 100%; box-sizing: border-box; }
  .aptvcg-handoff-banner { right: 10px; bottom: calc(10px + var(--aptvcg-safe-bottom)); width: calc(100vw - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .aptvcg-overlay,
  .aptvcg-modal,
  .aptvcg-handoff-banner,
  .aptvcg-mic-ring { animation: none !important; }
  .aptvcg-conversation { scroll-behavior: auto; }
  .aptvcg-mic,
  .aptvcg-action-row a,
  .aptvcg-action-row button,
  .aptvcg-history-actions a,
  .aptvcg-history-actions button { transition: none !important; }
}

@keyframes aptvcg-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes aptvcg-rise-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes aptvcg-slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes aptvcg-pulse { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }

/* v1.2.0 — homepage front-door consolidation */
.aptvcg-home-simplified .aptvcg-home-legacy-guide,
.aptvcg-home-simplified .aptvcg-home-duplicate-control,
.aptvcg-home-simplified .apt-ssr-mini,
.aptvcg-home-simplified #apt-smart-start-router,
.aptvcg-home-simplified .apt-ssr-floating,
.aptvcg-home-simplified .apt-geo-dock,
.aptvcg-home-simplified [data-apt-geo-dock],
.aptvcg-home-simplified .apt-mobile-conversion-dock,
.aptvcg-home-simplified .apt-voice-concierge,
.aptvcg-home-simplified [data-apt-coach-floating],
.aptvcg-home-simplified .apt-coach-floating,
.aptvcg-home-simplified [data-apt-daily-tools],
.aptvcg-home-simplified [data-daily-tools],
.aptvcg-home-simplified .apt-daily-tools,
.aptvcg-home-simplified .daily-tools-widget,
.aptvcg-home-simplified .apt-side-tools,
.aptvcg-home-simplified .apt-tools-dock,
.aptvcg-home-simplified .aptvcg-home-native-intake {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Prevent the old static recommendation from flashing before a real AI result exists. */
.aptvcg-home-simplified [data-apt-premium-front-door] [data-apt-frontdoor-result]:not(.aptvcg-home-result-ready) {
  display: none !important;
}

.aptvcg-home-hero {
  margin-top: 0 !important;
  scroll-margin-top: 96px;
}
.aptvcg-home-hero .aptcg-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 70px) !important;
}
.aptvcg-home-hero .aptcg-card::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -150px;
  bottom: -190px;
  border: 1px solid rgba(69, 219, 244, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(49, 136, 255, .025), 0 0 0 108px rgba(116, 68, 248, .025);
  pointer-events: none;
}
.aptvcg-home-hero .aptcg-kicker,
.aptvcg-home-hero .aptvcg-home-intro,
.aptvcg-home-hero .aptvcg-home-heading,
.aptvcg-home-start-actions {
  position: relative;
  z-index: 31;
}
.aptvcg-home-hero .aptvcg-home-heading {
  max-width: 920px;
  margin-bottom: 18px !important;
  font-size: clamp(3.2rem, 8vw, 6.8rem) !important;
  line-height: .96 !important;
  letter-spacing: -.055em !important;
}
.aptvcg-home-hero .aptvcg-home-intro {
  max-width: 760px;
  margin: 0 !important;
  color: #c8d8e9 !important;
  font-size: clamp(1.02rem, 2.1vw, 1.25rem) !important;
  line-height: 1.55 !important;
}

/* The live premium front door already supplies its own background and spacing. */
[data-apt-premium-front-door].aptvcg-home-hero .aptvcg-home-heading,
[data-apt-premium-front-door].aptvcg-home-hero .aptvcg-home-intro,
[data-apt-premium-front-door].aptvcg-home-hero .aptvcg-home-start-actions {
  max-width: 860px;
}
[data-apt-premium-front-door].aptvcg-home-hero .aptvcg-home-start-actions {
  margin-left: 0;
  margin-right: 0;
}

.aptvcg-home-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 25px;
}
.aptvcg-home-primary,
.aptvcg-home-secondary,
.aptvcg-home-result-actions a,
.aptvcg-home-result-actions button,
.aptvcg-home-sticky {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 13px 22px;
  color: #fff;
  border: 1px solid rgba(131, 226, 255, .56);
  border-radius: 15px;
  font: 800 .94rem/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none !important;
  cursor: pointer;
  touch-action: manipulation;
}
.aptvcg-home-primary,
.aptvcg-home-result-actions .primary,
.aptvcg-home-sticky {
  background: linear-gradient(115deg, #28d3e9, #2d82ff 52%, #7748f5);
  box-shadow: 0 14px 34px rgba(39, 118, 243, .3);
}
.aptvcg-home-secondary,
.aptvcg-home-result-actions a:not(.primary),
.aptvcg-home-result-actions button:not(.primary) {
  color: #d7e8f8;
  background: rgba(4, 24, 48, .72);
  border-color: rgba(121, 190, 255, .27);
  box-shadow: none;
}
.aptvcg-home-primary:hover,
.aptvcg-home-secondary:hover,
.aptvcg-home-result-actions a:hover,
.aptvcg-home-result-actions button:hover,
.aptvcg-home-sticky:hover {
  color: #fff;
  transform: translateY(-1px);
  border-color: rgba(111, 231, 255, .82);
}
.aptvcg-home-examples {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
  color: #9fb4ca;
  font-size: .82rem;
}
.aptvcg-home-examples strong {
  color: #70e4f3;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.aptvcg-home-examples span {
  padding: 7px 10px;
  background: rgba(3, 18, 37, .45);
  border: 1px solid rgba(116, 184, 244, .15);
  border-radius: 999px;
}

.aptvcg-home-result[hidden] { display: none !important; }
.aptvcg-home-result {
  position: relative;
  overflow: hidden;
  width: min(1180px, calc(100% - 28px));
  box-sizing: border-box;
  margin: clamp(18px, 4vw, 34px) auto;
  padding: clamp(25px, 5vw, 46px);
  color: #eef7ff;
  background: linear-gradient(145deg, #0c2a4d, #071a31 64%);
  border: 1px solid rgba(91, 207, 244, .35);
  border-radius: 24px;
  box-shadow: 0 22px 62px rgba(0, 0, 0, .24);
  scroll-margin-top: 104px;
}
[data-apt-premium-front-door] .aptvcg-home-result {
  width: 100%;
  margin: clamp(22px, 4vw, 36px) 0 0;
}
.aptvcg-home-result::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(#31d6ee, #7444f8);
}
.aptvcg-home-result h2 {
  margin: 10px 0 10px;
  color: #fff;
  font: 850 clamp(2rem, 4.8vw, 3.8rem)/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.045em;
}
.aptvcg-home-summary {
  max-width: 880px;
  margin: 0;
  color: #bfd0e2;
  font-size: 1.05rem;
  line-height: 1.58;
}
.aptvcg-home-next {
  max-width: 920px;
  margin-top: 20px;
  padding: 19px;
  background: rgba(3, 18, 37, .54);
  border: 1px solid rgba(110, 186, 248, .19);
  border-radius: 16px;
}
.aptvcg-home-next h3 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}
.aptvcg-home-next p { margin: 0; color: #aebfd2; line-height: 1.52; }
.aptvcg-home-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.aptvcg-home-result-actions > * { min-height: 46px; padding: 11px 17px; }

/* One context-aware action replaces the overlapping legacy floaters. */
.aptvcg-home-sticky {
  position: fixed;
  z-index: 2147481900;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100vw - 28px);
  transform: translateX(-50%);
  white-space: nowrap;
  transition: opacity 160ms ease, transform 160ms ease;
}
.aptvcg-home-sticky:hover { transform: translateX(-50%) translateY(-1px); }
.aptvcg-home-sticky[hidden],
body.aptvcg-open .aptvcg-home-sticky,
body.aptvcg-frontdoor-in-view .aptvcg-home-sticky { display: none !important; }

/* Keep the optional account benefit after conversation controls. */
.aptvcg-account { margin-bottom: 18px; }

@media (max-width: 760px) {
  .aptvcg-home-hero .aptcg-card { padding: 30px 22px 28px !important; border-radius: 0 !important; }
  .aptvcg-home-hero .aptvcg-home-heading {
    max-width: 100%;
    font-size: clamp(2.75rem, 11.4vw, 3.95rem) !important;
    line-height: 1.01 !important;
    letter-spacing: -.052em !important;
    margin-bottom: 14px !important;
  }
  .aptvcg-home-hero .aptvcg-home-intro {
    font-size: 1rem !important;
    line-height: 1.48 !important;
  }
  .aptvcg-home-start-actions {
    display: grid;
    grid-template-columns: 1.18fr .82fr;
    gap: 10px;
    margin-top: 19px;
  }
  .aptvcg-home-primary,
  .aptvcg-home-secondary {
    width: 100%;
    min-height: 49px;
    padding: 12px 12px;
    border-radius: 14px;
  }
  .aptvcg-home-examples {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px;
    margin-top: 1px;
  }
  .aptvcg-home-examples strong { align-self: center; }
  .aptvcg-home-examples span { border-radius: 11px; }
  .aptvcg-home-examples span:nth-of-type(n+2) { display: none; }
  .aptvcg-home-result { width: calc(100% - 24px); padding: 24px 20px; border-radius: 20px; }
  [data-apt-premium-front-door] .aptvcg-home-result { width: 100%; }
  .aptvcg-home-result h2 { font-size: 2.35rem; }
  .aptvcg-home-result-actions { display: grid; grid-template-columns: 1fr; }
  .aptvcg-home-result-actions > * { width: 100%; box-sizing: border-box; }
  .aptvcg-home-sticky { width: calc(100vw - 30px); min-height: 50px; }
}

@media (max-width: 430px) {
  .aptvcg-home-hero .aptvcg-home-heading { font-size: clamp(2.55rem, 10.8vw, 3.35rem) !important; }
  .aptvcg-home-start-actions { grid-template-columns: 1fr 1fr; }
  .aptvcg-home-primary,
  .aptvcg-home-secondary { font-size: .84rem; }
  .aptvcg-home-examples { grid-template-columns: 1fr; }
}

/* v1.2.1 — deterministic homepage takeover for the live APT front door. */
.aptvcg-home-simplified .apt-vis-shell,
.aptvcg-home-simplified .apt-vis-ribbon,
.aptvcg-home-simplified .apt-vis-dock,
.aptvcg-home-simplified .apt-coach-floating,
.aptvcg-home-simplified .aptvcg-home-competing-floater,
.aptvcg-home-simplified [data-apt-frontdoor-result],
.aptvcg-home-simplified .aptvcg-home-legacy-guide,
.aptvcg-home-simplified .aptvcg-home-duplicate-control,
.aptvcg-home-simplified .aptvcg-home-native-intake {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.aptvcg-home-simplified [data-apt-premium-front-door],
.aptvcg-home-simplified .aptcg.aptvcg-home-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
}
.aptvcg-home-simplified [data-apt-premium-front-door] > .aptvcg-home-primary-panel,
.aptvcg-home-simplified .aptcg.aptvcg-home-hero > .aptvcg-home-primary-panel {
  width: 100% !important;
  max-width: none !important;
  grid-column: 1 / -1 !important;
}
.aptvcg-home-simplified [data-apt-premium-front-door] .aptvcg-home-start-actions,
.aptvcg-home-simplified .aptcg.aptvcg-home-hero .aptvcg-home-start-actions {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
@media (min-width: 881px) {
  .aptvcg-home-simplified .aptvcg-home-hero .aptvcg-home-heading {
    max-width: 1050px !important;
    font-size: clamp(4.2rem, 7vw, 7.2rem) !important;
  }
  .aptvcg-home-simplified .aptvcg-home-hero .aptvcg-home-intro {
    max-width: 820px !important;
  }
}


/* 1.2.1 live-homepage hardening: direct selectors work before JS classing. */
body.aptvcg-home-simplified [data-apt-clarity-guide] > [data-aptcg-result],
body.aptvcg-home-simplified [data-apt-clarity-guide] > .aptcg-result,
body.aptvcg-home-simplified [data-apt-clarity-guide] .aptcg-input-wrap,
body.aptvcg-home-simplified [data-apt-clarity-guide] .aptcg-quick,
body.aptvcg-home-simplified [data-apt-clarity-guide] .aptcg-badges,
body.aptvcg-home-simplified [data-apt-clarity-guide] .aptcg-welcome,
body.aptvcg-home-simplified .apt-voice-concierge,
body.aptvcg-home-simplified [data-apt-coach-floating],
body.aptvcg-home-simplified [data-apt-vis-ribbon],
body.aptvcg-home-simplified [data-apt-vis-dock] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.aptvcg-home-simplified [data-apt-clarity-guide] {
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(1180px, calc(100% - 28px)) !important;
  max-width: 1180px !important;
}


/* v1.3.0 — Console integration */
.aptvcg-console-history {
  scroll-margin-top: 96px;
  margin-top: clamp(16px, 3vw, 32px);
  margin-bottom: clamp(22px, 4vw, 46px);
}
.aptvcg-console-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}
.aptvcg-console-history-head h2 { margin-bottom: 8px; }
.aptvcg-console-history-head p {
  max-width: 760px;
  margin: 0;
  color: #9fb5ca;
  font-size: .9rem;
  line-height: 1.55;
}
.aptvcg-console-talk,
.aptvcg-show-older {
  appearance: none;
  min-height: 42px;
  padding: 10px 15px;
  color: #fff;
  background: linear-gradient(135deg, #20c8dc, #486ef4 58%, #8748ef);
  border: 1px solid rgba(139, 227, 255, .62);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(28, 111, 231, .24);
  font: 800 .8rem/1.1 system-ui, sans-serif;
  cursor: pointer;
}
.aptvcg-console-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aptvcg-console-card { min-width: 0; }
.aptvcg-console-card h3 { margin: 8px 0 9px; color: #fff; font-size: 1.15rem; }
.aptvcg-console-card > p { min-height: 0; margin: 0; color: #afc2d6; font-size: .87rem; line-height: 1.5; }
.aptvcg-console-card .aptvcg-history-actions { margin-top: 14px; }
.aptvcg-show-older { display: block; margin: 16px auto 0; background: rgba(15, 48, 84, .85); box-shadow: none; }
.aptvcg-console-history [hidden] { display: none !important; }

@media (max-width: 760px) {
  .aptvcg-console-history-head { display: grid; }
  .aptvcg-console-talk { width: 100%; }
  .aptvcg-console-grid { grid-template-columns: 1fr; }
  .aptvcg-console-card > p { min-height: 0; }
}


/* v1.3.2 — true full-width homepage mount + equal split start actions */
.aptvcg-home-source-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.aptvcg-home-rebuilt-parent {
  grid-template-columns: minmax(0, 1fr) !important;
}
.aptvcg-home-rebuilt-parent > .aptvcg-home-rebuilt {
  grid-column: 1 / -1 !important;
  flex: 0 0 100% !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}
.aptvcg-home-rebuilt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block !important;
  grid-column: 1 / -1 !important;
  width: min(1480px, calc(100vw - 24px)) !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box;
  margin: 0 0 clamp(26px, 4vw, 48px) 50% !important;
  transform: translateX(-50%);
  padding: clamp(32px, 5.4vw, 74px);
  color: #eef8ff;
  background:
    radial-gradient(circle at 92% 4%, rgba(86, 83, 255, .22), transparent 34%),
    radial-gradient(circle at 4% 96%, rgba(28, 205, 228, .12), transparent 34%),
    linear-gradient(135deg, rgba(4, 23, 45, .98), rgba(8, 28, 66, .97) 57%, rgba(22, 26, 84, .96));
  border: 1px solid rgba(94, 202, 246, .28);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28), inset 0 1px rgba(255,255,255,.025);
  scroll-margin-top: 100px;
}
.aptvcg-home-rebuilt::before,
.aptvcg-home-rebuilt::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}
.aptvcg-home-rebuilt::before {
  width: 520px;
  height: 520px;
  top: -330px;
  right: -170px;
  border: 1px solid rgba(83, 198, 255, .11);
  box-shadow: 0 0 0 70px rgba(74, 88, 255, .026), 0 0 0 140px rgba(66, 213, 234, .02);
}
.aptvcg-home-rebuilt::after {
  width: 300px;
  height: 300px;
  left: -175px;
  bottom: -210px;
  background: rgba(34, 208, 225, .08);
  filter: blur(8px);
}
.aptvcg-home-lead {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  grid-column: 1 / -1 !important;
}
.aptvcg-home-kicker {
  margin: 0 0 15px;
  color: #68e6f5;
  font: 850 .76rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.aptvcg-home-rebuilt .aptvcg-home-heading {
  display: block !important;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 0 20px !important;
  color: #fff;
  font-size: clamp(4.4rem, 7.5vw, 8.15rem) !important;
  line-height: .9 !important;
  letter-spacing: -.066em !important;
  text-wrap: balance;
}
.aptvcg-home-rebuilt .aptvcg-home-intro {
  width: 100%;
  max-width: 1120px !important;
  margin: 0 !important;
  color: #c8d8e9 !important;
  font-size: clamp(1.05rem, 1.65vw, 1.34rem) !important;
  line-height: 1.55 !important;
  text-wrap: pretty;
}
.aptvcg-home-rebuilt .aptvcg-home-split-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  gap: 16px;
  margin: clamp(26px, 3.5vw, 40px) 0 0;
}
.aptvcg-home-rebuilt .aptvcg-home-split-button {
  width: 100%;
  min-height: 88px;
  box-sizing: border-box;
  justify-content: flex-start;
  gap: 16px;
  padding: 18px clamp(19px, 2.7vw, 34px);
  border-radius: 20px;
  text-align: left;
  font-size: 1rem;
}
.aptvcg-home-rebuilt .aptvcg-home-primary.aptvcg-home-split-button {
  background: linear-gradient(110deg, #27d5e9, #277fff 52%, #7a43f4);
  box-shadow: 0 18px 45px rgba(37, 112, 244, .32), inset 0 1px rgba(255,255,255,.16);
}
.aptvcg-home-rebuilt .aptvcg-home-secondary.aptvcg-home-split-button {
  color: #f2f8ff;
  background: linear-gradient(135deg, rgba(12, 49, 88, .88), rgba(9, 25, 52, .92));
  border-color: rgba(111, 201, 255, .4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .17), inset 0 1px rgba(255,255,255,.035);
}
.aptvcg-home-button-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 1.25rem;
}
.aptvcg-home-button-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.aptvcg-home-button-copy strong {
  color: inherit;
  font: 850 clamp(1.05rem, 1.65vw, 1.36rem)/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.02em;
}
.aptvcg-home-button-copy small {
  color: rgba(231, 244, 255, .72);
  font: 650 .75rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .02em;
}
.aptvcg-home-rebuilt .aptvcg-home-examples {
  width: 100%;
  margin: 16px 0 0;
}
.aptvcg-home-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(24px, 3vw, 34px);
}
.aptvcg-home-route-card {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 104px;
  box-sizing: border-box;
  padding: 18px;
  color: #ecf7ff;
  background: linear-gradient(145deg, rgba(15, 52, 91, .72), rgba(4, 24, 49, .78));
  border: 1px solid rgba(111, 194, 255, .27);
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.aptvcg-home-route-card:hover,
.aptvcg-home-route-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(104, 226, 245, .68);
  background: linear-gradient(145deg, rgba(17, 67, 113, .82), rgba(5, 30, 60, .88));
  outline: none;
}
.aptvcg-home-route-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #88effa;
  background: rgba(53, 181, 230, .11);
  border: 1px solid rgba(107, 218, 247, .24);
  border-radius: 12px;
  font-weight: 900;
}
.aptvcg-home-route-card strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font: 820 .98rem/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.aptvcg-home-route-card small {
  display: block;
  color: #9fb3c8;
  font: 600 .76rem/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.aptvcg-home-route-arrow {
  color: #6ee5f3;
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .aptvcg-home-rebuilt {
    width: min(100%, calc(100% - 18px));
    padding: clamp(28px, 6vw, 48px) clamp(20px, 4vw, 34px);
    border-radius: 22px;
  }
  .aptvcg-home-rebuilt .aptvcg-home-heading {
    font-size: clamp(3.35rem, 10.5vw, 6rem) !important;
    line-height: .94 !important;
  }
  .aptvcg-home-route-grid { grid-template-columns: 1fr; }
  .aptvcg-home-route-card { min-height: 88px; }
}

@media (max-width: 560px) {
  .aptvcg-home-rebuilt {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 0 0 50% !important;
    transform: translateX(-50%);
    padding: 29px 18px 26px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .aptvcg-home-rebuilt .aptvcg-home-heading {
    font-size: clamp(2.9rem, 13vw, 4rem) !important;
    line-height: .97 !important;
    letter-spacing: -.057em !important;
  }
  .aptvcg-home-rebuilt .aptvcg-home-intro {
    font-size: .98rem !important;
    line-height: 1.48 !important;
  }
  .aptvcg-home-rebuilt .aptvcg-home-split-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 9px;
    margin-top: 22px;
  }
  .aptvcg-home-rebuilt .aptvcg-home-split-button {
    min-height: 72px;
    gap: 9px;
    padding: 12px 10px;
    border-radius: 15px;
  }
  .aptvcg-home-button-icon {
    width: 35px;
    height: 35px;
    font-size: .95rem;
  }
  .aptvcg-home-button-copy strong { font-size: .88rem; }
  .aptvcg-home-button-copy small { display: none; }
  .aptvcg-home-rebuilt .aptvcg-home-examples {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .aptvcg-home-rebuilt .aptvcg-home-examples strong { margin-bottom: 2px; }
  .aptvcg-home-rebuilt .aptvcg-home-examples span:nth-of-type(n+2) { display: none; }
  .aptvcg-home-route-grid { gap: 10px; margin-top: 18px; }
  .aptvcg-home-route-card { min-height: 78px; padding: 14px; }
}

/* v1.3.3 — continue the hero's full-width rhythm through the homepage. */
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-root {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-result.aptvcg-home-wide-result {
  width: min(1480px, calc(100vw - 24px)) !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin-left: calc(50% - min(740px, calc(50vw - 12px))) !important;
  margin-right: 0 !important;
}

body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > .aptvcg-home-wide-inner,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > .wp-block-group__inner-container,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > .container,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > .wrap {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Preserve readable copy even while the section and its card grids use the full frame. */
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell p,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell li {
  text-wrap: pretty;
}
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > p,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > header > p,
body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell > .apt-section-copy {
  max-width: 980px;
}

@media (max-width: 900px) {
  body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell,
  body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-result.aptvcg-home-wide-result {
    width: min(100%, calc(100vw - 18px)) !important;
    margin-left: calc(50% - min(50%, calc(50vw - 9px))) !important;
  }
}

@media (max-width: 560px) {
  body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-wide-shell,
  body.aptvcg-home-simplified.aptvcg-home-tail-wide .aptvcg-home-result.aptvcg-home-wide-result {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
  }
}
