/*
 * Alignment Tax Guide — scoped styles
 * All selectors are prefixed with .atg-page so the guide can coexist with
 * Opal's global CSS. Loaded only on /alignment-tax-guide/.
 */

/* Suppress site notification bar on this page only. */
body.page-alignment-tax-guide #notification-bar { display: none !important; }

/*
 * Enable the sticky sidebar on this page only.
 * The theme's #page (.site) wrapper has `overflow:hidden` site-wide to clip
 * horizontal bleed. Any non-`visible` overflow ancestor becomes the scroll
 * container for descendant position:sticky — and since #page never scrolls
 * (the window does), the sticky nav had zero scroll range and rode the page
 * down. `overflow-x:clip` keeps the horizontal clipping without creating a
 * scroll container, so the sidebar can stick. (`clip` is exempt from the rule
 * that forces the other axis to `auto`, so overflow-y stays truly visible.)
 */
body.page-alignment-tax-guide #page {
  overflow-x: clip;
  overflow-y: visible;
}

/* Wistia <wistia-player> pre-defined loading state. */
.atg-page wistia-player[media-id='top2m90ppv']:not(:defined),
.atg-page wistia-player[media-id='y6m8tx0x6m']:not(:defined) {
  background: center / contain no-repeat;
  display: block;
  filter: blur(5px);
  padding-top: 56.25%;
}
.atg-page wistia-player[media-id='top2m90ppv']:not(:defined) {
  background-image: url('https://fast.wistia.com/embed/medias/top2m90ppv/swatch');
}
.atg-page wistia-player[media-id='y6m8tx0x6m']:not(:defined) {
  background-image: url('https://fast.wistia.com/embed/medias/y6m8tx0x6m/swatch');
}

/* Guide-scoped design tokens. */
.atg-page {
  --bg: #ffffff;
  --paper: #f7f9fc;
  --text: #122033;
  --muted: #52617a;
  --line: #dce3ef;
  --brand: #1f5eff;
  --brand-soft: #e8efff;
  --success: #11815a;
  --shadow: 0 18px 40px rgba(10, 34, 76, 0.08);
  --radius: 16px;
  --nav-width: 310px;
  --atg-nav-offset: 80px;

  font-family: "Proxima Nova", "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background:
    radial-gradient(circle at 10% 8%, #eef4ff 0, transparent 26%),
    radial-gradient(circle at 82% 20%, #f9f3eb 0, transparent 25%),
    var(--bg);
}

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

.atg-page .page-shell {
  display: grid;
  grid-template-columns: minmax(260px, var(--nav-width)) minmax(0, 1fr);
  max-width: 1500px;
  margin: 0 auto;
  min-height: 100vh;
}

.atg-page .side-nav {
  position: sticky;
  top: var(--atg-nav-offset, 80px);
  height: calc(100vh - var(--atg-nav-offset, 80px));
  overflow-y: auto;
  padding: 4rem 1.4rem 2rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  z-index: 1;
}

.atg-page .brand-wrap {
  width: min(100%, 245px);
  margin-inline: auto;
  margin-bottom: 1.4rem;
}

.atg-page .eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.atg-page .side-nav h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 2vw, 2rem);
  margin: 0.5rem 0 0.32rem;
  line-height: 1.1;
  color: #2a70ea;
}

.atg-page .side-nav .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.atg-page .side-nav nav {
  display: grid;
  gap: 0.3rem;
  width: min(100%, 245px);
  margin: 1.4rem auto 0;
}

.atg-page .nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-weight: 600;
  transition: 180ms ease;
}

.atg-page .nav-link:hover,
.atg-page .nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.atg-page .diagnostic-meter {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.atg-page .diagnostic-meter p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.atg-page .meter-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.atg-page .diagnostic-meter strong {
  display: block;
  margin: 0.2rem 0 0.75rem;
  font-size: 1.1rem;
}

.atg-page .meter-track {
  height: 9px;
  background: #ecf1f8;
  border-radius: 999px;
  overflow: hidden;
}

.atg-page .meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f72ff 0%, #27b5ff 100%);
  transition: width 220ms ease;
}

.atg-page .meter-readout {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: #2e4469;
}

.atg-page .inline-calculator {
  margin-top: 1.1rem;
}

.atg-page .ghost-btn {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}

.atg-page .ghost-btn:hover {
  border-color: #bac8e3;
  color: var(--text);
}

.atg-page .content {
  padding: 2.4rem clamp(1.2rem, 4vw, 4rem);
}

