/* ==========================================================================
   BACC Tanzania design system
   Brand palette and typography preserved from the original site:
   red #E31E24, dark red #B91C1C, light red #FEF2F2, Poppins.
   ========================================================================== */

:root {
  --brand: #E31E24;
  --brand-dark: #B91C1C;
  --brand-darker: #991B1B;
  --brand-light: #FEF2F2;
  --brand-ring: rgba(227, 30, 36, 0.22);

  --ink: #111827;
  --ink-2: #1F2937;
  --text: #374151;
  --muted: #6B7280;
  --subtle: #9CA3AF;
  --line: #E5E7EB;
  --line-2: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --surface-3: #F3F4F6;

  --success: #047857;
  --success-bg: #ECFDF5;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --info: #1D4ED8;
  --info-bg: #EFF6FF;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.08), 0 4px 12px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 10px 30px rgba(17, 24, 39, 0.10);
  --container: 1180px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 600; line-height: 1.25; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-light); color: var(--brand-darker); }

.icon { flex: none; vertical-align: middle; }
.sr-only { position: absolute; 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: 1rem; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

/* Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 820px; }
.container-tight { max-width: 560px; }
.section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.section-sm { padding: 2.5rem 0; }
.section-muted { background: var(--surface-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: .75rem; }
.lead { font-size: 1.125rem; color: var(--muted); }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.sticky { position: sticky; top: 92px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .layout-sidebar { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  body { font-size: 15px; }
}

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.15rem; border-radius: var(--radius-sm);
  font: 500 .95rem/1.2 var(--font); border: 1px solid transparent; cursor: pointer;
  text-decoration: none !important; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: #D1D5DB; }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: #fff; color: var(--danger); border-color: #FECACA; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #065F46; color: #fff; }
.btn-sm { min-height: 34px; padding: .35rem .75rem; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; }

/* Badges & pills -------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 500; line-height: 1.5; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge-brand { background: var(--brand-light); color: var(--brand-darker); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--surface-3); color: var(--muted); }

/* Cards ------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card-lg { padding: clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.card-flat { background: var(--surface-2); border-color: var(--line-2); }
.card-hover { transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.card-hover:hover { border-color: #D1D5DB; box-shadow: var(--shadow); }
.card-title { font-size: 1.1rem; margin-bottom: .35rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.icon-tile { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-light); color: var(--brand-dark); margin-bottom: 1rem; }

/* Header ------------------------------------------------------------------ */
.announcement { background: var(--ink); color: #E5E7EB; font-size: .875rem; }
.announcement .container { display: flex; gap: .75rem; align-items: center; justify-content: center; padding-top: .55rem; padding-bottom: .55rem; text-align: center; flex-wrap: wrap; }
.announcement a { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.announcement-warning { background: #78350F; }
.announcement-success { background: #064E3B; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 600; font-size: 1.05rem; text-decoration: none !important; }
.brand img { height: 40px; width: auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav a { color: var(--ink-2); font-size: .92rem; font-weight: 500; padding: .5rem .75rem; border-radius: var(--radius-sm); text-decoration: none; }
.nav a:hover { background: var(--surface-3); }
.nav a.active { color: var(--brand-dark); }
.nav-dropdown { position: relative; }
.nav-dropdown > button { background: none; border: 0; font: 500 .92rem var(--font); color: var(--ink-2); padding: .5rem .75rem; border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; }
.nav-dropdown > button:hover { background: var(--surface-3); }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem; display: none; }
.nav-dropdown.open .nav-menu { display: block; }
.nav-menu a { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .75rem; border-radius: var(--radius-sm); }
.nav-menu a strong { display: block; color: var(--ink); font-weight: 500; }
.nav-menu a span { display: block; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.nav-menu .icon { color: var(--brand-dark); margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.lang-form { display: inline-flex; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.lang-switch button { background: #fff; border: 0; padding: .3rem .55rem; font: 500 .78rem var(--font); color: var(--muted); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }

@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .nav, .header-actions .desktop-only { display: none; }
  .site-header.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; box-shadow: var(--shadow-lg); gap: 0;
  }
  .site-header.nav-open .nav a, .site-header.nav-open .nav-dropdown > button { padding: .8rem .5rem; border-bottom: 1px solid var(--line-2); border-radius: 0; width: 100%; justify-content: space-between; }
  .site-header.nav-open .nav-menu { position: static; display: block; box-shadow: none; border: 0; min-width: 0; padding: 0 0 .5rem .5rem; }
  .site-header.nav-open .nav-menu a { border-bottom: 0; }
  .site-header .nav .mobile-only { display: flex; }
}
.nav .mobile-only { display: none; }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(2.5rem, 2rem + 3vw, 4.5rem); background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%); border-bottom: 1px solid var(--line-2); }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-meta .icon { color: var(--success); }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #fff; }
.hero-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.5rem; }
.hero-panel h2 { font-size: 1rem; margin-bottom: 1rem; }
.hero-panel-item { display: flex; gap: .9rem; align-items: center; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none !important; }
.hero-panel-item + .hero-panel-item { margin-top: .65rem; }
.hero-panel-item:hover { border-color: #D1D5DB; background: var(--surface-2); }
.hero-panel-item .icon-tile { margin: 0; width: 42px; height: 42px; }
.hero-panel-item strong { display: block; font-weight: 500; }
.hero-panel-item span { display: block; font-size: .85rem; color: var(--muted); }
.hero-panel-item .price { margin-left: auto; text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; font-size: .92rem; }

.page-hero { padding: clamp(2.5rem, 2rem + 2vw, 3.75rem) 0; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.page-hero h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: .5rem; }
.page-hero .lead { margin: 0; max-width: 62ch; }
.breadcrumbs { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: .9rem; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--subtle); }
.breadcrumbs a { color: var(--muted); }

/* Service cards ------------------------------------------------------------ */
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card p { color: var(--muted); }
.service-card .features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.service-card .features li { display: flex; gap: .55rem; align-items: flex-start; padding: .3rem 0; font-size: .92rem; }
.service-card .features .icon { color: var(--success); margin-top: 3px; }
.service-card .card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2); }
.price-tag { font-weight: 600; color: var(--ink); font-size: 1.15rem; }
.price-tag small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }
.price-old { text-decoration: line-through; color: var(--subtle); font-weight: 400; font-size: .85rem; margin-right: .35rem; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.step { position: relative; padding-top: 3.25rem; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font-weight: 600; font-size: .95rem; color: var(--brand-dark); background: var(--brand-light); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.step h3 { font-size: 1.02rem; }
.step p { color: var(--muted); font-size: .94rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.highlight { display: flex; gap: 1rem; }
.highlight .icon-tile { margin: 0; }
.highlight h3 { font-size: 1rem; margin-bottom: .3rem; }
.highlight p { color: var(--muted); font-size: .94rem; margin: 0; }

.cta-band { background: var(--ink); color: #D1D5DB; border-radius: var(--radius-lg); padding: clamp(2rem, 1.5rem + 2vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { margin: 0; max-width: 56ch; }

/* Prose ------------------------------------------------------------------- */
.prose { color: var(--text); }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }
.prose > :first-child { margin-top: 0; }

/* FAQ --------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 0; display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 0 1.25rem; color: var(--muted); max-width: 72ch; }

/* Forms -------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .label { font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.field .hint, .hint { font-size: .8rem; color: var(--muted); }
.req { color: var(--brand-dark); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field input[type="url"], .field input[type="search"], .field select, .field textarea, .select, .textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; font: 400 .95rem/1.4 var(--font); color: var(--ink);
  background: #fff; border: 1px solid #D1D5DB; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
.field textarea, .textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.errorlist { list-style: none; margin: .25rem 0 0; padding: 0; color: var(--danger); font-size: .82rem; }
.form-errors { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; border-radius: var(--radius-sm); padding: .75rem 1rem; font-size: .9rem; margin-bottom: 1rem; }
.form-errors ul { margin: 0; padding-left: 1rem; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.form-actions { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; border: 1px solid #D1D5DB; border-radius: var(--radius); font-weight: 500; color: var(--ink); background: #fff; }
.choice span small { font-weight: 400; color: var(--muted); }
.choice input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); background: var(--brand-light); }
.choice input:focus-visible + span { outline: 3px solid var(--brand-ring); }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.75rem 1rem; border: 1.5px dashed #D1D5DB; border-radius: var(--radius); background: var(--surface-2); text-align: center; color: var(--muted); cursor: pointer; position: relative; }
.file-drop:hover { border-color: var(--brand); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop strong { color: var(--ink); font-weight: 500; }
.otp-input { letter-spacing: .5em; font-size: 1.4rem !important; text-align: center; font-weight: 600; }

/* Alerts -------------------------------------------------------------------- */
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-sm); border: 1px solid; font-size: .93rem; margin-bottom: 1rem; }
.alert .icon { margin-top: 2px; }
.alert p:last-child { margin: 0; }
.alert-success { background: var(--success-bg); border-color: #A7F3D0; color: #065F46; }
.alert-error, .alert-danger { background: var(--danger-bg); border-color: #FECACA; color: #991B1B; }
.alert-warning { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; }
.alert-info { background: var(--info-bg); border-color: #BFDBFE; color: #1E3A8A; }
.messages { position: relative; }

/* Tables ------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); padding: .7rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FCFCFD; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
@media (max-width: 720px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .table-stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .35rem 1rem; }
  .table-stack td::before { content: attr(data-label); font-weight: 500; color: var(--muted); font-size: .8rem; }
  .table-stack .actions { justify-content: flex-end; }
}

/* Definition lists ---------------------------------------------------------- */
.dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .6rem 1rem; margin: 0; font-size: .93rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); word-break: break-word; }

/* Empty, loading states ------------------------------------------------------ */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty .icon-tile { margin: 0 auto 1rem; background: var(--surface-3); color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: .35rem; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Wizard ------------------------------------------------------------------- */
.wizard-head { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 1.75rem 0 1.25rem; }
.wizard-head h1 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); margin-bottom: .25rem; }
.progress-steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 1.25rem 0 0; overflow-x: auto; scrollbar-width: none; }
.progress-steps::-webkit-scrollbar { display: none; }
.progress-steps li { flex: 1 1 0; min-width: 92px; }
.progress-steps a, .progress-steps span { display: block; padding-top: .55rem; border-top: 3px solid var(--line); font-size: .78rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.progress-steps .done a, .progress-steps .done span { border-color: var(--brand-dark); color: var(--ink-2); }
.progress-steps .current a, .progress-steps .current span { border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.progress-steps b { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--subtle); }

.entry-list { list-style: none; padding: 0; margin: 0; }
.entry { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.entry + .entry { margin-top: .65rem; }
.entry-body { flex: 1; min-width: 0; }
.entry-body strong { color: var(--ink); font-weight: 500; }
.entry-body p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; }
.entry-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: #9CA3AF; }
.icon-btn.danger { color: var(--danger); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Template gallery ------------------------------------------------------------ */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.template-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; position: relative; }
.template-card.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.template-thumb { aspect-ratio: 210 / 297; background: var(--surface-3); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; }
.template-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.template-thumb iframe { width: 794px; height: 1123px; border: 0; transform: scale(.29); transform-origin: 0 0; pointer-events: none; position: absolute; top: 0; left: 0; background: #fff; }
.template-body { padding: 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.template-body h3 { font-size: .98rem; margin: 0; }
.template-body p { font-size: .84rem; color: var(--muted); margin: 0; }
.template-actions { display: flex; gap: .5rem; padding: 0 1rem 1rem; }
.template-actions .btn { flex: 1; }
.selected-flag { position: absolute; top: .65rem; right: .65rem; z-index: 2; }

/* Document preview -------------------------------------------------------------- */
.doc-stage { background: #E5E7EB; border-radius: var(--radius); padding: clamp(.75rem, 2vw, 2rem); overflow: auto; }
.doc-frame { display: block; width: 100%; max-width: 820px; margin: 0 auto; height: 1100px; border: 0; background: #fff; box-shadow: var(--shadow-lg); }
@media (max-width: 640px) { .doc-frame { height: 760px; } }
.doc-pages { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.doc-page { display: block; width: 100%; max-width: 820px; height: auto; background: #fff; box-shadow: var(--shadow-lg); user-select: none; -webkit-user-drag: none; }

/* Summary / checkout -------------------------------------------------------------- */
.summary-line { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .93rem; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .9rem; font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.method-list { display: grid; gap: .65rem; }
.method { position: relative; }
.method input { position: absolute; opacity: 0; }
.method label { display: flex; gap: .9rem; align-items: center; padding: .9rem 1rem; border: 1px solid #D1D5DB; border-radius: var(--radius); cursor: pointer; background: #fff; }
.method input:checked + label { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.method input:focus-visible + label { outline: 3px solid var(--brand-ring); }
.method-name { font-weight: 500; color: var(--ink); }
.pay-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--surface-2); }
.pay-box ol { margin: 0; padding-left: 1.2rem; }
.pay-box li { margin: .35rem 0; }
.copy-value { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ref-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .06em; background: #fff; border: 1px dashed #D1D5DB; padding: .2rem .55rem; border-radius: var(--radius-sm); color: var(--ink); }
.status-track { list-style: none; padding: 0; margin: 0; position: relative; }
.status-track li { position: relative; padding: 0 0 1.25rem 1.75rem; }
.status-track li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.status-track li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.status-track li:last-child::after { display: none; }
.status-track li.done::before { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.status-track li.current::before { background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.status-track strong { display: block; color: var(--ink); font-weight: 500; font-size: .94rem; }
.status-track span { color: var(--muted); font-size: .84rem; }

/* Account area --------------------------------------------------------------------- */
.account-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; padding: 2rem 1.25rem 4rem; }
.account-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: .15rem; }
.account-nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: var(--radius-sm); color: var(--ink-2); font-size: .92rem; text-decoration: none; }
.account-nav a:hover { background: var(--surface-3); }
.account-nav a.active { background: var(--brand-light); color: var(--brand-darker); font-weight: 500; }
.account-nav .icon { color: var(--muted); }
.account-nav a.active .icon { color: var(--brand-dark); }
.stat { padding: 1.25rem; }
.stat-label { font-size: .82rem; color: var(--muted); }
.stat-value { font-size: 1.6rem; font-weight: 600; color: var(--ink); line-height: 1.2; margin-top: .25rem; }
@media (max-width: 860px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: .25rem; }
  .account-nav a { white-space: nowrap; }
}

/* Auth --------------------------------------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 3rem 1.25rem; background: var(--surface-2); }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: .92rem; color: var(--muted); }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--subtle); font-size: .8rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Footer -------------------------------------------------------------------------------- */
.site-footer { background: #0F172A; color: #94A3B8; font-size: .92rem; margin-top: auto; }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-top h2 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 600; }
.footer-top ul { list-style: none; padding: 0; margin: 0; }
.footer-top li { padding: .25rem 0; }
.footer-brand p { margin: 1rem 0; max-width: 36ch; }
.footer-brand .brand { color: #fff; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact .icon { margin-top: 3px; color: #64748B; }
.social { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #1E293B; border-radius: 8px; color: #CBD5E1; }
.social a:hover { border-color: #475569; color: #fff; }
.footer-bottom { border-top: 1px solid #1E293B; padding: 1.25rem 0 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; font-size: .84rem; }
.footer-bottom p { margin: 0; }
.footer-credit { color: #CBD5E1; }
@media (max-width: 960px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* Cookie notice ------------------------------------------------------------------------ */

/* Utilities ----------------------------------------------------------------------------- */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; }
.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { display: flex; gap: .55rem; align-items: flex-start; padding: .3rem 0; }
.list-check .icon { color: var(--success); margin-top: 4px; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--line-2); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .icon-tile { margin: 0; width: 42px; height: 42px; }
.contact-item strong { display: block; color: var(--ink); font-weight: 500; }
.map-embed { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs a { padding: .65rem 1rem; color: var(--muted); font-weight: 500; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.tabs a.active { color: var(--brand-dark); border-color: var(--brand); }
.watermark-note { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); }
.kbd { font-family: ui-monospace, monospace; font-size: .85em; background: var(--surface-3); padding: .1rem .35rem; border-radius: 4px; }

@media print {
  .site-header, .site-footer, .announcement, .cookie-banner, .notif, .no-print { display: none !important; }
}

/* ---------------------------------------------------------------- Notifications */
.notif { position: relative; }
.notif-btn { position: relative; width: 38px; height: 38px; }
.notif-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 600; line-height: 19px; text-align: center; }
.notif-count[hidden] { display: none; }
.notif.has-new .notif-btn { box-shadow: 0 0 0 4px var(--brand-ring); transition: box-shadow .3s; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 80; overflow: hidden; }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.notif-head form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-dark); font: inherit; font-size: .84rem; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: min(420px, 60vh); overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: .5rem; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent; }
.notif-item.unread { background: var(--surface-2); border-left-color: var(--brand); }
.notif-item a { flex: 1; display: grid; gap: .15rem; padding: .7rem .5rem .7rem .85rem; color: var(--text); text-decoration: none; font-size: .86rem; min-width: 0; }
.notif-item a:hover strong { color: var(--brand-dark); }
.notif-item strong { color: var(--ink); font-weight: 600; font-size: .88rem; }
.notif-item time { color: var(--subtle); font-size: .76rem; }
.notif-success.unread { border-left-color: var(--success); }
.notif-warning.unread { border-left-color: var(--warning); }
.notif-error.unread { border-left-color: var(--danger); }
.notif-mark { flex: none; width: 28px; height: 28px; margin: .6rem .6rem 0 0; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; position: relative; }
.notif-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 999px; background: var(--brand); }
.notif-mark:hover { border-color: var(--brand); }
.notif-empty { padding: 1.25rem 1rem; margin: 0; color: var(--muted); font-size: .88rem; }
.notif-empty[hidden] { display: none; }
.notif-foot { display: block; text-align: center; padding: .7rem; font-size: .86rem; font-weight: 500; border-top: 1px solid var(--line); }
.notif-history { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notif-history .notif-item { align-items: center; padding-right: .75rem; }
.notif-history .notif-item form { margin: 0; }
@media (max-width: 720px) {
  .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}

/* ---------------------------------------------------------------- Cookie consent */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(17, 24, 39, .08); padding: 1rem 0; }
.cookie-banner .container { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cookie-banner h2 { font-size: 1rem; margin: 0 0 .25rem; }
.cookie-banner p { margin: 0; font-size: .88rem; color: var(--text); max-width: 72ch; }
.cookie-banner-actions { display: flex; gap: .5rem; flex-wrap: wrap; flex: none; margin: 0; }
@media (max-width: 860px) {
  .cookie-banner .container { flex-direction: column; align-items: stretch; gap: .75rem; }
  .cookie-banner-actions .btn { flex: 1 1 auto; justify-content: center; }
}
.cookie-dialog { border: 0; border-radius: var(--radius-lg); padding: 1.5rem; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
.cookie-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.cookie-choice { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: .9rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.cookie-choice p { margin: .2rem 0 0; font-size: .86rem; color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 24px; border-radius: 999px; background: #CBD5E1; position: relative; cursor: pointer; transition: background .15s; margin-top: .15rem; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

/* ---------------------------------------------------------------- Newsletter */
.footer-newsletter { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: start; padding: 1.75rem 0; border-top: 1px solid #1E293B; }
.footer-newsletter h2 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; font-weight: 600; }
.footer-newsletter p { margin: 0; }
.newsletter-form { margin: 0; }
.newsletter-row { display: flex; gap: .5rem; }
.newsletter-row input { flex: 1; min-width: 0; padding: .6rem .8rem; border-radius: var(--radius-sm); border: 1px solid #334155; background: #0B1220; color: #fff; font: inherit; }
.newsletter-row input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.newsletter-consent { margin-top: .6rem; font-size: .82rem; color: #94A3B8; align-items: flex-start; }
.newsletter-msg { margin: .6rem 0 0; font-size: .86rem; }
.newsletter-msg[hidden] { display: none; }
.newsletter-msg.ok { color: #6EE7B7; }
.newsletter-msg.error { color: #FCA5A5; }
.newsletter-form .inline-error { color: #FCA5A5; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 720px) { .footer-newsletter { grid-template-columns: 1fr; gap: 1rem; } .newsletter-row { flex-direction: column; } }

/* ---------------------------------------------------------------- Forms: inline help */
.inline-error { color: var(--danger); font-size: .84rem; margin: .3rem 0 0; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.draft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.draft-bar p { flex: 1 1 260px; margin: 0; }
.lang-form-mobile { display: grid; gap: .4rem; padding: .5rem 0; }

/* ---------------------------------------------------------------- AI writing suggestions */
.ai-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; align-items: center; }
.ai-btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: .32rem .75rem; font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; min-height: 32px; }
.ai-btn svg { color: var(--brand); }
.ai-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.ai-btn:disabled { opacity: .55; cursor: progress; }
.ai-panel { margin-top: .6rem; border: 1px solid #FECACA; background: var(--brand-light); border-radius: var(--radius); padding: .85rem 1rem; font-size: .9rem; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .5rem; font-weight: 600; color: var(--ink); font-size: .85rem; }
.ai-suggestion { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .8rem; margin-bottom: .55rem; }
.ai-suggestion p { margin: 0 0 .55rem; white-space: pre-line; color: var(--ink-2); }
.ai-suggestion h4 { font-size: .82rem; margin: 0 0 .3rem; color: var(--muted); font-weight: 600; }
.ai-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.ai-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.ai-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .75rem; font: inherit; font-size: .84rem; cursor: pointer; min-height: 34px; text-align: left; }
.ai-chip:hover { border-color: var(--brand); }
.ai-chip[aria-pressed="true"] { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.ai-note { font-size: .8rem; color: var(--muted); margin: .35rem 0 0; }
.ai-missing { margin: .4rem 0 .2rem; padding-left: 1.1rem; font-size: .84rem; color: var(--warning); }
.ai-tips { margin: .2rem 0 .5rem; padding-left: 1.1rem; font-size: .86rem; }
.ai-error { color: var(--danger); font-size: .86rem; margin: 0; }
.ai-loading { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .86rem; }
.ai-loading::before { content: ""; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--line); border-top-color: var(--brand); animation: ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-loading::before { animation: none; } }
.ai-jobdesc summary { cursor: pointer; font-weight: 500; color: var(--brand-dark); font-size: .9rem; }

/* Live document preview drawer */
.live-preview-panel { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); border-left: 1px solid var(--border, #E5E7EB); padding: 1rem; overflow-y: auto; overscroll-behavior: contain; }
.live-preview-panel[hidden] { display: none; }
.live-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; position: sticky; top: -1rem; background: var(--surface); padding: .5rem 0; margin-top: -.5rem; }
.live-preview-actions { display: inline-flex; align-items: center; gap: .25rem; }
.live-preview-pages { display: flex; flex-direction: column; gap: .75rem; background: var(--surface-3); border-radius: var(--radius); padding: .75rem; min-height: 200px; }
.live-preview-pages .doc-page { max-width: 100%; box-shadow: 0 2px 8px rgba(17,24,39,.12); }
@media (min-width: 1200px) { body.live-preview-open main, body.live-preview-open .site-footer { margin-right: 440px; } }
@media (max-width: 640px) { .live-preview-panel { width: 100vw; border-left: 0; } }

.version-form { display: inline-block; vertical-align: top; }
.version-form > summary { list-style: none; }
.version-form > summary::-webkit-details-marker { display: none; }
.version-form[open] { display: block; margin-top: .5rem; max-width: 320px; }

/* Career tools */
.score-figure { font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.meter { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.check-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .25rem; }
.check-list li { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: .5rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line-2); }
.check-list .ok .check-mark { color: var(--success); }
.check-list .todo .check-mark { color: var(--warning); }
.report-scores { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-bottom: 1rem; }
.report-scores .label { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.report-h { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.report-section { padding: .9rem 0; border-top: 1px solid var(--line-2); }
.report-section h3 { font-size: 1rem; margin: 0 0 .35rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.report-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 2rem; }
.suggested { background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: .75rem 1rem; margin-top: .5rem; }
.suggested .label { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: .25rem; }
.question-list { padding-left: 1.25rem; }
.practice > summary { list-style: none; }
.practice > summary::-webkit-details-marker { display: none; }
.practice-feedback ul { margin: .25rem 0 .75rem; }

/* Support conversation */
.thread { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.thread-msg { border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; background: var(--surface); }
.thread-msg.from-staff { background: var(--surface-2); border-left: 3px solid var(--brand); }
.thread-msg.internal { background: var(--warning-bg); border-style: dashed; }
.thread-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; margin-bottom: .35rem; }

/* Fieldsets default to min-width: min-content, which lets no-wrap rows push past small screens. */
fieldset { min-width: 0; }
.row > .input { min-width: 0; }
@media (max-width: 640px) { .live-preview-panel { left: 0; right: 0; width: auto; } }
.btn { max-width: 100%; }
.btn-sm { white-space: normal; }

/* Reviews and referrals */
.review-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--surface); }
.review h3 { font-size: 1rem; margin: 0 0 .35rem; }
.review-stars { margin: 0 0 .4rem; letter-spacing: .1em; color: var(--line); font-size: 1.05rem; }
.review-stars .on { color: #B45309; }
.rating-choice { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.kpi-row { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.kpi-row .label { display: block; font-size: .8rem; color: var(--muted); }
.reminder-optin { margin-top: 1rem; }

/* ---------- Offers (promotional campaigns) ---------- */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin: 1.25rem 0; }
.offers-compact { grid-template-columns: 1fr; margin: .75rem 0; }
.offer-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); overflow: hidden; }
.offer-banner { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; display: block; }
.offer-body { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.offer-kicker { font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--brand-darker); }
.offer-title { font-size: 1.08rem; margin: 0; }
.offer-text { margin: 0; color: var(--ink-2); font-size: .93rem; }
.offer-price { margin: .2rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; font-size: 1.1rem; }
.offer-save { font-size: .85rem; color: var(--success); font-weight: 500; }
.offer-terms { margin: 0; font-size: .8rem; color: var(--muted); }
.offers-compact .offer-body { padding: .75rem .9rem; }
.saving-note { margin: .4rem 0 0; font-size: .85rem; color: var(--success); text-align: right; }
.offer-note { font-size: .85rem; color: var(--ink-2); background: var(--brand-light); border-radius: var(--radius-sm); padding: .5rem .7rem; margin: .5rem 0 0; }

/* ---------- Support assistant ---------- */
.has-chat .main { padding-bottom: 72px; }
.chat { --chat-offset: 16px; position: fixed; right: 16px; bottom: var(--chat-offset); z-index: 70; }
.chat-launcher { display: inline-flex; align-items: center; gap: .45rem; height: 46px; padding: 0 1rem; border-radius: 999px; border: 0; background: var(--ink, #111827); color: #fff; font: inherit; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-lg); }
.chat-launcher:hover { background: #1F2937; }
.chat-launcher:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.chat.is-open .chat-launcher { display: none; }
.chat-panel { position: fixed; right: 16px; bottom: var(--chat-offset); width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { position: relative; display: flex; justify-content: space-between; gap: .5rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.chat-head h2 { font-size: 1rem; margin: 0; }
.chat-note { margin: .2rem 0 0; font-size: .75rem; color: var(--muted); line-height: 1.4; }
.chat-head-actions { display: flex; gap: .35rem; align-items: flex-start; }
.chat-menu { position: absolute; right: .75rem; top: 3.2rem; z-index: 2; display: flex; flex-direction: column; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .3rem; }
.chat-menu[hidden] { display: none; }
.chat-menu button, .chat-menu a { text-align: left; background: none; border: 0; padding: .55rem .7rem; font: inherit; font-size: .9rem; color: var(--ink); border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; }
.chat-menu button:hover, .chat-menu a:hover { background: var(--surface-2); }
.chat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--surface-2); }
.chat-msg { max-width: 88%; padding: .6rem .8rem; border-radius: 12px; font-size: .92rem; line-height: 1.5; word-wrap: break-word; }
.chat-msg p { margin: 0 0 .4rem; } .chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul { margin: .2rem 0 .4rem; padding-left: 1.1rem; }
.chat-bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.chat-user { align-self: flex-end; background: var(--ink, #111827); color: #fff; }
.chat-links { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.chat-copy { margin-top: .35rem; font-size: .78rem; }
.chat-typing { display: inline-flex; gap: 4px; padding: .75rem .9rem; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle, #9CA3AF); animation: chat-dot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; } .chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-typing span { animation: none; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem 1rem 0; }
.chat-suggest:empty { display: none; }
.chat-suggest[hidden], .chat-log[hidden], .chat-foot[hidden] { display: none; }
.chat-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .7rem; font: inherit; font-size: .82rem; color: var(--ink-2); cursor: pointer; text-align: left; }
.chat-chip:hover { border-color: #9CA3AF; }
.chat-input { display: flex; gap: .5rem; align-items: flex-end; padding: .75rem 1rem; border-top: 1px solid var(--line); background: #fff; }
.chat-input[hidden] { display: none; }
.chat-input textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .65rem; font: inherit; font-size: .92rem; }
.chat-input textarea:focus { outline: 2px solid var(--brand-ring); border-color: var(--brand); }
.chat-foot { margin: 0; padding: 0 1rem .6rem; font-size: .78rem; color: var(--muted); background: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-darker); text-decoration: underline; cursor: pointer; }
.chat-handoff { flex: 1; padding: .9rem 1rem; background: #fff; overflow-y: auto; overscroll-behavior: contain; }
.chat-handoff[hidden] { display: none; }
.chat-handoff h3 { font-size: .95rem; margin: 0 0 .25rem; }
.chat-handoff label { display: block; font-size: .82rem; margin-top: .45rem; color: var(--ink-2); }
.chat-handoff .input { margin-top: .2rem; width: 100%; }
.chat-handoff .checkbox { display: flex; gap: .45rem; align-items: center; }
.chat-handoff-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .6rem; }
.chat-ticket { display: block; font-size: .85rem; margin: .2rem 0; }
.chat-error { color: var(--danger); font-size: .82rem; margin: .4rem 0 0; }
@media (max-width: 600px) {
  .chat { right: 12px; }
  .chat-launcher { height: 44px; padding: 0 .9rem; }
  .chat-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(88vh, 100% - 56px); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* ---------- Mobile app promotion ---------- */
.app-banner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 1.75rem 2rem; margin: 1.5rem 0; }
.app-banner .eyebrow { color: #FCA5A5; }
.app-banner h2 { color: #fff; font-size: 1.45rem; margin: .25rem 0 .5rem; }
.app-banner p { color: #D1D5DB; margin: 0 0 1rem; max-width: 46ch; }
.app-banner .btn-ghost { color: #fff; }
.app-banner-copy { flex: 1 1 320px; min-width: 0; }
.app-banner-qr { display: flex; flex-direction: column; align-items: center; gap: .4rem; background: #fff; border-radius: var(--radius); padding: .75rem; color: var(--muted); font-size: .75rem; }
.store-badges { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.store-badge { display: inline-flex; align-items: center; gap: .55rem; background: #000; color: #fff; border: 1px solid #374151; border-radius: 10px; padding: .45rem .9rem; text-decoration: none; line-height: 1.1; min-height: 46px; }
.store-badge:hover { background: #111827; color: #fff; }
.store-badge span { display: flex; flex-direction: column; font-weight: 600; font-size: 1rem; }
.store-badge small { font-weight: 400; font-size: .68rem; opacity: .85; }
.store-badge-lg { padding: .6rem 1.1rem; min-height: 54px; }
.app-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.1rem; margin: 1rem 0; }
.app-card-icon { border-radius: 12px; border: 1px solid var(--line); }
.app-card-text { flex: 1 1 220px; min-width: 0; }
.app-footer h2 { margin-bottom: .6rem; }
.app-footer .store-badge { border-color: #4B5563; }
@media (max-width: 600px) { .app-banner { padding: 1.25rem; } .app-banner-qr { display: none; } }
.price-now { white-space: nowrap; }
.price-save { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--success); background: var(--success-bg); border-radius: 999px; padding: .05rem .45rem; vertical-align: middle; }

/* ---------- Homepage: hero photo, statistics, scroll reveal (from the original site) ---------- */
.hero-legacy { position: relative; overflow: hidden; }
.hero-legacy > .container { position: relative; z-index: 1; }
.hero-shape { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; pointer-events: none; animation: hero-drift 14s ease-in-out infinite; }
.hero-shape-1 { width: 260px; height: 260px; background: #FECACA; top: -60px; left: -80px; }
.hero-shape-2 { width: 200px; height: 200px; background: #FEE2E2; bottom: -40px; left: 35%; animation-delay: -5s; }
.hero-shape-3 { width: 180px; height: 180px; background: #FCA5A5; top: 30%; right: -60px; opacity: .35; animation-delay: -9s; }
@keyframes hero-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, -14px); } }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-decor { position: absolute; width: 42%; height: 58%; right: max(-28px, calc((100% - 440px) / 2 - 28px)); top: -28px; background: linear-gradient(160deg, var(--brand), var(--brand-dark)); border-radius: 120px 28px 28px 28px; }
.hero-photo { position: relative; z-index: 1; width: min(100%, 440px); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 48px rgba(17, 24, 39, .18); background: #fff; animation: hero-float 6s ease-in-out infinite; }
.hero-photo img { display: block; width: 100%; height: auto; }
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 860px) {
  .hero-legacy .split { display: flex; flex-direction: column; }
  .hero-legacy .hero-visual { order: -1; margin-bottom: 1.5rem; }
  .hero-photo { width: min(78%, 300px); }
  .hero-decor { right: calc((100% - min(78%, 300px)) / 2 - 18px); top: -18px; }
  .hero-legacy .hero-visual { margin-top: 18px; }
}

.stats-bar { background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 1.75rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .75rem .5rem; }
.stat-item + .stat-item { border-left: 1px solid rgba(255, 255, 255, .2); }
.stat-icon { opacity: .95; }
.stat-number { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats-bar .stat-label { font-size: .88rem; color: #fff; opacity: .92; }
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item + .stat-item { border-left: 0; }
  .stat-item:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .2); }
  .stat-item:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .2); }
}

/* Scroll reveal: only hidden when JavaScript is running (html.js-reveal), so content is always visible without it. */
.js-reveal .reveal, .js-reveal .reveal-right, .js-reveal .reveal-group > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--delay, 0) * 90ms); }
.js-reveal .reveal-right { transform: translateX(24px); }
.js-reveal .is-visible, .js-reveal .reveal-group.is-visible > * { opacity: 1; transform: none; }

.whatsapp-float { position: fixed; left: 16px; bottom: var(--chat-offset, 16px); z-index: 69; display: inline-flex; align-items: center; gap: .5rem; height: 46px; padding: 0 1rem 0 .8rem; border-radius: 999px; background: #fff; color: #128C7E; border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-weight: 500; font-size: .9rem; text-decoration: none; }
.whatsapp-float:hover { color: #075E54; border-color: #25D366; }
.whatsapp-float .icon { color: #25D366; }
@media (max-width: 600px) { .whatsapp-float { padding: 0; width: 46px; justify-content: center; left: 12px; } .whatsapp-float span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-shape, .hero-photo { animation: none; }
  .js-reveal .reveal, .js-reveal .reveal-right, .js-reveal .reveal-group > * { opacity: 1; transform: none; transition: none; }
}
