/*
 * Shared organisation page (DD-16, decision 20): artist, venue and
 * organisation pages in one layout with the regions header, main,
 * type_block, people and concerts.
 *
 * Type sizes and weights follow the design as measured in KI-084
 * (docs/project/notes/kan41-typografie-meting-2026-12-03.md): one column up
 * to a wide screen, two columns on a wide screen (photo left and the head
 * right; the about text left and the details right). Spacing is the Utopia
 * space scale between the 360px and 1280px viewport anchors (same anchors
 * as the theme's koba-* sheets). The theme colours: coral #ff7159 for the
 * details block and the banner, black and white; the light grey of the
 * People band is measured from the design (#ecebe9). Fonts are inherited
 * from the theme (Poppins).
 */

/* The tokens also serve the two People forms, which are no organisation
   page but carry the form title style (DD-32), and the form "Connect to an
   organisation" (W7, connection-request.css). */
:is(.organisation-page, .organisation-people-form, .organisation-connection-form) {
  /* Utopia type sizes from the design (KI-084), computed with fluid_clamp:
     the max anchor is the size measured in the pdf's at 1440px, the min
     anchor the size of the same text in the frames of about 788px in
     docs/context/design, so both measured widths render as designed and
     the min holds below 788px. The names follow the roles in the
     measurement table; the comment gives the size at 1440px.
     WHY a 12px floor on tag, xs and s: the 788px frames set those at 10 to
     11px, below the smallest text of the site. */
  /* 13px: type label, More info. */
  --koba-org-fs-tag: clamp(0.75rem, 0.6745rem + 0.1534vw, 0.8125rem);
  /* 14px: link pills, Edit role, country code, back link, form labels. */
  --koba-org-fs-xs: clamp(0.75rem, 0.5989rem + 0.3067vw, 0.875rem);
  /* 15px: buttons, small titles, dates, choice pills, hints. */
  --koba-org-fs-s: clamp(0.75rem, 0.5234rem + 0.4601vw, 0.9375rem);
  /* 16px: checkbox label, Send request, What happens next title. */
  --koba-org-fs-m: clamp(0.8rem, 0.5583rem + 0.4908vw, 1rem);
  /* 17px: detail rows, role of a person. */
  --koba-org-fs-detail: clamp(0.85rem, 0.5932rem + 0.5215vw, 1.0625rem);
  /* 18px: intros, the base size of the page. */
  --koba-org-fs-intro: clamp(0.9rem, 0.6281rem + 0.5521vw, 1.125rem);
  /* 20px: See all concerts. */
  --koba-org-fs-link: clamp(1rem, 0.6979rem + 0.6135vw, 1.25rem);
  /* 22px: place under the name. */
  --koba-org-fs-place: clamp(1.1rem, 0.7676rem + 0.6748vw, 1.375rem);
  /* 28px: about text and biography. */
  --koba-org-fs-lead: clamp(1.1062rem, 0.3282rem + 1.5798vw, 1.75rem);
  /* 30px: heading of the details block. */
  --koba-org-fs-h3: clamp(1.5rem, 1.0468rem + 0.9202vw, 1.875rem);
  /* 34px: numbered section title of a form. */
  --koba-org-fs-section: clamp(1.3rem, 0.3029rem + 2.0245vw, 2.125rem);
  /* 36px: name in a concert row. */
  --koba-org-fs-row: clamp(1.2937rem, 0.138rem + 2.3466vw, 2.25rem);
  /* 43px: name of a person. */
  --koba-org-fs-person: clamp(1.4875rem, 0.0372rem + 2.9448vw, 2.6875rem);
  /* 51px: People title. */
  --koba-org-fs-h2: clamp(1.7812rem, 0.0817rem + 3.4509vw, 3.1875rem);
  /* 71px: Liveurope concerts. */
  --koba-org-fs-display: clamp(2.3937rem, 5.0153vw - 0.0763rem, 4.4375rem);
  /* 83px: form title. */
  --koba-org-fs-form-title: clamp(2.875rem, 0.0801rem + 5.6748vw, 5.1875rem);
  /* 98px: name of the organisation (A38; the long artist name in the
     design is 84px, one size keeps the pages alike). */
  --koba-org-fs-h1: clamp(3.375rem, 0.0514rem + 6.7485vw, 6.125rem);
  /* Utopia space scale (360px => 1280px). */
  --koba-org-space-3xs: clamp(0.25rem, 0.2255rem + 0.1087vw, 0.3125rem);
  --koba-org-space-2xs: clamp(0.5rem, 0.4511rem + 0.2174vw, 0.625rem);
  --koba-org-space-xs: clamp(0.75rem, 0.6766rem + 0.3261vw, 0.9375rem);
  --koba-org-space-s: clamp(1rem, 0.9022rem + 0.4348vw, 1.25rem);
  --koba-org-space-m: clamp(1.5rem, 1.3533rem + 0.6522vw, 1.875rem);
  --koba-org-space-l: clamp(2rem, 1.8043rem + 0.8696vw, 2.5rem);
  --koba-org-space-xl: clamp(3rem, 2.6087rem + 1.7391vw, 4rem);
  /* Logo circle: 92px at 788px => 113px at 1440px (design). */
  --koba-org-logo: clamp(5.75rem, 4.1637rem + 3.2209vw, 7.0625rem);
  /* WHY space-xs: the page gutter lines up with the site logo and the
     concert list of the theme (about 13px at 1280px), not with the wider
     margin of the design artifact, so the page edge stays one line. */
  --koba-org-gutter: var(--koba-org-space-xs);
  --koba-org-border: max(1px, 0.0625rem);
  --koba-org-line-height: 1.5;
  /* Shape radius of the pill buttons and labels, not a scaling size. */
  --koba-org-pill: 999px;
  --koba-org-coral: #ff7159;
  --koba-org-grey: #ecebe9;
  --koba-org-black: #000;
  --koba-org-white: #fff;
}

