/* LibraIRC — static site stylesheet. No frameworks, no build step. */

/* ---------- Fonts (Geist, SIL Open Font License, self-hosted) ---------- */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }


/* ===== librairc.com — bento portal ===== */
:root {
  --bg: #f4f1fb; --fg: #1b1830; --muted: #625d7a; --tile: #ffffff; --line: rgba(27,24,48,.08); --ink: #1b1830; --ink-fg: #f6f4ff;
  --mint: #c9f2e1; --peach: #ffd9c7; --lilac: #e2d8ff; --sky: #cfe6ff; --lemon: #fff1b8; --pink: #ffd3ea;
  --accent: #6b4dff; --accent-fg: #ffffff; --ok: #12b76a; --bad: #f04438; --unk: #a59fbd;
  --glow: transparent; --r: 28px; --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace; color-scheme: light;
}
:root.dark {
  --bg: #0d111b; --fg: #eef0fb; --muted: #9aa1bd; --tile: #151b29; --line: rgba(255,255,255,.07); --ink: #0a0e17; --ink-fg: #eef0fb;
  --mint: #4ff0b6; --peach: #ff9f7a; --lilac: #a98bff; --sky: #5cb8ff; --lemon: #ffe066; --pink: #ff7ac6;
  --accent: #8f78ff; --accent-fg: #ffffff; color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.03em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-light, :root.dark .i-dark { display: none; } :root.dark .i-light { display: block; }

/* header */
.top { position: sticky; top: 0; z-index: 40; padding: 12px 0; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top-in { display: flex; align-items: center; gap: 12px; background: var(--tile); border-radius: 999px; padding: 8px 8px 8px 16px; box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(27,24,48,.35); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; text-decoration: none; }
.brand b { color: var(--accent); }
.logo { width: 30px; height: 30px; }
.lg1 { fill: var(--lilac); } .lg2 { fill: var(--peach); } .lg3 { fill: var(--mint); } .lg4 { fill: var(--sky); }
:root:not(.dark) .lg1 { fill: #9d85ff; } :root:not(.dark) .lg2 { fill: #ff9e7d; } :root:not(.dark) .lg3 { fill: #4fd6a4; } :root:not(.dark) .lg4 { fill: #6fb6ff; }
.links { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.links a { text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.links a:hover { background: var(--bg); color: var(--fg); }
.pill { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--bg); color: var(--fg); cursor: pointer; flex: none; }
@media (max-width: 520px) { .links a:nth-child(n+3) { display: none; } .brand span { display: none; } }

/* bento */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: row dense; gap: 16px; padding: 8px 0 40px; }
.tile { position: relative; grid-column: span 4; background: var(--tile); border-radius: var(--r); padding: 26px; min-width: 0; overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -30px rgba(27,24,48,.45); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
:root.dark .tile { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 0 transparent; }
.tile:hover { transform: perspective(900px) rotateX(1.2deg) rotateY(-1.6deg) translateY(-3px); box-shadow: 0 1px 0 var(--line), 0 28px 50px -30px rgba(27,24,48,.55); }
.tile-hero { grid-column: span 8; grid-row: span 2; padding: 40px; background: linear-gradient(135deg, var(--lilac), var(--pink) 60%, var(--peach)); display: flex; flex-direction: column; justify-content: center; }
:root.dark .tile-hero { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--lilac) 38%, var(--tile)), var(--tile) 55%), var(--tile); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lilac) 40%, transparent), 0 0 60px -20px color-mix(in srgb, var(--lilac) 60%, transparent); }
.tile-hero:hover, .tile-apps:hover, .tile-faq:hover { transform: none; }
.chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--tile) 70%, transparent); font-size: .85rem; font-weight: 600; margin-bottom: 22px; }
.tile-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -.05em; max-width: 13ch; }
.hl { background: var(--ink); color: var(--ink-fg); padding: 0 .18em; border-radius: .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
:root.dark .hl { background: var(--lilac); color: #120c24; }
.lead { font-size: 1.1rem; color: color-mix(in srgb, var(--fg) 78%, transparent); margin-top: 16px; max-width: 34em; }
.start { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; max-width: 560px; }
.start input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1.05rem; padding: .9em 1.2em; border-radius: 18px; border: 2px solid transparent; background: var(--tile); color: var(--fg); }
.start input:focus { outline: none; border-color: var(--accent); }
.form-msg { flex-basis: 100%; font-size: .9rem; font-weight: 600; color: var(--bad); }
.form-msg:empty { display: none; }
.fine { margin-top: 12px; font-size: .88rem; color: color-mix(in srgb, var(--fg) 70%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; font: inherit; font-weight: 700; font-size: .9rem; line-height: 1; padding: .75em 1.1em; border-radius: 14px; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, filter .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-lg { font-size: 1.05rem; padding: .95em 1.4em; border-radius: 18px; }
.btn-solid { background: var(--ink); color: var(--ink-fg); }
:root.dark .btn-solid { background: var(--accent); color: #120c24; }
:root.dark .skip { color: #120c24; }
.btn-soft { background: color-mix(in srgb, var(--tile) 75%, transparent); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn .i-ext { width: .85em; height: .85em; opacity: .75; }

.tile-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--tile) 65%, transparent); margin-bottom: 16px; }
.tile-ic .icon { width: 22px; height: 22px; }
.tile-h { font-size: 1.35rem; font-weight: 800; margin-bottom: 10px; }
.tile-sub { font-weight: 700; margin-top: 2px; }
.tile-txt { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.tile-txt a { font-weight: 700; color: var(--fg); }
.tile-txt .icon { vertical-align: -2px; width: .9em; }

/* status */
.tile-status .tile-ic { background: var(--mint); color: #0b3b2a; }
.big-num { font-size: 3.4rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; margin: 6px 0 16px; }
.big-num small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.dots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; font-size: .88rem; }
.dots li { display: flex; align-items: center; gap: 8px; }
.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--unk); flex: none; vertical-align: middle; }
.sdot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.sdot.down { background: var(--bad); }

/* chat preview */
.tile-chat { background: var(--ink); color: var(--ink-fg); padding: 0; display: flex; flex-direction: column; }
:root.dark .tile-chat { background: #070a11; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sky) 30%, transparent), 0 0 50px -24px color-mix(in srgb, var(--sky) 60%, transparent); }
.chat-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.08); }
.chat-bar span { margin-right: auto; font-family: var(--mono); }
.chat-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); }
.chat { list-style: none; margin: 0; padding: 14px 18px 4px; display: grid; gap: 8px; font-size: .9rem; flex: 1; align-content: start; }
.chat li { display: flex; gap: 8px; }
.chat b { color: #c4b5ff; font-weight: 700; flex: none; }
.chat li:nth-child(3n+2) b { color: #7ee7c0; } .chat li:nth-child(3n) b { color: #ffc29e; }
.js .chat li { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.js .chat li.on { opacity: 1; transform: none; }
.typing { display: flex; gap: 4px; padding: 6px 18px 16px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); animation: bob 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 40% { transform: translateY(-4px); opacity: 1; } }

/* rooms */
.tile-room { display: flex; flex-direction: column; }
.room-name { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.tile-room .tile-txt { flex: 1; color: color-mix(in srgb, var(--fg) 72%, transparent); }
.joins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.t-mint { background: var(--mint); } .t-peach { background: var(--peach); } .t-lilac { background: var(--lilac); } .t-sky { background: var(--sky); } .t-lemon { background: var(--lemon); }
:root.dark .tile-room { background: var(--tile); }
:root.dark .t-mint { --c: var(--mint); } :root.dark .t-peach { --c: var(--peach); } :root.dark .t-lilac { --c: var(--lilac); } :root.dark .t-sky { --c: var(--sky); } :root.dark .t-lemon { --c: var(--lemon); }
:root.dark .tile-room { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--tile)), var(--tile) 70%); }
:root.dark .tile-room .tile-ic { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
:root.dark .tile-room:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 0 40px -14px var(--c); }
:root.dark .tile-room .btn-solid { background: var(--c); color: #0b0f18; }

/* privacy + native */
.tile-privacy { background: var(--mint); }
:root.dark .tile-privacy { background: linear-gradient(160deg, color-mix(in srgb, var(--mint) 14%, var(--tile)), var(--tile)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mint) 30%, transparent); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 0; top: .15em; width: 18px; height: 18px; border-radius: 6px; background: var(--ink); }
.checks li::after { content: ""; position: absolute; left: 6px; top: .38em; width: 6px; height: 3px; border-left: 2px solid var(--ink-fg); border-bottom: 2px solid var(--ink-fg); transform: rotate(-45deg); }
:root.dark .checks li::before { background: var(--mint); } :root.dark .checks li::after { border-color: #0b0f18; }
.tile-native { background: var(--ink); color: var(--ink-fg); }
:root.dark .tile-native { background: #070a11; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lemon) 25%, transparent); }
.tile-native .tile-ic { background: rgba(255,255,255,.1); }
.tile-native .tile-txt { color: rgba(246,244,255,.7); }
.cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 14px; padding: 6px 6px 6px 14px; }
.cmd code { flex: 1 1 auto; white-space: nowrap; font-size: .95rem; color: var(--lemon); padding: 4px 0; }
:root:not(.dark) .cmd code { color: #ffe27a; }
.copy { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .8rem; font-weight: 700; border: 0; border-radius: 10px; padding: 8px 12px; background: var(--lemon); color: #1b1830; cursor: pointer; flex: none; }
:root:not(.dark) .copy { background: #ffe27a; }
.copy.copied { background: #7ee7c0; }

/* apps */
.tile-apps { grid-column: span 12; background: var(--sky); }
:root.dark .tile-apps { background: linear-gradient(160deg, color-mix(in srgb, var(--sky) 12%, var(--tile)), var(--tile)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sky) 28%, transparent); }
.apps-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
[data-expand] .i-chev { transition: transform .25s; }
[data-expand][aria-expanded="true"] .i-chev { transform: rotate(180deg); }
.apps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.apps[hidden] { display: none; }
.app { background: var(--tile); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; animation: pop .4s both; }
.app:nth-child(2) { animation-delay: .04s; } .app:nth-child(3) { animation-delay: .08s; } .app:nth-child(4) { animation-delay: .12s; } .app:nth-child(5) { animation-delay: .16s; } .app:nth-child(6) { animation-delay: .2s; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.app img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #111; }
.app-b { padding: 14px 16px 16px; }
.app-b h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.app-b p { color: var(--muted); font-size: .9rem; }
.app-a { display: flex; gap: 14px; margin-top: 10px; font-weight: 700; font-size: .88rem; }
.app-a a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.app-a a:first-child { color: var(--accent); }
.app-a .icon { width: .95em; }

/* faq */
.tile-faq { grid-column: span 8; }
.qas { display: grid; gap: 8px; }
.qa { background: var(--bg); border-radius: 16px; }
.qa summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { transition: transform .2s; color: var(--muted); }
.qa[open] summary .icon { transform: rotate(180deg); }
.qa p { padding: 0 16px 16px; color: var(--muted); }

/* responsive */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile { grid-column: span 3; } .tile-hero { grid-column: span 6; grid-row: auto; padding: 32px; }
  .tile-apps, .tile-faq { grid-column: span 6; } .apps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .tile, .tile-hero, .tile-apps, .tile-faq { grid-column: 1 / -1; }
  .tile { padding: 22px; } .tile-hero { padding: 26px 22px; }
  .apps { grid-template-columns: 1fr; }
  .start .btn { width: 100%; }
  .tile:hover { transform: none; }
}

/* docs */
.doc-head { padding: 28px 4px 12px; }
.doc-head h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -.05em; }
.bento-doc .tile { grid-column: span 6; }
.bento-doc .tile:first-child { grid-column: span 12; background: linear-gradient(135deg, var(--lilac), var(--pink)); }
:root.dark .bento-doc .tile:first-child { background: linear-gradient(135deg, color-mix(in srgb, var(--lilac) 22%, var(--tile)), var(--tile)); }
.doc-tile:hover { transform: none; }
.doc-tile p + p, .doc-tile p + ul { margin-top: 10px; }
.doc-tile a { font-weight: 700; color: var(--accent); }
.big { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.rules { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.rules li::marker { font-weight: 800; color: var(--accent); }
.bento-doc code { background: var(--bg); padding: .1em .4em; border-radius: 6px; }
@media (max-width: 1000px) { .bento-doc .tile, .bento-doc .tile:first-child { grid-column: span 6; } }
@media (max-width: 640px) { .bento-doc .tile, .bento-doc .tile:first-child { grid-column: 1 / -1; } }
.nf { grid-column: 1 / -1 !important; text-align: center; padding: 64px 24px; }
.nf-code { font-family: var(--mono); font-size: clamp(4rem, 15vw, 8rem); font-weight: 800; line-height: 1; color: var(--accent); }
.nf h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 8px; }
.nf .lead { margin: 12px auto 0; }
.nf .joins { justify-content: center; }

/* footer */
.foot { padding: 8px 0 32px; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a { color: inherit; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tile:hover { transform: none; }
  .js .chat li { opacity: 1; transform: none; }
}
:root.dark .start input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
:root.dark .start input:focus { border-color: var(--accent); }
.tile-native { display: flex; flex-direction: column; }
.tile-native .tile-txt { margin-top: 12px; }
@media (max-width: 640px) { .tile-chat { min-height: 300px; } .chat { flex: none; } }

/* responsive: bigger footer tap targets on phones */
@media (max-width: 699px) { .foot a { display: inline-block; padding: 6px 0; } }
