/* Design system. Tokens are OMEN's charcoal preset, so the store and the apps read as one family. */
:root {
	color-scheme: dark;
	--canvas: #0e0e0f;
	--sidebar: #151516;
	--panel: #121213;
	--inset: #1e1e20;
	--raised: #26262a;
	--line: #2c2c2f;
	--line-strong: #3f3f43;
	--ink: #e6e6e8;
	--muted: #8e8e93;
	--faint: #6e6e73;
	--primary: #d9d9dc;
	--accent: #4c8dff;
	--ok: #34c759;
	--err: #ff3b30;
	--warn: #ff9f0a;
	--live: #0a84ff;

	--text: system-ui, -apple-system, "Segoe UI", sans-serif;

	--gutter: clamp(.875rem, 2vw, 1.5rem);
	--gap: .75rem;
	--section: clamp(2rem, 4vw, 3rem);
	--ease: cubic-bezier(.2, .7, .1, 1);
	--head-h: 3.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 .9375rem/1.5 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
main { display: block; min-height: 60vh; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: #1f2a40; }

.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 200; padding: .5rem .85rem; border-radius: 6px; background: var(--primary); color: var(--canvas); transform: translateY(-300%); opacity: 0; pointer-events: none; }
.skip:focus { transform: none; opacity: 1; pointer-events: auto; }
.wrap { padding-inline: var(--gutter); max-width: 96rem; margin-inline: auto; }

.label { color: var(--muted); font-size: .6875rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem; margin-bottom: .75rem; }
.section-head h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.005em; }
.section-head p { color: var(--muted); font-size: .8125rem; max-width: 62ch; }
.section-head a { color: var(--muted); font-size: .8125rem; text-decoration: none; }
.section-head a:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: .4rem 1rem; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; font-weight: 500; line-height: 1.15; text-decoration: none; text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn--solid { background: var(--primary); color: #111112; }
.btn--solid:hover { background: #f0f0f2; }
.btn--ghost { background: var(--inset); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--raised); }
.btn[disabled], .btn.is-off { background: var(--inset); color: var(--muted); border-color: var(--line); cursor: not-allowed; }

/* Status pills: tinted, like OMEN's run states */
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .45rem; border: 1px solid rgb(255 159 10 / .35); border-radius: 5px; background: rgb(255 159 10 / .1); color: var(--warn); font-size: .6875rem; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.tag--ok { border-color: rgb(52 199 89 / .35); background: rgb(52 199 89 / .1); color: var(--ok); }
.tag--plain { border-color: var(--line-strong); background: var(--inset); color: var(--ink); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: var(--sidebar); }
.site-head__bar { display: flex; align-items: center; gap: 1.25rem; max-width: 96rem; min-height: var(--head-h); margin-inline: auto; padding-inline: var(--gutter); }
.wordmark { font-size: .9375rem; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; text-decoration: none; }
.site-nav { position: relative; display: flex; align-items: center; gap: .1rem; }
.site-nav a { position: relative; z-index: 1; padding: .35rem .65rem; border-radius: 6px; color: var(--muted); font-size: .8125rem; font-weight: 500; text-decoration: none; transition: color .15s; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav__mark { position: absolute; top: 0; left: 0; height: 100%; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 6px; background: var(--inset); opacity: var(--o, 0); transition: transform .22s var(--ease), width .22s var(--ease), opacity .15s; }
.site-tools { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.search-trigger { display: inline-flex; align-items: center; gap: .5rem; width: 15rem; height: 2.125rem; margin-right: .4rem; padding-inline: .6rem; border: 1px solid var(--line); border-radius: 7px; background: var(--inset); color: var(--muted); font-size: .8125rem; text-align: left; transition: border-color .15s; }
.search-trigger:hover { border-color: var(--line-strong); }
.search-trigger .icon { width: 15px; height: 15px; }
.search-trigger kbd { margin-left: auto; padding: 0 .3rem; border: 1px solid var(--line-strong); border-radius: 4px; font: inherit; font-size: .6875rem; }
.tool { position: relative; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 7px; color: var(--ink); text-decoration: none; transition: background-color .15s; }
.tool:hover { background: var(--inset); }
.tool .icon { width: 18px; height: 18px; }
.tool--menu, .tool--search { display: none; }
.cart-count { position: absolute; top: .2rem; right: .15rem; min-width: 1rem; height: 1rem; padding-inline: .2rem; border-radius: 100px; background: var(--accent); color: #fff; font-size: .625rem; font-weight: 600; line-height: 1rem; text-align: center; }
.cart-count[data-count="0"] { display: none; }

/* Dialogs */
dialog { color: inherit; border: 0; padding: 0; }
dialog::backdrop { background: rgb(0 0 0 / .6); }
.menu-sheet { position: fixed; inset: 0 0 0 auto; width: min(20rem, 88vw); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: .5rem .75rem 1rem; border-left: 1px solid var(--line); background: var(--sidebar); }
.menu-sheet[open] { display: flex; flex-direction: column; animation: sheet-in .2s var(--ease); }
.menu-sheet__top { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; padding-left: .5rem; }
.menu-sheet__nav { display: grid; gap: .1rem; margin-top: .5rem; }
.menu-sheet__nav a { display: flex; align-items: center; min-height: 2.75rem; padding-inline: .6rem; border-radius: 7px; font-size: .9375rem; font-weight: 500; text-decoration: none; }
.menu-sheet__nav a:hover { background: var(--inset); }
.menu-sheet__foot { display: grid; gap: .1rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.menu-sheet__foot > * { display: flex; align-items: center; min-height: 2.5rem; padding-inline: .6rem; border-radius: 7px; text-decoration: none; text-align: left; }
.menu-sheet__foot > *:hover { background: var(--inset); color: var(--ink); }
@keyframes sheet-in { from { opacity: 0; transform: translateX(.75rem); } }

.search-sheet { width: min(38rem, calc(100vw - 1.5rem)); max-height: min(70dvh, 32rem); margin: clamp(.75rem, 9vh, 5rem) auto auto; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); box-shadow: 0 8px 24px rgb(0 0 0 / .45); overflow: hidden; }
.search-sheet[open] { display: flex; flex-direction: column; }
.search-sheet__form { display: flex; align-items: center; gap: .5rem; padding: .25rem .25rem .25rem .75rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-sheet__form input { flex: 1; min-width: 0; height: 2.5rem; border: 0; outline: 0; background: none; color: var(--ink); font-size: .9375rem; }
.search-sheet__form input::placeholder { color: var(--faint); }
.search-sheet__form input::-webkit-search-cancel-button { display: none; }
.search-sheet__results { overflow: auto; padding: .35rem; }
.search-sheet__results:empty { display: none; }
.result { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .6rem; border-radius: 6px; font-size: .875rem; text-decoration: none; }
.result:hover, .result:focus-visible { background: var(--inset); }
.result small { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.search-sheet__none { padding: .6rem; color: var(--muted); font-size: .875rem; }

/* Empty states */
.empty { display: grid; justify-items: center; gap: .35rem; padding: clamp(2rem, 6vw, 3.5rem) 1rem; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--panel); text-align: center; }
.empty__title { font-size: 1rem; font-weight: 600; }
.empty__body { max-width: 44ch; margin-bottom: .6rem; color: var(--muted); font-size: .875rem; }

/* Page furniture */
.page-head { max-width: 96rem; margin-inline: auto; padding: clamp(1.25rem, 3vw, 2rem) var(--gutter) 1rem; }
.page-title { font-size: clamp(1.5rem, 2.6vw, 1.875rem); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.page-head__lede { margin-top: .3rem; max-width: 62ch; color: var(--muted); font-size: .875rem; }
.page-body { max-width: 96rem; margin-inline: auto; padding: 0 var(--gutter) var(--section); }
.prose { max-width: 44rem; }
.prose > * + * { margin-top: .9em; }
.prose h2 { margin-top: 1.75em; font-size: 1.125rem; font-weight: 600; }
.prose h3 { margin-top: 1.5em; font-size: 1rem; font-weight: 600; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose p, .prose li { color: #c8c8cc; }
.note { padding: .6rem .8rem; border: 1px solid rgb(255 159 10 / .35); border-radius: 7px; background: rgb(255 159 10 / .08); color: var(--warn) !important; font-size: .8125rem; }

.post-list { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.post-list a { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .75rem .9rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.post-list a:last-child { border-bottom: 0; }
.post-list a:hover { background: var(--inset); }
.post-list h2 { font-size: .9375rem; font-weight: 500; }
.post-list time { color: var(--muted); font-size: .8125rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--sidebar); padding: clamp(1.5rem, 3vw, 2.25rem) var(--gutter) 1.25rem; }
.site-foot__top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem clamp(2rem, 6vw, 5rem); max-width: 96rem; margin-inline: auto; }
.site-foot__mark { display: block; margin-bottom: .2rem; font-size: .9375rem; font-weight: 600; text-decoration: none; }
.site-foot__line { color: var(--muted); font-size: .8125rem; }
.site-foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 1rem; }
.site-foot h2 { margin-bottom: .4rem; color: var(--muted); font-size: .6875rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.site-foot li a { display: inline-block; padding: .2rem 0; color: #c8c8cc; font-size: .8125rem; text-decoration: none; }
.site-foot li a:hover { color: var(--ink); text-decoration: underline; }
.site-foot__small { max-width: 96rem; margin: 1.25rem auto 0; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--faint); font-size: .75rem; }

@media (max-width: 1100px) {
	.search-trigger { width: 11rem; }
}
@media (max-width: 960px) {
	.site-nav, .tool--wide, .search-trigger { display: none; }
	.tool--menu, .tool--search { display: inline-grid; }
	.site-foot__top { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.site-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The footer sits at the bottom on short pages. */
body { display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; }
