/*
 * AavaCMS — public theme "aava"
 * Dark-first, auto light/dark via prefers-color-scheme, overridable with
 * [data-theme]. System fonts for speed; luminous seafoam accent.
 */

/* ---- Tokens: dark (default) -------------------------------------------- */
:root {
  --bg: #080d12;
  --bg-2: #0c131a;
  --surface: #111a23;
  --surface-2: #17222d;
  --line: #223039;
  --line-soft: #1a2530;
  --text: #e9f0f4;
  --dim: #92a6b3;
  --faint: #5f7484;
  --accent: #2fe6c8;
  --accent-2: #7cf0dd;
  --accent-ink: #04231f;
  --glow: rgba(47, 230, 200, 0.16);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
  --wrap: 72rem;
  --measure: 68ch;
  --content-width: 64rem;
  /* Public view spacing — overridable per site in Asetukset > Näkymä */
  --page-pad: 1.25rem;
  --hero-top: clamp(3.5rem, 12vw, 8rem);
  --hero-bottom: clamp(2.5rem, 8vw, 5rem);
  --section-top: 3rem;
  --section-bottom: 4rem;
  --footer-top: 2rem;
  --radius: 10px;
}

/* ---- Tokens: light ----------------------------------------------------- */
[data-theme="light"] {
  --bg: #f4f7f8;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef3f5;
  --line: #d9e4e8;
  --line-soft: #e7eef1;
  --text: #0d1720;
  --dim: #506671;
  --faint: #7c9099;
  --accent: #0b8f7d;
  --accent-2: #0aa892;
  --accent-ink: #ffffff;
  --glow: rgba(11, 143, 125, 0.12);
  --shadow: 0 18px 40px -24px rgba(15, 40, 50, 0.25);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f7f8;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef3f5;
    --line: #d9e4e8;
    --line-soft: #e7eef1;
    --text: #0d1720;
    --dim: #506671;
    --faint: #7c9099;
    --accent: #0b8f7d;
    --accent-2: #0aa892;
    --accent-ink: #ffffff;
    --glow: rgba(11, 143, 125, 0.12);
    --shadow: 0 18px 40px -24px rgba(15, 40, 50, 0.25);
  }
}

/* ---- Base -------------------------------------------------------------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .feature-title, .index-title, .brand {
  font-family: var(--font-heading);
}

a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.site-main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--content-width); margin-inline: auto; padding-inline: var(--page-pad); }
.site-main { flex: 1 0 auto; }
.muted { color: var(--dim); }

/* ---- Header ------------------------------------------------------------ */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  font-size: 1.08rem;
}
.brand .aava-mark { color: var(--accent); flex: none; }
.nav { display: none; gap: 1.4rem; }
.nav a { color: var(--dim); text-decoration: none; font-size: 0.96rem; transition: color 0.15s; }
.nav a:hover { color: var(--text); }

.theme-toggle {
  width: 2.2rem; height: 2.2rem;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }

@media (min-width: 640px) { .nav { display: inline-flex; } }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  font: inherit; font-weight: 600;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 0.42rem 0.8rem; font-size: 0.9rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-glow {
  position: absolute; inset: -30% -10% auto -10%;
  height: 70vh; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, var(--glow), transparent 70%);
  filter: blur(6px);
}
.hero-inner { padding-block: var(--hero-top) var(--hero-bottom); }
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 1.1rem;
  max-width: 14ch;
}
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--dim); max-width: 46ch; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---- Latest ------------------------------------------------------------ */
.latest { padding-block: var(--section-top) var(--section-bottom); }
.latest-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.4rem; }
.latest-head h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 0; }
.latest-all { color: var(--dim); text-decoration: none; font-size: 0.95rem; }
.latest-all:hover { color: var(--accent); }
.latest-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.latest-grid a {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.latest-grid a:hover { border-color: var(--accent); transform: translateY(-2px); }
.latest-grid time { font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); }
.lg-title { font-size: 1.12rem; font-weight: 650; line-height: 1.3; }
@media (min-width: 720px) { .latest-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Article ----------------------------------------------------------- */
.article { max-width: var(--content-width); padding-block: var(--section-top) var(--section-bottom); }
.article-head h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 0.8rem; }
.article-meta { display: flex; align-items: center; gap: 0.8rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--dim); margin: 0 0 2.2rem; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 0.12rem 0.6rem; color: var(--dim); }