.atg-page .section {
  max-width: 930px;
  margin-bottom: 3.15rem;
  padding: 1.7rem 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.atg-page .hero {
  border: 1px solid #e7edf8;
  border-radius: 18px;
  padding: 1.9rem 1.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.atg-page .section-head {
  margin-bottom: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.atg-page .kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  font-size: 0.8rem;
  margin: 0;
  font-weight: 700;
}

.atg-page h2,
.atg-page h3,
.atg-page h4 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-synthesis: none;
  margin-top: 0;
  margin-bottom: 0.95rem;
  line-height: 1.14;
  color: var(--text);
}

.atg-page h2 {
  font-size: clamp(3.2rem, 6vw, 5.1rem);
  line-height: 1.01;
}

.atg-page h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

.atg-page h4 {
  font-size: 1.35rem;
}

.atg-page p {
  margin: 0 0 1rem;
  color: var(--text);
}

.atg-page .symptom-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.62rem;
}

.atg-page .symptom-item {
  border: 1px solid rgba(205, 218, 240, 0.9);
  border-radius: 12px;
  padding: 0.82rem 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 250, 255, 0.75) 100%);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.atg-page .symptom-item:hover {
  border-color: #bacceb;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(20, 40, 90, 0.06);
}

.atg-page .check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.02rem;
}

.atg-page input[type="checkbox"] {
  accent-color: var(--brand);
  margin-top: 0.27rem;
  width: 18px;
  height: 18px;
}

.atg-page .symptom-callout {
  border-top: 1px dashed #d8e2f1;
  margin-top: 0.52rem;
  padding-top: 0.45rem;
}

.atg-page .symptom-callout-label {
  margin: 0 0 0.18rem;
  display: inline-block;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.68rem;
  color: #28426d;
  background: #e9f0ff;
}

.atg-page .symptom-callout p:last-child {
  margin: 0;
  font-size: 0.95rem;
}

.atg-page .tax-map-placeholder {
  border: 1px dashed #9eb6e2;
  border-radius: 14px;
  padding: 1rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, rgba(247, 249, 255, 0.92) 0%, rgba(253, 248, 242, 0.82) 100%);
}

.atg-page .placeholder-kicker {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #425f8e;
  font-size: 0.75rem;
  font-weight: 700;
}

.atg-page .emoji-org-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border: 1px dashed rgba(122, 149, 195, 0.8);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(240, 247, 255, 0.52) 100%);
}

.atg-page .emoji-cell {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(145, 169, 210, 0.62);
}

.atg-page .emoji-cell-icon {
  font-size: 1.34rem;
  line-height: 1;
  transition: transform 260ms ease, opacity 260ms ease;
  filter: saturate(1.08);
}

.atg-page .emoji-cell-icon.is-swapping {
  animation: atgEmojiSwap 300ms ease;
}

@keyframes atgEmojiSwap {
  0%   { opacity: 0.18; transform: scale(0.82) translateY(2px); }
  60%  { opacity: 1;    transform: scale(1.12) translateY(-1px); }
  100% { opacity: 1;    transform: scale(1); }
}

.atg-page .estimator {
  border: 1px solid #dbe4f5;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.92) 0%, rgba(244, 248, 255, 0.9) 100%);
  padding: 1.1rem;
  margin: 1.4rem 0;
}

.atg-page .estimator-head p {
  margin-bottom: 0.85rem;
}

.atg-page .estimator-chart {
  border: 1px solid rgba(207, 219, 243, 0.78);
  border-radius: 12px;
  padding: 0.3rem;
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.92) 0%, rgba(241, 246, 255, 0.78) 100%);
}

.atg-page .output-chart {
  width: 100%;
  height: 292px;
  display: block;
}

.atg-page .output-grid-line {
  stroke: rgba(83, 118, 171, 0.22);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.atg-page .output-grid-line.vertical {
  stroke: rgba(87, 127, 188, 0.14);
}

.atg-page .output-axis-label {
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: 15px;
  font-weight: 600;
  fill: #5c739a;
  letter-spacing: 0.04em;
}

.atg-page .output-axis-label.percent {
  text-anchor: end;
}

.atg-page .output-axis-label.year {
  text-anchor: middle;
}

.atg-page .output-area {
  fill: url(#outputAreaGradient);
}

.atg-page .output-line {
  fill: none;
  stroke: #1f5eff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(31, 94, 255, 0.35));
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: atgDrawOutputCurve 1200ms ease-out forwards;
}

.atg-page .output-point-dot {
  fill: #f6faff;
  stroke: rgba(31, 94, 255, 0.88);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(31, 94, 255, 0.28));
}

.atg-page .output-point-text {
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: 21px;
  font-weight: 700;
  fill: #2c4f88;
  text-anchor: middle;
  letter-spacing: 0.03em;
}

.atg-page .output-proj-label {
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: 17px;
  font-weight: 600;
  fill: rgba(57, 89, 142, 0.88);
  text-anchor: middle;
  letter-spacing: 0.03em;
}

.atg-page .output-proj-halo {
  fill: rgba(31, 94, 255, 0.15);
  stroke: rgba(31, 94, 255, 0.62);
  stroke-width: 1.5;
}

.atg-page .output-proj-core {
  fill: #f6faff;
  stroke: rgba(31, 94, 255, 0.95);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(31, 94, 255, 0.32));
}

