/* ============================================================
   KoFi Tech — esg.css (v1)
   The sustainability and governance document library at /tvarumas.

   Loaded only by tvarumas.php, so the main stylesheet's cache is untouched.

   Design notes, because two of these are deliberate and look like mistakes:

   1. NO SEAL, BADGE OR MEDAL GRAPHIC ANYWHERE. These 13 documents are
      self-authored and self-approved. A circular seal next to one would read as
      third-party accreditation that does not exist. Under the Empowering
      Consumers Directive (EU 2024/825, applying 27 Sept 2026) a sustainability
      label with no independent verifier is banned outright. The only icons here
      are four flat category markers for the pillars — wayfinding, not credentials.

   2. The pillar icon is a hairline glyph at the same 1.5 stroke as the rest of
      the site's content icons, in --ink-caption, NOT in brass. Brass is reserved
      on this page for one thing: a link that leaves for an independently hosted
      source. Self-authored content never wears the accent colour, so a reader can
      tell at a glance which claims we verify ourselves and which someone else does.
   ============================================================ */

.esg-page .section-intro { margin-bottom: var(--s-5); }

/* ── Disclosure ───────────────────────────────────────────── */
/* Stated up front rather than in a footnote. The honesty IS the trust signal;
   burying it would be the thing that makes the page look like it is hiding. */
.esg-disclosure {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4) var(--s-5);
  margin: 0 0 var(--s-7);
  background: var(--elev-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--ink-body);
}
.esg-disclosure svg { flex: none; margin-top: 2px; color: var(--ink-caption); }
.esg-disclosure strong { color: var(--ink-headline); font-weight: 600; }

/* ── Pillar sections ──────────────────────────────────────── */
.esg-pillar { margin-bottom: var(--s-8); }
.esg-pillar:last-of-type { margin-bottom: var(--s-7); }

.esg-pillar-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  margin: 0 0 var(--s-2);
  border-bottom: 1px solid var(--border);
}
.esg-pillar-head svg { flex: none; color: var(--ink-caption); }
.esg-pillar-head h2 {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.2;
}
/* Tabular count sits at the far right of the rule, so the four sections line up. */
.esg-pillar-count {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-caption);
}
.esg-pillar-note {
  margin: 0 0 var(--s-4);
  font-size: var(--step--1);
  color: var(--ink-caption);
}

/* ── Document rows ────────────────────────────────────────── */
.esg-list { list-style: none; margin: 0; padding: 0; }

.esg-row + .esg-row { border-top: 1px solid var(--border-soft); }

.esg-open {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto auto;
  align-items: baseline;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-3);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.esg-open:hover,
.esg-open:focus-visible { background: var(--elev-1); }
.esg-open:hover .esg-title { color: var(--ink-headline); }
.esg-open:hover .esg-go { transform: translateX(2px); opacity: 1; }

/* The document code is the credibility detail: a real internal reference number,
   monospaced-by-tabular-figures so ESG-1 and OVT-1 align down the column. */
.esg-code {
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  color: var(--ink-caption);
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  justify-self: start;
  white-space: nowrap;
}

.esg-titles { min-width: 0; }
.esg-title {
  display: block;
  font-size: var(--step-0);
  line-height: 1.35;
  color: var(--ink-body);
  transition: color .15s ease;
}
/* The Lithuanian title is shown under the English one rather than behind a toggle.
   Lithuanian is the prevailing text on every one of these documents, so hiding it
   would misrepresent which version governs. */
.esg-title-lt {
  display: block;
  margin-top: 2px;
  font-size: var(--step--1);
  line-height: 1.35;
  color: var(--ink-caption);
}

.esg-date {
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  color: var(--ink-caption);
  white-space: nowrap;
}
.esg-go {
  color: var(--ink-caption);
  opacity: .6;
  transition: transform .15s ease, opacity .15s ease;
}

@media (max-width: 640px) {
  .esg-open {
    grid-template-columns: 1fr auto;
    gap: var(--s-2) var(--s-3);
    padding: var(--s-4) var(--s-2);
  }
  .esg-code { grid-row: 1; grid-column: 1; }
  .esg-go   { grid-row: 1; grid-column: 2; align-self: center; }
  .esg-titles { grid-row: 2; grid-column: 1 / -1; }
  .esg-date { grid-row: 3; grid-column: 1 / -1; }
}

/* ── External source ──────────────────────────────────────── */
/* Brass appears here and nowhere else on the page: this is the one block whose
   claim is hosted somewhere we do not control and a reader can check. */
.esg-external {
  padding: var(--s-5);
  border: 1px solid var(--brass-line);
  border-radius: 6px;
  background: var(--brass-soft);
}
.esg-external h2 { margin: 0 0 var(--s-2); font-size: var(--step-1); }
.esg-external p { margin: 0 0 var(--s-3); font-size: var(--step--1); color: var(--ink-body); }
.esg-external p:last-child { margin-bottom: 0; }
.esg-external a { color: var(--brass-lt); }

