/* Urboids fast map — landing page. Mobile first: base styles are for phones; wider screens are added below. */

:root {
  --bg: #f4f1ea;          /* warm paper */
  --bg-tint: #ebe7dc;     /* soft sand */
  --card: #fbfaf6;
  --ink: #1f2a24;         /* deep forest */
  --ink-soft: #4a574f;
  --moss: #3f5e4a;
  --moss-deep: #2c4436;
  --sage: #8fa68e;
  --clay: #a8683f;        /* terracotta accent */
  --line: #d9d3c4;
  --contour: rgba(63, 94, 74, 0.13);
  --na: #8a8f86;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(31, 42, 36, 0.05), 0 12px 32px -12px rgba(31, 42, 36, 0.18);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a16;
    --bg-tint: #17211c;
    --card: #1b2621;
    --ink: #e9e6dd;
    --ink-soft: #b3b9ae;
    --moss: #9db8a0;
    --moss-deep: #c3d6c4;
    --sage: #6f8a72;
    --clay: #d39a74;
    --line: #2d3a33;
    --contour: rgba(157, 184, 160, 0.10);
    --na: #7f877f;
    --danger: #f2a49c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Language: only the chosen language shows (English first, by default) */
html[lang="en"] body [lang="es"],
html[lang="es"] body [lang="en"] { display: none !important; }

a { color: var(--moss); text-underline-offset: 3px; }
a:hover { color: var(--clay); }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Harold's LinkedIn: LinkedIn blue, inside the sticky top bar, so it never moves when the page scrolls */
.linkedin-bar { display: block; padding: 8px 16px; background: #0a66c2; color: #fff; text-align: center;
  font-size: 0.86rem; line-height: 1.4; text-decoration: none; }
.linkedin-bar:hover, .linkedin-bar:focus-visible { background: #004182; color: #fff; }
.linkedin-bar strong { text-decoration: underline; text-underline-offset: 2px; }
.linkedin-logo { width: 1.05em; height: 1.05em; margin-left: 6px; vertical-align: -0.15em; fill: currentColor; }
.soon-bar { margin: 0; padding: 8px 16px 6px; background: var(--moss-deep); color: var(--bg); }
@media (prefers-color-scheme: dark) { .soon-bar { background: #22342a; color: var(--ink); } }
.waitlist { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.soon-text { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.waitlist-row { display: inline-flex; gap: 6px; }
.waitlist input {
  width: 200px; max-width: 52vw; min-height: 32px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--ink); font: 0.9rem var(--sans);
}
.waitlist button {
  min-height: 32px; padding: 0 14px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--clay); color: #fff; font: 600 0.85rem var(--sans);
}
.waitlist button:disabled { opacity: 0.45; cursor: not-allowed; }
.waitlist-msg { flex-basis: 100%; text-align: center; font-size: 0.8rem; }
.waitlist-msg:empty { display: none; }
.waitlist-privacy { margin: 4px 0 0; text-align: center; font-size: 0.68rem; opacity: 0.8; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.01em; }
.brand em { font-style: italic; color: var(--moss); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect { fill: var(--moss); }
.brand-mark .leaf { fill: var(--bg); }
.brand-mark .vein { fill: none; stroke: var(--moss); stroke-width: 1.5; stroke-linecap: round; }

.lang-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 4px 10px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft);
  font: 600 0.8rem/1 var(--sans); letter-spacing: 0.06em; cursor: pointer;
}
.lang-btn[aria-pressed="true"] { background: var(--moss); color: var(--bg); }
.flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); flex: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 56px; }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contours path { fill: none; stroke: var(--contour); stroke-width: 1.4; }
.hero-inner { position: relative; }

.eyebrow { margin: 0 0 12px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); }

h1, .section-title, .result-place, .price {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; color: var(--ink);
}
h1 { margin: 0; font-size: clamp(2rem, 8.5vw, 3.6rem); line-height: 1.08; max-width: 18ch; }

.lede { margin: 18px 0 0; font-size: 1.05rem; color: var(--ink-soft); max-width: 62ch; }
.lede strong { color: var(--ink); font-weight: 600; }

