/* The Sharp Factory website: tokens, base, header, drawer, footer, buttons, cards, home and the small pages. The site is dark only. */

/* ---------------------------------------------------------------- tokens */
:root {
    color-scheme: dark;
    --bg: #1C1F24;
    --surface: #24282E;
    --surface-2: #2A2F36;
    --border: #353B43;
    --border-strong: #464D57;
    --text: #E6E9ED;
    --text-2: #AEB6C0;
    --text-3: #98A1AB;
    --accent: #56AEFF;
    --link: #56AEFF;
    --primary: #2A74C4;
    --primary-hover: #3582D2;
    --sel: #23384F;
    --sel-text: #8CC8FF;
    --note-bg: #1D2B3A; --note-border: #2D4E73; --note-fg: #8CC8FF;
    --tip-bg: #1E2E23; --tip-border: #2F5E3A; --tip-fg: #81C784;
    --warn-bg: #33291A; --warn-border: #6B5320; --warn-fg: #F2B84B;
    --danger-bg: #3A2323; --danger-border: #6A2E2B; --danger-fg: #FF8A80;
    --code-bg: #16191D;
    --code-head: #1E2227;
    --code-border: #30363D;
    --footer-bg: #16191D;
    --shadow: 0 16px 40px rgb(0 0 0 / .45);
    --scrim: rgb(0 0 0 / .55);
}

:root {
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", "Cascadia Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --header-h: 64px;
    --pad: clamp(20px, 5vw, 72px);
    --radius: 8px;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--text); margin: 0; line-height: 1.25; }

p { margin: 0 0 16px; }

code, kbd, pre { font-family: var(--mono); font-feature-settings: "liga" 0, "clig" 0, "calt" 0; }

:not(pre) > code {
    font-size: .9em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    overflow-wrap: anywhere;
}

kbd {
    font-size: 11.5px;
    color: var(--text-3);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    padding: 1px 6px;
    background: var(--surface-2);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: 600 15px/1 var(--sans);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-3); }
.btn-lg { height: 48px; font-size: 15.5px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-icon { width: 36px; height: 36px; padding: 0; background: transparent; color: var(--text-2); border: 1px solid var(--border-strong); }
.btn-icon:hover { color: var(--text); border-color: var(--text-3); }
.link-arrow { font-weight: 600; }

/* ---------------------------------------------------------------- header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 16px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }

.site-nav { display: flex; align-items: stretch; gap: 26px; height: 100%; }
.site-nav a {
    display: flex;
    align-items: center;
    color: var(--text-2);
    font-size: 14.5px;
    font-weight: 500;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 260px;
    height: 34px;
    padding: 0 8px 0 10px;
    margin-left: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text-3);
    font: 14px var(--sans);
    cursor: pointer;
}
.header-search span { flex: 1; text-align: left; }
.header-search:hover { border-color: var(--text-3); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-search + .header-actions { margin-left: 0; }
.header-github { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.header-github:hover { color: var(--text); text-decoration: none; }
.menu-button, .search-button { display: none; }

@media (max-width: 959px) {
    .site-header__inner { padding: 0 12px 0 16px; gap: 8px; }
    .site-nav, .header-search, .header-github, .header-download { display: none; }
    .menu-button, .search-button { display: inline-flex; border: none; width: 44px; height: 44px; }
    .search-button { margin-left: auto; }
}

/* ---------------------------------------------------------------- drawer (phone navigation, docs tree) */
dialog.drawer {
    margin: 0;
    padding: 0;
    width: min(320px, 88vw);
    max-width: none;
    height: 100%;
    max-height: none;
    border: none;
    border-right: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
dialog.drawer::backdrop { background: var(--scrim); }
dialog.drawer[open] { animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(-24px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); }
.drawer__body { padding: 12px 16px 32px; overflow-y: auto; height: calc(100% - var(--header-h)); }
.drawer__links { display: grid; gap: 2px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.drawer__links a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; color: var(--text); border-radius: 6px; }
.drawer__links a:hover { background: var(--surface-2); text-decoration: none; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--border); color: var(--text-2); }
.site-footer__inner { max-width: 1136px; margin: 0 auto; padding: 64px var(--pad) 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { font-size: 14.5px; margin: 14px 0 6px; max-width: 30em; }
.footer-col h2 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { line-height: 28px; font-size: 14.5px; }
.footer-col a { color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-3); }
.footer-bottom a { color: var(--text-3); }
@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 479px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; align-items: flex-start; } }

