/* adport.dev home page. Shared tokens and components live in site.css. */

@property --hold {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

/* Hero ----------------------------------------------------------------- */

.hero { padding: clamp(2.5rem, 6vh, 4.5rem) var(--gutter) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 2rem clamp(1.75rem, 3vw, 3rem); align-items: center; }
.hero-kicker { color: var(--signal-ink); font-size: 1rem; font-weight: 750; }
.hero-copy { container-type: inline-size; }
.hero-title { margin-top: 1rem; font-size: clamp(2rem, 10cqi, 4.5rem); font-weight: 820; line-height: 1.1; letter-spacing: -0.04em; }
.hero-lead { display: block; white-space: nowrap; }
.agent-line { display: flex; align-items: baseline; gap: 0.24em; white-space: nowrap; }
.ads-word { display: inline-flex; align-items: baseline; gap: 0.15em; margin-inline-start: 0.1em; }

/* Every item shares one grid cell, keeping both headline lines steady as logos rotate. */
.agent-rotator, .provider-rotator { display: inline-grid; vertical-align: middle; }
.agent-rotator { color: #ec5f00; }
.provider-rotator { width: 0.8em; height: 0.8em; }
.agent, .provider-mark { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(0.12em); transition: opacity 220ms ease, transform 220ms var(--ease-out), visibility 220ms; }
.agent { display: inline-flex; align-items: baseline; gap: 0.2em; }
.agent svg { display: block; overflow: visible; width: 0.74em; height: 0.74em; flex: none; fill: currentColor; transform: translateY(0.02em); }
.provider-mark svg { display: block; width: 100%; height: 100%; fill: currentColor; }
[data-rotate] > .is-active,
[data-rotate]:not([data-ready]) > :first-child { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .agent, .provider-mark { transition: none; }
}

.hero-copy .lede { max-width: 29rem; margin-top: 1.25rem; }
.hero-copy .hero-actions { align-items: center; margin-top: 1.5rem; gap: 0.75rem 1.5rem; }
/* The hero scene runs off the viewport's right edge: the page is its ground. */
.hero-stage { min-width: 0; margin-right: calc(-1 * max(1.25rem, (100vw - var(--max)) / 2)); }
.film { padding: clamp(5rem, 11vw, 9rem) var(--gutter) 0; }
.film-video { min-width: 0; margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 0; }
.film-video .video-frame { margin-top: 0; }
/* Illustrations mount into slots; the semantic figure stays in the document for readers without them. */
.stage-slot.is-live > figure { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Hero sign-up: the pill becomes the submit button, then the confirmation. */
/* Beside the scene the copy is centered, so opening the form must not change its height:
   the notes hang under the field and the GitHub link steps aside until it closes. */
@media (min-width: 64.01rem) {
  .hero-signup { position: relative; }
  .hero-signup-meta { position: absolute; top: calc(100% + 0.4rem); left: 0.5rem; right: 0; margin-top: 0; }
  .hero-signup .waitlist-status { position: absolute; top: calc(100% + 3.4rem); left: 0.5rem; margin: 0; }
  .hero-actions:has(.hero-signup.is-open) > .github-link { display: none; }
}
.hero-signup .waitlist-form[data-joined] input,
.hero-signup .waitlist-form[data-joined] .hero-signup-close { display: none; }
.hero-signup .waitlist-form[data-joined] button[type=submit] { flex: 1; background: var(--go); color: #fff; pointer-events: none; }
.hero-signup .waitlist-form[data-joined] .waitlist-button-label::before { content: "✓"; margin-right: 0.45rem; }

/* Local setup: one command per agent, behind tabs with the agents' marks. */
.local-tab-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.local-tab-list[hidden] { display: none; }
.local-tab { display: inline-flex; min-height: 2.3rem; align-items: center; gap: 0.45rem; padding: 0.35rem 0.8rem 0.25rem 0.65rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--raised); color: var(--ink-soft); font-size: 0.875rem; font-weight: 650; cursor: pointer; }
.local-tab svg { width: 1rem; height: 1rem; flex: none; fill: currentColor; }
.local-tab:hover { border-color: var(--rule-strong); color: var(--ink); }
.local-tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.local-panel[hidden] { display: none; }

/* Platforms under the hero: one quiet pill, the partner claim and the marks. */
.hero-platforms { display: flex; justify-content: center; margin-top: clamp(2.25rem, 4vw, 3.25rem); }
.partner-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1.1rem; padding: 0.55rem 0.7rem 0.55rem 1.3rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--raised); }
.partner-label { color: var(--ink); font-size: 0.9375rem; font-weight: 700; white-space: nowrap; }
.partner-strip .logo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; padding: 0 0 0 1.1rem; border-left: 1px solid var(--rule); }
.partner-strip .logo-strip a { display: grid; width: 2.25rem; min-height: 2.25rem; place-items: center; border-radius: 999px; transition: background-color 150ms ease; }
.partner-strip .logo-strip a:hover { background: var(--paper); }
.partner-strip .logo-strip svg { width: 1.2rem; height: 1.2rem; }
.partner-more { padding: 0.5rem 0.95rem 0.4rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 0.875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.partner-more:hover { background: var(--rule); }
@media (max-width: 52rem) {
  .partner-strip { flex-direction: column; gap: 0.75rem; width: 100%; padding: 1rem; border-radius: 1.25rem; }
  .partner-strip .logo-strip { justify-content: center; padding: 0; border-left: 0; }
}
/* Platform logos (kept for other strips). */
.logo-strip, .agent-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.25rem 1.5rem; padding: 0; list-style: none; }
.agent-strip .agent { display: flex; min-height: 2.75rem; align-items: center; gap: 0.6rem; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 650; white-space: nowrap; }
.agent-strip svg { width: 1.2rem; height: 1.2rem; flex: none; fill: currentColor; }
.agent-strip .logo-strip-more a, .logo-strip-more a { display: flex; min-height: 2.75rem; align-items: center; }
.logo-strip a { display: flex; min-height: 2.75rem; align-items: center; gap: 0.6rem; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 650; text-decoration: none; white-space: nowrap; transition: color 150ms ease; }
.logo-strip a:hover { color: var(--ink); }
.logo-strip svg { width: 1.3rem; height: 1.3rem; flex: none; fill: currentColor; }
.logo-strip .apple-logo, .logo-strip .x-logo { color: var(--ink); }
.logo-strip-more a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 0.3em; }