.organisation-page {
  container: koba-org / inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--koba-org-space-xl);
  margin-block-end: var(--koba-org-space-xl);
  font-size: var(--koba-org-fs-intro);
  line-height: var(--koba-org-line-height);
  color: var(--koba-org-black);
}

/* The regions own their spacing; field and block margins of the theme do
   not add to it. */
.organisation-page :is(.field, .organisation-details, .organisation-people) {
  margin: 0;
}

/* The content regions sit inside the page gutter; the People band runs
   edge to edge with its content on the gutter, and the concert list keeps
   the padding of its own view. */
.organisation-page > :is(.organisation-page__header, .organisation-page__main, .organisation-page__type-block) {
  margin-inline: var(--koba-org-gutter);
}

/* Header ---------------------------------------------------------------- */

/* Named areas keep the order of the design whatever the order of the fields
   in the display: banner, photo, then type, name and place with the logo
   next to them, then links and buttons. An area without a field collapses,
   so the spacing sits on the items, not on the grid gap. */
.organisation-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "banner banner"
    "crumb crumb"
    "photo photo"
    "media media"
    "type logo"
    "title logo"
    "place logo"
    "links links"
    "actions actions";
  column-gap: var(--koba-org-space-m);
  align-items: start;
}

.organisation-page__header > * {
  grid-column: 1 / -1;
}

.organisation-page__header > .organisation-banner {
  grid-area: banner;
}

.organisation-page__header > .organisation-breadcrumb {
  grid-area: crumb;
  margin-block-end: var(--koba-org-space-s);
}

/* Room above the breadcrumb when it opens the page (no manage banner, which
   sits straight under the navigation in the design). WHY on the page
   wrapper: the theme clears its header, which leaves a gap on wide screens
   and none on narrow ones; this margin collapses into that clearance, so
   the breadcrumb gets the larger of the two, never the sum. */
.organisation-page:has(> .organisation-page__header > .organisation-breadcrumb:first-child) {
  margin-block-start: var(--koba-org-space-s);
}

.organisation-page__header > :is(.field--name-dynamic-block-fieldnode-music-venue-images-slideshow, .field--name-field-image) {
  grid-area: photo;
  margin-block-end: var(--koba-org-space-m);
}

.organisation-page__header > .field--name-field-media {
  grid-area: media;
  margin-block-end: var(--koba-org-space-m);
}

.organisation-page__header > .organisation-type {
  grid-area: type;
  justify-self: start;
}

.organisation-page__header > .field--name-node-title {
  grid-area: title;
}

.organisation-page__header > :is(.field--name-field-location, .field--name-field-country-of-residence) {
  grid-area: place;
  font-size: var(--koba-org-fs-place);
  font-weight: 400;
}

