:root {
  color-scheme: dark;
  --surface: #0d1012;
  --field: #121518;
  --border: #22262a;
  --text: #e7e2dc;
  --muted: #85807d;
  --brand: #ff514a;
  --success: #73c8a6;
  --snippet: #a9a4a0;
  --button-text: #090b0d;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --surface: #f5f2ee;
  --field: #ffffff;
  --border: #ccc5bd;
  --text: #22262a;
  --muted: #655e58;
  --snippet: #514b46;
  --brand: #b52c25;
  --success: #23634b;
  --button-text: #ffffff;
}
:root[data-theme="contrast"] {
  color-scheme: dark;
  --surface: #000000;
  --field: #090b0d;
  --border: #a9a4a0;
  --text: #ffffff;
  --muted: #c9c4be;
  --snippet: #e7e2dc;
  --brand: #ff756f;
  --success: #93eac5;
}
select { min-height: 44px; max-width: 100%; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: 4px; padding: 8px; }
select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.preference-grid label { display: block; }
.preference-grid select { display: block; margin: 6px 0 16px; }
.preference-grid fieldset { border: 1px solid var(--border); margin: 16px 0; padding: 16px; }
.preferences { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 24px; align-items: start; }
.preference-rail { min-width: 0; overflow-wrap: anywhere; }
.preference-rail nav { display: flex; flex-wrap: wrap; gap: 8px; }
.preference-rail a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; color: var(--text); border: 1px solid var(--border); border-radius: 4px; text-decoration: none; }
.preference-rail a:hover { border-color: var(--brand); }
.preference-rail p { margin: 16px 0; }
.preference-grid { min-width: 0; }
.preference-grid h2 { margin-top: 0; }
@media (max-width: 760px) { .preferences { grid-template-columns: minmax(0, 1fr); } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--text); font-size: 16px; line-height: 1.6; }
main { width: min(1240px, 100% - 48px); margin: 0 auto; padding: 32px 0 64px; }
.atlas-header { border-bottom: 2px solid var(--brand); padding: 10px 0; margin-bottom: 24px; display:flex; align-items:center; gap:24px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight:600; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 8px; }
.mark { color: var(--brand); font-size: 18px; line-height: 1; }
h1 { font-size: 23px; font-weight: 500; margin: 0; }
.kicker { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 2; padding: 10px 14px; background: var(--brand); color: var(--button-text); }
.skip-link:focus { top: 8px; }
.search-form { display: flex; align-items:center; gap: 8px; margin: 20px 0 28px; padding: 3px 3px 3px 12px; background:var(--field); border: 1px solid var(--border); border-radius: 4px; max-width:760px; }
.search-form:focus-within { border-color:var(--brand); box-shadow:0 0 0 1px var(--brand); }
input[type="search"] { min-width: 0; min-height: 44px; flex: 1; background: transparent; border: 0; outline:0; color: var(--text); padding: 8px 4px; font: 500 16px inherit; }
button { min-height: 44px; background: var(--brand); border: 1px solid var(--brand); border-radius: 4px; color: var(--button-text); cursor: pointer; font: 500 14px inherit; padding: 8px 14px; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.panel { border: 1px solid var(--border); border-radius: 4px; padding: 20px; background: var(--field); }
.panel h2 { font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.engine-messages { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.result { display:grid; grid-template-columns:36px minmax(0,1fr); gap:14px; border-top: 1px solid var(--border); padding: 14px 0; }
.result-number { display:flex; align-items:center; justify-content:center; height:24px; border:1px solid var(--border); border-radius:3px; color:var(--muted); font-size:11px; }
.result:hover .result-number { border-color:var(--brand); color:var(--brand); }
.result:first-child { border-top: 0; padding-top: 0; }
.result h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; max-width:64ch; }
.result a { color: var(--brand); }
.result p { margin: 0; color: var(--snippet); max-width:70ch; font-size:12.5px; }
.host { color:var(--success); font-size:11px; }
.category { border:1px solid var(--border); border-radius:3px; color:var(--muted); padding:0 8px; font-size:11px; }
.status { color: var(--success); margin: 8px 0; }
[hidden] { display: none !important; }
.sr-only, main > h1:first-child { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (forced-colors: active) { button, .skip-link { forced-color-adjust: none; border: 2px solid ButtonText; color: ButtonText; background: ButtonFace; } a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid Highlight; } }
@media (max-width: 560px) { main { width: min(100% - 20px, 960px); padding-top: 24px; } .search-form { flex-wrap: wrap; } .search-form button { width: 100%; } .result { grid-template-columns:28px minmax(0,1fr); gap:10px; } }
@media (prefers-reduced-motion: no-preference) { .loading { animation: pulse 1.2s ease-in-out infinite alternate; } @keyframes pulse { to { opacity: .45; } } }

.package-metadata { margin: 10px 0; color: var(--snippet); font-size: 11px; overflow-wrap: anywhere; }
.package-metadata > div { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0; }
.package-metadata dt { color: var(--muted); min-width: 10ch; }
.package-metadata dd { margin: 0; min-width: 0; }
.package-metadata a { color: var(--text); }
.infobox { margin: 16px 0; overflow-wrap: anywhere; }
.infobox img { display: block; max-width: 100%; height: auto; margin: 12px 0; }
.infobox a { color: var(--brand); }
.infobox .relatedTopics form { display: inline-block; max-width: 100%; margin: 4px 8px 4px 0; }
.infobox .relatedTopics button { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }

/* Private cookie preferences have no sidebar. Keep this layout independent
   from the legacy URL-preferences rail and constrain intrinsic fieldset widths. */
.native-preferences { display: block; width: 100%; min-inline-size: 0; overflow-wrap: anywhere; }
.native-preferences .preference-grid { width: 100%; min-inline-size: 0; max-inline-size: 100%; }
.native-preferences fieldset { min-inline-size: 0; max-inline-size: 100%; }
.native-preferences :is(legend, label, p, summary, li, details) { min-inline-size: 0; max-inline-size: 100%; overflow-wrap: anywhere; }
.native-preferences select { width: 100%; min-inline-size: 0; max-inline-size: 100%; }
.native-preferences ul { min-inline-size: 0; padding-inline-start: 20px; }
.native-preferences button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
