/* Young Finance Luxembourg: editorial stylesheet (no web fonts, no gradients). */

:root {
  --bg: #fbfbf9;
  --paper: #ffffff;
  --ink: #0f1846;
  --text: #1c2233;
  --muted: #4c5470;
  --rule: #0f1846;
  --hair: #c9cdd9;
  --shade: #f1f2f6;
  --block-head: #0f1846;
  --block-head-text: #ffffff;
  --link: #2f5be8;
  --link-visited: #5a33b8;
  --blue: #2f5be8;
  --todo-bg: #fff4d6;
  --todo-ink: #6b4a00;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 64rem;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141f;
    --paper: #171b29;
    --ink: #e6e9f3;
    --text: #d9dce6;
    --muted: #a3a9bd;
    --rule: #c6cbdc;
    --hair: #3a4056;
    --shade: #1d2233;
    --block-head: #2a3253;
    --block-head-text: #f1f3f9;
    --link: #7fa2ff;
    --blue: #7fa2ff;
    --link-visited: #b79cff;
    --todo-bg: #3a3014;
    --todo-ink: #ffd98a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
  hyphens: manual;
}
a[href^="mailto:"] { overflow-wrap: anywhere; hyphens: none; -webkit-hyphens: none; }
.block dd a[href^="mailto:"], .site-foot a[href^="mailto:"], .cta-row .alt a { overflow-wrap: normal; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 4px 8px; z-index: 10; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-head { border-top: 4px solid var(--ink); background: var(--paper); border-bottom: 1px solid var(--hair); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: block; line-height: 0; }
.brand img { height: 52px; width: auto; display: block; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-family: var(--sans); font-size: 0.9rem; letter-spacing: 0.02em; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 10px; border-left: 1px solid var(--hair); }
.nav a:first-child { border-left: 0; padding-left: 0; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nav .lang { margin-left: 10px; border: 1px solid var(--ink); padding: 2px 8px; font-size: 0.8rem; }
.nav .lang:first-child { padding-left: 8px; }

/* Title block, in the manner of a paper's front matter */
.titleblock { padding: 28px 0 18px; border-bottom: 2px solid var(--rule); }
.nw { white-space: nowrap; }
.titleblock .kicker { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.titleblock h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); line-height: 1.15; color: var(--ink); margin: 0; font-weight: 600; }
.titleblock .sub { font-style: italic; color: var(--muted); margin: 8px 0 0; font-size: 1.1rem; }

/* Two-column body: main text and a sidebar of titled blocks */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 18.5rem; gap: 32px; padding: 24px 0 8px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
@media (min-width: 861px) { .layout > aside { position: sticky; top: 16px; } }

main p { margin: 0 0 0.85em; }
.lead { font-size: 1.15rem; color: var(--text); }

section { margin: 0 0 26px; }
section:last-child { margin-bottom: 8px; }
h2 { font-size: 1.35rem; color: var(--ink); margin: 0 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--hair); font-weight: 600; display: flex; gap: 0.6em; align-items: baseline; }
h2 .num { color: var(--blue); font-variant-numeric: lining-nums; min-width: 1.2em; }
h3 { font-size: 1.08rem; color: var(--ink); margin: 16px 0 6px; font-weight: 600; }

ul.tight { margin: 0 0 0.85em; padding-left: 1.2em; }
ul.tight li { margin: 0 0 0.25em; }

/* Beamer-style titled block */
.block { background: var(--paper); border: 1px solid var(--hair); margin: 0 0 18px; }
.block > .block-title { background: var(--block-head); color: var(--block-head-text); font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; margin: 0; font-weight: 600; }
.block > .block-body { padding: 10px 12px 12px; font-size: 0.97rem; }
.block dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; }
.block dt { font-variant: small-caps; color: var(--muted); letter-spacing: 0.03em; white-space: nowrap; }
.block dd { margin: 0; overflow-wrap: anywhere; }
/* A long address gets the full width of the block, under its label. */
.block dd.span { grid-column: 1 / -1; margin-top: -4px; }
.block-body p { margin: 0 0 0.6em; }
.block-body > :first-child { margin-top: 0; }
.block p:last-child { margin-bottom: 0; }

