/*
  Plain modern CSS, no build step:
  - light-dark() picks a colour for light or dark mode (follows the visitor's system setting)
  - native CSS nesting (.a { .b { } })
  - clamp() for fluid font sizes, grid with auto-fit for responsive cards
*/

:root {
  color-scheme: light dark;

  --bg:        light-dark(#fbf8f2, #12191c);
  --surface:   light-dark(#ffffff, #1a2428);
  --surface-2: light-dark(#f3eee4, #222e33);
  --text:      light-dark(#1f2a2e, #e6e9e7);
  --muted:     light-dark(#5d6b70, #9aa8ad);
  --line:      light-dark(#e3dccd, #2e3c42);
  --brand:     light-dark(#1f4e5f, #7fb6c7);
  --brand-2:   light-dark(#2f6f84, #a5d0dc);
  --on-brand:  light-dark(#fdfaf3, #10191c);
  --accent:    #e0a458;
  --ok:        light-dark(#2e7d4f, #6fcf97);
  --warn:      light-dark(#a8620b, #f2b45a);
  --danger:    light-dark(#b3261e, #f28b82);

  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px -12px rgb(0 0 0 / .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
}

main { flex: 1; padding-block: 1rem 3rem; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.35rem, 1.2rem + .8vw, 1.8rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .3em; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--brand); text-underline-offset: .2em; }
a:hover { color: var(--brand-2); }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 30rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; &:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .5rem 1rem; } }
.section { margin-block: 2.5rem; }
.faded { opacity: .55; }
.inline { display: inline; }

/* ---------- header & navigation ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }

.brand {
  display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); margin-right: auto;
  .brand-mark { width: 2.4rem; height: 2.4rem; flex: none; }
  .brand-text { display: grid; line-height: 1.15; }
  strong { font-family: var(--serif); font-size: 1.25rem; }
  small { color: var(--muted); font-size: .75rem; }
}

.menu-button {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
  svg { width: 1.4rem; height: 1.4rem; }
}

/* Phones: the nav is a native popover opened by the menu button. */
.site-nav {
  margin: 0; inset: 4.5rem 1rem auto auto; width: min(20rem, calc(100vw - 2rem));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); padding: .75rem;
  &:popover-open { display: flex; flex-direction: column; gap: .15rem; }
  a, .link { padding: .55rem .75rem; border-radius: 8px; text-decoration: none; color: var(--text); text-align: left; }
  a:hover, .link:hover { background: var(--surface-2); }
  .nav-sep { border-top: 1px solid var(--line); margin: .35rem 0; }
  .nav-admin { color: var(--warn); font-weight: 600; }
  .button { text-align: center; color: var(--on-brand); }
}

.lang-switch {
  display: flex; gap: .25rem; padding: .35rem;
  a { font-size: .8rem; font-weight: 600; letter-spacing: .04em; padding: .3rem .55rem; color: var(--muted); }
  a[aria-current="true"] { background: var(--brand); color: var(--on-brand); }
}

/* Wide screens: show the nav as a normal bar. */
@media (min-width: 76rem) {
  .menu-button { display: none; }
  .site-nav, .site-nav:popover-open {
    display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .1rem;
    position: static; inset: auto; width: auto; padding: 0; border: 0; box-shadow: none; background: none;
  }
  /* Menu items come from Admin → Pages; if there are many, the row wraps between items, never inside one. */
  .site-nav { a, .link { padding: .45rem .55rem; font-size: .95rem; white-space: nowrap; } .nav-sep { border: 0; border-left: 1px solid var(--line); height: 1.4rem; margin: 0 .4rem; } }
}

/* ---------- buttons & forms ---------- */

.button, button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid var(--brand);
  background: var(--brand); color: var(--on-brand); font: 600 1rem/1.2 var(--font);
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s;
  &:hover { background: var(--brand-2); color: var(--on-brand); }
  &:active { transform: translateY(1px); }
  &.ghost { background: transparent; color: var(--brand); &:hover { background: var(--surface-2); } }
  &.small { padding: .4rem .85rem; font-size: .875rem; }
  &.wide { width: 100%; }
  &.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
  &.google { background: var(--surface); color: var(--text); border-color: var(--line); svg { width: 1.2rem; height: 1.2rem; } }
}
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.danger { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 500; font-size: .95rem; }
label.check { display: flex; align-items: center; gap: .5rem; align-self: end; padding-bottom: .6rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  &:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
  &.invalid { border-color: var(--danger); }
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
.field-error { color: var(--danger); font-size: .875rem; margin: 0; }
.row-2, .row-3 { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: repeat(3, 1fr); } }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); margin: 1rem 0;
  &::before, &::after { content: ""; flex: 1; border-top: 1px solid var(--line); } }

.notice { padding: .8rem 1rem; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--accent); margin-bottom: 1rem;
  &.ok { border-color: var(--ok); } &.error { border-color: var(--danger); } &.warn { border-color: var(--warn); } p { margin: 0 0 .3rem; } }

/* ---------- panels, cards ---------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  h2:first-child, h3:first-child { margin-top: 0; } }
details.panel summary { cursor: pointer; font-weight: 600; }
details.panel[open] summary { margin-bottom: 1rem; }

.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  &.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); } }
.card-list { display: grid; gap: .75rem; }

.event-card {
  display: flex; gap: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  &:hover { transform: translateY(-2px); }
  &:has(a:focus-visible) { outline: 3px solid var(--accent); }
  h3 a { color: var(--text); text-decoration: none; &::after { content: ""; position: absolute; inset: 0; } }
  .event-body { position: relative; flex: 1; min-width: 0; }
  p { margin: 0 0 .25rem; }
}
.event-card { position: relative; }
.event-date {
  flex: none; width: 3.75rem; height: 4rem; display: grid; place-content: center; text-align: center;
  background: var(--surface-2); border-radius: 12px; line-height: 1;
  .day { font: 600 1.6rem var(--serif); color: var(--brand); }
  .month { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
}
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: .15rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); margin-bottom: .35rem;
  &.tag-training { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--warn); } }
.places { font-size: .875rem; font-weight: 600; color: var(--ok); &.few { color: var(--warn); } &.full { color: var(--danger); } }

/* ---------- home ---------- */

.hero {
  position: relative; margin-top: -1rem; padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(5rem, 12vw, 8rem);
  color: #fdfaf3; overflow: hidden;
  background:
    radial-gradient(60rem 20rem at 85% -10%, rgb(224 164 88 / .35), transparent 60%),
    linear-gradient(180deg, #24566a 0%, #2f6f84 55%, #4f8f9d 100%);
  h1 { max-width: 20ch; color: #fff; }
  .lead { color: rgb(255 255 255 / .85); max-width: 40ch; }
  .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; opacity: .85; margin: 0; }
  .button { background: #fdfaf3; color: #1f4e5f; border-color: #fdfaf3; }
  .button.ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); }
}
.hero-waves { position: absolute; bottom: -1px; left: 0; width: 100%; height: 5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem;
  h1, h2 { margin-bottom: .4em; } }
.split { display: grid; gap: 2rem; align-items: center; @media (min-width: 52rem) { grid-template-columns: 3fr 2fr; } }
.quote-card { margin: 0; padding: 2rem; border-radius: var(--radius); background: var(--surface-2); font: italic 1.35rem/1.5 var(--serif);
  cite { display: block; margin-top: .75rem; font: normal .9rem var(--font); color: var(--muted); } }

/* ---------- content pages ---------- */

.page-head { padding-block: 1.5rem .5rem; .lead { max-width: 50ch; } }
.prose { max-width: 70ch; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem;
  dt { color: var(--muted); } dd { margin: 0; } }
.breadcrumb { margin: .5rem 0 0; font-size: .9rem; }

/* Pages written in Admin → Pages (Markdown turned into HTML) */
.content-page { padding-bottom: 3rem; }
.content-page .page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem;
  .breadcrumb { flex-basis: 100%; } h1 { margin-bottom: .2em; } }
.admin-tools { display: flex; gap: .5rem; align-items: center; margin: 0; }

/* Section menu: a row of chips on phones, a side column on wide screens */
.subnav { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1rem;
  a { flex: none; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .93rem; }
  a:hover { background: var(--surface-2); }
  a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); } }
@media (min-width: 56rem) {
  .content-page.has-subnav { display: grid; grid-template-columns: 15rem 1fr; column-gap: 2.5rem;
    .page-head { grid-column: 1 / -1; }
    .subnav { flex-direction: column; overflow: visible; position: sticky; top: 5rem; align-self: start;
      a { border-radius: 8px; border-color: transparent; white-space: normal; } } }
}

.page-body .prose {
  line-height: 1.7;
  h2, h3, h4 { margin-top: 1.8em; }
  h2:first-child, h3:first-child { margin-top: .4em; }
  img { max-width: 100%; height: auto; border-radius: 10px; }
  blockquote { margin: 1.5rem 0; padding: .4rem 0 .4rem 1.25rem; border-left: 3px solid var(--accent); font: italic 1.12rem/1.6 var(--serif); }
  table { border-collapse: collapse; th, td { border: 1px solid var(--line); padding: .4rem .6rem; } }
}
.prose .gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  a { display: block; } img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; transition: transform .2s; }
  a:hover img { transform: scale(1.03); } }
