/* talkdown.ai: a calm, professional sales site. Navy and white with pale blue bands, one
   red accent from the Talkdown sign, plain wording first and technical detail folded away.
   Fonts are loaded by the <link> in each page's head. */
:root {
  --ink: #14243b;
  --ink-soft: #52627a;
  --purple: #0f2a4d;        /* navy: headings, tables, dark bands */
  --purple-dark: #0a1c33;
  --accent: #1f5fbf;        /* links and small accents */
  --red: #e5261f;           /* the sign's red */
  --mint: #8cc4ff;          /* light blue on dark bands */
  --mint-deep: #1f5fbf;
  --paper: #ffffff;
  --cream: #ffffff;
  --tint: #f1f5fa;
  --mintwash: #edf3fa;
  --line: #dde5ef;
  --radius: 14px;
  --shadow: 0 6px 20px rgb(15 42 77 / 7%);
  --heading: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --body: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.65 var(--body); color: var(--ink); background: var(--cream); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--purple); }
img, svg { max-width: 100%; }
.wrap { max-width: 70rem; margin: 0 auto; padding: 0 22px; }
h1, h2, h3 { font-family: var(--heading); color: var(--purple); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
.block > .wrap > h2::before, .split h2::before { content: ''; display: block; width: 44px; height: 4px; background: var(--red); margin-bottom: 16px; }
.block.closing h2::before { margin-left: auto; margin-right: auto; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 14px; }
.intro { font-size: 1.1rem; color: var(--ink-soft); max-width: 46rem; }
.note { color: var(--ink-soft); font-size: 0.95rem; }
.hl { font-weight: 700; }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; background: rgb(10 28 51 / 94%); backdrop-filter: blur(10px); border-bottom: 1px solid #1d3b66; }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 400 1.5rem/1 'Alfa Slab One', 'Rockwell Extra Bold', 'Rockwell', Georgia, serif; letter-spacing: 0.02em; text-transform: uppercase; color: #f2231f; text-decoration: none; margin-right: auto; }
.brand:hover, .brand:focus-visible { color: #f2231f; }
.brand img { display: block; width: 36px; height: 36px; }
.brand .name span { color: #ffd21f; transition: color .15s; }
.brand:hover .name span, .brand:focus-visible .name span { color: #f2231f; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
nav a { color: #e4edf9; text-decoration: none; font-size: 0.97rem; font-weight: 700; }
nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
nav a.pill { border: 1px solid #3b5a86; border-radius: 999px; padding: 3px 13px; font-weight: 400; background: transparent; }
nav a.pill:hover { background: #12335d; text-decoration: none; }
nav a.cta { background: var(--accent); color: #fff; border-radius: 10px; padding: 10px 20px; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.9rem; }
nav a.cta:hover { background: #3d7fe0; color: #fff; text-decoration: none; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 26px; }
.button { display: inline-block; background: var(--accent); color: #fff; font: 600 0.95rem/1 var(--heading); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; padding: 17px 30px; border-radius: 10px; box-shadow: 0 6px 16px rgb(15 42 77 / 22%); transition: transform .15s, background .15s; }
.button:hover { background: #3d7fe0; color: #fff; transform: translateY(-2px); }
.actions > a:not(.button) { font-weight: 700; }

/* Hero */
.hero { overflow: hidden; background: radial-gradient(900px 460px at 92% -10%, #f2f7fd 0%, transparent 65%), linear-gradient(180deg, #d9e7f7 0%, #e6eef8 100%); border-bottom: 1px solid #cddbec; padding: 76px 0 88px; }
.hero .tagline { margin: -6px 0 22px; font-size: 0.98rem; color: var(--ink-soft); font-weight: 700; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
#get-started { scroll-margin-top: 70px; }
.hero .eyebrow { color: #111; }
.hero .eyebrow b { color: #f2231f; font-weight: inherit; }
.eyebrow { font: 600 0.8rem/1.4 var(--heading); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint-deep); margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 750; letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 36rem; }

/* The picture: a camera on a building at night that speaks to a person it sees */
.scene { container-type: inline-size; position: relative; max-width: 460px; margin-left: auto; width: 100%; }
.scene svg { width: 100%; height: auto; display: block; border-radius: 0; box-shadow: 0 24px 50px rgb(15 42 77 / 28%); }
.scene .moon { fill: #fff3c4; filter: drop-shadow(0 0 8px rgb(255 243 196 / 60%)); }
.scene .star { fill: #fff; animation: pulse 3.2s ease-in-out infinite; } .scene .star.t2 { animation-delay: .8s; } .scene .star.t3 { animation-delay: 1.7s; }
.scene .bld { fill: #162f48; } .scene .win { fill: #ffd98a; } .scene .win.off { fill: #2d5278; }
.scene .ground { fill: #122537; } .scene .curb { stroke: #2d5278; stroke-width: 3; }
.scene .plate { fill: #83a6c9; }
.scene .stem, .scene .joint { fill: #83a6c9; } .scene .joint { stroke: #4a79a8; stroke-width: 2; }
.scene .cable { fill: #3f6386; }
.scene .cam { fill: #f3f8ff; } .scene .shade { fill: #c7d9ec; }
.scene .seam { stroke: #c7d9ec; stroke-width: 2; }
.scene .visor { fill: #aec9e6; }
.scene .barrel { fill: #203b57; } .scene .glass { fill: #77ffe1; stroke: #17806e; stroke-width: 1.5; } .scene .glint { fill: #fff; }
.scene .rig { transform-origin: 196px 110px; animation: scan 13s infinite; }
.scene .beam { mix-blend-mode: screen; }
.scene .led { fill: #ff5d6c; animation: pulse 1.6s ease-in-out infinite; }
.scene .walker { animation: walk 13s ease-out infinite; }
.scene .shadow { fill: #0b1926; opacity: .45; }
.scene .runner { fill: #0b1926; filter: drop-shadow(0 0 1.2px #77ffe1) drop-shadow(0 0 1.2px #77ffe1); }
.scene .target { stroke: #ffe600; stroke-width: 2; fill: none; animation: detect 13s infinite; }
.bubble { position: absolute; background: rgb(255 255 255 / 70%); color: var(--purple); font: 600 3.2cqw/1.3 var(--heading); padding: 2.3cqw 3.6cqw; border-radius: 4cqw 4cqw 4cqw 1cqw; box-shadow: 0 10px 24px rgb(0 0 0 / 22%); max-width: 48%; text-align: left; animation-duration: 13s; animation-timing-function: ease-out; animation-iteration-count: infinite; animation-fill-mode: both; }
.bubble.one { left: 51%; top: 2%; animation-name: say-one; }
.bubble.two { left: 58%; top: 13.5%; background: rgb(255 242 166 / 70%); color: #1c334a; animation-name: say-two; }
.bubble.three { left: 50%; top: 25%; max-width: 47%; background: rgb(242 35 31 / 70%); color: #fff; animation-name: say-three; }
/* Each bubble pops in, stays, fades out with the other, and the cycle restarts. */
@keyframes env-in { 0%, 56.9% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.12); } 62.3%, 83% { opacity: 1; transform: none; } 89%, 100% { opacity: 0; transform: translateY(6px); } }
@keyframes print-up { 0%, 63.1% { opacity: 0; transform: translateY(104px); } 63.8% { opacity: 1; } 71.5%, 100% { opacity: 1; transform: none; } }
@keyframes say-one { 0%, 14.6% { opacity: 0; transform: translateY(10px) scale(.85); } 18.5%, 83% { opacity: 1; transform: none; } 89%, 100% { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes say-two { 0%, 23.1% { opacity: 0; transform: translateY(10px) scale(.85); } 26.9%, 83% { opacity: 1; transform: none; } 89%, 100% { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes say-three { 0%, 53.8% { opacity: 0; transform: translateY(10px) scale(.85); } 57.7%, 83% { opacity: 1; transform: none; } 89%, 100% { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
/* One 13 s story, in step with the speech bubbles: the camera tracks the person,
   then sweeps to the far side as the person walks out of the picture; the beam
   comes back and the person is there again where the loop starts. */
@keyframes scan { 0% { transform: rotate(0); } 15.4% { transform: rotate(3deg); } 30.8% { transform: rotate(-2deg); } 61.5% { transform: rotate(0); animation-timing-function: ease-in-out; } 81.5%, 90.8% { transform: rotate(-22deg); animation-timing-function: ease-in-out; } 97.7%, 100% { transform: rotate(0); } }
/* The box appears about a second and a half in, as if the camera has just spotted the person. */
@keyframes detect { 0%, 9.2% { opacity: 0; } 13.1%, 81.5% { opacity: 1; } 84.6%, 100% { opacity: 0; } }
@keyframes walk { 0% { transform: translateX(0); opacity: 1; } 61.5% { transform: translateX(0); animation-timing-function: ease-in; } 81.5% { transform: translateX(300px); opacity: 1; } 82.3% { transform: translateX(300px); opacity: 0; } 95.4% { transform: translateX(0); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }



/* The Gmail-style icon that arrives with the third bubble: it pops in and the
   letter with the snapshot of the scene rises out from behind it. */
.mailbox { position: absolute; left: 2%; bottom: 3%; width: 25cqw; line-height: 0; transform-origin: 50% 100%; animation: env-in 13s ease-out infinite both; }
.mailbox svg { width: 100%; height: auto; display: block; border-radius: 0; box-shadow: none; filter: drop-shadow(0 8px 14px rgb(0 0 0 / 40%)); }
.mailbox .print { animation: print-up 13s ease-out infinite both; }

/* Proof strip under the hero */
.strip { background: #fff; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; padding-top: 22px; padding-bottom: 22px; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 38px; }
.strip li { display: flex; align-items: baseline; gap: 10px; }
.strip li + li { border-left: 1px solid var(--line); padding-left: 38px; }
.strip strong { font: 700 1.9rem/1 var(--heading); color: var(--purple); }
.strip p { margin: 0; font-size: 0.8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }

/* Sections */
.block { padding: 88px 0; border-top: 1px solid var(--line); }
.block.closing { border-top: 0; }
.block.band-white { background: #fff; }
.block.band-pale { background: #e6eef8; border-top-color: #cddbec; }
.block.band-pale + .block.band-white { border-top-color: #cddbec; }
.block.band-pale .card, .block.band-pale .more, .block.band-pale .faq details, .block.band-pale table { border-color: #cddbec; }
.block > .wrap > h2 { margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 20px; margin-top: 26px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
@media (min-width: 62rem) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.card { background: #fff; border-radius: var(--radius); padding: 28px 26px 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; background: #e6effa; border-radius: 12px; margin-bottom: 16px; }
.icon svg { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Numbered steps */
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 64px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 20px; left: 26px; width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--purple-dark); font: 600 1rem/34px var(--heading); text-align: center; }
.steps.four { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

/* The escalation: what is said, in order, getting firmer */
.ladder { list-style: none; counter-reset: rung; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 16px; }
.ladder li { counter-increment: rung; position: relative; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--tone, var(--mint-deep)); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow); }
.ladder li:nth-child(1) { --tone: #2fbf9b; } .ladder li:nth-child(2) { --tone: #e9b43c; } .ladder li:nth-child(3) { --tone: #ec7a2f; } .ladder li:nth-child(4) { --tone: #d6453d; }
.ladder li::before { content: counter(rung); display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--tone); color: #fff; font: 600 1.05rem/38px var(--heading); text-align: center; margin-bottom: 12px; }
.ladder h3 { font-size: 1.05rem; margin-bottom: 8px; }
.ladder p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.ladder .say { color: var(--ink); font: 600 1.15rem/1.4 var(--heading); }

/* Pick a path */
.card.pick { display: block; text-decoration: none; color: inherit; padding: 30px; }
.card.pick h3 { font-size: 1.35rem; }
.card.pick span { color: var(--accent); font-weight: 700; }

/* Results */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
img.sign { justify-self: center; width: min(227px, 100%); height: auto; filter: drop-shadow(0 14px 22px rgb(15 42 77 / 28%)); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.stats li { background: var(--purple); color: #c8dbee; border-radius: var(--radius); padding: 20px 26px; display: flex; align-items: baseline; gap: 16px; }
.stats strong { font: 600 clamp(2rem, 4vw, 2.8rem)/1 var(--heading); color: var(--mint); }
.stats span { font-size: 1.05rem; }
.block > .wrap > .stats { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

/* Lists, tables, folded details */
ul.plain { padding: 0; margin: 14px 0; list-style: none; display: grid; gap: 10px; }
ul.plain li { position: relative; padding-left: 34px; }
ul.plain li::before { content: ''; position: absolute; left: 0; top: 0.35em; width: 20px; height: 20px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' fill='none' stroke='%23272537' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 1rem; }
th { background: var(--purple); color: #fff; text-align: left; font: 600 0.95rem/1.3 var(--heading); }
th, td { padding: 14px 18px; }
td { border-top: 1px solid var(--line); vertical-align: top; }
.more { margin-top: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.more + p { margin-top: 26px; }
ul + p.intro { margin-top: 28px; }
.more summary, .faq summary { cursor: pointer; list-style: none; font: 600 1.05rem/1.4 var(--heading); color: var(--purple); padding: 18px 56px 18px 24px; position: relative; }
.more summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.more summary::after, .faq summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--accent); font: 600 1.3rem/30px var(--heading); text-align: center; }
.more[open] > summary::after, .faq details[open] > summary::after { content: '–'; }
.more-body { padding: 0 24px 24px; }
.more-body .grid { margin-top: 8px; }
.faq { display: grid; gap: 12px; margin-top: 24px; max-width: 50rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--ink-soft); }

/* Closing call to action */
.block.closing { background: linear-gradient(135deg, #0a1c33 0%, #0f2a4d 100%); color: #d3e0f2; text-align: center; border-top: 0; }
.block.closing h2 { color: #fff; }
.block.closing .actions { justify-content: center; }
.block.closing .button { background: var(--accent); color: #fff; box-shadow: none; }
.block.closing .button:hover { background: #3d7fe0; color: #fff; }
.block.closing a:not(.button) { color: var(--mint); }
.block.closing .note { color: #b7c9e3; margin-top: 22px; }
.block.closing .intro { color: #d3e0f2; margin-left: auto; margin-right: auto; }

/* Footer */
footer.bottom { text-align: center; background: var(--purple-dark); color: #b6c3cf; padding: 34px 0 40px; font-size: 0.95rem; }
footer.bottom p { margin: 4px 0; }
footer.bottom a { color: var(--mint); }

/* Not found */
.lost { padding: 90px 0; text-align: center; }

@media (max-width: 52rem) {
  body { font-size: 17px; }
  .hero { padding: 40px 0 52px; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .scene { margin: 8px auto 0; max-width: 360px; }
  .block { padding: 46px 0; }
  header.top { position: static; }
  header.top .wrap { justify-content: center; }
  .brand { margin-right: 0; width: 100%; justify-content: center; }
  nav { justify-content: center; }
  .button { width: 100%; text-align: center; }
  .actions { flex-direction: column; align-items: stretch; text-align: center; }
  .ladder li { grid-template-columns: 44px 1fr; padding: 16px; }
  th, td { padding: 11px 12px; }
}

/* Results chart */
.chart { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 16px; text-align: center; }
.chart svg { width: 100%; max-width: 360px; height: auto; }
.chart .axis { stroke: var(--line); stroke-width: 3; }
.chart .before { fill: #d6453d; } .chart .after { fill: #2fbf9b; }
.chart .num { font: 600 26px var(--heading); fill: var(--purple); } .chart .num.good { fill: var(--mint-deep); }
.chart figcaption { color: var(--ink-soft); font-size: 0.95rem; margin-top: 6px; }


/* Fade in on scroll (only when script runs) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .scene .rig, .scene .walker, .scene .target, .scene .led, .scene .star, .bubble, .mailbox, .mailbox .print { animation: none; } }

/* Always-visible pricing button on phones */
.sticky-cta { display: none; }
@media (max-width: 52rem) {
  .sticky-cta { display: block; position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 14px; text-align: center; background: var(--accent); color: #fff; text-transform: uppercase; letter-spacing: 0.04em; font: 600 1rem/1 var(--heading); padding: 16px; border-radius: 12px; text-decoration: none; box-shadow: 0 10px 26px rgb(0 0 0 / 30%); }
  .sticky-cta:hover { color: #fff; }
  footer.bottom { padding-bottom: 90px; }
  .strip .wrap { justify-content: center; text-align: center; }
  .strip ul { justify-content: center; }
  .strip li + li { border-left: 0; padding-left: 0; }
}

/* Case study */
.case-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 8px; }
.back { font-weight: 700; text-decoration: none; }
.back:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 34rem; }
td.neg { color: #b3261e; font-weight: 700; }
td.mix { color: #946200; font-weight: 700; }
td.pos { color: #1b8a4b; font-weight: 700; }
img.chart-image { display: block; width: 100%; max-width: 46rem; height: auto; margin: 22px 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.case-head .stats { margin-top: 22px; }


/* Calm, professional layer */
.block.dark { background: linear-gradient(180deg, #0a1c33 0%, #0f2a4d 100%); color: #c9d8ed; border-top: 0; }
.block.dark h2, .block.dark h3 { color: #fff; }
.block.dark .intro, .block.dark .note { color: #b7c9e3; }
.block.dark .ladder li, .block.dark .card, .block.dark .more { background: #12335d; border-color: #24497a; box-shadow: none; }
.block.dark .ladder p, .block.dark .card p { color: #b7c9e3; }
.block.dark .ladder .say { color: #fff; }
.block.dark .more summary { color: #fff; }
.block.dark .more summary::after { background: #1b4276; color: #fff; }
.block.dark .icon { background: #1b4276; }
.block.dark .icon svg { stroke: #8cc4ff; }


/* Cards that fit in one row bob gently, each a little out of step with its neighbour;
   a row too wide to fit drifts from right to left a little faster. Both stop while the
   pointer is on the row. Narrow screens and reduced motion keep cards still. */
@media (min-width: 52.01rem) and (prefers-reduced-motion: no-preference) {
  .grid:not(.marquee) > .card:not(.reveal), .grid:not(.marquee) > .card.reveal.in, .ladder > li:not(.reveal), .ladder > li.reveal.in {
    animation: bob 6s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -1s);
  }
  .grid:not(.marquee):hover > .card, .ladder:hover > li { animation-play-state: paused !important; }
  .grid > .card:nth-child(2), .ladder > li:nth-child(2) { --n: 1; }
  .grid > .card:nth-child(3), .ladder > li:nth-child(3) { --n: 2; }
  .grid > .card:nth-child(4), .ladder > li:nth-child(4) { --n: 3; }
  .grid > .card:nth-child(5), .ladder > li:nth-child(5) { --n: 4; }
  .grid > .card:nth-child(6), .ladder > li:nth-child(6) { --n: 5; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.marquee { display: block; overflow: hidden; padding: 12px 0 18px; margin-top: 14px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.marquee .track { display: flex; gap: 20px; width: max-content; animation: drift var(--seconds, 50s) linear infinite; animation-play-state: paused; }
.marquee.run .track { animation-play-state: running; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .set { display: flex; gap: 20px; flex: none; counter-reset: step; }
.marquee .card { flex: 0 0 19rem; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 10px)); } }
@media (max-width: 52rem) {
  .marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .marquee .track { display: block; width: auto; animation: none; }
  .marquee .set { display: grid; gap: 20px; }
  .marquee .set.clone { display: none; }
  .marquee .card { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }


/* The incident table counts down once it is in the middle of the screen: each period lights up in turn with its number enlarged; the last stays lit */
table.tally td { height: 4.6rem; vertical-align: middle; transition: background-color .35s ease; }
table.tally td:last-child { font-weight: 600; color: var(--purple); transform-origin: left center; transition: font-size .45s ease, color .35s ease; }
table.tally tbody tr { transition: background-color .35s ease; }
table.tally tbody tr.on { background: #fff1a8; }
table.tally tbody tr.on td:last-child { font-size: 2.3rem; line-height: 1; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { table.tally td, table.tally td:last-child, table.tally tbody tr { transition: none; } }

/* The resident-sentiment table plays the same way: each row lights up in turn and its sentiment word grows; the last row stays lit */
table.tally.sentiment td { height: auto; }
table.tally.sentiment td:last-child { font-weight: 400; color: inherit; }
table.tally.sentiment tbody tr.on td:last-child { font-size: inherit; font-weight: 400; line-height: inherit; }
table.tally.sentiment td.neg, table.tally.sentiment td.mix, table.tally.sentiment td.pos { transition: font-size .4s ease; }
table.tally.sentiment tbody tr.on td.neg, table.tally.sentiment tbody tr.on td.mix, table.tally.sentiment tbody tr.on td.pos { font-size: 1.55rem; line-height: 1.1; }

/* Fixed columns for the sentiment table: the date and the sentiment word never wrap, so rows keep their height as they light up */
.table-wrap table.tally.sentiment { table-layout: fixed; min-width: 56rem; }
table.tally.sentiment th:nth-child(1) { width: 9.5rem; }
table.tally.sentiment th:nth-child(2) { width: 11rem; }
table.tally.sentiment th:nth-child(3) { width: 13.5rem; }
table.tally.sentiment td:nth-child(1), table.tally.sentiment td:nth-child(3), table.tally.sentiment th { white-space: nowrap; }

/* The longer navigation labels still fit on one line down to a narrow laptop window */
@media (min-width: 52.01rem) and (max-width: 72rem) {
  header.top .wrap { gap: 6px 14px; }
  nav { gap: 4px 14px; }
  nav a { font-size: 0.88rem; }
  nav a.cta { padding: 9px 14px; font-size: 0.82rem; }
}

/* Animated deterrence icons, drawn straight on the page: a horn speaker that sends out warning arcs, and a PTZ camera with a blinking red LED */
.power { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.power .tile { width: 132px; height: 132px; display: grid; place-items: center; }
.power svg { width: 128px; height: 128px; fill: none; stroke: var(--purple); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }







/* The security camera is the owner's own animation (source/camera-wynnmex.gif): its corner logo removed and its red LED made to blink slowly (tools/blink-red-led.py) */
.power .tile.cam { width: 252px; height: 145px; }
.power .tile.cam img { width: 252px; height: 145px; mix-blend-mode: multiply; filter: brightness(1.017); }

/* The horn speaker is the owner's photo (source/speaker-original.webp); flat red lightning bolts fan out of its mouth and blink on and off, like the owner's important.gif */
.power .tile.horn-tile { width: 184px; height: 133px; }
.power .tile.horn-tile svg { width: 184px; height: 133px; stroke: none; overflow: visible; }
.power .horn-tile image { mix-blend-mode: multiply; }

@media (min-width: 52.01rem) { .power { flex-wrap: nowrap; } }

.power .bolts path { fill: var(--red); stroke: none; }
.power .bolts { animation: bolts 1.4s steps(1, end) infinite; }
@keyframes bolts { 0% { opacity: 1; } 48% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .power .bolts { animation: none; opacity: 1; } }