/* ---------- search ---------- */
.search {
  margin-top: 28px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.mode-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.mode-label {
  border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--na);
  font: 600 0.92rem var(--sans); transition: color 0.3s;
}
.mode-label.is-on { color: var(--ink); }
.switch {
  position: relative; width: 56px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--moss); transition: background-color 0.35s;
}
.switch[aria-checked="true"] { background: var(--clay); }
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);   /* a soft overshoot, like an iPhone switch */
}
.switch[aria-checked="true"] .knob { transform: translateX(24px); }

.panes { display: grid; gap: 12px; }
.pane {
  margin: 0; padding: 12px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  transition: opacity 0.35s, filter 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.pane:not([disabled]) { border-color: var(--moss); box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 18%, transparent); }
.pane[disabled] { opacity: 0.38; filter: grayscale(1); }
.pane[disabled] * { cursor: not-allowed; }
.coord-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coord { display: block; position: relative; }
.coord-label { display: block; margin-bottom: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); }
.coord input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font: 1rem/1.3 var(--sans);   /* 16px: no zoom on focus in iOS */
}
.coord input:focus { outline: none; border-color: var(--moss); }
.upl-box input { padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.upl-list {
  list-style: none; margin: 6px 0 0; padding: 4px; max-height: 240px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: var(--shadow);
}
.upl-option, .upl-none { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; }
.upl-option { cursor: pointer; }
.upl-option:hover, .upl-option.is-active { background: color-mix(in srgb, var(--sage) 22%, transparent); }
.upl-code { color: var(--na); font-size: 0.85rem; }
.upl-none { color: var(--na); }
.search-notes { margin: 10px 0 0; color: var(--danger); font-size: 0.88rem; font-weight: 600; }
.search-notes:empty { display: none; }
.search-btn { width: 100%; margin-top: 14px; }
.search-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.search-status { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 0.9rem;
  background: color-mix(in srgb, var(--sage) 18%, transparent); color: var(--moss-deep); }
.search-status.is-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-hint { margin: 10px 0 0; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: 600 1rem/1 var(--sans); cursor: pointer; transition: background-color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--moss); color: var(--bg); }
.btn-primary:hover { background: var(--moss-deep); }
.btn-light { background: var(--bg); color: var(--moss-deep); }
.btn-light:hover { background: var(--card); }

/* ---------- founder line ---------- */
.founder-line {
  margin: 20px 0 0; padding: 2px 0 2px 14px;
  border-left: 2px solid var(--clay);
  font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.55; color: var(--ink-soft);
  max-width: 64ch;
}
.founder-line a { font-style: normal; font-weight: 600; }

/* ---------- example answer ---------- */
.result {
  margin-top: 32px; padding: 18px 14px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.result-head { padding: 0 2px 6px; }
.result-tag { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--clay) 14%, transparent); color: var(--clay);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.result-place { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.result-sub { margin: 6px 0 0; font-size: 0.88rem; color: var(--ink-soft); }
/* R52: the concept PDF (handoff to agent 2) under an answer, in My searches and in the administrators' list */
.handoff-box { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.handoff-control { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.handoff-status { font-weight: 600; font-size: 0.92rem; }
.handoff-status.is-done { color: var(--moss); }
.handoff-status.is-failed { color: var(--danger); }
.handoff-btn { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }
.handoff-btn:disabled { opacity: 0.6; cursor: wait; }
.handoff-note { color: var(--ink-soft); font-size: 0.85rem; overflow-wrap: anywhere; }
.my-pdf .handoff-control { gap: 4px 8px; }
.my-pdf .handoff-status { font-size: 0.82rem; }
.pending-list { margin: 0; padding: 0; list-style: none; }
.pending-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 10px 2px; border-top: 1px solid var(--line); }
.pending-where { font-size: 0.9rem; }

/* R50: a failed answer check, named above the answer */
.result-checks { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--danger); border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--ink); font-size: 0.92rem; }
.result-checks-title { margin: 0 0 6px; font-weight: 600; color: var(--danger); }
.result-checks ul { margin: 0; padding-left: 20px; }
.result-checks-quote { color: var(--ink-soft); font-size: 0.86rem; overflow-wrap: anywhere; }