/* Write gate demo ---------------------------------------------------- */

.gate { padding: clamp(2.5rem, 4.5vw, 3.75rem) var(--gutter) 0; }
.gate-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.1rem; }
/* One chapter label per section, the same voice as the hero's. */
.section-kicker,
.home .landing-resources > .resource-section-head:first-child .resource-eyebrow.resource-eyebrow { margin: 0 0 0.75rem; color: var(--signal-ink); font: 750 1rem/1.4 var(--sans); letter-spacing: 0; text-transform: none; }
.home .landing-resources .resource-eyebrow { margin-bottom: 0.5rem; color: var(--muted); font: 700 0.875rem/1.4 var(--sans); letter-spacing: 0; text-transform: none; }
.home .landing-resources > .resource-section-head:first-child h2 { font-size: clamp(2.05rem, 4.3vw, 3.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
.gate-title { max-width: 16em; margin-top: 0; font-size: clamp(2.05rem, 4.3vw, 3.5rem); font-weight: 820; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.headline-line { transition: color 700ms var(--ease-out); }
/* The three lines wait for the demo: dimmed only while it runs, lit as each step happens. */
@media (prefers-reduced-motion: no-preference) and (min-width: 56rem) {
  .gate[data-demo] .headline-line:not(.is-lit) { color: var(--dim); }
}
.scenarios { display: flex; gap: 0.2rem; padding: 0.2rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--raised); }
.scenario { min-height: 2.3rem; padding: 0.4rem 0.95rem 0.3rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.875rem; font-weight: 650; white-space: nowrap; cursor: pointer; transition: background-color 180ms ease, color 180ms ease; }
.scenario:hover { color: var(--ink); }
.scenario[aria-pressed="true"] { background: var(--ink); color: #fff; }

.console-body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); height: 33rem; }
@media (scripting: enabled) {
  .console:not([data-ready]) .transcript > *,
  .console:not([data-ready]) .ticket-slot > *,
  .console:not([data-ready]) .audit-lines > * { visibility: hidden; }
}

.transcript { display: flex; flex-direction: column; gap: 1rem; min-height: 0; overflow-y: auto; padding: 1.5rem 1.5rem 1.75rem; list-style: none; font-size: 0.9375rem; line-height: 1.55; scrollbar-width: thin; scrollbar-color: var(--console-line) transparent; -webkit-mask-image: linear-gradient(transparent, #000 1.25rem); mask-image: linear-gradient(transparent, #000 1.25rem); }
.transcript > li { flex: none; }
.caret { display: inline-block; width: 0.5em; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--signal); animation: blink 900ms steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.call { overflow: hidden; border-radius: 0.8rem; background: var(--code); color: var(--code-text); }
.call-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.85rem 0.45rem; border-bottom: 1px solid var(--code-line); font: 0.75rem var(--mono); }
.call-tool { color: var(--code-signal); font-weight: 650; }
.call-kind { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--code-muted); }
.call[data-kind="apply"] .call-kind { color: var(--code-go); }
.call.is-running .call-kind::before { content: ""; width: 0.7rem; height: 0.7rem; border: 1.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.call pre { overflow-x: auto; margin: 0; padding: 0.75rem 0.9rem 0.8rem; color: var(--code-text); font-size: 0.78rem; line-height: 1.65; }
.call mark { padding: 0 0.15em; border-radius: 0.2rem; background: rgba(255, 107, 0, 0.3); color: #ffc49a; }

.ticket-slot { display: flex; align-items: flex-start; min-height: 0; overflow-y: auto; padding: 1.5rem; border-left: 1px solid var(--console-line); background: var(--tray); scrollbar-width: none; }

.ticket {
  position: relative;
  width: 100%;
  border-radius: 0.95rem;
  background: var(--t-bg);
  color: var(--t-ink);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 48px -28px rgba(0, 0, 0, 0.28);
}
.ticket[data-status="empty"] { display: grid; min-height: 20rem; place-items: center; padding: 2rem; border: 1.5px dashed var(--rule-strong); background: transparent; box-shadow: none; color: var(--console-muted); font-size: 0.9375rem; text-align: center; }
.ticket[data-status="empty"] p { max-width: 17rem; }
.ticket.is-new { animation: slip 520ms var(--ease-out) both; }
@keyframes slip { from { opacity: 0; transform: translateY(1.25rem) rotate(-1.2deg); } }

.ticket-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 1.05rem 1.15rem 0; font-size: 0.8125rem; }
.ticket-status { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 750; }
.ticket-status i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--signal); }
.ticket[data-status="pending"] .ticket-status i { animation: pulse 1.6s ease-in-out infinite; }
.ticket[data-status="applied"] .ticket-status { color: var(--go); }
.ticket[data-status="applied"] .ticket-status i { background: var(--go); }
:is(.ticket[data-status="rejected"], .ticket[data-status="mismatch"]) .ticket-status { color: var(--stop); }
:is(.ticket[data-status="rejected"], .ticket[data-status="mismatch"]) .ticket-status i { background: var(--stop); }
@keyframes pulse { 50% { box-shadow: 0 0 0 0.3rem var(--signal-wash); } }
.ticket-account { color: var(--t-muted); font: 0.72rem var(--mono); }
.ticket-summary { margin: 0.75rem 1.15rem 0; font-size: 1.0625rem; font-weight: 750; letter-spacing: -0.01em; }
.ticket-diff { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.65rem; margin: 0.35rem 1.15rem 0; font-variant-numeric: tabular-nums; }
.diff-from { color: var(--t-muted); font-size: 1.3rem; font-weight: 600; text-decoration-thickness: 2px; }
.diff-arrow { position: relative; width: 1.35rem; height: 2px; align-self: center; background: var(--t-muted); }
.diff-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--t-muted); border-right: 2px solid var(--t-muted); transform: rotate(45deg); }
.diff-to { font-size: 2.35rem; font-weight: 820; letter-spacing: -0.03em; line-height: 1.1; text-decoration: none; }
.diff-delta { padding: 0.2rem 0.5rem 0.1rem; border-radius: 999px; background: var(--go-wash); color: var(--go); font-size: 0.8125rem; font-weight: 750; }
.diff-delta[data-over] { background: var(--stop-wash); color: var(--stop); }

