/* ==========================================================================
   Lantana Digital — AI Search page (/ai-search-optimization-austin/)
   Loads after site.css and local-seo.css (the shared inner-page layer).
   Adds the page's plates: the assistant console, the claims ledger, click
   and appearance instruments, the citation waffle, repeated-run grids, the
   evidence grades, the deliverables list and the price scale.
   ========================================================================== */

/* --- Hero ---------------------------------------------------------------------- */
.ai-hero { padding-bottom: 0; }
.ai-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 62rem) { .ai-hero__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); column-gap: clamp(2.5rem, 5vw, 4.5rem); } }
.ai-hero h1 { font-size: clamp(2.1rem, 1.15rem + 3vw, 3.6rem); letter-spacing: -0.04em; line-height: 1.02; max-width: 17ch; }
.ai-hero .trust { margin-top: clamp(2.5rem, 5vw, 3.75rem); }
@media (min-width: 62rem) { .trust--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- Plate 1: the assistant console ------------------------------------------ */
.plate--ask { display: block; background: var(--paper); }
.plate--ask .plate__title { position: static; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ask { position: relative; padding: clamp(1.5rem, 3vw, 2.1rem) clamp(1.25rem, 2.8vw, 2rem) clamp(1.25rem, 2.6vw, 1.75rem); color: var(--ink); }

.ask__prompt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.85rem; padding: 0.7rem 0.7rem 0.7rem 0.95rem; background: var(--field-input, #F7F6F2); border: 1px solid var(--note); border-radius: 2px; }
.ask__you { font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--note); }
.ask__q { font-weight: 600; font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.1rem); line-height: 1.35; min-height: 1.35em; }
.ask__caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--bloom-deep); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ask__send { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 2px; background: var(--ink); color: var(--paper); }
.ask__send svg { width: 0.95rem; height: 0.95rem; }
.ask__send.is-sent { background: var(--bloom-deep); }

.ask__body { position: relative; margin-top: 1.1rem; min-height: 11.5rem; }
.ask__think { position: absolute; top: 0.2rem; left: 0; display: flex; align-items: center; gap: 0.3rem; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--note); opacity: 0; }
.ask__think i { width: 6px; height: 6px; border-radius: 50%; background: var(--bloom-deep); }
.ask__think span { margin-left: 0.4rem; }
.ask__answer { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem); line-height: 1.7; color: var(--body); }
.ask__answer .w { display: inline-block; }
.ask__answer .w--cite { margin-left: -0.1em; }
.cite { display: inline-block; min-width: 1.2rem; margin-left: 0.15rem; padding: 0.05rem 0.25rem; border: 1px solid var(--hair); border-radius: 2px; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.7rem; line-height: 1.2; text-align: center; vertical-align: 0.35em; color: var(--ink); background: var(--paper); }

/* Business names are withheld: a redaction bar, patterned per run. */
.redact { display: inline-block; width: calc(var(--w) * 0.62em); height: 0.95em; vertical-align: -0.12em; border-radius: 1px; background: var(--ink); opacity: 0.78; }
.redact.is-top { opacity: 1; background: var(--bloom-deep); }
.redact--r2.is-top { background: repeating-linear-gradient(135deg, var(--bloom-deep) 0 3px, var(--paper) 3px 6px); box-shadow: inset 0 0 0 1.5px var(--bloom-deep); }
.redact--r3.is-top { background: radial-gradient(circle, var(--bloom-deep) 1.6px, transparent 1.9px) 0 0 / 6px 6px, var(--paper); box-shadow: inset 0 0 0 1.5px var(--bloom-deep); }

.ask__sources { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.ask__sources li { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.22rem 0.55rem 0.22rem 0.25rem; border: 1px solid var(--hair); border-radius: 2px; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--body); }
.src__n { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 1px; background: var(--shade); color: var(--ink); font-size: 0.7rem; }

.runs { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--hair); display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
@media (min-width: 36rem) { .runs { grid-template-columns: auto minmax(0, 1fr); column-gap: 1.25rem; align-items: start; } }
.runs__title { font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--note); padding-top: 0.15rem; }
.runs__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.runs__row { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; }
.runs__n { font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--ink); }

.replay { display: inline-flex; align-items: center; gap: 0.4rem; margin: -0.3rem -0.4rem -0.3rem 0; padding: 0.3rem 0.4rem; border: 0; border-radius: 2px; background: none; font: inherit; color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--bloom); text-underline-offset: 0.2em; }
.replay svg { width: 0.9rem; height: 0.9rem; transition: transform 420ms var(--ease); }
.replay:hover svg, .replay:focus-visible svg { transform: rotate(-200deg); }
@media (max-width: 30rem) { .ask__src { display: none; } }
.is-armed .ask__answer, .is-armed .ask__sources, .is-armed .runs__row .redact { visibility: hidden; }