.table-title { display: flex; align-items: center; gap: 10px; margin: 22px 2px 10px; font-family: var(--serif); font-weight: 500; font-size: 1.12rem; }
.table-n { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--moss); color: var(--bg); font: 700 0.8rem/1 var(--sans); }

/* Phones: each row becomes a small card with its column labels */
.rtable { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rtable tr { display: block; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.rtable td { display: block; padding: 3px 0; overflow-wrap: anywhere; }
.rtable td::before { content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.rtable td:empty { display: none; }
.rtable .map { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--moss); }
.rtable .check { font-weight: 600; }
.rtable .act { color: var(--clay); font-size: 0.85rem; }
.rtable tr.na td:not(.check) { color: var(--na); font-style: italic; }

.rtable .dist { font-size: 0.85rem; }
.result-intro, .result-subtitle { margin: 16px 2px 0; font-size: 0.92rem; }
.result-subtitle { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--clay) 12%, transparent); }
.table-note { margin: 4px 2px 0; font-size: 0.82rem; color: var(--ink-soft); font-style: italic; }
.result-warning { margin: 18px 2px 0; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--sage) 18%, transparent); color: var(--moss-deep); font-size: 0.88rem; }
.legal-note { margin: 14px 2px 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.78rem; line-height: 1.5; color: var(--na); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-tint { background: var(--bg-tint); }
.kicker { margin: 0 0 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); }
.section-title { margin: 0; font-size: clamp(1.6rem, 6.5vw, 2.4rem); line-height: 1.15; max-width: 22ch; }
.section-lede { margin: 14px 0 0; color: var(--ink-soft); max-width: 60ch; }

.problem-grid { display: grid; gap: 12px; margin-top: 24px; }
.problem-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.problem-card p { margin: 0; color: var(--ink-soft); }
.problem-card .problem-big { margin-bottom: 6px; font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--moss); }

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.step { position: relative; padding: 18px 18px 18px 64px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step-n { position: absolute; left: 18px; top: 18px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--moss); color: var(--moss); font-family: var(--serif); font-size: 1.05rem; }
.step h3 { margin: 2px 0 6px; font-size: 1.05rem; line-height: 1.35; }
.step p { margin: 0; color: var(--ink-soft); }