.embed { margin: 1.5rem 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2);
  iframe { width: 100%; height: 100%; border: 0; display: block; }
  &.embed-map { aspect-ratio: 4 / 3; } }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line);
  a { display: grid; text-decoration: none; padding: .5rem .75rem; border-radius: 10px; max-width: 48%; }
  a:hover { background: var(--surface-2); }
  small { color: var(--muted); } .next { margin-left: auto; text-align: right; } }

.lightbox { padding: 0; border: 0; border-radius: 12px; background: #000; max-width: 95vw; max-height: 92vh;
  &::backdrop { background: rgb(0 0 0 / .8); }
  img { display: block; max-width: 95vw; max-height: 92vh; object-fit: contain; }
  form { position: absolute; top: .5rem; right: .5rem; }
  .icon-button { background: rgb(0 0 0 / .55); color: #fff; border: 0; cursor: pointer; } }

/* ---------- events ---------- */

.events-layout { display: grid; gap: 2rem; @media (min-width: 60rem) { grid-template-columns: 1fr 22rem; align-items: start; aside { position: sticky; top: 5rem; } } }
.month-title { font-size: 1.1rem; color: var(--muted); font-family: var(--font); text-transform: uppercase; letter-spacing: .06em; margin: 1.6rem 0 .6rem; }
.subscribe { margin-top: 1rem; }

.calendar {
  padding: 1rem;
  table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
  th { font-size: .75rem; color: var(--muted); font-weight: 600; padding-bottom: .4rem; }
  td { padding: 2px; }
  td > * { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-size: .9rem; }
  td.out { opacity: .35; }
  td.busy a { background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 600; }
  td.today > * { outline: 2px solid var(--accent); }
}
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; h2 { font-size: 1.15rem; margin: 0; } }
.icon-button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; text-decoration: none; font-size: 1.4rem;
  &:hover { background: var(--surface-2); } }
