/*
 * The shared components of the four designed pages, built once: buttons, text fields and selects,
 * checkboxes and radios, the form-error pattern, tags, the card, the segmented control, tabs, the
 * filter bar, notices, pagination, the "Imagine ilustrativă" caption.
 *
 * Each state a user can reach has a class of the same name (.is-hover, .is-active, .is-focus) so
 * the component gallery (/dev/components, Development only) can show it at rest.
 * Values come from tokens.css; this file holds no colour and no font size of its own.
 */

/* ---------- Buttons: primary, outlined, text ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  min-height: var(--control-height);
  padding: var(--control-padding-block) var(--spacing-20);
  border: var(--border-width-1) solid var(--color-action);
  border-radius: var(--border-radius-8);
  background: var(--color-surface);
  color: var(--color-action);
  font: var(--font-weight-medium) var(--font-size-16) / var(--line-height-24) var(--font-family-stack);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    color var(--motion-duration-fast) var(--motion-easing-standard),
    background-color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    box-shadow var(--motion-duration-fast) var(--motion-easing-standard);
}

.button.small {
  min-height: var(--control-height-small);
  padding: var(--spacing-8) var(--spacing-16);
  border-radius: var(--border-radius-6);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* Primary: burgundy with white text */
.button.primary {
  background: var(--color-action);
  border-color: var(--color-action);
  color: var(--color-action-text);
}

/* Outlined: burgundy border and text on white (also what .button alone is) */
.button.outlined {
  background: var(--color-surface);
  border-color: var(--color-action);
  color: var(--color-action);
}

/* Text: no border or fill, an underline on hover */
.button.text {
  min-height: var(--control-height-small);
  padding-inline: var(--spacing-12);
  background: transparent;
  border-color: transparent;
  color: var(--color-action);
}

.button:is(:hover, .is-hover) {
  background: var(--color-background-action-hover);
  border-color: var(--color-action-hover);
  color: var(--color-action-hover);
  text-decoration: none;
}

.button.primary:is(:hover, .is-hover) {
  background: var(--color-action-hover);
  border-color: var(--color-action-hover);
  color: var(--color-action-text);
}

.button.text:is(:hover, .is-hover) {
  background: var(--color-background-action-hover);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: var(--underline-offset);
}

.button:is(:active, .is-active) {
  background: var(--color-background-action-active);
  border-color: var(--color-action-active);
  color: var(--color-action-active);
}

.button.primary:is(:active, .is-active) {
  background: var(--color-action-active);
  border-color: var(--color-action-active);
  color: var(--color-action-text);
}

.button.text:is(:active, .is-active) {
  border-color: transparent;
}

/* Pressed or expanded (FS-5): the one selected look of a toggle: --color-background-action-active (#EEDDE2) and a 1 px --color-action
   border, distinct from the hover tint (--color-background-action-hover, text --color-action-hover). It is told by the attribute, so the
   visit toggle (aria-pressed), the header's "Caută" and "Meniu" (aria-expanded, shell.css) and any later toggle share it; it holds under
   the pointer, and the colour change runs over --motion-duration-fast by the transition of .button. A primary button keeps its fill. */
.button:not(.primary):is([aria-pressed="true"], [aria-expanded="true"], .is-pressed) {
  background: var(--color-background-action-active);
  border-color: var(--color-action);
  color: var(--color-action);
}

/* Disabled (FS-6): a grey surface, a solid grey edge and 5:1 text, one look for every disabled control */
.button:is(:disabled, [aria-disabled="true"], .is-disabled) {
  background: var(--color-surface-muted);
  border: var(--border-width-1) solid var(--color-border);
  color: var(--color-text-disabled);
  text-decoration: none;
  cursor: not-allowed;
}

/* The pointer reaches a disabled button (brief-m4-10), so its cursor shows; the hover and pressed rules above are as specific, so a
   hovered or pressed disabled button gets its grey look back here and no state paints over it. A click does nothing: a disabled
   button sends none, and the scripts ignore an aria-disabled one. */
.button:is(:disabled, [aria-disabled="true"], .is-disabled):is(:hover, .is-hover, :active, .is-active) {
  background: var(--color-surface-muted);
  border-color: var(--color-border);
  color: var(--color-text-disabled);
  text-decoration: none;
}

/* ---------- Text fields, selects, textareas ---------- */

.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--spacing-8);
  min-width: 0;
}

/* The label sits above the control */
.field > label,
.field-label {
  display: block;
  color: var(--color-text);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-regular);
}

.field-required {
  color: var(--color-text-secondary);
}

