/* Trilogue (trilogue.online): EU lawmaking as the four-column document.
   Commission = ink, Parliament = indigo, Council = amber. Reuleaux triangles, triptych splits,
   soft 10px cards with cool indigo shadows. Loaded only on this title; every class is prefixed trilogue-. */

#site-root[data-site="trilogue"] {
  --tri-ink: #121218;
  --tri-ind: #3a32d6;
  --tri-amb: #f2a900;
}

/* ---------- cards, rules, hatch ---------- */
.trilogue-card { border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgba(58, 50, 214, .06), 0 8px 24px rgba(58, 50, 214, .06); }
.trilogue-card-line { border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.trilogue-hatch {
  background-color: #f3f2ff;
  background-image: repeating-linear-gradient(135deg, rgba(58, 50, 214, .075) 0 1px, transparent 1px 9px);
}
.trilogue-hatch-amb {
  background-color: #fff8e6;
  background-image: repeating-linear-gradient(135deg, rgba(242, 169, 0, .16) 0 1px, transparent 1px 9px);
}
/* The house divider: three short segments in ink, indigo and amber. */
.trilogue-rule {
  display: block; height: 3px; width: 66px; border-radius: 2px;
  background: linear-gradient(90deg, var(--tri-ink) 0 20px, transparent 20px 23px, var(--tri-ind) 23px 43px, transparent 43px 46px, var(--tri-amb) 46px 66px);
}
.trilogue-rule-long {
  display: block; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--tri-ink) 0 33.2%, transparent 33.2% 33.5%, var(--tri-ind) 33.5% 66.5%, transparent 66.5% 66.8%, var(--tri-amb) 66.8% 100%);
}