/* htmx adds this class while a request runs */
.htmx-request.calendar, .htmx-request .quote { opacity: .6; transition: opacity .2s; }

.detail-layout { display: grid; gap: 2rem; @media (min-width: 60rem) { grid-template-columns: 1fr 24rem; align-items: start; .booking { position: sticky; top: 5rem; } } }
.quote { min-height: 3rem; }
.quote-table { width: 100%; border-collapse: collapse; font-size: .92rem;
  td, th { padding: .4rem 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
  .total th { border-bottom: 0; font-size: 1.05rem; padding-top: .6rem; } }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- account ---------- */

.booking-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; p { margin: 0; } }
.booking-meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.status { display: inline-block; font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); }
.status-awaiting_payment, .status-unpaid { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.status-confirmed, .status-paid { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.status-cancelled { color: var(--muted); }
.message { margin-bottom: 1rem; header { margin-bottom: .5rem; } h3 { margin: 0; } }

.auth { margin-top: 2rem; h1 { margin-top: 0; } }

/* ---------- admin ---------- */

.admin-nav { display: flex; gap: .25rem; overflow-x: auto; padding: .5rem 0; margin-bottom: .5rem; border-bottom: 1px solid var(--line);
  a { padding: .45rem .8rem; border-radius: 999px; text-decoration: none; white-space: nowrap; color: var(--muted); font-size: .95rem; }
  a[aria-current="page"] { background: var(--brand); color: var(--on-brand); } }
.filters { display: flex; flex-wrap: wrap; gap: .4rem;
  a { padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; }
  a[aria-current="page"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); } }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin: 1rem 0; }