/* --- Paper plates on forest -------------------------------------------------- */
.plate--lift { box-shadow: 0 28px 56px -28px rgb(0 0 0 / 0.65); border-color: transparent; }
.band--dark .ls-pull { color: var(--t-ink); }

/* --- Plate 2: claims against the documentation ------------------------------- */
.claims { padding: clamp(1.3rem, 3vw, 2rem); }
.claims__table { width: 100%; border-collapse: collapse; color: var(--ink); }
.claims__cap { caption-side: top; text-align: left; padding-bottom: 1rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.claims__table th, .claims__table td { padding: 1rem 0; border-top: 1px solid var(--hair); text-align: left; vertical-align: middle; }
.claims__table thead th { padding-top: 0; border-top: 0; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--note); }
.claims__table tbody tr:last-child th, .claims__table tbody tr:last-child td { border-bottom: 1px solid var(--hair); }
.claims__table td, .claims__table thead th:last-child { text-align: right; padding-left: 1rem; }
.claims__table tbody th { font-weight: 600; font-size: 1rem; line-height: 1.35; }
.claim { position: relative; display: inline; color: var(--body); background: linear-gradient(var(--bloom-deep), var(--bloom-deep)) 0 55% / var(--strike, 100%) 2px no-repeat; }
.stamp--doc { white-space: nowrap; }

/* --- Plate 3: clicks and appearance ----------------------------------------- */
.risk { margin-top: clamp(2.75rem, 5.5vw, 4rem); padding: clamp(1.5rem, 3.2vw, 2.4rem); }
.risk__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
@media (min-width: 62rem) { .risk__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); column-gap: 0; } .risk__panel + .risk__panel { padding-left: clamp(2rem, 4vw, 3.25rem); border-left: 1px solid var(--hair); } .risk__panel:first-child { padding-right: clamp(2rem, 4vw, 3.25rem); } }
.risk__h { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 1.2rem; }
.risk__src { margin-top: 1.2rem; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--note); }
.risk__note { text-align: left; }

.lotgrid { display: grid; gap: 3px; }
.lotgrid--10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.lotgrid--20 { grid-template-columns: repeat(20, minmax(0, 1fr)); }
.lot { display: block; aspect-ratio: 1; border-radius: 1px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.lot.is-on { background: var(--bloom-deep); box-shadow: inset 0 0 0 1px var(--bloom-deep); }

.clicks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.9rem, 2.2vw, 1.5rem); }
.clicks__fig { margin-top: 0.7rem; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--note); }
.clicks__fig b { font-family: Overpass, system-ui, sans-serif; font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.035em; color: var(--ink); margin-right: 0.2rem; }
.clicks__cell:first-child .clicks__fig b { color: var(--ink); }
.clicks__lbl { margin-top: 0.3rem; font-size: 0.9rem; line-height: 1.35; color: var(--body); }

.appear { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.2rem; }
.appear li { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.45rem; align-items: baseline; }
.appear__lbl { font-weight: 700; color: var(--ink); }
.appear__eg { display: block; font-family: "Overpass Mono", ui-monospace, monospace; font-weight: 400; font-size: 0.78rem; color: var(--note); }
.appear__val { font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.appear__track { grid-column: 1 / -1; position: relative; height: 16px; background: var(--shade); }
.appear__track i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 1%); background: var(--bloom-deep); transform-origin: 0 50%; }
.appear li:first-child .appear__track i { background: var(--ink); }

/* --- Plate 4: the citation waffle ------------------------------------------- */
.waffle { padding: clamp(1.4rem, 3vw, 2rem); display: grid; gap: 1.5rem; }
@media (min-width: 36rem) { .waffle { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); align-items: center; column-gap: 1.75rem; } }
.waffle__grid { gap: 4px; }
.lot--site { background: var(--bloom-deep); box-shadow: inset 0 0 0 1px var(--bloom-deep); }
.lot--forum { background: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.lot--gdir { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, var(--paper) 2px 5px); box-shadow: inset 0 0 0 1px var(--ink); }
.lot--sdir { background: var(--note); opacity: 0.55; box-shadow: none; }
.lot--other { background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.waffle__key { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; color: var(--ink); }
.waffle__key li { display: grid; grid-template-columns: 0.9rem minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--hair); font-size: 0.92rem; }
.waffle__key li:first-child { font-weight: 700; }
.waffle__key b { font-variant-numeric: tabular-nums; font-weight: 800; }
.wk { width: 0.9rem; height: 0.9rem; border-radius: 1px; }
.wk--site { background: var(--bloom-deep); }
.wk--forum { background: var(--ink); }
.wk--gdir { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, var(--paper) 2px 5px); box-shadow: inset 0 0 0 1px var(--ink); }
.wk--sdir { background: var(--note); opacity: 0.55; }
.wk--other { background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }

