/* German economy and jobs outlook: shared stylesheet. No external resources. */
:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --ink: #1b1f24;
  --muted: #55606c;
  --accent: #1f3a5f;
  --accent-ink: #ffffff;
  --link: #1b4f8f;
  --rule: #c9d1da;
  --band: #eaeff5;
  --key-bg: #eef3f9;
  --key-rule: #1f3a5f;
  --focus: #b3541e;
  --shadow: rgba(20, 30, 45, 0.18);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --surface: #1a2028;
    --ink: #e6e9ed;
    --muted: #a3adb8;
    --accent: #9cc0ee;
    --accent-ink: #0f1722;
    --link: #9cc4f5;
    --rule: #38424e;
    --band: #222b36;
    --key-bg: #18212d;
    --key-rule: #9cc0ee;
    --focus: #f0a35e;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.68;
  overflow-wrap: break-word;
}
html[lang="de"] body { hyphens: auto; -webkit-hyphens: auto; }
html[lang="de"] h1, html[lang="de"] .brand, html[lang="de"] table td { hyphens: manual; -webkit-hyphens: manual; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.9rem; border-radius: 0 0 6px 6px; }
.skip:focus { top: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--rule); }
.bar { max-width: 76rem; margin: 0 auto; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.75rem; }
.brand { flex: 1 1 auto; min-width: 0; font-weight: 700; color: var(--accent); text-decoration: none; font-size: 0.95rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.lang { font-size: 0.9rem; padding: 0.35rem 0.4rem; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: 0.88rem; line-height: 1.2; padding: 0.5rem 0.8rem; border-radius: 6px; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }

/* ---------- layout ---------- */
.layout { max-width: 76rem; margin: 0 auto; padding: 0 1rem 3rem; }
main { min-width: 0; }
article { max-width: 44rem; margin: 0 auto; }
section { scroll-margin-top: 4.5rem; }
h1, h2, h3 { color: var(--accent); line-height: 1.22; text-wrap: balance; }
h1 { font-size: clamp(1.65rem, 1.3rem + 1.9vw, 2.5rem); margin: 1.6rem 0 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.2rem, 1.08rem + 0.6vw, 1.5rem); margin: 2.6rem 0 0.7rem; padding-top: 0.2rem; }
p { margin: 0 0 1em; }
.byline { margin: 0; font-weight: 600; }
.date { margin: 0 0 1rem; color: var(--muted); font-size: 0.92em; }
.lede { color: var(--muted); font-size: 0.95em; line-height: 1.6; border-left: 3px solid var(--rule); padding-left: 0.9rem; }
.item { margin-bottom: 0.8em; }
.note { color: var(--muted); font-size: 0.86em; line-height: 1.55; font-style: italic; margin-top: 0.5rem; }
.sources { color: var(--muted); font-size: 0.8em; line-height: 1.55; }
.totop { max-width: 44rem; margin: 2.5rem auto 0; font-size: 0.9em; }
sup { line-height: 0; font-size: 0.72em; }
.fnref a { padding: 0 0.15em; text-decoration: none; font-weight: 600; }

/* key takeaways */
.key { background: var(--key-bg); border-left: 5px solid var(--key-rule); border-radius: 0 8px 8px 0; padding: 1.1rem 1.1rem 0.6rem 1.2rem; margin-top: 1.6rem; }
.key h2 { margin: 0 0 0.6rem; }
.key ul { margin: 0; padding-left: 1.15rem; }
.key li { margin-bottom: 0.7em; }

/* footnotes */
.footnotes { border-top: 1px solid var(--rule); margin: 1.2rem 0 1.4rem; padding-top: 0.7rem; color: var(--muted); font-size: 0.84em; line-height: 1.55; }
.footnotes ol { margin: 0; padding-left: 1.4rem; }
.footnotes li { margin-bottom: 0.45em; scroll-margin-top: 5rem; }
.footnotes li:target, .fnref a:target { background: var(--band); outline: 2px solid var(--rule); border-radius: 3px; }
.fnref a { scroll-margin-top: 6rem; }
.fnback { text-decoration: none; padding: 0 0.3em; }