.checks { display: grid; gap: 0.5rem; margin: 1rem 1.15rem 0; padding: 0; list-style: none; font-size: 0.875rem; line-height: 1.45; }
.checks li { position: relative; padding-left: 1.65rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.05rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--go-wash); }
.checks li::after { content: ""; position: absolute; left: 0.4rem; top: 0.25rem; width: 0.3rem; height: 0.55rem; border-right: 2px solid var(--go); border-bottom: 2px solid var(--go); transform: rotate(45deg); }
.checks li[data-check="fail"] { color: var(--stop); font-weight: 650; }
.checks li[data-check="fail"]::before { background: var(--stop-wash); }
.checks li[data-check="fail"]::after { left: 0.3rem; top: 0.35rem; width: 0.5rem; height: 0.5rem; border: 0; transform: none; background: linear-gradient(45deg, transparent 42%, var(--stop) 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, var(--stop) 42% 58%, transparent 58%); }
.checks code, .refusal code, .stub code { font-size: 0.85em; }
.ticket .checks li { animation: enter 380ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 180ms); }

.stub { position: relative; margin-top: 1.15rem; padding: 1rem 1.15rem 1.15rem; border-top: 2px dashed var(--t-rule); }
.stub::before, .stub::after { content: ""; position: absolute; top: -0.7rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--tray); box-shadow: inset 0 0 0 1px var(--rule); }
.stub::before { left: -0.6rem; }
.stub::after { right: -0.6rem; }
.token { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 1rem; align-items: center; }
.token-label { color: var(--t-muted); font: 0.6875rem var(--mono); }
.token-id { overflow: hidden; color: var(--t-ink); font-size: 0.8125rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.token-ttl { grid-column: 2; grid-row: 1 / span 2; color: var(--t-muted); font-size: 0.75rem; text-align: right; }
.token-ttl time { display: block; color: var(--t-ink); font: 600 1rem var(--mono); font-variant-numeric: tabular-nums; }

.hold {
  position: relative;
  display: grid;
  width: 100%;
  height: 3.1rem;
  margin-top: 0.95rem;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--t-ink);
  color: var(--t-bg);
  font-size: 0.9375rem;
  font-weight: 750;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: --hold 380ms var(--ease-out), transform 120ms ease;
}
.hold.is-holding { transition: transform 120ms ease; transform: scale(0.985); }
.hold-fill { position: absolute; inset: 0; display: grid; place-items: center; background: var(--signal); color: #1d1d1f; clip-path: inset(0 calc((1 - var(--hold)) * 100%) 0 0); }
.hold-fill::after { content: attr(data-label); }
.hold:disabled { cursor: not-allowed; opacity: 0.4; }
.hold-hint { margin-top: 0.55rem; color: var(--t-muted); font-size: 0.75rem; text-align: center; }

.stub-result { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.875rem; line-height: 1.5; }
.stub-result strong { display: block; font-weight: 750; }
.stub-result span { color: var(--t-muted); }
.stub-result code { overflow-wrap: anywhere; }
.refusal { margin: 1rem 1.15rem 0; padding: 0.7rem 0.85rem 0.6rem; border-left: 3px solid var(--stop); border-radius: 0 0.4rem 0.4rem 0; background: var(--stop-wash); font-size: 0.8125rem; line-height: 1.5; }
.refusal code:first-child { display: block; margin-bottom: 0.15rem; color: var(--stop); font-weight: 700; }

.audit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: end; padding: 0.75rem 1.1rem 0.8rem; border-top: 1px solid var(--console-line); background: var(--console-deep); font: 0.72rem/1.7 var(--mono); }
.audit-file { color: var(--console-text); white-space: nowrap; }
.audit-lines { display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(2 * 1.7em); max-height: calc(2 * 1.7em); overflow: hidden; padding: 0; list-style: none; color: var(--console-muted); }
.audit-lines li { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-lines code { font: inherit; }
.audit-lines .ev-validated { color: var(--signal-ink); }
.audit-lines .ev-applied { color: var(--go); }
.audit-lines .ev-rejected { color: var(--stop); }

.gate-note { margin-top: 0.9rem; color: var(--muted); font-size: 0.875rem; }

/* A first-party video keeps the autoplay preview free of third-party player overlays. */
.video-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 1.25rem; background: #f0ede9; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 36px 70px -40px rgba(0, 0, 0, 0.35); }
.demo-video { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-toggle { position: absolute; right: 0.75rem; bottom: 0.75rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; background: rgba(29, 29, 31, 0.8); color: #fff; cursor: pointer; }
.video-toggle::before { content: ""; width: 0.65rem; height: 0.8rem; border-inline: 3px solid currentColor; }
.video-toggle[data-state="paused"]::before { width: 0; height: 0; margin-left: 3px; border: 0; border-top: 0.4rem solid transparent; border-bottom: 0.4rem solid transparent; border-left: 0.65rem solid currentColor; }
.video-toggle:hover { background: var(--ink); }
.video-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(245, 245, 247, 0.9); color: var(--ink); font-weight: 700; }
.video-toggle[hidden], .video-fallback[hidden] { display: none; }

.watch-link { gap: 0.55rem; }
.watch-icon { position: relative; width: 1.35rem; height: 1.35rem; flex: none; border: 1.5px solid currentColor; border-radius: 50%; }
.watch-icon::after { content: ""; position: absolute; top: 50%; left: 55%; border-style: solid; border-width: 0.27rem 0 0.27rem 0.42rem; border-color: transparent transparent transparent currentColor; transform: translate(-50%, -50%); }

/* Sections ------------------------------------------------------------- */

.workflows, .setup { padding: clamp(5rem, 11vw, 9rem) var(--gutter) 0; }

.workflows .section-intro { margin-bottom: clamp(2rem, 4vw, 3rem); }
.workflow { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(2rem, 4vw, 3.25rem); border-top: 1px solid var(--rule); }
.workflow h3 { color: var(--muted); font-size: 0.9375rem; font-weight: 700; }
.prompt { margin-top: 0.5rem; font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 680; line-height: 1.14; letter-spacing: -0.025em; text-wrap: balance; }
.workflow-detail { max-width: 31rem; margin-top: 1rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }

.artifact { overflow: hidden; border: 1px solid var(--rule); border-radius: 1rem; background: var(--raised); }
.artifact figcaption { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem 0.6rem; border-bottom: 1px solid var(--rule); color: var(--muted); font: 0.75rem var(--mono); }
.artifact figcaption code { color: var(--signal-ink); font-weight: 650; }


.create-preview > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 0.75rem 1rem 0.65rem; }
.create-preview > div + div { border-top: 1px solid var(--rule); }
.create-preview dt { color: var(--muted); font-size: 0.875rem; }
.create-preview dd { font-weight: 700; }
.create-preview .coerced { background: var(--signal-wash); }
.create-preview s { margin-right: 0.35rem; color: var(--muted); font-weight: 500; }
.coercion-note { padding: 0.7rem 1rem 0.65rem; border-top: 1px solid var(--rule); color: var(--signal-ink); font-size: 0.875rem; font-weight: 650; }

/* Rules: the policy, in the dark of the control room. */
.rules {
  margin-top: clamp(5rem, 11vw, 9rem);
  padding: clamp(4rem, 8vw, 7rem) var(--gutter);
  border-block: 1px solid var(--rule);
  background: var(--raised);
}

.rules-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem clamp(2.5rem, 6vw, 6rem); align-items: center; }
.rules-copy > p { max-width: 34rem; margin-top: 1.25rem; color: var(--ink-soft); }
/* Six rules, each tied to the policy line that sets it. */
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0; list-style: none; }
.rule-grid li { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.25rem 1.3rem 1.2rem; border: 1px solid var(--rule); border-radius: 1rem; background: var(--paper); transition: border-color 160ms ease, background-color 160ms ease; }
.rule-grid li[data-policy] { cursor: default; }
.rule-grid li:is(:hover, :focus-visible, .is-active) { border-color: var(--rule-strong); background: var(--raised); }
.rule-grid h3 { font-size: 1.0625rem; font-weight: 750; letter-spacing: -0.01em; }
.rule-grid p { flex: 1; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.rule-grid code { width: fit-content; margin-top: 0.4rem; padding: 0.2rem 0.5rem 0.1rem; border-radius: 0.4rem; background: var(--signal-wash); color: var(--signal-ink); font-size: 0.75rem; }
.policy-file .line { display: inline-block; width: calc(100% + 2.2rem); margin-inline: -1.1rem; padding-inline: 1.1rem; transition: background-color 160ms ease; }
.policy-file .line.is-lit { background: rgba(255, 138, 61, 0.16); }
.policy-file { overflow: hidden; border-radius: 1rem; background: var(--code); color: var(--code-text); }
.policy-file figcaption { padding: 0.8rem 1.1rem 0.7rem; border-bottom: 1px solid var(--code-line); color: var(--code-muted); font: 0.75rem var(--mono); }
.policy-file pre { overflow-x: auto; margin: 0; padding: 1.25rem 1.1rem; color: var(--code-text); font-size: 0.875rem; line-height: 1.8; }
.policy-file .k { color: var(--code-text); }
.policy-file .v { color: var(--code-signal); }
.policy-file .s { color: var(--code-string); }
.policy-file .c { color: #8e8e93; }
.policy-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: 0.85rem 1.1rem; border-top: 1px solid var(--code-line); font-size: 0.875rem; }
.policy-actions .text-action { color: var(--code-text); font-size: 0.875rem; }
.policy-actions .text-action:hover { color: #fff; }
.policy-actions .text-action code { color: var(--code-signal); }
.policy-actions .text-link { color: var(--code-text); }

/* Setup ------------------------------------------------------------- */

.setup-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 2rem 3rem; align-items: start; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.setup-local { padding: clamp(1.25rem, 2.5vw, 1.75rem); border: 1.5px dashed var(--rule-strong); border-radius: 1.25rem; }
.setup-local h3 { font-size: 1.25rem; font-weight: 780; letter-spacing: -0.015em; }
.setup-local .steps { margin-top: 1.25rem; gap: 1.1rem; }
.setup-local .cmd > code { white-space: pre-wrap; overflow-wrap: anywhere; }
.setup-sub { margin-top: 0.45rem; color: var(--ink-soft); font-size: 0.9875rem; }
.setup-sub code { font-size: 0.875em; }

/* Responsive ----------------------------------------------------------- */

@media (max-width: 64rem) {
  .logo-strip, .agent-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { margin-right: 0; }
  .setup-layout { grid-template-columns: minmax(0, 1fr); }
  .console-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .transcript { height: 22rem; padding-bottom: 1.25rem; }
  .ticket-slot { padding: 1.25rem; border-left: 0; border-top: 1px solid var(--console-line); }
  .ticket[data-status="empty"] { min-height: 12rem; }
  .rules-head { grid-template-columns: minmax(0, 1fr); }
  .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 30rem) {
  /* The slot is as wide as "any MCP client"; on phones it takes its own line. */
  .agent-line { flex-wrap: wrap; }
}

@media (max-width: 52rem) {
  .logo-strip, .agent-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .logo-strip, .agent-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .video-frame { border-radius: 1rem; margin-inline: -0.25rem; }
  .gate-head { flex-direction: column; align-items: stretch; }
  .scenarios { overflow-x: auto; scrollbar-width: none; }
  .scenario { flex: 1 0 auto; padding-inline: 0.75rem; font-size: 0.8125rem; }
  .gate .console { margin-inline: -0.25rem; }
  .transcript { padding: 1.1rem 1rem 1rem; }
  .ticket-slot { padding: 1rem 0.75rem; }
  .diff-to { font-size: 2rem; }
  .audit { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .rule-list { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin-top: 2.25rem; }
  .policy-file pre { font-size: 0.78rem; }
  .rule-grid { grid-template-columns: minmax(0, 1fr); }
  .create-preview > div { grid-template-columns: 6.5rem minmax(0, 1fr); }
}

/* Get started: two matching cards, hosted and local, in the page's card language. */
.home .setup-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.home .setup-card { display: flex; min-width: 0; flex-direction: column; padding: clamp(1.25rem, 2.5vw, 1.75rem); border: 1px solid var(--rule); border-radius: 1.25rem; background: var(--raised); }
.home .setup-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.home .setup-card h3 { font-size: 1.25rem; font-weight: 780; letter-spacing: -0.015em; }
.setup-badge { padding: 0.25rem 0.65rem 0.15rem; border-radius: 999px; background: var(--signal-wash); color: var(--signal-ink); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.setup-badge-go { background: var(--go-wash); color: var(--go); }
.home .setup-card .setup-sub { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.55; }
.home .setup-cloud .agent-setup { display: flex; flex: 1; flex-direction: column; }
.home .setup-cloud .agent-tab-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin-top: 1.1rem; }
.home .setup-cloud .agent-tab-list[hidden] { display: none; }
.home .setup-cloud .agent-tab { justify-content: flex-start; }
.home .setup-cloud .agent-tab { min-height: 2.2rem; gap: 0.4rem; padding: 0.3rem 0.7rem 0.2rem 0.55rem; font-size: 0.8125rem; }
.home .setup-cloud .agent-instructions { flex: 1; margin-top: 1rem; padding: 0; border: 0; border-radius: 0; background: none; }
.home .setup-cloud .agent-instructions > p:first-child { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.55; }
.home .setup-cloud .agent-instructions .text-link { white-space: nowrap; }
.home .setup-cloud .agent-next { margin-top: 0.6rem; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.setup-foot { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }
.home .setup-local { border-style: solid; }
.home .setup-local .steps { margin-top: 1.25rem; gap: 1.1rem; }
.home .setup-local .cmd > code { white-space: normal; overflow-wrap: normal; }
.home .setup-local .local-tab-list { flex-wrap: nowrap; }
@media (max-width: 64rem) {
  .home .setup-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .home .setup-local .local-tab-list { flex-wrap: wrap; }
  .home .setup-cloud .agent-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
