/* Consent UI, legal footer and legal pages.
   Tokens mirror the built Tailwind theme so this file stays independent of the
   content-hashed bundle name, which changes on every build. */

:root {
  --ngya-bg: #060b0e;
  --ngya-fg: #f7f3f0;
  --ngya-accent: #e60012;
  --ngya-accent-dark: #c50010;
  --ngya-page-px: 16px;
  --ngya-sans: var(--font-sans, "generalSans", system-ui, sans-serif);
  --ngya-mono: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
}

@media (min-width: 48rem) {
  :root { --ngya-page-px: 32px; }
}
@media (min-width: 64rem) {
  :root { --ngya-page-px: 48px; }
}

/* Focus must stay visible everywhere: the accent red on the near-black
   background clears WCAG 1.4.11 non-text contrast. */
.ngya-consent :is(a, button, input):focus-visible,
.ngya-footer :is(a, button):focus-visible,
.ngya-legal :is(a, button):focus-visible {
  outline: 2px solid var(--ngya-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------------ banner */

.ngya-consent {
  color: var(--ngya-fg);
  background: var(--ngya-bg);
  border: 1px solid rgb(247 243 240 / 0.18);
  border-radius: 4px;
  padding: clamp(1.25rem, 4vw, 2rem);
  width: min(46rem, calc(100vw - 2 * var(--ngya-page-px)));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  margin: auto;
  font-family: var(--ngya-sans);
}

/* First-visit variant: docked, non-blocking, no backdrop. */
.ngya-consent.ngya-consent--bar {
  position: fixed;
  inset: auto var(--ngya-page-px) var(--ngya-page-px) auto;
  margin: 0;
  width: min(26rem, calc(100vw - 2 * var(--ngya-page-px)));
  padding: 1.25rem;
  z-index: 60;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.5);
}

.ngya-consent--bar .ngya-consent__title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.ngya-consent--bar .ngya-consent__text {
  font-size: 0.8125rem;
}

.ngya-consent--bar .ngya-consent__options,
.ngya-consent--bar .ngya-consent__btn--quiet {
  display: none;
}

/* Phones: a slim strip pinned to the bottom so it never covers the page copy.
   Both buttons keep identical size (ANSPDCP: refusal as easy as acceptance). */
@media (max-width: 40rem) {
  .ngya-consent.ngya-consent--bar {
    inset: auto 0 0 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
    border-width: 1px 0 0;
    padding: 0.875rem var(--ngya-page-px) calc(0.875rem + env(safe-area-inset-bottom));
  }
  .ngya-consent--bar .ngya-consent__title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  /* Accepting now switches on Google Analytics, so the sentence saying so stays visible. */
  .ngya-consent--bar .ngya-consent__text {
    font-size: 0.75rem;
    line-height: 1.45;
    margin: 0 0 0.5rem;
  }
  .ngya-consent--bar .ngya-consent__links {
    margin-bottom: 0.625rem;
  }
  .ngya-consent--bar .ngya-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

.ngya-consent::backdrop {
  background: rgb(6 11 14 / 0.72);
}

.ngya-consent__title {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

.ngya-consent__text {
  margin: 0 0 0.75rem;
  line-height: 1.6;
  /* 0.72 alpha on #f7f3f0 over #060b0e stays above 4.5:1. */
  color: rgb(247 243 240 / 0.72);
  font-size: 0.9375rem;
}

.ngya-consent__links {
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1.25rem;
}

.ngya-consent__links a,
.ngya-legal a {
  color: var(--ngya-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ngya-consent__links a:hover,
.ngya-legal a:hover {
  color: var(--ngya-accent);
}

.ngya-consent__options {
  display: grid;
  gap: 0.875rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(247 243 240 / 0.12);
  border-bottom: 1px solid rgb(247 243 240 / 0.12);
  margin-bottom: 1.25rem;
}

.ngya-consent__option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

.ngya-consent__option input {
  /* 18px keeps the hit target usable without a custom control. */
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  accent-color: var(--ngya-accent);
}

.ngya-consent__option input:disabled {
  opacity: 0.55;
}

.ngya-consent__option-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.ngya-consent__option-note {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgb(247 243 240 / 0.6);
}

.ngya-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Accept and reject share this class verbatim. ANSPDCP treats a refusal that is
   smaller, greyer or one level deeper than acceptance as invalid consent, so
   any style added here must apply to both. */
.ngya-consent__btn {
  flex: 1 1 12rem;
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.875rem 1.25rem;
  background: var(--ngya-fg);
  color: var(--ngya-bg);
  border: 1px solid var(--ngya-fg);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.ngya-consent__btn:hover {
  background: var(--ngya-accent);
  border-color: var(--ngya-accent);
  color: var(--ngya-fg);
}

/* "Save my selection" is a third path, not a rejection - it may be quieter. */
.ngya-consent__btn--quiet {
  background: transparent;
  color: var(--ngya-fg);
  border-color: rgb(247 243 240 / 0.35);
}

/* ------------------------------------------------------------------ footer
   Same footer as the Next.js pages, rendered statically on the legal pages.
   Mirrors src/components/Footer.tsx in the site source. */

.ngya-footer {
  position: relative;
  z-index: 10;
  background: var(--ngya-bg);
  color: var(--ngya-fg);
  padding: 3rem var(--ngya-page-px) 1.5rem;
  border-top: 1px solid rgb(247 243 240 / 0.1);
}

.ngya-footer a,
.ngya-footer button,
.ngya-footer p,
.ngya-footer h3 {
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.ngya-footer a,
.ngya-footer button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  min-width: 2.75rem; /* Round 25l: short words ("Join", "RO") are 44 px wide too */
  color: rgb(247 243 240 / 0.6);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.ngya-footer a:hover,
.ngya-footer button:hover { color: var(--ngya-fg); }

.ngya-footer ul { margin: 0; padding: 0; list-style: none; }
.ngya-footer h3 { color: var(--ngya-fg); margin-bottom: 0.5rem; }
.ngya-footer__top { display: flex; flex-direction: column; gap: 2.5rem; }
.ngya-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.ngya-footer__brand img { height: 5rem; width: auto; }
.ngya-footer__brand p { color: rgb(247 243 240 / 0.6); max-width: 20rem; line-height: 1.6; }
.ngya-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
.ngya-footer__legal { grid-column: span 2; }
.ngya-footer__tag {
  font-size: 10px; line-height: 1; letter-spacing: 0.08em;
  border: 1px solid rgb(247 243 240 / 0.3); padding: 0.125rem 0.25rem;
}
.ngya-footer__bottom {
  margin-top: 2.5rem; padding-top: 1rem;
  border-top: 1px solid rgb(247 243 240 / 0.1);
  display: flex; flex-direction: column; gap: 0.25rem;
  font-family: var(--ngya-mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgb(247 243 240 / 0.6);
}
.ngya-footer__bottom p { padding: 0; min-height: 0; }
.ngya-footer__lang { display: flex; align-items: center; flex-wrap: wrap; }
.ngya-footer__note { margin-left: 0.5rem; opacity: 0.85; font-size: 0.85em; }
.ngya-footer__lang a, .ngya-footer__lang span[aria-current] { padding: 0 0.25rem; justify-content: center; }
.ngya-footer__lang span[aria-current] {
  display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ngya-fg);
}

@media (min-width: 40rem) {
  .ngya-footer__cols { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .ngya-footer__legal { grid-column: auto; }
  .ngya-footer a, .ngya-footer button { min-height: 0; min-width: 0; padding: 0.25rem 0; }
  .ngya-footer__lang span[aria-current] { min-height: 0; }
  .ngya-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 64rem) {
  .ngya-footer { padding-top: 3.5rem; }
  .ngya-footer__top { display: grid; grid-template-columns: 2fr 3fr; gap: 4rem; }
  .ngya-footer__cols { column-gap: 3rem; }
}

/* -------------------------------------------------------------- form notice */

.ngya-form-notice {
  border-left: 3px solid var(--ngya-accent);
  background: rgb(230 0 18 / 0.08);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

.ngya-form-notice p {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgb(247 243 240 / 0.85);
}

.ngya-form-notice p:last-child {
  margin-bottom: 0;
  color: rgb(247 243 240 / 0.6);
}

.ngya-form-notice a {
  color: var(--ngya-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------- legal documents */

.ngya-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ngya-fg);
  color: var(--ngya-bg);
  padding: 0.75rem 1.25rem;
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ngya-skip:focus {
  left: var(--ngya-page-px);
  top: 0.5rem;
}

.ngya-legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--ngya-page-px);
  border-bottom: 1px solid rgb(247 243 240 / 0.1);
}

.ngya-legal-header > a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ngya-fg);
  text-decoration: none;
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ngya-legal-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--ngya-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ngya-legal-header nav a {
  color: rgb(247 243 240 / 0.6);
  text-decoration: none;
}

.ngya-legal-header nav a:hover {
  color: var(--ngya-fg);
}

/* The accent red on the near-black background is only ~3.4:1, which fails
   WCAG 1.4.3 at this size. Mark the current page with full-contrast text and
   carry the accent in the underline, where 1.4.11's 3:1 threshold applies. */
.ngya-legal-header nav [aria-current="page"] {
  color: var(--ngya-fg);
  border-bottom: 2px solid var(--ngya-accent);
  padding-bottom: 2px;
}

.ngya-legal {
  flex: 1;
  width: 100%;
  /* ~70 characters per line: the readable measure for long legal prose. */
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem var(--ngya-page-px) 4rem;
  font-family: var(--ngya-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: rgb(247 243 240 / 0.82);
}

.ngya-legal__eyebrow,
.ngya-legal__version {
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(247 243 240 / 0.5);
  margin: 0 0 0.75rem;
}

.ngya-legal h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--ngya-fg);
  margin: 0 0 1rem;
}

.ngya-legal__lede {
  font-size: 1.0625rem;
  color: rgb(247 243 240 / 0.7);
  margin: 0 0 1rem;
}

.ngya-legal__version {
  margin: 0 0 2rem;
}

.ngya-legal h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ngya-fg);
  margin: 2.75rem 0 0.875rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(247 243 240 / 0.12);
}

.ngya-legal h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ngya-fg);
  margin: 1.75rem 0 0.5rem;
}

.ngya-legal p { margin: 0 0 1rem; }
.ngya-legal ul,
.ngya-legal ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.ngya-legal li { margin-bottom: 0.5rem; }
.ngya-legal strong { color: var(--ngya-fg); font-weight: 600; }

.ngya-legal code {
  font-family: var(--ngya-mono);
  font-size: 0.85em;
  background: rgb(247 243 240 / 0.08);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.ngya-legal blockquote {
  margin: 0 0 1rem;
  padding: 0.875rem 1.25rem;
  border-left: 3px solid rgb(247 243 240 / 0.3);
  background: rgb(247 243 240 / 0.04);
  font-style: italic;
}

/* Table of contents */
.ngya-legal__toc {
  border: 1px solid rgb(247 243 240 / 0.15);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.ngya-legal__toc h2 {
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  font-size: 0.75rem;
  font-family: var(--ngya-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(247 243 240 / 0.5);
}

.ngya-legal__toc ol { margin: 0; padding-left: 1.1rem; }
.ngya-legal__toc li { margin-bottom: 0.3rem; font-size: 0.9375rem; }

/* The plain-language summary required by GDPR Art. 12(1). Given visual weight
   because for a 16-year-old reader it is the part that actually gets read. */
.ngya-legal__plain {
  border: 1px solid rgb(230 0 18 / 0.4);
  background: rgb(230 0 18 / 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.ngya-legal__plain h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Unreviewed passages. Loud on purpose - these must not reach production
   unnoticed, and the lawyer should be able to find them by scrolling. */
.ngya-legal__todo {
  display: inline-block;
  background: rgb(230 0 18 / 0.16);
  border: 1px dashed var(--ngya-accent);
  color: var(--ngya-fg);
  padding: 0.35rem 0.6rem;
  margin: 0.2rem 0;
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.ngya-legal__review {
  border-left: 3px solid var(--ngya-accent);
  background: rgb(230 0 18 / 0.08);
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  font-size: 0.9375rem;
}

.ngya-legal__note {
  font-size: 0.875rem;
  color: rgb(247 243 240 / 0.6);
}

/* Tables: wide ones scroll in their own container so the page never does. */
.ngya-legal__scroll {
  overflow-x: auto;
  margin-bottom: 1rem;
  /* Keeps a focused cell from being clipped at the container edge. */
  padding: 2px;
}

.ngya-legal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.ngya-legal__table :is(th, td) {
  border: 1px solid rgb(247 243 240 / 0.15);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

/* nowrap only inside a scroll container, where the overflow is contained.
   On the bare key/value tables it pushed the whole page past 380px. */
.ngya-legal__scroll .ngya-legal__table thead th {
  white-space: nowrap;
}

.ngya-legal__table thead th {
  background: rgb(247 243 240 / 0.06);
  color: var(--ngya-fg);
  font-weight: 500;
}

.ngya-legal__table tbody th {
  color: var(--ngya-fg);
  font-weight: 500;
}

/* Long unbroken tokens - e-mail addresses, registration numbers - must not be
   able to widen the table beyond the viewport. */
.ngya-legal__table td,
.ngya-legal__table th {
  overflow-wrap: anywhere;
}

.ngya-legal__rights dt {
  color: var(--ngya-fg);
  font-weight: 600;
  margin-top: 1rem;
}

.ngya-legal__rights dd { margin: 0.25rem 0 0; }

.ngya-legal__address {
  font-style: normal;
  border-left: 3px solid var(--ngya-accent);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.ngya-legal__download {
  display: inline-block;
  font-family: var(--ngya-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.875rem 1.25rem;
  background: var(--ngya-fg);
  color: var(--ngya-bg) !important;
  text-decoration: none !important;
}

.ngya-legal__download:hover {
  background: var(--ngya-accent);
  color: var(--ngya-fg) !important;
}

@media (prefers-reduced-motion: reduce) {
  .ngya-consent,
  .ngya-consent__btn {
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   Round 25l (S-015): tap targets of at least 44 × 44 px without changing the
   look. Small links that stand alone get an invisible hit layer centred on
   them; links alone in a table cell get vertical padding.
   --------------------------------------------------------------------------- */
.ngya-legal-header > a {
  min-height: 44px;
}

.ngya-legal-header nav a,
.ngya-consent__links a {
  position: relative;
}

.ngya-legal-header nav a::after,
.ngya-consent__links a::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}

.ngya-legal__table a {
  display: inline-block;
  padding-block: 13px;
  margin-block: -13px;
}

/* Round 25l (S-023): a wide table scrolls in its own box; a soft shade at the
   edge that has more to show says so. The two "local" layers cover the shade
   when that edge is reached (they scroll with the content). */
.ngya-legal__scroll {
  background:
    linear-gradient(to right, var(--ngya-bg) 30%, rgb(6 11 14 / 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--ngya-bg) 30%, rgb(6 11 14 / 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(247 243 240 / 0.22), rgb(247 243 240 / 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(247 243 240 / 0.22), rgb(247 243 240 / 0)) right center / 14px 100% no-repeat scroll;
  background-color: var(--ngya-bg);
}

/* ---------------------------------------------------------------------------
   Round 25l (S-014): print. Loaded on every page (harden.mjs injects this
   file), so one block covers the Next.js pages, the legal pages and
   /72-hours. White paper, dark text, the logo in black, no sticky header,
   cookie banner or menu, each link followed by its address, photos at most
   half the page wide. Nothing animated stays hidden or half-faded.
   --------------------------------------------------------------------------- */
@media print {
  @page {
    margin: 16mm 14mm;
  }

  html,
  body,
  body * {
    background: #fff !important;
    color: #111 !important;
    border-color: #bbb !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
  }

  /* A picture keeps no background: the logo's filter would turn a white one black. */
  body img,
  body picture,
  body svg {
    background: transparent !important;
  }

  body * {
    opacity: 1 !important;
    animation: none !important;
    transition: none !important;
  }

  [style*="transform"],
  [style*="opacity"] {
    transform: none !important;
  }

  /* The header prints as a plain logo at the top: no fixed bar, no menu, no switch. */
  header,
  .bar {
    position: static !important;
    height: auto !important;
  }

  header nav,
  header button,
  header a:not(:has(img)),
  .bar nav,
  .bar .lang,
  .ngya-skip,
  #ngya-consent-dialog,
  dialog,
  [aria-label="Open menu"],
  [aria-label="Close menu"],
  .ngy .nav,
  .tr-bar,
  .tr-play,
  audio,
  video {
    display: none !important;
  }

  /* The white logo files become black. */
  img[src*="logo"][src*="white"],
  img[src^="data:image/png"][class*="logo"],
  .brand img {
    filter: brightness(0) !important;
  }

  /* Each link followed by where it goes, in small text. Not for links that are a picture, or a jump within the page. */
  a[href]::after {
    position: static !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    font-size: 8pt;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    word-break: break-all;
  }

  a[href^="/"]::after {
    content: " (tinerilor.org" attr(href) ")";
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
  }

  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
  }

  a[href^="#"]::after,
  a:has(img)::after,
  a[href="/"]:has(img)::after {
    content: none !important;
  }

  /* Event photos: at most half a page wide, never split across pages. */
  main picture,
  main figure,
  main [class*="aspect-"] {
    display: block;
    max-width: 50% !important;
    break-inside: avoid;
  }

  main img {
    max-width: 100% !important;
    height: auto !important;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  .ngya-legal__scroll {
    overflow: visible !important;
  }
}

/* ---------------------------------------------------------------------------
   Round 25n (S-023, N-04): a label never breaks inside a word ("Contr / oller"
   at 320 px). overflow-wrap: anywhere let the label column shrink below its
   longest word; labels now wrap only between words. On a narrow screen the
   key/value tables (row headers, no scroll box) show each row stacked: the
   label on its own line above the value.
   --------------------------------------------------------------------------- */
.ngya-legal__table th {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

@media (max-width: 30rem) {
  .ngya-legal__table:has(tbody th[scope="row"]):not(:has(thead)) :is(tbody, tr, th, td) {
    display: block;
  }
  .ngya-legal__table:has(tbody th[scope="row"]):not(:has(thead)) tr {
    border: 1px solid rgb(247 243 240 / 0.15);
    border-bottom: 0;
  }
  .ngya-legal__table:has(tbody th[scope="row"]):not(:has(thead)) tr:last-child {
    border-bottom: 1px solid rgb(247 243 240 / 0.15);
  }
  .ngya-legal__table:has(tbody th[scope="row"]):not(:has(thead)) :is(th, td) {
    border: 0;
  }
  .ngya-legal__table:has(tbody th[scope="row"]):not(:has(thead)) th {
    padding-bottom: 0;
    font-size: 0.75rem;
    font-family: var(--ngya-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgb(247 243 240 / 0.6);
  }
  .ngya-legal__table:has(tbody th[scope="row"]):not(:has(thead)) td {
    padding-top: 0.25rem;
  }
}

/* Round 25n (S-015): the contents list on the Romanian privacy notice is a
   list of links, so each line is a full 44 px row; and the link to the
   Romanian notice in the English version's banner gets a 44 px hit area. */
.ngya-legal__toc li { margin-bottom: 0; }
.ngya-legal__toc li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* Screen only: in print, a::after carries the link's address. */
@media screen {
  .ngya-legal__review a[data-tap] {
    position: relative;
    display: inline-block;
  }
  .ngya-legal__review a[data-tap]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }
}