/* --- Plate 5: repeated runs --------------------------------------------------- */
.unstable { padding: clamp(1.4rem, 3vw, 2rem); display: grid; gap: 1.5rem; color: var(--ink); }
.rungrid + .rungrid, .unstable__scatter { padding-top: 1.35rem; border-top: 1px solid var(--hair); }
.rungrid__name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; margin-bottom: 0.65rem; }
.rungrid__fig { margin-top: 0.6rem; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; color: var(--note); }
.rungrid__fig b { font-family: Overpass, system-ui, sans-serif; font-size: 1.42rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); margin-right: 0.25rem; }
.scatter { display: block; width: 100%; height: auto; }
.scatter .sc-axis { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.scatter .sc-pts circle { fill: var(--ink); opacity: 0.5; }
.scatter .sc-fit { stroke: var(--bloom-deep); stroke-width: 2; }
.scatter .sc-lbl { font: 400 9.5px "Overpass Mono", ui-monospace, monospace; fill: var(--note); }
.scatter .sc-r { font: 700 13px Overpass, system-ui, sans-serif; fill: var(--bloom-ink); }

/* --- Evidence ------------------------------------------------------------------ */
.evidence { min-width: 46rem; }
.evidence tbody th { font-weight: 700; color: var(--t-ink); width: 26%; }
.evidence td { color: var(--t-body); line-height: 1.55; }
.evidence td:last-child { width: 1%; white-space: nowrap; text-align: right; padding-right: 0; }
.evidence thead th:last-child { text-align: right; padding-right: 0; }
.evidence a { color: var(--t-ink); text-decoration: underline; text-decoration-color: var(--bloom); text-underline-offset: 0.2em; }
.grade { display: inline-block; padding: 0.25em 0.6em; border-radius: 2px; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.02em; }
.grade--strong { background: var(--bloom-deep); color: var(--paper); }
.grade--mixed { box-shadow: inset 0 0 0 1.5px var(--bloom-deep); color: var(--bloom-ink); }
.grade--none { box-shadow: inset 0 0 0 1px var(--note); color: var(--note); }
.columns--three { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 66rem) { .columns--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.columns > p { font-size: clamp(1.03rem, 0.98rem + 0.25vw, 1.13rem); line-height: 1.68; color: var(--t-body); padding-top: 1.1rem; border-top: 1px solid var(--t-hair); }
.columns a { color: var(--t-ink); text-decoration: underline; text-decoration-color: var(--bloom); text-underline-offset: 0.2em; }
@media (max-width: 40rem) {
  .evidence { min-width: 0; }
  .evidence thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .evidence tr { display: grid; gap: 0.35rem; padding: 1rem 0; border-top: 1px solid var(--t-hair); }
  .evidence tr:last-child { border-bottom: 1px solid var(--t-hair); }
  .evidence th, .evidence td, .evidence td:last-child { display: block; width: auto; padding: 0; border: 0; text-align: left; white-space: normal; }
}

/* --- What we do: a list beside a sticky head --------------------------------- */
.dosplit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
@media (min-width: 62rem) { .dosplit { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(3rem, 6vw, 6rem); align-items: start; } .dosplit__head { position: sticky; top: calc(var(--mast-h, 4.5rem) + 2rem); } }
.dolist { margin: 0; padding: 0; list-style: none; }
.dolist__item { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--t-hair); }
.dolist__item:last-child { border-bottom: 1px solid var(--t-hair); }
.dolist__item svg { width: 4rem; height: 4rem; color: var(--t-ink); }
.dolist__item h3 { font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.42rem); letter-spacing: -0.03em; color: var(--t-ink); }
.dolist__item p { margin-top: 0.5rem; max-width: 60ch; font-size: clamp(1.03rem, 0.98rem + 0.25vw, 1.13rem); line-height: 1.66; color: var(--t-body); }

/* --- Cost: log price scale ---------------------------------------------------- */
.logscale { max-width: 68rem; margin-inline: auto; }
.scale__track--none { background: repeating-linear-gradient(to right, var(--t-note) 0 6px, transparent 6px 11px) left center / 100% 1px no-repeat; }
.scale__zero { position: absolute; left: 0; top: 50%; transform: translateY(-50%); padding-right: 0.6rem; background: var(--t-ground); font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-red); }
#cost .pair { margin-bottom: 0; }

/* --- Ignore -------------------------------------------------------------------- */
.ignore__links { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); }
.ignore__sep { color: var(--t-note); margin-inline: 0.6rem; }