/* ── Document viewer ──────────────────────────────────────── */
/* Two layers on purpose.
   Without JS: every document is in the DOM, hidden, and :target reveals it in
   place — so the links work, and crawlers and language models read all 13.
   With JS: the same node is shown in a <dialog> instead.
   No PDF is served from this site at all, so there is no file to download. What
   this does NOT do is stop anyone copying the text, and nothing browser-side
   could. These documents are published to be read; confidentiality is not the goal. */

.esg-doc {
  display: none;
  max-width: 100%;
}
.esg-doc:target { display: block; }

/* Once the dialog is running, :target must stop revealing documents inline or a
   deep link would render the document twice. */
.js .esg-doc:target { display: none; }
.js .esg-dialog .esg-doc { display: block; }

.esg-docs-fallback {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.js .esg-docs-fallback { border-top: 0; padding-top: 0; margin-top: 0; }
.esg-docs-fallback > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.esg-dialog {
  width: min(58rem, calc(100vw - 2rem));
  max-height: min(86vh, 60rem);
  padding: 0;
  /* The site's global `* { margin: 0 }` reset wipes out the UA's `margin: auto`,
     which is what centres a modal <dialog>. Without this it renders top-left. */
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--elev-1);
  color: var(--ink-body);
  overflow: hidden;
}
.esg-dialog::backdrop { background: rgba(6, 11, 20, .78); }

.esg-dialog-bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  background: var(--elev-1);
}
.esg-dialog-code {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-caption);
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.esg-dialog-title {
  margin: 0;
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--ink-headline);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Language switch. Both versions are always in the DOM; this only changes which
   one is on screen, so the Lithuanian text is never actually removed. */
.esg-langs { margin-left: auto; display: flex; gap: 2px; flex: none; }
.esg-lang {
  font: inherit;
  font-size: var(--step--2);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  min-height: 32px;
  background: transparent;
  color: var(--ink-caption);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.esg-lang[aria-pressed="true"] { background: var(--elev-2); color: var(--ink-headline); }

.esg-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  background: transparent;
  color: var(--ink-caption);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.esg-close:hover { color: var(--ink-headline); background: var(--elev-2); }

.esg-dialog-body {
  padding: var(--s-6) var(--s-5) var(--s-7);
  overflow-y: auto;
  max-height: calc(min(86vh, 60rem) - 69px);
  -webkit-overflow-scrolling: touch;
}

/* ── Document typography ──────────────────────────────────── */
/* The source documents are laid out for A4 print in Times New Roman. On screen
   they take the site's own type, at a measure that holds a numbered clause. */
.esg-version { max-width: 40rem; margin: 0 auto; }
.js .esg-version[hidden] { display: none; }

.esg-version .lang {
  font-size: var(--step--2);
  color: var(--ink-caption);
  margin: 0 0 var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-soft);
}
.esg-version .co { font-size: var(--step--2); color: var(--ink-caption); margin: 0 0 var(--s-2); }
.esg-version h3 {
  font-size: var(--step-2);
  line-height: 1.22;
  margin: 0 0 var(--s-4);
  color: var(--ink-headline);
}
.esg-version .meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding-bottom: var(--s-4);
  margin: 0 0 var(--s-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  color: var(--ink-caption);
}
.esg-version h4 {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-headline);
  margin: var(--s-6) 0 var(--s-3);
}
.esg-version p { margin: 0 0 var(--s-3); font-size: var(--step--1); line-height: 1.65; }
/* Hanging indent on numbered clauses: "4.6." sits in the margin and the wrapped
   lines align under the sentence, the way the filed document reads. */
.esg-version p.n { padding-left: 2.6em; text-indent: -2.6em; }
.esg-version ul { margin: 0 0 var(--s-4); padding-left: 1.4em; }
.esg-version li { margin-bottom: var(--s-2); font-size: var(--step--1); line-height: 1.6; }

.esg-version table.t {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-3) 0 var(--s-5);
  font-size: var(--step--2);
}
.esg-version table.t th,
.esg-version table.t td {
  border: 1px solid var(--border);
  padding: var(--s-2) var(--s-3);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.esg-version table.t th { background: var(--elev-2); color: var(--ink-headline); font-weight: 600; }

.esg-approval {
  margin: var(--s-6) 0 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  font-size: var(--step--2);
  line-height: 1.55;
  color: var(--ink-caption);
}

@media (max-width: 640px) {
  .esg-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; border: 0; }
  .esg-dialog-body { max-height: calc(100vh - 69px); padding: var(--s-5) var(--s-4) var(--s-7); }
  .esg-dialog-title { display: none; }
  /* A wide clause table must not force the whole document to scroll sideways. */
  .esg-version table.t { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .esg-open, .esg-go { transition: none; }
}
