/* Lirix website - one self-contained stylesheet. No web fonts, no external files.
   Light look (Lirix Light) with automatic dark mode (Lirix Dark) via prefers-color-scheme. */
:root {
  --blue: #0E6FBC; --mid: #1799C0; --teal: #1FBEBB;
  --bg: #ffffff; --bg-soft: #f3f7fb; --card: #ffffff; --text: #1b2230; --muted: #4f5b6e;
  --border: #dbe3ec; --link: #0b5fa3; --accent-text: #ffffff; --code-bg: #eef3f8;
  --warn-bg: #fff6e0; --warn-border: #e5b649; --ok-bg: #e7f7f6;
  --shadow: 0 6px 24px rgba(14, 40, 80, .10);
  --radius: 14px; --max: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121826; --bg-soft: #1b2230; --card: #1b2230; --text: #e8edf4; --muted: #a9b4c4;
    --border: #2c3647; --link: #5cc8f0; --code-bg: #0d1220;
    --warn-bg: #2e2716; --warn-border: #a8842e; --ok-bg: #12302f;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans", Ubuntu, Cantarell, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
main { overflow-wrap: break-word; }
td, th { overflow-wrap: anywhere; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.2em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
code, kbd, pre { font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); border: 1px solid var(--border); padding: 1em; border-radius: 10px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; background: var(--card); }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: .6em 1em; z-index: 10; }
.skip:focus { left: 1em; top: 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 800px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; position: relative; }
.brand { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; gap: .55rem; font-weight: 700; font-size: 1.3rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: auto; }
.brand .beta { font-size: .7rem; font-weight: 600; color: var(--accent-text); background: var(--mid); padding: .1em .5em; border-radius: 99px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: .45em .7em; white-space: nowrap; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; font-size: .98rem; }
.site-nav a:hover { background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--blue); background: var(--bg-soft); }
@media (prefers-color-scheme: dark) { .site-nav a[aria-current="page"] { color: var(--teal); } }
.site-nav a.nav-dl { background: var(--blue); color: #fff; }
.site-nav a.nav-dl:hover, .site-nav a.nav-dl[aria-current="page"] { background: #0b5fa3; color: #fff; }
/* Small screens: CSS-only menu (details/summary, no JavaScript) */
.menu { margin-left: auto; display: none; }
.menu summary { list-style: none; cursor: pointer; padding: .45em .8em; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu { display: block; }
  .menu summary { min-height: 44px; min-width: 44px; display: flex; align-items: center; gap: .45em; }
  .menu summary::before { content: "\2630"; font-size: 1.15em; line-height: 1; }
  .menu[open] summary::before { content: "\2715"; }
  .menu[open] > nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: .6rem 1.25rem 1rem; max-height: calc(100vh - 70px); overflow-y: auto; }
  .menu ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; max-width: var(--max); margin-inline: auto; }
  .menu li { margin: 0; }
  .menu a { display: flex; align-items: center; min-height: 48px; padding: .6em .9em; border-radius: 8px; text-decoration: none; color: var(--text); background: var(--bg-soft); font-weight: 500; }
  .menu a[aria-current="page"] { color: var(--blue); outline: 2px solid var(--mid); }
}

/* Hero */
.hero { background: linear-gradient(135deg, rgba(14,111,188,.10), rgba(31,190,187,.12)), var(--bg); border-bottom: 1px solid var(--border); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.5rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hero-logo { width: 120px; margin-bottom: 1rem; }
.hero h1 { margin-bottom: .4em; }
.lead { font-size: 1.2rem; color: var(--muted); }
.hero .shot { border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 2rem; padding-bottom: 2rem; gap: 1.5rem; } .hero-logo { width: 90px; } }
.page-head { background: linear-gradient(135deg, rgba(14,111,188,.08), rgba(31,190,187,.10)); border-bottom: 1px solid var(--border); padding: 2.5rem 0 2rem; }
.page-head h1 { margin-bottom: .25em; }
.page-head p { color: var(--muted); font-size: 1.15rem; margin: 0; }

/* Buttons */
.btn { display: inline-block; text-align: center; padding: .8em 1.4em; border-radius: 10px; font-weight: 650; text-decoration: none; border: 2px solid transparent; font-size: 1.05rem; }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--mid)); color: #fff; box-shadow: 0 4px 14px rgba(14,111,188,.3); }
.btn-primary:hover { background: linear-gradient(135deg, #0b5fa3, var(--blue)); }
.btn-secondary { border-color: var(--mid); color: var(--text); background: var(--card); }
.btn-secondary:hover { background: var(--bg-soft); }
.btn-big { font-size: 1.2rem; padding: 1em 1.8em; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0 .6rem; }
.btn { min-height: 44px; max-width: 100%; }
.small { font-size: .92rem; color: var(--muted); }

/* Sections, cards, grids */
main { display: block; }
.section { padding: 3rem 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section > .wrap > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: linear-gradient(135deg, var(--blue), var(--teal)); color: #fff; margin-bottom: .7rem; }
figure { margin: 0; }
figure img { border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
figcaption { font-size: .92rem; color: var(--muted); margin-top: .55rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 650; padding: .1em .55em; border-radius: 99px; background: var(--ok-bg); color: var(--text); border: 1px solid var(--border); vertical-align: middle; }
.notice { border-left: 5px solid var(--warn-border); background: var(--warn-bg); padding: 1rem 1.2rem; border-radius: 10px; margin: 1.2rem 0; }
.notice.info { border-left-color: var(--mid); background: var(--bg-soft); }
.notice p:last-child { margin-bottom: 0; }
.checklist { list-style: none; padding-left: 0; }
.checklist li { padding-left: 1.7em; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: .98rem; }
th, td { text-align: left; padding: .6em .75em; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-soft); }
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 0; }
.facts th { width: 7.5em; }
.hash { display: block; font-family: ui-monospace, "DejaVu Sans Mono", Consolas, monospace; background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: .8em 1em; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.3rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--blue), var(--teal)); }
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.3rem; }
.toc ul { margin: 0; }
.wallpapers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 2.2rem 0; margin-top: 3rem; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1.2rem; grid-template-columns: 2fr 1fr; }
.site-footer p { margin: 0 0 .5em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer li { margin-bottom: .3em; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }
/* Touch screens / small widths: comfortable tap targets and readable text */
@media (max-width: 860px) {
  body { font-size: 1.0625rem; }
  table { font-size: 1rem; }
  .site-footer a, .toc a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .site-footer li { margin-bottom: 0; }
  .toc li { margin-bottom: 0; }
  .actions .btn { flex: 1 1 auto; }
  .hero .actions .btn { flex: 0 1 auto; }
  .steps > li { padding-left: 2.7rem; }
  pre { font-size: .85em; white-space: pre-wrap; overflow-wrap: anywhere; }
  pre code { overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 1rem; }
  .card { padding: 1.1rem 1rem; }
  .btn-big { padding: .9em 1.2em; }
  .actions .btn, .hero .actions .btn { flex: 1 1 100%; }
  .page-head { padding: 1.8rem 0 1.5rem; }
}
.section + .site-footer, .section.alt + .site-footer { margin-top: 0; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header, .site-footer, .actions { display: none; } body { font-size: 11pt; } }