.atg-page .output-proj-callout {
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: 23px;
  font-weight: 700;
  fill: #244780;
  letter-spacing: 0.02em;
}

.atg-page #act-now {
  max-width: 1080px;
}

.atg-page #act-now .estimator {
  padding-left: 0.92rem;
  padding-right: 0.92rem;
}

.atg-page .estimator-note {
  margin: 0.85rem 0 0;
  color: #486793;
  font-size: 0.78rem;
  line-height: 1.5;
}

@keyframes atgDrawOutputCurve {
  to { stroke-dashoffset: 0; }
}

.atg-page .estimator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.atg-page .estimator label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  color: #2b3f63;
}

.atg-page input[type="range"] {
  width: 100%;
}

.atg-page .volume-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(
    to right,
    rgba(31, 94, 255, 0.76) 0%,
    rgba(31, 94, 255, 0.76) var(--pct, 0%),
    rgba(188, 206, 238, 0.94) var(--pct, 0%),
    rgba(188, 206, 238, 0.94) 100%
  ) center / 100% 4px no-repeat;
  cursor: pointer;
  outline: none;
  transition: background 180ms ease, filter 180ms ease;
}

.atg-page .volume-slider:hover,
.atg-page .volume-slider:focus-visible,
.atg-page .volume-slider:active {
  filter: drop-shadow(0 0 6px rgba(31, 94, 255, 0.32));
}

.atg-page .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(31, 94, 255, 0.82);
  background: #f8fbff;
  box-shadow:
    0 1px 6px rgba(13, 34, 73, 0.34),
    0 0 7px rgba(31, 94, 255, 0.36);
}

.atg-page .volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(31, 94, 255, 0.82);
  background: #f8fbff;
  box-shadow:
    0 1px 6px rgba(13, 34, 73, 0.34),
    0 0 7px rgba(31, 94, 255, 0.36);
}

.atg-page .estimator label span {
  color: var(--brand);
  font-weight: 700;
}

.atg-page .estimator-projection {
  margin: 0.95rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px dashed #cad8f0;
  color: #466895;
  font-size: 0.92rem;
}

.atg-page .estimator-projection strong {
  color: #1e4a84;
  font-size: 1.14rem;
}

.atg-page .pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.atg-page .pillar-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 251, 255, 0.72) 100%);
  border: 1px solid rgba(214, 225, 243, 0.75);
  border-radius: 14px;
  padding: 0.9rem;
}

.atg-page .pillar-card:last-child {
  grid-column: 1 / -1;
}

.atg-page .pillar-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.48rem;
}

.atg-page .pillar-title-row h4 {
  margin: 0;
}

.atg-page .mini-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  color: #2d446c;
  font-weight: 600;
}

.atg-page .mini-check-inline {
  margin-top: 0;
  white-space: nowrap;
  font-size: 0.83rem;
  color: #3a5382;
}

.atg-page .mini-check-inline input[type="checkbox"] {
  margin-top: 0.08rem;
}

.atg-page .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.atg-page .video-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 251, 255, 0.72) 100%);
  border: 1px solid rgba(215, 226, 244, 0.72);
  border-radius: 14px;
  padding: 0.9rem;
}