.features { display: grid; gap: 12px; margin-top: 24px; }
.feature { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.feature-icon { width: 38px; height: 38px; fill: none; stroke: var(--moss); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.feature h3 { margin: 12px 0 6px; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.price-card { margin-top: 14px; padding: 26px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.price { margin: 0; font-size: 3rem; line-height: 1; color: var(--moss); }
.price-for { margin: 10px 0 0; color: var(--ink-soft); font-size: 1.05rem; }

.cta { background: var(--moss-deep); color: var(--bg); }
.cta .section-title { color: var(--bg); margin-bottom: 22px; }
@media (prefers-color-scheme: dark) {
  .cta { background: #22342a; }
  .cta .section-title { color: var(--ink); }
  .btn-light { background: var(--ink); color: #1b2621; }
}

.footer { padding: 32px 0 40px; border-top: 1px solid var(--line); }
.footer-inner p { margin: 0 0 8px; }
.footer-brand { font-family: var(--serif); font-size: 1.1rem; }
.footer-brand em { color: var(--moss); }
.footer-legal { font-size: 0.85rem; color: var(--ink-soft); max-width: 60ch; }
.footer-contact { font-size: 0.9rem; }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .wrap { padding: 0 24px; }
  .hero { padding: 64px 0 80px; }
  .search { padding: 20px; }
  .result { padding: 24px; }
  .problem-grid { grid-template-columns: repeat(3, 1fr); }
  .price-card { max-width: 440px; }
  .section { padding: 80px 0; }
}

@media (min-width: 900px) {
  /* Tables become real tables with columns */
  .rtable thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .rtable, .rtable tbody { display: table; width: 100%; }
  .rtable thead { display: table-header-group; }
  .rtable tbody { display: table-row-group; }
  .rtable tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
  .rtable th, .rtable td { display: table-cell; padding: 10px 12px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
  .rtable td::before { content: none; }
  .rtable td:empty { display: table-cell; }
  .rtable th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); border-bottom: 1.5px solid var(--moss); }
  .rtable .map { width: 22%; }
  .rtable .act { width: 17%; white-space: nowrap; }
  .rtable .check { width: 22%; }
  .rtable-dist .map { width: 16%; }
  .rtable-dist .dist { width: 22%; }
  .rtable-dist .act { width: 12%; white-space: normal; }
  .steps, .features { grid-template-columns: repeat(3, 1fr); }
  .cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .cta .section-title { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- sign-in (R45) ---------- */
.auth-area { margin-left: auto; display: flex; align-items: center; }
.auth-btn {
  min-height: 34px; padding: 0 12px; border: 1px solid var(--moss); border-radius: 999px; cursor: pointer;
  background: var(--moss); color: var(--bg); font: 600 0.82rem var(--sans);
}
.auth-btn-quiet { background: transparent; color: var(--moss); }
.auth-user { display: inline-flex; align-items: center; gap: 8px; }
.auth-user[hidden] { display: none; }  /* signed out: no email, no Sign Out (the rule above would show it) */
.auth-email { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; color: var(--ink-soft); }
.verify-note { margin: 0; padding: 6px 16px; text-align: center; font-size: 0.8rem;
  background: color-mix(in srgb, var(--clay) 16%, var(--bg)); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 2px 4px; cursor: pointer; color: var(--moss); font: 600 0.85rem var(--sans);
  text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--danger); }
.link-btn:disabled { opacity: 0.5; cursor: default; }
.auth-dialog {
  width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
.auth-dialog::backdrop { background: rgba(18, 26, 22, 0.55); backdrop-filter: blur(3px); }
.auth-form { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 20px 20px; }
.auth-form h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.auth-why { margin: 0 0 6px; color: var(--ink-soft); font-size: 0.9rem; }
.auth-form label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.auth-form input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: 1rem var(--sans); }
.auth-form input:focus { outline: none; border-color: var(--moss); }
.dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--ink-soft); }
.btn-google { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-google svg { width: 20px; height: 20px; }
.btn-ghost { background: transparent; color: var(--moss); border-color: var(--moss); }
.auth-or { margin: 6px 0 0; text-align: center; font-size: 0.8rem; color: var(--na); }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.auth-actions .btn, .btn-google { min-height: 46px; padding: 0 12px; font-size: 0.95rem; }
.auth-form .btn:disabled { opacity: 0.5; cursor: wait; }
.auth-msg { margin: 0; font-size: 0.88rem; }
.auth-msg:empty { display: none; }
.auth-msg.is-error { color: var(--danger); }
.auth-msg.is-ok { color: var(--moss); }

/* ---------- My searches (R46) ---------- */
.my-searches { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); }
.my-searches h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; }
.my-empty { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.my-row { cursor: pointer; }
.my-row:hover td, .my-row:focus-visible td { background: color-mix(in srgb, var(--sage) 14%, transparent); }
.my-name-input { width: 100%; min-width: 120px; min-height: 36px; padding: 6px 8px; border: 1px dashed var(--line);
  border-radius: 8px; background: transparent; color: var(--ink); font: 0.92rem var(--sans); }
.my-name-input:focus { outline: none; border-style: solid; border-color: var(--moss); background: var(--bg); }

/* ---------- the live answer ---------- */
.result-text { margin: 12px 2px 0; }
/* an English answer is followed by the same answer in Spanish (R12): both show, whatever the page language */
html[lang] body .live-result > div.both-langs { display: block !important; }
.live-result > div.both-langs + div.both-langs { margin-top: 28px; padding-top: 18px; border-top: 2px solid var(--line); }

@media (min-width: 640px) {
  .panes { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .search-btn { width: auto; min-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .switch .knob, .switch, .pane { transition: none; }
}

/* narrow phones: logo, Sign In and the flags on one line */
@media (max-width: 430px) {
  .topbar-inner { gap: 8px; }
  .brand { font-size: 1rem; gap: 6px; }
  .brand em { display: none; }
  .lang-btn span { display: none; }
  .lang-btn { padding: 4px 7px; }
  .auth-btn { padding: 0 10px; font-size: 0.78rem; }
  .auth-email { display: none; }
}

/* ---------- the concept sketch while the agent works ---------- */
.concept-board {
  position: relative; display: grid; justify-items: center; gap: 10px; padding: 22px 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card);
}
.concept-board::before {   /* faint drafting-paper grid */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--sage) 12%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--sage) 12%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
.concept-video {
  position: relative; display: block; width: min(100%, 720px); height: auto; aspect-ratio: 1200 / 768;
  border-radius: 12px; background: #fff; object-fit: cover; box-shadow: 0 8px 24px -12px rgba(31, 42, 36, 0.35);
}

.concept-ring-wrap { position: relative; width: 52px; height: 52px; }
.concept-ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.concept-ring circle { fill: none; stroke-width: 4; }
.ring-track { stroke: color-mix(in srgb, var(--sage) 25%, transparent); }
.ring-fill { stroke: var(--moss); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0;
  transition-property: stroke-dashoffset; transition-timing-function: linear; }
.ring-secs { position: absolute; inset: 0; display: grid; place-items: center; font: 600 0.8rem var(--sans); color: var(--ink-soft); }
.concept-caption { position: relative; margin: 0; max-width: 46ch; text-align: center; font-size: 0.88rem; color: var(--ink-soft); }

/* the light when the answer arrives: from the sketch's centre across the page */
.light-burst {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: radial-gradient(circle at var(--x) var(--y), #fffdf6 0%, #fff5d6 22%, rgba(255, 236, 190, 0.85) 42%, rgba(255, 236, 190, 0) 70%);
  clip-path: circle(0 at var(--x) var(--y));
  animation: light-burst 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes light-burst {
  0% { clip-path: circle(0 at var(--x) var(--y)); opacity: 1; }
  40% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: 1; }
  100% { clip-path: circle(150vmax at var(--x) var(--y)); opacity: 0; }
}
.live-result.is-revealed { animation: answer-in 0.7s ease-out both; }
@keyframes answer-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- answers easier to read: one field per line; UPL rows under their group ---------- */
.rtable td.val { line-height: 1.45; }
.kv { display: block; padding: 2px 0; }
.kv + .kv { border-top: 1px dotted color-mix(in srgb, var(--line) 80%, transparent); }
.kv-label { font-weight: 600; color: var(--ink-soft); margin-right: 4px; }
.kv-label::after { content: ":"; }
.count-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: color-mix(in srgb, var(--sage) 22%, transparent); color: var(--moss-deep); }
.group-title { margin: 22px 2px 8px; padding-bottom: 6px; border-bottom: 1.5px solid var(--moss);
  font: 600 0.8rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--moss); }
@media (min-width: 900px) {
  .rtable-upl .map { width: 24%; }
  .rtable-upl .val { width: 54%; }
  .rtable-upl .act { width: 22%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .ring-fill { transition: none; }
  .live-result.is-revealed { animation: none; }
}

/* Every button lights up like the LinkedIn bar when the pointer is on it or it has keyboard focus (1 Nov 2026):
   filled buttons take a deeper shade (a brighter one in dark mode); see-through buttons take a soft tint. */
button, .btn, .linkedin-bar { transition: background-color 0.15s ease, filter 0.15s ease, color 0.15s ease; }
button:not(:disabled):hover, button:not(:disabled):focus-visible { filter: brightness(0.88); }
@media (prefers-color-scheme: dark) {
  button:not(:disabled):hover, button:not(:disabled):focus-visible { filter: brightness(1.2); }
}
.link-btn:not(:disabled):hover, .link-btn:not(:disabled):focus-visible,
.auth-btn-quiet:hover, .auth-btn-quiet:focus-visible, .btn-ghost:hover, .btn-ghost:focus-visible,
.mode-label:hover, .mode-label:focus-visible, .dialog-close:hover, .dialog-close:focus-visible,
.lang-btn:not([aria-pressed="true"]):hover, .lang-btn:not([aria-pressed="true"]):focus-visible {
  background-color: color-mix(in srgb, var(--moss) 16%, transparent); border-radius: 6px; filter: none;
}