/* ---- Prose ------------------------------------------------------------- */
.prose { font-size: 1.075rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-size: 1.6rem; letter-spacing: -0.015em; margin-top: 2.6rem; line-height: 1.2; }
.prose h3 { font-size: 1.25rem; margin-top: 2rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose blockquote { margin: 0; padding: 0.4rem 0 0.4rem 1.2rem; border-left: 3px solid var(--accent); color: var(--dim); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4rem; }
.prose :not(pre) > code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--surface-2); padding: 0.14em 0.42em; border-radius: 5px;
}
.prose pre {
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 1rem 1.15rem; border-radius: var(--radius);
  overflow: auto; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.55;
}
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.6rem 0; }

/* ---- Blog index -------------------------------------------------------- */
.index { padding-block: var(--section-top) var(--section-bottom); max-width: var(--content-width); }
.index-title { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.03em; font-weight: 800; margin: 0 0 2rem; }
.feature {
  display: grid; gap: 0.6rem;
  padding: 1.8rem; margin-bottom: 1.4rem;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-kicker { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.feature-title { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 750; line-height: 1.15; letter-spacing: -0.02em; }
.feature-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--dim); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); }
.post-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.05rem 0; text-decoration: none; color: var(--text); }
.pl-title { font-size: 1.12rem; font-weight: 600; }
.post-list a:hover .pl-title { color: var(--accent); }
.post-list time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--dim); white-space: nowrap; }
.empty { color: var(--dim); }

/* ---- 404 --------------------------------------------------------------- */
.notfound { padding-block: 5rem 6rem; max-width: 40rem; }
.nf-code { font-family: var(--font-mono); font-size: 3rem; color: var(--accent); margin: 0 0 0.5rem; }
.notfound h1 { font-size: 1.8rem; margin: 0 0 0.8rem; }

/* ---- Footer ------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--line-soft); margin-top: var(--footer-top); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem; padding-block: 2rem; color: var(--dim); font-size: 0.9rem; }
.foot-by a { color: var(--dim); text-decoration: underline; }
.foot-by a:hover { color: var(--accent); }

/* ---- One orchestrated load reveal -------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .is-home .hero-inner > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .is-home .hero-kicker { animation-delay: 0.02s; }
  .is-home .hero-title { animation-delay: 0.08s; }
  .is-home .hero-sub { animation-delay: 0.16s; }
  .is-home .hero-actions { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* ---- Width control (public) ------------------------------------------- */
.tool { position: relative; display: inline-flex; }
.icon-btn {
  width: 2.2rem; height: 2.2rem;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--dim);
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }
.width-pop {
  position: absolute; right: 0; top: calc(100% + 0.55rem);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.85rem 1rem; box-shadow: var(--shadow);
  display: grid; gap: 0.55rem; width: 15rem; z-index: 60;
}
.wp-row { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); }
.width-pop input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---- Embeds (module shortcodes) --------------------------------------- */
.aava-embed { position: relative; width: 100%; margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.aava-embed.aava-embed-16x9, .aava-embed.aava-embed-live { aspect-ratio: 16 / 9; width: 100%; max-width: 1000px; max-height: 70vh; }
.aava-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-ph { margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--dim); font-family: var(--font-mono); font-size: 0.85rem; background: var(--surface-2); }

/* Fixed-height embeds (audio players) + no-overflow hardening */
.aava-embed-fixed { position: relative; width: 100%; max-width: 100%; margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; }
.aava-embed-fixed iframe { display: block; width: 100%; max-width: 100%; border: 0; }
.aava-embed { max-width: 100%; }
.prose iframe, .ed-preview iframe { max-width: 100%; }

/* Live-stream embeds (Kick/Twitch) share the unified video rule above. */

/* Uploaded videos also fit the viewport (no vertical scroll), left-aligned */
.prose video, .ed-preview video { width: auto; height: auto; max-width: 1000px; }

/* Source link under Yle embeds (fallback for non-embeddable content) */
.aava-embed-note { margin: -0.6rem 0 1.5rem; font-size: 0.85rem; }
.aava-embed-note a { color: var(--accent); }

/* Yle Areena player: native rendering, width-capped (no aspect box to avoid interfering with Yle's own player) */
.aava-embed-yle { width: 100%; max-width: 1000px; margin: 1.5rem 0; }
.aava-embed-yle .yle_areena_player { width: 100%; }