/* Booktabs tables with numbered captions above */
.table-wrap { overflow-x: auto; margin: 6px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
caption { caption-side: top; text-align: left; font-size: 0.92rem; color: var(--muted); padding: 0 0 6px; }
caption b, figcaption b { color: var(--ink); font-variant: small-caps; letter-spacing: 0.03em; font-weight: 600; }
table { border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
thead th { border-bottom: 1px solid var(--rule); text-align: left; font-weight: 600; color: var(--ink); padding: 6px 10px 5px 0; }
tbody td, tbody th { padding: 6px 10px 6px 0; vertical-align: top; text-align: left; border-top: 1px solid var(--hair); }
tbody tr:first-child td, tbody tr:first-child th { border-top: 0; }
tbody th { font-weight: 600; color: var(--ink); }
td.nowrap, th.nowrap { white-space: nowrap; }

/* Figures */
figure { margin: 8px 0 20px; }
figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--hair); }
.frame { border: 1px solid var(--hair); background: var(--paper); padding: 10px; }
.frame iframe { display: block; }
.frame.embed { padding: 0; background: transparent; border: 0; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); }
.frame.embed iframe { width: 100%; }
.frame + figcaption { border-top: 0; margin-top: 6px; }

/* Call to action: a ruled box, not a pill */
.cta { display: inline-block; font-family: var(--sans); font-size: 0.95rem; color: var(--paper) !important; background: var(--ink); text-decoration: none; padding: 9px 16px; border: 1px solid var(--ink); }
.cta:hover { background: var(--blue); border-color: var(--blue); }
@media (prefers-color-scheme: dark) { .cta { color: #0f1846 !important; background: #e6e9f3; border-color: #e6e9f3; } }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 6px 0 12px; }
.cta-row .alt { font-size: 0.95rem; color: var(--muted); overflow-wrap: anywhere; }

/* Clearly marked placeholders */
.todo { background: var(--todo-bg); color: var(--todo-ink); font-family: var(--sans); font-size: 0.86em; padding: 0 4px; border: 1px dashed currentColor; white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.note { font-size: 0.93rem; color: var(--muted); border-left: 3px solid var(--hair); padding: 2px 0 2px 12px; margin: 10px 0 16px; }

/* Footer */
.site-foot { margin-top: 28px; background: var(--paper); border-top: 2px solid var(--rule); box-shadow: 0 -4px 0 -2px var(--bg), 0 -5px 0 -2px var(--rule); font-size: 0.9rem; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px 28px; padding-top: 18px; padding-bottom: 18px; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }
@media (min-width: 861px) { .site-foot .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 18.5rem; column-gap: 32px; } }
.site-foot h2 { font-family: var(--sans); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border: 0; padding: 0; margin: 0 0 6px; display: block; }
.site-foot p { margin: 0 0 4px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0 0 3px; }
.site-foot .credit { grid-column: 1 / -1; border-top: 1px solid var(--hair); padding-top: 10px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.site-foot .credit a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .brand img { height: 50px; }
  .nav { font-size: 0.88rem; }
  .titleblock { padding-top: 20px; }
}

@media print {
  .site-head .nav, .cta-row, .skip { display: none; }
  body { background: #fff; color: #000; }
}
table.narrow { width: auto; min-width: min(100%, 26rem); }
table.narrow th, table.narrow td { padding-right: 32px; }

/* Narrow screens: tables re-flow instead of squeezing columns */
@media (max-width: 560px) {
  table.acts thead, table.stack thead { position: absolute; left: -9999px; }
  table.acts tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--hair); }
  table.acts tbody tr:first-child { border-top: 0; }
  table.acts th, table.acts td { border: 0; padding: 0; }
  table.acts td:nth-of-type(1) { grid-column: 1 / -1; grid-row: 2; }
  table.acts td:nth-of-type(2) { grid-column: 2; grid-row: 1; font-size: 0.88em; color: var(--muted); font-style: italic; }
  table.stack tr { display: block; padding: 8px 0; border-top: 1px solid var(--hair); }
  table.stack tbody tr:first-child { border-top: 0; }
  table.stack th, table.stack td { display: block; border: 0; padding: 1px 0; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; font-variant: small-caps; color: var(--muted); letter-spacing: 0.03em; }
  table.stack td.nowrap { white-space: normal; }
  :lang(fr) table.stack td[data-label]::before { content: attr(data-label) "\00a0: "; }
}
