/* libre Os site. One calm column on a misty sea-grey page, like the black & white seashore of the desktop.
   Nunito everywhere; Parisienne only for "libre" and the small handwritten section names; orange for actions. */
:root {
  --mist: #eef0ef;        /* page */
  --paper: #ffffff;       /* raised surfaces */
  --ink: #1d1d1f;
  --muted: #595d63;
  --line: #d9dcda;
  --orange: #ff6b35;
  --orange-ink: #b4441a;  /* orange text on light: 4.6:1 on white */
  --band: #26292d;        /* the dark band (Mode parents) */
  --band-ink: #f0f1ef;
  --band-muted: #b5b9be;
  --jeanne: linear-gradient(90deg, #ffb347, #ff5a1f);
  --script: "Parisienne", "Snell Roundhand", cursive;
  --sans: "Nunito", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --mist: #141618; --paper: #1d2023; --ink: #eff0ee; --muted: #a8acb1; --line: #2d3135;
  --orange: #ff7a48; --orange-ink: #ff9a70; --band: #0d0e10; color-scheme: dark } }
:root[data-theme="dark"] {
  --mist: #141618; --paper: #1d2023; --ink: #eff0ee; --muted: #a8acb1; --line: #2d3135;
  --orange: #ff7a48; --orange-ink: #ff9a70; --band: #0d0e10; color-scheme: dark }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 800; }
p { margin: 0; }
a { color: var(--orange-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }

/* Brand lockup: "libre" handwritten, "Os" thin */
.logo, .brand { font-weight: 300; color: inherit; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.logo span, .brand span { font-family: var(--script); font-weight: 400; font-size: 1.3em; margin-right: .1em; letter-spacing: 0; }
.jeanne { font-weight: 800; background: var(--jeanne); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Top navigation */
.site-nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--mist) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.site-nav .logo { font-size: 26px; line-height: 1; padding-block: 6px; }
.site-nav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 10px; border-radius: 999px; }
.site-nav nav a:hover { background: var(--paper); }
.site-nav nav a[aria-current="page"] { background: var(--ink); color: var(--mist); }
@media (max-width: 560px) {
  .site-nav .wrap { padding-block: 6px; gap: 2px; }
  .site-nav nav { width: 100%; justify-content: space-between; }
  .site-nav nav a { font-size: 14px; padding: 5px 8px; }
}

/* Sections */
.block { padding-block: clamp(56px, 8vw, 104px); }
.kicker { font-family: var(--script); font-size: clamp(28px, 4vw, 36px); line-height: 1; color: var(--orange-ink); }
.head { display: grid; gap: 12px; max-width: 64ch; margin-bottom: clamp(28px, 4vw, 44px); }
.head h2 { font-size: clamp(28px, 4.2vw, 42px); }
.lede { color: var(--muted); font-size: clamp(17px, 2vw, 19px); max-width: 62ch; }

/* Screens: real screenshots of libre Os */
.screen { margin: 0; display: grid; gap: 12px; align-content: start; min-width: 0; }
.screen img { border-radius: 12px; border: 1px solid var(--line); background: #ccc; box-shadow: 0 18px 40px -24px rgba(20, 24, 28, .45); }
.screen figcaption { color: var(--muted); font-size: 16px; max-width: 52ch; }
.screen figcaption b { color: var(--ink); display: block; font-size: 19px; margin-bottom: 2px; }

.feature { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.feature + .feature { margin-top: clamp(40px, 6vw, 72px); }
.feature.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.feature.flip > .screen { order: 2; }
.feature .text { display: grid; gap: 10px; }
.feature .text h3 { font-size: clamp(22px, 2.6vw, 28px); }
.feature .text p { color: var(--muted); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
@media (max-width: 760px) {
  .feature, .feature.flip, .duo { grid-template-columns: 1fr; }
  .feature.flip > .screen { order: 0; }
}

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--muted); font-size: 15px; }
.site-foot .wrap { display: grid; gap: 10px; }
.promise-link { font-size: clamp(18px, 2.4vw, 21px); font-weight: 800; }
.promise-link a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
.gen { font-size: 14px; }

/* Text pages (libre.html, dependances.html) */
.page { padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px); }
.page-head { display: grid; gap: 14px; max-width: 66ch; margin-bottom: 36px; }
.page-head h1 { font-size: clamp(32px, 5.4vw, 54px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* dependances.html (generated by tools/make-deps-page.py) */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 28px; margin-bottom: 20px; }
.stat { border-top: 2px solid var(--orange); padding-top: 10px; display: grid; gap: 2px; }
.stat b { font-size: clamp(28px, 4vw, 38px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 15.5px; }
.lic-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 28px; }
.lic-box summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
.lic-box p { color: var(--muted); font-size: 14px; padding-bottom: 14px; }
.lics { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 24px; }
.lics li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--line); padding: 4px 0; font-size: 15px; }
.lics b { font-variant-numeric: tabular-nums; }
.filter { position: sticky; top: 57px; z-index: 3; background: var(--mist); padding: 12px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-bottom: 1px solid var(--line); }
.filter label { font-weight: 800; }
.filter input { flex: 1 1 240px; min-width: 0; font: 600 17px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; }
.filter p { color: var(--muted); font-size: 15px; }
.deps { padding-top: 40px; }
.deps-head { display: grid; gap: 6px; margin-bottom: 14px; max-width: 70ch; }
.deps-head h2 { font-size: clamp(24px, 3vw, 30px); }
.deps-head p { color: var(--muted); }
.count { color: var(--ink); font-weight: 700; white-space: nowrap; }
.tablewrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.deps table { width: 100%; border-collapse: collapse; font-size: 15px; }
.deps th, .deps td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.deps thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.deps tbody tr:last-child td { border-bottom: 0; }
.deps td { color: var(--muted); }
.deps tr.top td { color: var(--ink); }
.deps td.name { white-space: nowrap; font-weight: 700; color: var(--ink); }
.deps td.name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.deps td.lic { font-size: 13.5px; max-width: 16rem; overflow-wrap: anywhere; }
.deps .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deps tr.sub th { background: var(--mist); font-size: 17px; padding-top: 14px; }
.deps tr.sub small { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 6px; }
@media (max-width: 640px) {
  .deps thead { display: none; }
  .deps tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .deps td { border: 0; padding: 2px 0; }
  .deps td.name { grid-column: 1; white-space: normal; }
  .deps td.num { grid-column: 2; grid-row: 1; }
  .deps td:nth-child(2), .deps td.lic { grid-column: 1 / -1; max-width: none; }
  .deps tr.sub { display: block; }
  .deps tr.sub th { display: block; padding: 10px 0 4px; background: none; }
  .filter { top: 84px; }
}