/* ---------- table of contents ---------- */
.toc { margin: 1rem auto 0; max-width: 44rem; font-size: 0.9rem; line-height: 1.3; }
.toc details { border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.toc summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 0.65rem 0.9rem; }
.toc ol { margin: 0; padding: 0 0.9rem 0.7rem 2.4rem; color: var(--muted); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.42rem 0.5rem; text-decoration: none; color: var(--muted); white-space: nowrap; border-radius: 5px; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc a.current { color: var(--accent); font-weight: 650; }

@media (min-width: 64rem) {
  .layout { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 2.5rem; }
  .toc { position: sticky; top: 4rem; align-self: start; margin: 1.8rem 0 0; max-height: calc(100vh - 5rem); overflow: auto; }
  .toc details { border: 0; background: transparent; border-radius: 0; }
  .toc summary { padding: 0 0 0.5rem 0.75rem; list-style: none; cursor: default; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; font-weight: 600; color: var(--muted); opacity: 0.85; }
  .toc summary::-webkit-details-marker { display: none; }
  .toc { font-size: 0.86rem; }
  .toc ol { list-style: none; padding: 0; border-left: 1px solid var(--rule); }
  .toc a { padding: 0.4rem 0.5rem 0.4rem 0.75rem; margin-left: -1px; border-left: 2px solid transparent; border-radius: 0; }
  .toc a.current { border-left-color: var(--accent); }
  /* keep the list visible on wide screens even where the script has not opened it */
  .toc details::details-content { content-visibility: visible; display: block; block-size: auto; }
  article { margin: 0; }
  .totop { margin-left: 0; }
  /* tables may use the free space to the right of the text column */
  .table-wrap { width: max-content; min-width: 100%; max-width: calc(min(76rem, 100vw) - 2rem - 11.5rem - 2.5rem); }
  table.data { width: 100%; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2rem 0 0.4rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); }
.table-wrap:focus-visible { outline-offset: 0; }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 34rem; font-size: 0.86em; line-height: 1.35; font-variant-numeric: tabular-nums lining-nums; }
table.data caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
table.data th, table.data td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data thead th { background: var(--band); color: var(--ink); font-weight: 700; text-align: left; border-bottom: 2px solid var(--accent); vertical-align: bottom; }
table.data .num { text-align: right; white-space: nowrap; }
table.data thead .num { white-space: normal; }
table.data tbody th { text-align: left; font-weight: 400; }
/* sticky first column */
table.data th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); min-width: 9.5rem; max-width: min(42vw, 17rem); box-shadow: 1px 0 0 var(--rule); }
table.data thead th:first-child { background: var(--band); z-index: 2; }
table.data tr.total th, table.data tr.total td { font-weight: 700; background: var(--band); }
table.data tr.total th:first-child { background: var(--band); }
table.data tr.summary th, table.data tr.summary td { font-style: italic; }
table.data tr.rule th, table.data tr.rule td { border-top: 2px solid var(--accent); }
table.data tr.indent th { padding-left: 1.3rem; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }

/* ---------- language chooser ---------- */
.chooser main { max-width: 40rem; margin: 12vh auto 0; padding: 0 1.2rem; }
.choices { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.choices .btn { font-size: 1rem; padding: 0.7rem 1.1rem; }

/* ---------- small screens ---------- */
@media (max-width: 26rem) {
  .bar { padding: 0.45rem 0.7rem; gap: 0.4rem; }
  .brand { font-size: 0.82rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .btn { font-size: 0.8rem; padding: 0.45rem 0.6rem; }
  .lang { font-size: 0.82rem; padding: 0.3rem 0.2rem; }
  .layout { padding: 0 0.85rem 2.5rem; }
  .key { padding: 0.9rem 0.8rem 0.4rem 0.9rem; }
  table.data th, table.data td { padding: 0.45rem 0.5rem; }
}

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --ink: #000; --muted: #333; --accent: #1f3a5f; --link: #000; --rule: #999; --band: #eee; --key-bg: #f3f3f3; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .site-header, .toc, .skip, .totop, .fnback { display: none !important; }
  .layout { display: block; max-width: none; padding: 0; }
  article { max-width: none; }
  a { color: inherit; text-decoration: none; }
  h2 { break-after: avoid; margin-top: 1.4rem; }
  .table-wrap { overflow: visible; border: 0; }
  table.data { min-width: 0; font-size: 8.5pt; }
  table.data th:first-child { position: static; box-shadow: none; max-width: none; }
  table.data .num { white-space: nowrap; }
  tr, .key li, .item { break-inside: avoid; }
  .key { border-left-width: 3px; }
}

/* ---------- page footer and home page ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: 3rem; }
.site-footer .inner { max-width: 76rem; margin: 0 auto; padding: 1.2rem 1rem 2.2rem; color: var(--muted); font-size: 0.85em; line-height: 1.55; }
.site-footer p { margin: 0 0 0.5em; max-width: 44rem; }
.home-link { font-size: 0.88rem; white-space: nowrap; }
.home main { max-width: 46rem; margin: 0 auto; padding: 0 1rem 1rem; }
.home h1 { margin-top: 2.2rem; }
.home .intro { font-size: 1.08em; }
.home .block { margin-top: 2.2rem; padding-top: 0.4rem; }
.home .block + .block { border-top: 1px solid var(--rule); margin-top: 2.8rem; }
.reports { list-style: none; padding: 0; margin: 0; }
.reports > li { border: 1px solid var(--rule); border-left: 5px solid var(--key-rule); border-radius: 0 8px 8px 0; background: var(--key-bg); padding: 1rem 1.1rem 0.9rem; margin-bottom: 1rem; }
.reports h3 { margin: 0 0 0.15rem; font-size: 1.15em; }
.reports .meta { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9em; }
.reports .links { list-style: none; padding: 0; margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.reports .links a.btn { font-size: 0.9rem; }
.disclaimer { color: var(--muted); font-size: 0.88em; line-height: 1.6; }
.disclaimer h2 { font-size: 1.05rem; margin-top: 2.2rem; }
@media (max-width: 26rem) { .home-link { display: none; } .home main { padding: 0 0.85rem 1rem; } }
@media print { .site-footer { border: 0; margin-top: 1.5rem; } .home-link { display: none; } }

.home [lang="de"] { hyphens: auto; -webkit-hyphens: auto; }
.home [lang="de"] h2, .home [lang="de"] h3, .home [lang="de"] a { hyphens: manual; -webkit-hyphens: manual; }
