/*
  Theme for association sites, the resident portal, the board's admin and the platform console.
  Follows docs/design/README.md (reference: docs/design/reference/): Atkinson Hyperlegible Next at 18px for
  text, Schibsted Grotesk for headings, warm paper neutrals, one brand colour per association, photo-led
  public pages, pill buttons and a yellow focus ring.

  Per-association tokens (--brand, --brand-dark, --brand-soft, --brand-mid, --brand-light, --brand-ink) are set
  in ThemeStyle.razor; --brand-dark is darkened until it reaches 4.5:1 on white, so it is safe for text and links.
*/

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Arabic (WEB-13): only downloaded when a page has Arabic text. */
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* Arabic (WEB-13): only downloaded when a page has Arabic text. */
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --brand: #1F6F5C;
  --brand-dark: #165746;
  --brand-soft: #E6F1ED;
  --brand-mid: #73A597;
  --brand-light: #A5C5BD;
  --brand-ink: #FFFFFF;

  --ink: #1C2026;
  --muted: #555C64;
  --line: #E4E0D8;
  --line-strong: #D8D3CA;
  --field-line: #8E918C;
  --ground: #F2EFE9;
  --page: #FAF8F4;
  --surface: #FFFFFF;
  --platform-ground: #F5F4F1;
  --footer: #1F252B;
  --danger: #A52A2A;
  --danger-soft: #FAEAEA;
  --ok: #276749;
  --ok-soft: #E6F4EB;
  --focus: #F1B82D;

  --font: "Atkinson Hyperlegible Next", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --font-display: "Schibsted Grotesk", var(--font);
  --radius: 8px;
  --radius-lg: 12px;
  --wrap: 68rem;
  --measure: 44rem;
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis: none;
}

/* Body is a flex column; without this, a wide child (the scrolling menu) widens the whole page on phones. */
body > * { min-width: 0; }

button,
input,
textarea,
select { font: inherit; color: inherit; }

h1,
h2,
h3 {
  margin: 0 0 0.7em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.15rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }

a {
  color: var(--brand-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Headings receive programmatic focus after navigation (for screen readers); no ring needed. */
h1:focus { outline: none; }

code { font-size: 0.9em; }

.wrap {
  width: min(calc(100% - 2rem), var(--wrap));
  margin-inline: auto;
}

.narrow { max-width: 48rem; }

.page { padding-block: clamp(2.5rem, 6vw, 5rem); }

.muted { color: var(--muted); }

.lead {
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.16rem;
}

.hint,
.field-hint {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Small label above a page heading: sentence case, not tracked capitals. */
.eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--brand-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--surface);
}

.skip-link:focus { top: 1rem; }

/* Buttons: primary (filled), outline, quiet (text), danger (outline red) */

.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s;
}

