/* ==========================================================================
   Boyang Hardware — site stylesheet
   Design goals: fast (single file, system fonts, no external requests),
   readable, print-friendly, and structured so content is never hidden
   behind JavaScript.
   ========================================================================== */

:root {
    --ink: #0d1520;
    --ink-2: #33475b;
    --muted: #61758a;
    --line: #e3e8ee;
    --line-2: #ccd6e0;
    --bg: #ffffff;
    --soft: #f5f8fa;
    --soft-2: #eef3f7;
    --accent: #0b5cab;
    --accent-d: #08437c;
    --accent-l: #e8f1fb;
    --amber: #9a5b06;
    --amber-l: #fdf5e8;
    --teal: #0f6b62;
    --teal-l: #e6f4f2;
    --red: #a32020;
    --red-l: #fdecec;
    --radius: 10px;
    --radius-s: 6px;
    --shadow: 0 1px 2px rgba(13, 21, 32, .06), 0 10px 28px -16px rgba(13, 21, 32, .22);
    --maxw: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 .5em;
    font-weight: 650;
    letter-spacing: -.01em;
}

h1 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: 1.16rem; margin-top: 1.8em; }
h4 { font-size: 1.02rem; margin-top: 1.4em; }

p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.35em; }
li { margin-bottom: .4em; }