.organisation-page__header > :is(.field--name-field-music-venue-website, .field--name-field-websites, .socialmedia) {
  grid-area: links;
  margin-block-start: var(--koba-org-space-s);
}

.organisation-page__header > .field--name-field-logo {
  grid-area: logo;
  align-self: center;
}

/* "Connect to this organisation" only shows to users who cannot edit the
   page, so it never shares the actions row with the edit buttons. */
.organisation-page__header > :is(.organisation-actions, .organisation-connect) {
  grid-area: actions;
  margin-block-start: var(--koba-org-space-m);
}

.organisation-banner {
  margin: 0 0 var(--koba-org-space-m);
  padding: var(--koba-org-space-xs) var(--koba-org-space-s);
  background: var(--koba-org-coral);
  color: var(--koba-org-black);
  font-size: var(--koba-org-fs-xs);
}

.organisation-page__header img {
  display: block;
  width: 100%;
  height: auto;
}

/* Breadcrumb "Music venues / A38" (KI-086). WHY the reset: the theme
   styles .breadcrumb for its site breadcrumb region (grey text, a bottom
   line, side padding, "›" between the items) and loads after this sheet;
   the design shows black text, an underlined link and a slash. The page
   class in front makes these rules win without !important. */
.organisation-page .organisation-breadcrumb .breadcrumb {
  padding: 0;
  border: 0;
}

.organisation-page .organisation-breadcrumb .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--koba-org-space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.organisation-page .organisation-breadcrumb .breadcrumb ol li {
  color: var(--koba-org-black);
  font-size: var(--koba-org-fs-s);
  font-weight: 400;
}

.organisation-page .organisation-breadcrumb .breadcrumb ol li::before {
  content: none;
}

/* The slash is decoration: the alternative text after "/" keeps screen
   readers from reading it out (browsers without that syntax use the first
   declaration). */
.organisation-page .organisation-breadcrumb .breadcrumb ol li + li::before {
  content: "/";
  content: "/" / "";
  margin-inline-end: var(--koba-org-space-2xs);
}

/* WHY the resets: the theme turns the first crumb into a white home icon
   (font-size 0, a fixed square, a background image); here the first crumb
   is the overview and shows as text. */
.organisation-page .organisation-breadcrumb .breadcrumb ol li a {
  display: inline;
  inline-size: auto;
  block-size: auto;
  vertical-align: baseline;
  background: none;
  color: var(--koba-org-black);
  font-size: inherit;
  text-decoration: underline;
}

/* Pill label: "Venue", "Artist" or the organisation type. */
.organisation-type {
  margin: 0 0 var(--koba-org-space-2xs);
  padding: 0 var(--koba-org-space-xs);
  border: var(--koba-org-border) solid var(--koba-org-black);
  border-radius: var(--koba-org-pill);
  font-size: var(--koba-org-fs-tag);
  font-weight: 500;
}

/* The theme pads every h1 and every view inline; on this page the name and
   the website buttons line up with the type label and the place. */
.organisation-page__header :is(.field--name-node-title h1, .view) {
  padding-inline: 0;
}

/* A long single word (a band or venue name) breaks instead of running out
   of its column. */
.organisation-page__header .field--name-node-title h1 {
  margin: 0;
  font-size: var(--koba-org-fs-h1);
  font-weight: 600;
  line-height: 1;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* The heading of "Add a person" and "Edit role": the title style of the
   form "Connect to an organisation"; the People forms sit on the same page
   gutter as the organisation pages, and the theme's inline padding on h1
   is dropped so the heading lines up. */
.organisation-people-form {
  padding-inline: var(--koba-org-gutter);
}

.organisation-people-form__title {
  padding-inline: 0;
  margin: 0 0 var(--koba-org-space-m);
  font-size: var(--koba-org-fs-form-title);
  font-weight: 300;
  line-height: 1.1;
}

.organisation-page__header .field--name-field-country-of-residence .field__label {
  display: none;
}

/* Round logo next to the name. */
.organisation-page__header > .field--name-field-logo {
  display: grid;
  place-items: center;
  width: var(--koba-org-logo);
  aspect-ratio: 1;
  overflow: hidden;
  border: var(--koba-org-border) solid var(--koba-org-black);
  border-radius: 50%;
  background: var(--koba-org-white);
}

.organisation-page__header > .field--name-field-logo img {
  width: 70%;
  margin-inline: auto;
  object-fit: contain;
}

/* The theme turns the artist links (.socialmedia) into icon sprites: fixed
   size, hidden text, zoom and floats. On the shared page they become the
   same text pills as the website buttons of venues and organisations; the
   pill rule below replaces the sprite background. */
.organisation-page__header .socialmedia {
  overflow: visible;
  padding: 0;
}

.organisation-page__header .socialmedia > div {
  float: none;
  margin: 0;
}

.organisation-page__header .socialmedia a {
  float: none;
  width: auto;
  height: auto;
  overflow: visible;
  text-indent: 0;
  zoom: 1;
}

/* Website and streaming links as pill buttons. */
.organisation-page__header :is(.socialmedia, .field--name-field-websites .field__items, .field--name-field-music-venue-website .row-wrapper) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--koba-org-space-2xs);
}

