/* DeviceInBox — stage 2 layout */
:root {
  --blue: #2f5fb3;
  --blue-dark: #234a8c;
  --green: #5f7f1f;
  --green-bg: #eef4e2;
  --text: #1f2328;
  --muted: #5f6873;
  --line: #dfe3e8;
  --bg: #f5f7fa;
  --card: #fff;
  --warn-bg: #fff6e0;
  --warn-line: #f0d48a;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; margin: 1.2em 0 .5em; }
h1 { font-size: 1.7rem; margin-top: .3em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: .6em 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; word-break: break-all; }
.muted { color: var(--muted); }
pre { max-width: 100%; overflow-x: auto; background: #f3f5f8; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; }
pre code { word-break: normal; white-space: pre; font-size: .85rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.45rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 700; }
.brand .g { color: var(--green); }
.brand .b { color: var(--blue); }
.search { display: flex; flex: 1; max-width: 560px; margin-left: auto; }
.search input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #c5ccd5; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: .95rem; }
.search button { padding: 9px 16px; border: 0; background: var(--blue); color: #fff; font-weight: 600; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.search button:hover { background: var(--blue-dark); }
.search-big { max-width: none; margin: 16px 0; }
.search-big input { padding: 12px 14px; font-size: 1rem; }
.main-nav { background: var(--blue); }
.main-nav .wrap { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-top: 9px; padding-bottom: 9px; }
.main-nav a { color: #fff; font-weight: 600; font-size: .95rem; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; padding-top: 20px; padding-bottom: 32px; }
.content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px 28px; min-width: 0; }
.sidebar .box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.box-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; color: var(--muted); }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f0f2f5; font-size: .95rem; }
.cat-list li:last-child { border-bottom: 0; }
.count { color: var(--muted); font-size: .85rem; }

/* breadcrumbs */
.crumbs ol { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 7px; color: #9aa3ad; }

/* facts, badges */
.lead { color: var(--muted); margin-top: -.2em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0; padding: 14px 16px; background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: #e8edf5; color: #34495e; margin: 1px 4px 1px 0; white-space: nowrap; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.old { background: #f1f1f1; color: #6b6b6b; }
.product-img { float: right; margin: 0 0 12px 18px; width: 180px; border-radius: var(--radius); }

/* download */
.downloads { margin: 16px 0; display: grid; gap: 10px; }
.dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }
.dl-main { flex: 1; min-width: 200px; }
.dl-name { font-weight: 600; word-break: break-all; }
.dl-meta { font-size: .85rem; color: var(--muted); }
.btn { display: inline-block; padding: 9px 18px; border-radius: var(--radius); background: var(--green); color: #fff; font-weight: 700; white-space: nowrap; }
.btn:hover { background: #4d6918; text-decoration: none; }
.btn.secondary { background: #e8edf5; color: var(--blue-dark); }
.notice { padding: 12px 14px; border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: var(--radius); margin: 14px 0; }

/* tables */
.table-wrap { overflow-x: auto; margin: 10px 0 16px; }
table.list { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: #f3f5f8; font-weight: 600; white-space: nowrap; }
table.list tr:hover td { background: #fafbfd; }
table.list td.nowrap { white-space: nowrap; }
.id-cell { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; overflow-wrap: anywhere; }

/* grids */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 12px 0 20px; padding: 0; list-style: none; }
.cat-grid a { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; color: var(--text); font-weight: 600; }
.cat-grid a:hover { border-color: var(--blue); text-decoration: none; }
.link-grid { columns: 2 260px; column-gap: 24px; padding-left: 18px; }
.link-grid li { break-inside: avoid; margin: 3px 0; }

/* guides */
.steps { padding-left: 22px; }
.steps li { margin: 6px 0; }
.toc { background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin: 12px 0; }
.toc ol { margin: 4px 0; padding-left: 20px; }
.guide-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.guide-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.guide-list a { font-weight: 700; }

footer.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 18px 0 26px; font-size: .9rem; color: var(--muted); }
.site-footer p { margin: 4px 0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}
@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; gap: 10px; }
  .search { max-width: none; flex-basis: 100%; }
  .content { padding: 14px 14px 20px; border-left: 0; border-right: 0; border-radius: 0; }
  .layout { padding-left: 0; padding-right: 0; padding-top: 10px; }
  .sidebar { padding: 0 16px; }
  h1 { font-size: 1.4rem; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: 6px; font-size: .85rem; }
  .product-img { float: none; display: block; margin: 0 auto 12px; }
  .btn { width: 100%; text-align: center; }
}
