/* f1factory.si */

/* Nunito Sans: the "FACTORY" typeface from the logo (self-hosted, SIL OFL) */
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-sans-latin.woff2") format("woff2");
}

:root {
  --bg: #f6f5ef;
  --ink: #000000;
  --ink-soft: rgba(0, 0, 0, .6);
  --ink-mute: rgba(0, 0, 0, .4);
  --line: rgba(0, 0, 0, .12);
  --violet: #5e17eb;
  --mint: #57d99b;
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-brand: var(--font);
}

/* Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
main { flex: 1 0 auto; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2 { margin: 0 0 .6em; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
p { margin: 0 0 1.1em; }

.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  padding: 8px 14px; background: var(--ink); color: var(--bg);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }

/* Small labels: logo typeface, no caps */
.eyebrow, .more a, .back a, .post-meta {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
}

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

/* Header: centred logo + nav ------------------------------------- */
.site-header {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 32px 16px 20px;
}
/* Account links, top-right corner */
.account-links {
  position: absolute; top: 20px; right: 24px;
  display: flex; align-items: center; gap: 16px;
}
/* Header: logo typeface, lowercase */
.site-nav a, .account-links a { font-family: var(--font-brand); font-weight: 700; letter-spacing: 0; }
.account-links a {
  font-size: 15px;
  color: var(--ink); text-decoration: none; transition: color .3s, background .3s, border-color .3s;
}
.account-links a:hover { color: var(--violet); }
.account-links .account-signup {
  padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 999px;
}
.account-links .account-signup:hover { border-color: var(--violet); }
.account-links [hidden] { display: none; }
@media (max-width: 600px) {
  .site-header { padding-top: 52px; }
  .account-links { top: 12px; right: 12px; gap: 10px; }
  .account-links a { font-size: 13px; }
  .account-links .account-signup { padding: 5px 10px; }
}
.logo img { width: auto; height: 76px; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px;
}
.site-nav a {
  display: block; padding: 4px 0;
  font-size: 18px;
  text-decoration: none; color: var(--ink);
  transition: color .3s;
}
.site-nav a:hover { color: var(--violet); }
/* Current page: the text keeps its colour, circled with our hand-drawn line (violet + mint), drawn in */
.site-nav a { position: relative; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: -16px; right: -16px; top: -6px; bottom: -6px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 104 44' preserveAspectRatio='none'%3E%3Cpath d='M15 8.1 C15.8 7.8 18.2 7 19.8 6.6 C21.4 6.1 23 5.8 24.6 5.5 C26.3 5.1 27.9 4.9 29.6 4.6 C31.2 4.4 32.9 4.1 34.5 3.9 C36.2 3.8 37.8 3.6 39.5 3.5 C41.2 3.4 42.8 3.3 44.5 3.3 C46.1 3.2 47.8 3.2 49.5 3.3 C51.1 3.4 52.8 3.5 54.5 3.7 C56.1 3.9 57.8 4.1 59.4 4.4 C61.1 4.6 62.7 4.9 64.4 5.1 C66 5.4 67.7 5.7 69.3 5.9 C70.9 6.2 72.6 6.5 74.2 6.8 C75.9 7.1 77.5 7.4 79.1 7.7 C80.8 8 82.4 8.4 84 8.8 C85.6 9.3 87.2 9.7 88.7 10.4 C90.3 11 91.8 11.7 93.2 12.7 C94.5 13.7 96 14.8 96.7 16.2 C97.4 17.5 97.9 19.5 97.6 20.9 C97.3 22.4 96.2 24 95 25.1 C93.9 26.2 92.3 27 90.8 27.7 C89.3 28.4 87.7 28.9 86.1 29.4 C84.5 29.9 82.9 30.3 81.3 30.7 C79.6 31.1 78 31.5 76.4 31.9 C74.8 32.3 73.2 32.6 71.5 32.9 C69.9 33.3 68.2 33.6 66.6 33.8 C64.9 34 63.3 34.2 61.6 34.4 C60 34.5 58.3 34.7 56.6 34.8 C55 34.9 53.3 35 51.6 35 C50 35 48.3 35 46.6 35 C45 34.9 43.3 34.9 41.7 34.8 C40 34.7 38.3 34.6 36.7 34.5 C35 34.3 33.3 34.2 31.7 33.9 C30 33.7 28.4 33.5 26.8 33.1 C25.1 32.8 23.5 32.5 21.9 32.1 C20.3 31.7 18.7 31.2 17.1 30.7 C15.5 30.2 13.9 29.7 12.4 29 C10.8 28.4 9.3 27.7 7.9 26.8 C6.6 25.8 5 24.8 4.2 23.5 C3.4 22.1 2.9 20.2 3.2 18.7 C3.4 17.3 4.7 15.8 5.8 14.6 C6.9 13.4 8.5 12.6 9.9 11.8 C11.4 11 13 10.4 14.5 9.9 C16.1 9.4 17.7 9 19.4 8.6 C21 8.2 22.6 7.8 24.2 7.5 C25.9 7.2 27.5 6.9 29.2 6.6 C30.8 6.3 32.4 6 34.1 5.8 C35.7 5.5 37.4 5.2 39 4.9 C40.7 4.7 42.3 4.4 44 4.2 C45.6 4 47.3 3.8 48.9 3.6 C50.6 3.5 52.8 3.5 53.9 3.4 C55.1 3.4 55.5 3.4 55.8 3.4' fill='none' stroke='%2357d99b' stroke-width='2.2' stroke-linecap='round' transform='translate(1.2 1.4)' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M15 8.1 C15.8 7.8 18.2 7 19.8 6.6 C21.4 6.1 23 5.8 24.6 5.5 C26.3 5.1 27.9 4.9 29.6 4.6 C31.2 4.4 32.9 4.1 34.5 3.9 C36.2 3.8 37.8 3.6 39.5 3.5 C41.2 3.4 42.8 3.3 44.5 3.3 C46.1 3.2 47.8 3.2 49.5 3.3 C51.1 3.4 52.8 3.5 54.5 3.7 C56.1 3.9 57.8 4.1 59.4 4.4 C61.1 4.6 62.7 4.9 64.4 5.1 C66 5.4 67.7 5.7 69.3 5.9 C70.9 6.2 72.6 6.5 74.2 6.8 C75.9 7.1 77.5 7.4 79.1 7.7 C80.8 8 82.4 8.4 84 8.8 C85.6 9.3 87.2 9.7 88.7 10.4 C90.3 11 91.8 11.7 93.2 12.7 C94.5 13.7 96 14.8 96.7 16.2 C97.4 17.5 97.9 19.5 97.6 20.9 C97.3 22.4 96.2 24 95 25.1 C93.9 26.2 92.3 27 90.8 27.7 C89.3 28.4 87.7 28.9 86.1 29.4 C84.5 29.9 82.9 30.3 81.3 30.7 C79.6 31.1 78 31.5 76.4 31.9 C74.8 32.3 73.2 32.6 71.5 32.9 C69.9 33.3 68.2 33.6 66.6 33.8 C64.9 34 63.3 34.2 61.6 34.4 C60 34.5 58.3 34.7 56.6 34.8 C55 34.9 53.3 35 51.6 35 C50 35 48.3 35 46.6 35 C45 34.9 43.3 34.9 41.7 34.8 C40 34.7 38.3 34.6 36.7 34.5 C35 34.3 33.3 34.2 31.7 33.9 C30 33.7 28.4 33.5 26.8 33.1 C25.1 32.8 23.5 32.5 21.9 32.1 C20.3 31.7 18.7 31.2 17.1 30.7 C15.5 30.2 13.9 29.7 12.4 29 C10.8 28.4 9.3 27.7 7.9 26.8 C6.6 25.8 5 24.8 4.2 23.5 C3.4 22.1 2.9 20.2 3.2 18.7 C3.4 17.3 4.7 15.8 5.8 14.6 C6.9 13.4 8.5 12.6 9.9 11.8 C11.4 11 13 10.4 14.5 9.9 C16.1 9.4 17.7 9 19.4 8.6 C21 8.2 22.6 7.8 24.2 7.5 C25.9 7.2 27.5 6.9 29.2 6.6 C30.8 6.3 32.4 6 34.1 5.8 C35.7 5.5 37.4 5.2 39 4.9 C40.7 4.7 42.3 4.4 44 4.2 C45.6 4 47.3 3.8 48.9 3.6 C50.6 3.5 52.8 3.5 53.9 3.4 C55.1 3.4 55.5 3.4 55.8 3.4' fill='none' stroke='%235e17eb' stroke-width='2.2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  animation: hand-line-draw .9s cubic-bezier(.5, .1, .35, 1) .3s both;
}
@keyframes hand-line-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (max-width: 480px) {
  .site-header { padding-top: 50px; gap: 14px; }
  .logo img { height: 60px; }
  .site-nav ul { gap: 6px 16px; }
  .site-nav a { font-size: 16px; }
}
@media (max-width: 374px) {
  .site-nav ul { gap: 6px 12px; }
  .site-nav a { font-size: 15px; }
}

/* Footer ---------------------------------------------------------- */
.site-footer {
  margin-top: 40px;
  padding: 56px 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 1rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 32px;
  max-width: 1100px; margin: 0 auto;
}
.footer-logo img { width: auto; height: 56px; }
.footer-brand p { margin: 14px 0 0; max-width: 220px; color: var(--ink); font-size: .92rem; }
.footer-title {
  margin: 0 0 14px;
  font-size: 17px; font-weight: 800; color: var(--violet);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; line-height: 1.4; }
.footer-col a, .footer-link-btn { font-weight: 600; color: var(--ink); text-decoration: none; transition: color .3s; }
.footer-col a:hover, .footer-link-btn:hover { color: var(--violet); }
.footer-link-btn { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px;
  max-width: 1100px; margin: 44px auto 0; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ink); text-decoration: none; transition: color .3s; }
.footer-bottom a:hover { color: var(--violet); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}
/* Phones: accordion. Each group is one row; tapping its title opens the links (main.js).
   Everything black, no logo block (the header already has the logo). */
@media (max-width: 767px) {
  .site-footer { padding: 24px 32px 28px; } /* wider side margins on phones */
  .footer-grid { display: block; }
  .footer-brand { display: none; }
  .footer-col { border-bottom: 1px solid var(--line); }
  .footer-col:last-child { border-bottom: 0; } /* the line above the copyright closes the list */
  .footer-col .footer-title {
    position: relative; margin: 0; padding: 18px 32px 18px 0;
    font-size: 17px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none;
  }
  .footer-col .footer-title::after {
    content: ""; position: absolute; right: 4px; top: 50%; width: 18px; height: 12px; margin-top: -6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 14'%3E%3Cpath d='M2.5 3.2 C5.4 5.9 8.2 8.4 10.2 10.6 C12.6 8 15.2 5.6 17.6 2.6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain; transition: transform .3s;
  }
  .footer-col.is-open .footer-title::after { transform: rotate(180deg); }
  .footer-col .footer-title:focus-visible { outline-offset: 2px; }
  .footer-col ul { display: none; padding-bottom: 16px; }
  .footer-col.is-open ul { display: block; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; } /* copyright and email centred */
}
@media (max-width: 480px) {
  .site-footer { padding: 24px 32px 28px; }
}

/* Footer email: small menu with "copy" and "write in Gmail" */
.email-wrap { position: relative; display: inline-block; }
.email-menu {
  position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 20;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 210px; padding: 6px;
  background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35);
}
.email-menu[hidden] { display: none; }
.site-footer .email-menu button,
.site-footer .email-menu a {
  display: block; width: 100%; padding: 11px 12px;
  border: 0; border-radius: 0; background: none;
  font: inherit; font-size: 15px; font-weight: 600;
  color: var(--ink); text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .2s, color .2s;
}
.site-footer .email-menu button:hover,
.site-footer .email-menu a:hover,
.site-footer .email-menu button:focus-visible,
.site-footer .email-menu a:focus-visible { background: var(--bg); color: var(--violet); }
@media (max-width: 767px) {
  .email-menu { right: auto; left: 50%; transform: translateX(-50%); } /* centred under the centred email */
}

/* Text links ------------------------------------------------------ */
.more { margin-top: 2.5em; }
.more a, .back a { /* plain violet text link, no decorative line */
  text-decoration: none; color: var(--violet);
  text-underline-offset: 4px;
  transition: color .3s;
}
.back a:hover { text-decoration: underline; }
/* "See what we do" style links: bigger, with a plain violet underline */
.more a {
  position: relative; display: inline-block; padding-bottom: 6px;
  font-size: 18px; font-weight: 800;
}
.more a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform-origin: left center;
  transition: transform .8s cubic-bezier(.5, .1, .35, 1);
}
/* Under a treasure map the underline draws itself left to right once the finale
   scribble has finished drawing (2.1 s after it shows up). Without :has() it is just shown. */
section:has([data-trail].is-animated) .map-more a::after { transform: scaleX(0); }
section:has(.stop-treasure.is-visible, .trail-treasure.is-visible) .map-more a::after { transform: scaleX(1); transition-delay: 2.1s; }

