:root {
  --bg: #040815;
  --bg-soft: #0b1328;
  --panel: #101b36;
  --panel-2: #142246;
  --text: #e9efff;
  --muted: #a9b7dd;
  --accent: #7aa8ff;
  --accent-2: #aa86ff;
  --border: #253763;
  --theme-gradient: linear-gradient(135deg, rgba(122,168,255,0.22) 0%, rgba(170,134,255,0.18) 50%, rgba(12,20,44,0.88) 100%);
  --theme-layered: var(--theme-gradient), rgba(8, 14, 34, 0.72);
  --theme-surface: rgba(8, 14, 34, 0.72);
  --content-max: 980px; /* mobile baseline: default page/content width */
  --content-max-wide: 1160px; /* mobile baseline: nav/footer wider shell */
  --gutter: 1rem; /* mobile baseline: shared horizontal breathing room */
  --shell-padding: 1rem;
  --shell-radius: 20px;
  --header-padding-block: 1rem;
  --header-padding-inline: 1.1rem;
  --card-padding: 1.35rem;
  --fs-body: clamp(1rem, 1rem, 1rem);
  --lh-body: clamp(1.65, 1.65, 1.65);
  --fs-small: clamp(0.95rem, 0.95rem, 0.95rem);
  --fs-nav-submenu: var(--fs-small);
  --fs-field-count: 0.88rem;
  --fs-feedback-status: 0.9rem;
  --fs-launch-kicker: clamp(1.06rem, 1.06rem, 1.06rem);
  --fs-launch-cta: clamp(1.02rem, 1.02rem, 1.02rem);
  --fs-h1: clamp(1.55rem, 1.55rem, 1.55rem);
  --fs-v-h1: clamp(2rem, 2rem, 2rem);
  --fs-v-h2: clamp(1.5rem, 1.5rem, 1.5rem);
  --fs-v-h3: clamp(1.25rem, 1.25rem, 1.25rem);
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background-color: var(--bg);
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(160deg, #172a56 0px, #122247 260px, var(--bg) 640px, #050a1a 100%);
  background-size: 100% 100vh;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4, 8, 21, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { width: min(var(--content-max-wide), 100%); margin: 0 auto; padding-block: 0.8rem; padding-inline: var(--gutter); display: flex; align-items: center; gap: 1rem; }
.brand { font-weight: 700; color: #fff; white-space: nowrap; }
.mobile-nav-toggle,
.mobile-nav-button { display: none; }
nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav li { position: relative; }
.dropdown > ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem;
}
.dropdown:hover > ul { display: block; }
main { flex: 1; width: min(var(--content-max), 100%); margin: 2rem auto; padding-block: 0 3rem; padding-inline: var(--gutter); }

.page-shell {
  width: 100%;
  padding: var(--shell-padding);
  border: 1px solid #1f315d;
  border-radius: var(--shell-radius);
  background: var(--theme-layered);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .36);
}

.page-header {
  margin: 0 0 1rem;
  width: 100%;
  padding: var(--header-padding-block) var(--header-padding-inline);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--theme-surface);
}

.page-header h1 {
  margin: 0 0 .4rem;
  line-height: 1.2;
}

.page-header p {
  margin: 0;
  color: #dbe7ff;
}

.logo-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.hero-title {
  margin: 0;
  text-align: center;
  font-size: var(--fs-h1);
  line-height: 1.2;
  color: #f3f8ff;
  text-wrap: balance;
}

.site-logo {
  width: min(380px, 70vw);
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.45));
}


.launch-context {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--theme-surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.launch-kicker,
.launch-cta {
  margin: 0;
  text-align: center;
  color: #f3f7ff;
  letter-spacing: .2px;
}
.launch-kicker { margin-bottom: .9rem; font-size: var(--fs-launch-kicker); }
.launch-cta { margin-top: .95rem; font-size: var(--fs-launch-cta); color: #dbe8ff; }
.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}
.launch-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  background: var(--theme-surface);
}
.launch-panel--chatgpt,
.launch-panel--poe,
.launch-panel--apologist { border-top: 1px solid var(--border); }
.launch-panel p { margin: 0.42rem 0; color: #dfe8ff; font-size: var(--fs-small); }
.launch-panel p:first-child { margin: 0 0 .65rem; }
.launch-panel p:first-child a {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: .52rem .65rem;
  border-radius: 10px;
  color: #f7faff;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--theme-surface);
}
.launch-panel p:first-child a:hover { filter: brightness(1.08); }

.launch-panel ul {
  margin: 0.35rem 0 0.15rem 1.15rem;
  padding: 0;
}
.launch-panel li {
  margin: 0.34rem 0;
  color: #dfe8ff;
  font-size: var(--fs-small);
}
.launch-panel li ul {
  margin-top: 0.4rem;
}

.card {
  width: 100%;
  background: var(--theme-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--card-padding);
}


#apg-inline-shell {
  margin: 1rem auto;
  padding: 2px;
  border-radius: 18px;
  background: #ffce48;
}