.field-hint {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* The generic padding sits in its own :where() rule, with no specificity: the .field rule above it was (0,2,1), which beat
   `.field select` (the select's 40 px end padding for the chevron, CC-4) and `.site-search__control input` (the 48 px start padding
   clear of the magnifier, OWN-2), so both fell back to 16 px. Every rule that sets a control's padding now outranks it by
   its own selector; the rest of the generic rule keeps its specificity, so no other property of any control changes. */
:where(.field :is(input:not([type="checkbox"], [type="radio"]), select, textarea), .input) {
  padding: var(--control-padding-block) var(--spacing-16);
}

.field :is(input:not([type="checkbox"], [type="radio"]), select, textarea),
.input {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  margin: 0;
  border: var(--border-width-1) solid var(--color-border-field);
  border-radius: var(--border-radius-8);
  background-color: var(--color-surface);
  color: var(--color-text);
  font: var(--font-weight-regular) var(--font-size-16) / var(--line-height-24) var(--font-family-stack);
  appearance: none;
  transition:
    color var(--motion-duration-fast) var(--motion-easing-standard),
    background-color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    box-shadow var(--motion-duration-fast) var(--motion-easing-standard);
}

.field textarea {
  min-height: var(--size-7-5rem);
  resize: vertical;
}

/* A date or datetime-local field's inner editor is taller than a text line, which made it 50px: it is 48px like the others (FO-3) */
.field input:is([type="date"], [type="datetime-local"], [type="month"], [type="time"]),
.input:is([type="date"], [type="datetime-local"], [type="month"], [type="time"]) {
  height: var(--control-height);
}

.field :is(input, textarea)::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

/* Select (CC-4): the arrow is the menu's 16 px line chevron (1.5 px stroke, the icon colour #121212, as the header draws it) as an SVG
   background, 12 px from the inner right edge; the text keeps room for it. No select keeps the gradient triangle. */
.field select {
  padding-inline-end: var(--spacing-40);
  background-image: var(--select-chevron);
  background-position: right var(--spacing-12) center;
  background-size: var(--spacing-16) var(--spacing-16);
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}

.field :is(input:not([type="checkbox"], [type="radio"]), select, textarea):is(:hover, .is-hover):not(:focus, :disabled),
.input:is(:hover, .is-hover):not(:focus, :disabled) {
  border-color: var(--color-border-field-hover);
}

.field :is(input:not([type="checkbox"], [type="radio"]), select, textarea):disabled {
  background-color: var(--color-surface-muted);
  border-color: var(--color-border);
  border-style: solid;
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.field :is(input, select, textarea)[aria-invalid="true"] {
  border: var(--border-width-2) solid var(--color-border-danger);
  padding: calc(var(--control-padding-block) - 1px) calc(var(--spacing-16) - 1px);
}

.field select[aria-invalid="true"] {
  padding-inline-end: calc(var(--spacing-40) - 1px);
}

/* Field focus (OWN-1, dev04): a text field, select or textarea shows a 2px burgundy edge and a 4px pale burgundy halo on :focus, by
   pointer or keyboard; the 1px border stays, so the field's size does not change. Links, buttons and the other controls keep the
   MUD ring of base.css on :focus-visible only. After the invalid rules, so a field in error shows the focus too. */
.field :is(input:not([type="checkbox"], [type="radio"]), select, textarea):is(:focus, :focus-visible),
.input:is(:focus, :focus-visible),
.field :is(input, select, textarea).is-focus,
.input.is-focus {
  border-color: var(--color-field-focus);
  box-shadow: var(--field-focus-ring);
  outline: var(--border-width-2) solid transparent;
  outline-offset: var(--border-width-2);
  /* the field's own transition: base.css gives a keyboard-focused element none, which would leave a field's edge no motion */
  transition:
    color var(--motion-duration-fast) var(--motion-easing-standard),
    background-color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    box-shadow var(--motion-duration-fast) var(--motion-easing-standard);
}

/* The message under a field in error */
.field-error {
  margin: 0;
  color: var(--color-text-danger-on-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-regular);
}

/* An either/or group of a form (brief-m2-14): a fieldset with its legend and hint, the fields side by side from 768 px, one message under the group */
.field-group {
  min-width: 0;
  margin: 0;
  padding: var(--spacing-16);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-8);
}

.field-group > legend {
  padding-inline: var(--spacing-8);
  font-weight: var(--font-weight-medium);
}

.field-group > .field-hint {
  margin-bottom: var(--spacing-12);
}

.field-group-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-16) var(--spacing-24);
  align-items: start; /* the controls of a row start at the same y (FO-7) */
}

.field-group > .field-error {
  margin-top: var(--spacing-12);
}

@media (min-width: 768px) {
  .field-group-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Checkbox and radio: 24 px, 2 px border ---------- */

/* FO-1: .field > label { display: block } and its 14/20 type beat the bare .check (specificity), so a .check label inside a field repeats
   its flex row, 16/24 type and colour here, after the label rule */
.check,
.field > label.check {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-12);
  min-height: var(--line-height-24);
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  cursor: pointer;
}

.check input {
  flex: none;
  width: var(--size-1-5rem);
  height: var(--size-1-5rem);
  margin: 0;
  border: var(--border-width-2) solid var(--color-border-field);
  border-radius: var(--border-radius-4);
  background: var(--color-surface);
  appearance: none;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition:
    background-color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard);
}

.check input[type="radio"] {
  border-radius: var(--border-radius-full);
}

.check input::before {
  content: "";
  width: var(--size-0-75rem);
  height: var(--size-0-75rem);
  background: var(--color-action-text);
  transform: scale(0);
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 20%, 86% 6%, 40% 70%);
}

/* base.css gives a keyboard-focused element no transition; the box's colour and the mark keep theirs (MO-8), the ring still appears at once */
.check input:is(:focus-visible, .is-focus) {
  transition:
    background-color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard);
}

.check input[type="radio"]::before {
  clip-path: none;
  border-radius: var(--border-radius-full);
}

.check input:checked {
  background: var(--color-action);
  border-color: var(--color-action);
}

.check input:checked::before {
  transform: scale(1);
}

.check input:is(:hover, .is-hover):not(:disabled) {
  border-color: var(--color-action);
}

.check input[aria-invalid="true"] {
  border-color: var(--color-border-danger);
}

/* FO-2: the error rule of the fields above (a 2 px border and a padding to keep a field's size) must not pad a checkbox or a radio:
   it stays 24 x 24 px with the 2 px border it always has */
.field .check input[aria-invalid="true"] {
  padding: 0;
  border: var(--border-width-2) solid var(--color-border-danger);
}

.check input:disabled {
  background: var(--color-surface-muted);
  border-color: var(--color-border);
  border-style: solid;
  cursor: not-allowed;
}