/* ---------- links ---------- */
.trilogue-link { text-decoration: underline; text-decoration-color: rgba(58, 50, 214, .3); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.trilogue-link:hover { text-decoration-color: var(--tri-ind); }
/* Headlines in cards: the indigo underline draws in on hover (30% first, then solid). */
.trilogue-hl { background-image: linear-gradient(var(--tri-ind), var(--tri-ind)); background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s cubic-bezier(.2, .7, .2, 1); padding-bottom: 1px; }
a:hover .trilogue-hl, a:focus-visible .trilogue-hl { background-size: 100% 2px; }

/* ---------- edge fades for horizontal scrollers ---------- */
.trilogue-fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
@media (min-width: 768px) { .trilogue-fade-md-off { -webkit-mask-image: none; mask-image: none; } }

/* ---------- live pulse: three dots that pulse in turn, merge into one (agreement), spring apart ---------- */
.trilogue-pulse { position: relative; display: inline-block; width: 14px; height: 12px; flex-shrink: 0; }
.trilogue-pulse i { position: absolute; width: 5px; height: 5px; border-radius: 50%; }
.trilogue-pulse i:nth-child(1) { left: 4.5px; top: 0; background: var(--tri-ink); animation: trilogue-pa 3.6s cubic-bezier(.5, 0, .3, 1) infinite; }
.trilogue-pulse i:nth-child(2) { left: 0; top: 7px; background: var(--tri-ind); animation: trilogue-pb 3.6s cubic-bezier(.5, 0, .3, 1) infinite; }
.trilogue-pulse i:nth-child(3) { left: 9px; top: 7px; background: var(--tri-amb); animation: trilogue-pc 3.6s cubic-bezier(.5, 0, .3, 1) infinite; }
.trilogue-pulse-on-ink i { box-shadow: 0 0 0 1.5px #fff; }
@keyframes trilogue-pa { 0%, 16%, 56%, 100% { transform: none; } 8% { transform: scale(1.5); } 68%, 80% { transform: translate(0, 4.6px) scale(1.15); } 90% { transform: translate(0, -.8px); } }
@keyframes trilogue-pb { 0%, 12%, 28%, 56%, 100% { transform: none; } 20% { transform: scale(1.5); } 68%, 80% { transform: translate(4.5px, -2.4px) scale(1.15); } 90% { transform: translate(-.7px, .4px); } }
@keyframes trilogue-pc { 0%, 24%, 40%, 56%, 100% { transform: none; } 32% { transform: scale(1.5); } 68%, 80% { transform: translate(-4.5px, -2.4px) scale(1.15); } 90% { transform: translate(.7px, .4px); } }

/* ---------- stage tracker: the dot travels to the current stage, then breathes ---------- */
.trilogue-runner { animation: trilogue-run 1.4s cubic-bezier(.2, .8, .2, 1) .2s backwards; }
.trilogue-runner::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: .35; animation: trilogue-breathe 2.4s ease-in-out 1.6s infinite; }
.trilogue-track-fill { animation: trilogue-grow 1.4s cubic-bezier(.2, .8, .2, 1) .2s backwards; transform-origin: left center; }
@keyframes trilogue-run { from { left: 0; } }
@keyframes trilogue-grow { from { transform: scaleX(0); } }
@keyframes trilogue-breathe { 0%, 100% { transform: scale(.8); opacity: .45; } 50% { transform: scale(1.25); opacity: .1; } }

/* ---------- triptych hero: one photo cut into three rounded panels ---------- */
.trilogue-trip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.trilogue-trip > span { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface); }
.trilogue-trip > span > img { position: absolute; top: 0; height: 100%; width: calc(300% + 12px); max-width: none; object-fit: cover; }
.trilogue-trip > span:nth-child(1) > img { left: 0; }
.trilogue-trip > span:nth-child(2) > img { left: calc(-100% - 6px); }
.trilogue-trip > span:nth-child(3) > img { left: calc(-200% - 12px); }
.trilogue-trip > span:nth-child(2) { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.trilogue-trip:hover > span:nth-child(2) { transform: translateY(-4px); }

/* ---------- menu sheet ---------- */
.trilogue-sheet { animation: trilogue-up .32s cubic-bezier(.2, .8, .2, 1); }
.trilogue-scrim { animation: trilogue-fadein .25s ease-out; }
@keyframes trilogue-up { from { transform: translateY(24px); } }
@keyframes trilogue-fadein { from { opacity: .4; } }

/* ---------- article body ---------- */
.trilogue-body { counter-reset: trilogue-art 1; }
.trilogue-prose { font-size: 17px; line-height: 1.65; color: var(--fg); }
@media (min-width: 768px) { .trilogue-prose { font-size: 18px; line-height: 1.68; } }
.trilogue-prose > * + * { margin-top: 1.15em; }
.trilogue-prose p { overflow-wrap: break-word; }
.trilogue-lead > p:first-child::before {
  content: 'Art. 1 \2014\00a0'; font-family: var(--f-mono), ui-monospace, monospace; font-weight: 600; font-size: .86em; color: var(--tri-ind); letter-spacing: -.01em;
}
.trilogue-prose h2 {
  counter-increment: trilogue-art; scroll-margin-top: 80px;
  font-family: var(--font-head), system-ui, sans-serif; font-weight: 600; font-size: 1.4rem; line-height: 1.2; letter-spacing: -.005em;
  margin-top: 2.1em; padding-top: 1.1em; border-top: 1px solid var(--line); position: relative;
  display: flow-root; /* its rule stops at a floated figure instead of running under the photo */
}
.trilogue-prose h2::before {
  content: 'Art. ' counter(trilogue-art); display: block; margin-bottom: .45em;
  font-family: var(--f-mono), ui-monospace, monospace; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--tri-ind);
}
.trilogue-prose h2::after {
  content: ''; position: absolute; top: -2px; left: 0; height: 3px; width: 66px; border-radius: 2px;
  background: linear-gradient(90deg, var(--tri-ink) 0 20px, transparent 20px 23px, var(--tri-ind) 23px 43px, transparent 43px 46px, var(--tri-amb) 46px 66px);
}
@media (min-width: 768px) { .trilogue-prose h2 { font-size: 1.6rem; } }
.trilogue-prose a { text-decoration: underline; text-decoration-color: rgba(58, 50, 214, .3); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.trilogue-prose a:hover { text-decoration-color: var(--tri-ind); }
.trilogue-prose strong { font-weight: 600; }
.trilogue-prose ul, .trilogue-prose ol { padding-left: 0; list-style: none; }
.trilogue-prose ul > li, .trilogue-prose ol > li { position: relative; padding-left: 1.55em; }
.trilogue-prose ul > li + li, .trilogue-prose ol > li + li { margin-top: .55em; }
.trilogue-prose ul > li::before {
  content: ''; position: absolute; left: .2em; top: .52em; width: .62em; height: .62em; background: var(--tri-ind);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 5A90 90 0 0 1 95 82.94A90 90 0 0 1 5 82.94A90 90 0 0 1 50 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 5A90 90 0 0 1 95 82.94A90 90 0 0 1 5 82.94A90 90 0 0 1 50 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.trilogue-prose ul > li:nth-child(3n+2)::before { background: var(--tri-ink); }
.trilogue-prose ul > li:nth-child(3n)::before { background: var(--tri-amb); }
.trilogue-prose ol { counter-reset: trilogue-pt; }
.trilogue-prose ol > li { counter-increment: trilogue-pt; padding-left: 2.3em; }
.trilogue-prose ol > li::before { content: '(' counter(trilogue-pt, lower-alpha) ')'; position: absolute; left: 0; font-family: var(--f-mono), ui-monospace, monospace; font-size: .85em; font-weight: 600; color: var(--tri-ind); top: .12em; }
.trilogue-prose blockquote {
  margin: 1.8em 0; padding: 1.1em 1.2em 1.1em 1.35em; border-radius: 10px; background: #f3f2ff; position: relative;
  font-size: 1.12em; line-height: 1.5; font-weight: 500;
}
.trilogue-prose blockquote::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: linear-gradient(var(--tri-ink) 0 33%, var(--tri-ind) 33% 66%, var(--tri-amb) 66%); }
.trilogue-prose blockquote p + p { margin-top: .6em; }
.trilogue-prose img { border-radius: 10px; }
.trilogue-prose hr { border: 0; height: 3px; width: 66px; background: linear-gradient(90deg, var(--tri-ink) 0 20px, transparent 20px 23px, var(--tri-ind) 23px 43px, transparent 43px 46px, var(--tri-amb) 46px 66px); }

/* Track changes: insertions bold italic, deletions struck, removed text marked with a bar. */
.trilogue-ins { font-weight: 700; font-style: italic; color: var(--tri-ind); text-decoration: none; }
.trilogue-del { text-decoration: line-through; text-decoration-color: rgba(18, 18, 24, .55); color: var(--muted); }
.trilogue-cut::before { content: '\258C'; color: var(--tri-amb); margin-right: .15em; }

/* ---------- comments + share: soften the shared pieces into this title's shapes ---------- */
#site-root[data-site="trilogue"] .trilogue-comments form { border-radius: 10px; border-color: var(--line); background: var(--surface); }
#site-root[data-site="trilogue"] .trilogue-comments form button { border-radius: 10px; }
#site-root[data-site="trilogue"] .trilogue-comments h2 { font-weight: 600; font-size: 1.35rem; }
#site-root[data-site="trilogue"] .trilogue-comments li > span:first-child { border-radius: 10px; }
#site-root[data-site="trilogue"] .trilogue-share a, #site-root[data-site="trilogue"] .trilogue-share button { border-radius: 10px; height: 44px; width: 44px; }

/* ---------- small interactions ---------- */
.trilogue-lift { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
.trilogue-lift:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(58, 50, 214, .08), 0 14px 32px rgba(58, 50, 214, .1); }
.trilogue-arrow { display: inline-block; transition: transform .2s; }
a:hover .trilogue-arrow, button:hover .trilogue-arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .trilogue-pulse i, .trilogue-runner, .trilogue-runner::after, .trilogue-track-fill, .trilogue-sheet, .trilogue-scrim { animation: none !important; }
  .trilogue-lift, .trilogue-trip > span:nth-child(2), .trilogue-arrow, .trilogue-hl { transition: none; }
  .trilogue-lift:hover, .trilogue-trip:hover > span:nth-child(2) { transform: none; }
}