#apg-inline-target {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-width: 0;
  overflow-x: visible;
  border-radius: 16px;
}

#apg-inline-target > * {
  width: 100% !important;
  max-width: 100% !important;
}

#apg-inline-target iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(560px, 78vh, 780px) !important;
  border: 0;
  border-radius: 16px;
}
.verbatim-content h1,.verbatim-content h2,.verbatim-content h3,.verbatim-content h4 {
  line-height: 1.25;
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
}
.verbatim-content h1 { margin-top: 0.25rem; font-size: var(--fs-v-h1); }
.verbatim-content h2 { font-size: var(--fs-v-h2); }
.verbatim-content h3 { font-size: var(--fs-v-h3); }
.verbatim-content p { margin: 0.7rem 0; font-size: var(--fs-body); }
.verbatim-content ul,
.verbatim-content ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.2rem;
}
.verbatim-content li {
  font-size: var(--fs-body);
}
.verbatim-content p,
.verbatim-content li,
.verbatim-content a {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.verbatim-content {
  min-width: 0;
}
.verbatim-content blockquote {
  margin: 0.9rem 0;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}
.verbatim-content pre {
  white-space: pre-wrap;
  background: #050b1e;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
  color: #d2ddff;
}
.verbatim-content hr { border-color: var(--border); opacity: .5; }

.video-embed-wrap {
  margin: 1.2rem auto 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.video-embed-wrap iframe {
  display: block;
  width: min(100%, 840px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

footer {
  margin-top: auto;
  background: rgba(4, 8, 21, 0.92);
  color: var(--muted);
  padding: 1.4rem 1rem;
}

.footer-content {
  margin: 0 auto;
  width: min(var(--content-max), 100%);
  padding-inline: var(--gutter);
  display: grid;
  gap: 1rem;
}


@media (min-width: 1024px) {
  :root {
    --gutter: 1.1rem; /* desktop expansion: slightly larger horizontal gutter */
    --shell-padding: 1.1rem;
    --header-padding-block: 1.1rem;
    --header-padding-inline: 1.2rem;
    --card-padding: 1.4rem;
    --fs-body: clamp(1rem, 0.95rem + 0.28vw, 1.08rem);
    --lh-body: clamp(1.65, 1.6 + 0.2vw, 1.72);
    --fs-small: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
    --fs-launch-kicker: clamp(1.06rem, 0.95rem + 0.45vw, 1.18rem);
    --fs-launch-cta: clamp(1.02rem, 0.92rem + 0.35vw, 1.12rem);
    --fs-h1: clamp(1.55rem, 1.2rem + 1.2vw, 2.15rem);
    --fs-v-h1: clamp(2rem, 1.72rem + 0.9vw, 2.4rem);
    --fs-v-h2: clamp(1.5rem, 1.35rem + 0.45vw, 1.75rem);
    --fs-v-h3: clamp(1.25rem, 1.18rem + 0.25vw, 1.4rem);
  }
}

@media (min-width: 1440px) {
  :root {
    --gutter: 1.25rem; /* desktop expansion: extra width with larger side gutters */
    --shell-padding: 1.2rem;
    --header-padding-block: 1.15rem;
    --header-padding-inline: 1.25rem;
    --card-padding: 1.5rem;
    --fs-body: clamp(1.06rem, 0.98rem + 0.3vw, 1.14rem);
    --fs-small: clamp(0.98rem, 0.92rem + 0.22vw, 1.04rem);
    --fs-launch-kicker: clamp(1.12rem, 1rem + 0.35vw, 1.24rem);
    --fs-launch-cta: clamp(1.08rem, 0.96rem + 0.3vw, 1.18rem);
    --fs-h1: clamp(1.85rem, 1.35rem + 1vw, 2.35rem);
    --fs-v-h1: clamp(2.2rem, 1.9rem + 0.8vw, 2.6rem);
    --fs-v-h2: clamp(1.6rem, 1.42rem + 0.4vw, 1.88rem);
    --fs-v-h3: clamp(1.3rem, 1.2rem + 0.25vw, 1.5rem);
  }

  .site-logo {
    width: min(440px, 60vw);
  }

  .video-embed-wrap iframe {
    width: min(100%, 960px);
  }
}

@media (min-width: 1200px) {
  :root {
    --content-max: 1080px; /* desktop expansion: readable main content width */
    --content-max-wide: 1240px; /* desktop expansion: nav/footer can breathe wider */
  }
}

@media (min-width: 1600px) {
  :root {
    --content-max: 1180px; /* desktop expansion: ultra-wide content limit */
    --content-max-wide: 1360px; /* desktop expansion: ultra-wide shell limit */
  }
}

.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.footer-copyright {
  margin: 0;
  text-align: center;
}

.footer-social-links {
  margin: 0.4rem 0 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.footer-feedback-form {
  margin: 0 auto;
  width: min(560px, 100%);
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.footer-feedback-form h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  text-align: center;
}

.footer-feedback-form input,
.footer-feedback-form textarea,
.footer-feedback-form button {
  font: inherit;
}

.footer-feedback-form input,
.footer-feedback-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0.6rem 0.7rem;
}

.footer-feedback-form button {
  margin-top: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
}

.footer-feedback-form button:disabled {
  opacity: 0.7;
  cursor: wait;
}


.field-count {
  margin: 0;
  font-size: var(--fs-field-count);
  color: var(--text-dim);
  text-align: right;
}

.feedback-status {
  margin: 0;
  min-height: 1.25rem;
  font-size: var(--fs-feedback-status);
}

.feedback-status.feedback-success {
  color: #66d28d;
}

.feedback-status.feedback-error {
  color: #ff8c8c;
}

.hidden-honeypot {
  position: absolute;
  left: -9999px;
}
@media (max-width: 860px){
  .nav-wrap {
    position: relative;
    justify-content: space-between;
    gap: .75rem;
  }
  .brand {
    min-width: 0;
    max-width: calc(100% - 64px);
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .mobile-nav-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    cursor: pointer;
    font-size: 0;
    flex: 0 0 auto;
    position: relative;
  }
  .mobile-nav-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #edf3ff;
    box-shadow: 0 -6px 0 #edf3ff, 0 6px 0 #edf3ff;
    transform: translate(-50%, -50%);
    transition: box-shadow .2s ease, transform .2s ease;
  }
  nav {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    width: min(88vw, 360px);
    max-height: min(70vh, 520px);
    padding: .65rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(8, 15, 34, 0.97);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .5);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.98);
    transform-origin: top right;
    transition: opacity .2s ease, transform .22s ease, visibility .22s ease;
    z-index: 90;
  }
  .mobile-nav-toggle:checked + .mobile-nav-button {
    background: #1b2f59;
    border-color: #37508a;
  }
  .mobile-nav-toggle:checked + .mobile-nav-button::before {
    box-shadow: 0 0 0 #edf3ff, 0 0 0 #edf3ff;
    transform: translate(-50%, -50%) rotate(90deg);
  }
  .mobile-nav-toggle:checked + .mobile-nav-button {
    font-size: 0;
  }
  .mobile-nav-toggle:checked + .mobile-nav-button::after {
    content: "✕";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.05rem;
    color: #edf3ff;
    font-weight: 700;
  }
  .mobile-nav-toggle:checked ~ nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  nav ul {
    display: grid;
    gap: .35rem;
  }
  nav li {
    width: 100%;
  }
  nav a {
    display: block;
    width: 100%;
    padding: .62rem .72rem;
    border-radius: 10px;
    line-height: 1.3;
  }
  nav > ul > li > a {
    background: rgba(18, 30, 58, 0.76);
  }
  nav > ul > li > a:hover,
  nav > ul > li > a:focus-visible {
    background: rgba(24, 40, 74, 0.95);
    text-decoration: none;
  }
  .dropdown > ul {
    position: static;
    display: block;
    margin-top: .25rem;
    margin-left: .45rem;
    min-width: 0;
    border: 0;
    border-left: 2px solid rgba(122, 168, 255, .45);
    border-radius: 0;
    padding: .15rem 0 0 .45rem;
    background: transparent;
  }
  .dropdown > ul a {
    padding: .45rem .58rem;
    font-size: var(--fs-nav-submenu);
    color: #cfe0ff;
    background: transparent;
  }

  #apg-inline-target iframe {
    display: block;
    width: min(100%, 420px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: clamp(620px, 84vh, 900px) !important;
    margin: 0 auto;
  }

  .verbatim-content ul,
  .verbatim-content ol {
    padding-left: 1rem;
  }
}
