/* AI systems partner buyer guide. Scoped to .abg-page.
   Thesis: a comparison worksheet you bring to every proposal meeting.
   Ruled pad, red margin, ticks you earn from the written proposal. */

.abg-page {
  --abg-paper: #f5f0e4;
  --abg-paper-2: #ebe4d2;
  --abg-ink: #1c1a16;
  --abg-muted: #5a554a;
  --abg-rule: #cfc7b3;
  --abg-pad: #fbf5d3;
  --abg-pad-line: #b7c8d9;
  --abg-margin: #d7766b;
  --abg-green: #2b6f4f;
  --abg-oxblood: #8a2f2a;
  --abg-night: #1d1b19;
  --abg-night-2: #292623;
  --abg-night-line: #433e38;
  --abg-night-text: #ece7da;
  --abg-night-muted: #b7b0a2;
  --abg-brass: #bf9a52;
  --abg-ease: cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--abg-ink);
  background: var(--abg-paper);
  font-family: "DM Sans Variable", "DM Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
}
.abg-page *,
.abg-page *::before,
.abg-page *::after { box-sizing: border-box; }
.abg-page ::selection { color: #fff; background: var(--abg-oxblood); }
.abg-page a { text-underline-offset: 0.25em; }
.abg-page a:focus-visible,
.abg-page summary:focus-visible,
.abg-page button:focus-visible,
.abg-page input:focus-visible { outline: 2px solid var(--abg-oxblood); outline-offset: 3px; }
.abg-page [id] { scroll-margin-top: 112px; }
:where(.abg-page) :is(h1, h2, h3, p, figure, ol, ul, dl, fieldset) { margin: 0; }
.abg-page h1,
.abg-page h2,
.abg-page h3 { font-family: "Cormorant Garamond Variable", Georgia, serif; font-weight: 500; text-wrap: balance; }
.abg-wrap { width: min(100%, 1280px); margin-inline: auto; padding-inline: clamp(20px, 5vw, 64px); }

.abg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.abg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--abg-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s var(--abg-ease);
}
.abg-btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--abg-ease); }
.abg-btn:hover { background: var(--abg-oxblood); }
.abg-btn:hover svg { transform: translateX(3px); }
.abg-quiet { color: var(--abg-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--abg-brass); text-decoration-thickness: 2px; }
.abg-quiet:hover { color: var(--abg-oxblood); }

.abg-head { max-width: 64ch; margin-bottom: clamp(26px, 4vw, 44px); }
.abg-head h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.05; letter-spacing: -0.015em; }
.abg-head p { margin-top: 16px; color: var(--abg-muted); }

/* Hero */
.abg-hero { padding: 112px 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--abg-rule); }
.abg-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.abg-hero h1 { font-size: clamp(2.2rem, 3.8vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; max-width: 22ch; }
.abg-lede { margin-top: 20px; max-width: 60ch; font-size: 1.125rem; color: #38342b; }
.abg-line { margin-top: 18px; max-width: 58ch; padding: 14px 0; border-top: 1px solid var(--abg-rule); border-bottom: 1px solid var(--abg-rule); font-weight: 600; }
.abg-hero .ns-trustline { margin-top: 16px; }

.abg-sheet { position: relative; padding: 22px 22px 18px 54px; border: 1px solid #bdb392; border-radius: 6px; background: var(--abg-pad); box-shadow: 0 18px 34px -22px rgba(30, 24, 10, 0.45); animation: abg-rise 0.9s var(--abg-ease) 0.15s both; transform: rotate(0.6deg); }
.abg-sheet::before { content: ""; position: absolute; inset: 0 auto 0 40px; width: 5px; border-left: 1px solid var(--abg-margin); border-right: 1px solid var(--abg-margin); }
.abg-sheet-title { font-family: "Cormorant Garamond Variable", Georgia, serif; font-size: 1.9rem; line-height: 1; padding-bottom: 10px; border-bottom: 2px solid var(--abg-ink); }
.abg-sheet-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 38px); gap: 6px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--abg-pad-line); font-size: 0.9375rem; line-height: 1.3; }
.abg-sheet-head { font-size: 0.875rem; color: var(--abg-muted); text-align: center; padding: 8px 0; }
.abg-sheet-head b { font-weight: 700; }
.abg-sheet-row i { display: grid; place-items: center; width: 26px; height: 26px; justify-self: center; border: 2px solid var(--abg-ink); border-radius: 5px; background: rgba(255, 255, 255, 0.55); }
.abg-sheet-row i.is-on { color: var(--abg-green); }
.abg-sheet-row i svg { width: 16px; height: 16px; stroke-width: 3.2; }
.abg-sheet-note { margin-top: 12px !important; font-size: 0.8125rem; color: var(--abg-muted); }
@keyframes abg-rise { from { opacity: 0; transform: translateY(16px) rotate(0.6deg); } to { opacity: 1; transform: rotate(0.6deg); } }