/* ---------------------------------------------------------------- shared page pieces */
.container { max-width: 1136px; margin: 0 auto; padding: 0 var(--pad); }
.section { padding: 96px 0; }
.section--band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--link); margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 1.4rem + 1.2vw, 34px); font-weight: 700; margin-bottom: 14px; }
.lead { font-size: 18px; color: var(--text-2); line-height: 1.6; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--border-strong); text-decoration: none; }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--sel); color: var(--accent); }
/* step numbers sit in the logo gear; a thin shaft joins the gears of one row (How it works, Quick start) */
.step-badge { position: relative; z-index: 2; display: inline-block; width: 36px; height: 36px; color: var(--accent); flex: none; }
.step-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--surface); stroke: currentColor; stroke-width: 1.5px; overflow: visible; transition: rotate .6s cubic-bezier(.2, .8, .2, 1); }
.step-badge > span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 14px/1 var(--sans); color: var(--sel-text); }
.is-in .step-badge svg { rotate: 36deg; }
.is-in > :nth-child(2) .step-badge svg { transition-delay: .12s; }
.is-in > :nth-child(3) .step-badge svg { transition-delay: .24s; }
.is-in > :nth-child(4) .step-badge svg { transition-delay: .36s; }
.is-in > :nth-child(5) .step-badge svg { transition-delay: .48s; }
@media (max-width: 599px) { .section { padding: 56px 0; } }