.check input:disabled:checked::before {
  background: var(--color-text-disabled);
}

.check:has(input:disabled) {
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

/* ---------- Notices: info, warning, danger; and the error summary ---------- */

.notice {
  padding: var(--spacing-16) var(--spacing-20);
  border: var(--border-width-1) solid var(--color-info-border);
  border-radius: var(--border-radius-8);
  background: var(--color-info-surface);
  color: var(--color-text);
}

.notice > :last-child {
  margin-bottom: 0;
}

.notice-title {
  margin: 0 0 var(--spacing-8);
  color: var(--color-info-text);
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  letter-spacing: 0;
  font-weight: var(--font-weight-semibold);
}

.notice.warning {
  border-color: var(--color-border-warning-secondary);
  background: var(--color-background-warning-secondary);
}

.notice.warning .notice-title {
  color: var(--color-text-warning);
}

.notice.danger {
  border-color: var(--color-border-danger);
  background: var(--color-background-danger-secondary);
}

.notice.danger .notice-title {
  color: var(--color-text-danger-on-secondary);
}

.notice ul {
  margin: 0;
  padding-inline-start: var(--spacing-20);
}

.notice li + li {
  margin-top: var(--spacing-4);
}

/* Only the error summary's links are the danger red; links in .notice.info and .notice.warning keep the link colour (M4-ICONS-NOTICES, CC-2) */
.notice.danger li a {
  color: var(--color-text-danger-on-secondary);
}

/* The error summary: a danger notice that script focuses after a failed submit; 24 px (M4-FORMS, FO-5) separate it from the next line */
.error-summary,
.form-generic-error {
  margin-block-end: var(--spacing-24);
}

.error-summary[hidden] {
  display: none;
}

/* The empty state of a section whose fields have no text yet (LT-12): at most one in a section */
.empty-state {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  margin: 0;
  padding: var(--spacing-12) var(--spacing-16);
  border-radius: var(--border-radius-8);
  background: var(--color-background-base-tertiary);
  color: var(--color-text-base-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.empty-state-icon {
  flex: none;
}

/* ---------- Tags: 12/16 500, at least 24 px, radius 4 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-1-5rem);
  padding: var(--spacing-4) var(--spacing-8);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-4);
  background: var(--color-background-base-tertiary);
  color: var(--color-text);
  font-size: var(--font-size-12);
  line-height: var(--line-height-16);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: normal;
}

/* positive: categories */
.tag.positive {
  background: var(--color-background-positive-secondary);
  border-color: var(--color-border-positive-secondary);
  color: var(--color-text-positive-on-secondary);
}

/* danger: 'Încheiat', 'Anulat' */
.tag.danger {
  background: var(--color-background-danger-secondary);
  border-color: var(--color-border-danger-secondary);
  color: var(--color-text-danger-on-secondary);
}

/* info: audience */
.tag.info {
  background: var(--color-background-brand-secondary);
  border-color: var(--color-border-brand-secondary);
  color: var(--color-text-brand-on-secondary);
}

/* neutral: country */
.tag.neutral {
  background: var(--color-background-base-tertiary);
  border-color: var(--color-border);
  color: var(--color-text);
}

.tag.warning {
  background: var(--color-background-warning-secondary);
  border-color: var(--color-border-warning-secondary);
  color: var(--color-text-warning);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Card: image, tags, title link stretched over the card, text, actions ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-16);
  background: var(--color-surface);
}

.card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-background-placeholder);
}

/* The placeholder of a producer's logo */
.card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-4);
  min-height: var(--size-12-5rem);
  padding: var(--spacing-24);
  background: var(--color-background-placeholder);
  color: var(--color-text-secondary);
  text-align: center;
}

.card-placeholder strong {
  color: var(--color-text-placeholder);
  font-size: var(--font-size-24); /* 24px is large text at any weight: 3:1 is enough for #757575 */
  line-height: var(--line-height-28);
}

/* LT-14: a quiet sub-label, 12/16 in the lightest grey that keeps 4.5:1 on the placeholder */
.card-placeholder .caption {
  color: var(--color-text-placeholder-caption);
}

/* CC-3: the visit toggle of a producer card is a 40 x 40 px icon button in the card's top-right corner; its label stays in the accessible name */
.visit-toggle.icon-only {
  width: var(--control-height-small);
  min-width: var(--control-height-small);
  height: var(--control-height-small);
  min-height: var(--control-height-small);
  padding: 0;
  border-radius: var(--border-radius-6);
}

/* The visible label is the icon: the label stays in the accessible name, hidden by clipping as .sr-only does */
.visit-toggle.icon-only [data-visit-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: calc(var(--border-width-1) * -1);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.visit-toggle.icon-only svg {
  flex: none;
  width: var(--spacing-20);
  height: var(--spacing-20);
}

/* FS-5: the icon turns to its filled form when the place is in the list */
.visit-toggle.icon-only svg path {
  fill: none;
}

.visit-toggle.icon-only:is(.is-pressed, [data-visit-state="in"]) svg path {
  fill: currentColor;
}

.producer-card .visit-toggle.icon-only {
  position: absolute;
  inset-block-start: var(--spacing-12);
  inset-inline-end: var(--spacing-12);
  z-index: 2;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--spacing-12);
  padding: var(--spacing-24);
}

.card-title {
  margin: 0;
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
  letter-spacing: var(--letter-spacing-h4);
}

.card-title a {
  color: var(--color-text);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--color-action);
  text-decoration: underline;
}

/* The title link stretched over the whole card: one click target, no second link needed */
.card:has(a.stretched) {
  cursor: pointer;
  transition:
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    box-shadow var(--motion-duration-fast) var(--motion-easing-standard);
}