.atg-page .video-card wistia-player {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.atg-page .video-placeholder {
  aspect-ratio: 16 / 9;
  border: 1px dashed #b6c7e7;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef4ff 0%, #f7f2e9 100%);
  display: grid;
  place-items: center;
  color: #415a84;
  font-weight: 600;
  padding: 0.8rem;
  text-align: center;
}

.atg-page .final-cta {
  border: 0;
  background: transparent;
}

.atg-page .gem-jump-stripe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(107, 138, 255, 0.58);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #eff4ff;
  background: linear-gradient(120deg, #090d24 0%, #10163b 33%, #1f1d53 63%, #11183f 100%);
  box-shadow:
    0 14px 30px rgba(11, 14, 37, 0.46),
    inset 0 1px 0 rgba(184, 207, 255, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.atg-page .gem-jump-stripe::before {
  content: "";
  position: absolute;
  inset: -35% -10%;
  background:
    radial-gradient(circle at 18% 34%, rgba(86, 195, 255, 0.34) 0%, transparent 38%),
    radial-gradient(circle at 74% 62%, rgba(188, 96, 255, 0.35) 0%, transparent 42%),
    linear-gradient(130deg, transparent 20%, rgba(120, 206, 255, 0.16) 48%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.atg-page .gem-jump-stripe::after {
  content: "→";
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transform: translateX(0);
  transition: transform 180ms ease;
}

.atg-page .gem-jump-stripe:hover {
  transform: translateY(-1px);
  border-color: rgba(146, 172, 255, 0.84);
  box-shadow:
    0 16px 36px rgba(9, 14, 41, 0.54),
    inset 0 1px 0 rgba(194, 217, 255, 0.2);
}

.atg-page .gem-jump-stripe:hover::after {
  transform: translateX(3px);
}

.atg-page .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.atg-page .gem-ai-section {
  margin-top: 2rem;
  border: 0;
  border-radius: 0;
  padding: 1.2rem 0 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(236, 243, 255, 0.74), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(246, 249, 255, 0.52) 100%);
}

.atg-page .gem-eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  color: #4d6b9f;
  font-weight: 700;
  text-align: center;
}

.atg-page .gem-headline {
  margin: 0 auto;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #172c4f;
  text-align: center;
  max-width: 940px;
}

.atg-page .gem-ai-subhead {
  margin: 0.75rem auto 0.95rem;
  color: #48648f;
  max-width: 720px;
  text-align: center;
}

.atg-page .gem-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 1rem;
}

.atg-page .gem-pill {
  border-radius: 999px;
  border: 1px solid #c6d5f3;
  background: #fff;
  color: #2a4a79;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.56rem 0.88rem;
  cursor: pointer;
  transition: all 160ms ease;
}

.atg-page .gem-pill:hover,
.atg-page .gem-pill:focus-visible {
  border-color: #8caee7;
  background: #f0f6ff;
  outline: none;
}

.atg-page .gem-pill.active {
  border-color: #1f5eff;
  background: #eaf1ff;
  color: #1d3f76;
}

.atg-page .gem-demo-shell {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding-right: 0;
}

.atg-page .gem-platform-ui {
  position: relative;
  min-height: 500px;
  border: 1px solid rgba(204, 218, 244, 0.86);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(13, 36, 73, 0.14);
  background: linear-gradient(165deg, #fbfdff 0%, #f0f6ff 100%);
}

.atg-page .gem-platform-screenshot {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  object-position: top left;
  border-radius: 17px;
  opacity: 0;
  transition: opacity 360ms ease;
  pointer-events: none;
}

.atg-page .gem-platform-screenshot.visible {
  opacity: 1;
}

.atg-page .gem-answer-panel {
  position: absolute;
  right: 0;
  top: -24px;
  width: 290px;
  height: 446px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #c9d8f2;
  border-radius: 15px;
  box-shadow: 0 18px 40px rgba(12, 31, 68, 0.24);
  overflow: hidden;
}

.atg-page .gem-panel-header {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #dee8f8;
  background: #f8fbff;
  flex-shrink: 0;
}

.atg-page .gem-sparkle {
  color: #c43745;
  text-shadow: 0 0 10px rgba(196, 55, 69, 0.55);
  font-size: 1rem;
  margin-right: 7px;
  line-height: 1;
}

.atg-page .gem-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #183663;
  flex: 1;
}

.atg-page .gem-panel-icons {
  display: flex;
  gap: 10px;
  color: #8fa4c8;
  font-size: 0.76rem;
}

.atg-page .gem-panel-body {
  flex: 1;
  padding: 13px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.atg-page .gem-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.atg-page .gem-avatar {
  color: #c43745;
  text-shadow: 0 0 10px rgba(196, 55, 69, 0.5);
  font-size: 0.75rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.atg-page .answer-text {
  font-size: 0.75rem;
  line-height: 1.65;
  color: #294a77;
}

.atg-page .answer-empty {
  color: #8094b6;
  font-style: italic;
}

.atg-page .gem-panel-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #deebff;
  background: #f8fbff;
  flex-shrink: 0;
}

.atg-page .gem-input-field {
  flex: 1;
  background: #f0f6ff;
  border: 1px solid #c8daf8;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  color: #7e94b8;
}

.atg-page .gem-send-btn {
  background: #1f5eff;
  border: none;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  color: #ffffff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  flex-shrink: 0;
}

.atg-page .follow-up-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  animation: atgGemFadeUp 0.2s ease both;
}

.atg-page .follow-up-chip {
  background: #f4f8ff;
  border: 1px solid #d5e1f6;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 0.67rem;
  font-style: italic;
  color: #43608c;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  line-height: 1.4;
}

.atg-page .follow-up-chip:hover,
.atg-page .follow-up-chip:focus-visible {
  background: #eaf2ff;
  border-color: #a9c1ea;
  color: #244c83;
  outline: none;
}

.atg-page .user-message {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.atg-page .user-bubble {
  background: #e9f1ff;
  border: 1px solid #bed0f1;
  border-radius: 10px 10px 2px 10px;
  padding: 7px 10px;
  font-size: 0.69rem;
  font-style: italic;
  color: #2e507f;
  max-width: 86%;
  line-height: 1.4;
}

.atg-page .cursor {
  display: inline-block;
  width: 2px;
  height: 0.86em;
  background: #c43745;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: atgGemBlink 0.8s step-end infinite;
}

@keyframes atgGemFadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes atgGemBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

@media (max-width: 1120px) {
  .atg-page .gem-demo-shell {
    padding-right: 0;
    padding-bottom: 24px;
  }

  .atg-page .gem-answer-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 14px;
    height: 360px;
  }
}

.atg-page .btn {
  text-decoration: none;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  border: 1px solid #bcccea;
  color: #20457c;
  font-weight: 700;
  background: #fff;
  transition: 150ms ease;
}

.atg-page .btn:hover {
  transform: translateY(-1px);
  border-color: #94b2e8;
}

.atg-page .btn.primary {
  background: linear-gradient(135deg, #2867ff 0%, #1f8cff 100%);
  color: #fff;
  border-color: transparent;
}

.atg-page .to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid #b8c9ea;
  background: #fff;
  border-radius: 999px;
  padding: 0.58rem 0.88rem;
  color: #254273;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 200ms ease;
  box-shadow: 0 10px 25px rgba(20, 45, 90, 0.1);
  z-index: 50;
}

.atg-page .to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.atg-page .is-checked {
  border-color: #a7d9c7;
  background: linear-gradient(180deg, rgba(244, 255, 249, 0.96) 0%, rgba(236, 252, 245, 0.9) 100%);
}

.atg-page .reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(0.987);
  filter: blur(8px);
  will-change: transform, opacity, filter;
}

.atg-page .reveal.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  transition:
    opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 700ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .atg-page .reveal,
  .atg-page .reveal.revealed {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@media (max-width: 1050px) {
  .atg-page .page-shell {
    grid-template-columns: 1fr;
  }

  .atg-page .side-nav {
    position: sticky;
    top: var(--atg-nav-offset, 80px);
    z-index: 10;
    height: auto;
    max-height: 55vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .atg-page .side-nav nav {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    width: 100%;
    margin: 1.4rem 0 0;
  }

  .atg-page .brand-wrap {
    width: 100%;
    margin-inline: 0;
  }

  .atg-page .nav-link {
    white-space: nowrap;
  }

  .atg-page .content {
    padding-top: 1.2rem;
  }
}

@media (max-width: 760px) {
  .atg-page .section {
    padding: 1rem 0;
  }

  .atg-page .pillar-grid,
  .atg-page .video-grid,
  .atg-page .estimator-grid {
    grid-template-columns: 1fr;
  }

  .atg-page h2 {
    font-size: clamp(2.35rem, 10.5vw, 3.4rem);
  }

  .atg-page .output-chart {
    height: 236px;
  }

  .atg-page .emoji-org-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .atg-page .emoji-cell {
    min-height: 46px;
  }

  .atg-page .gem-pills {
    flex-direction: column;
  }

  .atg-page .gem-pill {
    width: 100%;
  }

  .atg-page .gem-demo-shell {
    padding-right: 0;
    padding-bottom: 22px;
  }

  .atg-page .gem-platform-ui {
    min-height: 420px;
  }

  .atg-page .gem-answer-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 14px;
    height: 360px;
  }

  .atg-page .side-nav {
    padding: 1rem 0.9rem;
  }

  .atg-page .diagnostic-meter {
    margin-top: 1rem;
  }
}