.organisation-page__header :is(.socialmedia, .field--name-field-websites, .field--name-field-music-venue-website) a {
  display: inline-block;
  padding: var(--koba-org-space-3xs) var(--koba-org-space-s);
  border: var(--koba-org-border) solid var(--koba-org-black);
  border-radius: var(--koba-org-pill);
  background: var(--koba-org-white);
  color: var(--koba-org-black);
  font-size: var(--koba-org-fs-xs);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.organisation-actions,
.organisation-connect {
  display: flex;
  flex-wrap: wrap;
  gap: var(--koba-org-space-xs);
}

.organisation-actions__button {
  display: inline-block;
  padding: var(--koba-org-space-2xs) var(--koba-org-space-m);
  border: var(--koba-org-border) solid var(--koba-org-black);
  border-radius: var(--koba-org-pill);
  background: var(--koba-org-white);
  color: var(--koba-org-black);
  font-size: var(--koba-org-fs-s);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.organisation-actions__button--primary {
  background: var(--koba-org-black);
  color: var(--koba-org-white);
}

/* Hover and focus swap the two colours, so the label keeps full contrast. */
.organisation-actions__button:is(:hover, :focus-visible) {
  background: var(--koba-org-black);
  color: var(--koba-org-white);
}

.organisation-actions__button--primary:is(:hover, :focus-visible) {
  background: var(--koba-org-white);
  color: var(--koba-org-black);
}

.organisation-page :is(.organisation-actions__button, .organisation-page__header a, .organisation-people__add, .organisation-people__edit a):focus-visible {
  outline: max(2px, 0.125rem) solid var(--koba-org-black);
  outline-offset: 2px;
}

/* Main: about heading and body text ------------------------------------- */

.organisation-page__main {
  display: flex;
  flex-direction: column;
  gap: var(--koba-org-space-s);
  padding-block-start: var(--koba-org-space-m);
  border-block-start: var(--koba-org-border) solid var(--koba-org-black);
}

/* An artist without biography and stories still gets the empty stories
   view in this region; without a heading or a story it takes no line and
   no room. The heading shows exactly when the body shows. */
.organisation-page__main:not(:has(.organisation-about__title, .views-row)) {
  display: none;
}

.organisation-about__title {
  margin: 0;
  font-size: var(--koba-org-fs-s);
  font-weight: 600;
}

/* Light and roomy as in the design (28px on a 39px line at 1440px). */
.organisation-page__main :is(.field--name-body, .field--name-field-civicrm-description) {
  font-size: var(--koba-org-fs-lead);
  font-weight: 300;
  line-height: 1.4;
}

/* Details block (type_block) -------------------------------------------- */

.organisation-details {
  padding: var(--koba-org-space-m);
  background: var(--koba-org-coral);
  color: var(--koba-org-black);
  font-size: var(--koba-org-fs-detail);
}

/* WHY .organisation-page in front: a theme heading rule sets the margin of
   this h2 to 0, which put the heading straight on the first line. */
.organisation-page .organisation-details > h2 {
  margin: 0 0 var(--koba-org-space-s);
  font-size: var(--koba-org-fs-h3);
  font-weight: 300;
  line-height: 1.2;
}

/* Each detail is one row: label left, value right, a black line above. */
.organisation-details > * + * {
  padding-block: var(--koba-org-space-xs);
  border-block-start: var(--koba-org-border) solid var(--koba-org-black);
}

.organisation-details > :last-child {
  border-block-end: var(--koba-org-border) solid var(--koba-org-black);
}

/* The label column takes what it needs up to half the row and wraps beyond
   that, so a long value never runs over the label on a narrow screen
   (KI-084); the value takes the rest and wraps within it. */
.organisation-details .field--label-inline {
  display: grid;
  grid-template-columns: fit-content(50%) minmax(0, 1fr);
  column-gap: var(--koba-org-space-s);
}

.organisation-details .field--label-inline .field__label {
  float: none;
  padding: 0;
  font-weight: 600;
  /* The theme underlines every field label; the design shows bold only. */
  text-decoration: none;
}

.organisation-details .field--label-inline .field__label::after {
  content: none;
}

.organisation-details .field--label-inline :is(.field__item, .field__items) {
  float: none;
  /* The theme adds an end padding to field items; values end on the line. */
  padding-inline-end: 0;
  text-align: end;
  overflow-wrap: anywhere;
}

/* Recommend row (KI-086): the Flag link reads as a link in the size of
   the other values; Flag indents it for an icon this theme does not show. */
.organisation-page .organisation-details .field--name-organisation-recommend .flag a {
  padding: 0;
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
}

/* Several values (halls, genres, languages) stack on their own lines. */
.organisation-details .field--label-inline .field__items {
  display: flex;
  flex-direction: column;
  align-items: end;
}

/* People band ------------------------------------------------------------ */

.organisation-page__people {
  padding-block: var(--koba-org-space-l);
  padding-inline: var(--koba-org-gutter);
  background: var(--koba-org-grey);
}

.organisation-people {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--koba-org-space-s);
}

.organisation-people__title {
  margin: 0;
  font-size: var(--koba-org-fs-h2);
  font-weight: 600;
  line-height: 1.2;
}

.organisation-people__intro {
  margin: 0;
  font-size: var(--koba-org-fs-intro);
}

.organisation-people__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.organisation-people__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--koba-org-space-s);
  padding-block: var(--koba-org-space-xs);
  border-block-end: var(--koba-org-border) solid var(--koba-org-black);
}