.button-primary { background: var(--brand); color: var(--brand-ink); }
.button-primary:hover { background: var(--brand-dark); color: #FFFFFF; }
.button-outline { background: var(--surface); color: var(--brand-dark); border-color: var(--brand); }
.button-outline:hover { background: var(--brand-soft); }
.button-quiet { background: transparent; color: var(--brand-dark); }
.button-quiet:hover { background: var(--brand-soft); }
.button-danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.button-danger:hover { background: var(--danger-soft); }
.button-icon { min-width: 2.75rem; padding-inline: 0.5rem; }
.button-pill { border-radius: 999px; padding-inline: 1.25rem; }
.button:disabled { opacity: 0.35; cursor: default; }
.button-full { width: 100%; }

.text-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.back,
.breadcrumb a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb { margin: 0 0 1rem; }

/* Header: logo and name, the board's menu, language and account. Stays at the top while scrolling. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
}

.header-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem 2rem;
}

.logo-link { flex: none; text-decoration: none; }

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-ink);
}

.logo-image {
  display: block;
  height: 2.55rem;
  width: auto;
  max-width: 8rem;
  object-fit: contain;
}

.logo-text { min-width: 0; line-height: 1.2; }

.logo-text strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One row, never wrapped: items that don't fit move into "Mer" (js/site.js). Without JavaScript the row
   scrolls sideways instead. */
.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.nav-items {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.site-nav[data-measured] .nav-items { overflow: hidden; }
.nav-items li { flex: none; }

.nav-items a,
.nav-more > summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.nav-items a:hover,
.nav-more > summary:hover { color: var(--brand-dark); }
.nav-items a[aria-current="page"],
.nav-more.has-current > summary { border-bottom-color: var(--brand); font-weight: 700; }

.nav-more { position: relative; flex: none; }
.nav-more > summary { gap: 0.3rem; cursor: pointer; list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more .chevron { width: 0.9rem; height: 0.9rem; transition: transform 0.15s; }
.nav-more[open] .chevron { transform: rotate(180deg); }

.header-tools { display: flex; flex: none; align-items: center; gap: 0.6rem; margin-inline-start: auto; }

/* Header menus (language, account, the phone menu): <details>, so they work without JavaScript. */

.menu-button { position: relative; }

.menu-button > summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.menu-button > summary::-webkit-details-marker { display: none; }
.menu-button > summary:hover,
.menu-button[open] > summary { border-color: var(--ink); }
.menu-button .chevron { width: 0.9rem; height: 0.9rem; transition: transform 0.15s; }
.menu-button[open] .chevron { transform: rotate(180deg); }

.menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  z-index: 40;
  min-width: 15.5rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 16px 36px -16px rgb(20 24 28 / 30%);
}

.menu-panel form { margin: 0; padding-top: 0.3rem; border-top: 1px solid var(--line); }
.menu-list { margin: 0 0 0.3rem; padding: 0; list-style: none; }

.menu-list a,
.menu-item-button {
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font-weight: 400;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.menu-list a:hover,
.menu-item-button:hover { background: var(--brand-soft); color: var(--brand-dark); }
.menu-list a[aria-current] { font-weight: 700; }
.menu-list a[aria-current]::after { content: "✓"; margin-inline-start: auto; color: var(--brand-dark); }

.label-short { display: none; }

/* The menu needs the room: the language menu shows "SV"/"EN" (its full name is read out and listed in the panel). */
.lang-picker .label-long { display: none; }
.lang-picker .label-short { display: inline; }
.menu-note { margin: 0 0 0.3rem; padding: 0.5rem 0.75rem 0.6rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.menu-note strong { display: block; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }

/* On phones the menu folds into "Meny"; its panel spans the header's width. */
.nav-menu { display: none; position: static; order: 3; }
.nav-menu .menu-panel { left: 0; right: 0; top: 100%; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.nav-menu ul { margin: 0; padding: 0.25rem 0; list-style: none; }
.nav-menu a { min-height: 3rem; display: flex; align-items: center; padding: 0.4rem 1rem; border-radius: 6px; color: var(--ink); font-weight: 400; text-decoration: none; }
.nav-menu a:hover { background: var(--brand-soft); }
.nav-menu a[aria-current="page"] { font-weight: 700; box-shadow: inset 4px 0 0 var(--brand); }

/* Hero: the board's photo of the house with the name over a dark toning, or the drawn street scene. */

.hero { position: relative; }

.hero-photo {
  min-height: clamp(26rem, 62vh, 40rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #3A3F44;
  color: #FFFFFF;
}

.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Strong enough under the text for 4.5:1 with white text even over a white photo (design README, "Hero"). */
.hero-toning {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 75%;
  background: linear-gradient(to top, rgb(12 16 20 / 76%) 0%, rgb(12 16 20 / 64%) 55%, rgb(12 16 20 / 0%) 100%);
}

.hero-content { position: relative; z-index: 1; }
.hero-photo .hero-content { padding-block: 3rem 2.75rem; text-shadow: 0 1px 3px rgb(0 0 0 / 35%); }

.hero-welcome { margin: 0; font-size: 1.15rem; }

.hero-name {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-tagline { max-width: 36rem; margin: 0.8rem 0 0; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.button-hero,
.button-hero-outline { min-height: 3rem; padding-inline: 1.4rem; border-radius: 999px; text-shadow: none; }
.button-hero { background: #FFFFFF; color: var(--ink); }
.button-hero:hover { background: #ECEAE6; color: var(--ink); }
.button-hero-outline { border: 2px solid #FFFFFF; background: transparent; color: #FFFFFF; }
.button-hero-outline:hover { background: rgb(255 255 255 / 14%); color: #FFFFFF; }

.hero-drawn { overflow: hidden; background: var(--brand-soft); }
.hero-drawn .hero-content { padding-top: clamp(2.5rem, 6vw, 3.5rem); }
.hero-drawn .hero-welcome { color: var(--brand-dark); }
.hero-drawn .button-hero { background: var(--brand-dark); color: #FFFFFF; }
.hero-drawn .button-hero:hover { background: var(--ink); color: #FFFFFF; }
.hero-drawn .button-hero-outline { border-color: var(--brand-dark); color: var(--brand-dark); }
.hero-drawn .button-hero-outline:hover { background: var(--surface); color: var(--brand-dark); }

.street-scene { display: block; width: 100%; height: clamp(11rem, 26vw, 19rem); margin-top: -1rem; }
.scene-main { fill: var(--brand); }
.scene-mid { fill: var(--brand-mid); }
.scene-light { fill: var(--brand-light); }
.scene-dark { fill: var(--brand-dark); }
.scene-faint { fill-opacity: 0.35; }
.scene-half { fill-opacity: 0.5; }
.scene-roof { fill-opacity: 0.8; }
.scene-lit { fill: #F4D58A; }
.scene-ground-light { fill: var(--page); }
.scene-dark-stroke { fill: none; stroke: var(--brand-dark); stroke-width: 2; stroke-linecap: round; }

/* Key figures under the hero */

.highlights { border-bottom: 1px solid var(--line); background: var(--surface); }
.hero-photo + .highlights { border-top: 4px solid var(--brand); }

.highlights dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem 2rem;
  margin-block: 0;
  padding-block: 1.25rem;
}

.highlights dt { color: var(--muted); font-size: 0.85rem; }
.highlights dd { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

/* Home page sections */

.home { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.home > .wrap:first-child:has(.notice) { padding-top: 1.5rem; }
.home-section { margin-top: clamp(3.5rem, 8vw, 5.5rem); scroll-margin-top: 6rem; }
.home h2 { margin-bottom: 0.5rem; font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.section-lead { margin: 0 0 1.5rem; color: var(--muted); }

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 13rem;
  gap: 1rem;
}

.gallery-preview figure { min-width: 0; display: flex; flex-direction: column; margin: 0; }
.gallery-preview figure:first-child { grid-column: span 2; grid-row: span 2; }

.gallery-preview a,
.gallery-grid a { display: block; overflow: hidden; border-radius: var(--radius-lg); }

.gallery-preview a { flex: 1; min-height: 0; }
.gallery-preview img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.3s; }
.gallery-preview a:hover img,
.gallery-grid a:hover img { transform: scale(1.02); }

.gallery-preview figcaption,
.gallery-grid figcaption { margin-top: 0.45rem; color: #353B42; font-size: 0.88rem; line-height: 1.4; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.75rem 1.25rem; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; display: block; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.3s; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 1fr);
  gap: 2.5rem 4rem;
  align-items: start;
}

.about-text .prose > p:first-child { color: #252A30; font-size: 1.15rem; }

.location {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  scroll-margin-top: 6rem;
}

.map-frame { width: 100%; height: 17rem; display: block; border: 0; }
.map-placeholder { position: relative; height: 15rem; }
.map-drawing { position: absolute; inset: 0; width: 100%; height: 100%; }

.map-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  text-align: center;
}

.map-pin { width: 2.4rem; height: 2.4rem; color: #C5392B; fill: #FFFFFF; stroke-width: 2; }
.map-prompt small { padding: 0.15rem 0.55rem; border-radius: 6px; background: rgb(255 255 255 / 88%); color: var(--muted); font-size: 0.8rem; }

.location-body { padding: 1.25rem 1.5rem 1.4rem; }

.location-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.location-heading h3 { margin: 0; font-size: 1.3rem; }
.location-heading a { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.88rem; }
.location-heading .icon { width: 0.95rem; height: 0.95rem; }
.location-address { display: flex; align-items: center; gap: 0.4rem; margin: 0.4rem 0 0.75rem; color: var(--muted); font-size: 0.92rem; }
.nearby { margin: 0; }
.nearby div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.nearby dd { margin: 0; font-weight: 700; white-space: nowrap; }

.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  column-gap: 2rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.amenities li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-strong); }
.amenities .icon { width: 1.6rem; height: 1.6rem; margin-top: 0.1rem; color: var(--brand-dark); stroke-width: 1.6; }
.amenities strong { font-size: 1.05rem; }
.amenities p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.members-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
}

.members-panel > div:first-child { flex: 1 1 26rem; }
.home .members-panel h2 { margin: 0 0 0.4rem; font-size: clamp(1.4rem, 3vw, 1.75rem); }
.members-panel p { max-width: 42rem; margin: 0; color: #252A30; }
.members-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.news-cards .news-meta { margin: 0 0 0.4rem; }
.news-cards h3 { margin: 0 0 0.4rem; font-size: 1.3rem; line-height: 1.25; }
.news-cards article > p:last-child { margin: 0; color: #353B42; font-size: 0.95rem; }

.buyers {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem 4rem;
  align-items: start;
}

.buyers h3 { margin: 0.4rem 0 1rem; font-size: 1.3rem; }
.fact-table { margin: 0 0 1rem; border-top: 1px solid var(--line-strong); }
.fact-table div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line-strong); font-size: 0.95rem; }
.fact-table dt { color: var(--muted); }
.fact-table dd { margin: 0; overflow-wrap: anywhere; }

.document-cards { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }

.document-cards a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.document-cards a:hover { border-color: var(--brand); }
.document-cards span { flex: 1; min-width: 0; }
.document-cards strong { display: block; }
.document-cards small { color: var(--muted); font-size: 0.82rem; }
.document-cards .icon:first-child { width: 1.5rem; height: 1.5rem; color: var(--brand-dark); }

/* Page body */

.site-main { flex: 1; }
.site-main:focus { outline: none; }

.page-intro { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.page-intro h1 { margin-bottom: 0.4em; }
.page-intro:has(+ .lead) { margin-bottom: 1.25rem; }
.page-intro + .lead { margin-bottom: 2.5rem; }

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.4rem;
}

.section-heading h2,
.section-heading p { margin-bottom: 0; }

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

/* Rich text from the editor */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2rem; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose ul,
.prose ol { padding-inline-start: 1.5rem; margin: 0 0 1rem; }
.prose figure { margin: 0 0 1rem; }
.prose figcaption { color: var(--muted); font-size: 0.86rem; margin-top: 0.25rem; }
.prose blockquote { margin: 0 0 1rem; padding-inline-start: 1rem; border-inline-start: 4px solid var(--line); color: var(--muted); }
.lead .prose,
.prose.lead { color: var(--muted); }

/* News */

.news-item { padding: 1.6rem 0; border-top: 1px solid var(--line); }
.news-item:last-of-type { border-bottom: 1px solid var(--line); }
.news-item h3 { margin-bottom: 0.35rem; }
.news-item p { color: var(--muted); }

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.title-link { color: var(--ink); text-decoration: none; }
.title-link:hover { color: var(--brand-dark); text-decoration: underline; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.article > .prose { max-width: 42rem; }

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ground);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}

.badge-brand { background: var(--brand-soft); color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 35%, white); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #B9D9C5; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #E5BABA; }

/* Panels */

.document-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.info-panel {
  margin-top: 2.2rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
}

.info-panel h2 { margin-bottom: 0.6rem; font-size: 1.4rem; }
.info-panel p:last-child { margin-bottom: 0; }

/* Documents */

.document-group { margin-top: 2.5rem; }
.document-group h2 { font-size: 1.4rem; }

.document-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.document-row {
  min-height: 4.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

.document-row > span:nth-child(2) { flex: 1; min-width: 0; }
.document-row small { display: block; color: var(--muted); font-size: 0.86rem; }
.download { color: var(--brand-dark); font-size: 1.4rem; }

/* Facts (buyer page) */

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.7fr);
  gap: 4rem;
  align-items: start;
}

.content-grid .info-panel { margin: 0; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 3rem;
  border-top: 1px solid var(--line);
}

.facts div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-inline-end: 1.5rem; }
.facts dt { color: var(--muted); font-size: 0.86rem; }
.facts dd { margin: 0.2rem 0 0; font-weight: 700; }

.mini-facts { margin: 0 0 1.5rem; }
.mini-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.mini-facts div:last-child { border-bottom: 1px solid var(--line); }
.mini-facts dt { color: var(--muted); }
.mini-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* Forms */

.form-card,
.admin-section {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.form-card { max-width: 48rem; }
.form-card.compact { max-width: 30rem; }

.form { margin: 0; }

.field {
  display: flex;
  flex-direction: column;
  margin: 0 0 1.25rem;
}

.field label,
.field legend,
.standalone-label { margin-bottom: 0.35rem; font-weight: 700; }

.field .field-hint { margin: -0.15rem 0 0.45rem; }

.field input:not([type="radio"]):not([type="checkbox"]),
.field textarea,
.field select,
.search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--surface);
}

.field input[type="file"] { border-style: dashed; padding: 0.75rem; }
.field input[type="color"] { padding: 0.25rem; }
.field textarea { resize: vertical; }

.field input.invalid,
.field textarea.invalid,
.field select.invalid { border: 2px solid var(--danger); }

.field-error,
.validation-message {
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 700;
}

.optional { font-weight: 400; color: var(--muted); }
.required { color: var(--danger); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.form-after { margin-top: 1.5rem; }

.choices,
fieldset.field { min-width: 0; border: 0; padding: 0; margin: 0 0 1.2rem; }
.choices legend { padding: 0; margin-bottom: 0.35rem; font-weight: 700; }
.field.choices label.check,
.choices label.check { margin: 0; font-weight: 400; }

.check {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
}

.check input { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--brand); }

.color-field { display: flex; gap: 0.5rem; align-items: stretch; }
.color-field input[type="color"] { width: 3.5rem; min-height: 3rem; flex: none; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface); }

.color-options { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0.3rem 0 1.5rem; padding: 0; border: 0; }
.color-options label { position: relative; cursor: pointer; }
.color-options input { position: absolute; opacity: 0; inset: 0; }
.color-options span {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border: 3px solid var(--surface);
  border-radius: 50%;
}
.color-options input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.color-options input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Honeypot for spam bots: off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Notices */

.notice {
  max-width: 48rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-inline-start: 5px solid var(--line);
  background: var(--ground);
}

.notice strong { display: block; }
.notice p { margin: 0.25rem 0 0; }
.closed-account form { margin-top: 0.75rem; }
.notice ul { margin: 0.5rem 0 0; padding-inline-start: 1.25rem; }
.notice-ok { border-color: var(--ok); background: var(--ok-soft); }
.notice-error { border-color: var(--danger); background: var(--danger-soft); }

/* Tables */

.table-scroll { width: 100%; overflow-x: auto; }

.data { width: 100%; border-collapse: collapse; }

.data th,
.data td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: middle;
}

.data th { background: var(--ground); color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.data td small { display: block; margin-top: 0.1rem; color: var(--muted); font-size: 0.86rem; }
.data .num { text-align: end; font-variant-numeric: tabular-nums; }
.data .row-new td:first-child { font-weight: 700; }
.data .row-muted td { color: var(--muted); }

.row-actions { white-space: nowrap; text-align: end; }
.row-actions .button + .button { margin-inline-start: 0.4rem; }

.swatch {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
  border-radius: 50%;
}

.name-cell { display: flex; align-items: flex-start; gap: 0.8rem; }

/* Filters and tabs */

.filters,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.filters a,
.tabs a {
  min-height: 3rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-bottom: 4px solid transparent;
  color: var(--ink);
  text-decoration: none;
}

.filters a[aria-current],
.tabs a[aria-current] { border-bottom-color: var(--brand); color: var(--brand-dark); }

/* Lists (generic) */

.file-list { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.file-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.file-meta { display: block; color: var(--muted); font-size: 0.86rem; font-weight: 400; }

.pending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.pending strong,
.pending small { display: block; }
.pending small { color: var(--muted); font-size: 0.86rem; }
.pending-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.message-text {
  max-width: var(--measure);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-inline-start: 4px solid var(--brand);
  background: var(--ground);
  white-space: pre-line;
}

.danger-zone {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--danger);
}

.danger-zone summary { font-weight: 700; cursor: pointer; }
.danger-zone p { margin-top: 0.75rem; color: var(--ink); }

/* Resident portal and booking */

.portal-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.resident { display: block; color: var(--muted); }

.my-bookings { margin-bottom: 2rem; }
.my-bookings > .booking-item + .booking-item { margin-top: 0.75rem; }

.booking-item {
  min-height: 5.3rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--brand);
  border-inline-start: 6px solid var(--brand);
  border-radius: var(--radius);
}

.booking-item strong { display: block; }
.booking-item small { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.86rem; }
.booking-item .cancel-note { color: var(--muted); font-size: 0.86rem; }

.calendar-date { width: 3.2rem; text-align: center; line-height: 1; }
.calendar-date strong { display: block; font-size: 1.6rem; }
.calendar-date small { margin-top: 0.3rem; color: var(--brand-dark); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.week-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  text-align: center;
}

.week-nav > :first-child { justify-self: start; }
.week-nav > :last-child { justify-self: end; }
.week-today { margin: -0.6rem 0 1rem; text-align: center; font-size: 0.9rem; }

/* Board booking: who to book for, history filters */

.booking-for {
  max-width: 32rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
}

.booking-for .hint { margin: 0.4rem 0 0; }

a.slot-booked { text-decoration: none; }
a.slot-booked:hover { background: var(--brand-soft); color: var(--brand-dark); }

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem 1rem;
  margin: 0 0 1.5rem;
}

.filter-form .field { margin: 0; min-width: 12rem; }

.inbox-photo { margin: 0 0 1.5rem; }
.inbox-photo img { display: block; max-width: min(100%, 32rem); height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.inbox-photo figcaption { margin-top: 0.4rem; color: var(--muted); font-size: 0.86rem; }

.schedule {
  /* Positioned, so visually hidden labels inside are clipped by the scroll area instead of widening the page. */
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(18rem, 1fr));
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
}

.day { min-width: 18rem; border: 1px solid var(--line); border-radius: var(--radius); }

.day-heading { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); background: var(--ground); }
.day-heading h2 { display: inline; margin: 0 0.4rem 0 0; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.day-heading small { color: var(--muted); }

.slot-grid { display: grid; }
.slot-row { display: contents; }

.grid-head {
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.time {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  padding-inline-start: 0.55rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.slot-cell {
  display: flex;
  padding: 0.28rem;
  border-bottom: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.slot {
  width: 100%;
  min-height: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.slot small { color: inherit; font-size: 0.64rem; }
.slot-free { border-color: var(--brand); background: var(--surface); color: var(--brand-dark); cursor: pointer; }
.slot-free:hover { background: var(--brand-soft); }
.slot-mine { background: var(--brand); color: var(--brand-ink); }
.slot-booked { background: var(--ground); color: var(--muted); }
.slot-blocked {
  background-color: var(--ground);
  background-image: repeating-linear-gradient(135deg, transparent, transparent 5px, var(--line) 5px, var(--line) 7px);
  color: var(--ink);
}
.slot-closed { border-color: var(--line); background: var(--surface); color: var(--muted); }
.slot-past { background: var(--surface); color: #8A9390; }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.legend span { display: flex; align-items: center; gap: 0.3rem; }
.legend-mark { display: inline-block; width: 1rem; height: 1rem; border: 1px solid var(--line); border-radius: 3px; }
.legend-mark.slot-free { border-color: var(--brand); }

/*
  Board admin (/styrelse), design A (docs/design/README.md): a top bar with search, "Skapa" and the account,
  a side menu grouped by area, and white cards on the warm page background.
*/

.board-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.board-top-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem 1.75rem;
}

.board-brand {
  width: 14rem;
  min-width: 0;
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.board-brand .logo-image { max-height: 2.45rem; max-width: 4rem; }
.board-brand-text { min-width: 0; line-height: 1.2; }
.board-brand-text strong { display: block; overflow: hidden; font-family: var(--font-display); font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
.board-brand-text small { display: block; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

.board-search {
  height: 2.75rem;
  max-width: 28rem;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--page);
  color: var(--muted);
}

.board-search:focus-within { border-color: var(--ink); background: var(--surface); outline: 3px solid var(--focus); outline-offset: 2px; }
.board-search .icon { width: 1.1rem; height: 1.1rem; }
.board-search input { min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 1rem; outline: none; }
.board-search input::placeholder { color: var(--muted); }

.board-tools { display: flex; flex: none; align-items: center; gap: 0.75rem; margin-inline-start: auto; }
.board-site-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.95rem; white-space: nowrap; }
.board-site-link .icon { width: 0.95rem; height: 0.95rem; }

.board-icon-button {
  width: 2.75rem;
  height: 2.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}

.create-menu,
.avatar-menu { position: relative; }

.create-menu > summary,
.avatar-menu > summary { cursor: pointer; list-style: none; user-select: none; }
.create-menu > summary::-webkit-details-marker,
.avatar-menu > summary::-webkit-details-marker { display: none; }

.create-menu > summary {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  white-space: nowrap;
}

.create-menu > summary:hover,
.create-menu[open] > summary { background: var(--brand-dark); color: #FFFFFF; }
.create-menu > summary .icon { width: 1.1rem; height: 1.1rem; stroke-width: 2.4; }
.create-menu .menu-list a { gap: 0.7rem; }
.create-menu .menu-list .icon { color: var(--muted); }

.avatar-menu > summary {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
}

.avatar-menu > summary:hover,
.avatar-menu[open] > summary { box-shadow: 0 0 0 2px var(--brand); }

.board-menu { display: none; }
.board-menu > summary .count-badge { margin-inline-start: 0.1rem; }
.board-menu-panel { width: min(20rem, calc(100vw - 2rem)); max-height: calc(100vh - 5.5rem); overflow-y: auto; padding: 0.5rem; }

.board-shell {
  min-height: calc(100vh - 4.25rem);
  display: grid;
  grid-template-columns: 16.75rem minmax(0, 1fr);
}

.board-side { padding: 1.25rem 1rem 2rem; border-inline-end: 1px solid var(--line); background: var(--surface); }
.board-side .board-nav { position: sticky; top: 5.5rem; max-height: calc(100vh - 6.5rem); overflow-y: auto; }

.board-nav ul { margin: 0; padding: 0; list-style: none; }
.board-nav-heading { margin: 1.25rem 0.75rem 0.3rem; color: var(--muted); font-size: 0.8rem; font-weight: 700; }

.board-nav a {
  min-height: 2.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.board-nav a .icon { color: var(--muted); }
.board-nav a:hover { background: var(--ground); }
.board-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.board-nav a[aria-current="page"] .icon { color: var(--brand-dark); }

.count-badge {
  min-width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: auto;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.admin-main { min-width: 0; max-width: 76rem; padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.admin-main h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.admin-main .page-intro { margin-bottom: 1.75rem; }

.admin-section { margin-bottom: 1.25rem; }
.admin-main > .admin-section > .form { margin: 0 0 1rem; padding: 0; border: 0; }
.admin-section > h2:first-child,
.admin-section > .section-heading:first-child h2 { margin-top: 0; }
.admin-section .form-card { border: 0; padding: 0; }

/* Board: overview */

.board-greeting p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.board-greeting h1 { margin: 0.1rem 0 1.5rem; font-size: clamp(2rem, 4vw, 2.5rem); }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.overview-side { display: grid; gap: 1.5rem; }

.board-card {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.board-card h2 { margin: 0; font-size: 1.35rem; }
.board-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.board-card-head > :not(h2) { font-size: 0.92rem; }
.board-card-foot { margin: 0.75rem 0 0; font-size: 0.95rem; }

.todo-card { padding: 0; overflow: hidden; }
.todo-card .board-card-head { margin: 0; padding: 1.1rem 1.25rem 0.8rem; }
.todo-card .board-card-foot { margin: 0; padding: 0.8rem 1.25rem; border-top: 1px solid var(--line); }
.todo-list { margin: 0; padding: 0; list-style: none; }

.todo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.todo:hover { background: var(--page); }
.todo:focus-within { outline: 3px solid var(--focus); outline-offset: -3px; }
.todo > .icon { width: 1.4rem; height: 1.4rem; color: var(--brand-dark); }
.todo-urgent > .icon { color: var(--danger); }
.todo-text { min-width: 0; flex: 1; }
.todo-link { display: block; color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.todo-link::after { content: ""; position: absolute; inset: 0; }
.todo-link:focus-visible { outline: none; }
.todo-text small { display: block; color: var(--muted); font-size: 0.92rem; }

.todo-action {
  min-height: 2.5rem;
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.todo:hover .todo-action { border-color: var(--ink); }
.todo-empty { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0.2rem 1.25rem 1.4rem; color: var(--muted); }
.todo-empty .icon { color: var(--ok); }

.today-list { margin: 0; padding: 0; list-style: none; font-size: 0.97rem; }
.today-list li { display: flex; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.today-time { width: 6.2rem; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.today-resource { min-width: 0; flex: 1; }
.today-list a { color: var(--ink); font-weight: 700; white-space: nowrap; }
.today-list .is-past .today-resource,
.today-list .is-past a { color: var(--muted); font-weight: 400; }

.site-card { padding: 0; overflow: hidden; }
.site-card-image { position: relative; height: 8rem; display: block; overflow: hidden; background: var(--brand-soft); }
.site-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.site-card-image .street-scene { height: 100%; margin: 0; }
.site-card-image span {
  position: absolute;
  inset: auto 0 0;
  padding: 1.6rem 1rem 0.6rem;
  background: linear-gradient(to top, rgb(12 16 20 / 72%), rgb(12 16 20 / 0%));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.site-card-body { padding: 1rem 1.25rem 1.25rem; }
.site-card-body h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.site-card-body p { margin: 0 0 0.9rem; font-size: 0.95rem; }
.site-card-body .button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.site-card-body .button { min-height: 2.5rem; font-size: 0.92rem; }

.button-soft { background: var(--brand-soft); color: var(--brand-dark); }
.button-soft:hover { border-color: var(--brand); color: var(--brand-dark); }
.button-outline-quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.button-outline-quiet:hover { border-color: var(--ink); color: var(--ink); }

.onboarding-card > .progress { max-width: none; display: block; margin-bottom: 0.6rem; }
.onboarding-next { margin: 0 0 0.5rem; font-size: 0.97rem; }
.onboarding-all > summary { color: var(--brand-dark); font-size: 0.95rem; font-weight: 700; cursor: pointer; }
.onboarding-all[open] > summary { margin-bottom: 0.9rem; }
.onboarding-all .onboarding-progress { display: none; }

/* Board: search */

.board-search-large { max-width: 40rem; margin-bottom: 1.75rem; }
.board-search-large.has-query { display: none; } /* the box in the top bar holds the words; phones show this one */
.board-search-large label { display: block; margin-bottom: 0.4rem; font-weight: 700; }
.board-search-row { display: flex; gap: 0.5rem; }

.board-search-row input {
  min-width: 0;
  min-height: 3rem;
  flex: 1;
  padding: 0 1.1rem;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--surface);
}

.board-search-row .button { min-height: 3rem; }
.search-group { max-width: 48rem; margin-bottom: 1rem; }
.search-hits { margin: 0; padding: 0; list-style: none; }
.search-hits a { display: block; padding: 0.6rem 0; border-top: 1px solid var(--line); color: var(--ink); font-weight: 400; text-decoration: none; }
.search-hits a:hover strong { color: var(--brand-dark); text-decoration: underline; }
.search-hits small { display: block; color: var(--muted); font-size: 0.9rem; }
.search-empty { max-width: 40rem; }

.split-panels,
.console-grid,
.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

/* Board pages built from plain forms, tables and two-column panels get the design's card look. */

.admin-main > .form,
.admin-main > section > .form,
.admin-main .two-columns > section,
.admin-main .platform-card {
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-main > .table-scroll,
.admin-main > form.table-scroll,
.platform-card-table {
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-main > h2,
.admin-main > section > h2 { margin-top: 2.5rem; }
.admin-main .two-columns > section > h2:first-child,
.admin-main .two-columns > section > h3:first-child { margin-top: 0; }
.admin-main .two-columns { margin-top: 1.5rem; }
.admin-main .two-columns .form { max-width: none; }

/* Page and news editor: main column beside a settings panel; the form spans both. */

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  grid-template-rows: min-content 1fr;
  gap: 1.5rem;
  align-items: start;
}

.editor-layout > form { display: contents; }
.editor-main { grid-row: span 2; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.settings-panel { grid-column: 2; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.settings-panel .button { width: 100%; margin-top: 0.55rem; }
.settings-aside { grid-column: 2; }
.settings-aside .danger-zone { margin-top: 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }

/* Pass chips (booking setup) */

.pass-list { display: grid; grid-template-columns: 6rem 1fr; gap: 0.5rem 1rem; margin: 0 0 1rem; }
.pass-list dt { font-weight: 700; }
.pass-list dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }

.pass-chip {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.25rem 0.1rem 0.8rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.chip-remove {
  border: 0;
  background: none;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.3rem 0.45rem;
  border-radius: 999px;
  cursor: pointer;
}

.chip-remove:hover { background: var(--danger-soft); color: var(--danger); }

.weekday-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); }
.weekday-choices legend { grid-column: 1 / -1; }

.logo-preview { max-height: 5rem; max-width: 16rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: var(--radius); }

/* Trix editor (js/editor.js), styled like the design's toolbar */

trix-toolbar .trix-button-row { flex-wrap: wrap; gap: 0; }
trix-toolbar .trix-button-group { margin: 0.35rem 0 0 !important; border: 1px solid var(--line) !important; border-radius: 0 !important; background: var(--ground); }
trix-toolbar .trix-button { border-bottom: 0 !important; background: transparent; }
trix-toolbar .trix-button.trix-active { background: var(--brand-soft); }

trix-editor.rich-text {
  min-height: 16rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

trix-editor.rich-text:focus { outline: 3px solid var(--focus); outline-offset: 0; }
trix-editor.rich-text h1 { font-size: 1.45rem; }

/* Platform console */

.platform-shell { background: var(--platform-ground); }
.platform-shell .site-main { background: var(--platform-ground); }

.platform-header { background: var(--surface); border-bottom: 1px solid var(--line); }

.platform-header .wrap {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.platform-brand { color: var(--ink); font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.platform-brand span { color: var(--brand); }

.platform-header nav { display: flex; align-self: stretch; }

.platform-header nav a {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.platform-header nav a[aria-current="page"] { border-color: var(--brand); color: var(--brand-dark); font-weight: 700; }
.platform-header .platform-user { margin-inline-start: auto; display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: 0.82rem; }
.platform-header form { margin: 0; }

.platform-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search { width: min(100%, 25rem); }
.search label { display: block; margin-bottom: 0.2rem; font-size: 0.86rem; font-weight: 700; }

.association-table { margin-bottom: 2rem; border: 1px solid var(--line); background: var(--surface); }

/* Footer */

.site-footer { margin-top: auto; background: var(--footer); color: #E9EBEC; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 3rem;
  padding-block: 3rem 2rem;
}

.footer-grid > * { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.footer-name { margin: 0; color: #FFFFFF; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.015em; }
.footer-heading { margin: 0 0 0.25rem; color: #FFFFFF; font-weight: 700; }
.footer-tagline { margin: 0.5rem 0 0; color: #B9C0C6; }
.site-footer address { font-style: normal; }
.site-footer a { color: #E9EBEC; font-weight: 400; }
.site-footer a:hover { color: #FFFFFF; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 1rem 1.5rem;
  border-top: 1px solid #39414A;
  color: #B9C0C6;
  font-size: 0.82rem;
}


/* Board: tables of facts (RowsEditor) instead of "Rubrik: värde" lines */

.rows-editor { margin: 0 0 1.5rem; }
.rows-table { width: 100%; border-collapse: collapse; margin-bottom: 0.75rem; }
.rows-table th { padding: 0 0.5rem 0.35rem 0; color: var(--muted); font-size: 0.86rem; font-weight: 700; text-align: start; }
.rows-table td { padding: 0.3rem 0.5rem 0.3rem 0; vertical-align: top; }
.rows-table input[type="text"],
.rows-table select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--surface);
}

.rows-table .col-icon { width: 11rem; }
.rows-table .col-actions { width: 1%; white-space: nowrap; }
.icon-choice { display: flex; align-items: center; gap: 0.45rem; }
.icon-choice > .icon { width: 1.4rem; height: 1.4rem; color: var(--brand-dark); }
.icon-choice select { min-width: 0; flex: 1; }
.row-original { display: block; margin: 0 0 0.2rem; color: var(--muted); font-size: 0.86rem; }
.rows-add .icon { width: 1rem; height: 1rem; stroke-width: 2.2; }

.icon-button {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button .icon { width: 1.1rem; height: 1.1rem; }
.icon-button:hover:not(:disabled) { border-color: var(--ink); }
.icon-button:disabled { opacity: 0.3; cursor: default; }
.icon-button-danger { color: var(--danger); }
.icon-button-danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }

/* Board: language tabs above translatable pages (TranslationTabs) */

.translation-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
}

.translation-tabs a {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.translation-tabs a:hover { background: var(--ground); }
.translation-tabs a[aria-current="page"] { background: var(--brand-dark); color: #FFFFFF; font-weight: 700; }
.translation-tabs small { opacity: 0.75; font-size: 0.8rem; font-weight: 400; }

.translation-note {
  max-width: 48rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.translation-note .icon { margin-top: 0.15rem; }
.original-text { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.original-text > summary { color: var(--brand-dark); font-weight: 700; cursor: pointer; }
.original-text[open] > summary { margin-bottom: 0.6rem; }
.check-disabled { color: var(--muted); }

/* Board admin: home page settings and gallery */

.hero-admin {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.hero-preview { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.hero-admin-drawn { max-width: 40rem; margin-bottom: 1.5rem; overflow: hidden; border-radius: var(--radius); background: var(--brand-soft); }
.hero-admin-drawn .street-scene { margin: 0; height: 11rem; }

.focus-grid { display: grid; grid-template-columns: repeat(3, 2.75rem); gap: 0.35rem; }
.focus-grid label { position: relative; width: 2.75rem; height: 2.75rem; display: block; margin: 0; cursor: pointer; }
.focus-grid input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.focus-grid label::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--field-line); border-radius: 6px; background: var(--surface); pointer-events: none; }
.focus-grid label:has(input:checked)::after { border-color: var(--brand); background: var(--brand); }
.focus-grid label:has(input:focus-visible)::after { outline: 3px solid var(--focus); outline-offset: 2px; }

.amenities-preview { margin: -0.5rem 0 2rem; }

.gallery-admin-list { display: grid; gap: 1rem; margin: 0 0 1rem; padding: 0; list-style: none; }

.gallery-admin-list li {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.gallery-admin-list img { width: 100%; display: block; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.gallery-admin-body .field { margin-bottom: 0.6rem; }
.gallery-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* Responsive */

/* Phones and small tablets: the whole menu folds into "Meny". */
@media (max-width: 800px) {
  .site-nav { display: none; }
  .nav-menu { display: block; }
}

@media (max-width: 900px) {
  .content-grid,
  .about,
  .buyers,
  .hero-admin { grid-template-columns: 1fr; }

  .gallery-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 10rem; }

  .board-top-inner { gap: 0.75rem; padding: 0.5rem 1rem; }
  .board-brand { width: auto; flex: 0 1 auto; }
  .board-search,
  .board-site-link { display: none; }
  .board-icon-button { display: inline-flex; }
  .board-menu { display: block; }
  .board-shell { grid-template-columns: minmax(0, 1fr); }
  .board-side { display: none; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .board-search-large.has-query { display: block; }
  .board-menu .menu-panel { position: fixed; top: 4.5rem; inset-inline: auto 1rem; }

  .editor-layout { grid-template-columns: 1fr; }
  .editor-main { grid-row: auto; }
  .settings-panel,
  .settings-aside { grid-column: auto; }
}

@media (max-width: 650px) {
  html { font-size: 17px; }

  .wrap { width: min(calc(100% - 2rem), var(--wrap)); }
  .header-inner { min-height: 4rem; gap: 0.4rem; }
  .logo-link { flex: 0 1 auto; min-width: 0; }
  .logo-text strong { white-space: nowrap; }
  .highlights dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo { gap: 0.5rem; }
  .logo-mark { width: 2.2rem; height: 2.2rem; }
  .logo-text strong { font-size: 1.05rem; }
  .header-tools { gap: 0.35rem; }
  .menu-button > summary { padding: 0 0.7rem; }
  .label-long { display: none; }
  .label-short { display: inline; }
  .nav-menu summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .header-tools .button-pill { padding-inline: 0.85rem; }
  .menu-button > summary { min-width: 2.75rem; justify-content: center; }
  .section-heading { align-items: flex-start; }

  .hero-photo { min-height: 27rem; }
  .hero-photo .hero-content { padding-block: 2rem 1.75rem; }
  .gallery-preview { grid-auto-rows: 8rem; gap: 0.75rem; }
  .fact-table div { grid-template-columns: 1fr; gap: 0.1rem; }
  .gallery-admin-list li { grid-template-columns: 1fr; }

  .facts,
  .form-row,
  .split-panels,
  .console-grid,
  .two-columns { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { padding-inline-end: 0; }

  .booking-item { grid-template-columns: auto 1fr; }
  .booking-item > :last-child { grid-column: 1 / -1; width: 100%; }
  .week-nav { grid-template-columns: 1fr 1fr; }
  .week-nav strong { grid-column: 1 / -1; grid-row: 1; }
  .week-nav > :first-child,
  .week-nav > :last-child { grid-row: 2; font-size: 0.82rem; padding-inline: 0.3rem; }
  .legend > strong { width: 100%; }

  .board-top-inner { gap: 0.5rem; }
  .board-tools { gap: 0.4rem; }
  .board-brand { gap: 0.55rem; }
  .board-brand .logo-mark { width: 2.2rem; height: 2.2rem; }
  .board-brand-text strong { font-size: 1rem; }
  .admin-main { padding: 1.25rem 1rem 6rem; }
  .create-menu { position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 35; }
  .create-menu > summary { min-height: 3.25rem; padding: 0 1.4rem; box-shadow: 0 10px 24px -10px rgb(20 24 28 / 60%); }
  .create-menu .menu-panel { top: auto; bottom: calc(100% + 0.5rem); }
  .todo { align-items: flex-start; padding: 0.9rem 1rem; }
  .todo > .icon { margin-top: 0.15rem; }
  .todo-action { display: none; }
  .todo-card .board-card-head,
  .todo-card .board-card-foot { padding-inline: 1rem; }
  .board-card:not(.todo-card, .site-card) { padding-inline: 1rem; }
  .board-search-row { flex-direction: column; }
  .rows-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rows-table tr { display: grid; grid-template-columns: 1fr; gap: 0.3rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
  .rows-table td { width: auto !important; padding: 0; }
  .rows-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
  .rows-table .col-actions { display: flex; gap: 0.4rem; }
  .pending { align-items: stretch; flex-direction: column; }
  .pending-actions .button { flex: 1; }
  .editor-main { padding: 0.8rem; }
  .mini-facts div { grid-template-columns: 1fr; gap: 0.2rem; }

  .platform-header .wrap { gap: 0.7rem; overflow-x: auto; }
  .platform-header .platform-user span { display: none; }
  .platform-actions { align-items: stretch; flex-direction: column; }

  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .board-menu > summary > span:not(.count-badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .header-tools .login-label { display: none; }
  .header-tools .button-pill { width: 2.75rem; padding: 0; }
  .lang-picker .chevron { display: none; }
}

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

/* Audit log (ADM-11) */
.nowrap { white-space: nowrap; }
.audit-log td { vertical-align: top; }
.audit-area {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.audit-changes { margin: 0.35rem 0 0; padding-inline-start: 1.1rem; font-size: 0.9rem; color: var(--muted); }
.audit-changes del { color: var(--danger); text-decoration: line-through; }
.audit-changes ins { color: var(--ok); text-decoration: none; }

/* Support access (OPS-05) */
.support-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-soft);
}
.support-banner p { margin: 0; flex: 1 1 18rem; }
.site-main > .wrap > .support-banner { margin-top: 1rem; }
.admin-section form + h2,
.admin-section form + h3 { margin-top: 2rem; }

/* Onboarding checklist (OPS-07) */
.onboarding-progress { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; font-weight: 600; }
.progress { flex: 1 1 auto; max-width: 16rem; height: 0.5rem; border-radius: 999px; background: var(--line, #E3E8E6); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }
.onboarding { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.onboarding li { display: flex; gap: 0.75rem; align-items: flex-start; }
.onboarding li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.onboarding small { color: var(--muted); }
.onboarding-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--muted);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}
.onboarding li.done .onboarding-mark { border-color: var(--ok); background: var(--ok); color: #fff; }
.onboarding li.done strong { color: var(--muted); }

/* Right-to-left (Arabic): arrows in links and icons point the other way. */
[dir="rtl"] .icon-flip,
[dir="rtl"] .breadcrumb .icon { transform: scaleX(-1); }
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
/* Board texts without a translation stay Swedish inside an Arabic page: each paragraph takes its direction
   from its own text, so "3 · 4 våningar" doesn't come out as "våningar 4 · 3". */
[dir="rtl"] :is(dt, dd, figcaption, h1, h2, h3, p, blockquote, td, li > strong) { unicode-bidi: plaintext; }

/* Console: interest forms from the company website */
.data tr.muted-row td { color: var(--muted, #5f5f5a); }
.data td.lead-message { max-width: 32rem; white-space: pre-line; }
