/* r193 polish pass (user review 3 + page-wide audit at 390 / 768 / 1440 / 1920). Loaded after r193.css. */
:root { --gutter: clamp(20px, 5vw, 64px); }

/* ---------------------------------------------------------------- 1. demo windows stay cream with dark ink */
body.r193 :is(#step-preview, #agent-panel, #decision-card, .decision-demo .decision-card) { color: #1d2a2e; }
body.r193 :is(#step-preview, #agent-panel, #decision-card) :is(h2, h3, h4, strong, b, p, span, li, label, small, .chat-bubble, button:not(.button), .button.outline, .pill) { color: #1d2a2e; }
body.r193 :is(#step-preview, #agent-panel, #decision-card) :is(.subtle, small, .agent-footnote) { color: #5d757b; }
body.r193 :is(#step-preview, #agent-panel, #decision-card) .pill { background: #eef2e9; border-color: #d9e0d2; }
body.r193 :is(#step-preview, #agent-panel, #decision-card) .button:not(.outline) { color: var(--accent-ink); }
body.r193 :is(#step-preview, #agent-panel, #decision-card) .button.outline { background: #fff; box-shadow: inset 0 0 0 1px #c9d3c6; }
/* the terminal inside the agent panel is genuinely dark */
body.r193 #agent-panel :is(.terminal, .terminal *) { color: #d8f3f0; }

/* ---------------------------------------------------------------- 2. header + phone menu */
body.r193 #site-nav { background: transparent; }
@media (max-width: 900px) {
  body.r193 #site-nav { background: rgba(7, 9, 11, .97); border: 1px solid var(--line); backdrop-filter: blur(12px); }
  body.r193 #site-nav a { color: var(--text); }
}
@media (max-width: 440px) {
  body.r193 .site-header .brand img { width: 118px; }
  body.r193 .header-actions { gap: 8px; }
  body.r193 .header-actions .button { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 370px) { body.r193 .header-actions .button { display: none; } }

/* ---------------------------------------------------------------- 3. walkthrough (#how): step tabs, benefits */
body.r193 .step-tabs button { color: var(--muted); background: none; border: 0; padding: 6px 4px; border-radius: 10px; }
body.r193 .step-tabs b { background: var(--card-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
body.r193 .step-tabs button[aria-selected=true] { color: var(--text); background: none; }
body.r193 .step-tabs button[aria-selected=true] b { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
body.r193 .step-tabs button:hover b { box-shadow: inset 0 0 0 1px var(--accent); }
body.r193 .benefit-list li { color: var(--text); }
body.r193 .benefit-list li > span:first-child { background: rgba(43, 192, 218, .14); color: var(--accent); }
body.r193 .benefit-list li > span:first-child svg { stroke: var(--accent); }

/* ---------------------------------------------------------------- 4. agents (#agents): profile card + tabs */
body.r193 .agent-tabs button { color: var(--muted); background: transparent; padding: 12px 14px; border: 1px solid transparent; }
body.r193 .agent-tabs button:hover { background: var(--card-2); color: var(--text); }
body.r193 .agent-tabs button[aria-selected=true] { background: rgba(43, 192, 218, .14); color: var(--text); border-color: rgba(43, 192, 218, .45); }
body.r193 .agent-tabs button svg { stroke: currentColor; }
body.r193 .agent-profile { padding: 20px; border-radius: 22px; }
body.r193 .agent-name strong { color: var(--text); }

/* ---------------------------------------------------------------- 5. control (#control): feature buttons as padded cards */
body.r193 .control-section { padding: clamp(64px, 9vw, 120px) 0; }
body.r193 .control-features { gap: 14px; }
body.r193 .control-features > button { padding: 20px; border-radius: 18px; text-align: left; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s; }
body.r193 .control-features > button:hover { border-color: var(--accent); }
body.r193 .control-features > button:hover strong { text-decoration: none; }
body.r193 .control-features svg { stroke: var(--accent); }
body.r193 .control-features strong { color: var(--text); }
body.r193 .control-grid em { color: var(--accent); }
@media (max-width: 760px) { body.r193 .control-features { flex-direction: column; } }

/* ---------------------------------------------------------------- 6. card grids: real padding everywhere */
body.r193 :is(.ownership-grid article, .security-cards article, .outcome-grid article, .setup-steps li, .feature-card) { padding: clamp(20px, 2.4vw, 28px); border-radius: 20px; }
body.r193 .ownership-grid, body.r193 .security-cards, body.r193 .outcome-grid { gap: 14px; }
body.r193 .outcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
body.r193 .setup-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
body.r193 .data-boundary { padding: clamp(20px, 2.4vw, 28px); border-radius: 20px; gap: 18px; }
body.r193 :is(.ownership-icon, .security-icon) { margin-bottom: 14px; }
body.r193 .security-details { padding: clamp(20px, 2.4vw, 28px); border-radius: 20px; }
body.r193 :is(.security-details summary, .faq-list summary) { padding: 16px 0; min-height: 44px; }
body.r193 .security-hq { padding: 24px; border-radius: 20px; }
body.r193 .security-hq-checks span { color: var(--muted); }
body.r193 .security-review-path :is(span, strong) { background: var(--card-2); color: var(--text); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); }
body.r193 .security-review-path strong { border-color: rgba(43, 192, 218, .5); color: var(--accent); }
body.r193 .feature-card small { color: var(--accent); }
body.r193 :is(.security-section, #features, .faq-section, .getting-started, .local-first-section) { border-top-color: var(--line); }

/* ---------------------------------------------------------------- 7. one gutter for every section */
body.r193 .wrap { padding-left: var(--gutter); padding-right: var(--gutter); box-sizing: border-box; }
body.r193 .section { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }

/* ---------------------------------------------------------------- 8. dialog, toast, footer */
body.r193 #dialog-close { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
body.r193 .dialog-points { background: var(--card-2); color: var(--muted); }
body.r193 #building-directory { margin-bottom: 16px; }
body.r193 #building-directory + .subtle { border-top: 1px solid var(--line); padding-top: 14px; }
body.r193 .site-footer { padding-top: 40px; padding-bottom: 40px; }
body.r193 .site-footer > div { flex-wrap: wrap; gap: 12px 20px; }
body.r193 .site-footer > div :is(a, button) { white-space: nowrap; }

/* ---------------------------------------------------------------- 9. tap targets */
body.r193 .text-button { min-height: 44px; display: inline-flex; align-items: center; }
body.r193 [data-filter] { min-height: 40px; }

/* ---------------------------------------------------------------- 10. pinned sections on small screens */
@media (max-width: 900px) {
  .flow { height: 560vh; }
  #product-proof .flow-copy { background: linear-gradient(180deg, var(--bg) 70%, rgba(7, 9, 11, 0)); padding-bottom: 18px; }
  .agent-card { bottom: 12vh; }
  .chapter .eyebrow, .hud { text-shadow: 0 1px 3px #000; }
}

/* ---------------------------------------------------------------- 11. desktop audit */
/* demo windows (by class too) keep dark ink */
body.r193 :is(.product-window, .workspace-shell > :not(.agent-profile)) { color: #1d2a2e; }
body.r193 :is(.product-window, .workspace-shell > :not(.agent-profile)) :is(h2, h3, h4) { color: #14302e; }
body.r193 :is(.product-window, .workspace-shell > :not(.agent-profile)) p { color: #5b6763; }
/* the agent sidebar is part of the app window: cream, like the real app */
body.r193 .agent-profile { background: #fbf8ef; border-color: #e3e7dc; color: #1d2a2e; }
body.r193 .agent-profile :is(p, .agent-caption) { color: #5d757b; }
body.r193 .agent-name strong { color: #14302e; }
body.r193 .agent-tabs button { color: #33494e; }
body.r193 .agent-tabs button:hover { background: #eef1e7; color: #14302e; }
body.r193 .agent-tabs button[aria-selected=true] { background: #f3e6bd; color: #14302e; border-color: #d9c78e; }
body.r193 .terminal-form button { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* film chapters: clear the chapter index, readable copy and HUD */
@media (min-width: 761px) { .chapter:not(.hero-chapter) { left: clamp(200px, 14vw, 240px); } }
body.r193 .chapter p { color: rgba(242, 244, 245, .9); }
body.r193 .chapter .eyebrow { color: rgba(242, 244, 245, .8); }
body.r193 .hud { color: rgba(242, 244, 245, .78); text-shadow: 0 1px 8px #000; }
body.r193.over-film .site-header { background: linear-gradient(180deg, rgba(7, 9, 11, .62), rgba(7, 9, 11, 0)); }
/* landmarks copy: never clipped; links read left to right */
.landmarks-copy { overflow: visible; bottom: auto; left: var(--gutter); }
.landmarks-copy h2 { font-size: clamp(32px, 3vw, 48px); }
body.r193 .landmarks .building-details p { margin: 0 0 8px; }
body.r193 .building-links button { justify-content: flex-start; }
body.r193 .building-links button span { flex: 1; text-align: left; }
.team-copy { left: var(--gutter); } .agent-card, .agent-dots { right: var(--gutter); }
.flow-stage { padding-left: var(--gutter); padding-right: var(--gutter); padding-top: 72px; }
/* seams: every pinned 3D stage fades into the page at its top and bottom edge */
.landmarks-stage::after, .team-stage::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 9, 11, 0) 9%, rgba(7, 9, 11, 0) 88%, var(--bg) 100%); }
/* one eyebrow style everywhere */
body.r193 .eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
body.r193 .outcome-grid span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
/* a space where a <br> is hidden between two sentences */
body.r193 h2 em::before { content: ' '; }
/* dialogs */
body.r193 dialog::backdrop { background: rgba(7, 9, 11, .72); backdrop-filter: blur(6px); }
body.r193 #dialog-close { width: 40px; height: 40px; padding: 0; }
body.r193 .dialog-points { border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
body.r193 .directory-grid { max-height: 52vh; overflow: auto; padding-bottom: 12px; }
/* features search: one focus ring on the pill */
body.r193 .search input:focus-visible { outline: 0; }
body.r193 .search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
body.r193 .feature-card small { font-size: 14px; }
/* signup + toast */
body.r193 .signup-next { margin-top: 24px; }
body.r193 .toast { background: var(--card-2); color: var(--text); border-color: var(--line-2); }
body.r193 .signup-section { background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 9, 11, 0) 18%), radial-gradient(90% 70% at 80% 30%, #0d1a20, var(--bg) 70%); }
/* footer */
body.r193 .site-footer :is(a, button) { text-decoration: none; font-size: 14px; }
body.r193 .site-footer :is(a, button):hover { text-decoration: underline; color: var(--text); }

/* ---------------------------------------------------------------- 12. final pass */
body.r193 :is(.faq-list, .security-details) summary { padding-right: 36px; position: relative; }
body.r193 .ownership-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 28px 0 14px; }

/* ---------------------------------------------------------------- 13. landmark hotspots: a dot on the building, a leader line, a label */
.layer-tags .pin { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .2s; }
.layer-tags .pin > i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(43, 192, 218, .25), 0 0 0 9px rgba(43, 192, 218, .1); }
.layer-tags .pin .tag { position: absolute; left: 0; top: 0; margin: -64px 0 0 54px; opacity: 1; font-size: 15px; padding: 9px 14px 9px 10px; }
.layer-tags .pin .tag::before { left: -54px; top: calc(100% + 14px); width: 64px; height: 1px; transform-origin: 0 0; transform: rotate(-48deg); }
@media (max-width: 900px) { .layer-tags .pin .tag { font-size: 12px; margin: -52px 0 0 38px; } .layer-tags .pin .tag::before { left: -38px; width: 46px; } }

/* ---------------------------------------------------------------- 14. one film: the 24-second game tour, large */
.film-pair.single { grid-template-columns: 1fr; max-width: 1180px; margin: 0 auto; }

/* ---------------------------------------------------------------- 15. the app's real building panel beside the building */
.dept-popup { position: absolute; left: 0; top: 0; z-index: 4; margin: 0; width: clamp(280px, 22vw, 360px); opacity: 0; pointer-events: none; }
.dept-popup img { display: block; width: 100%; height: auto; border-radius: 20px; padding: 8px; box-sizing: border-box; background: #11181c;
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(43, 192, 218, .35); translate: 0 var(--rise, 0); }
.dept-popup figcaption { margin-top: 10px; color: rgba(242, 244, 245, .7); text-align: center; }
@media (min-width: 901px) { body.r193 .landmarks .building-details { display: none; } }
@media (max-width: 900px) {
  .dept-popup { top: auto; bottom: 64px; left: 50%; width: min(300px, 76vw); translate: -50% 0; }
  .dept-popup img { max-height: 34vh; object-fit: cover; object-position: top; }
  .dept-popup figcaption { display: none; }
}
/* pins lean left (the panel owns the right side) */
.layer-tags .pin .tag { left: auto; right: 0; margin: -64px 54px 0 0; flex-direction: row; }
.layer-tags .pin .tag::before { left: auto; right: -64px; top: calc(100% + 14px); transform-origin: 100% 0; transform: rotate(48deg); }
@media (max-width: 900px) { .layer-tags .pin .tag { margin: -52px 38px 0 0; } .layer-tags .pin .tag::before { right: -46px; left: auto; } }

@media (max-width: 900px) { .dept-popup { bottom: 56px; width: min(280px, 72vw); } .dept-popup img { max-height: 25vh; } }

@media (max-width: 900px) { .layer-tags { display: none; } }   /* phones: the panel carries the tools; pins would crowd the tabs */

/* ---------------------------------------------------------------- 16. the city's own building hover card (native size) */
.dept-popup { width: 332px; }
.dept-popup img { padding: 0; background: none; border-radius: 0; box-shadow: none; filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .7)); }
@media (max-width: 900px) { .dept-popup { width: min(270px, 70vw); } .dept-popup img { max-height: none; object-fit: contain; } }

/* ---------------------------------------------------------------- 17. free downloads (shown once installers exist) */
.downloads { margin: 26px 0 8px; } .downloads .dl-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 8px; }
.downloads small { color: var(--muted); }