/* Home hero: phone with video (landscape on desktop, portrait on mobile) */
.hero {
  display: flex; align-items: center; justify-content: center;
  min-height: min(620px, calc(100svh - 200px));
  padding: 48px 24px 40px;
}
.phone {
  --bezel: clamp(8px, 1.3vw, 14px);
  --radius: clamp(30px, 5vw, 58px);
  position: relative;
  width: min(900px, 100%);
  aspect-ratio: 19.5 / 9;
  padding: var(--bezel);
  border-radius: var(--radius);
  background: #0b0b0b;
  box-shadow:
    inset 0 0 0 2px #2b2b2b,
    0 50px 90px -45px rgba(0, 0, 0, .55);
}
/* Dynamic Island */
.phone::before {
  content: ""; position: absolute; z-index: 2;
  left: calc(var(--bezel) + 12px); top: 50%;
  width: clamp(12px, 2vw, 20px); height: 24%;
  transform: translateY(-50%);
  border-radius: 999px; background: #000;
}
/* Side button */
.phone::after {
  content: ""; position: absolute;
  top: -3px; left: 22%;
  width: 12%; height: 4px;
  border-radius: 4px 4px 0 0; background: #1a1a1a;
}
.phone-screen {
  width: 100%; height: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) - var(--bezel));
  background: #151515;
}
.phone-screen video { width: 100%; height: 100%; object-fit: cover; }
.phone { animation: phone-in 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes phone-in {
  from { opacity: 0; transform: translateY(48px) rotate(-3deg) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
  .hero { min-height: 0; padding: 36px 16px 48px; }
  .phone {
    --bezel: 10px;
    --radius: 44px;
    width: min(240px, 62vw);
    aspect-ratio: 9 / 19.5;
  }
  .phone::before { left: 50%; top: calc(var(--bezel) + 10px); width: 32%; height: 22px; transform: translateX(-50%); }
  .phone::after { top: 22%; left: auto; right: -3px; width: 4px; height: 12%; border-radius: 0 4px 4px 0; }
}

/* Home: full-screen video hero with the header on top of it ------------ */
.hero-full { position: relative; height: 100vh; height: 100svh; min-height: 480px; overflow: hidden; background: #000; }
.hero-full video { width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* soft shade at the top so the white menu stays readable on any frame */
.hero-full::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 320px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .7), rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, 0));
}
/* scroll cue at the bottom of the video, visible on the first screen */
.hero-arrow { position: absolute; left: 50%; bottom: 20px; z-index: 2; margin-left: -31px; }
.hero-arrow .fg path { stroke: #fff; }
.hero-arrow svg { filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .5)); }
.site-header--over { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.site-header--over .site-nav a,
.site-header--over .account-links a { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.site-header--over .account-links .account-signup { border-color: #fff; }
.site-header--over .site-nav a:hover,
.site-header--over .account-links a:hover { color: var(--violet); }
.site-header--over .account-links .account-signup:hover { border-color: var(--violet); }

/* Home: treasure map ---------------------------------------------- */
.map { padding-top: 88px; padding-bottom: 112px; } /* the scroll arrow now sits on the video above */
.map-intro { text-align: center; margin-bottom: 64px; }
.map-intro .scroll-arrow { display: inline-block; margin: -16px 0 28px; }
.map-intro h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }

.map-route { --trail-mode: row; --trail-gap: 8; position: relative; } /* gap: px between the route and each marker */
.map-route .stop-marker { position: relative; z-index: 1; }
.map-stops {
  position: relative;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 20px;
}
.stop-link {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; text-decoration: none;
}
.stop-marker {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 2px solid var(--ink); border-radius: 50%;
  background: var(--bg);
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.stop:nth-child(odd) .stop-link { margin-top: 16px; }
.stop:nth-child(even) .stop-link { margin-top: 96px; }
.stop-name {
  margin-top: 20px;
  font-family: var(--font-brand); font-size: 16px; font-weight: 700;
}
.stop-text { margin-top: 10px; font-size: .92rem; line-height: 1.55; color: var(--ink); }
a.stop-link:hover .stop-marker { border-color: var(--violet); color: var(--violet); transform: scale(1.08); }
a.stop-link:hover .stop-name { color: var(--violet); }

.stop-treasure .stop-link { margin-top: 0 !important; }
.stop-treasure .stop-marker { /* the finale: the scribble from the logo, big on purpose */
  width: 150px; height: auto; border: 0; border-radius: 0; background: none;
  transform: rotate(-8deg);
}
.stop-treasure a.stop-link:hover .stop-marker { background: none; transform: rotate(4deg) scale(1.08); }
.stop-treasure .stop-name { margin-top: 12px; color: var(--violet); }

.map-more { text-align: center; margin-top: 72px; }

@media (max-width: 899px) {
  .map { padding-bottom: 56px; }
  .map-more { margin-top: 36px; }
  .map-intro { margin-bottom: 48px; }
  .map-route { --trail-mode: v; }
  .map-stops { grid-template-columns: 1fr; gap: 0; max-width: 420px; margin: 0 auto; }
  .stop .stop-link,
  .stop:nth-child(odd) .stop-link,
  .stop:nth-child(even) .stop-link {
    display: grid; grid-template-columns: 48px 1fr; column-gap: 20px;
    align-items: start; text-align: left; margin-top: 0; padding-bottom: 36px;
  }
  .stop-marker { grid-row: span 2; position: relative; }
  .stop-name { margin-top: 14px; }
  .stop-text { margin-top: 6px; }
  .stop-treasure .stop-link { padding-bottom: 0; }
  .stop-treasure .stop-marker { width: 88px; max-width: none; margin-left: -20px; } /* centred on the route, text stays aligned */
  .stop-treasure .stop-name { margin-top: 10px; }
}

/* Page intro ------------------------------------------------------ */
.page-intro { padding-top: clamp(40px, 8vw, 96px); padding-bottom: 16px; text-align: center; }
.eyebrow { margin: 0 0 1.4em; color: var(--violet); }
.lead { max-width: 560px; margin-left: auto; margin-right: auto; color: var(--ink); font-size: 1.1rem; }

.prose { padding-top: 24px; padding-bottom: 96px; }
.prose p, .prose li { color: var(--ink); }
.prose h2 { margin-top: 1.8em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--violet); }
.prose a:not(.more a) { color: var(--violet); }

/* About ----------------------------------------------------------- */
.about-statement {
  position: relative;
  max-width: 900px;
  padding-top: 32px; padding-bottom: 96px;
  text-align: center;
}
.about-statement p {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 500; line-height: 1.35; letter-spacing: -.01em;
  text-wrap: balance;
}
/* Highlight: strong brand colour, no background (violet on #f6f5ef = 6.9:1, WCAG AA) */
.hl { color: var(--violet); font-weight: 800; }
/* Features and service pages: factory names in black (2026-10-09) */
.factory h2 .hl, .service-title .hl { color: var(--ink); }
/* inside running text it is also larger */
.about-statement .hl { font-size: 1.15em; }
@media (max-width: 767px) {
  .about-statement { padding-bottom: 64px; }
  .about-statement p { font-size: 6vw; }
}

/* About: treasure trail running downwards -------------------------- */
.trail-intro { display: flex; justify-content: center; margin: -32px 0 40px; }
.scroll-arrow { display: block; padding: 8px 16px; color: var(--violet); animation: arrow-nudge 1.8s ease-in-out infinite; }
.scroll-arrow svg { display: block; overflow: visible; }
.scroll-arrow path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hand-drawn icons, style of the logo scribble: violet line + mint shadow */
.sh path { stroke: var(--mint); }
.fg path { stroke: var(--violet); }
.arrow {
  display: inline-block; flex-shrink: 0;
  width: 22px; height: 12px; vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 17'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M2 8.6 C8 7.4 14 9.4 25.5 7.9'/%3E%3Cpath d='M19.5 2.6 C22 4.6 24.3 6.3 26.6 7.9 C24.1 9.7 21.9 11.6 19.9 13.8'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M2 8.6 C8 7.4 14 9.4 25.5 7.9'/%3E%3Cpath d='M19.5 2.6 C22 4.6 24.3 6.3 26.6 7.9 C24.1 9.7 21.9 11.6 19.9 13.8'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.arrow-back { margin-right: .5em; transform: scaleX(-1); }

/* Living-drawing animation ("line boil"): the hand-drawn lines redraw
   themselves slightly every 150 ms, like a hand-animated doodle.
   Inline SVGs use <animate> (paused by main.js with reduced motion);
   small arrows and the FAQ chevron boil on hover. */
@keyframes boil-arrow {
  0% { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 17'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M2 8.6 C8 7.4 14 9.4 25.5 7.9'/%3E%3Cpath d='M19.5 2.6 C22 4.6 24.3 6.3 26.6 7.9 C24.1 9.7 21.9 11.6 19.9 13.8'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M2 8.6 C8 7.4 14 9.4 25.5 7.9'/%3E%3Cpath d='M19.5 2.6 C22 4.6 24.3 6.3 26.6 7.9 C24.1 9.7 21.9 11.6 19.9 13.8'/%3E%3C/g%3E%3C/svg%3E"); }
  33.3% { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 17'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M1.7 8.9 C8.2 7.2 14 9.4 25.6 8.2'/%3E%3Cpath d='M19.9 3 C21.6 4.2 24.6 6.5 26.8 7.7 C24.2 9.8 22 11.3 19.8 13.7'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M1.7 8.9 C8.2 7.2 14 9.4 25.6 8.2'/%3E%3Cpath d='M19.9 3 C21.6 4.2 24.6 6.5 26.8 7.7 C24.2 9.8 22 11.3 19.8 13.7'/%3E%3C/g%3E%3C/svg%3E"); }
  66.6% { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 17'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M1.8 8.6 C7.9 7.5 14.1 9 25.1 8.2'/%3E%3Cpath d='M19.3 2.2 C21.9 4.3 23.9 6.2 27 8.2 C24.3 9.4 21.9 11.4 19.6 13.4'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M1.8 8.6 C7.9 7.5 14.1 9 25.1 8.2'/%3E%3Cpath d='M19.3 2.2 C21.9 4.3 23.9 6.2 27 8.2 C24.3 9.4 21.9 11.4 19.6 13.4'/%3E%3C/g%3E%3C/svg%3E"); }
}
@keyframes boil-chevron {
  0% { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 14'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M2.5 3.2 C5.4 5.9 8.2 8.4 10.2 10.6 C12.6 8 15.2 5.6 17.6 2.6'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M2.5 3.2 C5.4 5.9 8.2 8.4 10.2 10.6 C12.6 8 15.2 5.6 17.6 2.6'/%3E%3C/g%3E%3C/svg%3E"); }
  33.3% { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 14'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M2.6 3.4 C5.6 6.3 8.4 8.7 9.8 10.6 C13 8.1 15.5 5.3 17.6 2.4'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M2.6 3.4 C5.6 6.3 8.4 8.7 9.8 10.6 C13 8.1 15.5 5.3 17.6 2.4'/%3E%3C/g%3E%3C/svg%3E"); }
  66.6% { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 14'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M2.7 3.5 C5.4 5.7 7.8 8.5 10.2 10.8 C12.5 8.2 15 5.8 17.8 2.5'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M2.7 3.5 C5.4 5.7 7.8 8.5 10.2 10.8 C12.5 8.2 15 5.8 17.8 2.5'/%3E%3C/g%3E%3C/svg%3E"); }
}
a:hover .arrow { animation: boil-arrow .45s steps(1) infinite; }
.faq summary:hover::after { animation: boil-chevron .45s steps(1) infinite; }
@keyframes arrow-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

.trail-section { padding-bottom: 112px; }
.trail {
  --trail-mode: h;
  --trail-gap: 8; /* px between the route and each marker */
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-top: 8px;
}
.trail-path {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
/* Solid hand-drawn route, style of the logo scribble: violet line + mint shadow */
.trail-path path {
  fill: none;
  stroke: var(--trail-stroke, var(--violet));
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* the shadow copy (<use>) inherits these, the browser does not restyle its clone */
.trail-shadow { --trail-stroke: var(--mint); fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trail .stop-marker,
.trail-marker { position: relative; z-index: 1; }

/* Scroll animation (switched on by main.js, never with reduced motion) */
.trail-path .trail-mask path { fill: none; stroke: #fff; stroke-width: 14; stroke-linecap: round; }
[data-trail].is-animated [data-trail-node] { opacity: 0; transition: opacity .6s ease; }
[data-trail].is-animated [data-trail-node].is-visible { opacity: 1; }
[data-trail].is-animated .is-visible span.stop-marker,
[data-trail].is-animated .is-visible .start-dot { animation: stop-pop .55s ease-out; }
/* Finale scribble: drawn line by line when the route reaches it (violet first,
   then the mint shadow), then it keeps "boiling" like the other icons */
.scribble { overflow: visible; }
.scribble path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.scribble .sh { stroke: var(--mint); }
.scribble .fg { stroke: var(--violet); }
[data-trail].is-animated [data-trail-node] .scribble path { stroke-dashoffset: 1; }
[data-trail].is-animated .is-visible .scribble .fg { animation: scribble-draw 1.8s cubic-bezier(.5, .1, .35, 1) forwards; }
[data-trail].is-animated .is-visible .scribble .sh { animation: scribble-draw 1.8s cubic-bezier(.5, .1, .35, 1) .3s forwards; }
.compass { transition: transform .2s linear; }
@keyframes stop-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes scribble-draw { to { stroke-dashoffset: 0; } }

.compass {
  position: absolute; top: 0; right: 0;
  width: 84px; height: 84px;
  overflow: visible;
  transform: rotate(12deg);
}
.compass path { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.compass text { font: 700 11px var(--font); fill: var(--violet); letter-spacing: .1em; }

.trail-start { display: flex; flex-direction: column; align-items: center; margin-bottom: 64px; }
.start-dot { /* outline only, like the other markers (page background hides the route under it) */
  display: block; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--violet); background: var(--bg);
}
.trail-start .stop-name { margin-top: 16px; color: var(--violet); }

.trail-stops {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 80px;
}
.trail-stop {
  display: flex; flex-direction: column; align-items: center;
  width: min(280px, 45%);
  text-align: center;
}
/* Desktop: stops scattered like on a hand-drawn map (sides still alternate,
   so the route never has to cross a description) */
@media (min-width: 900px) {
  .trail-stops { gap: 0; }
  .trail-stop:nth-child(1) { margin-left: 0; }
  .trail-stop:nth-child(2) { margin-left: 62%; margin-top: 8px; }
  .trail-stop:nth-child(3) { margin-left: 9%;  margin-top: 84px; }
  .trail-stop:nth-child(4) { margin-left: 54%; margin-top: 28px; }
  .trail-treasure { margin-left: 3%; margin-top: 104px; }
}

.trail-treasure {
  display: flex; flex-direction: column; align-items: center;
  width: min(280px, 45%); /* continues the zigzag on the left */
  margin: 96px 0 0;
  text-align: center; text-decoration: none;
}
.trail-treasure .trail-marker { width: 180px; height: auto; transform: rotate(-8deg); transition: transform .3s; }
.trail-treasure .stop-name { margin-top: 14px; color: var(--violet); }
.trail-treasure:hover .trail-marker { transform: rotate(4deg) scale(1.08); }
.trail-treasure:hover .stop-text { color: var(--ink); }

@media (max-width: 899px) {
  .trail { --trail-mode: v; max-width: 420px; }
  .trail-section { padding-bottom: 56px; }
  .compass { display: none; }
  .trail-start,
  .trail-stop,
  .trail-treasure {
    position: relative;
    width: auto; align-self: stretch;
    display: block; min-height: 48px;
    margin: 0; padding-left: 104px;
    text-align: left;
  }
  .trail-start { margin-bottom: 56px; min-height: 18px; }
  .trail-stops { gap: 56px; }
  .trail-treasure { margin-top: 64px; }
  .trail-stop .stop-marker,
  .trail-marker { position: absolute; top: 0; }
  /* markers zigzag inside the lane on the left */
  .start-dot { left: 15px; }
  .trail-stop:nth-child(odd) .stop-marker { left: 0; }
  .trail-stop:nth-child(even) .stop-marker { left: 44px; }
  .trail-treasure .trail-marker { left: 0; width: 96px; }
  .trail-start .stop-name { display: block; margin-top: 0; line-height: 18px; }
  .trail .stop-name { display: block; margin-top: 12px; }
  .trail-treasure .stop-name { margin-top: 18px; }
  .trail .stop-text { display: block; }
}

/* Features -------------------------------------------------------- */
.features-intro .lead { color: var(--ink); }
.factory-index {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 36px;
}
.factory-index a { /* outlined like .btn: no fill, violet on hover */
  padding: 9px 18px;
  border: 1.5px solid var(--ink); border-radius: 0;
  font-family: var(--font-brand); font-size: 15px; font-weight: 700;
  color: var(--ink); text-decoration: none;
  transition: color .3s, border-color .3s, transform .3s;
}
.factory-index a span { margin-right: .3em; color: var(--violet); }
.factory-index a:hover { color: var(--violet); border-color: var(--violet); transform: translateY(-2px); }
/* Phones: two slim buttons per row; factory headings and buttons centred */
@media (max-width: 767px) {
  .factory-index { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 340px; margin-left: auto; margin-right: auto; }
  .factory-index a { padding: 6px 10px; border-width: 1px; font-size: 14px; text-align: center; white-space: nowrap; }
  .factory-index a:hover { transform: none; }
  .factory h2, .factory-lead { text-align: center; }
  .factory .btn-row { justify-content: center; }
}
.factories { max-width: 1040px; margin-top: 40px; scroll-margin-top: 16px; }
.factory {
  display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: center;
  padding: 80px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.factory:nth-child(even) .factory-art { order: 2; }
.factory-art { display: flex; justify-content: center; }
.factory-art svg { width: 100%; max-width: 250px; height: auto; overflow: visible; }
.factory-art .ln { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.factory h2 { font-size: min(clamp(1.8rem, 3.6vw, 2.6rem), 8vw); margin-bottom: .45em; }
.factory-lead { font-size: 1.15rem; font-weight: 500; margin-bottom: 1.4em; }
.ticks { list-style: none; margin: 0; padding: 0; color: var(--ink); }
.ticks li { padding: 11px 0; border-top: 1px solid var(--line); }

.features-cta {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: 80px; padding-bottom: 104px;
  border-top: 1px solid var(--line); max-width: 1040px;
}
.features-cta .cta-scribble { width: 120px; height: auto; margin-bottom: 20px; transform: rotate(-8deg); }
/* drawn like the finale on the map when the section scrolls into view */
.js-reveal [data-reveal] .cta-scribble path { stroke-dashoffset: 1; }
.js-reveal [data-reveal].is-in .cta-scribble .fg { animation: scribble-draw 1.8s cubic-bezier(.5, .1, .35, 1) .3s forwards; }
.js-reveal [data-reveal].is-in .cta-scribble .sh { animation: scribble-draw 1.8s cubic-bezier(.5, .1, .35, 1) .6s forwards; }
.features-cta h2 { font-weight: 500; }

@media (max-width: 767px) {
  .factory { grid-template-columns: 1fr; gap: 28px; padding: 56px 0; }
  .factory:nth-child(even) .factory-art { order: 0; }
  .factory-art svg { max-width: 150px; }
  .features-cta { padding-top: 56px; padding-bottom: 72px; }
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.features-cta .btn-row { justify-content: center; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: .7em;
  padding: 9px 18px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-family: var(--font-brand); font-size: 15px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background .3s, border-color .3s, color .3s, transform .3s;
}
/* Outline only: hover turns border and text violet, never a fill */
.btn:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-2px); }
.btn .arrow { transition: transform .3s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Service pages ---------------------------------------------------- */
.service-hero {
  display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center;
  max-width: 1040px;
  padding-top: clamp(32px, 6vw, 80px); padding-bottom: 72px;
}
.breadcrumb {
  margin-bottom: 22px;
  font-family: var(--font-brand); font-size: 15px; font-weight: 700;
  color: var(--ink);
}
.breadcrumb a { color: var(--violet); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.service-title { font-size: min(clamp(2rem, 5vw, 3.4rem), 8.6vw); margin-bottom: .5em; }
.service-hero .lead { margin: 0 0 .8em; font-size: 1.25rem; font-weight: 500; color: var(--ink); }
.service-hero-text > p:not(.lead) { color: var(--ink); max-width: 540px; }
.service-art svg { max-width: 320px; }

.service-section {
  display: grid; grid-template-columns: 220px 1fr; gap: 48px;
  max-width: 1040px;
  padding-top: 56px; padding-bottom: 56px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.section-label {
  margin: 8px 0 0;
  font-family: var(--font-brand); font-size: 16px; font-weight: 700;
  color: var(--violet);
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-num { /* big solid number, turns violet on hover */
  display: block; margin-bottom: 10px;
  font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -.02em;
  color: var(--ink);
  transition: color .3s, transform .3s;
}
.steps li:hover .step-num { color: var(--violet); transform: rotate(-4deg); }
.steps h3 { margin: 0 0 .35em; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink); font-size: .95rem; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 18px; height: 12px; margin-top: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 14'%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%2357d99b' transform='translate(1.2 1.4)'%3E%3Cpath d='M2.5 3.2 C5.4 5.9 8.2 8.4 10.2 10.6 C12.6 8 15.2 5.6 17.6 2.6'/%3E%3C/g%3E%3Cg fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' stroke='%235e17eb'%3E%3Cpath d='M2.5 3.2 C5.4 5.9 8.2 8.4 10.2 10.6 C12.6 8 15.2 5.6 17.6 2.6'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq summary:hover { color: var(--violet); }
.faq details p { margin: 0; padding: 0 40px 20px 0; color: var(--ink); }
.faq details a { color: var(--violet); }

.other-factories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.other-factories a {
  display: flex; align-items: center; gap: .6em;
  padding: 16px 0; border-top: 2px solid var(--ink);
  font-weight: 700; text-decoration: none;
  transition: color .3s, border-color .3s;
}
.other-factories a span:first-child { font-family: var(--font-brand); font-size: 15px; color: var(--violet); }
.other-factories a .arrow { margin-left: auto; transition: transform .3s; }
.other-factories a:hover { color: var(--violet); border-color: var(--violet); }
.other-factories a:hover .arrow { transform: translateX(4px); }

/* Floating illustration */
.service-art svg { animation: art-float 6s ease-in-out infinite; }
@keyframes art-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

/* Ticker band ("taśma") with the service name: WYŁĄCZONA,
   do ewentualnego powrotu jako Breaking News.
   To bring it back: remove this comment wrapper and paste this markup into the
   service page, between the .service-hero section and the .service-video section:
   <div class="ticker" aria-hidden="true">
     <div class="ticker-band">
       <div class="ticker-track"><span>SEO Factory</span> ... (the name 12 times) </div>
     </div>
   </div>
.ticker { overflow: hidden; padding: 28px 0; }
.ticker-band {
  width: 110vw; margin-left: -5vw;
  padding: 14px 0;
  background: var(--mint);
  transform: rotate(-2.5deg);
}
.ticker-track { display: flex; width: max-content; animation: ticker 28s linear infinite; }
.ticker-track span {
  padding-right: 1.1em;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem); font-weight: 800; line-height: 1.1;
  letter-spacing: .01em; white-space: nowrap;
}
.ticker-track span::after { content: "\2733"; margin-left: 1.1em; color: var(--ink); }
@keyframes ticker { to { transform: translateX(-50%); } }
*/

/* Video in a phone, like the home hero */
.service-video {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding: 72px 24px 96px;
}
.service-video .phone { animation: none; }

@media (max-width: 767px) {
  .service-hero { grid-template-columns: 1fr; gap: 24px; padding-bottom: 48px; }
  .service-art { order: -1; }
  .service-art svg { max-width: 150px; }
  .service-video { padding: 48px 16px 64px; }
  .step-num { font-size: 56px; }
  .service-section { grid-template-columns: 1fr; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
  .steps, .other-factories { grid-template-columns: 1fr; }
  .steps { gap: 24px; }
}

/* Service pages: sticky phone with the video, the story scrolls beside it -- */
.sv { display: grid; grid-template-columns: 4fr 6fr; gap: 72px; max-width: 1040px; padding-top: 24px; padding-bottom: 48px; align-items: start; }
.sv-phone { position: sticky; top: 32px; display: flex; justify-content: center; }
.phone-port { width: min(280px, 100%); aspect-ratio: 9 / 19.5; --bezel: 10px; --radius: 44px; animation: none; }
.phone-port::before { left: 50%; top: calc(var(--bezel) + 10px); width: 32%; height: 22px; transform: translateX(-50%); }
.phone-port::after { top: 22%; left: auto; right: -3px; width: 4px; height: 12%; border-radius: 0 4px 4px 0; }
.svc-arrow { display: none; } /* phones only */
.sv { scroll-margin-top: 16px; }
.sv-part { padding-bottom: 56px; scroll-margin-top: 24px; }
.sv-part + .sv-part { padding-top: 56px; border-top: 1px solid var(--line); }
.sv-part h2 { margin-bottom: .9em; }
.sv-intro { margin-bottom: 1.4em; }
.sv-intro.sv-after { margin: 1.4em 0 0; }
.sv-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sv-points strong { color: var(--violet); }
.sv-bullets { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; }
.sv-bullets li::marker { color: var(--violet); }
/* What you get: hand-drawn ticks, drawn one by one */
.sv-gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sv-gets li { display: flex; align-items: flex-start; gap: 14px; }
.sv-tick { flex-shrink: 0; width: 26px; height: 22px; margin-top: 2px; overflow: visible; }
.sv-tick path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.js-reveal [data-reveal] .sv-tick .ln { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s ease; }
.js-reveal [data-reveal].is-in .sv-tick .ln { stroke-dashoffset: 0; }
.js-reveal [data-reveal] .sv-gets li:nth-child(1) .ln { transition-delay: .3s; }
.js-reveal [data-reveal] .sv-gets li:nth-child(2) .ln { transition-delay: .5s; }
.js-reveal [data-reveal] .sv-gets li:nth-child(3) .ln { transition-delay: .7s; }
.js-reveal [data-reveal] .sv-gets li:nth-child(4) .ln { transition-delay: .9s; }
.js-reveal [data-reveal] .sv-gets li:nth-child(5) .ln { transition-delay: 1.1s; }
/* What we need: outlined chips */
.sv-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sv-pills li { padding: 8px 16px; border: 1.5px solid var(--ink); font-family: var(--font-brand); font-size: 15px; font-weight: 700; }
/* How it works: the step you are reading lights up violet (main.js) */
/* the steps sit on a hand-drawn route like the maps on Home and About (main.js draws it) */
.sv-route { --trail-mode: v; --trail-gap: 8; position: relative; }
.sv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 44px; }
.sv-steps li:nth-child(even) { padding-left: 48px; } /* zigzag, so the route bends */
.sv-steps li { display: flex; align-items: flex-start; gap: 18px; }
.sv-num {
  display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px;
  border: 2px solid var(--ink); border-radius: 50%; font-size: 12px; font-weight: 700;
  transition: border-color .3s, color .3s;
}
.sv-steps h3 { margin: 0 0 .25em; font-size: 1.1rem; transition: color .3s; }
.sv-steps p { margin: 0; }
.sv-steps li.is-on .sv-num { border-color: var(--violet); color: var(--violet); }
.sv-steps li.is-on h3 { color: var(--violet); }
/* Formats: outlined frames in the real proportions */
.sv-formats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; }
.sv-formats li { display: flex; flex-direction: column; gap: 4px; }
.sv-formats strong { margin-top: 12px; font-family: var(--font-brand); }
.sv-frame { display: block; border: 2px solid var(--ink); border-radius: 10px; }
.sv-frame-landscape { width: 168px; height: 95px; }
.sv-frame-portrait { width: 60px; height: 106px; }
@media (max-width: 899px) {
  .sv { grid-template-columns: 1fr; gap: 40px; }
  /* hero above the phone: title and text centred */
  .service-hero-text { text-align: center; }
  .service-hero-text > p:not(.lead) { margin-left: auto; margin-right: auto; }
  .service-hero-text .btn-row { display: none; } /* no "How it works" button on phones */
  .svc-arrow { display: inline-block; margin-top: 4px; } /* scroll cue in its place */
  /* story on phones: headings centred, "What you get" comes first */
  .sv-story { display: flex; flex-direction: column; }
  .sv-part h2 { text-align: center; }
  .sv-part, .sv-part + .sv-part { padding-top: 56px; border-top: 1px solid var(--line); }
  .sv-part:has(.sv-gets) { order: -1; padding-top: 0; border-top: 0; }
  /* the "Why ..." section on phones: a note on lined paper, like the Hub */
  .sv-part:first-child {
    margin: 8px 4px 56px; padding: 28px 22px 24px; border-top: 0;
    background: #fff; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px); background-position: 0 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 18px 32px -24px rgba(0, 0, 0, .35);
    rotate: -1deg; /* separate from the reveal animation's transform */
  }
  .sv-part:first-child h2 { margin-bottom: 0; line-height: 32px; color: var(--violet); }
  /* GEO page on phones: "What helps AI assistants..." comes before "How GEO differs from SEO" */
  .sv-geo .sv-part:nth-child(1) { order: 1; }
  .sv-geo .sv-part:nth-child(3) { order: 4; }
  .sv-geo .sv-part:nth-child(4) { order: 3; }
  .sv-geo .sv-part:nth-child(n+5) { order: 5; }
  .sv-geo .sv-start { display: none; } /* GEO on phones: no "Where to start" */
  .sv-part:first-child .sv-intro, .sv-part:first-child li { font-size: 1.05rem; line-height: 32px; } /* text sits on the lines */
  .sv-part:first-child .sv-intro:last-child { margin-bottom: 0; }

  .sv-phone { position: static; }
}

/* Hub: sketchbook (hand-drawn underlines, circled topics, notes on lined paper) */
.uline, .ring { position: absolute; max-width: none; overflow: visible; pointer-events: none; }
.uline path, .ring path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.h-arrow { width: 56px; height: 20px; overflow: visible; }
.h-arrow path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the line reveals left to right when it scrolls into view (main.js adds .is-drawn) */
.js-draw .draw > svg.uline, .js-draw .draw > svg.ring { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.5, .1, .35, 1); }
.js-draw .draw.is-drawn > svg.uline, .js-draw .draw.is-drawn > svg.ring { clip-path: inset(-20%); }
.nb-u { position: relative; display: inline-block; }
.nb-u .uline { left: -1%; bottom: -10px; width: 102%; height: 12px; }
.page-intro h1 .nb-u { display: inline; }
.page-intro h1 .nb-u .uline { bottom: -6px; }
.nb-topic { position: relative; display: inline-block; padding: 2px 8px; font-family: var(--font-brand); font-weight: 700; color: var(--violet); }
.nb-topic .ring { left: -18px; top: -9px; width: calc(100% + 36px); height: calc(100% + 18px); }

/* Hub list: each post is a note on lined paper, slightly tilted */
.nb { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 40px; max-width: 1040px; padding-top: 32px; padding-bottom: 96px; }
.nb-note {
  position: relative; padding: 36px 36px 28px; background: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px); background-position: 0 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 18px 32px -24px rgba(0, 0, 0, .35);
  transform: rotate(var(--r, 0deg)); transition: transform .35s, box-shadow .35s;
}
.nb-note[hidden] { display: none; }
.nb-note:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 26px 40px -24px rgba(0, 0, 0, .4); }
.nb-head { margin: 0; }
.nb-head .nb-topic { font-size: 15px; }
.nb-date { margin-left: 22px; font-family: var(--font-brand); font-size: 14px; }
.nb-note h2 { margin: .7em 0 .6em; font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.35; }
.nb-note h2 a { color: var(--ink); text-decoration: none; }
.nb-note h2 a::after { content: ""; position: absolute; inset: 0; } /* the whole note is clickable */
.nb-note p { margin: 0 0 18px; }
.nb-read { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-brand); font-weight: 700; color: var(--violet); }
.nb-note:hover .nb-read .h-arrow { transform: translateX(6px); }
.nb-read .h-arrow { transition: transform .3s; }

/* Hub articles: chapter titles underlined, key takeaways as notes in the margin */
.post .post-meta .nb-topic { padding: 2px 8px; margin: 0 22px 0 10px; } /* room for the hand-drawn circle */
.post .prose h2 { margin-top: 1.8em; }
.nb-margin { float: right; clear: right; width: 220px; margin: 6px -280px 0 0; transform: rotate(var(--r, 0deg)); }
.nb-margin-arrow { display: block; width: 56px; transform: scaleX(-1); }
.nb-margin p { margin: 6px 0 0; font-family: var(--font-brand); font-weight: 700; color: var(--violet); line-height: 1.4; }
/* every second note sits in the left margin, arrow pointing right at the text */
.nb-margin:nth-of-type(even) { float: left; clear: left; margin: 6px 0 0 -280px; text-align: right; }
.nb-margin:nth-of-type(even) .nb-margin-arrow { margin-left: auto; transform: none; }
.nb-pin {
  margin: 56px 0 40px; padding: 32px; background: #fff; transform: rotate(-1deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 18px 32px -24px rgba(0, 0, 0, .35);
}
.nb-pin h2 { margin: .2em 0; }
.nb-pin p { margin: 0 0 4px; }
@media (max-width: 1199px) {
  .nb-margin, .nb-margin:nth-of-type(even) { float: none; width: auto; margin: 24px 0 0; padding-left: 16px; border-left: 2px solid var(--violet); transform: none; text-align: left; }
  .nb-margin-arrow { display: none; }
}
/* Related articles under a post: smaller notes, two per row */
.related .nb-related { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 28px; margin-top: 24px; }
.nb-related .nb-note { padding: 28px 26px 22px; }
.nb-note h3 { margin: .7em 0 .6em; font-size: 1.15rem; line-height: 1.35; }
.nb-note h3 a { color: var(--ink); text-decoration: none; }
.nb-note h3 a::after { content: ""; position: absolute; inset: 0; }
.nb-related .nb-date { display: block; margin: 10px 0 0; }
@media (max-width: 899px) { .nb, .related .nb-related { grid-template-columns: 1fr; } }
/* Articles on phones: centred header, no breadcrumb and no circled topic.
   Date · reading time on one line, the author below, with a short line between title and details */
@media (max-width: 767px) {
  .post .breadcrumb { display: none; }
  .post-header { text-align: center; }
  .post-header h1 { margin-bottom: .55em; }
  .post-header h1::after { content: ""; display: block; width: 40px; height: 2px; margin: 18px auto 0; background: var(--violet); }
  .post-header .post-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; font-size: 14px; }
  .post-header .post-meta .nb-topic, .post-header .post-meta .nb-topic + .pm-sep, .post-header .post-meta .pm-read + .pm-sep { display: none; }
  .post-header .post-meta .pm-sep { color: var(--violet); font-weight: 800; }
  .post-header .post-meta .pm-by { flex-basis: 100%; font-weight: 500; }
}

/* Reveal on scroll (switched on by main.js, never with reduced motion) */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
.js-reveal [data-reveal] .factory-art .ln { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease .25s; }
.js-reveal [data-reveal].is-in .factory-art .ln { stroke-dashoffset: 0; }
.js-reveal [data-reveal] .factory-art .sh .ln { transition-delay: .6s; }

.cta { text-align: center; padding-top: 72px; padding-bottom: 96px; }
.cta h2 { font-weight: 500; }

/* Contact / 404 --------------------------------------------------- */
.contact { display: flex; align-items: center; justify-content: center; }
/* Contact page: header + content together fill exactly one screen, footer below */
.contact-screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.contact-screen > main { flex: 1 0 auto; }
.contact-box { text-align: center; padding-top: 32px; padding-bottom: 48px; display: flex; flex-direction: column; align-items: center; }
.contact-box h1 { font-family: var(--font-brand); font-size: 18px; font-weight: 800; color: var(--violet); }
.qr { width: 190px; height: 190px; margin: 16px 0 28px; }
.contact-email { font-size: 1.1rem; font-weight: 600; }
/* black email with a violet underline that draws itself left to right */
.contact-email a { position: relative; display: inline-block; padding-bottom: 5px; color: var(--ink); text-decoration: none; }
.contact-email a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--violet); transform-origin: left center;
  animation: underline-draw .9s cubic-bezier(.5, .1, .35, 1) .5s both;
}
.contact-email a:hover::after { animation: underline-draw .6s cubic-bezier(.5, .1, .35, 1) both; }
@keyframes underline-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Contact form */
.contact-box h1:not(.visually-hidden) { margin: 0 0 .3em; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--ink); }
.contact-lead { margin: 0 0 28px; color: var(--ink-soft); }
.contact-form { width: 100%; max-width: 640px; padding: 32px; text-align: left; background: #fff; border-radius: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -20px rgba(0, 0, 0, .18); }
.contact-form .checks .check { flex-shrink: 1; }
.contact-form .notice { margin-top: -4px; }
.contact-form [hidden] { display: none; } /* .field sets display, so [hidden] needs help */
/* Contact form: two sections (details, topic), centred headings, even grids */
.contact-form { max-width: 600px; padding: 36px 40px 32px; }
.cf-section { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cf-section + .cf-section { margin-top: 10px; padding-top: 26px; border-top: 1.5px solid var(--line); }
.cf-title { float: left; width: 100%; margin: 0 0 4px; padding: 0; text-align: center; font-family: var(--font-brand); font-size: 17px; font-weight: 800; }
.cf-title + * { clear: both; }
.contact-form .form-grid { gap: 14px 16px; }
.contact-form .field > span { font-size: 13px; color: var(--ink-soft); }
.contact-form .field input { padding: 11px 14px; }
.contact-form .cf-nip { grid-column: 1 / -1; }
.contact-form .field > legend { width: 100%; text-align: center; margin-bottom: 4px; }
/* Topic: custom dropdown (contact.js); the list opens right under the field, same width */
.cf-select { position: relative; }
.cf-select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border: 1.5px solid #dcdad2; border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; text-align: left; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, border-radius .15s;
}
.cf-select-btn.is-empty .cf-select-label { color: #a5a39b; }
.cf-select-btn:hover { border-color: #b9b6ab; }
.cf-select-btn:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(94, 23, 235, .12); }
.cf-select-btn svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.cf-select.is-open .cf-select-btn { border-color: var(--violet); border-bottom-color: transparent; border-radius: 12px 12px 0 0; box-shadow: none; }
.cf-select.is-open .cf-select-btn svg { transform: rotate(180deg); color: var(--violet); }
.cf-select-list {
  position: absolute; z-index: 20; top: calc(100% - 1.5px); left: 0; right: 0;
  margin: 0; padding: 4px 6px 6px; list-style: none;
  background: #fff; border: 1.5px solid var(--violet); border-top: 0; border-radius: 0 0 12px 12px;
  box-shadow: 0 18px 32px -20px rgba(0, 0, 0, .3);
}
.cf-select-list::before { content: ""; display: block; height: 1px; margin: 0 8px 4px; background: var(--line); }
.cf-select-list li { padding: 10px 12px; border-radius: 8px; text-align: left; cursor: pointer; }
.cf-select-list li:hover, .cf-select-list li:focus { outline: none; background: #f7f3ff; color: var(--violet); }
.cf-select-list li[aria-selected="true"] { font-weight: 700; color: var(--violet); }
/* Number of videos: one even row */
.checks.video-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.video-grid .check { justify-content: center; padding: 10px 6px; font-size: .85rem; }
.contact-form .consent { max-width: 440px; margin: 6px auto 0; font-size: .85rem; }
.contact-form .form-actions { margin-top: 2px; }
.contact-form .btn-block { width: 100%; font-size: 16px; }
.contact-form .notice { text-align: center; }
/* Steps: 1 topic, 2 questions for that topic, 3 contact details */
.contact-step { display: flex; flex-direction: column; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-step + .contact-step { padding-top: 26px; border-top: 1.5px solid var(--line); }
.contact-step > legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 4px; padding: 0; font-family: var(--font-brand); font-size: 17px; font-weight: 800; }
.contact-step > legend + * { clear: both; }
.step-n { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; font-size: 12px; font-weight: 700; }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border: 1.5px solid #dcdad2; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic-name { font-family: var(--font-brand); font-size: 15px; font-weight: 700; }
.topic-text { font-size: .88rem; line-height: 1.4; color: var(--ink-soft); }
.topic:hover, .topic:has(input:checked) { border-color: var(--violet); }
.topic:has(input:checked) { background: #f7f3ff; }
.topic:has(input:checked) .topic-name { color: var(--violet); }
.topic:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
.contact-step { scroll-margin-top: 24px; }
.step-opt { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
/* One-click answers: pills without the radio / checkbox dot */
.chips .check { position: relative; }
.chips .check input { position: absolute; opacity: 0; pointer-events: none; }
.chips .check:has(input:checked) { background: #f7f3ff; }
.chips .check:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Scribble in the bottom right corner of the first screen, as on the log in page */
.contact-screen { position: relative; overflow: hidden; }
.contact-screen > .site-header, .contact-screen > main { position: relative; z-index: 1; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--violet); flex-shrink: 0; }
.consent a { color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-or { margin: 32px 0 6px; font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 600px) {
  .contact-form { padding: 22px 18px; }
  .contact-form .form-grid { grid-template-columns: 1fr; }
  .topics { grid-template-columns: 1fr; }
  .checks.video-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid .check:last-child { grid-column: 1 / -1; }
  .contact-screen .contact-scribble { width: 260px; right: -70px; bottom: -50px; }
}
.error-box h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.01em; text-transform: none; color: var(--ink); }

/* Hub ------------------------------------------------------------- */
.hub-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 28px; }
.hub-filter button {
  padding: 4px 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-family: var(--font-brand); font-size: 15px; font-weight: 700; color: var(--ink);
  transition: color .3s;
}
.hub-filter button:hover, .hub-filter button[aria-pressed="true"] { color: var(--violet); }

.post-grid { max-width: 780px; padding-top: 32px; padding-bottom: 96px; }
.post-card { padding: 32px 0; border-top: 1px solid var(--line); }
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-card[hidden] { display: none; }
.post-card h2, .post-card h3 { margin: .45em 0 .35em; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.25; }
.post-card h2 a, .post-card h3 a { text-decoration: none; transition: color .3s; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--violet); }
.post-card p { margin: 0; color: var(--ink); }
.post-meta { margin: 0; font-size: 14px; color: var(--ink); }
.post-meta a { color: var(--violet); text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }

/* Article */
.post { padding-top: 32px; padding-bottom: 72px; }
.post .breadcrumb { margin-bottom: 8px; }
.post-header { margin: 16px 0 40px; }
.post-header h1 { margin-bottom: .5em; }
.key-points { margin: 0 0 36px; }
.key-points h2, .toc-title, .service-box-label {
  margin: 0 0 10px; font-family: var(--font-brand); font-size: 16px; font-weight: 700; color: var(--violet);
}
.key-points ul { margin: 0; padding-left: 1.1em; }
.key-points li { margin-bottom: .4em; }
.key-points li::marker { color: var(--violet); }
.toc { margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; color: var(--ink); }
.toc li { margin-bottom: .25em; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--violet); }
.post .prose { padding-top: 24px; padding-bottom: 16px; }
.post .prose h2, .post-faq h2 { scroll-margin-top: 16px; }
.post-faq { padding: 8px 0 40px; }
.post-faq h2 { margin-bottom: .6em; }
.service-box { margin: 8px 0 40px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-box h2 { margin: 0 0 .25em; }
.service-box p { margin: 0; color: var(--ink); }
.service-box .more { margin-top: 20px; }
.related h2 { margin-bottom: .2em; font-family: var(--font-brand); font-size: 16px; font-weight: 700; color: var(--violet); }
.related .post-card:last-child { border-bottom: 0; }
.related-grid { display: block; }
.service-section .related-grid .post-card:first-child { padding-top: 0; border-top: 0; }
.service-section .related-grid .post-card:last-child { border-bottom: 0; padding-bottom: 0; }
.post .back { margin-top: 40px; }

/* Client panel ------------------------------------------------------ */
/* Desktop only: phones and tablets see .desktop-note instead */
.panel { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.desktop-note { display: none; }
@media (max-width: 1023px) {
  .panel .auth-screen, .panel .app { display: none; }
  .panel .desktop-note {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; gap: 18px; padding: 48px 24px; text-align: center;
  }
  .desktop-note h1 { max-width: 420px; margin: 8px 0 0; font-size: clamp(1.5rem, 5vw, 2rem); }
  .desktop-note p { max-width: 420px; margin: 0; color: var(--ink-soft); }
  .desktop-note .note-small { font-size: .9rem; }
  .note-icon { width: 64px; height: 64px; fill: none; stroke: var(--violet); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
}

/* Shared form parts */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.field-wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend {
  padding: 0;
  font-family: var(--font-brand); font-size: 15px; font-weight: 700; color: var(--ink);
}
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid #dcdad2; border-radius: 12px;
  background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #a5a39b; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(94, 23, 235, .12);
}
.field input:disabled { background: #f1f0ea; color: var(--ink-soft); }
.form .btn { align-self: flex-start; cursor: pointer; }
.btn-block { align-self: stretch !important; justify-content: center; padding-top: 13px; padding-bottom: 13px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.form-actions { display: flex; gap: 12px; }
.hint { margin: -6px 0 0; font-size: .88rem; color: var(--ink-soft); }
.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .92rem; color: var(--violet);
}
.link-btn:hover { text-decoration: underline; }
.link-danger { color: #b3261e; }
.notice { margin: 0; padding: 12px 16px; border-radius: 12px; font-size: .95rem; background: #fff; border: 1px solid var(--line); }
.notice-ok { border-color: #9fe6c1; background: #eefbf4; }
.notice-error { border-color: #e69fa3; background: #fdf0f1; }
.notice[hidden] { display: none; }

/* Log in / sign up / set password */
.auth-screen {
  position: relative; overflow: hidden;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 56px 24px;
}
.auth-scribble {
  position: absolute; right: -60px; bottom: -40px; z-index: 0;
  width: 420px; height: auto; opacity: .18; transform: rotate(-12deg);
  pointer-events: none;
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; padding: 40px 40px 32px;
  background: #fff; border-radius: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 30px 60px -30px rgba(0, 0, 0, .25);
}
.auth-logo { display: inline-block; margin-bottom: 20px; }
.auth-logo img { width: auto; height: 56px; }
.auth-card h1 { margin: 0 0 .25em; font-size: 2rem; }
.auth-sub { margin: 0 0 24px; color: var(--ink-soft); }
/* Card header (logo, title, subtitle) centred */
.auth-card .auth-logo { display: block; width: fit-content; margin: 0 auto 20px; }
.auth-card h1, .auth-sub { text-align: center; }
.auth-card .notice { margin-bottom: 18px; }
.auth-row { display: flex; justify-content: flex-end; margin-top: -8px; }
.auth-cta { display: flex; width: fit-content; margin: 0 auto; } /* "Request access": centred, normal height */
.auth-card .form[hidden] { display: none; }
/* Log in page when already signed in: continue or switch account */
.signed-in { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.signed-in-text { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.auth-foot { margin: 22px 0 0; text-align: center; font-size: .95rem; color: var(--ink-soft); }
.auth-foot a { color: var(--violet); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-steps { margin: 0 0 24px; padding-left: 0; list-style-position: inside; text-align: center; color: var(--ink-soft); } /* sign up: everything centred */
.auth-steps li { margin-bottom: .8em; }
.auth-steps strong { color: var(--ink); }
.auth-back { position: relative; z-index: 1; font-size: .92rem; color: var(--ink-soft); text-decoration: none; }
.auth-back:hover { color: var(--violet); }

/* App: sidebar + content */
.app { flex: 1; display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.app-side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 28px 20px;
  background: #fff; border-right: 1px solid var(--line);
}
.app-logo img { width: auto; height: 52px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-nav { display: flex; flex-direction: column; gap: 4px; }
.app-nav button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  border: 0; border-radius: 12px; background: none; cursor: pointer;
  font: inherit; font-size: .98rem; font-weight: 600; color: var(--ink); text-align: left;
  transition: background .2s, color .2s;
}
.app-nav button:hover { background: var(--bg); }
.app-nav button[aria-selected="true"] { background: var(--ink); color: #fff; }
.app-user { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 1px solid var(--line); }
.app-user-label { font-family: var(--font-brand); font-size: 13px; font-weight: 700; color: var(--ink-mute); }
.app-user-email { font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.app-logout {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: none; cursor: pointer;
  font: inherit; font-size: .92rem; color: var(--ink);
  transition: border-color .2s, color .2s;
}
.app-logout:hover { border-color: #b3261e; color: #b3261e; }

.app-main { min-width: 0; padding: 44px 48px 72px; max-width: 1200px; }
.app-head { margin-bottom: 28px; }
.app-head h1 { margin: 0 0 .2em; font-size: 2.4rem; }
.app-sub { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.app-main > .notice { margin-bottom: 20px; }

.card {
  padding: 28px 32px; background: #fff; border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -20px rgba(0, 0, 0, .18);
}
.card-title { margin: 0 0 20px; font-size: 1.15rem; }

/* Admin */
.panel .admin-only { display: none; }
.panel.is-admin .admin-only { display: revert; }
.panel.is-admin .client-only { display: none; }
.panel.is-admin .client-pick { display: flex; }
.client-pick select { padding: 10px 12px; font-size: .92rem; }

/* First login */
.onboarding-intro {
  display: none; margin-bottom: 24px; padding: 22px 26px;
  border-radius: 20px; background: #9fe6c1;
}
.onboarding-intro h2 { margin: 0 0 .25em; font-size: 1.3rem; }
.onboarding-intro p { margin: 0; }
.is-onboarding .onboarding-intro { display: block; }
.is-onboarding .app-nav button:not([data-tab="profile"]) { opacity: .35; cursor: not-allowed; }
.is-onboarding .app-nav button:not([data-tab="profile"]):hover { background: none; }

/* Survey: one question at a time (first-login profile, feedback after a brief) */
.survey-card { margin-bottom: 24px; }
.survey-card[hidden] { display: none; }
.wizard { display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; padding: 12px 0; }
.wizard-bar { height: 6px; margin-bottom: 18px; border-radius: 99px; background: #ebe9e1; overflow: hidden; }
.wizard-bar span { display: block; height: 100%; border-radius: inherit; background: var(--violet); transition: width .35s ease; }
.wizard-count { margin: 0 0 6px; font-size: .85rem; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }
.wizard-q { margin: 0 0 6px; font-size: 1.6rem; line-height: 1.2; }
.wizard-hint { margin: 0; color: var(--ink-soft); }
.wizard-hint[hidden] { display: none; }
.wizard-body { margin-top: 20px; animation: wizard-in .3s ease; }
.wizard-body .field input, .wizard-body .field textarea { padding: 15px 18px; font-size: 1.1rem; }
.wizard-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wizard-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wizard-choice {
  padding: 14px 16px; border: 1.5px solid #dcdad2; border-radius: 12px; background: #fff; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink); text-align: left; transition: border-color .15s, background .15s;
}
.wizard-choice:hover { border-color: var(--violet); }
.wizard-choice[aria-checked="true"] { border-color: var(--violet); background: #f7f3ff; color: var(--violet); }
.wizard-choice:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wizard-scale { display: flex; gap: 8px; }
.wizard-scale .wizard-choice { flex: 1; padding: 14px 0; text-align: center; }
.wizard-scale-ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: .85rem; color: var(--ink-soft); }
.wizard .notice { margin-top: 16px; }
.wizard-actions { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.wizard-actions .btn { margin-left: auto; cursor: pointer; }
.wizard-back[hidden] { display: none; }
.wizard-later { color: var(--ink-soft); }
.survey-intro { max-width: 600px; margin: 0 auto 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.survey-kicker { margin: 0 0 4px; font-weight: 700; color: var(--violet); }
.survey-lead { margin: 0; color: var(--ink-soft); }
@keyframes wizard-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wizard-body { animation: none; } .wizard-bar span { transition: none; } }

/* Brief: the guided survey and the thank-you screen */
.brief-new .wizard { padding-top: 4px; }
.brief-new .survey-intro { margin-bottom: 16px; }
.brief-sent { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; }
.brief-sent-icon {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 8px;
  border-radius: 50%; background: #9fe6c1; font-size: 26px; font-weight: 700;
}
.brief-sent h2 { margin: 0; font-size: 1.5rem; }
.brief-sent p { margin: 0; color: var(--ink-soft); }
.brief-sent .brief-sent-next { margin-top: 10px; color: var(--ink); font-weight: 600; }
.brief-sent-actions { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.brief-sent-actions .btn { cursor: pointer; }

/* Brief: "Your products" - cut-out product on a 1 cm grid, size with + / -, accept */
.pp-list { display: flex; flex-direction: column; gap: 16px; }
.pp-list:empty { display: none; }
.pp-add { display: flex; gap: 10px; align-items: stretch; margin-top: 16px; }
.pp-add .field { flex: 1; margin: 0; }
.pp-add .btn { cursor: pointer; white-space: nowrap; }
.pp-upload { margin: 8px 0 0; font-size: .95rem; }
.pp-card { padding: 16px; border: 1.5px solid #dcdad2; border-radius: 14px; background: #fff; transition: border-color .2s; }
.pp-card.is-accepted { border-color: var(--mint); }
.pp-card.is-error { border-color: #e4a0a0; }
.pp-card.is-loading { border-style: dashed; }
.pp-card.is-pick { border-color: var(--violet); }
.pp-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.pp-option {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1.5px solid #dcdad2; border-radius: 10px; background: #fff;
  cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; line-height: 1.3; text-align: left; color: var(--ink);
}
.pp-option img { width: 100%; height: 100px; object-fit: contain; }
.pp-option:hover:not(:disabled) { border-color: var(--violet); }
.pp-option:disabled { cursor: default; border-color: var(--mint); }
.pp-option-add { margin-top: auto; color: var(--violet); }
.pp-option:disabled .pp-option-add { color: #1f7a4f; }
.pp-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pp-head h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.pp-src { display: block; margin: 2px 0 0; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: var(--ink-soft); }
.pp-remove { flex: none; color: var(--ink-soft); }
.pp-wait, .pp-err { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; }
.pp-err { color: #a12a2a; }
.pp-spin { width: 18px; height: 18px; border: 2.5px solid #dcdad2; border-top-color: var(--violet); border-radius: 50%; animation: pp-spin .8s linear infinite; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
/* the phone: portrait 9:16, landscape 16:9, square = a 1:1 picture on a portrait phone */
.pp-views { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.pp-views .wizard-choice { padding: 8px 14px; font-size: .9rem; }
.pp-preview { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 16px; }
.pp-phone { flex: none; padding: 10px; border-radius: 34px; background: #16161a; box-shadow: 0 10px 30px rgba(0, 0, 0, .18), inset 0 0 0 2px #2c2c33; }
.pp-phone.is-portrait, .pp-phone.is-square { width: min(100%, 290px); aspect-ratio: 9 / 19.5; }
.pp-phone.is-landscape { width: min(100%, 580px); aspect-ratio: 19.5 / 9; }
.pp-screen { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 25px; overflow: hidden; background: #000; }
.pp-frame {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #f1efe9 55%, #e2dfd6 100%);
}
.pp-phone.is-portrait .pp-frame { aspect-ratio: 9 / 16; height: auto; }
.pp-phone.is-landscape .pp-frame { aspect-ratio: 16 / 9; width: auto; }
.pp-phone.is-square .pp-frame { aspect-ratio: 1; height: auto; }
.pp-img { display: block; max-width: none; object-fit: fill; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); transition: width .2s ease, height .2s ease; }
.pp-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 380px; }
.pp-ask { margin: 0; font-weight: 700; }
.pp-shaper { display: flex; gap: 8px; width: 100%; }
.pp-btn {
  flex: 1; padding: 10px 12px; border: 1.5px solid #dcdad2; border-radius: 10px; background: #fff; cursor: pointer;
  font: inherit; font-weight: 700; line-height: 1.2; color: var(--ink); white-space: nowrap;
}
.pp-btn:hover:not(:disabled) { border-color: var(--violet); color: var(--violet); }
.pp-btn:disabled { opacity: .4; cursor: default; }
.pp-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.pp-reset { font-size: .9rem; }
.pp-reset[hidden] { display: none; }
.pp-source { margin: 8px 0 0; font-size: .88rem; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .pp-img { transition: none; } }
.pp-comment { margin: 12px 0 0; }
.wizard-body .pp-comment textarea { width: 100%; padding: 10px 12px; font-size: 1rem; }
.pp-accept { display: block; margin: 14px auto 0; cursor: pointer; }
.pp-card.is-accepted .pp-accept { background: var(--mint); border-color: var(--mint); color: #000; }
@media (max-width: 600px) {
  .pp-add { flex-direction: column; }
  .pp-src { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) { .pp-spin { animation-duration: 2.4s; } }

/* Team panel: products from the brief */
.brief-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.brief-product { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .9rem; }
.brief-product-pic { display: flex; align-items: center; justify-content: center; height: 140px; overflow: hidden; background: #fff; }
.brief-product-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brief-product h4 { margin: 8px 0 2px; font-size: .95rem; line-height: 1.3; }
.brief-product p { margin: 0; }
.brief-product .changed { color: var(--violet); font-weight: 700; }
.brief-product .comment { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: #fff4e5; }

/* Projects: folders (a collection or a campaign), videos inside */
.folder-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.folder-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 26px 18px 18px;
  border: 1.5px solid #dcdad2; border-radius: 4px 14px 14px 14px; background: #fff; cursor: pointer;
  font: inherit; text-align: left; color: var(--ink); transition: border-color .15s, transform .15s;
}
.folder-card::before {   /* the tab of the folder */
  content: ""; position: absolute; left: -1.5px; top: -12px; width: 42%; height: 12px;
  border: 1.5px solid #dcdad2; border-bottom: 0; border-radius: 8px 8px 0 0; background: #fff;
}
.folder-card:hover, .folder-card:focus-visible { border-color: var(--violet); transform: translateY(-2px); }
.folder-card:hover::before, .folder-card:focus-visible::before { border-color: var(--violet); }
.folder-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.folder-card.is-waiting { border-color: var(--mint); }
.folder-no { display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; margin-bottom: 6px; padding: 0 8px; border-radius: 10px; background: #f7f3ff; color: var(--violet); font-weight: 800; font-size: 1.05rem; }
.folder-name { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.folder-count { font-size: .88rem; color: var(--ink-soft); }
.folder-bar { margin-bottom: 12px; }
.folder-bar .link-btn { font-weight: 700; }
.folder-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.folder-head h2 { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.folder-head .eyebrow { margin: 0 0 4px; }
.folder-head .meta { margin: 4px 0 0; }
.folder-head .btn { cursor: pointer; padding: 12px 22px; }
.folder-head .btn[hidden] { display: none; }
@media (max-width: 600px) { .folder-head { flex-direction: column; align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .folder-card { transition: none; } }

/* Brief: caption styles, each shown on a small phone */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cap-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; border: 1.5px solid #dcdad2; border-radius: 12px;
  background: #fff; cursor: pointer; font: inherit; color: var(--ink); text-align: center;
}
.cap-card:hover { border-color: var(--violet); }
.cap-card[aria-checked="true"] { border-color: var(--violet); background: #f7f3ff; }
.cap-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.cap-title { font-weight: 700; }
.cap-card[aria-checked="true"] .cap-title { color: var(--violet); }
.cap-text { font-size: .8rem; line-height: 1.35; color: var(--ink-soft); }
.cap-phone { display: block; padding: 5px; border-radius: 18px; background: #16161a; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.cap-phone.is-portrait, .cap-phone.is-square { width: 118px; aspect-ratio: 9 / 17; }
.cap-phone.is-landscape { width: 180px; aspect-ratio: 17 / 9; }
.cap-screen {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 30%, #fbf7f1 0%, #e9dfd3 55%, #cdbfae 100%);
}
.cap-screen img { max-width: 62%; max-height: 58%; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .22)); }
.cap-sample { position: absolute; left: 7%; right: 7%; bottom: 13%; font-size: .6rem; line-height: 1.2; text-align: center; color: #fff; }
/* our signature (the CapCut look of our videos): white capitals on dark boxes, short phrases one after another */
.cap-signature { bottom: 22%; display: grid; }
.cap-phrase { grid-area: 1 / 1; display: flex; justify-content: center; opacity: 0; animation: cap-phrase 3.2s infinite; }
.cap-phrase + .cap-phrase { animation-delay: 1.6s; }
.cap-phrase span { padding: .3em .55em .26em; background: rgba(0, 0, 0, .62); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
@keyframes cap-phrase { 0%, 4% { opacity: 0; } 8%, 46% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cap-clean { font-weight: 700; font-size: .62rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35); }
.cap-colour-bar { left: 0; right: 0; bottom: 14%; padding: .45em .5em; background: var(--violet); font-weight: 800; letter-spacing: .01em; }
.cap-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .28em; font-weight: 900; font-size: .68rem; text-transform: uppercase; text-shadow: 0 1px 0 #000, 0 2px 6px rgba(0, 0, 0, .55); }
.cap-words span { opacity: 0; animation: cap-word 3.2s calc(var(--i) * .4s) infinite; }
@keyframes cap-word {
  0% { opacity: 0; transform: translateY(4px) scale(.7); }
  8% { opacity: 1; transform: none; color: #ffd400; }
  22% { color: #ffd400; }
  32%, 85% { opacity: 1; color: #fff; }
  100% { opacity: 0; }
}
/* big titles: a small line, then two heavy words, like a magazine cover */
.cap-big { top: 10%; bottom: auto; display: flex; flex-direction: column; align-items: center; color: #15121a; }
.cap-big-small { margin-bottom: 2px; padding: 1px 5px; background: #15121a; color: #fff; font-size: .4rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.cap-big-main { font-size: 1.15rem; font-weight: 1000; line-height: .92; letter-spacing: -.03em; text-transform: uppercase; animation: cap-big 3.2s infinite both; }
.cap-big-main + .cap-big-main { color: var(--violet); animation-delay: .15s; }
@keyframes cap-big { 0% { opacity: 0; transform: translateY(6px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cap-phrase { animation: none; } .cap-phrase:first-child { opacity: 1; } .cap-big-main { animation: none; } }
@media (prefers-reduced-motion: reduce) { .cap-words span { animation: none; opacity: 1; } }

/* Client panel: clearer pages (sections with lines, what happens next) */
.app-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-head { margin: 40px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0 0 4px; font-size: 1.3rem; }
.section-head p { margin: 0; color: var(--ink-soft); }
.card-sub { margin: -12px 0 12px; color: var(--ink-soft); }
.list-title { margin: 24px 0 0; font-size: 1rem; }
.tick-list { margin: 0 0 20px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.tick-list li { position: relative; padding-left: 26px; }
.tick-list li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: #1f9d63; font-weight: 700; }
.empty-card { padding: 24px 28px; }

/* Profile: two sections, title on the left, fields on the right */
.profile-form { padding: 8px 32px; }
.form-section { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr); gap: 32px; padding: 28px 0; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section-head h2 { margin: 0 0 6px; font-size: 1.15rem; }
.form-section-head p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.form-foot .btn { cursor: pointer; }
.form-foot .notice { margin-right: auto; }
/* Profile: account (password, your data) */
.account-card { margin-top: 24px; }
.is-onboarding .account-card { display: none; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.account-actions .btn { cursor: pointer; }
.account-actions .notice { margin: 0; }
/* Approvals: approve many at once; Materials: download all */
.approve-all { margin-top: 18px; cursor: pointer; }
.download-all { margin: 0 0 14px; cursor: pointer; }
/* Projects: what is new since the last visit */
.whats-new { margin-bottom: 20px; border: 2px solid var(--violet); }
.whats-new-title { margin: 0 0 8px; font-weight: 800; color: var(--violet); }
.whats-new ul { margin: 0 0 10px; padding-left: 18px; }
.whats-new li { margin: 4px 0; }
.whats-new li .link-btn { text-align: left; }

/* Projects: start a brief + how it works */
.brief-start { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 36px 40px; }
.brief-start .eyebrow { margin: 0 0 8px; }
.brief-start h2 { margin: 0 0 10px; font-size: 1.7rem; line-height: 1.2; }
.brief-start p { margin: 0 0 22px; color: var(--ink-soft); }
.brief-start .btn { cursor: pointer; padding: 12px 22px; }
.how-steps { counter-reset: how; list-style: none; margin: 0; padding: 0 0 0 32px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.how-steps li { counter-increment: how; position: relative; padding-left: 44px; min-height: 30px; }
.how-steps li::before {
  content: counter(how); position: absolute; left: 0; top: 0;
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: #f7f3ff; color: var(--violet); font-weight: 700; font-size: .9rem;
}
.how-steps strong { display: block; }
.how-steps span { color: var(--ink-soft); font-size: .9rem; }
.how-steps-row { flex-direction: row; padding: 0; border: 0; gap: 24px; }
.how-steps-row li { flex: 1; }

/* Projects: one card per brief with a progress bar */
.project-list { display: flex; flex-direction: column; gap: 16px; }
.project-card { display: flex; flex-direction: column; gap: 20px; }
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.project-head h3 { margin: 0 0 4px; font-size: 1.15rem; }
.project-head .meta { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.tracker { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.tracker li { position: relative; padding-top: 22px; font-size: .88rem; font-weight: 600; color: var(--ink-mute); }
.tracker li::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 4px; background: #ebe9e1; }
.tracker li:first-child::before { border-radius: 99px 0 0 99px; }
.tracker li:last-child::before { border-radius: 0 99px 99px 0; }
.tracker li::after {
  content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid #dcdad2; box-sizing: border-box;
}
.tracker li.is-done { color: var(--ink); }
.tracker li.is-done::before { background: var(--mint); }
.tracker li.is-done::after { background: var(--mint); border-color: var(--mint); }
.tracker li.is-now { color: var(--violet); }
.tracker li.is-now::before { background: linear-gradient(90deg, var(--violet) 0 40%, #ebe9e1 40%); }
.tracker li.is-now::after { border-color: var(--violet); background: var(--violet); box-shadow: 0 0 0 4px rgba(94, 23, 235, .15); }
.project-next { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 18px; border-radius: 14px; background: #f7f6f1; }
.project-next p { margin: 0; }
.project-next .btn { cursor: pointer; flex-shrink: 0; }
.project-answers summary { cursor: pointer; color: var(--violet); font-weight: 600; font-size: .92rem; }
.project-answers .crm-answers { margin-top: 12px; border-radius: 12px; }

/* Approvals: what is waiting, and how to decide */
.pane-intro { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.pane-intro-status { margin: 0; font-size: 1.1rem; font-weight: 700; }
.pane-intro-status.is-waiting { color: var(--violet); }

/* Brief survey: several answers, style cards with test reels */
.wizard-multi { position: relative; padding-right: 40px; }
.wizard-multi::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border: 1.5px solid #dcdad2; border-radius: 5px; background: #fff;
}
.wizard-multi[aria-pressed="true"] { border-color: var(--violet); background: #f7f3ff; color: var(--violet); }
.wizard-multi[aria-pressed="true"]::after { content: "\2713"; border-color: var(--violet); background: var(--violet); color: #fff; font-size: 12px; line-height: 14px; text-align: center; }
.wizard-tip { margin: 10px 0 0; font-size: .85rem; color: var(--ink-soft); }
.wizard-other { margin-top: 14px; }
.wizard-other input { padding: 12px 16px !important; font-size: 1rem !important; }
.wizard-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wizard-card {
  display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 14px; text-align: left;
  border: 1.5px solid #dcdad2; border-radius: 16px; background: #fff; cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.wizard-card:hover { border-color: var(--violet); }
.wizard-card[aria-pressed="true"] { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(94, 23, 235, .18); }
.wizard-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wizard-card-media { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #111; margin-bottom: 8px; }
.wizard-card-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.wizard-card-blank { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #f7f3ff; color: var(--violet); font-size: 3rem; font-weight: 700; }
.wizard-card-tick {
  position: absolute; top: 8px; right: 8px; display: none; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: 700;
}
.wizard-card[aria-pressed="true"] .wizard-card-tick { display: flex; }
.wizard-card-title { padding: 0 6px; font-weight: 700; }
.wizard-card-text { padding: 0 6px; font-size: .85rem; color: var(--ink-soft); line-height: 1.35; }
.brief-new { max-width: 900px; }
.brief-new .wizard { max-width: none; }
.brief-new .survey-intro { max-width: none; margin: 0 0 16px; }

/* Team panel: overview (what to do today) */
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.stat strong { font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: .9rem; }
.stat.is-hot { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.stat.is-hot strong { color: var(--violet); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.overview-sub { margin-top: 28px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li + li { border-top: 1px solid var(--line); }
.todo-list .empty { padding: 12px 0; }
.todo-row {
  display: grid; grid-template-columns: 136px minmax(0, 1fr) max-content; align-items: center; gap: 14px; width: 100%;
  padding: 12px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
}
.todo-row:hover { background: var(--bg); }
.todo-main { display: flex; flex-direction: column; min-width: 0; }
.todo-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-row .meta { color: var(--ink-soft); font-size: .85rem; }
.todo-date { white-space: nowrap; }
.overview-grid > .card:last-child .todo-row { grid-template-columns: max-content minmax(0, 1fr) max-content; }
.todo-kind { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.todo-lead { background: #f1ebff; color: var(--violet); }
.todo-brief { background: #e3f7ec; color: #1f7a4d; }
.todo-changes { background: #fff1d6; color: #8a5a00; }
.todo-files { background: #e6eef8; color: #2b5a8a; }
.todo-waiting { background: #f1f0ea; color: var(--ink-soft); }
.todo-good { background: #e3f7ec; color: #1f7a4d; }
.todo-bad { background: #fde3e1; color: #b3261e; }

/* Team panel: one client = header + sub tabs */
#client-detail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
#client-detail[hidden] { display: none; }
.client-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.client-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.client-head .meta { margin: 0 0 8px; color: var(--ink-soft); }
.client-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.client-links a { color: var(--violet); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.client-links a:hover { text-decoration: underline; }
.client-head-stats { display: flex; gap: 10px; flex-shrink: 0; }
.mini-stat { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 10px 12px; border-radius: 12px; background: #f7f6f1; }
.mini-stat strong { font-size: 1.3rem; line-height: 1.1; }
.mini-stat span { font-size: .78rem; color: var(--ink-soft); }
.mini-stat.is-hot { background: #fff1d6; color: #8a5a00; }
.subtabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid var(--line); width: fit-content; }
.subtabs button {
  padding: 9px 16px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink-soft);
}
.subtabs button:hover { color: var(--ink); background: var(--bg); }
.subtabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.subtabs button span:not(:empty) { margin-left: 4px; padding: 0 7px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 12px; }
.subpane { display: flex; flex-direction: column; gap: 20px; }
.subpane[hidden] { display: none; }
.project-card.is-new { box-shadow: 0 0 0 2px var(--mint); }
.project-status { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.badge-brief-new { border-color: var(--mint); color: #1f7a4d; }
.profile-dl { border-radius: 12px; }
[data-pane="clients"] .crm-layout { grid-template-columns: 300px minmax(0, 1fr); }
[data-pane="clients"] .crm-row { flex-direction: column; align-items: flex-start; gap: 6px; }
[data-pane="clients"] .crm-row-main { width: 100%; }
[data-pane="clients"] .crm-row .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-pane="clients"] .crm-row-flags { flex-direction: row; flex-wrap: wrap; }
[data-pane="clients"] .crm-row-flags:empty { display: none; }

/* Team panel: analytics (KPI tiles + SVG charts from admin-charts.js) */
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.range-pick select { padding: 9px 12px; font-size: .92rem; }
.kpi-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; transition: opacity .2s; }
.kpi-row-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.kpi-row-sm .kpi { background: #f7f6f1; border: 0; }
.kpi-label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.kpi-value { font-size: 1.55rem; line-height: 1.15; font-weight: 700; }
.kpi-note { font-size: .78rem; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.chart-card .card-sub { margin: 0 0 14px; }
.chart-wide { grid-column: 1 / -1; }
.chart { position: relative; transition: opacity .2s; }
.chart svg { display: block; overflow: visible; font-family: var(--font); }
.chart .empty { padding: 20px 0; }
.is-loading { opacity: .45; }
.chart-hit { cursor: default; outline: none; }
.chart-hit:focus-visible { stroke: var(--violet); stroke-width: 2; }
.chart-tip {
  position: fixed; z-index: 50; pointer-events: none; display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px; border-radius: 10px; background: #111; color: #fff; font-size: .82rem;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .5);
}
.chart-tip[hidden] { display: none; }
.chart-tip strong { font-size: .95rem; }
.chart-tip span { color: #c9c8c2; }

/* Team panel: leads - board view, clearer lead card */
.view-toggle { display: flex; padding: 3px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.view-toggle button { padding: 7px 14px; border: 0; border-radius: 9px; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lead-board { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.lead-board[hidden] { display: none; }
.board-col { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: #ecebe4; min-height: 160px; }
.board-head { display: flex; justify-content: space-between; align-items: center; }
.board-count { font-weight: 700; color: var(--ink-soft); }
.board-value { margin: -2px 0 2px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.board-empty { margin: 8px 0; font-size: .85rem; color: var(--ink-mute); text-align: center; }
.board-card {
  display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.board-card:hover { border-color: var(--violet); box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .35); }
.board-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.board-card .meta { font-size: .8rem; color: var(--ink-soft); }
.board-card .crm-row-name { white-space: normal; overflow-wrap: anywhere; }
.board-next { margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--violet); }
.board-next.is-late { color: #b3261e; }
.crm-layout[hidden] { display: none; }
.avatar {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  background: #f1ebff; color: var(--violet); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em;
}
.lead-head { display: flex; gap: 16px; align-items: flex-start; }
.lead-head .card-title { margin: 0 0 2px; }
.lead-head .meta { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.lead-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f1f0ea; color: var(--ink-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip-active { background: #e3f7ec; color: #1f7a4d; }
.chip-at_risk { background: #fde3e1; color: #b3261e; }
.chip-paused, .chip-churned { background: #ecebe4; color: var(--ink-mute); }
.chip-onboarding { background: #f1ebff; color: var(--violet); }
.lead-section { padding: 22px 0; border-top: 1px solid var(--line); }
.lead-section > h3 { margin: 0 0 14px; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }
.lead-section .crm-answers { border-radius: 12px; margin: 4px 0 14px; }
.lead-section .crm-notes { margin: 0; padding: 0; border: 0; }
.lead-actions { padding-top: 18px; border-top: 1px solid var(--line); justify-content: space-between; align-items: center; }
#lead-detail .crm-quick { margin: 14px 0 18px; }

/* Team panel: client overview - health, numbers, activity */
.client-head { align-items: center; }
.client-head .avatar { width: 60px; height: 60px; font-size: 1.25rem; }
.client-head-main { flex: 1; min-width: 0; }
.client-viz { display: flex; flex-direction: column; gap: 24px; }
.viz-top { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.viz-timeline h3 { margin: 0 0 2px; font-size: 1.05rem; }
.viz-timeline .card-sub { margin: 0 0 12px; }
.health { padding: 16px 18px; border-radius: 14px; background: #f7f6f1; }
.health-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.health-label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); width: 100%; }
.health-score { font-size: 2.6rem; line-height: 1; }
.health-level { font-weight: 700; font-size: .9rem; }
.health-good { color: #1f7a4d; }
.health-warn { color: #8a5a00; }
.health-bad { color: #b3261e; }
.meter { height: 8px; margin: 12px 0 10px; border-radius: 99px; background: #e4e2da; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 99px; }
.meter-good { background: #1f9d63; }
.meter-warn { background: #e0a100; }
.meter-bad { background: #d93a33; }
.health-reasons { margin: 0; padding-left: 18px; font-size: .85rem; color: var(--ink-soft); }
.client-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.client-grid .crm-answers { border-radius: 12px; }
.origin-link { margin: 10px 0 0; }
.project-card.is-target { box-shadow: 0 0 0 3px var(--violet); }

/* Team panel: clients as case files on a board */
.case-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 22px; padding-top: 14px; }
.case-folder {
  position: relative; display: flex; flex-direction: column; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: left; transform: rotate(var(--tilt, 0deg)); transition: transform .2s;
}
.case-folder:hover, .case-folder:focus-visible { transform: rotate(0deg) translateY(-4px); }
.case-tab {
  align-self: flex-start; margin-left: 18px; padding: 6px 14px 4px; border-radius: 10px 10px 0 0; background: #e9d9a9;
  font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #6b5a2b;
}
.case-body {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 210px; padding: 22px 20px 18px;
  border-radius: 4px 14px 14px 14px; background: #f3e6bf; box-shadow: 0 1px 0 #d8c690 inset, 0 14px 30px -18px rgba(60, 40, 0, .55);
}
.case-folder:hover .case-body { box-shadow: 0 1px 0 #d8c690 inset, 0 20px 36px -18px rgba(60, 40, 0, .6); }
.case-name { font-size: 1.3rem; font-weight: 800; line-height: 1.15; padding-right: 92px; }
.case-who { color: #5c5236; font-size: .9rem; }
.case-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.case-tags .chip { background: rgba(255, 255, 255, .55); color: #4a4126; }
.case-facts { display: flex; gap: 14px; margin-top: auto; padding-top: 10px; border-top: 1px dashed #c9b57c; font-size: .8rem; color: #5c5236; }
.case-facts strong { color: var(--ink); font-size: .95rem; }
.case-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.case-flags:empty { display: none; }
.case-stamp {
  position: absolute; top: 16px; right: 14px; padding: 3px 8px; border: 2px solid currentColor; border-radius: 6px;
  font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  transform: rotate(6deg); opacity: .85;
}
.stamp-onboarding { color: #5e17eb; }
.stamp-active { color: #1f7a4d; }
.stamp-at_risk { color: #c0262d; }
.stamp-paused, .stamp-churned { color: #6f6a5c; }
.case-back { align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 700; color: var(--violet); }
.case-back:hover { text-decoration: underline; }
#client-case-view { display: flex; flex-direction: column; gap: 16px; }
#client-case-view[hidden], #client-board-view[hidden] { display: none; }
.stage-filter { flex-wrap: wrap; }

/* Team panel: the client's profile as a detective board (red strings to every fact) */
.evidence {
  --board: #17160f; --paper: #f4eedc; --string: #d9302f; --mono: ui-monospace, Consolas, "Courier New", monospace;
  position: relative; overflow: hidden; padding: 34px 28px 30px; border-radius: 20px; color: #f1ead6;
  background-color: var(--board);
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 0%, rgba(94, 23, 235, .25), transparent 60%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
.evidence::after {
  content: "CONFIDENTIAL"; position: absolute; right: -40px; bottom: 26px; transform: rotate(-12deg);
  font-family: var(--mono); font-size: 54px; font-weight: 800; letter-spacing: .2em; color: rgba(217, 48, 47, .07); pointer-events: none;
}
.evidence-strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.ev-string {
  fill: none; stroke: var(--string); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: ev-draw .9s ease forwards; animation-delay: var(--delay, 0s); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6));
}
@keyframes ev-draw { to { stroke-dashoffset: 0; } }
.ev-pin { position: relative; z-index: 2; }
.ev-pin::before {
  content: ""; position: absolute; top: 6px; left: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a80, var(--string) 55%, #7a1010); box-shadow: 0 2px 3px rgba(0, 0, 0, .6);
}
.ev-center {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(440px, 100%); margin: 0 auto 56px; padding: 24px 26px 18px;
  border-radius: 6px; background: var(--paper); color: #1d1a12; text-align: center; box-shadow: 0 18px 40px -20px #000;
}
.ev-center::before { left: 50%; margin-left: -6px; top: -4px; }
.ev-case { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: #7a6f55; }
.ev-company { font-size: 1.9rem; line-height: 1.1; }
.ev-persona { font-size: .9rem; color: #4a4434; max-width: 34ch; }
.ev-center .case-stamp { top: 14px; right: 12px; }
.ev-health { margin-top: 4px; font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.ev-health-good { color: #1f7a4d; }
.ev-health-warn { color: #8a5a00; }
.ev-health-bad { color: #c0262d; }
.ev-branches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ev-branch { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.ev-hub {
  padding: 6px 16px 6px 24px; border-radius: 999px; background: #2a281f; border: 1px solid #4a4636;
  font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ffd27a;
}
.ev-hub::before { top: 50%; margin-top: -6px; left: 6px; }
.ev-items { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.ev-card {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 24px; border-radius: 4px;
  background: var(--paper); color: #1d1a12; transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 10px 22px -14px #000; animation: ev-in .35s ease backwards; animation-delay: var(--delay, 0s);
}
@keyframes ev-in {
  from { opacity: 0; transform: translateY(6px) rotate(var(--tilt, 0deg)); }
  to { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
}
.ev-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #7a6f55; }
.ev-value, .ev-card a, .ev-copy { font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.ev-card a { color: #5e17eb; text-decoration: none; }
.ev-card a:hover { text-decoration: underline; }
.ev-copy { padding: 0; border: 0; background: none; cursor: copy; font: inherit; font-weight: 700; color: inherit; text-align: left; }
.ev-copy.is-copied::after { content: " copied"; font-family: var(--mono); font-size: 10px; color: #1f7a4d; }
.ev-card.is-unknown { background: #211f17; border: 1.5px dashed #6b6450; color: #c9bfa5; box-shadow: none; }
.ev-card.is-unknown .ev-value { font-family: var(--mono); letter-spacing: .14em; color: #e0605f; }
.ev-card.is-unknown .ev-label { color: #9a9079; }
@media (prefers-reduced-motion: reduce) {
  .ev-string { animation: none; stroke-dashoffset: 0; }
  .ev-card { animation: none; }
}
.profile-card-top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.profile-card .card-title { margin-bottom: 6px; }
.persona { margin: 0; max-width: 60ch; color: var(--ink-soft); }
.completeness { display: flex; flex-direction: column; min-width: 180px; }
.completeness .meter { margin: 6px 0 0; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }

/* Guided tour (tour.js): the page dims softly, a lit hole glides to each part,
   the explanation fades out while moving and back in next to the new part */
.tour-shade { position: fixed; inset: 0; z-index: 1000; background: transparent; }
.tour-ring {
  position: fixed; z-index: 1001; border-radius: 16px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 3px rgba(94, 23, 235, .9), 0 0 0 10px rgba(94, 23, 235, .18), 0 0 0 9999px rgba(12, 10, 24, .58);
  transition: opacity .45s ease, left .5s cubic-bezier(.22, .8, .24, 1), top .5s cubic-bezier(.22, .8, .24, 1),
              width .5s cubic-bezier(.22, .8, .24, 1), height .5s cubic-bezier(.22, .8, .24, 1);
}
.tour-ring.is-on { opacity: 1; }
.tour-box {
  position: fixed; z-index: 1002; width: min(380px, calc(100vw - 32px)); padding: 22px 22px 18px;
  border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
  transition: left .5s cubic-bezier(.22, .8, .24, 1), top .5s cubic-bezier(.22, .8, .24, 1), opacity .26s ease, transform .26s ease;
}
.tour-box.is-moving, .tour-box.is-leaving { opacity: 0; transform: translateY(8px) scale(.985); pointer-events: none; }
.tour-box.is-centred { width: min(460px, calc(100vw - 32px)); }
.tour-count { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--violet); }
.tour-title { margin: 0 0 8px; padding-right: 70px; font-size: 1.25rem; line-height: 1.25; }
.tour-text { margin: 0 0 14px; color: var(--ink-soft); line-height: 1.5; }
.tour-bar { height: 4px; margin-bottom: 14px; border-radius: 99px; background: #ebe9e1; overflow: hidden; }
.tour-bar span { display: block; height: 100%; background: var(--violet); transition: width .5s ease; }
.tour-actions { display: flex; align-items: center; gap: 12px; }
.tour-actions .tour-next { margin-left: auto; cursor: pointer; }
.tour-back[hidden] { display: none; }
.tour-play {
  padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink);
}
.tour-play[aria-pressed="true"] { border-color: var(--violet); color: var(--violet); }
.tour-skip {
  position: absolute; top: 16px; right: 16px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .82rem; color: var(--ink-mute);
}
.tour-skip:hover { color: var(--ink); text-decoration: underline; }
/* first visit: a small card slides up in the corner, the page stays usable */
.tour-invite {
  position: fixed; right: 24px; bottom: 24px; z-index: 990; display: flex; gap: 14px; width: min(380px, calc(100vw - 32px));
  padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(24px); transition: opacity .35s ease, transform .45s cubic-bezier(.22, .8, .24, 1);
}
.tour-invite.is-on { opacity: 1; transform: none; }
.tour-invite-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 50%; background: #f1ebff; color: var(--violet); font-size: 14px;
}
.tour-invite-body strong { display: block; margin-bottom: 4px; }
.tour-invite-body p { margin: 0 0 12px; color: var(--ink-soft); font-size: .92rem; line-height: 1.45; }
.tour-invite-actions { display: flex; align-items: center; gap: 14px; }
.tour-invite-actions .btn { cursor: pointer; }
.tour-invite-never { margin-top: 8px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: .8rem; color: var(--ink-mute); }
.tour-invite-never:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .tour-ring, .tour-box, .tour-bar span, .tour-invite { transition: none; }
}
.app-tour {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px;
  border: 1.5px dashed var(--violet); border-radius: 12px; background: #f7f3ff; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 700; color: var(--violet);
}
.app-tour:hover { background: #efe7ff; }

/* Leads: richer rows, value on the pipeline, quick actions, the card follows the scroll */
.crm-stage-v { font-size: .74rem; font-weight: 700; color: var(--ink-mute); }
.crm-stage[aria-pressed="true"] .crm-stage-v { color: #cfcde6; }
.lead-row { align-items: flex-start; gap: 12px; }
.avatar-sm { width: 36px; height: 36px; font-size: .82rem; margin-top: 2px; }
.lead-row .crm-row-main { flex: 1; }
.lead-row .crm-row-tags { flex-direction: column; align-items: flex-end; gap: 4px; }
.lead-next { margin-top: 3px; font-size: .8rem; font-weight: 600; color: var(--violet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-next.is-late { color: #b3261e; }
.lead-value { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
#lead-layout .crm-detail { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.lead-actions-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 0 0 6px; padding: 14px 16px;
  border-radius: 14px; background: #f7f6f1;
}
.lead-move, .lead-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lead-actions-bar .btn { cursor: pointer; padding: 7px 14px; font-size: 14px; }
.lead-won { border-color: #1f9d63; color: #1f7a4d; }
.lead-won:hover { border-color: #1f9d63; color: #1f9d63; }

/* Case file: edit facts right on the board, light up one branch on hover */
.evidence.is-static .ev-string { animation: none; stroke-dashoffset: 0; }
.evidence.is-static .ev-card { animation: none; }
.ev-string { transition: stroke .2s, stroke-width .2s, opacity .2s; }
.evidence[data-hl] .ev-string { opacity: .25; }
.evidence[data-hl="0"] .ev-string[data-branch="0"], .evidence[data-hl="1"] .ev-string[data-branch="1"],
.evidence[data-hl="2"] .ev-string[data-branch="2"], .evidence[data-hl="3"] .ev-string[data-branch="3"] {
  opacity: 1; stroke: #ff5a52; stroke-width: 2.4;
}
.ev-branch { transition: opacity .2s; }
.evidence[data-hl] .ev-branch { opacity: .7; }
.evidence[data-hl] .ev-branch:hover { opacity: 1; }
.ev-card { transition: transform .2s, box-shadow .2s; }
.ev-card:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 16px 26px -14px #000; }
.ev-card.is-editable { padding-right: 52px; }
.ev-edit, .ev-add {
  position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; cursor: pointer;
  font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.ev-edit { border: 1px solid #cbbf9c; background: transparent; color: #7a6f55; opacity: 0; transition: opacity .15s; }
.ev-card:hover .ev-edit, .ev-edit:focus-visible { opacity: 1; }
.ev-edit:hover { border-color: #5e17eb; color: #5e17eb; }
.ev-add { border: 1px solid #e0605f; background: transparent; color: #ff8a80; }
.ev-add:hover { background: #e0605f; color: #fff; }
.ev-card.is-editing { padding-right: 12px; transform: none; box-shadow: 0 0 0 2px #5e17eb, 0 16px 26px -14px #000; background: var(--paper); border: 0; }
.ev-card.is-editing .ev-label { color: #7a6f55; }
.ev-form { display: flex; flex-direction: column; gap: 6px; }
.ev-input {
  width: 100%; padding: 7px 9px; border: 1.5px solid #cbbf9c; border-radius: 8px; background: #fff;
  font: inherit; font-size: .9rem; color: #1d1a12;
}
.ev-input:focus { outline: none; border-color: #5e17eb; }
.ev-form-actions { display: flex; gap: 8px; }
.ev-save, .ev-cancel { padding: 4px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; }
.ev-save { border: 0; background: #1d1a12; color: #fff; }
.ev-save:hover { background: #5e17eb; }
.ev-cancel { border: 1px solid #cbbf9c; background: transparent; color: #4a4434; }
.ev-msg { font-size: .78rem; color: #c0262d; }
.ev-msg:empty { display: none; }
.missing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; }
.missing-label { font-size: .85rem; font-weight: 700; color: var(--ink-soft); margin-right: 4px; }
.missing-chip {
  padding: 4px 11px; border: 1.5px dashed #e0605f; border-radius: 999px; background: #fff; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; color: #b3261e;
}
.missing-chip:hover { background: #fde3e1; }
.missing-none { font-size: .88rem; font-weight: 700; color: #1f7a4d; }

/* Case file: calculated facts (AUTO) and the login email (LOGIN) are marked, everything else has Edit */
.ev-badge {
  position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 999px; border: 1px dashed #b9ad8c;
  font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: #8a7f63; cursor: help;
}
.ev-card.is-unknown .ev-badge { border-color: #6b6450; color: #9a9079; }
.ev-center:hover .ev-edit-center, .ev-edit-center:focus-visible { opacity: 1; }
.ev-edit-center { top: 12px; left: 14px; right: auto; }
.ev-form-center { align-items: center; width: 100%; }
.ev-input-center { max-width: 320px; font-size: 1.2rem; font-weight: 700; text-align: center; }

/* Drop-down lists in both panels (dropdown.js): a styled button + a list under it */
.dd { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; }
.field .dd, .ev-form .dd { display: block; width: 100%; }
/* the wrapper sits inside the field label: do not take the label's bold style */
.field > .dd { padding: 0; font-family: var(--font); font-size: inherit; font-weight: 400; color: inherit; }
.dd-native {
  position: absolute !important; inset: 0; width: 100% !important; height: 100% !important;
  opacity: 0; pointer-events: none; margin: 0;
}
.dd-btn {
  position: relative; display: flex; align-items: center; width: 100%; min-height: 0;
  border: 1.5px solid #dcdad2; background: #fff; color: var(--ink); cursor: pointer;
  font-family: var(--font); font-weight: 400; line-height: 1.5; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.dd-btn:hover { border-color: #b8a9ec; }
.dd-btn:focus-visible, .dd.is-open .dd-btn { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(94, 23, 235, .12); }
.dd-btn:disabled { background: #f1f0ea; color: var(--ink-soft); cursor: default; }
.dd-btn.is-empty .dd-label { color: #a5a39b; }
.dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn svg {
  position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s, stroke .2s;
}
.dd.is-open .dd-btn svg { transform: rotate(180deg); stroke: var(--violet); }
.dd-list {
  position: fixed; z-index: 1100; margin: 0; padding: 6px; list-style: none; overflow-y: auto;
  max-width: calc(100vw - 16px); background: #fff; border: 1.5px solid var(--violet); border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(30, 10, 80, .35);
  opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease;
}
.dd-list.is-up { transform: translateY(4px); }
.dd-list.is-on { opacity: 1; transform: none; }
.dd-list[hidden] { display: none; }
.dd-list li {
  position: relative; padding: 9px 34px 9px 12px; border-radius: 9px; cursor: pointer;
  font-size: .95rem; color: var(--ink); white-space: nowrap;
}
.dd-list li.is-active { background: #f4effe; }
.dd-list li[aria-selected="true"] { color: var(--violet); font-weight: 700; }
.dd-list li[aria-selected="true"]::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 10px; height: 5px; margin-top: -4px;
  border-left: 2px solid var(--violet); border-bottom: 2px solid var(--violet); transform: rotate(-45deg);
}
.dd-list li.dd-empty { color: var(--ink-mute); }
.dd-list li[aria-disabled="true"] { opacity: .4; cursor: default; }
/* sizes in tight places */
.crm-toolbar .dd-btn { max-width: 190px; }
@media (prefers-reduced-motion: reduce) { .dd-list, .dd-btn svg { transition: none; } }

/* Invoices: the last step of a project (client and team panel) */
.tracker { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-row-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invoice-list { display: flex; flex-direction: column; gap: 16px; }
.invoice-card { display: flex; flex-direction: column; gap: 18px; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.invoice-head h3 { margin: 0 0 4px; font-size: 1.15rem; }
.invoice-head .meta { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.invoice-status { display: flex; align-items: center; gap: 10px; }
.invoice-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.invoice-amounts > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #f7f6f1; }
.invoice-amounts span { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.invoice-amounts strong { font-size: 1.15rem; }
.invoice-amounts .invoice-total { background: #f1ebff; }
.invoice-amounts .invoice-total strong { font-size: 1.4rem; color: var(--violet); }
.invoice-note { margin: 0; color: var(--ink-soft); }
.invoice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.invoice-actions .btn { cursor: pointer; }
.invoice-paid { opacity: .85; }
.invoice-paid .invoice-total { background: #e3f7ec; }
.invoice-paid .invoice-total strong { color: #1f7a4d; }
.invoice-overdue { box-shadow: 0 0 0 2px #e0605f; }
.invoice-issued { box-shadow: 0 0 0 2px var(--violet); }
.badge-invoice-issued { border-color: var(--violet); color: var(--violet); }
.badge-invoice-overdue { border-color: #c0262d; color: #c0262d; }
.badge-invoice-payment_reported { border-color: #e0a100; color: #8a5a00; }
.badge-invoice-paid { border-color: var(--mint); color: #1f7a4d; }
.badge-invoice-cancelled { border-color: var(--line); color: var(--ink-mute); }
.transfer { padding: 16px 18px; border-radius: 14px; border: 1.5px dashed #cfc6ee; background: #fbf9ff; }
.transfer h4 { margin: 0 0 10px; font-size: .95rem; }
.transfer dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.transfer dt { color: var(--ink-soft); font-size: .9rem; }
.transfer dd { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.copy-btn { font-size: .82rem; font-weight: 700; flex-shrink: 0; }
.billing-card { grid-column: 1 / -1; }
.billing-card .form-actions { margin-top: 4px; }
#invoice-form .form-actions .btn { cursor: pointer; }

/* Invoices: one simple card each - number, amount, status, then actions */
.inv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 32px 0 14px; }
.inv-toolbar h2 { margin: 0; font-size: 1.3rem; }
.inv-simple { display: flex; flex-direction: column; gap: 16px; }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 28px; }
.inv-main h3 { margin: 0 0 4px; font-size: 1.15rem; }
.inv-main .meta, .inv-amount .meta { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.inv-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.inv-amount strong { font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.inv-state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 120px; }
.inv-due { font-size: .82rem; font-weight: 700; color: var(--violet); }
.inv-due-overdue { color: #c0262d; }
.inv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.inv-actions .btn { cursor: pointer; }
.inv-msg { margin: 0; color: var(--ink-soft); }
.inv-msg-ok { color: #1f7a4d; font-weight: 700; }
.inv-status-pick .dd-btn, .inv-status-pick select { min-width: 170px; }
.inv-transfer { border-radius: 12px; background: #f7f6f1; padding: 12px 16px; }
.inv-transfer summary { cursor: pointer; font-weight: 700; }
.inv-transfer dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 12px 0 2px; }
.inv-transfer dt { color: var(--ink-soft); }
.inv-transfer dd { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.inv-simple.invoice-overdue { box-shadow: 0 0 0 2px #e0605f; }
.inv-simple.invoice-paid, .inv-simple.invoice-cancelled { box-shadow: none; border: 1px solid var(--line); }
@media (max-width: 900px) {
  .inv-row { grid-template-columns: 1fr; gap: 10px; }
  .inv-amount, .inv-state { align-items: flex-start; }
}

/* Approvals: files waiting for the client's decision */
.tab-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.tab-count[hidden] { display: none; }
.review-list { display: flex; flex-direction: column; gap: 24px; }
.review-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 28px; }
.review-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.review-head .card-title { margin-bottom: 4px; overflow-wrap: anywhere; }
.review-head .meta { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.review-pending { box-shadow: 0 0 0 2px var(--violet); }
.review-preview { border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.review-preview video, .review-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.review-nofile { margin: 0; padding: 24px; color: #ddd; text-align: center; }
.review-media { min-width: 0; }
.review-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.review-sub { margin: 0; font-size: 1rem; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; }
.review-actions .btn { cursor: pointer; }
.btn-approve, .btn-dark { background: var(--ink); color: #fff; }
/* hover follows the site rule: outline only, never a fill */
.btn-approve:hover, .btn-dark:hover { background: #fff; border-color: var(--violet); color: var(--violet); }
.badge-review-pending { border-color: var(--violet); color: var(--violet); }
.badge-review-approved { border-color: var(--mint); color: #1f9d63; }
.badge-review-changes_requested { border-color: #e0a100; color: #9a6b00; }

/* Comments on a file */
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.comment { padding: 10px 12px; border-radius: 12px; background: #f7f6f1; }
.comment-team { background: #f7f3ff; }
.comment .meta { color: var(--ink-soft); font-size: .8rem; }
.comment p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.comments .empty { font-size: .9rem; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
/* comments about a second of the video: markers under the preview, chips in the comments */
.time-marks { position: relative; height: 14px; margin: 8px 6px 0; border-radius: 99px; background: #ece9f8; }
.time-mark { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--violet); cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.time-mark:hover, .time-mark:focus-visible { transform: scale(1.25); outline: none; }
.time-chip { display: inline-block; margin-right: 4px; padding: 0 8px; border: 0; border-radius: 99px; background: var(--violet); color: #fff; font: inherit; font-size: .8rem; font-weight: 700; line-height: 1.6; cursor: pointer; vertical-align: 1px; }
.comment-at { align-self: flex-start; margin-top: 10px; font-weight: 700; }
.comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #dcdad2; border-radius: 12px;
  font: inherit; font-size: .95rem; resize: vertical; background: #fff;
}
.comment-form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(94, 23, 235, .12); }
.comment-form .btn { align-self: flex-end; padding-top: 8px; padding-bottom: 8px; cursor: pointer; }
.file-review { flex-wrap: wrap; }
.file-extra { flex-basis: 100%; }
.file-comments { margin-top: 10px; }
.file-comments[hidden] { display: none; }
.crm-row-flags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.crm-row-flags .badge { font-size: 11px; padding: 2px 8px; }
.feedback-list { display: flex; flex-direction: column; gap: 12px; }
.feedback-list .crm-answers { margin-top: 10px; border-radius: 10px; }

/* Brief */
.brief-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1.5px solid #dcdad2; border-radius: 999px; cursor: pointer;
  font-size: .92rem; white-space: nowrap; flex-shrink: 0; transition: border-color .2s, background .2s;
}
.check input { accent-color: var(--violet); }
.check:hover, .check:has(input:checked) { border-color: var(--violet); color: var(--violet); }
.brief-list { display: flex; flex-direction: column; gap: 12px; }
.brief-card { padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 14px; }
.brief-card p { margin: .45em 0 0; font-size: .95rem; }
.brief-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brief-head h3 { margin: 0; font-size: 1.02rem; }
.brief-card .meta, .file .meta { color: var(--ink-soft); font-size: .85rem; }
.badge { padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-family: var(--font-brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge-in_progress { border-color: var(--violet); color: var(--violet); }
.badge-done { border-color: var(--mint); }
.status-select { padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: .85rem; background: #fff; }
.empty { margin: 0; color: var(--ink-soft); }

/* Materials */
.materials { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.upload { margin-bottom: 20px; }
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 20px; text-align: center; cursor: pointer;
  border: 2px dashed #c9c7bf; border-radius: 16px; background: var(--bg);
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--violet); background: rgba(94, 23, 235, .05); }
.dropzone.has-files { border-color: var(--mint); border-style: solid; }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { border-color: var(--violet); }
.dz-icon { width: 32px; height: 32px; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dz-text { font-weight: 600; }
.dz-text u { color: var(--violet); text-underline-offset: 3px; }
.dz-hint { font-size: .85rem; color: var(--ink-soft); }
.dz-picked { font-size: .88rem; overflow-wrap: anywhere; }
.files { list-style: none; margin: 0; padding: 0; }
.file { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.file-info { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-actions { display: flex; gap: 16px; flex-shrink: 0; }
.files .empty { padding: 14px 0; border-top: 1px solid var(--line); }

/* CRM: leads (admin) */
.panel.is-admin .app-nav .admin-only { display: flex; }
.panel.on-leads .client-pick { display: none; }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.nav-count[hidden] { display: none; }
.crm-pipeline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.crm-stage {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 96px;
  padding: 10px 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font: inherit; font-size: .85rem; color: var(--ink-soft); text-align: left; transition: border-color .2s, color .2s;
}
.crm-stage-n { font-size: 1.35rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.crm-stage:hover { border-color: var(--violet); }
.crm-stage[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.crm-stage[aria-pressed="true"] .crm-stage-n { color: #fff; }
.crm-stage-new .crm-stage-n { color: var(--violet); }
.crm-stage-won .crm-stage-n { color: #1f9d63; }
.crm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.crm-toolbar .field input, .crm-toolbar .field select { padding: 10px 12px; font-size: .92rem; }
.crm-search { flex: 1 1 240px; }
.crm-toolbar .btn { cursor: pointer; }
.crm-toolbar .crm-search { flex: 1 1 200px; }
.crm-toolbar .field select { max-width: 160px; }
.crm-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
/* Team panel: client detail (profile, briefs, files) and team */
.client-detail { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.client-detail[hidden] { display: none; }
.team-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.team-sub { margin-top: 32px; }
.no-access .app-nav { display: none; }
.crm-list-card { padding: 8px; }
.crm-list { display: flex; flex-direction: column; max-height: 72vh; overflow-y: auto; }
.crm-list .empty { padding: 20px; }
.crm-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: left; transition: background .15s;
}
.crm-row + .crm-row { margin-top: 2px; }
.crm-row:hover { background: var(--bg); }
.crm-row.is-active { background: rgba(94, 23, 235, .08); }
.crm-row-main { display: flex; flex-direction: column; min-width: 0; }
.crm-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-row.is-new .crm-row-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--violet); vertical-align: middle; }
.crm-row .meta, .crm-detail .meta, .crm-notes .meta { color: var(--ink-soft); font-size: .85rem; }
.crm-row-tags { display: flex; gap: 6px; flex-shrink: 0; }
.tag { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag-hot { background: #fde3e1; color: #b3261e; }
.tag-warm { background: #fff1d6; color: #8a5a00; }
.tag-cold { background: #e6eef8; color: #2b5a8a; }
.badge-lead-new, .badge-lead-proposal { border-color: var(--violet); color: var(--violet); }
.badge-lead-qualified { border-color: var(--ink); }
.badge-lead-won { border-color: var(--mint); color: #1f9d63; }
.badge-lead-lost, .badge-lead-spam { border-color: var(--line); color: var(--ink-mute); }
.crm-detail-head .card-title { margin-bottom: 4px; }
.crm-detail-head .meta { margin: 0 0 12px; }
.crm-quick { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 22px; }
.crm-quick a { color: var(--violet); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.crm-quick a:hover { text-decoration: underline; }
.crm-answers { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; padding: 14px 16px; background: #f7f6f1; font-size: .92rem; }
.crm-answers dt { color: var(--ink-soft); }
.crm-answers dd { margin: 0; overflow-wrap: anywhere; }
.crm-cats { padding: 16px; border-radius: 14px; background: var(--bg); }
.crm-detail .field input, .crm-detail .field select, .crm-detail .field textarea { padding: 10px 12px; font-size: .95rem; }
.crm-detail .form-actions { align-items: center; justify-content: space-between; }
.crm-notes { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.crm-notes h3 { margin: 0 0 12px; font-size: 1.02rem; }
.crm-note-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.crm-note-form textarea { flex: 1; min-height: 0; padding: 10px 12px; border: 1.5px solid #dcdad2; border-radius: 12px; font: inherit; font-size: .95rem; resize: vertical; }
.crm-note-form textarea:focus { outline: none; border-color: var(--violet); }
.crm-note-form .btn { cursor: pointer; }
.crm-note-list { list-style: none; margin: 0; padding: 0; }
.crm-note-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.crm-note-list p { margin: 2px 0 0; white-space: pre-line; }

@media (max-width: 1240px) {
  .app-main { padding: 36px 32px 64px; }
  .brief-layout, .materials, .crm-layout { grid-template-columns: 1fr; }
}

/* Cookie consent ---------------------------------------------------- */
.cookie-banner {
  position: fixed; left: 24px; bottom: 24px; z-index: 90;
  width: min(440px, calc(100vw - 32px));
  padding: 22px 24px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 24px 48px -20px rgba(0, 0, 0, .35);
  animation: cookie-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cookie-title { margin: 0 0 6px; font-family: var(--font-brand); font-size: 16px; font-weight: 700; color: var(--violet); }
.cookie-text { margin: 0 0 16px; font-size: .92rem; line-height: 1.55; color: var(--ink); }
.cookie-text a { color: var(--ink); }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cookie-actions .btn { cursor: pointer; }
.cookie-settings-link { margin-left: 4px; font-size: .9rem; }

.cookie-dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 28px; border: 0; border-radius: 20px;
  background: #fff; color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4);
}
.cookie-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.cookie-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer;
}
.cookie-row-text { display: flex; flex-direction: column; gap: 2px; }
.cookie-row-text span { font-size: .88rem; color: var(--ink); }
.cookie-dialog .cookie-actions { margin-top: 18px; }
/* toggle switch */
.cookie-switch {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  position: relative; width: 44px; height: 26px; margin: 0;
  border-radius: 999px; background: #d9d7cf; cursor: pointer; transition: background .2s;
}
.cookie-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.cookie-switch:checked { background: var(--violet); }
.cookie-switch:checked::after { transform: translateX(18px); }
.cookie-switch:disabled { opacity: .55; cursor: not-allowed; }
.cookie-switch:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }


/* Legal pages */
.legal .prose { padding-top: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.legal th, .legal td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { font-family: var(--font-brand); font-size: 14px; }
.legal code { font-size: .88em; }

@media (max-width: 600px) {
  .cookie-banner { left: 16px; right: 16px; bottom: 16px; width: auto; padding: 18px; }
  .cookie-actions .btn { flex: 1 1 auto; justify-content: center; }
  .cookie-settings-link { flex-basis: 100%; margin: 4px 0 0; text-align: center; }
}

/* Square buttons: no rounded corners anywhere */
.btn,
.account-links .account-signup,
.app-nav button,
.app-logout,
.check,
.site-footer .email-menu button,
.site-footer .email-menu a { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* File fields in the panels (e.g. the invoice PDF): a button in the site style instead of the system one */
.field input[type="file"] { padding: 10px 12px; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff;
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink); cursor: pointer; transition: border-color .2s, color .2s;
}
.field input[type="file"]::file-selector-button:hover { border-color: var(--violet); color: var(--violet); }
.cap-screen:has(.cap-big) img { max-height: 46%; margin-top: 38%; }

/* Brief: voices to listen to and pick */
.vo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.vo-card { display: flex; align-items: stretch; gap: 0; border: 1.5px solid #dcdad2; border-radius: 12px; background: #fff; overflow: hidden; }
.vo-card:has([aria-checked="true"]) { border-color: var(--violet); background: #f7f3ff; }
.vo-play {
  flex: none; width: 58px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; position: relative;
}
.vo-play::before {   /* play triangle, or two pause bars while playing */
  content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--violet);
}
.vo-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff;
}
.vo-play[aria-pressed="true"]::after { width: 10px; height: 11px; border: 0; transform: translate(-50%, -50%); background: linear-gradient(90deg, #fff 35%, transparent 35% 65%, #fff 65%); }
.vo-play[aria-pressed="true"]::before { animation: vo-pulse 1s ease-in-out infinite alternate; }
@keyframes vo-pulse { to { box-shadow: 0 0 0 6px rgba(94, 23, 235, .18); } }
.vo-play:focus-visible, .vo-pick:focus-visible { outline: 2px solid var(--violet); outline-offset: -3px; }
.vo-pick { flex: 1; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 10px 12px; border: 0; background: transparent; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.vo-name { font-weight: 800; }
.vo-who { align-self: center; padding: 0 7px; border-radius: 99px; background: #efede6; font-size: .72rem; font-weight: 700; color: var(--ink-soft); }
.vo-text { grid-column: 1 / -1; font-size: .82rem; line-height: 1.35; color: var(--ink-soft); }
.vo-pick[aria-checked="true"] .vo-name { color: var(--violet); }
.vo-other { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .vo-play[aria-pressed="true"]::before { animation: none; } }

/* Brief: how the video ends - end card (we design it / the client sends it) or a call to action */
.end-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.end-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.end-card-title { font-size: 1.05rem; }
.end-card-text { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.end-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.end-form:empty { display: none; }
.end-label { margin: 0; font-weight: 700; }
@media (max-width: 600px) { .end-cards { grid-template-columns: 1fr; } }
.pp-test { text-align: center; color: #9a6400; }
.pp-count { margin: 0 0 10px; font-weight: 800; color: var(--violet); }

/* Brief: video styles - short technical animations with the client's product (lk = look) */
.look-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.lk { --t: translate(-50%, -50%); }
.lk .lk-prod { position: absolute; left: 50%; top: 52%; max-width: 58%; max-height: 52%; object-fit: contain; transform: var(--t); filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .22)); z-index: 2; }
.lk .lk-shape { width: 30%; height: 44%; border-radius: 10px 10px 6px 6px; background: linear-gradient(160deg, #fff, #d8cfe8); box-shadow: inset 0 -8px 0 #b9a8d6; }
/* relay: hands pass the product across, blur on the way out */
.lk-hand { position: absolute; top: 46%; width: 30%; height: 16%; border-radius: 40% 60% 60% 40%; background: #e9b99a; z-index: 3; }
.lk-hand-l { left: -32%; animation: lk-hand-l 3s infinite; }
.lk-hand-r { right: -32%; border-radius: 60% 40% 40% 60%; animation: lk-hand-r 3s infinite; }
.lk-relay .lk-prod { animation: lk-relay 3s infinite; }
@keyframes lk-relay { 0% { transform: translate(-190%, -50%); filter: blur(3px); } 18%, 52% { transform: var(--t); filter: none; } 70%, 100% { transform: translate(120%, -50%); filter: blur(4px); } }
@keyframes lk-hand-l { 0% { left: -32%; } 18%, 30% { left: 2%; } 45%, 100% { left: -32%; } }
@keyframes lk-hand-r { 0%, 30% { right: -32%; } 45%, 52% { right: 4%; } 70%, 100% { right: -32%; } }
/* 360: a turntable */
.lk-turn .lk-prod { animation: lk-turn 3.2s linear infinite; }
@keyframes lk-turn { 0% { transform: var(--t) scaleX(1); } 25% { transform: var(--t) scaleX(.08); } 50% { transform: var(--t) scaleX(-1); } 75% { transform: var(--t) scaleX(-.08); } 100% { transform: var(--t) scaleX(1); } }
.lk-turn::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 18%; height: 7%; border-radius: 50%; background: rgba(0, 0, 0, .14); }
/* hero reveal: dark to light, a light sweep */
.lk-reveal { background: #111 !important; }
.lk-reveal .lk-prod { animation: lk-reveal 3.4s infinite; }
@keyframes lk-reveal { 0% { opacity: 0; transform: var(--t) scale(.85); filter: brightness(.2); } 35%, 85% { opacity: 1; transform: var(--t) scale(1); filter: brightness(1); } 100% { opacity: 0; } }
.lk-light { position: absolute; inset: 0; z-index: 3; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%); background-size: 300% 100%; animation: lk-light 3.4s infinite; }
@keyframes lk-light { 0%, 30% { background-position: 120% 0; } 70%, 100% { background-position: -20% 0; } }
/* close-ups: slow push in to a detail */
.lk-close .lk-prod { animation: lk-close 3.6s ease-in-out infinite; }
@keyframes lk-close { 0%, 10% { transform: var(--t) scale(1); } 45%, 60% { transform: translate(-40%, -20%) scale(2.4); } 95%, 100% { transform: var(--t) scale(1); } }
/* floating */
.lk-float .lk-prod { animation: lk-float 2.8s ease-in-out infinite; }
@keyframes lk-float { 0%, 100% { transform: translate(-50%, -56%) rotate(-4deg); } 50% { transform: translate(-50%, -44%) rotate(4deg); } }
.lk-shadow { position: absolute; left: 30%; right: 30%; bottom: 14%; height: 5%; border-radius: 50%; background: rgba(0, 0, 0, .18); animation: lk-shadow 2.8s ease-in-out infinite; }
@keyframes lk-shadow { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }
/* unboxing */
.lk-box { position: absolute; left: 20%; right: 20%; bottom: 14%; height: 34%; z-index: 3; border-radius: 3px; background: linear-gradient(#c9a77c, #a8845a); }
.lk-lid { position: absolute; left: 17%; right: 17%; bottom: 46%; height: 8%; z-index: 4; border-radius: 3px; background: #b8946a; transform-origin: 0 100%; animation: lk-lid 3.4s infinite; }
@keyframes lk-lid { 0%, 15% { transform: none; } 35%, 85% { transform: rotate(-70deg) translateY(-10px); } 100% { transform: none; } }
.lk-unbox .lk-prod { animation: lk-unbox 3.4s infinite; }
@keyframes lk-unbox { 0%, 25% { transform: translate(-50%, 0%) scale(.8); } 50%, 85% { transform: translate(-50%, -70%) scale(1); } 100% { transform: translate(-50%, 0%) scale(.8); } }
/* before and after */
.lk-half { position: absolute; top: 0; bottom: 0; width: 50%; padding-top: 10%; font-size: .5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.lk-before { left: 0; background: #d9d2c7; color: #6b6458; }
.lk-after { right: 0; background: #fbf3ea; color: var(--violet); }
.lk-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; z-index: 3; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .3); animation: lk-line 3s ease-in-out infinite; }
@keyframes lk-line { 0%, 100% { left: 25%; } 50% { left: 75%; } }
/* ingredients and splash */
.lk-drop { position: absolute; left: 50%; top: 52%; width: 9%; aspect-ratio: 1; border-radius: 50% 50% 50% 0; background: radial-gradient(circle at 35% 35%, #fff, #8fd3ff); z-index: 1; animation: lk-drop 2.6s calc(var(--i) * .25s) ease-out infinite; }
.lk-drop:nth-child(odd) { background: radial-gradient(circle at 35% 35%, #fff, #ffc2d6); }
@keyframes lk-drop { 0% { transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translateY(0) scale(.3); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translateY(-260%) scale(1); opacity: 0; } }
/* bold words */
.lk-word { position: absolute; left: 0; right: 0; top: 12%; z-index: 3; text-align: center; font-size: 1rem; font-weight: 1000; text-transform: uppercase; letter-spacing: -.02em; color: var(--violet); opacity: 0; animation: lk-word 3s calc(var(--i) * 1s) infinite; }
@keyframes lk-word { 0% { opacity: 0; transform: scale(1.6); } 6%, 28% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; } }
/* lifestyle scene */
.lk-scene { background: linear-gradient(#f6e7d4 0 62%, #c79f7a 62%) !important; }
.lk-window { position: absolute; left: 12%; top: 10%; width: 36%; height: 30%; border: 3px solid #fff; background: linear-gradient(#bfe3f7, #f4fbff); box-shadow: 0 0 20px rgba(255, 220, 160, .8); }
.lk-table { position: absolute; left: 0; right: 0; top: 62%; height: 3%; background: #a7805d; }
.lk-plant { position: absolute; right: 10%; top: 40%; width: 14%; height: 22%; border-radius: 50% 50% 4px 4px; background: radial-gradient(circle at 50% 30%, #6fbf73, #3e8e47); }
.lk-scene .lk-prod { top: 47%; max-height: 34%; animation: lk-breathe 4s ease-in-out infinite; }
@keyframes lk-breathe { 50% { transform: var(--t) scale(1.06); } }
/* price and offer */
.lk-tag { position: absolute; right: 10%; top: 14%; z-index: 3; padding: 4px 6px; border-radius: 50%; background: #e0263a; color: #fff; font-size: .62rem; font-weight: 1000; animation: lk-pop 2.4s infinite; }
.lk-price { position: absolute; left: 50%; bottom: 10%; z-index: 3; padding: 2px 9px; border-radius: 99px; background: #15121a; color: #fff; font-size: .62rem; font-weight: 900; white-space: nowrap; transform: translateX(-50%); animation: lk-pop 2.4s .4s infinite; }
@keyframes lk-pop { 0%, 10% { scale: 0; } 20% { scale: 1.25; } 28%, 85% { scale: 1; } 100% { scale: 0; } }
/* fast cuts */
.lk-cuts .lk-prod { animation: lk-cuts 1.8s steps(1) infinite; }
@keyframes lk-cuts { 0% { transform: var(--t) scale(1); } 25% { transform: translate(-50%, -35%) scale(1.9); } 50% { transform: translate(-70%, -50%) scale(1.3) rotate(-8deg); } 75% { transform: translate(-30%, -60%) scale(2.4); } }
.lk-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; animation: lk-flash 1.8s infinite; }
@keyframes lk-flash { 0%, 24%, 49%, 74% { opacity: 0; } 25%, 50%, 75% { opacity: .7; } 26%, 51%, 76% { opacity: 0; } }
/* stop motion */
.lk-stop .lk-prod { animation: lk-stop 2.4s steps(1) infinite; }
@keyframes lk-stop { 0% { transform: translate(-80%, -50%) rotate(-12deg); } 20% { transform: translate(-65%, -55%) rotate(-4deg); } 40% { transform: translate(-50%, -50%) rotate(6deg); } 60% { transform: translate(-35%, -55%) rotate(-2deg); } 80% { transform: translate(-20%, -50%) rotate(10deg); } }
/* you choose */
.lk-choose .lk-prod { opacity: .35; }
.lk-q { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); font-size: 2rem; font-weight: 1000; color: var(--violet); animation: lk-pop 2.4s infinite; }
@media (prefers-reduced-motion: reduce) { .lk *, .lk::after { animation: none !important; } }

/* Brief: live preview of the video from the style question on - a big phone where the choices stack up */
/* with the preview the brief uses the whole width: questions on the left, the phone in the free space on the right */
.app-main:has(.brief-layout.has-preview) { max-width: none; }
.brief-new:has(.brief-layout.has-preview) { max-width: none; }
.brief-layout.has-preview { display: grid; grid-template-columns: minmax(0, 820px) minmax(320px, 1fr); gap: 40px; align-items: start; }
.brief-layout.has-preview .pv { justify-self: center; width: 100%; max-width: 420px; }
.pv { position: sticky; top: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pv[hidden] { display: none; }
.pv-title { margin: 0; align-self: flex-start; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }
/* the small preview phone (same as the style cards) drawn 2.5 times bigger, so text and motion stay sharp */
.pv-phone { position: relative; }
.pv-phone.is-portrait, .pv-phone.is-square { width: 295px; height: 558px; }
.pv-phone.is-landscape { width: 324px; height: 171px; }
.pv-scale { position: absolute; left: 0; top: 0; display: block; transform-origin: 0 0; }
.pv-phone.is-portrait .pv-scale, .pv-phone.is-square .pv-scale { transform: scale(2.5); }
.pv-phone.is-landscape .pv-scale { transform: scale(1.8); }
.pv-phone .cap-phone { box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.pv .cap-sample { z-index: 5; }
/* the ending shows at the end of every loop */
.pv-end { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10%; opacity: 0; animation: pv-end 6s infinite; }
@keyframes pv-end { 0%, 62% { opacity: 0; } 70%, 94% { opacity: 1; } 100% { opacity: 0; } }
.pv-end-card { background: #15121a; color: #fff; }
.pv-end-card img { max-width: 60%; max-height: 38%; object-fit: contain; }
.pv-end-line { display: block; width: 60%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .7); }
.pv-end-price { padding: 1px 8px; border-radius: 99px; background: #fff; color: #15121a; font-size: .5rem; font-weight: 900; }
.pv-end-btn { padding: 2px 8px; border-radius: 4px; border: 1px solid #fff; font-size: .4rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pv-end-cta { background: rgba(21, 18, 26, .55); }
.pv-end-cta span { padding: 4px 8px; background: #fff; color: #15121a; font-size: .55rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; text-align: center; }
/* what is chosen so far */
.pv-list { align-self: stretch; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pv-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: .9rem; animation: wizard-in .3s ease; }
.pv-list li.is-now { color: var(--violet); font-weight: 700; }
.pv-k { color: var(--ink-soft); }
.pv-list li.is-now .pv-k { color: var(--violet); }
.pv-v { text-align: right; font-weight: 700; }
@media (min-width: 1600px) and (min-height: 1150px) {
  .pv-phone.is-portrait, .pv-phone.is-square { width: 354px; height: 669px; }
  .pv-phone.is-portrait .pv-scale, .pv-phone.is-square .pv-scale { transform: scale(3); }
  .pv-phone.is-landscape { width: 414px; height: 218px; }
  .pv-phone.is-landscape .pv-scale { transform: scale(2.3); }
}
@media (max-width: 1000px) {
  .brief-layout.has-preview { grid-template-columns: 1fr; }
  .pv { position: static; }
}
@media (prefers-reduced-motion: reduce) { .pv-end { animation: none; opacity: 0; } }

/* ---- 2FA / security modal + team "view only" (added with team access) ---- */
.app-security.needs-2fa { position: relative; }
.app-security.needs-2fa::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e0a500; }
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 10, 15, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000; }
.modal-card { max-width: 420px; width: 100%; max-height: 90vh; overflow: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.modal-head .card-title { margin: 0; }
.modal-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: inherit; padding: 0 4px; }
.modal-body p { margin: 0 0 12px; }
.mfa-qr { display: flex; justify-content: center; margin: 10px 0; }
.mfa-qr img { width: 184px; height: 184px; background: #fff; padding: 8px; border-radius: 8px; }
.mfa-secret { font-size: 14px; word-break: break-all; }
.mfa-secret code { background: rgba(127, 127, 127, .15); padding: 2px 6px; border-radius: 4px; }
.mfa-code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-gate { max-width: 320px; margin: 0 auto; }
.readonly-flag { font-size: 13px; color: #b08900; margin: 2px 0 0; }
.is-readonly form [type="submit"], .is-readonly .link-danger { display: none !important; }
.is-readonly .status-select { pointer-events: none; opacity: .65; }