.card a.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* FS-4: only a clickable card answers the pointer, with a border and a shadow, never a transform */
.card:has(a.stretched):hover {
  border-color: var(--color-border-card-hover);
  box-shadow: var(--shadow-100);
}

.card a.stretched:focus-visible {
  box-shadow: none;
  outline: none;
}

.card-text {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.card-meta {
  margin: 0;
  color: var(--color-action);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* Buttons and links inside a card stay above the stretched link */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
  margin-top: auto;
}

.card-actions > *,
.card .tags {
  position: relative;
  z-index: 1;
}

/* A row card: the image beside the text, from 768 px */
@media (min-width: 768px) {
  .card.horizontal {
    flex-direction: row;
  }

  .card.horizontal .card-media {
    width: 32%;
    flex: none;
    aspect-ratio: auto;
    min-height: var(--size-13-5rem);
  }
}

/* ---------- Segmented control: pills in a track, nav with aria-current="page" ---------- */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--spacing-4);
  max-width: 100%;
  padding: var(--spacing-4);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-full);
  background: var(--color-background-base-tertiary);
}

.segmented a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target-size);
  padding: var(--spacing-8) var(--spacing-16);
  border-radius: var(--border-radius-full);
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
}

.segmented a:is(:hover, .is-hover) {
  background: var(--color-surface);
  color: var(--color-text);
}

/* The current segment: aria-current="page" on the segment's own page, "true" on a page below it (M4-STATES FS-3) */
.segmented a:is([aria-current="page"], [aria-current="true"]) {
  background: var(--color-action);
  color: var(--color-action-text);
  font-weight: var(--font-weight-medium);
}

/* The head of every page that shows the switch (owner-2, R-SWITCHER): the eyebrow, the H1, the lead and the switch are one centred
   column, the same on every page, as design 06.1 draws it. The switch is as wide as its links (a flex item that does not stretch), at
   most the container's width, where it scrolls inside itself; it sits one step (--spacing-24) below the last line of the head, so moving
   between the pages of one switch moves neither the head nor the switch. The per-page head rules set no alignment, margin under the
   last part or place of the switch of their own. */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head > :is(h1, p, ul):has(+ .segmented) {
  margin-bottom: 0;
}

.section-head > .segmented {
  align-self: center;
  margin-top: var(--spacing-24);
}

.section-head :is(.tags, .record-badges) {
  justify-content: center;
}

/* A tab bar under the switch (the team pages) is not part of it: it keeps its full width and its start-aligned tabs */
.section-head > .tabs {
  align-self: stretch;
  text-align: start;
}

.segmented + .tabs {
  margin-top: var(--spacing-24);
}

/* Below 768 px the switch stays one row, as high as at 768 px (50 px), and scrolls sideways inside its own track like the tabs below.
   The track keeps room for the keyboard ring (the one --focus-ring, 5 px) inside its scrolling box, so the first and the last link show
   it whole: the track's padding is 5 px on every side and the links are 2 px lower than the 40 px of the wide switch to make up for it. */
@media (max-width: 767.98px) {
  .segmented {
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: calc(var(--spacing-4) + var(--border-width-1));
    scroll-padding-inline: calc(var(--spacing-4) + var(--border-width-1));
  }

  .segmented::-webkit-scrollbar {
    display: none;
  }

  .segmented a {
    flex: none;
    min-height: calc(var(--target-size) - var(--spacing-2));
    scroll-snap-align: start;
  }
}

/* ---------- Tabs: nav[aria-label] > a[aria-current=page], 48 px, 2 px underline (M4-SELECTED-TABS, FS-7, CC-5) ----------
   Each tab is 48 px tall (its 2 px underline inside the height). The baseline is an inset shadow of the row, not a border, so
   the underline sits on it without a negative margin that would make the scrolling row scroll up and down by a pixel. Every
   label is weight 500, selected or not: the selection moves the underline and the colour, never a tab's width.
   The steps of the subscription page (ol.steps.tabs) take the same tab look on their items. */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-8) var(--spacing-16);
  margin: 0;
  padding: 0;
  list-style: none;
  box-shadow: inset 0 calc(-1 * var(--border-width-1)) 0 var(--color-border);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 var(--spacing-8);
  border-bottom: var(--border-width-2) solid transparent;
  color: var(--color-text);
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition:
    color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard);
}

.tabs a:is(:hover, .is-hover) {
  border-bottom-color: var(--color-border-field);
  color: var(--color-action);
}

.tabs a[aria-current="page"] {
  border-bottom-color: var(--color-action);
  color: var(--color-action);
  font-weight: var(--font-weight-medium);
}

/* Below 768 px the tabs stay one row and scroll sideways, each snapping at the row's start; script scrolls the selected one into view */
@media (max-width: 767.98px) {
  .tabs,
  .tabs.steps {
    position: relative;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    /* The row clips what is outside it, so it leaves room inside for the keyboard ring (the one --focus-ring, 5 px) of a tab at its edges;
       its baseline is a 1 px line under the tabs, drawn by the background so that it stays under them while the row scrolls */
    padding: calc(var(--spacing-4) + var(--border-width-1));
    scroll-padding-inline: calc(var(--spacing-4) + var(--border-width-1));
    margin-inline: calc(-1 * (var(--spacing-4) + var(--border-width-1)));
    background: linear-gradient(var(--color-border), var(--color-border)) no-repeat 0 calc(100% - var(--spacing-4) - var(--border-width-1)) / 100% var(--border-width-1);
  }

  /* No baseline shadow on the scrolling row, but the keyboard ring of a row that takes the tab stop (the subscription's steps): base.css draws
     it on :focus-visible, and this rule must not take it away */
  .tabs:not(:focus-visible) {
    box-shadow: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs a,
  .tabs > li {
    flex: none;
    scroll-snap-align: start;
  }
}

/* ---------- Filter bar (M4-FILTERBAR, CC-1): one bar, designs 04.3 and 02.2 ----------
   Kit/_FilterBar renders it on every listing page. A label above each control; one row of the fields and the two buttons from
   1024 px (the search field twice as wide as a select, so its placeholder shows whole), the fields in columns and the buttons on
   their own row below; 'Mai multe filtre' a centred text toggle under the row. */

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding: var(--spacing-24);
  border: var(--border-width-1) solid var(--color-border-band);
  border-radius: var(--border-radius-16);
  background: var(--color-background-band);
  container-type: inline-size;
}

