/* Build tab (views/build.js): the construction-tech briefing. Stories reuse the feed's .nx-list /
   .nx-item / .nx-tag; only what is new is here. Kindle mode's overrides are at the end. */
.bd-head { display: grid; gap: 10px; margin-top: 12px; }
.bd-head .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-grad); display: grid; place-items: center; color: #fff; }
.bd-head .ic svg { width: 26px; height: 26px; }
.bd-get .bd-spin { animation: spin 1s linear infinite; }
.bd-status { min-height: 18px; }
.bd-status.err { color: var(--bad); }
.bd-status .bar { margin-top: 2px; }

/* a story: the link, then its Turkish "why" behind Show Turkish (a button may not sit inside a link) */
.bd-card { border-bottom: 1px solid var(--line); }
.bd-card > .nx-item { border-bottom: 0; }
.bd-tr { padding: 0 2px 14px calc(96px + 16px); margin-top: -6px; }
.bd-why { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.bd-why svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--warn); }
.bd-why.ai svg { color: #a78bfa; }
[data-theme="light"] .bd-why.ai svg { color: #6d28d9; }
.bd-why-tr { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.bd-also { margin-top: 4px; }
.nx-tag.bd-topic { background: transparent; border: 1px solid var(--line-2); }
.bd-foot { margin-top: 24px; line-height: 1.5; }

/* the history: every update under its day (Today, Yesterday, Thu 30 Oct), older ones further down */
.bd-day { margin-top: 28px; }
.bd-day:first-child { margin-top: 22px; }

/* five tabs: "My reading" has to fit 64 px on a 320 px phone */
@media (max-width: 360px) { .nx-nav a { font-size: 9.5px; } .nx-nav a span { white-space: nowrap; } }
@media (min-width: 1000px) { .bd-tr { padding-left: calc(112px + 16px); } }
@media (min-width: 1280px) { .bd-tr { padding: 0 0 20px; margin-top: -8px; } }

/* ---------- Kindle mode: ink on paper, no colour (css/kindle.css has the rest) ---------- */
html[data-kindle] .bd-head .ic { background: var(--k-invert-bg); color: var(--k-invert-fg); border-radius: 10px; }
html[data-kindle] .bd-status { color: var(--k-ink-2); }
html[data-kindle] .bd-status.err { color: var(--k-ink); font-weight: 700; }
/* the button's busy loader turns in steps, like the app's spinners (it is k-motion: kindle.css leaves it moving) */
html[data-kindle] .bd-get .bd-spin { animation: spin 1s steps(8, end) infinite; }
html[data-kindle] .bd-card { border-bottom-color: var(--k-rule); }
html[data-kindle] .bd-day { color: var(--k-ink); }
html[data-kindle] .bd-day::after { background: var(--k-ink); }
html[data-kindle] .bd-older { background: var(--k-paper); color: var(--k-ink); border-color: var(--k-ink); box-shadow: none; }
html[data-kindle] :is(.bd-why, .bd-why-tr, .bd-also) { color: var(--k-ink-2); }
html[data-kindle] .bd-why svg,
html[data-kindle] .bd-why.ai svg { color: var(--k-ink); }
html[data-kindle] .nx-tag.bd-topic { background: transparent; border-color: var(--k-rule-2); color: var(--k-ink-2); }
/* pressed: the story turns to ink (kindle.css), its outlined topics with it */
html[data-kindle] .nx-item:active .nx-tag.bd-topic { color: var(--k-invert-fg) !important; border-color: var(--k-invert-fg); }