/* Article tags */
.article-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 2.5rem 0 0; }
.article-tags li { font-size: 0.82rem; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.7rem; }

/* ---- PWA install page ------------------------------------------------- */
.pwa-page { max-width: 62rem; padding-top: 2rem; padding-bottom: 3.5rem; }
.pwa-langs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.pwa-langs a { font-size: 0.85rem; padding: 0.32rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); text-decoration: none; transition: all 0.15s; }
.pwa-langs a:hover { color: var(--text); border-color: var(--text); }
.pwa-langs a.is-current { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.pwa-page h1 { margin: 0 0 0.5rem; }
.pwa-intro { font-size: 1.12rem; color: var(--dim); max-width: 44rem; margin: 0 0 1rem; }
.pwa-now { margin: 1.3rem 0; }
.pwa-installed { display: inline-block; padding: 0.6rem 0.95rem; border-radius: 0.6rem; margin: 0 0 1rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.pwa-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.6rem 0; }
.pwa-card { border: 1px solid var(--line); border-radius: 0.9rem; padding: 1.2rem 1.35rem; background: var(--surface); }
.pwa-card h2 { margin: 0 0 0.7rem; font-size: 1.05rem; }
.pwa-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.45rem; }
.pwa-steps li { line-height: 1.55; }
.pwa-note { margin-top: 1.1rem; }
@media (min-width: 760px) { .pwa-cards { grid-template-columns: repeat(3, 1fr); } }

/* Footer links group + install link */
.foot-links { display: inline-flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.foot-install { font-weight: 600; color: var(--text); text-decoration: none; }
.foot-install:hover { color: var(--accent); }

/* ---- Native forms ----------------------------------------------------- */
.aava-form-wrap { margin: 1.5rem 0; }
.aava-form { display: grid; gap: 1rem; max-width: 34rem; }
.aava-field { display: grid; gap: 0.35rem; font-size: 0.95rem; font-weight: 600; }
.aava-field span { color: var(--dim); font-weight: 500; }
.aava-form input:not([type="hidden"]), .aava-form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.85rem;
}
.aava-form textarea { resize: vertical; min-height: 7rem; }
.aava-form input:focus-visible, .aava-form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.aava-form input:focus, .aava-form textarea:focus { border-color: var(--accent); }
.aava-form button { justify-self: start; }
.aava-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.aava-form-ok { padding: 0.8rem 1rem; border-radius: 10px; margin: 0 0 1rem; font-weight: 600;
  color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.aava-form-err { padding: 0.8rem 1rem; border-radius: 10px; margin: 0 0 1rem; font-weight: 600;
  color: #ff9a9a; background: color-mix(in srgb, #ff6b6b 12%, transparent); border: 1px solid color-mix(in srgb, #ff6b6b 40%, transparent); }

/* ---- Accessibility core (theme-agnostic — every base theme inherits this) */
.skip-link {
  position: absolute; left: 0.5rem; top: -3.5rem; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1.1rem; border-radius: 0 0 10px 10px; font-weight: 700;
  text-decoration: none; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }
/* Never fully hide focus; honour Windows high-contrast / forced colors. */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid CanvasText; }
  .skip-link { border: 1px solid CanvasText; }
}

/* Accessibility statement page */
.a11y-page { padding-block: var(--section-top) var(--section-bottom); }
.a11y-page h2 { margin-top: 2rem; }
.foot-a11y { color: var(--dim); text-decoration: underline; }
.foot-a11y:hover { color: var(--accent); }

/* ---- Search ----------------------------------------------------------- */
.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; }
.site-search { display: flex; align-items: center; gap: 0.3rem; }
.site-search input { width: 8.5rem; max-width: 40vw; font: inherit; font-size: 0.9rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem; transition: width 0.2s, border-color 0.15s; }
.site-search input:focus { width: 12rem; outline: none; border-color: var(--accent); }
.site-search button { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; color: var(--dim); background: none; border: none; border-radius: 50%; cursor: pointer; }
.site-search button:hover { color: var(--text); }
.site-search svg { width: 1.15rem; height: 1.15rem; }

