/* Oracle's Library (3 Dec 2026, public/library.js): Oracle's own design, light and dark, with a reading layout for long documents. The
   documents' own type (the house style, the same as their PDFs) comes from /api/library/style.css, kept to .lib-doc. */
.shell.lib-page .main { max-width: 1400px; }
.lib { max-width: 1320px; margin: 0 auto; }
.lib .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lib-crumbs a { color: var(--muted); } .lib-crumbs .sep { color: var(--axis); }
.lib-h2 { font-size: 16px; font-weight: 650; margin: 26px 0 10px; }
.lib-loading { padding: 60px 0; text-align: center; }
.lib-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.lib-hero p { margin: 6px 0 0; max-width: 640px; }
.lib-searchwrap { position: relative; margin: 0 0 22px; }
.lib-searchwrap > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.lib-searchwrap svg { width: 19px; height: 19px; display: block; }
.lib input[type=search].lib-search { width: 100%; min-height: 50px; font-size: 16px; padding: 13px 16px 13px 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.lib input[type=search].lib-search:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.lib-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lib-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; color: var(--ink); min-height: 168px; transition: border-color .15s; }
.lib-tile:hover { text-decoration: none; border-color: var(--accent); }
.lib-tile b { font-size: 16.5px; } .lib-tile .muted { font-size: 13.5px; line-height: 1.45; flex: 1; }
.lib-ti { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.lib-ti svg { width: 20px; height: 20px; }
.lib-count { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.lib-recent { padding: 16px 18px; margin-top: 18px; } .lib-recent h2 { font-size: 15px; margin: 0 0 8px; } .lib-recent ul { margin: 0; padding-left: 18px; } .lib-recent li { margin: 3px 0; }
.lib-results { margin-bottom: 20px; }
.lib-rgroup h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.lib-result { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); border: 1px solid transparent; }
.lib-result:hover { background: var(--surface); border-color: var(--line); text-decoration: none; }
.lib-result b { display: block; } .lib-result .muted { font-size: 13px; display: block; margin-top: 2px; }
.lib-doclist { display: flex; flex-direction: column; gap: 8px; }
.lib-docrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; color: var(--ink); flex-wrap: wrap; }
a.lib-docrow:hover { text-decoration: none; border-color: var(--accent); }
.lib-docrow > div:first-child { display: flex; flex-direction: column; min-width: 0; } .lib-docrow .muted { font-size: 13px; }
.lib-rowmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-id { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border-radius: 6px; padding: 2px 7px; color: var(--ink-2); white-space: nowrap; }
.lib-b { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.lib-b.draft { background: #fdeeea; color: #9b2b19; } .lib-b.good { background: #e5f4e5; color: var(--good-ink); } .lib-b.sent { background: var(--accent-soft); color: var(--accent-ink); }
.lib-b.show { background: #fbf1dc; color: #7a5b06; } .lib-b.exact { background: #e8f6fc; color: #0f6c95; } .lib-b.measured { background: #fbf5e3; color: #7a5b06; }
:root[data-theme="dark"] .lib-b.draft { background: #3a1c16; color: #f0a596; } :root[data-theme="dark"] .lib-b.good { background: #15301a; color: #7fd28a; } :root[data-theme="dark"] .lib-b.show, :root[data-theme="dark"] .lib-b.measured { background: #33290f; color: #e8c66b; } :root[data-theme="dark"] .lib-b.exact { background: #10303f; color: #8fd3f0; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .lib-b.draft { background: #3a1c16; color: #f0a596; } :root:where(:not([data-theme="light"])) .lib-b.good { background: #15301a; color: #7fd28a; } :root:where(:not([data-theme="light"])) .lib-b.show, :root:where(:not([data-theme="light"])) .lib-b.measured { background: #33290f; color: #e8c66b; } :root:where(:not([data-theme="light"])) .lib-b.exact { background: #10303f; color: #8fd3f0; } }
.lib-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* a document: its section's documents, the document, "On this page" */
.lib-reader { display: grid; grid-template-columns: 230px minmax(0, 760px) 210px; gap: 34px; align-items: start; justify-content: center; }
.lib-tree { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: 13.5px; padding-bottom: 20px; }
.lib-treehead { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 6px 0 8px 10px; }
.lib-tree a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--ink-2); line-height: 1.35; }
.lib-tree a:hover { background: var(--hover); text-decoration: none; } .lib-tree a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.lib-treebtn { display: none; margin-bottom: 10px; }
.lib-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: 13px; border-left: 1px solid var(--line); padding-left: 14px; }
.lib-toc b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.lib-toc a { display: block; padding: 3px 0; color: var(--muted); line-height: 1.35; } .lib-toc a.sub { padding-left: 12px; font-size: 12.5px; }
.lib-toc a.on { color: var(--accent-ink); font-weight: 600; } .lib-toc a:hover { color: var(--ink); text-decoration: none; }
.lib-article { min-width: 0; }
.lib-dochead { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 22px; }
.lib-kind { font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); }
.lib-dochead h1 { font-family: 'Michroma', var(--font); font-weight: 400; font-size: 26px; letter-spacing: .01em; margin: 6px 0 10px; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--ink-2); }
.lib-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.lib-popwrap { position: relative; }
.lib-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lib-popacts { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.lib-doc.guide h2 { font-size: 21px; font-weight: 700; margin: 28px 0 10px; scroll-margin-top: 20px; } .lib-doc.guide h3 { font-size: 16.5px; font-weight: 650; margin: 22px 0 8px; scroll-margin-top: 20px; } .lib-doc.guide h4 { font-size: 15px; margin: 16px 0 6px; }
.lib-doc.guide h2:first-child { margin-top: 0; }
.lib-doc .sec>h2, .lib-doc .sec h3 { scroll-margin-top: 20px; }
.lib-doc thead th { top: 0; }
.lib-doc .tw { overflow-x: visible; }
.lib-copy { position: absolute; top: 6px; right: 6px; min-height: 26px; padding: 2px 9px; font-size: 12px; opacity: .8; }

/* games */
.lib-filters { display: flex; gap: 10px; flex-wrap: wrap; } .lib-filter select { min-width: 150px; }
.lib-games { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.lib-game { color: var(--ink); display: flex; flex-direction: column; } .lib-game:hover { text-decoration: none; border-color: var(--accent); }
.lib-gart { aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-radius: var(--r) var(--r) 0 0; }
.lib-gart img { width: 100%; height: 100%; object-fit: cover; display: block; } .lib-gart b { font-size: 26px; color: var(--muted); }
.lib-gbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; } .lib-gbody > b { font-size: 15.5px; } .lib-gbody > .muted { font-size: 13px; }
.lib-gfacts { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; flex-wrap: wrap; }

/* a game */
.lib-band { position: relative; border-radius: 14px; overflow: hidden; min-height: 260px; display: flex; align-items: flex-end; background: #111; color: #fff; margin: 4px 0 14px; }
.lib-bandart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-bandshade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.78) 100%); }
.lib-bandin { position: relative; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.lib-bandin h1:not(.sr) { font-family: 'Michroma', var(--font); font-weight: 400; font-size: 30px; color: #fff; }
.lib-logo { max-width: min(380px, 70vw); max-height: 120px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.lib-pitch { margin: 0; font-size: 16px; line-height: 1.45; color: #f2f2f2; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.lib-band .lib-b { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); } .lib-band .lib-b.good { background: rgba(23,160,60,.55); } .lib-band .lib-b.draft { background: rgba(200,60,40,.6); }
.lib-gactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.lib-ver { min-width: 250px; } .lib-nodemo { font-size: 13px; align-self: flex-end; padding-bottom: 10px; }
.lib-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 16px; }
.lib-fact { padding: 12px 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; } .lib-fact:first-child { border-left: 0; }
.lib-fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; } .lib-fact b { font-size: 20px; font-variant-numeric: tabular-nums; } .lib-fact .s { font-size: 12px; color: var(--muted); }
.lib-prep { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lib-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.lib-tabs a { padding: 10px 14px; color: var(--ink-2); font-weight: 550; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.lib-tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); } .lib-tabs a:hover { text-decoration: none; color: var(--ink); }
.lib-panel { min-height: 200px; } .lib-panel > .lib-doc { max-width: 900px; }
.lib-pnote { margin: 0 0 14px; font-size: 13.5px; }
.lib-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; } .lib-cols .lib-h2:first-child { margin-top: 0; }
.lib-lead { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.lib-feats { margin: 0; } .lib-feats dt { font-weight: 650; margin-top: 12px; } .lib-feats dd { margin: 3px 0 0; color: var(--ink-2); line-height: 1.5; }
.lib-tablecard { padding: 4px 0; overflow-x: auto; } .lib-tablecard table { min-width: 520px; }
.lib-tnote { font-size: 13px; padding: 6px 12px 8px; margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.lib-rulehead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; } .lib-rulehead .muted { font-size: 13px; }
.lib-doc h3, .lib-doc h4 { text-transform: none; letter-spacing: 0; color: var(--ink); }
.lib-rules h3 { font-size: 17px; font-weight: 650; margin: 22px 0 8px; } .lib-rules h3:first-child { margin-top: 0; } .lib-rules ul { padding-left: 20px; }
.lib-syms { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.lib-sym { padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lib-sym img { width: 72px; height: 72px; object-fit: contain; } .lib-symph { width: 72px; height: 72px; border-radius: 10px; background: var(--surface-2); } .lib-sym b { font-size: 13.5px; } .lib-sym .muted { font-size: 12px; }
.lib-art { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; } .lib-art.shots { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lib-art figure { margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.lib-art img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--surface-2); display: block; }
.lib-art figcaption { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; align-items: flex-start; } .lib-art figcaption b { font-size: 12.5px; word-break: break-all; }
.lib-cert { padding: 16px 18px; margin-top: 18px; } .lib-cert .lib-h2 { margin-top: 0; }
.lib-certform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lib-fileshead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13.5px; }
.lib-sha { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); word-break: break-all; }
.lib-files td:first-child code { font-family: var(--mono); font-size: 12.5px; }

/* the pack builder */
.lib-builder { padding: 18px 20px; } .lib-builder .lib-h2 { margin-top: 0; }
.lib-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); } .lib-step > div > b { display: block; margin-bottom: 10px; }
.lib-stepn { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.lib-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lib-pk { text-align: left; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--ink); }
.lib-pk .muted { font-size: 12.5px; line-height: 1.4; } .lib-pk b { font-size: 15px; } .lib-pk[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.lib-gfind { margin-bottom: 8px; } .lib-gfind input { width: 100%; max-width: 320px; }
.lib-gpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; max-height: 280px; overflow: auto; padding: 4px 2px; }
.lib-gp small { margin-left: 6px; font-size: 12px; }
.lib-opts { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; } .lib-opts .field input { min-width: 260px; }
.lib-buildrow { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 14px; }
.lib-buildstate { flex: 1; min-width: 240px; font-size: 13.5px; } .lib-buildstate.err { color: var(--critical); } .lib-buildstate.ok { color: var(--good-ink); }
.lib-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 6px 0 4px; max-width: 420px; } .lib-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }

@media (max-width: 1180px) { .lib-reader { grid-template-columns: 210px minmax(0, 1fr); } .lib-toc { display: none; } .lib-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lib-fact:nth-child(4) { border-left: 0; } .lib-fact:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 820px) {
  .lib-doc .tw { overflow-x: auto; }
  .lib-reader { grid-template-columns: minmax(0, 1fr); gap: 0; } .lib-treebtn { display: inline-flex; }
  .lib-tree { display: none; position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px; margin-bottom: 14px; } .lib-tree.open { display: block; }
  .lib-dochead h1 { font-size: 21px; } .lib-cols { grid-template-columns: minmax(0, 1fr); } .lib-certform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lib-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lib-fact:nth-child(odd) { border-left: 0; } .lib-fact:nth-child(4) { border-left: 1px solid var(--line); } .lib-fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lib-band { min-height: 210px; } .lib-bandin { padding: 16px; } .lib-pitch { font-size: 14.5px; }
  .lib-pop { width: min(300px, calc(100vw - 40px)); } .lib-opts .field input { min-width: 0; width: 100%; } .lib-opts .field { flex: 1 1 100%; }
}