/* As many columns as fit with each field at least 14rem wide: the floor is in rem, so when the text grows (200%) the columns
   drop out and the fields keep room for their text; under 224 px one column. */
.filter-row {
  display: grid;
  gap: var(--spacing-16);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--size-14rem)), 1fr));
  align-items: start;
}

.more-filters-grid {
  display: grid;
  gap: var(--spacing-16);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--size-14rem)), 1fr));
  align-items: start;
}

/* The search field takes two columns when the bar has room for three or more (50rem, so the text size counts) */
@container (min-width: 50rem) {
  .filter-bar .field.wide {
    grid-column: span 2;
  }
}

/* The buttons sit side by side, auto width, not stretched */
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
  grid-column: 1 / -1;
}

/* The reset's icon follows its label */
.filter-actions .icon {
  flex: none;
  width: var(--spacing-16);
  height: var(--spacing-16);
}

/* From 1024 px: the fields and the buttons in one row, the buttons at the row's foot line; the search field is twice a select */
@media (min-width: 1024px) {
  .filter-row {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-12);
  }

  .filter-row > .field {
    flex: 1 1 0;
    min-width: 0;
  }

  .filter-row > .field.wide {
    flex-grow: 2;
  }

  .filter-actions {
    flex: none;
    flex-wrap: nowrap;
  }

  /* FO-4: the fields of 'Mai multe filtre' are as narrow as the row's selects (six columns, the search field being about twice a
     select), so no select of the bar is more than two thirds of the search field's width; they keep the auto-fit columns below 1024 px */
  .more-filters-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  /* a date field of that width keeps its whole mm/dd/yyyy and its picker: less room at its sides */
  .more-filters-grid input[type="date"] {
    padding-inline: var(--spacing-8);
  }

  /* A bar of one choice (the map's layer) does not stretch it over the row */
  .map-tools .filter-row > .field {
    flex: 0 1 var(--size-20rem);
  }
}

/* The fields' text: a select's starts 12 px from its start and keeps room for the chevron at its end; the search field's text
   starts 40 px from its start, after the 20 px magnifier that sits 12 px from it; the placeholder is the size of the typed value */
.filter-bar .field select {
  padding-inline: var(--spacing-12) var(--spacing-40);
}

/* FO-4: inside the filter bar the fields and selects are 40 px tall with 14/20 text (1 px border + 9 px + 20 px line + 9 px + 1 px);
   the long forms keep their 48 px. The buttons are .small (40 px, radius 6, padding 16, 500 14/20). */
.filter-bar .field :is(input:not([type="checkbox"], [type="radio"]), select) {
  min-height: var(--control-height-small);
  padding-block: var(--control-padding-block-small);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.filter-bar .field input:is([type="date"], [type="datetime-local"], [type="month"], [type="time"]) {
  height: var(--control-height-small);
}

.filter-bar .field input[type="search"] {
  padding-inline: var(--spacing-40) var(--spacing-12);
  text-overflow: ellipsis;
}

.filter-bar .field :is(input[type="search"], select)[aria-invalid="true"] {
  padding-block: calc(var(--control-padding-block-small) - 1px);
}

.filter-bar .field input[type="search"][aria-invalid="true"] {
  padding-inline: calc(var(--spacing-40) - 1px) calc(var(--spacing-12) - 1px);
}

.filter-bar .field input::placeholder {
  font: inherit;
}

/* The search field's magnifier: 20 px, 12 px from the field's start */
.input-icon {
  position: relative;
}

.input-icon .input-icon-svg {
  position: absolute;
  top: 50%;
  inset-inline-start: var(--spacing-12);
  width: var(--spacing-20);
  height: var(--spacing-20);
  transform: translateY(-50%);
  color: var(--color-icon-base-default);
  pointer-events: none;
}

/* 'Mai multe filtre': a centred text toggle under the row; its fields open below it */
.more-filters > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  min-height: var(--size-2-75rem);
  color: var(--color-action);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  list-style: none;
}

.more-filters > summary::-webkit-details-marker {
  display: none;
}

.more-filters {
  grid-column: 1 / -1;
}

.more-filters-grid {
  padding-top: var(--spacing-16);
}

/* The chevron is a rotated corner of a border: no image is requested. It turns over --motion-duration-fast (MO-4); the
   translation keeps its point on the text's centre line before and after the turn. The content's reveal is the
   shared one below (.disclosure, .more-filters). */
.more-filters > summary::after {
  content: "";
  flex: none;
  width: var(--size-0-5rem);
  height: var(--size-0-5rem);
  border-right: var(--border-width-2) solid currentColor;
  border-bottom: var(--border-width-2) solid currentColor;
  transform: translateY(calc(var(--size-0-25rem) * -1)) rotate(45deg);
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.more-filters[open] > summary::after {
  transform: translateY(var(--size-0-25rem)) rotate(225deg);
}

/* The result count: plain text above the results; announcements go to the one #live-status */
.result-count {
  margin: var(--spacing-12) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* ---------- Pagination: 40 x 40, radius 4 ---------- */

.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination :is(a, span) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--target-size);
  min-height: var(--target-size);
  padding: var(--spacing-4) var(--spacing-8);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-4);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.pagination a:is(:hover, .is-hover) {
  background: var(--color-background-action-hover);
  border-color: var(--color-action);
  color: var(--color-action);
}