/* the copyable command line */
.cli {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 8px 0 16px;
    border-radius: 10px;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    font: 13px var(--mono);
    color: #D4D4D4;
    max-width: 100%;
}
.cli code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; border: none; padding: 0; font-size: inherit; }
.cli .p { color: #6B737D; user-select: none; }
.cli .c { color: #DCDCAA; }
.cli .a { color: #9CDCFE; }
.cli .f { color: #6A9955; }

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 9px;
    border-radius: 6px;
    border: 1px solid #3A4048;
    background: transparent;
    color: #A0A8B2;
    font: 500 12.5px var(--sans);
    cursor: pointer;
    flex: none;
}
.copy-btn:hover { color: #E6E9ED; border-color: #5B636E; }
.code-block__head .copy-btn { min-width: 88px; justify-content: center; }
/* copy: the icon becomes a cog, the cog turns a quarter, and lands as the check */
.copy-btn .copy-icons { position: relative; display: inline-block; width: 16px; height: 16px; flex: none; }
.copy-btn .copy-icons .icon { position: absolute; inset: 0; transition: opacity .06s; }
.copy-btn .i-cog, .copy-btn .i-check { opacity: 0; }
.copy-btn .i-cog { fill: none; stroke: currentColor; stroke-width: 7; overflow: visible; }
.copy-btn[data-state="turning"] .i-copy { opacity: 0; }
.copy-btn[data-state="turning"] .i-cog { opacity: 1; animation: cog-quarter .24s .06s cubic-bezier(.2, .8, .2, 1) both; }
.copy-btn[data-state="done"] { color: #81C784; border-color: #2F5A3A; background: #1E3A26; }
.copy-btn[data-state="done"] .i-copy { opacity: 0; }
.copy-btn[data-state="done"] .i-check { opacity: 1; animation: pop .06s ease-out both; }
@keyframes cog-quarter { from { rotate: 0deg; } to { rotate: 90deg; } }
@keyframes pop { from { scale: .6; } to { scale: 1; } }
@keyframes g-cw { to { rotate: 360deg; } }

/* ---------------------------------------------------------------- code blocks */
.code-block { margin: 24px 0; background: var(--code-bg); border: 1px solid var(--code-border); border-radius: 10px; overflow: hidden; }
.code-block__head { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 8px 0 16px; background: var(--code-head); border-bottom: 1px solid var(--code-border); }
.code-block__lang { font: 600 12.5px var(--sans); color: #8B949E; }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; tab-size: 4; counter-reset: ln; }
.code-block code { display: block; background: none; border: none; padding: 0; color: #D4D4D4; font-size: inherit; white-space: pre; }
.code-block .line { display: block; min-height: 1.65em; }
.code-block .line::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 2.5ch; margin-right: 18px; text-align: right; color: #6B737D; user-select: none; }
.code-block.no-ln .line::before { content: none; }

/* C# colours (classes from the CSharpCodeTag highlighter) */
.csharp_keyword, .csharp_keyword_control { color: #569CD6; }
.csharp_keyword_control { color: #C586C0; }
.csharp_class_name, .csharp_type, .csharp_structure, .csharp_delegate_name, .csharp_module { color: #4EC9B0; }
.csharp_enum_name, .csharp_interface_name, .csharp_generic_type_param { color: #B8D7A3; }
.csharp_method, .csharp_ext_method { color: #DCDCAA; }
.csharp_variable, .csharp_local, .csharp_parameter, .csharp_property, .csharp_field, .csharp_enum_member, .csharp_event_name, .csharp_constant, .csharp_label { color: #9CDCFE; }
.csharp_namespace_name { color: #D4D4D4; }
.csharp_string_literal { color: #CE9178; }
.csharp_comment { color: #6A9955; }
.csharp_number { color: #B5CEA8; }
.csharp_hyperlink { color: #56AEFF; text-decoration: underline; }
.csharp_preprocessor_tag, .csharp_preprocessor_text { color: #9B9B9B; }
.csharp_operator_name, .csharp_symbol_definition, .csharp_symbol_reference { color: #D4D4D4; }

/* a soft shadow at the right edge while a code line runs past it (it scrolls) */
.code-block pre, .cli code {
    background:
        linear-gradient(to right, var(--code-bg) 30%, rgb(22 25 29 / 0)) left / 32px 100% no-repeat local,
        linear-gradient(to left, var(--code-bg) 30%, rgb(22 25 29 / 0)) right / 32px 100% no-repeat local,
        linear-gradient(to right, rgb(0 0 0 / .55), transparent) left / 16px 100% no-repeat scroll,
        linear-gradient(to left, rgb(0 0 0 / .55), transparent) right / 16px 100% no-repeat scroll;
    background-color: var(--code-bg);
}

/* ---------------------------------------------------------------- home */
/* the hero: a drive train of three meshed copies of the logo gear (18, 10 and 6 teeth cut at one tooth size, so they mesh),
   at the right, behind and around the screenshot; the headline column stays clear */
.hero { position: relative; overflow: hidden; }
.hero__inner { position: relative; }
.hero__inner > :not(.hero-gears) { position: relative; z-index: 1; }
.hero-gears {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(#000 496px, transparent 726px);
    mask-image: linear-gradient(#000 496px, transparent 726px);
}
.g { position: absolute; fill: none; stroke: #FFFFFF; stroke-width: 2; overflow: visible; }
.g-big { right: -80px; top: -204px; width: 520px; height: 520px; stroke-opacity: .20; }
.g-mid { right: -162px; top: 237px; width: 301px; height: 301px; stroke-opacity: .15; transform: rotate(6deg); }
.g-small { right: 82px; top: 402px; width: 192px; height: 192px; stroke-opacity: .11; }
@media (max-width: 1099px) {
    .g-mid, .g-small { display: none; }
    .g-big { right: -120px; top: -160px; width: 360px; height: 360px; }
}
@media (max-width: 599px) { .hero-gears { display: none; } }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px; max-width: 1320px; }
.hero h1 { font-size: clamp(2.25rem, 1.3rem + 3vw, 3.25rem); line-height: 1.12; font-weight: 750; letter-spacing: -.01em; }
.hero .lead { font-size: 18.5px; margin: 20px 0 28px; max-width: 30em; }
.hero .cli { margin-bottom: 24px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__download { margin-top: 22px; font-size: 15px; }
.hero__download small { display: block; margin-top: 4px; font-size: 13px; color: var(--text-3); }
.hero__shot img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero__shot figcaption { margin-top: 12px; font-size: 13px; color: var(--text-3); }
@media (max-width: 1099px) { .hero__inner { grid-template-columns: minmax(0, 1fr); padding-top: 48px; } }
@media (max-width: 599px) {
    .hero__inner { padding-top: 32px; padding-bottom: 56px; gap: 32px; }
    .hero__ctas .btn { flex: 1 1 100%; }
    .cli { font-size: 12px; height: 44px; }
}

.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; padding: 24px var(--pad); background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 15px; font-weight: 500; list-style: none; }
.trust .icon { color: var(--accent); width: 18px; height: 18px; }
.trust ul { display: contents; }

.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.steps::before { content: ""; position: absolute; z-index: 1; top: 43px; height: 1px; left: 43px; right: calc((100% - 48px) / 3 - 43px); background: rgb(86 174 255 / .35); }
.steps .card { display: flex; flex-direction: column; gap: 12px; }
.steps h3 { font-size: 19px; font-weight: 600; }
.steps p { color: var(--text-2); font-size: 15px; margin: 0; }
.steps img { margin-top: auto; border-radius: var(--radius); border: 1px solid var(--border); aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; }
@media (max-width: 899px) {
    .steps { grid-template-columns: minmax(0, 1fr); }
    .steps img { display: none; }
    .steps::before { display: none; }
    .steps .card { position: relative; }
    .steps .card:not(:last-child)::after { content: ""; position: absolute; z-index: 1; left: 42px; top: calc(100% + 1px); width: 1px; height: 24px; background: rgb(86 174 255 / .35); }
}

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
@media (max-width: 1099px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .features { grid-template-columns: minmax(0, 1fr); } }
.features h3 { font-size: 17px; font-weight: 600; margin: 16px 0 8px; }
.features p { font-size: 14.5px; line-height: 1.55; color: var(--text-2); margin: 0; }

.showcase { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 48px; align-items: center; }
.showcase .lead { font-size: 17px; }
@media (max-width: 899px) { .showcase { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- small pages */
.page { max-width: 880px; margin: 0 auto; padding: 56px var(--pad) 96px; }
.page--narrow { max-width: 800px; }
.page h1 { font-size: clamp(32px, 1.6rem + 1.4vw, 40px); font-weight: 700; margin-bottom: 12px; }
.page > .lead { margin-bottom: 40px; }

.qs-steps { list-style: none; margin: 0 0 56px; padding: 0; }
.qs-steps > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 20px; position: relative; padding-bottom: 32px; }
.qs-steps > li:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 18px; bottom: -18px; width: 1px; background: rgb(86 174 255 / .35); }
.qs-steps .step-badge svg { fill: var(--bg); }
.qs-steps h2 { font-size: 21px; font-weight: 600; margin: 4px 0 8px; }
.qs-steps p { color: var(--text-2); }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-top: 20px; }
.video { display: block; color: var(--text); background: none; border: none; padding: 0; text-align: left; cursor: pointer; font: inherit; }
.video:hover { text-decoration: none; }
.video__thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video__thumb .icon { position: absolute; left: 10px; bottom: 10px; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgb(0 0 0 / .7); color: #fff; }
.video__title { display: block; margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.video__player { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--radius); }
dialog.video-dialog { width: min(960px, 94vw); padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); }
dialog.video-dialog::backdrop { background: var(--scrim); }
.video-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; font-weight: 600; }
.video-dialog iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.contact-cards h2 { font-size: 18px; font-weight: 600; margin: 16px 0 6px; }
.contact-cards p { color: var(--text-2); font-size: 15px; margin-bottom: 14px; }
@media (max-width: 799px) { .contact-cards { grid-template-columns: minmax(0, 1fr); } }

.not-found { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1000px; padding-top: 96px; }
.not-found__art { position: relative; width: 320px; height: 236px; }
.not-found__art .gear { position: absolute; left: 0; top: 15px; width: 220px; height: 220px; fill: var(--surface); stroke: #8B949E; stroke-width: 2; overflow: visible; rotate: 108deg; }
.not-found__art .tooth { position: absolute; left: 244px; top: 192px; width: 50px; height: 35px; fill: var(--sel); stroke: var(--accent); stroke-width: 2; overflow: visible; rotate: 96deg; }
.not-found__art::after { content: ""; position: absolute; left: -40px; width: 400px; bottom: 0; height: 1px; background: var(--border-strong); }
.not-found__text .lead { margin: 0 0 28px; max-width: 34em; }
@media (max-width: 799px) {
    .not-found { grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; text-align: center; padding-top: 48px; }
    .not-found__art { width: 204px; height: 152px; }
    .not-found__art .gear { width: 140px; height: 140px; top: 11px; }
    .not-found__art .tooth { left: 154px; top: 124px; width: 32px; height: 22px; }
    .not-found__art::after { left: -60px; width: 324px; }
    .not-found__text .lead { margin: 0 auto 28px; }
    .not-found .not-found__search { margin-left: auto; margin-right: auto; }
    .not-found__actions { justify-content: center; }
}
.not-found__code { font: 700 15px/1 var(--mono); letter-spacing: .08em; color: var(--accent); margin-bottom: 12px; }
.not-found h1 { font-size: 28px; margin: 0 0 10px; }
.not-found__search { display: flex; width: min(480px, 100%); height: 48px; margin: 0 0 28px; font-size: 15px; }
.not-found__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.article h2 { font-size: 22px; font-weight: 650; margin: 40px 0 10px; }
.article p, .article li { color: var(--text-2); }
.article ul { padding-left: 24px; }
.meta { font-size: 13.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- search dialog */
dialog.search {
    width: min(640px, 94vw);
    margin-top: 10vh;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow);
}
dialog.search::backdrop { background: var(--scrim); }
.search__field { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; height: 56px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.search__field input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font: 16px var(--sans); }
.search__results { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
.search__results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); }
.search__results a:hover, .search__results a[aria-selected="true"] { background: var(--sel); text-decoration: none; }
.search__results .r-title { font-weight: 600; font-size: 15px; }
.search__results .r-path { font-size: 12.5px; color: var(--text-3); }
.search__results .r-snip { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.search__results mark { background: none; color: var(--link); font-weight: 600; }
.search__empty { padding: 24px 16px; color: var(--text-3); font-size: 14.5px; }
.search__loading { display: flex; align-items: center; gap: 10px; padding: 24px 16px; color: var(--text-2); font-size: 14px; }
.search__loading svg { width: 16px; height: 16px; fill: var(--accent); animation: g-cw 1.2s linear infinite; }
.search__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    dialog.drawer[open] { animation: none; }
    .step-badge svg { transition: none; }
    .copy-btn[data-state="turning"] .i-cog { animation: none; opacity: 0; }
    .copy-btn[data-state="turning"] .i-check { opacity: 1; }
    .copy-btn[data-state="done"] .i-check { animation: none; }
    .search__loading svg { animation: none; }
}