.organisation-people__name {
  font-size: var(--koba-org-fs-person);
  font-weight: 600;
  line-height: 1.2;
}

.organisation-people__role {
  font-size: var(--koba-org-fs-detail);
}

/* People management (DD-32): "Add a person" as an outlined pill under the
   intro, "Edit role" as an underlined link at the end of each row. */
.organisation-people__add {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: var(--koba-org-space-2xs);
  padding: var(--koba-org-space-2xs) var(--koba-org-space-s);
  border: var(--koba-org-border) solid var(--koba-org-black);
  border-radius: var(--koba-org-pill);
  color: var(--koba-org-black);
  font-size: var(--koba-org-fs-s);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* The plus is decoration: the empty alternative keeps it out of the name;
   a browser without that syntax keeps the first declaration. */
.organisation-people__add::before {
  content: "+";
  content: "+" / "";
  font-weight: 400;
}

.organisation-people__add:is(:hover, :focus-visible) {
  background: var(--koba-org-black);
  color: var(--koba-org-white);
}

/* The flex item is the Views field wrapper around the link, not the span
   itself, so the push to the end of the row sits on that wrapper. */
.organisation-people__item > :has(.organisation-people__edit) {
  margin-inline-start: auto;
}

.organisation-people__edit {
  font-size: var(--koba-org-fs-xs);
  font-weight: 400;
}

.organisation-people__edit a {
  color: var(--koba-org-black);
  text-decoration: underline;
}

/* Layout jump: heading left, intro right once the band is wide enough. */
@container koba-org (min-width: 40rem) {
  .organisation-people {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--koba-org-space-l);
  }

  .organisation-people > :not(.organisation-people__title, .organisation-people__intro, .organisation-people__add) {
    grid-column: 1 / -1;
  }

  /* Under the intro, in the right column, as in the design. */
  .organisation-people__add {
    grid-column: 2;
  }
}

/* Concert list ------------------------------------------------------------ */

/* The list is the theme's concert view; on this page its type follows the
   design (KI-084). WHY the long selectors: the theme sets these sizes on
   the teaser with chains of up to five classes (.node--type-concert
   .node--view-mode-teaser .group-wrapper .date-venue .field), and its
   stylesheet loads after this one; the page classes in front make these
   rules more specific without !important. */
.organisation-page .organisation-page__concerts .view-header h2 {
  font-size: var(--koba-org-fs-display);
  font-weight: 300;
  line-height: 1.1;
}