.pagination a:is(:active, .is-active) {
  background: var(--color-background-action-active);
}

.pagination [aria-current="page"] {
  background: var(--color-action);
  border-color: var(--color-action);
  color: var(--color-action-text);
}

.pagination [aria-disabled="true"] {
  border-color: var(--color-border);
  border-style: solid;
  background: var(--color-surface-muted);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.pagination-range {
  margin: var(--spacing-12) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* ---------- The list and record kit (M2-KIT, Views/Kit): results, card, empty state, back link, unavailable page ---------- */

/* The results region: the count line, the cards or rows, the pagination */
.list-results {
  margin-top: var(--spacing-24);
}

.list-results > .result-count {
  margin: 0 0 var(--spacing-16);
}

.list-results[aria-busy="true"] {
  cursor: progress;
}

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

.list-grid > li {
  display: flex;
  min-width: 0;
}

.list-grid > li > .card {
  flex: 1;
}

.list-results > .pagination {
  margin-top: var(--spacing-32);
}

/* The card of the lists: the title link over the whole card, padding 24 (.card-body), radius 12 (dev/04 rows 15-16) */
.card.list-card {
  border-radius: var(--border-radius-12);
}

/* A gap in a long run of pages: no box */
.pagination .pagination-gap span {
  min-width: auto;
  border-color: transparent;
  background: none;
}

/* The one empty state of a list */
.list-empty {
  margin-top: var(--spacing-8);
}

.list-empty p {
  margin: 0;
}

.list-empty .notice-title {
  margin-bottom: var(--spacing-4);
}

/* 'Înapoi la <listă>' of a record page */
.record-back {
  margin: 0 0 var(--spacing-16);
}

.record-back .button {
  gap: var(--spacing-4);
  padding-inline: var(--spacing-8);
}

/* The record-unavailable page: three ways on */
.record-unavailable__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
  margin: var(--spacing-24) 0 0;
  padding: 0;
  list-style: none;
}

/* ---------- Caption of a generated atmosphere image ---------- */

.figure-caption {
  margin: var(--spacing-8) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-12);
  line-height: var(--line-height-16);
  font-weight: var(--font-weight-medium);
}

/* The caption of a generated image, 'Imagine ilustrativă': a small pill in the corner of the figure or hero it sits in
   (the one component of what the pages called .gallery-badge, .media-badge, .news-badge, .ow-badge, .press-badge, .pro-badge,
   .region-badge, .guide-caption, .media-caption and .pres-caption). */
.badge-illustrative {
  position: absolute;
  inset-block-end: var(--spacing-12);
  inset-inline-end: var(--spacing-12);
  margin: 0;
  padding: var(--spacing-2) var(--spacing-8);
  border-radius: var(--border-radius-4);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-12);
  line-height: var(--line-height-16);
  font-weight: var(--font-weight-medium);
}

/* ---------- Facts: the labelled rows of a record page (a vacancy, an act, a presentation, a service, an event) ----------
   A bordered card of rows, one column on a phone and label and value side by side from 768 px. */

.facts {
  display: grid;
  gap: var(--spacing-12);
  margin: var(--spacing-24) 0;
  padding: var(--spacing-24);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-12);
}

.facts div {
  display: grid;
  gap: var(--spacing-4);
}

.facts dt {
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.facts dd {
  margin: 0;
  font-weight: var(--font-weight-medium);
  overflow-wrap: anywhere;
}

.facts .field-paragraph {
  display: block;
}

@media (min-width: 768px) {
  .facts div,
  .place-facts:not(.place-facts-stacked) div {
    grid-template-columns: minmax(var(--size-10rem), var(--size-14rem)) 1fr;
    gap: var(--spacing-16);
  }

  /* the head of a record page with a figure: the text and the figure's column (a plain head stays one column) */
  .guide-head:not(.guide-head-plain),
  .learning-head:not(.learning-head-plain),
  .pres-head:not(.pres-head-plain) {
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--size-25rem));
    gap: var(--spacing-48);
  }
}

/* ---------- Section title: the h2 of a section of a landing or hub page (20/28 on a phone, 32/40 from 768 px) ---------- */

.section-title {
  margin: 0 0 var(--spacing-16);
  font-size: var(--font-size-32);
  line-height: var(--line-height-40);
  letter-spacing: var(--letter-spacing-h2);
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .section-title {
    font-size: var(--font-size-20);
    line-height: var(--line-height-28);
  }
}

/* ---------- Form group: a bordered fieldset of a public form with its legend (an event proposal, a request) ---------- */

.form-group {
  min-width: 0;
  margin: 0;
  padding: var(--spacing-24);
  border: var(--border-width-1) solid var(--color-border-base-default);
  border-radius: var(--border-radius-12);
}

.form-group > legend {
  padding-inline: var(--spacing-8);
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 767.98px) {
  .form-group {
    padding: var(--spacing-16);
  }
}

/* ---------- Disclosure: the one content <details> (M4-DISCLOSURE, CC-8, MO-4) ----------
   Dev04's accordion row, chosen over the boxed one with a chevron: a bordered row whose summary is at least 48 px high
   and set in 20/28 600, with a plus that turns into a minus at its end. Used by details.route-disclosure,
   details.season-confirm, the sections of a sustainability practice and of an export guide, the blocks of a region and the
   wineries of a region on the map (every <details> of <main> but details.more-filters). It is the native <details>: the summary opens it by
   keyboard and pointer and the open attribute carries the state. The icon is two bars (no image): the horizontal one
   stays, the vertical one turns a quarter over --motion-duration-fast and lies over it, so the plus becomes a minus. */