/* --- First inspection fixes ------------------------------------------------- */
@media (min-width: 62rem) { .ai-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ai-hero h1 { font-size: clamp(2.1rem, 1.15rem + 2.7vw, 3.3rem); max-width: 19ch; }
.appear li:first-child .appear__track i { background: var(--bloom-deep); }
.scatter { max-height: 12rem; }
.scatter .sc-lbl { font-size: 8px; }
.band--dark .scale__band--ref { opacity: 0.75; }
@media (max-width: 30rem) {
  .ask__prompt { grid-template-columns: minmax(0, 1fr) auto; }
  .ask__you { display: none; }
}

/* Evidence table on phones: one tactic per stacked row (beats the shared .factors column widths). */
@media (max-width: 40rem) {
  .factors.evidence, .factors.evidence tbody { display: block; width: 100%; }
  .factors.evidence tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; padding: 1rem 0; border-top: 1px solid var(--t-hair); }
  .factors.evidence tbody th, .factors.evidence td, .factors.evidence td:nth-child(2), .factors.evidence td:last-child { display: block; width: auto; padding: 0; border: 0; text-align: left; white-space: normal; font-size: 0.98rem; }
  .factors.evidence tbody th { font-size: 1.05rem; }
  .factors.evidence td:last-child { padding-top: 0.2rem; }
}

/* --- Finish review fixes ----------------------------------------------------- */
/* Hero: the pause between runs reads as a visible line, drawn in survey lots. */
.ask__think { top: 0.35rem; gap: 0.7rem; font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.ask__think-lots { display: inline-grid; grid-template-columns: repeat(5, 0.62rem); gap: 3px; }
.ask__think-lots .lot { width: 0.62rem; }
.ask__think-lots .lot.is-lit { background: var(--bloom-deep); box-shadow: inset 0 0 0 1px var(--bloom-deep); }
.ask__body { min-height: 10.2rem; }

/* Hero on narrow screens: three runs side by side, in equal columns. */
.runs__row .redact { max-width: 100%; }
@media (max-width: 61.99rem) {
  .runs__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .runs__row { display: grid; gap: 0.35rem; }
  .runs__row .redact { width: 100%; height: 0.85rem; }
}

/* How we start: the station number sits in the heading line, not above it. */
.steps--inline li::before { display: none; }
@media (min-width: 52rem) and (max-width: 73.99rem) { .steps--inline li { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 51.99rem) { .steps--inline li { grid-template-columns: minmax(0, 1fr); } }
.steps--inline strong::before { content: counter(step) " "; margin-right: 0.35rem; font-family: "Overpass Mono", ui-monospace, monospace; font-size: 0.78em; font-weight: 500; letter-spacing: 0; color: var(--t-red); }

/* Cost: a numbered plate, with "None" as its loudest mark. */
.price { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding: clamp(1.5rem, 3.2vw, 2.4rem); max-width: 68rem; margin-inline: auto;
  --t-ink: var(--ink); --t-body: var(--body); --t-note: var(--note); --t-hair: var(--hair); --t-red: var(--bloom-ink); --t-ground: var(--paper); color: var(--ink); }
.price .logscale { margin-top: 0; }
.price .scale__band--ref { opacity: 1; background: var(--ink); top: 4px; bottom: 4px; }
.price .scale__label--ref { color: var(--body); }
.price .scale__row:last-of-type { padding-top: 1.1rem; border-top: 1px solid var(--hair); }
.price .scale__track--none { height: 2.4rem; background: linear-gradient(var(--bloom-deep), var(--bloom-deep)) left center / 100% 2px no-repeat; }
.price .scale__zero { padding-right: 0.9rem; font-family: Overpass, system-ui, sans-serif; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 800; letter-spacing: -0.03em; text-transform: none; color: var(--bloom-deep); background: var(--paper); }
.price .scale__label:not(.scale__label--ref) { font-weight: 800; }
.price__note { max-width: 68rem; margin-inline: auto; }
.ask__think-lots .lot { height: 0.62rem; aspect-ratio: auto; }
/* A wrapped station heading hangs past its number. */
.steps--inline strong { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.4rem; align-items: baseline; }
.steps--inline strong::before { margin-right: 0; }
/* The "None" row: hairline above it (the axis follows it, so target the row itself). */
.price .scale__row--none { padding-top: 1.1rem; border-top: 1px solid var(--hair); }
/* Reduced motion: the caret holds still. */
@media (prefers-reduced-motion: reduce) { .ask__caret { animation: none; } }

/* Verdicts are plain sentences now: give them a column and let them wrap. */
@media (min-width: 40.01rem) {
  .factors.evidence { table-layout: fixed; width: 100%; }
  .factors.evidence tbody th, .factors.evidence thead th:first-child { width: 28%; }
  .factors.evidence td:nth-child(2) { width: auto; max-width: none; }
  .factors.evidence td:last-child, .factors.evidence thead th:last-child { width: 15rem; white-space: normal; text-align: left; }
  .evidence .grade { text-align: left; line-height: 1.4; }
}