.stat { display: grid; padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  .stat-value { font: 600 2rem var(--serif); color: var(--brand); } .stat-label { color: var(--muted); } }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem;
  th, td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
  thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
  tbody tr:last-child td { border-bottom: 0; }
  tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
  .overdue { color: var(--danger); font-weight: 600; }
  .payment { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
  meter { width: 5rem; vertical-align: middle; }
}
.section > table.data { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
table.prices { input { padding: .4rem .5rem; min-width: 7rem; } .row-actions { white-space: nowrap; display: flex; gap: .6rem; align-items: center; } }

.lang-texts { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem;
  legend { font-weight: 600; margin-bottom: .5rem; } }
.lang-panel { border: 1px solid var(--line); border-radius: 10px; padding: .6rem 1rem;
  summary { cursor: pointer; font-weight: 600; display: flex; gap: .75rem; align-items: baseline; }
  &[open] { padding-bottom: 1rem; summary { margin-bottom: .75rem; } }
  label + label { margin-top: .75rem; } }
.key-list { columns: 2; font-size: .8rem; padding-left: 1rem; }

/* ---------- invoice ---------- */

.invoice { background: #fff; color: #1b1b1b; padding: clamp(1.25rem, 4vw, 3rem); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 52rem;
  h1 { font-size: 1.6rem; margin-top: 0; } h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #666; margin: 0 0 .4rem; font-family: var(--font); }
  code { background: #f2f2f2; }
  .muted { color: #666; } }
.invoice-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; p { margin: 0; } }
.invoice-stamp { align-self: start; border: 3px solid currentColor; border-radius: 8px; padding: .4rem .9rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-4deg);
  &.status-unpaid { color: #a8620b; } &.status-paid { color: #2e7d4f; } &.status-cancelled { color: #888; } }
.invoice-parties { display: grid; gap: 1.5rem; margin: 2rem 0; @media (min-width: 40rem) { grid-template-columns: 1fr 1fr; } }
.invoice-lines { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem;
  th, td { padding: .55rem .4rem; border-bottom: 1px solid #ddd; text-align: left; }
  tfoot th { border-bottom: 0; font-size: 1.1rem; } }

/* ---------- footer ---------- */

.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 2.5rem 0 1rem; font-size: .95rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer-title { font: 600 .8rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .5rem; }
.footer-quote { font: italic 1.1rem/1.5 var(--serif); margin: 0 0 .3rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; }

/* ---------- print (invoice → PDF) ---------- */

@media print {
  .site-header, .site-footer, .no-print, .skip-link { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .invoice { box-shadow: none; padding: 0; max-width: none; }
}

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

/* ---------- admin: page editor, pictures ---------- */

.admin.wide { max-width: 90rem; }
.editor { display: grid; gap: 1rem; align-items: start;
  textarea { font: .9rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 24rem; resize: vertical; }
  .preview { border: 1px dashed var(--line); border-radius: 10px; padding: .5rem 1rem; max-height: 40rem; overflow: auto; max-width: none;
    background: var(--bg); img { max-width: 100%; } }
  .editor-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; } }
@media (min-width: 64rem) { .editor { grid-template-columns: 1fr 1fr; } }
details.help { summary { cursor: pointer; color: var(--brand); } table { margin-top: .5rem; } }
.input-prefix { display: flex; align-items: stretch;
  > span { display: grid; place-items: center; padding: 0 .5rem; background: var(--surface-2); border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); font-size: .9rem; }
  input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; } }
td.indent { padding-left: 2rem; &::before { content: "↳ "; color: var(--muted); } }
.lang-dot { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1rem .35rem; margin-right: .2rem; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); &.on { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); } }
.tag.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.image-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  figure { margin: 0; padding: .6rem; display: grid; gap: .5rem; }
  img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
  code { display: block; font-size: .78rem; overflow-wrap: anywhere; }
  .actions { display: flex; gap: .75rem; align-items: center; } }
button.link.danger { color: var(--danger); }