.disclosure {
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-8);
  background: var(--color-surface);
}

.disclosure > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  padding: var(--spacing-12) var(--spacing-48) var(--spacing-12) var(--spacing-16);
  cursor: pointer;
  list-style: none;
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
  font-weight: var(--font-weight-semibold);
  overflow-wrap: anywhere;
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary::before,
.disclosure > summary::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--spacing-16);
  width: var(--size-1rem);
  height: var(--border-width-2);
  margin-block-start: calc(var(--border-width-2) / -2);
  background: var(--color-action);
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.disclosure > summary::after {
  transform: rotate(90deg);
}

.disclosure[open] > summary::after {
  transform: rotate(180deg);
}

/* A summary that holds a heading (the h2 of the practice and guide sections) keeps the heading as the summary's text:
   the heading is set in the summary's own 20/28 600 and has no margin of its own. */
.disclosure > summary > :is(h2, h3) {
  margin: 0;
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
  font-weight: var(--font-weight-semibold);
  letter-spacing: normal;
  text-wrap: auto;
}

/* The content below the summary: one padding for every disclosure */
.disclosure > :not(summary) {
  padding: 0 var(--spacing-16) var(--spacing-16);
}

/* The reveal of the content (MO-4): its height and opacity change over --motion-duration-base on opening and
   --motion-duration-fast on closing, through ::details-content with interpolate-size: allow-keywords. A browser
   without them opens and closes at once, as <details> does. The content stays rendered while it closes
   (content-visibility changes discretely) and the clip keeps the box from showing it before it has height. Under
   reduced motion the two durations are 0 (tokens.css). */
@supports (interpolate-size: allow-keywords) and selector(::details-content) {
  :is(.disclosure, .more-filters) {
    interpolate-size: allow-keywords;
  }

  :is(.disclosure, .more-filters)::details-content {
    height: 0;
    opacity: 0;
    overflow: clip;
    transition:
      height var(--motion-duration-fast) var(--motion-easing-standard),
      opacity var(--motion-duration-fast) var(--motion-easing-standard),
      content-visibility var(--motion-duration-fast) var(--motion-easing-standard) allow-discrete;
  }

  :is(.disclosure, .more-filters)[open]::details-content {
    height: auto;
    opacity: 1;
    transition:
      height var(--motion-duration-base) var(--motion-easing-standard),
      opacity var(--motion-duration-base) var(--motion-easing-standard),
      content-visibility var(--motion-duration-base) var(--motion-easing-standard) allow-discrete;
  }

  /* The fields of 'Mai multe filtre' keep their focus ring at the edge of the clip */
  .more-filters::details-content {
    overflow-clip-margin: var(--spacing-8);
  }
}

/* ---------- Image fade-in (M4-IMAGES, MO-6) ----------
   An image with data-fade fades from opacity 0 to 1 over --motion-duration-base once it has loaded (js/image-fade.js
   adds .is-loaded), and its caption shows with it. Only where the script runs (html.js): without JavaScript every image
   and caption shows at once. Under reduced motion the image shows at once (the token is 0 ms there). */

.js img[data-fade] {
  opacity: 0;
  transition: opacity var(--motion-duration-base) var(--motion-easing-standard);
}

.js img[data-fade].is-loaded {
  opacity: 1;
}

.js img[data-fade] ~ :is(.figure-caption, .badge-illustrative, figcaption),
.js .hero:has(> img[data-fade]) .badge-illustrative {
  transition: opacity var(--motion-duration-base) var(--motion-easing-standard);
}

.js img[data-fade]:not(.is-loaded) ~ :is(.figure-caption, .badge-illustrative, figcaption),
.js .hero:has(> img[data-fade]:not(.is-loaded)) .badge-illustrative {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js img[data-fade] {
    opacity: 1;
    transition: none;
  }

  .js img[data-fade] ~ :is(.figure-caption, .badge-illustrative, figcaption),
  .js .hero:has(> img[data-fade]) .badge-illustrative {
    transition: none;
  }
}

/* ---------- Live status: one region of a page, read by screen readers, not seen ---------- */

#live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: calc(var(--border-width-1) * -1);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Next-event block: image, eyebrow, title, dates, countdown, note, call to action ----------
 * Design "1 Portal public" and "04.3": a card of two halves on desktop, the image on the left; stacked from
 * 1023 px down. White on a band; .tinted gives its text side the band's colour on a white page (home). */

.next-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-16);
  background: var(--color-surface);
}

.next-event-media {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-background-placeholder);
}

.next-event-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-action);
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
  text-align: center;
  text-transform: uppercase;
}

.next-event-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: var(--spacing-24);
}

.next-event.tinted .next-event-body {
  background: var(--color-background-band);
}

.next-event .eyebrow {
  margin-bottom: var(--spacing-4);
}

.next-event-title {
  margin: 0 0 var(--spacing-12);
  font-size: var(--font-size-32);
  line-height: var(--line-height-40);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-h2);
  overflow-wrap: anywhere;
}

.next-event-dates {
  margin: 0 0 var(--spacing-8);
  color: var(--color-text);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.next-event-countdown {
  margin: 0 0 var(--spacing-4);
  color: var(--color-action);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-medium);
}

.next-event-note {
  margin: 0 0 var(--spacing-20);
  color: var(--color-text-secondary);
  font-size: var(--font-size-12);
  line-height: var(--line-height-16);
}