.search-page { padding-block: var(--section-top) var(--section-bottom); }
.search-form { display: flex; gap: 0.6rem; margin: 1rem 0 2rem; max-width: 34rem; }
.search-form input { flex: 1; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; }
.search-form input:focus { border-color: var(--accent); }
.search-count { color: var(--dim); margin: 0 0 1.2rem; }
.search-empty { color: var(--dim); }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.search-title { font-size: 1.2rem; font-weight: 700; text-decoration: none; color: var(--text); }
.search-title:hover { color: var(--accent); }
.search-type { display: inline-block; margin-left: 0.6rem; font-size: 0.72rem; font-weight: 600; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.55rem; vertical-align: middle; }
.search-excerpt { margin: 0.4rem 0 0; color: var(--dim); line-height: 1.6; }
.search-excerpt mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); border-radius: 3px; padding: 0 0.12em; }
@media (max-width: 620px) { .site-search input { width: 6.5rem; } .site-search input:focus { width: 9rem; } }

/* Member pages (register / login / account) */
.member-page { padding-block: var(--section-top) var(--section-bottom); max-width: 34rem; }
.member-form { max-width: 30rem; margin-top: 0.5rem; }
.member-errors { list-style: none; margin: 0 0 1.2rem; padding: 0.8rem 1rem; border-radius: 10px; display: grid; gap: 0.3rem; color: #ff9a9a; background: color-mix(in srgb, #ff6b6b 12%, transparent); border: 1px solid color-mix(in srgb, #ff6b6b 40%, transparent); }
.member-alt { margin-top: 1.2rem; color: var(--dim); }
.member-info { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.2rem; margin: 1rem 0 1.6rem; }
.member-info dt { color: var(--dim); }
.member-info dd { margin: 0; font-weight: 600; }
.foot-member { color: var(--dim); text-decoration: underline; }
.foot-member:hover { color: var(--accent); }

/* Booking (public) */
.booking-page { padding-block: var(--section-top) var(--section-bottom); max-width: 46rem; }
.booking-pick { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin: 1rem 0 1.5rem; }
.booking-pick .aava-field { flex: 1 1 12rem; }
.booking-pick select, .booking-pick input { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.85rem; }
.booking-h2 { margin-top: 2rem; font-size: 1.15rem; }
.booking-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.booking-slot { text-align: center; padding: 0.7rem 0.4rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; transition: all 0.15s; }
.booking-slot:hover { border-color: var(--accent); color: var(--accent); }
.booking-summary { padding: 0.8rem 1rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.booking-form { max-width: 30rem; margin-top: 1rem; }
.foot-book { color: var(--dim); text-decoration: underline; }
.foot-book:hover { color: var(--accent); }

/* Booking availability calendar (rental) */
.bk-cal { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; margin: 1rem 0; }
.bk-cal-title { font-weight: 700; margin-bottom: 0.5rem; text-align: center; }
.bk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.bk-cal-wd { text-align: center; font-size: 0.72rem; color: var(--dim); padding: 0.2rem 0; }
.bk-cal-day { text-align: center; padding: 0.45rem 0; border-radius: 6px; font-size: 0.85rem; }
.bk-cal-day.is-free { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.bk-cal-day.is-booked { background: color-mix(in srgb, #ff6b6b 16%, transparent); color: var(--dim); text-decoration: line-through; }
.bk-cal-day.is-past { color: color-mix(in srgb, var(--dim) 50%, transparent); }
.bk-cal-legend { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--dim); }
.bk-cal-legend .bk-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-left: 0.6rem; }
.bk-dot.is-free { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.bk-dot.is-booked { background: color-mix(in srgb, #ff6b6b 40%, transparent); }

/* Booking seasonal rules info */
.booking-rules { margin: 1rem 0; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.booking-rules-title { font-weight: 600; margin: 0 0 0.4rem; }
.booking-rules ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.booking-rules li { line-height: 1.5; font-size: 0.95rem; }

/* Generic content-type archive + custom fields */
.index-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.index-row:hover .index-row-title { text-decoration: underline; }
.index-row-title { font-weight: 600; }
.index-row time { color: var(--dim); font-size: 0.9rem; white-space: nowrap; }
.content-fields { display: grid; gap: 0.5rem; margin: 1.5rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; }
.content-fields .cf-row { display: grid; grid-template-columns: minmax(6rem, 12rem) 1fr; gap: 0.75rem; margin: 0; }
.content-fields dt { font-weight: 600; color: var(--dim); }
.content-fields dd { margin: 0; }
.content-fields img { max-width: 100%; height: auto; border-radius: 8px; }