/* Models matrix */
.abg-models { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--abg-rule); }
.abg-matrix { border-top: 2px solid var(--abg-ink); }
.abg-m-row { display: grid; grid-template-columns: 1fr repeat(3, 1fr); gap: clamp(14px, 2.4vw, 32px); padding: 16px 0; border-bottom: 1px solid var(--abg-rule); }
.abg-m-row > b { font-weight: 700; }
.abg-m-head { padding: 14px 0; border-bottom: 1px solid var(--abg-ink); align-items: end; }
.abg-m-head span { display: grid; gap: 2px; }
.abg-m-head b { font-family: "Cormorant Garamond Variable", Georgia, serif; font-size: 1.6rem; line-height: 1.05; font-weight: 500; }
.abg-m-head small { font-size: 0.875rem; color: var(--abg-muted); }
.abg-m-row span { color: #38342b; }
.abg-m-fit { background: var(--abg-paper-2); padding-inline: 14px; margin-inline: -14px; border-bottom: 0; }
.abg-m-fit span { font-size: 0.9375rem; color: var(--abg-muted); }

/* Worksheet */
.abg-work { padding: clamp(56px, 8vw, 104px) 0; background: var(--abg-paper-2); border-bottom: 1px solid var(--abg-rule); }
.abg-tally { position: sticky; top: 76px; z-index: 5; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 12px; align-items: center; margin-bottom: 18px; padding: 12px 18px; border-radius: 10px; background: var(--abg-ink); color: #fff; }
.abg-tally p { margin: 0; }
.abg-tally-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #cfc8b8; }
.abg-tally-cell { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.abg-tally-cell span { font-size: 0.875rem; color: #cfc8b8; }
.abg-tally-cell b { font-family: "Cormorant Garamond Variable", Georgia, serif; font-size: 1.9rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.abg-tally-cell i { font-style: normal; font-size: 0.875rem; color: #cfc8b8; }

.abg-criteria { position: relative; list-style: none; padding: 0 0 0 clamp(20px, 5vw, 72px); border: 1px solid #bdb392; border-radius: 8px; background: var(--abg-pad); counter-reset: c; }
.abg-criteria::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(14px, 3.4vw, 52px); width: 5px; border-left: 1px solid var(--abg-margin); border-right: 1px solid var(--abg-margin); }
.abg-criterion { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) auto; gap: 14px clamp(18px, 3vw, 44px); padding: 26px clamp(16px, 3vw, 36px) 22px 0; border-bottom: 1px solid var(--abg-pad-line); }
.abg-criterion:last-child { border-bottom: 0; }
.abg-c-main { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
.abg-c-no { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--abg-ink); color: #fff; font-weight: 700; font-size: 0.875rem; margin-top: 4px; }
.abg-criterion h3 { font-size: 1.7rem; line-height: 1.08; }
.abg-c-q { margin-top: 6px; font-weight: 600; }
.abg-c-why { margin-top: 6px; font-size: 0.9375rem; color: var(--abg-muted); }
.abg-c-signals { display: grid; gap: 10px; align-content: start; }
.abg-c-signals p { padding: 10px 12px; border-radius: 8px; font-size: 0.9375rem; line-height: 1.5; }
.abg-c-signals b { display: block; margin-bottom: 2px; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.abg-strong { background: rgba(43, 111, 79, 0.12); }
.abg-strong b { color: var(--abg-green); }
.abg-weak { background: rgba(138, 47, 42, 0.1); }
.abg-weak b { color: var(--abg-oxblood); }
.abg-ticks { display: flex; gap: 8px; align-items: center; align-self: start; border: 0; padding: 0; min-width: 0; }
.abg-ticks legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.abg-ticks label { display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 0.8125rem; font-weight: 700; color: var(--abg-muted); }
.abg-ticks input { appearance: none; width: 30px; height: 30px; margin: 0; border: 2px solid var(--abg-ink); border-radius: 6px; background: rgba(255, 255, 255, 0.7); display: grid; place-items: center; cursor: pointer; transition: background 0.15s; }
.abg-ticks input::after { content: ""; width: 14px; height: 8px; border-left: 3px solid var(--abg-green); border-bottom: 3px solid var(--abg-green); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.abg-ticks input:checked { background: #fff; }
.abg-ticks input:checked::after { opacity: 1; }
.abg-c-us { grid-column: 1 / -1; margin-left: 48px; }
.abg-c-us summary { cursor: pointer; font-size: 0.9375rem; font-weight: 600; color: var(--abg-oxblood); }
.abg-c-us p { margin-top: 8px; font-size: 0.9375rem; color: #38342b; max-width: 70ch; }
.abg-c-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.abg-c-links a { color: var(--abg-ink); font-size: 0.875rem; }
.abg-note { margin-top: 18px; max-width: 70ch; font-size: 0.9375rem; color: var(--abg-muted); }

/* Frames */
.abg-frames { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--abg-rule); }
.abg-f-table { border-top: 2px solid var(--abg-ink); }
.abg-f-row { display: grid; grid-template-columns: 0.8fr 1.1fr 1.2fr 1.2fr; gap: clamp(14px, 2.4vw, 32px); padding: 18px 0; border-bottom: 1px solid var(--abg-rule); }
.abg-f-row > b { font-family: "Cormorant Garamond Variable", Georgia, serif; font-size: 1.5rem; line-height: 1.1; font-weight: 500; }
.abg-f-row span { color: #38342b; font-size: 0.9375rem; }
.abg-f-row span:last-child { color: var(--abg-green); font-weight: 500; }
.abg-f-head { padding: 12px 0; border-bottom: 1px solid var(--abg-ink); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--abg-muted); }
.abg-f-head span { color: var(--abg-muted) !important; font-weight: 700 !important; font-size: 0.8125rem !important; }

/* Asks (dark band) */
.abg-asks { padding: clamp(56px, 8vw, 104px) 0; background: var(--abg-night); color: var(--abg-night-text); }
.abg-asks .abg-head p { color: var(--abg-night-muted); }
.abg-asks-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.abg-asks .abg-head { margin-bottom: 0; }
.abg-letter { padding: clamp(20px, 3vw, 32px); border-radius: 10px; background: var(--abg-night-2); border: 1px solid var(--abg-night-line); }
.abg-letter-intro { font-weight: 600; color: #fff; }
.abg-letter ol { margin-top: 12px; padding-left: 1.6rem; list-style: decimal; }
.abg-letter li { margin-bottom: 10px; padding-left: 4px; color: var(--abg-night-text); }
.abg-letter li::marker { color: var(--abg-brass); font-weight: 700; }
.abg-copy { margin-top: 18px; min-height: 44px; padding: 0 18px; border: 1px solid var(--abg-brass); border-radius: 8px; background: transparent; color: #f1dca2; font: inherit; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.abg-copy:hover { background: rgba(191, 154, 82, 0.16); }
.abg-copy[hidden] { display: none; }
.abg-asks a:focus-visible, .abg-asks button:focus-visible { outline-color: #f1dca2; }

/* Sequence */
.abg-order { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--abg-rule); }
.abg-seq { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--abg-ink); }
.abg-seq li { counter-increment: s; padding: 18px clamp(14px, 2vw, 28px) 22px 0; border-bottom: 1px solid var(--abg-rule); color: #38342b; }
.abg-seq li::before { content: counter(s); display: block; margin-bottom: 6px; font-family: "Cormorant Garamond Variable", Georgia, serif; font-size: 2.6rem; line-height: 1; font-variant-numeric: lining-nums; color: var(--abg-oxblood); }

/* Fit */
.abg-fit { padding: clamp(40px, 5vw, 72px) 0; background: var(--abg-paper-2); border-bottom: 1px solid var(--abg-rule); }
.abg-fit-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.abg-fit h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.05; }
.abg-fit p { padding: 14px 0; border-top: 1px solid var(--abg-rule); color: #38342b; }
.abg-fit p:first-child { border-top: 2px solid var(--abg-ink); }
.abg-fit p b { color: var(--abg-ink); }

/* FAQ */
.abg-faq { padding: clamp(56px, 8vw, 104px) 0; }
.abg-faq-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.abg-faq h2 { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.05; position: sticky; top: 112px; }
.abg-faq details { border-bottom: 1px solid var(--abg-rule); }
.abg-faq details:first-child { border-top: 1px solid var(--abg-rule); }
.abg-faq summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-weight: 600; font-size: 1.0625rem; cursor: pointer; }
.abg-faq summary::-webkit-details-marker { display: none; }
.abg-faq summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--abg-oxblood); transition: transform 0.25s var(--abg-ease); }
.abg-faq details[open] summary::after { transform: rotate(45deg); }
.abg-faq details p { padding: 0 0 22px; max-width: 64ch; color: #38342b; }

/* Close */
.abg-close { padding: clamp(56px, 8vw, 96px) 0; background: var(--abg-ink); color: #f1ede2; }
.abg-close-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.abg-close h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.04; }
.abg-close p { margin-top: 16px; max-width: 58ch; color: #cfc9ba; }
.abg-close .abg-actions { margin-top: 0; }
.abg-close .abg-btn { background: #f1dca2; color: var(--abg-ink); }
.abg-close .abg-btn:hover { background: #fff; }
.abg-close .abg-quiet { color: #f1ede2; }
.abg-close a:focus-visible { outline-color: #f1dca2; }
.abg-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; padding-block: 22px 34px; font-size: 0.9rem; color: var(--abg-muted); }
.abg-crumbs a { color: var(--abg-oxblood); }

@media (max-width: 1100px) {
  .abg-criterion { grid-template-columns: minmax(0, 1fr); }
  .abg-ticks { justify-content: flex-start; }
  .abg-c-us { margin-left: 0; }
  .abg-seq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .abg-hero-grid,
  .abg-asks-grid,
  .abg-fit-grid,
  .abg-faq-grid,
  .abg-close-grid { grid-template-columns: 1fr; }
  .abg-faq h2 { position: static; }
  .abg-asks .abg-head { margin-bottom: 26px; }
  .abg-sheet { transform: none; animation-name: abg-rise-flat; }
  .abg-tally { top: 66px; }
}
@keyframes abg-rise-flat { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .abg-hero { padding-top: 96px; }
  .abg-hero h1 { font-size: 2.05rem; }
  .abg-lede { margin-top: 14px; font-size: 1rem; line-height: 1.55; }
  .abg-line { margin-top: 14px; padding: 10px 0; font-size: 0.9375rem; line-height: 1.5; }
  .abg-hero .ns-trustline { margin-top: 12px; }
  .abg-actions { margin-top: 18px; }
  .abg-sheet { padding: 16px 14px 14px 40px; }
  .abg-sheet::before { left: 30px; }
  .abg-sheet-row { grid-template-columns: minmax(0, 1fr) repeat(3, 30px); font-size: 0.875rem; }
  .abg-m-head { display: none; }
  .abg-m-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .abg-m-row > b { margin-bottom: 2px; }
  .abg-m-row span::before { content: attr(data-label) ": "; font-weight: 700; color: var(--abg-ink); }
  .abg-m-fit { margin-inline: 0; padding-inline: 0; background: transparent; border-bottom: 1px solid var(--abg-rule); }
  .abg-f-head { display: none; }
  .abg-f-row { grid-template-columns: 1fr; gap: 4px; }
  .abg-f-row span::before { content: attr(data-label) ": "; font-weight: 700; color: var(--abg-ink); }
  .abg-tally { grid-template-columns: repeat(3, 1fr); gap: 4px 8px; padding: 8px 12px; }
  .abg-tally-label { grid-column: 1 / -1; font-size: 0.6875rem; }
  .abg-tally-cell { flex-wrap: nowrap; gap: 6px; }
  .abg-tally-cell span { font-size: 0.75rem; }
  .abg-tally-cell b { font-size: 1.5rem; }
  .abg-tally-cell i { display: none; }
  .abg-criteria { padding-left: 24px; }
  .abg-criteria::before { left: 12px; }
  .abg-criterion { padding-right: 12px; }
  .abg-seq { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .abg-sheet { animation: none; }
  .abg-page * { transition-duration: 0.01ms !important; }
}