.next-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
}

@media (max-width: 767.98px) {
  .next-event-title {
    font-size: var(--font-size-20);
    line-height: var(--line-height-28);
  }
}

@media (min-width: 1024px) {
  .next-event {
    grid-template-columns: minmax(0, 587fr) minmax(0, 613fr);
    min-height: var(--size-330px);
  }

  .next-event-media {
    aspect-ratio: auto;
    min-height: var(--size-330px);
  }

  .next-event-body {
    padding: var(--spacing-48);
  }
}

/* ---------- The part Files and the official link (M2-KIT) ---------- */

/* One row per file: Denumire · Format · Mărime · Limbă · Descarcă. A phone sees each row as a card of labelled lines. */
.files-table,
.annual-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
}

.files-table th,
.files-table td {
  padding: var(--spacing-12) var(--spacing-16);
  border-bottom: var(--border-width-1) solid var(--color-border);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.files-table thead th,
.annual-table thead th {
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-semibold);
  border-bottom-color: var(--color-border-base-tertiary);
}

.files-table tbody th {
  font-weight: var(--font-weight-medium);
}

.files-table .files-download {
  text-align: right;
}

.files-alternative {
  margin: var(--spacing-16) 0 0;
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

@media (max-width: 639.98px) {
  .files-table,
  .files-table tbody,
  .files-table tr,
  .files-table th,
  .files-table td {
    display: block;
  }

  .files-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .files-table tbody tr {
    padding: var(--spacing-16);
    margin-bottom: var(--spacing-16);
    border: var(--border-width-1) solid var(--color-border);
    border-radius: var(--border-radius-8);
  }

  .files-table th,
  .files-table td {
    display: flex;
    gap: var(--spacing-8);
    padding: var(--spacing-4) 0;
    border-bottom: 0;
  }

  .files-table td[data-label]::before,
  .files-table th[data-label]::before {
    content: attr(data-label);
    flex: 0 0 var(--size-6rem);
    font-size: var(--font-size-14);
    color: var(--color-text-secondary);
  }

  .files-table .files-download {
    padding-top: var(--spacing-12);
    text-align: left;
  }
}

/* OfficialLink: 'confirmat' is a link with the external-site cue; 'de confirmat' is text with the mark and no href. */
.official-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-4) var(--spacing-8);
}

.official-link__destination {
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* ---------- Hub cards: a landing's cards generated from its menu node (M1-ABOUT, M2-NAV, Views/Shared/_HubCards) ---------- */

.landing-hub {
  margin-top: var(--spacing-48);
}

/* One column under 768 px, two from 768, three from 1024 (M1-DESIGN) */
.hub-grid {
  display: grid;
  gap: var(--spacing-24);
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hub-card .card-body {
  gap: var(--spacing-8);
}

.hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--target-size);
  min-height: var(--target-size);
  margin-bottom: var(--spacing-8);
  border-radius: var(--border-radius-8);
  background: var(--color-background-action-active);
  color: var(--color-action);
}

.hub-card .card-title {
  font-weight: var(--font-weight-medium);
}

.hub-card .card-text {
  flex: 1;
  color: var(--color-text);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* The "Vezi detalii" of a card is the look of a button: the title link is the one target, stretched over the card */
.hub-more {
  align-self: flex-start;
  margin-top: var(--spacing-16);
}

.card:has(a.stretched:hover) .hub-more {
  background: var(--color-background-action-hover);
}

/* ---------- Public forms (M2-SUBMIT): the required note, the honeypot, the receipt ---------- */

.form-narrow {
  max-width: var(--size-45rem);
}

.form-required-note {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

/* The honeypot: off the screen, out of the tab order and hidden from assistive technology; a person never fills it */
.form-honeypot {
  position: absolute;
  left: var(--offscreen-offset);
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.field-check .field-error,
.field-check .field-hint {
  padding-inline-start: calc(var(--size-1-5rem) + var(--spacing-12));
}

.receipt {
  max-width: var(--size-45rem);
  margin-block: var(--spacing-24);
}

.receipt__notice {
  border-color: var(--color-border-positive-secondary);
  background: var(--color-background-positive-secondary);
}

.receipt__notice .notice-title {
  color: var(--color-text-positive-on-secondary);
}

.receipt__facts {
  display: grid;
  gap: var(--spacing-12);
  margin: var(--spacing-24) 0;
}

.receipt__facts > div {
  display: grid;
  grid-template-columns: minmax(var(--size-8rem), var(--size-12rem)) minmax(0, 1fr);
  gap: var(--spacing-16);
}

.receipt__facts dt {
  color: var(--color-text-secondary);
}

.receipt__facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.receipt__reference {
  font-size: var(--font-size-20);
  letter-spacing: var(--letter-spacing-wide);
}

/* "Ce urmează" stands at least a spacing token below the statement above it, on screen and on paper */
.receipt h3 {
  margin-top: var(--spacing-16);
}

.receipt__steps {
  padding-inline-start: var(--spacing-24);
}

.receipt__steps li + li {
  margin-top: var(--spacing-8);
}

@media (max-width: 479px) {
  .receipt__facts > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-4);
  }
}

/* The cue of a public link to the winery cabinet: a small lock and "(necesită autentificare)" after the link's text
   (M3-WINERY-ACCESS, WADM1). The cue wraps with the text, so nothing is cut off at 320 px. */
.cabinet-lock {
  display: inline-block;
  width: var(--size-1em);
  height: var(--size-1em);
  margin-inline: var(--spacing-4);
  vertical-align: var(--icon-baseline-shift);
}

.cabinet-cue {
  font-weight: 400;
  overflow-wrap: anywhere;
}