strong { font-weight: 650; }
small { font-size: .85rem; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: #fff; padding: .6em 1em; z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Utility bar ---------- */
.utility {
    background: var(--ink); color: #c7d4e0; font-size: .82rem;
}
.utility .wrap {
    display: flex; flex-wrap: wrap; gap: 6px 22px;
    justify-content: space-between; align-items: center; padding-block: 8px;
}
.utility a { color: #dbe6f0; }
.utility span { display: inline-flex; gap: 7px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; min-height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, var(--accent), #127bbf);
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: .95rem; letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 680; font-size: 1.02rem; }
.brand-sub { font-size: .74rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.site-nav a {
    color: var(--ink-2); font-size: .92rem; font-weight: 500;
    padding: 8px 11px; border-radius: var(--radius-s);
}
.site-nav a:hover { background: var(--soft-2); text-decoration: none; color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-l); font-weight: 600; }
.site-nav a.nav-cta {
    background: var(--accent); color: #fff; font-weight: 600; margin-left: 8px;
}
.site-nav a.nav-cta:hover { background: var(--accent-d); }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .84rem; color: var(--muted); padding-top: 20px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.crumbs li { margin: 0; display: flex; gap: 7px; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current="page"] { color: var(--ink-2); }

/* ---------- Sections ---------- */
main { display: block; }
section { padding-block: 46px; }
section.tight { padding-block: 26px; }
section.soft { background: var(--soft); border-block: 1px solid var(--line); }
section.ink { background: var(--ink); color: #d9e3ec; }
section.ink h2, section.ink h3 { color: #fff; }
section.ink a { color: #8fc4f5; }

.hero {
    background:
            radial-gradient(1100px 420px at 82% -12%, #eaf3fd 0%, rgba(234, 243, 253, 0) 62%),
            linear-gradient(180deg, #fbfcfe, #fff);
    border-bottom: 1px solid var(--line);
    padding-block: 44px 52px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 46px; align-items: start; }
.eyebrow {
    display: inline-block; font-size: .76rem; font-weight: 650; letter-spacing: .1em;
    text-transform: uppercase; color: var(--accent); background: var(--accent-l);
    padding: 5px 11px; border-radius: 100px; margin-bottom: 16px;
}
.lede { font-size: 1.09rem; color: var(--ink-2); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
    border-radius: var(--radius-s); font-weight: 600; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--soft); text-decoration: none; }

/* ---------- Answer box ---------- */
.answer {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 22px 6px;
    box-shadow: var(--shadow);
    margin-bottom: 4px;
}
.answer .label {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--accent); display: block; margin-bottom: 8px;
}
.answer p { font-size: 1.03rem; }
.answer p:last-child { margin-bottom: 14px; }

/* ---------- Fact strip ---------- */
.facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.fact {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 17px;
}
.fact .num { font-size: 1.5rem; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; }
.fact .num .unit { font-size: .86rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.fact .lbl { font-size: .82rem; color: var(--muted); margin-top: 3px; }
section.soft .fact { background: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 21px;
}
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .tag {
    font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); display: block; margin-bottom: 8px;
}
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
a.card h3 { color: var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.3em; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
caption {
    text-align: left; font-size: .84rem; color: var(--muted);
    padding: 13px 16px 3px; font-weight: 600;
}
th, td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
    background: var(--soft-2); font-weight: 650; font-size: .82rem;
    letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2);
    white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yes { color: var(--teal); font-weight: 650; }
.no { color: var(--red); font-weight: 650; }
.part { color: var(--amber); font-weight: 650; }

/* ---------- Callouts ---------- */
.callout {
    border-radius: var(--radius); padding: 17px 20px; margin: 0 0 1.3em;
    border: 1px solid var(--line); background: var(--soft); font-size: .95rem;
}
.callout :last-child { margin-bottom: 0; }
.callout .label { font-weight: 680; display: block; margin-bottom: 5px; }
.callout.note { background: var(--accent-l); border-color: #c6ddf5; }
.callout.warn { background: var(--amber-l); border-color: #ecd7ad; }
.callout.verify { background: var(--teal-l); border-color: #bfe0dc; }

/* ---------- Lists with ticks ---------- */
ul.ticks { list-style: none; padding-left: 0; }
ul.ticks li { position: relative; padding-left: 24px; }
ul.ticks li::before {
    content: ""; position: absolute; left: 4px; top: .62em;
    width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
ul.ticks li.amber::before { background: var(--amber); }

/* ---------- FAQ ---------- */
details.faq {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; margin-bottom: 10px; padding: 0;
}
details.faq > summary {
    cursor: pointer; padding: 15px 19px; font-weight: 620; font-size: 1rem;
    list-style: none; display: flex; gap: 12px; align-items: flex-start;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::before {
    content: "+"; flex: none; width: 20px; height: 20px; margin-top: 2px;
    display: grid; place-items: center; border-radius: 4px;
    background: var(--accent-l); color: var(--accent); font-weight: 700; font-size: .9rem;
}
details.faq[open] > summary::before { content: "\2212"; }
details.faq[open] > summary { border-bottom: 1px solid var(--line); }
details.faq .body { padding: 15px 19px 4px 51px; }
details.faq .body :last-child { margin-bottom: 14px; }

/* ---------- Meta / freshness ---------- */
.page-meta {
    display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
    font-size: .84rem; color: var(--muted);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding-block: 11px; margin-bottom: 30px;
}
.page-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }
.page-meta span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- TOC ---------- */
.toc {
    background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 17px 20px; font-size: .93rem;
}
.toc .label {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 9px;
}
.toc ol { margin: 0; padding-left: 1.15em; }
.toc li { margin-bottom: .3em; }

/* ---------- Two column doc layout ---------- */
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 44px; align-items: start; }
.doc-aside { position: sticky; top: 90px; display: grid; gap: 16px; }

/* ---------- Contact block ---------- */
.addr { font-style: normal; }
.addr strong { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9db0c2; padding-block: 48px 26px; font-size: .9rem; }
.site-footer h3 {
    color: #fff; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
    margin: 0 0 13px; font-weight: 700;
}
.site-footer a { color: #b9cbdb; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-bottom {
    border-top: 1px solid #24313e; margin-top: 34px; padding-top: 18px;
    display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
    font-size: .82rem; color: #7b8fa2;
}
.entity-line { font-size: .82rem; color: #7b8fa2; margin-top: 14px; line-height: 1.6; }

/* ---------- Image slots (swap in real photography before launch) ---------- */
.imgslot {
    border: 1px dashed var(--line-2); border-radius: var(--radius);
    background: repeating-linear-gradient(135deg, #fbfcfd, #fbfcfd 11px, #f2f6f9 11px, #f2f6f9 22px);
    padding: 26px 22px; text-align: center; color: var(--muted); font-size: .87rem;
}
.imgslot strong { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: .93rem; }
.imgslot code {
    font-family: var(--mono); font-size: .8rem; color: var(--ink-2);
    background: #fff; border: 1px solid var(--line); border-radius: 4px;
    padding: 2px 7px; display: inline-block; margin-top: 6px;
}

/* ---------- Misc ---------- */
.mono { font-family: var(--mono); font-size: .87em; }
.tagrow { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 1.1em; padding: 0; list-style: none; }
.tagrow li { margin: 0; font-size: .8rem; background: var(--soft-2); border: 1px solid var(--line);
    color: var(--ink-2); padding: 3px 10px; border-radius: 100px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.nowrap { white-space: nowrap; }

@media (max-width: 940px) {
    .hero-grid { grid-template-columns: 1fr; gap: 30px; }
    .doc-grid { grid-template-columns: 1fr; }
    .doc-aside { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .utility .wrap { justify-content: flex-start; }
    .site-nav a { padding: 7px 8px; font-size: .88rem; }
    .site-nav a.nav-cta { margin-left: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    section { padding-block: 34px; }
    details.faq .body { padding-left: 19px; }
}

@media print {
    .utility, .site-header, .site-footer, .cta-row { display: none; }
    body { font-size: 11pt; }
    details.faq { break-inside: avoid; }
    details.faq[open] > summary::before { content: ""; }
    section { padding-block: 12pt; }
}