.organisation-page .organisation-page__concerts .view-header h3 {
  font-size: var(--koba-org-fs-link);
  font-weight: 400;
}

/* The theme gives the title and "See all concerts" half the row each, so
   the large title wraps; as in the design the title takes what it needs
   and the link sits at the end, on the baseline of the title. */
.organisation-page .organisation-page__concerts .view-header {
  flex-wrap: wrap;
  align-items: last baseline;
  column-gap: var(--koba-org-space-m);
}

.organisation-page .organisation-page__concerts .view-header > h2 {
  flex: 1 1 auto;
}

.organisation-page .organisation-page__concerts .view-header > h3 {
  flex: 0 0 auto;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper .date-venue .field {
  font-size: var(--koba-org-fs-s);
  font-weight: 400;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .field h2 {
  font-size: var(--koba-org-fs-row);
  font-weight: 600;
  line-height: 1.2;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .field .countrycode {
  font-size: var(--koba-org-fs-xs);
  font-weight: 400;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper .field .button {
  font-size: var(--koba-org-fs-tag);
  font-weight: 400;
}

/* One concert per row (KI-086): date, name and "More info", as in the
   design. On a venue page the name is the artist (the theme's teaser, its
   link to the venue repeats the page and is left out); on an artist page
   the name is the venue with its city (view mode venue_row). WHY a grid
   instead of the theme's floats: the floats put the date and the venue on
   a line of their own above the name. A narrow column shows the date and
   "More info" on the first line and the name under them; from 40rem the
   three share one line, the date column a ninth of the name column and
   never narrower than the date. */
.organisation-page .organisation-page__concerts .node--type-concert:is(.node--view-mode-teaser, .node--view-mode-venue-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "date more"
    "name name";
  column-gap: var(--koba-org-space-s);
  align-items: baseline;
}

/* The clearfix of the theme would be a grid item of its own. */
.organisation-page .organisation-page__concerts .node--type-concert:is(.node--view-mode-teaser, .node--view-mode-venue-row)::after {
  content: none;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper {
  display: contents;
}

/* Any other field of the teaser (a concert bundle, a co-organiser) stays
   with the name. */
.organisation-page .organisation-page__concerts .node--type-concert:is(.node--view-mode-teaser, .node--view-mode-venue-row) > *,
.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper > * {
  grid-column: 1 / -1;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper .date-venue,
.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-venue-row > .field--name-field-date-event {
  grid-area: date;
  float: none;
  width: auto;
  font-size: var(--koba-org-fs-s);
  font-weight: 400;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper .date-venue .field {
  margin: 0;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper .date-venue > a {
  display: none;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper .field--name-dynamic-twig-fieldnode-concert-more-info-conditional,
.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-venue-row > .field--name-dynamic-twig-fieldnode-concert-more-info-conditional {
  grid-area: more;
  align-self: center;
  float: none;
  justify-self: end;
}

.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser > .field--name-dynamic-token-fieldnode-artist-country-code-in-concert-n,
.organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-venue-row > .field--name-dynamic-token-fieldnode-concert-venue-name-location {
  grid-area: name;
}

/* Venue row: the venue name in the size of the artist name on a venue
   page, the city under it. */
.organisation-page .organisation-page__concerts .node--view-mode-venue-row .concert-venue__name {
  margin: 0;
  padding: 0;
  font-size: var(--koba-org-fs-row);
  font-weight: 600;
  line-height: 1.2;
}

.organisation-page .organisation-page__concerts .node--view-mode-venue-row .concert-venue__name a {
  color: inherit;
  text-decoration: none;
}

.organisation-page .organisation-page__concerts .node--view-mode-venue-row .concert-venue__location {
  font-size: var(--koba-org-fs-s);
  font-weight: 400;
}

.organisation-page .organisation-page__concerts .node--view-mode-venue-row .concert-venue__location:empty {
  display: none;
}

/* The theme styles "More info" only in the teaser; the venue row gets the
   same button, and both scale with the tokens. */
.organisation-page .organisation-page__concerts .node--type-concert:is(.node--view-mode-teaser, .node--view-mode-venue-row) .field--name-dynamic-twig-fieldnode-concert-more-info-conditional .button {
  padding: var(--koba-org-space-2xs);
  font-size: var(--koba-org-fs-tag);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

@container koba-org (min-width: 40rem) {
  /* WHY a floor in the size of the date font rather than max-content: every
     row is a grid of its own, so max-content would give each row the width
     of its own date and the names would not line up. The longest date
     ("28 May 2026") is just over six times the date font wide; seven
     leaves room. */
  .organisation-page .organisation-page__concerts .node--type-concert:is(.node--view-mode-teaser, .node--view-mode-venue-row) {
    grid-template-columns: minmax(calc(7 * var(--koba-org-fs-s)), 1fr) minmax(0, 8fr) auto;
    grid-template-areas: "date name more";
  }

  .organisation-page .organisation-page__concerts .node--type-concert:is(.node--view-mode-teaser, .node--view-mode-venue-row) > *,
  .organisation-page .organisation-page__concerts .node--type-concert.node--view-mode-teaser .group-wrapper > * {
    grid-column: name;
  }
}

/* Wide screen: two columns ------------------------------------------------ */

/* Layout jump of the whole page (the page cannot query its own container):
   the content runs in two columns of 10 to 7, as in the design at 1440px
   (791px and 553px with a 40px gap); the People band and the concert list
   keep the full width. The header uses the same columns through subgrid,
   so the photo lines up with the about text and the head with the
   details. */
@media (min-width: 64em) {
  .organisation-page {
    display: grid;
    grid-template-columns:
      [full-start] var(--koba-org-gutter)
      [content-start] minmax(0, 10fr)
      var(--koba-org-space-l)
      minmax(0, 7fr) [content-end]
      var(--koba-org-gutter) [full-end];
    /* The column gap is a track of its own; the flex gap of the narrow
       layout would add to every track. */
    gap: var(--koba-org-space-xl) 0;
  }

  .organisation-page > * {
    grid-column: full;
  }

  .organisation-page > :is(.organisation-page__header, .organisation-page__main, .organisation-page__type-block) {
    margin-inline: 0;
  }

  .organisation-page > .organisation-page__header {
    grid-column: content;
    grid-template-columns: subgrid;
    grid-template-rows: repeat(7, auto) 1fr auto;
    grid-template-areas:
      "banner banner banner"
      "crumb crumb crumb"
      "photo . type"
      "photo . title"
      "photo . place"
      "photo . links"
      "photo . actions"
      "photo . ."
      "media media media";
    column-gap: 0;
  }

  .organisation-page__header > :is(.field--name-dynamic-block-fieldnode-music-venue-images-slideshow, .field--name-field-image, .field--name-field-media) {
    margin-block-end: 0;
  }

  /* The media field is the band photo of an artist: it takes the photo
     column unless the page has a slideshow or an image, then it runs
     under the head. */
  .organisation-page__header:not(:has(> :is(.field--name-dynamic-block-fieldnode-music-venue-images-slideshow, .field--name-field-image))) > .field--name-field-media {
    grid-area: photo;
  }

  .organisation-page__header:has(> :is(.field--name-dynamic-block-fieldnode-music-venue-images-slideshow, .field--name-field-image)) > .field--name-field-media {
    margin-block-start: var(--koba-org-space-m);
  }

  /* Without any photo the head takes the full width. */
  .organisation-page__header:not(:has(> :is(.field--name-dynamic-block-fieldnode-music-venue-images-slideshow, .field--name-field-image, .field--name-field-media))) > :is(.organisation-type, .field--name-node-title, .field--name-field-location, .field--name-field-country-of-residence, .field--name-field-music-venue-website, .field--name-field-websites, .socialmedia, .organisation-actions, .organisation-connect) {
    grid-column: 1 / -1;
  }

  /* The logo sits top right of the head, next to the type and the name. */
  .organisation-page__header > .field--name-field-logo {
    grid-area: auto;
    grid-column: -2;
    grid-row: type-start / title-end;
    justify-self: end;
    align-self: start;
  }

  .organisation-page__header:has(> .field--name-field-logo) > :is(.organisation-type, .field--name-node-title) {
    margin-inline-end: calc(var(--koba-org-logo) + var(--koba-org-space-m));
  }

  .organisation-page > .organisation-page__main {
    grid-column: 2;
    align-self: start;
  }

  /* The details stay in the right column, under the head, also when the
     page has no about text. */
  .organisation-page > .organisation-page__type-block {
    grid-column: 4;
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .organisation-actions__button,
  .organisation-people__add {
    transition: none;
  }
}
