/* =====================================================
   HEADER, ANNOUNCEMENT BAR AND HOMEPAGE HERO
   Driven by Dashboard > Header & Hero. Modifier classes are set on
   <body> (and on the admin preview) by worker/header-hero.js, and the
   few numeric values arrive as CSS variables (--hh-*).

   The default for every option reproduces the site as it was before
   this file existed, so a tenant that never opens the page sees no
   change. Every rule is a class or variable, so it works the same on
   the live site and in the admin preview.
   ===================================================== */

:root {
  --hh-header-h: 68px;
  --hh-logo: 40px;
  --hh-hero-overlay: 0.45;
}

/* ---------- header size ---------- */
.hh-height-compact .site-header .header-inner,
.hh-height-tall .site-header .header-inner { min-height: var(--hh-header-h); }
.site-header .logo-icon { width: var(--hh-logo); height: var(--hh-logo); }
.site-header { background: var(--hh-header-bg, #000000) !important; }

.hh-static .site-header { position: relative; }

@media (max-width: 768px) {
  .hh-height-compact .main-nav.active,
  .hh-height-tall .main-nav.active { top: var(--hh-header-h); max-height: calc(100vh - var(--hh-header-h)); }
}

/* ---------- logo ---------- */
.hh-logo-logo .site-header .logo-text { display: none; }
.hh-logo-text .site-header .logo-icon { display: none; }

/* ---------- menu alignment (desktop) ---------- */
@media (min-width: 769px) {
  .hh-nav-center .site-header .main-nav { flex: 1; justify-content: center; }
  .hh-nav-right .site-header .main-nav { margin-left: auto; justify-content: flex-end; }
  .hh-nav-right .site-header .header-actions { margin-left: 0; }
}

/* ---------- header style ---------- */
.hh-style-solid .site-header { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
.hh-style-glass .site-header {
  background: color-mix(in srgb, var(--hh-header-bg, #000000) 62%, transparent) !important;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
.hh-style-transparent .site-header {
  background: transparent !important;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}
.hh-style-transparent .site-header.is-scrolled {
  background: var(--hh-header-bg, #000000) !important;
}
.hh-style-transparent .site-header .logo-text,
.hh-style-transparent .site-header .main-nav a { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* ---------- header call-to-action ---------- */
.site-header .header-cta { white-space: nowrap; }
@media (max-width: 480px) {
  .site-header .header-cta { padding-left: 12px; padding-right: 12px; font-size: 13px; }
}

/* ---------- announcement bar ---------- */
.hh-announce { font-size: 14px; line-height: 1.4; }
.hh-announce__inner { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; position: relative; }
.hh-announce__text { margin: 0; text-align: center; padding-right: 28px; }
.hh-announce__link { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; color: inherit !important; white-space: nowrap; }
.hh-announce__close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: inherit; font-size: 22px; line-height: 1;
}
.hh-announce__close:hover { background: rgba(255, 255, 255, 0.16); }
.hh-announce__close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.hh-announce[hidden] { display: none; }
.hh-announce--info { background: #1e293b; color: #f8fafc; }
.hh-announce--promo { background: linear-gradient(90deg, #ee9f28, #f6c453); color: #1a1a1a; }
.hh-announce--promo .hh-announce__close:hover { background: rgba(0, 0, 0, 0.12); }
.hh-announce--success { background: #065f46; color: #ecfdf5; }
.hh-announce--warning { background: #fbbf24; color: #1f1300; }
.hh-announce--warning .hh-announce__close:hover { background: rgba(0, 0, 0, 0.12); }

/* ---------- hero: height ----------
   "Standard" keeps the stylesheet's own sizing (min-height 360px and fluid padding). */
.hero.hero--h-compact { min-height: 0; padding: 36px 0; }
.hero.hero--h-compact h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.hero.hero--h-tall { min-height: 520px; }
.hero.hero--h-screen { min-height: min(82vh, 780px); padding-top: 96px; padding-bottom: 96px; }
.hero.hero--h-tall > .container,
.hero.hero--h-screen > .container { width: 100%; }

/* ---------- hero: background ---------- */
.hero.hero--bg-brand { background: linear-gradient(135deg, var(--theme-primary, #8b5cf6) 0%, var(--theme-secondary, #ec4899) 100%); }
.hero.hero--bg-solid { background: var(--hh-hero-bg, var(--surface-dark, #111)); }
.hero.hero--image { background-size: cover; background-repeat: no-repeat; background-position: center; }
.hero.hero--image.hero--focus-top { background-position: center top; }
.hero.hero--image.hero--focus-bottom { background-position: center bottom; }
.hero .hero-overlay { background: rgba(0, 0, 0, var(--hh-hero-overlay)); }

/* ---------- hero: text colour ---------- */
.hero.hero--text-dark { color: #111827; }
.hero.hero--text-dark h1,
.hero.hero--text-dark p { color: #111827; }
.hero.hero--text-dark .hero-overlay { background: rgba(255, 255, 255, var(--hh-hero-overlay)); }
.hero.hero--text-dark .hero-badge { color: #7c2d12; }
.hero.hero--text-dark .btn--ghost { color: #111827 !important; border-color: rgba(17, 24, 39, 0.45); }
.hero.hero--text-dark .btn--ghost:hover { background: rgba(17, 24, 39, 0.08); }

/* ---------- custom text colour and font (only when set) ---------- */
.hh-hfg .site-header .logo-text,
.hh-hfg .site-header .main-nav a,
.hh-hfg .site-header .nav-toggle,
.hh-hfg .site-header .mobile-search-btn,
.hh-hfg .site-header .btn--ghost { color: var(--hh-header-fg) !important; }
.hh-hfg .site-header .btn--ghost { border-color: color-mix(in srgb, var(--hh-header-fg) 45%, transparent); }
.hh-hfg .site-header .main-nav a:hover { opacity: 0.8; }
.hh-hfg .site-header .search-box input,
.hh-hfg .site-header .mobile-search-container input {
  color: var(--hh-header-fg);
  background: color-mix(in srgb, var(--hh-header-fg) 8%, transparent);
  border-color: color-mix(in srgb, var(--hh-header-fg) 35%, transparent);
}
.hh-hfg .site-header .search-box input::placeholder,
.hh-hfg .site-header .mobile-search-container input::placeholder { color: color-mix(in srgb, var(--hh-header-fg) 65%, transparent); }
@media (max-width: 768px) {
  .hh-hfg .main-nav.active { background: var(--hh-header-bg, #000000); }
}
.hh-hfont .site-header,
.hh-hfont .site-header .btn,
.hh-hfont .site-header input { font-family: var(--hh-header-font); }
.hh-hfont .hh-announce { font-family: inherit; }

.hero.hero--custom-fg,
.hero.hero--custom-fg p,
.hero.hero--custom-fg .hero-highlights li { color: var(--hh-hero-fg); }
.hero.hero--custom-fg .hero-badge { color: var(--hh-hero-fg); border-color: color-mix(in srgb, var(--hh-hero-fg) 35%, transparent); }
.hero.hero--custom-fg .hero-highlights li::before { color: currentColor; }
.hero.hero--custom-fg .btn--ghost { color: var(--hh-hero-fg) !important; border-color: color-mix(in srgb, var(--hh-hero-fg) 45%, transparent); }
.hero.hero--custom-fg h1 { color: var(--hh-hero-fg); }
.hero.hero--custom-title h1 { color: var(--hh-hero-title); }
.hero.hero--font-heading h1 { font-family: var(--hh-hero-heading-font); }
.hero.hero--font-body p,
.hero.hero--font-body .hero-badge,
.hero.hero--font-body .hero-highlights li,
.hero.hero--font-body .btn { font-family: var(--hh-hero-body-font); }

/* ---------- hero media: slides, video, images inside the hero ----------
   Everything here applies only when the hero carries .hero--has-media or .hero-cards,
   so a hero without media is untouched. Layers: media (0) < overlay < text (1) < controls (3). */
.hero--has-media { isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #000; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.9s ease, visibility 0s; z-index: 1; }
.hero-slide img, .hero-slide video { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.hero-slide__link { position: absolute; inset: 0; z-index: 2; }
.hero-slide__link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

/* slide transition: the incoming slide moves in from the right */
.hero-media--slide .hero-slide { opacity: 1; visibility: visible; transform: translateX(100%); transition: transform 0.8s cubic-bezier(.4, 0, .2, 1); }
.hero-media--slide .hero-slide.is-active { transform: translateX(0); }
.hero-media--slide .hero-slide.is-prev { transform: translateX(-100%); z-index: 0; }
.hero-media--slide .hero-slide.is-instant { transition: none; }

/* slow motion on the picture itself ("Ken Burns") */
@keyframes hh-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes hh-pan { from { transform: scale(1.12) translateX(-2.5%); } to { transform: scale(1.12) translateX(2.5%); } }
.hero-media--motion-zoom .hero-slide.is-active img { animation: hh-zoom calc(var(--hh-interval, 6s) + 2s) ease-out both; }
.hero-media--motion-pan .hero-slide.is-active img { animation: hh-pan calc(var(--hh-interval, 6s) + 2s) ease-in-out both; }

.hero--has-media .hero-overlay { z-index: 1; }
.hero--has-media .container { z-index: 2; }
/* a clickable slide: the empty part of the hero follows the link, the text and buttons keep working */
.hero--media-link .hero-overlay { pointer-events: none; }
.hero--media-link > .container { pointer-events: none; }
.hero--media-link > .container a,
.hero--media-link > .container button,
.hero--media-link > .container .hero-card { pointer-events: auto; }

/* controls */
.hero-media__ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-media__ui > * { pointer-events: auto; }
.hero-media__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, opacity 0.2s ease; opacity: 0.85;
}
.hero-media__nav:hover { background: rgba(0, 0, 0, 0.6); opacity: 1; }
.hero-media__prev { left: 14px; }
.hero-media__next { right: 14px; }
.hero-media__dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 4px; }
.hero-media__dots button {
  position: relative; width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; padding: 0;
}
.hero-media__dots button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.5); transition: width 0.25s ease, margin 0.25s ease, background 0.25s ease;
}
.hero-media__dots button[aria-current="true"]::after { width: 26px; margin-left: -13px; background: #fff; }
.hero-media__pause {
  position: absolute; right: 14px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 11px; cursor: pointer; display: grid; place-items: center;
}
.hero-media__pause[aria-pressed="true"] span { display: none; }
.hero-media__pause[aria-pressed="true"]::before { content: "\25B6"; font-size: 12px; }
.hero-media__nav:focus-visible, .hero-media__pause:focus-visible, .hero-media__dots button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- online video (YouTube / Vimeo) ---------- */
.hero-slide[data-type="embed"] { container-type: size; }
.hero-embed { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-embed iframe {
  position: absolute; top: 50%; left: 50%; border: 0; transform: translate(-50%, -50%); max-width: none; pointer-events: none;
  width: max(100%, 177.78cqh); height: max(100%, 56.25cqw);
}
@supports not (width: 1cqh) { .hero-embed iframe { width: 100%; height: 100%; min-width: 177.78vh; min-height: 56.25vw; } }
.hero-slide[data-type="embed"] > img { transition: opacity 0.8s ease; }
.hero-slide.is-embed-ready > img { opacity: 0; }
.hero-slide[data-type="embed"]:not(:has(img)) { background: #0b0b10; }

.hero-watch {
  position: absolute; left: 20px; bottom: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 140px);
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.5);
  color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-watch:hover { background: rgba(0, 0, 0, 0.72); }
.hero-watch:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hero-watch[hidden] { display: none; }
.hero-watch-btn span { margin-right: 4px; font-size: 0.8em; }

.hh-modal-open { overflow: hidden; }
.hh-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.82); }
.hh-modal__box { position: relative; width: min(960px, 100%); }
.hh-modal__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
.hh-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; max-width: none; }
.hh-modal__close {
  position: absolute; right: 0; top: -48px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.hh-modal__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .hh-modal { padding: 12px; } .hero-watch { left: 12px; bottom: 14px; } }

/* images inside the hero ("nested" images) */
.hero-cards { display: grid; gap: 14px; margin: 28px auto 0; width: 100%; align-items: start; }
.hero-cards--sm { max-width: 420px; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.hero-cards--md { max-width: 640px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hero-cards--lg { max-width: 860px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hero-card { margin: 0; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.hero-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; max-width: none; }
.hero-card__link { display: block; transition: transform 0.25s ease; }
.hero-card--link:hover { transform: translateY(-3px); }
.hero-card--link:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.hero-card__link:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.hero-card figcaption { padding: 8px 12px; font-size: 13px; font-weight: 600; text-align: left; color: inherit; }
.hero-content--left .hero-cards { margin-left: 0; }
.hero-content--right .hero-cards { margin-right: 0; }

/* side layout: text on one side, the images on the other (wide screens only) */
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-grid > .hero-content { max-width: none; margin: 0; }
.hero-grid > .hero-cards { margin: 0; max-width: none; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; }
  .hero-grid > .hero-content { text-align: left; }
  .hero-grid > .hero-content .hero-actions,
  .hero-grid > .hero-content .hero-highlights { justify-content: flex-start; }
  .hero-grid > .hero-content p { margin-left: 0; margin-right: 0; }
  .hero-grid > .hero-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid > .hero-cards.hero-cards--n1 { grid-template-columns: minmax(0, 1fr); }
  .hero-grid > .hero-cards.hero-cards--n3 .hero-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .hero-grid > .hero-cards { margin-top: 8px; }
}
@media (min-width: 641px) {
  .hero--arrows > .container { padding-left: 72px; padding-right: 72px; }
}
@media (max-width: 640px) {
  .hero-media__nav { display: none; }
  .hero-media__pause { right: 10px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media *, .hero-card__link { animation: none !important; transition: none !important; }
}
.hero-media--saver video { display: none; }

/* ---------- hero: parts ---------- */
.hero.hero--text-dark .hero-badge { background: rgba(17, 24, 39, 0.08); border-color: rgba(17, 24, 39, 0.16); }
.hero .hero-content--left .hero-actions { justify-content: flex-start; }
.hero .hero-content--right .hero-actions { justify-content: flex-end; }
.hero .hero-actions { flex-wrap: wrap; }
.hero .hero-highlights {
  list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px;
}
.hero .hero-content--center .hero-highlights { justify-content: center; }
.hero .hero-content--right .hero-highlights { justify-content: flex-end; }
.hero .hero-highlights li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 14px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero .hero-highlights li::before { content: "\2713"; font-weight: 700; color: var(--theme-accent, #22d3ee); }
.hero.hero--text-dark .hero-highlights li { background: rgba(17, 24, 39, 0.06); border-color: rgba(17, 24, 39, 0.14); color: #111827; }
.hero.hero--text-dark .hero-highlights li::before { color: #047857; }

@media (max-width: 768px) {
  .hero.hero--h-compact { padding: 28px 0; }
  .hero.hero--h-tall { min-height: 420px; }
  .hero.hero--h-screen { min-height: 70vh; padding-top: 64px; padding-bottom: 64px; }
  .hero .hero-content--left,
  .hero .hero-content--right { text-align: left; }
  .hero .hero-content--right .hero-actions,
  .hero .hero-content--right .hero-highlights { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .hero .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hh-style-transparent .site-header { transition: none; }
}

/* =====================================================
   ADMIN PAGE: Dashboard > Header & Hero
   Everything below is scoped to .hh-admin / .hh-preview.
   ===================================================== */

.hh-admin { --hh-ink: #0f172a; --hh-line: #dbe1ea; --hh-card: #ffffff; --hh-muted: #5b6678; --hh-accent: var(--primary, #8b5cf6); }
.hh-card, .hh-preview-card { color: var(--hh-ink); }
.hh-card summary, .hh-card label, .hh-card legend, .hh-card p, .hh-card strong, .hh-card small { color: inherit; }
.hh-card .hh-hint, .hh-card .hh-count, .hh-card small, .hh-preset small, .hh-card > summary .hh-sub { color: var(--hh-muted); }
.hh-card .hh-error { color: #b91c1c; }
.hh-admin .hh-intro { max-width: 70ch; margin: -8px 0 20px; }
.hh-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 24px; align-items: start; }
.hh-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-bottom: 88px; }
.hh-card { background: var(--hh-card); border: 1px solid var(--hh-line); border-radius: 14px; padding: 0; overflow: hidden; }
.hh-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 700; font-size: 16px; }
.hh-card > summary::-webkit-details-marker { display: none; }
.hh-card > summary .hh-sub { font-weight: 500; font-size: 13px; color: var(--hh-muted); margin-left: auto; }
.hh-card > summary::before { content: "\25B8"; color: var(--hh-muted); transition: transform .15s ease; }
.hh-card[open] > summary::before { transform: rotate(90deg); }
.hh-card[open] > summary { border-bottom: 1px solid var(--hh-line); }
.hh-body { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.hh-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hh-field.hh-wide { grid-column: 1 / -1; }
.hh-field > label, .hh-field > .hh-label, .hh-field > legend { font-size: 13px; font-weight: 600; }
fieldset.hh-field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.hh-field > legend { padding: 0; margin-bottom: 6px; }
.hh-field input[type="text"], .hh-field input[type="url"], .hh-field textarea, .hh-field select {
  color: var(--hh-ink); width: 100%; padding: 10px 12px; border: 1px solid var(--hh-line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--hh-card); color: var(--hh-ink);
}
.hh-field input:focus-visible, .hh-field textarea:focus-visible, .hh-field select:focus-visible { outline: 2px solid var(--hh-accent); outline-offset: 1px; }
.hh-hint { font-size: 12px; color: var(--hh-muted); margin: 0; }
.hh-count { font-variant-numeric: tabular-nums; }
.hh-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hh-seg label { position: relative; }
.hh-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.hh-seg span { color: var(--hh-ink); display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--hh-line); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--hh-card); }
.hh-seg input:checked + span { border-color: var(--hh-accent); background: color-mix(in srgb, var(--hh-accent) 14%, var(--hh-card)); box-shadow: inset 0 0 0 1px var(--hh-accent); }
.hh-seg input:focus-visible + span { outline: 2px solid var(--hh-accent); outline-offset: 1px; }
.hh-switch { display: flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 600; }
.hh-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hh-switch .hh-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: #94a3b8; transition: background .15s ease; }
.hh-switch .hh-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.hh-switch input:checked + .hh-track { background: var(--hh-accent); }
.hh-switch input:checked + .hh-track::after { transform: translateX(18px); }
.hh-switch input:focus-visible + .hh-track { outline: 2px solid var(--hh-accent); outline-offset: 2px; }
.hh-color { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hh-color input[type="color"] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--hh-line); border-radius: 10px; background: var(--hh-card); cursor: pointer; flex: none; }
.hh-color input[type="text"] { flex: 1 1 96px; min-width: 96px; padding-left: 8px; padding-right: 8px; }
.hh-color button { color: var(--hh-ink); flex: none; min-height: 40px; padding: 0 10px; border: 1px solid var(--hh-line); border-radius: 10px; background: var(--hh-card); cursor: pointer; font: inherit; font-size: 13px; }
.hh-range { display: flex; align-items: center; gap: 12px; }
.hh-range input[type="range"] { flex: 1; accent-color: var(--hh-accent); }
.hh-range output { min-width: 3.5ch; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

.hh-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 18px; }
.hh-preset { color: var(--hh-ink); text-align: left; border: 1px solid var(--hh-line); border-radius: 12px; padding: 12px; background: var(--hh-card); cursor: pointer; font: inherit; color: inherit; }
.hh-preset:hover { border-color: var(--hh-accent); }
.hh-preset:focus-visible { outline: 2px solid var(--hh-accent); outline-offset: 2px; }
.hh-preset strong { display: block; font-size: 14px; }
.hh-preset small { color: var(--hh-muted); font-size: 12px; }

.hh-preview-col { position: sticky; top: 76px; min-width: 0; }
.hh-preview-card { background: var(--hh-card); border: 1px solid var(--hh-line); border-radius: 14px; overflow: hidden; }
.hh-preview-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--hh-line); }
.hh-preview-bar strong { font-size: 14px; }
.hh-preview-bar .hh-seg { margin-left: auto; }
.hh-preview-stage { position: relative; background: #e2e8f0; overflow: hidden; min-height: 120px; }
.hh-preview-stage iframe { max-width: none !important; position: absolute; top: 14px; left: 14px; border: 0; border-radius: 10px; background: #0b0b10; pointer-events: none; transform-origin: top left; }
/* inside the preview frame (the frame loads this same stylesheet) */
body.hh-preview-body { margin: 0; padding: 0 !important; min-height: 0 !important; overflow: hidden; }
body.hh-preview-body .site-header { position: relative !important; }
body.hh-preview-body .hh-announce__close { pointer-events: none; }
body.hh-preview-body .search-box input { pointer-events: none; }
body.hh-preview-body .hh-preview-off { padding: 24px; text-align: center; font-size: 14px; opacity: .7; }
.hh-warn { color: #92400e !important; font-weight: 600; }
.hh-preview-note { font-size: 12px; color: var(--hh-muted); padding: 10px 14px 14px; margin: 0; }

.hh-savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px clamp(12px, 2.5vw, 28px); background: var(--hh-card); border-top: 1px solid var(--hh-line); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.hh-savebar .hh-status { font-size: 13px; color: var(--hh-muted); margin-right: auto; min-width: 0; }
.hh-savebar .hh-status.is-dirty { color: #b45309; font-weight: 600; }
.hh-savebar .hh-status.is-ok { color: #047857; font-weight: 600; }
.hh-savebar .hh-status.is-error { color: #b91c1c; font-weight: 600; }
.hh-savebar .btn { min-height: 40px; }
.hh-admin .hh-error { color: #b91c1c; font-size: 12px; margin: 0; }

@media (min-width: 901px) {
  .hh-savebar { left: var(--dash-w, 272px); }
}
@media (max-width: 1100px) {
  .hh-layout { grid-template-columns: minmax(0, 1fr); }
  .hh-preview-col { position: static; order: -1; }
}
@media (max-width: 640px) {
  .hh-body { grid-template-columns: minmax(0, 1fr); }
  .hh-form { padding-bottom: 150px; }
  .hh-savebar { gap: 8px; padding-top: 10px; }
  .hh-savebar .hh-status { flex: 1 1 100%; margin-right: 0; }
  .hh-savebar .btn { flex: 1 1 0; min-height: 40px; padding-left: 8px; padding-right: 8px; font-size: 13px; }
}

/* ---------- admin: slide and picture lists ---------- */
.hh-label { font-size: 13px; font-weight: 600; color: var(--hh-ink); }
.hh-rows { display: flex; flex-direction: column; gap: 12px; }
.hh-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--hh-line); border-radius: 12px; background: color-mix(in srgb, var(--hh-card) 96%, #64748b); }
.hh-row__thumb { width: 84px; height: 64px; border-radius: 8px; background: #e2e8f0 center / cover no-repeat; display: grid; place-items: center; font-size: 11px; color: var(--hh-muted); text-align: center; }
.hh-row__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; min-width: 0; }
.hh-mini { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hh-mini--wide, .hh-row__fields > .hh-error { grid-column: 1 / -1; }
.hh-mini label { font-size: 12px; font-weight: 600; color: var(--hh-ink); }
.hh-mini input, .hh-mini select { color: var(--hh-ink); width: 100%; padding: 8px 10px; border: 1px solid var(--hh-line); border-radius: 8px; font: inherit; font-size: 13px; background: var(--hh-card); }
.hh-srcrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hh-srcrow input { flex: 1 1 160px; min-width: 0; }
.hh-row__actions { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
.hh-btn { color: var(--hh-ink); border: 1px solid var(--hh-line); background: var(--hh-card); min-height: 36px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hh-btn:hover:not(:disabled) { border-color: var(--hh-accent); }
.hh-btn:focus-visible { outline: 2px solid var(--hh-accent); outline-offset: 2px; }
.hh-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.hh-addbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hh-addbar .hh-hint { margin-left: auto; }
@media (max-width: 640px) {
  .hh-row { grid-template-columns: minmax(0, 1fr); }
  .hh-row__thumb { width: 100%; height: 90px; }
  .hh-row__fields { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------
   Dashboard > Components: hero options panel (scoped to .ch-panel)
   --------------------------------------------------------------- */
.ch-panel { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 18px; padding: 16px; border: 1px solid var(--hh-line); border-radius: 14px; background: #f8fafc; color: var(--hh-ink); }
.ch-panel[hidden], .ch-body[hidden] { display: none; }
.ch-panel .ch-head { gap: 8px; }
.ch-panel .ch-head strong { font-size: 15px; }
.ch-body { display: flex; flex-direction: column; gap: 14px; }
.ch-preview { margin-top: 4px; }
.ch-stage { background: #e2e8f0; padding: 12px; overflow: auto; }
.ch-stage iframe { display: block; width: 100%; height: 460px; border: 0; margin: 0 auto; background: #fff; border-radius: 8px; max-width: 100%; }
/* the dashboard's generic .admin-form rules (labels, inputs) are stronger than the panel's own; restate the controls */
.ch-panel .hh-switch { display: flex; align-items: center; gap: 12px; min-height: 40px; margin: 0; }
.ch-panel .hh-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; box-shadow: none; }
.ch-panel .hh-switch .hh-track { display: block; position: relative; flex: none; width: 44px; height: 26px; }
.ch-panel .hh-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-panel .hh-seg label { position: relative; display: block; margin: 0; }
.ch-panel .hh-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; margin: 0; box-shadow: none; cursor: pointer; }
.ch-panel .hh-range input[type="range"] { min-height: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.ch-panel .hh-color input[type="color"] { min-height: 0; width: 44px; height: 40px; padding: 2px; }
.ch-panel .hh-field > label:not(.hh-switch), .ch-panel .hh-mini > label { display: block; margin: 0; }
.ch-panel .hh-mini input, .ch-panel .hh-mini select { min-height: 0; }
.ch-panel .hh-field select, .ch-panel .hh-field input[type="text"], .ch-panel .hh-field textarea { width: 100%; }
.ch-panel .hh-field textarea { min-height: 0; }
.ch-panel .hh-preview-bar .hh-seg { margin-left: auto; }
.ch-panel .hh-card > summary { display: flex; margin: 0; }

/* ---------------------------------------------------------------
   Dashboard > Components: visual editor (Component Studio), scoped to .cs-panel
   --------------------------------------------------------------- */
.cs-panel .hh-card > .hh-body { padding-top: 12px; }
.cs-panel .cs-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cs-panel .cs-row input[type="text"] { flex: 1 1 180px; min-width: 0; }
.cs-panel .cs-image { display: flex; flex-direction: column; gap: 8px; }
.cs-panel .cs-thumb, .cs-modal .cs-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; background: #e2e8f0; flex: none; }
.cs-panel .cs-image > .cs-thumb { width: 120px; height: 72px; }
.cs-panel .cs-pick, .cs-modal .cs-result, .cs-panel .cs-rowcard { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hh-line); border-radius: 10px; background: var(--hh-card); }
.cs-panel .cs-picklist, .cs-panel .hh-rows { display: flex; flex-direction: column; gap: 8px; }
.cs-panel .cs-result__text, .cs-modal .cs-result__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cs-panel .cs-result__text strong, .cs-modal .cs-result__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-panel .cs-pick__acts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.cs-panel .cs-rowcard { flex-direction: column; align-items: stretch; }
.cs-panel .cs-rowcard__head { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cs-panel input[type="text"], .cs-panel input[type="number"], .cs-panel input[type="search"], .cs-panel select, .cs-panel textarea { min-height: 0; width: 100%; padding: 8px 10px; border: 1px solid var(--hh-line); border-radius: 8px; font: inherit; font-size: 14px; background: var(--hh-card); color: var(--hh-ink); box-sizing: border-box; }
.cs-panel .cs-row select, .cs-panel .cs-pick__acts select { width: auto; }
.cs-panel .cs-adv { margin-top: 4px; }
.cs-panel .cs-tabs { margin: 0; }
.cs-panel .cs-blockbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.cs-panel .cs-block { border: 1px solid var(--hh-line); border-radius: 10px; background: var(--hh-card); padding: 0 12px 12px; margin-bottom: 8px; }
.cs-panel .cs-block > summary { cursor: pointer; padding: 10px 0; display: flex; gap: 8px; align-items: baseline; }
.cs-panel .cs-block > .cs-pick__acts { margin: 0 0 8px; }
.cs-panel .cs-block__body { display: flex; flex-direction: column; gap: 12px; }
.cs-panel .cs-grid-scroll { overflow-x: auto; border: 1px solid var(--hh-line); border-radius: 10px; }
.cs-panel .cs-grid { border-collapse: collapse; width: 100%; background: var(--hh-card); }
.cs-panel .cs-grid th, .cs-panel .cs-grid td { padding: 6px; border-bottom: 1px solid var(--hh-line); vertical-align: top; min-width: 150px; }
.cs-panel .cs-grid th { background: #f1f5f9; }
.cs-panel .cs-grid th select, .cs-panel .cs-grid th .hh-btn { margin-top: 4px; }
.cs-panel .cs-grid .cs-grid__acts { min-width: 0; white-space: nowrap; }
.cs-panel .cs-cell-link { min-height: 28px; padding: 0 8px; font-size: 12px; margin-top: 4px; margin-right: 4px; }
.cs-panel .cs-rich { display: flex; flex-direction: column; gap: 8px; }
.cs-panel .cs-rich__bar { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-panel .cs-rich__ed { min-height: 140px; padding: 10px 12px; border: 1px solid var(--hh-line); border-radius: 8px; background: #fff; color: #0f172a; line-height: 1.55; }
.cs-panel .cs-rich__ed:focus { outline: 2px solid var(--hh-accent); outline-offset: 1px; }
.cs-panel .cs-rich__code { font-family: ui-monospace, monospace; font-size: 13px; }
.cs-tab { color: var(--hh-ink); }
.cs-panel .cs-tab.is-on, .cs-modal .cs-tab.is-on { background: var(--hh-accent); color: #fff; border-color: var(--hh-accent); }
.cs-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(15,23,42,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cs-modal { --hh-ink: #0f172a; --hh-line: #dbe1ea; --hh-card: #ffffff; --hh-accent: var(--primary, #8b5cf6); }
.cs-modal__box { background: #fff; color: var(--hh-ink); border-radius: 14px; width: min(640px, 100%); max-height: 88vh; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cs-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cs-modal .hh-seg, .cs-modal .cs-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-modal .hh-btn { color: var(--hh-ink); border: 1px solid var(--hh-line); background: #fff; min-height: 36px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cs-modal input[type="search"], .cs-modal input[type="text"] { width: 100%; padding: 9px 10px; border: 1px solid var(--hh-line); border-radius: 8px; font: inherit; box-sizing: border-box; }
.cs-modal .cs-row { display: flex; gap: 8px; }
.cs-modal .cs-results { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.cs-modal .hh-hint { color: #5b6678; font-size: 12px; margin: 0; }
.cs-modal .cs-result__text .hh-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-group[hidden], .cs-panel [hidden], .cs-modal [hidden] { display: none !important; }

/* Admin add/edit side panel (admin-add-panel.js) */
.ap-lock { overflow: hidden; }
.ap-moved-heading { display: none; }
.ap-add { margin-left: auto; white-space: nowrap; }
.ap-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.45); opacity: 0; transition: opacity .18s ease; }
.ap-overlay.ap-open { opacity: 1; }
.ap-overlay[hidden], .ap-panel[hidden] { display: none; }
.ap-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1210; width: min(720px, 100vw); display: flex; flex-direction: column; background: var(--bg, #f8fafc); box-shadow: -12px 0 40px rgba(15,23,42,.25); transform: translateX(100%); transition: transform .2s ease, width .2s ease; }
.ap-panel.ap-open { transform: translateX(0); }
.ap-panel--wide { width: min(1100px, 100vw); }
.ap-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--white, #fff); border-bottom: 1px solid var(--light-gray, #e5e7eb); }
.ap-title { flex: 1; margin: 0; font-size: 18px; }
.ap-icon { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; font-size: 16px; cursor: pointer; color: var(--gray, #6b7280); }
.ap-icon:hover { background: var(--bg, #eef0f3); color: var(--dark, #111827); }
.ap-body { flex: 1; overflow-y: auto; padding: 18px; -webkit-overflow-scrolling: touch; }
.ap-body .admin-form { max-width: none; box-shadow: none; padding: 20px; }
@media (max-width: 640px) { .ap-panel, .ap-panel--wide { width: 100vw; } .ap-body { padding: 10px; } .ap-add { margin-left: 0; } }

/* Comparison design editor (comparison-design.js) */
.cd-section { margin: 10px 0; border: 1px solid var(--light-gray, #e5e7eb); border-radius: 10px; padding: 8px 12px; background: var(--white, #fff); }
.cd-section > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin: 10px 0; }
.cd-color, .cd-select { display: flex; flex-direction: column; gap: 4px; font-size: 13px; position: relative; }
.cd-color__label { color: var(--gray, #6b7280); font-weight: 600; }
.cd-color input[type=color] { width: 100%; height: 36px; padding: 2px; border-radius: 8px; cursor: pointer; }
.cd-color.cd-unset input[type=color] { opacity: .45; }
.cd-clear { position: absolute; right: 6px; bottom: 6px; border: 0; background: rgba(0,0,0,.55); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.cd-item { padding: 8px 0; border-top: 1px solid var(--light-gray, #eef0f3); }
.cd-table-wrap { overflow-x: auto; }
.cd-table { width: 100%; border-collapse: collapse; }
.cd-table th, .cd-table td { padding: 6px 8px; border-bottom: 1px solid var(--light-gray, #eef0f3); text-align: left; vertical-align: top; }
.cd-table td input { width: 100%; min-width: 120px; }
.cd-table th code { display: block; font-size: 11px; margin: 2px 0 4px; }
.ap-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin: 0 0 12px; background: var(--white, #fff); border: 1px solid var(--light-gray, #e5e7eb); border-radius: 10px; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.ap-bar__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dashboard list search (admin-list-search.js) */
.als-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.als-bar[hidden] { display: none; }
.als-input { flex: 1; max-width: 420px; padding: 9px 14px 9px 36px; border: 1px solid var(--light-gray, #e5e7eb); border-radius: 10px; font-size: 14px; background: var(--white, #fff) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") 12px center no-repeat; }
.als-input:focus { outline: 2px solid var(--primary, #4f46e5); outline-offset: 1px; }
.als-count { font-size: 13px; color: var(--gray, #6b7280); white-space: nowrap; }
.admin-table tr[hidden] { display: none; }
.als-sortable { cursor: pointer; user-select: none; }
.als-sortable:hover { color: var(--primary, #4f46e5); }
.als-sortable[aria-sort="ascending"]::after { content: " \25B2"; font-size: 10px; }
.als-sortable[aria-sort="descending"]::after { content: " \25BC"; font-size: 10px; }
@media (max-width: 640px) { .als-bar { flex-wrap: wrap; } .als-input { max-width: none; width: 100%; } }
.cd-block { border: 1px solid var(--light-gray, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--bg, #f8fafc); }
.cd-block__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.cd-block__acts { display: inline-flex; gap: 4px; }
.cd-blockbody { display: grid; gap: 8px; }
.cd-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cd-field input, .cd-field textarea, .cd-field select { width: 100%; }
.cd-inline { display: flex; gap: 8px; }
.cd-inline input { flex: 1; }
.cd-pick { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--light-gray, #eef0f3); }
.cd-addbar { display: flex; gap: 8px; margin-top: 10px; }
.admin-content [hidden].admin-section { display: none; }

/* ---- Generic reviews: one screen for list, add and edit ---- */
.gr-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 16px; border: 1px solid rgba(127,127,127,.28); border-radius: 12px; background: rgba(127,127,127,.16); backdrop-filter: blur(8px); }
.gr-bar__title { display: flex; flex-direction: column; flex: 1 1 160px; min-width: 0; }
.gr-bar__title strong, .gr-bar__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-bar__state { font-size: 13px; opacity: .75; }
.gr-bar__state.is-dirty { color: #e0a100; opacity: 1; font-weight: 600; }
.gr-form { display: grid; gap: 16px; }
.gr-card { border: 1px solid rgba(127,127,127,.28); border-radius: 12px; padding: 16px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.gr-card legend { padding: 0 8px; font-weight: 700; }
.gr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.gr-row label, .gr-label, .gr-card > label { display: grid; gap: 6px; min-width: 0; }
.gr-check { display: flex !important; flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; }
.gr-check input[type=checkbox] { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; }
.gr-count { font-size: 12px; opacity: .7; }
.gr-count.is-over { color: #e0a100; opacity: 1; }
.gr-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-chip { border: 1px dashed rgba(127,127,127,.55); background: transparent; color: inherit; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.gr-chip:hover, .gr-chip:focus-visible { border-style: solid; background: rgba(127,127,127,.14); }
.gr-sections { display: grid; gap: 12px; }
.gr-empty { margin: 0; padding: 14px; text-align: center; border: 1px dashed rgba(127,127,127,.4); border-radius: 10px; }
.gr-section { border: 1px solid rgba(127,127,127,.3); border-radius: 12px; background: rgba(127,127,127,.05); min-width: 0; }
.gr-section__head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.gr-section__num { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(127,127,127,.22); font-size: 13px; font-weight: 700; }
.gr-section__title { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.gr-section__body { padding: 0 10px 10px; }
.gr-section.is-collapsed .gr-section__body { display: none; }
.gr-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(127,127,127,.35); background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; }
.gr-icon:hover:not(:disabled), .gr-icon:focus-visible { background: rgba(127,127,127,.2); }
.gr-icon:disabled { opacity: .3; cursor: default; }
.gr-icon--danger:hover:not(:disabled) { background: rgba(220,60,60,.25); }
.gr-danger { padding-top: 4px; }
.gr-editor[hidden], .gr-form[hidden], .gr-card[hidden], .gr-danger[hidden] { display: none; }
@media (max-width: 600px) {
  .gr-bar { padding: 8px 10px; }
  .gr-section__head { flex-wrap: wrap; }
  .gr-section__title { flex-basis: calc(100% - 40px); }
}

/* ---- Section builder (generic reviews) and search-and-choose fields ---- */
.sb-card .gr-section__head { flex-wrap: wrap; }
.sb-type { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(127,127,127,.2); white-space: nowrap; }
.sb-field { display: grid; gap: 4px; min-width: 0; flex: 1 1 200px; }
.sb-field__label { font-size: 13px; font-weight: 600; opacity: .85; }
.sb-hint { font-size: 12px; opacity: .7; margin: 4px 0; }
.sb-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0; }
.sb-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sb-check input { width: 18px; height: 18px; flex: 0 0 auto; }
.sb-rep { display: grid; gap: 10px; }
.sb-rep__rows { display: grid; gap: 10px; }
.sb-rep__row { display: flex; gap: 8px; padding: 10px; border: 1px solid rgba(127,127,127,.28); border-radius: 10px; background: rgba(127,127,127,.04); }
.sb-rep__body { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }
.sb-rep__tools { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.sb-img { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-img input { flex: 1 1 180px; min-width: 0; }
.sb-img__thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(127,127,127,.3); }
.sb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sb-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; font-size: 13px; background: rgba(127,127,127,.2); }
.sb-chip__x { border: 0; background: transparent; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; line-height: 1; }
.sb-chip__x:hover { background: rgba(220,60,60,.3); }
.sb-paylist { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid rgba(127,127,127,.28); border-radius: 10px; margin: 8px 0; }
.sb-pay { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.sb-pay:hover { background: rgba(127,127,127,.15); }
.sb-pay input { flex: 0 0 auto; width: 16px; height: 16px; }
.sb-pay img { width: 22px; height: 22px; object-fit: contain; }
.sb-badge { align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: rgba(127,127,127,.22); }
.sb-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin: 10px 0 0; padding: 10px; border: 1px solid rgba(127,127,127,.3); border-radius: 12px; background: #fff; color: #14181f; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.sb-menu__item { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px; border: 1px solid rgba(127,127,127,.28); border-radius: 10px; background: #f6f7f9; color: #14181f; cursor: pointer; }
.sb-menu__item:hover, .sb-menu__item:focus-visible { border-color: #e0a100; background: #fff6de; }
.sb-menu__icon { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: #e3e7ee; color: #14181f; font-weight: 800; }
.sb-menu__text { display: grid; gap: 2px; font-size: 13px; } .sb-menu__text span { opacity: .75; }
.gr-picked { font-size: 13px; opacity: .7; } .gr-picked.is-set { opacity: 1; font-weight: 600; color: #22a06b; }
.ep { position: relative; }
.ep-list { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto; border: 1px solid rgba(127,127,127,.4); border-radius: 10px; background: #fff; color: #14181f; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.ep-list[hidden] { display: none; }
.ep-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ep-item.is-on, .ep-item:hover { background: #eaf1ff; }
.ep-item__text strong { color: #14181f; }
.ep-item img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.ep-item__text { display: grid; min-width: 0; } .ep-item__text span { font-size: 12px; opacity: .7; }
.ep-empty { padding: 10px; font-size: 13px; opacity: .7; }
.ep-bad { border-color: #d9534f !important; }

.lp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.lp-mode { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid rgba(127,127,127,.35); border-radius: 12px; cursor: pointer; }
.lp-mode input[type=radio] { flex: 0 0 18px; width: 18px; height: 18px; min-width: 0; padding: 0; margin: 2px 0 0; accent-color: #22a06b; }
.lp-mode span { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.lp-mode small { opacity: .7; }
.lp-mode.is-on { border-color: #22a06b; background: rgba(34,160,107,.08); }
.lp-item { display: flex; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 6px; border: 1px solid rgba(127,127,127,.3); border-radius: 10px; background: rgba(127,127,127,.06); }
.lp-item .item-row-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lp-serp { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid rgba(127,127,127,.3); border-radius: 10px; background: rgba(127,127,127,.06); }
.lp-serp__url { font-size: 12px; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-serp__title { font-size: 18px; color: #4a7bd8; font-weight: 600; }
.lp-serp__desc { font-size: 13px; opacity: .85; }
.lp-editor #itemSearchResults .item-search-result { margin: 2px; }

/* every dropdown in the admin is plainly visible: solid white, dark text */
.admin-content select, .admin-content select option, .admin-content select optgroup { background-color: #fff; color: #14181f; }
.admin-content select { border: 1px solid #b8c0cc; }
.admin-content input[list], .admin-content .ep input { background-color: #fff; color: #14181f; }
.sb-show { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; flex: 0 0 auto; padding: 0 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sb-show input[type=checkbox] { width: 18px; height: 18px; min-width: 0; padding: 0; margin: 0; accent-color: #22a06b; }
.sb-card.is-off { opacity: .6; border-style: dashed; }
.sb-card.is-off .gr-section__title { text-decoration: line-through; }
.rv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 6px; border: 1px solid #d5dbe5; border-radius: 12px; background: #f3f5f9; position: sticky; top: 0; z-index: 15; }
.rv-tab { flex: 1 1 auto; padding: 10px 16px; border: 0; border-radius: 9px; background: transparent; color: #44506a; font-weight: 700; cursor: pointer; }
.rv-tab:hover { background: #e4e9f2; }
.rv-tab.is-on { background: #fff; color: #14181f; box-shadow: 0 1px 6px rgba(0,0,0,.14); }
.rv-panel[hidden] { display: none; }
.rs-parts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rs-part { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid rgba(127,127,127,.35); border-radius: 10px; cursor: pointer; }
.rs-part input[type=checkbox] { width: 18px; height: 18px; min-width: 0; padding: 0; margin: 0; accent-color: #22a06b; flex: 0 0 auto; }
.ah-admin__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ah-field { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid rgba(127,127,127,.35); border-radius: 10px; }
.ah-field input[type=color] { width: 44px; height: 32px; min-width: 0; padding: 0; border: 1px solid #b8c0cc; border-radius: 8px; background: #fff; cursor: pointer; }
.ah-preview { display: grid; gap: 12px; padding: 14px; border: 1px dashed rgba(127,127,127,.5); border-radius: 12px; background: #f6f7f9; }
.ah-preview__stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ah-preview__stat { display: grid; justify-items: center; min-width: 120px; padding: 12px; border: 1px solid var(--ah-card-border); border-radius: var(--ah-radius); background: var(--ah-stat-bg); color: var(--ah-stat-text); box-shadow: var(--ah-shadow); }
.ah-preview__stat strong { font-size: 1.6rem; }
.ah-preview__section { padding: 14px; border: 1px solid var(--ah-card-border); border-radius: var(--ah-radius); background: var(--ah-section-bg); }
.ah-preview__section h3 { margin: 0 0 10px; color: var(--ah-heading); }
.ah-preview__count { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--ah-accent); color: #fff; font-size: 13px; }
.ah-preview__card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--ah-card-border); border-radius: var(--ah-radius); background: var(--ah-card-bg); color: var(--ah-card-text); box-shadow: var(--ah-shadow); text-decoration: none; }
.ah-preview__card span:last-child { display: grid; gap: 3px; }
.ah-preview__card em { justify-self: start; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--ah-accent); color: #fff; }
.ah-preview__img { width: 56px; height: 56px; border-radius: 10px; background: #dfe3ea; flex: 0 0 auto; }
.rf-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 14px; border: 1px solid #d5dbe5; border-radius: 12px; background: #f3f5f9; color: #14181f; }
.rf-bar strong { flex: 1 1 200px; }
.rf-status { font-size: 13px; color: #1f7a54; min-width: 90px; }
.rf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.rf-show { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.rf-show input[type=checkbox] { width: 18px; height: 18px; min-width: 0; padding: 0; margin: 0; accent-color: #22a06b; }
.rf-fold { border: 1px solid rgba(127,127,127,.4); background: transparent; color: inherit; border-radius: 8px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.form-group.is-off { opacity: .6; }
.form-group.is-folded > :not(.rf-head):not(label) { display: none; }

/* ---- review page look preview (admin) ---- */
.rl-preview { display: grid; gap: 12px; padding: 14px; border: 1px dashed rgba(127,127,127,.5); border-radius: 12px; background: #f6f7f9; }
.rl-preview__bar { display: flex; gap: 6px; padding: 7px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; width: max-content; max-width: 100%; overflow-x: auto; }
.rl-preview__bar span { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: #374151; }
.rl-preview__bar .rl-preview__on { background: var(--rl-accent); color: #fff; }
.rl-preview__card { padding: 20px 22px; background: var(--rl-card-bg); color: var(--rl-card-text); border: 1px solid var(--rl-border); border-radius: var(--rl-radius); box-shadow: var(--rl-shadow); border-left: 5px solid var(--rl-accent); }
.rl-preview__card h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; color: var(--rl-heading); }
.rl-preview__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(127,127,127,.12); }
.rl-preview__card p { margin: 0; }
.rl-preview__card a { color: var(--rl-accent); text-decoration: underline; }

/* ---- Geo rules tab (admin) ---- */
.gm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.gm-select, .gm-input { padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; font: inherit; min-height: 40px; max-width: 100%; }
.gm-input { min-width: 200px; flex: 1 1 200px; }
.gm-alert { margin: 8px 0; }
.gm-tablewrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.gm-table { margin: 0; width: 100%; }
.gm-table th, .gm-table td { vertical-align: middle; }
.gm-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e5e7eb; color: #374151; white-space: nowrap; }
.gm-badge--ok { background: #dcfce7; color: #166534; } .gm-badge--bad { background: #fee2e2; color: #991b1b; }
.gm-badge--warn { background: #ffedd5; color: #9a3412; } .gm-badge--mix { background: #e0e7ff; color: #3730a3; } .gm-badge--off { background: #f1f5f9; color: #64748b; }
.gm-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: #eff6ff; border: 1px solid #bfdbfe; }
.gm-card { margin: 14px 0; padding: 20px; background: #fff; color: #1f2937; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 6px 22px rgba(15,23,42,.08); display: grid; gap: 12px; }
.gm-card h3, .gm-card h4 { margin: 0; color: #0f172a; }
.gm-label { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #475569; }
.gm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: #e0e7ff; color: #312e81; font-size: 13px; font-weight: 600; }
.gm-chip button { border: 0; background: rgba(49,46,129,.15); color: inherit; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }
.gm-rules { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.gm-rule { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; }
.gm-rule__name { flex: 1 1 160px; font-weight: 600; }
.gm-testbox { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: #f1f5f9; }
.gm-test { flex: 1 1 240px; }
.gm-importout { white-space: pre-wrap; font-size: 14px; }
.gm-presetrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eef0f4; }
@media (max-width: 640px) { .gm-card { padding: 14px; } .gm-input { min-width: 0; } }
.gm-subnav { margin-bottom: 12px; flex-wrap: wrap; }
.gm-subnav .rv-tab { text-decoration: none; text-align: center; display: inline-block; }
.gm-lead { margin: 4px 0 12px; color: #334155; max-width: 70ch; }
.gm-stack { display: grid; gap: 10px; }
.gm-opts { display: grid; gap: 8px; }
.gm-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f8fafc; cursor: pointer; }
.gm-opt > span { display: grid; gap: 2px; }
.gm-opt small { color: #64748b; }
.gm-opt input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.gm-opt--row { align-items: center; padding: 8px 12px; }
.gm-opt--row > span { display: inline; flex: 1 1 auto; }
.gm-pickitems { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.gm-codeswrap { display: grid; gap: 6px; }
.gm-codes { width: 100%; min-height: 56px; resize: vertical; }
.gm-codesmsg:empty { display: none; }
.gm-bkresult { min-height: 1.4em; color: #0f172a; font-weight: 600; }
.gm-defpick[hidden], .gm-pickitems[hidden] { display: none; }
.gm-codeswrap .btn { justify-self: start; }
.gm-card .gm-select, .gm-card .gm-input { max-width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .gm-card .gm-select { width: 100%; } }

/* AI Studio (admin) */
.as-groups { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.as-chip { padding: 8px 16px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #0f172a; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; }
.as-chip.is-on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.as-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.as-card { text-align: left; display: grid; gap: 4px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; color: #0f172a; font: inherit; cursor: pointer; }
.as-card .muted { font-size: 13px; }
.as-card.is-on { border-color: #1d4ed8; box-shadow: 0 0 0 2px rgba(29,78,216,.18); }
.as-field { display: grid; gap: 6px; }
.as-label { font-weight: 600; color: #0f172a; }
.as-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.as-text { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; font: inherit; line-height: 1.5; box-sizing: border-box; }
.as-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-faq { padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; }
.as-faq p { margin: 4px 0 0; }
.as-sec { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid #e5e7eb; }
.as-claim { display: block; padding: 6px 0; }
.as-pre { white-space: pre-wrap; background: #f1f5f9; padding: 12px; border-radius: 10px; color: #0f172a; }
.as-fix { display: grid; gap: 8px; margin-top: 8px; }
.as-faqs { display: grid; gap: 8px; margin-top: 8px; }
