/* =========================================================================
 * damienbarrett.com — base design ("Current site" in the theme switcher)
 *
 * The bench, as a page: an aluminium work surface, one slab of ESD mat for
 * whatever is newest, and Kapton tape for anything that needs holding down
 * or pointing at. Everything else stays quiet.
 *
 * Type roles carry meaning:
 *   Archivo (expanded for display, normal for interface) — Notes and chrome
 *   Source Serif 4                                       — Write-up prose only
 *   JetBrains Mono                                       — Terminal commands and output only
 *
 * Every window on the page follows one contract so the OS skins in
 * skins.css can restyle it without knowing what is inside:
 *   .db-win > .win-titlebar + .db-win-head + .db-win-body
 * ========================================================================= */

.db-root {
  /* palette */
  --db-aluminium: #eef1f3;
  --db-surface: #ffffff;
  --db-graphite: #10202b;
  --db-graphite-soft: #4d5c66;
  --db-rule: #d3dade;
  --db-mat: #0b4a5e;
  --db-mat-deep: #073646;
  --db-mat-link: #0a6480;
  --db-kapton: #f2a900;
  --db-kapton-ink: #4a3100;
  --db-solved: #1f7a45;

  /* roles — the skin layer below re-points these, components never hard-code */
  --db-ink: var(--db-graphite);
  --db-muted: var(--db-graphite-soft);
  --db-line: var(--db-rule);
  --db-link: var(--db-mat-link);
  --db-font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --db-font-ui: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --db-font-prose: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --db-font-code: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --db-display-stretch: 118%;

  /* tokens the ported skins and switcher expect (same names as Beachball Help) */
  --ds-space-xs: 0.5rem;
  --ds-space-sm: 0.75rem;
  --ds-space-md: 1.5rem;
  --ds-text-xs: 0.8125rem;
  --ds-weight-semibold: 600;
  --ds-color-ink-soft: var(--db-graphite-soft);
  --ds-color-mat: var(--db-mat);
  --ds-color-mat-tint: #e3eef1;
  --ds-color-surface: #ffffff;
  --ds-color-line: var(--db-rule);
  --ds-radius-pill: 999px;
  --ds-shadow-card: 0 1px 2px rgba(16, 32, 43, 0.06);

  min-height: 100vh;
  background: var(--db-aluminium);
  color: var(--db-ink);
  font-family: var(--db-font-ui);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* :where() keeps the reset at zero specificity so any component rule wins. */
:where(.db-root) *, :where(.db-root) *::before, :where(.db-root) *::after { box-sizing: border-box; }
:where(.db-root) :is(h1, h2, h3, p, ul, ol, dl, dd, figure, pre) { margin: 0; }
:where(.db-root) :is(h1, h2, h3) { font-size: inherit; font-weight: inherit; }
:where(.db-root) :is(ul, ol) { padding: 0; list-style: none; }
:where(.db-root) a { color: inherit; text-decoration: none; }
:where(.db-root) :is(button, select) { font: inherit; }
.db-root :focus-visible { outline: 3px solid var(--db-kapton); outline-offset: 2px; }
.db-container { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 1.5rem; }
.db-num { font-variant-numeric: tabular-nums; }
.is-hidden { display: none !important; }
.db-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Header ---------- */
.db-header { background: var(--db-surface); border-bottom: 1px solid var(--db-rule); color: var(--db-graphite); font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; }
.db-header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; min-height: 4.25rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.db-wordmark { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 44px; }
.db-wordmark svg { width: 30px; height: 30px; flex: none; }
.db-wordmark-name { font-stretch: 118%; font-weight: 750; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.1; }
.db-wordmark-role { display: block; font-stretch: 100%; font-weight: 450; font-size: 0.8125rem; letter-spacing: 0; color: var(--db-graphite-soft); }
.db-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin-left: auto; }
.db-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 550; font-size: 0.9875rem; border-bottom: 2px solid transparent; }
.db-nav a:hover { border-bottom-color: var(--db-rule); }
.db-nav a[aria-current="page"] { border-bottom-color: var(--db-mat); }
.bb-theme-toggle { min-height: 40px; max-width: 100%; }

/* ---------- Kapton tape ---------- */
.db-tape {
  display: inline-block;
  padding: 0.3rem 0.9rem 0.34rem;
  font-weight: 650;
  font-size: 0.875rem;
  color: var(--db-kapton-ink);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.28) 44%, rgba(255, 255, 255, 0) 58%),
    rgba(242, 169, 0, 0.88);
  box-shadow: 0 1px 0 rgba(74, 49, 0, 0.25), 0 6px 14px -8px rgba(0, 0, 0, 0.5);
  transform: rotate(-1.6deg);
  transform-origin: 12% 50%;
}
.db-tape-strip { position: absolute; top: -13px; left: 50%; width: 7.5rem; height: 26px; padding: 0; margin-left: -3.75rem; transform: rotate(1.4deg); opacity: 0.92; }
@media (prefers-reduced-motion: no-preference) {
  .db-tape { animation: db-press 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 180ms backwards; }
  .db-tape-strip { animation-delay: 420ms; }
  @keyframes db-press {
    from { opacity: 0; translate: 0 -10px; scale: 1.06; box-shadow: 0 18px 22px -8px rgba(0, 0, 0, 0.45); }
  }
}

/* ---------- Hero: the newest write-up, on the mat ---------- */
.db-hero {
  color: #fff;
  background-color: var(--db-mat);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: -1px -1px;
  --db-ink: #fff;
  --db-muted: #c3dbe2;
  --db-link: #fff;
}
.db-hero-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3rem 4rem; padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.db-hero-copy { flex: 999 1 30rem; min-width: 0; }
.db-title {
  font-family: var(--db-font-display);
  font-stretch: var(--db-display-stretch);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.1rem + 5.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin-top: 1.1rem;
}
.db-title a:hover { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
.db-lede { font-size: 1.25rem; line-height: 1.45; color: var(--db-muted); max-width: 34rem; margin-top: 1.5rem; }
.db-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.db-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem; border-radius: 6px; background: #fff; color: var(--db-mat-deep); font-weight: 650; border: 0; cursor: pointer; }
.db-btn:hover { background: var(--ds-color-mat-tint); }
.db-facts { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; color: var(--db-muted); font-size: 0.9375rem; }

/* The service note: every write-up carries one. */
.db-note { position: relative; flex: 1 1 20rem; max-width: 26rem; background: #fff; color: var(--db-graphite); border-radius: 4px; padding: 1.6rem 1.5rem 1.25rem; box-shadow: 0 1px 0 rgba(7, 54, 70, 0.5), 0 22px 40px -22px rgba(3, 26, 34, 0.7); --db-ink: var(--db-graphite); --db-muted: var(--db-graphite-soft); --db-line: var(--db-rule); }
.db-note-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-weight: 700; font-size: 0.9375rem; }
.db-status { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 650; font-size: 0.875rem; color: var(--db-solved); }
.db-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.db-note dl { margin-top: 0.9rem; border-top: 1px solid var(--db-line); }
.db-note-row { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--db-line); font-size: 0.9375rem; line-height: 1.4; }
.db-note-row dt { font-weight: 650; color: var(--db-muted); }
.db-note-foot { margin-top: 0.8rem; font-size: 0.8125rem; color: var(--db-muted); }
.db-note .db-note-body { margin-top: 0; }
.db-note code { font-family: var(--db-font-code); font-size: 0.86em; }

/* ---------- Windows (unboxed on the default theme) ---------- */
.db-main { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 3rem 4.5rem; padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.db-col-main { flex: 999 1 34rem; min-width: 0; }
.db-col-side { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 2.75rem; }
.db-win-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.db-h2 { font-family: var(--db-font-display); font-stretch: var(--db-display-stretch); font-weight: 780; font-size: 1.625rem; line-height: 1.1; letter-spacing: -0.015em; }
.db-col-side .db-h2 { font-size: 1.1875rem; }
.db-more { font-weight: 600; font-size: 0.9375rem; color: var(--db-link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; display: inline-flex; align-items: center; min-height: 44px; }
.db-more:hover, .db-link:hover { text-decoration-color: currentColor; }
.db-win-body { margin-top: 1rem; }
.db-col-side .db-win { border-top: 2px solid var(--db-ink); padding-top: 1rem; }

/* filters + chips */
.db-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.db-filter { min-height: 40px; padding: 0 0.95rem; border-radius: 999px; border: 1px solid var(--db-line); background: transparent; color: var(--db-ink); font-weight: 550; font-size: 0.9375rem; cursor: pointer; }
.db-filter:hover { border-color: var(--db-ink); }
.db-filter.is-active { background: var(--db-graphite); border-color: var(--db-graphite); color: #fff; }
.db-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.db-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 0.7rem; border-radius: 999px; border: 1px solid var(--db-line); font-weight: 550; font-size: 0.8125rem; line-height: 1; white-space: nowrap; }
a.db-chip:hover { border-color: currentColor; }

/* Notes: dated rows, not cards */
.db-entry { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 0.35rem 1.25rem; padding: 1.35rem 0; border-top: 1px solid var(--db-line); }
.db-entry-date { font-weight: 600; font-size: 0.9375rem; color: var(--db-muted); padding-top: 0.2rem; }
.db-entry-title { font-weight: 680; font-size: 1.3125rem; line-height: 1.22; letter-spacing: -0.008em; text-wrap: balance; }
.db-entry-title a:hover { color: var(--db-link); }
.db-entry-excerpt { margin-top: 0.45rem; color: var(--db-muted); max-width: 40rem; }
.db-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-top: 0.8rem; font-size: 0.875rem; color: var(--db-muted); }

/* side lists */
.db-list > li { padding: 0.85rem 0; border-top: 1px solid var(--db-line); }
.db-list > li:first-child { border-top: 0; padding-top: 0; }
.db-list-title { font-weight: 650; line-height: 1.28; display: block; }
a.db-list-title:hover { color: var(--db-link); }
.db-list-meta { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--db-muted); }
.db-side-text { font-size: 1rem; }
.db-side-text + .db-side-text { margin-top: 0.75rem; }
.db-link { color: var(--db-link); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; }
.db-linklist { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.db-linklist a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Footer ---------- */
.db-footer { background: var(--db-graphite); color: #dfe6ea; font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; }
.db-footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 4rem; justify-content: space-between; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.db-footer p { max-width: 34rem; font-size: 0.9375rem; color: #b8c5cc; }
.db-footer p + p { margin-top: 0.6rem; }
.db-footer .db-wordmark-name { color: #fff; }
.db-footer-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; align-content: flex-start; }
.db-footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 550; color: #fff; }
.db-footer-links a:hover, .db-footer p a { text-decoration: underline; text-underline-offset: 0.2em; }
.db-footer p a { color: #fff; }

/* ---------- Write-up (single) ---------- */
.db-article-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: 2.5rem; }
.db-article-head .db-title { font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem); max-width: 56rem; margin-top: 1.1rem; }
.db-article-head .db-lede { max-width: 40rem; font-size: 1.3125rem; }
.db-article-head .db-facts { margin-top: 1.75rem; padding-top: 1rem; border-top: 2px solid var(--db-ink); max-width: 56rem; }
.db-facts b { font-weight: 650; color: var(--db-ink); }
.db-article-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 3rem 4.5rem; padding-bottom: clamp(3rem, 6vw, 5rem); }
.db-article { flex: 999 1 34rem; min-width: 0; }
.db-article-side { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 2.5rem; }
.db-article-side .db-note { flex: none; max-width: none; box-shadow: 0 1px 0 var(--db-rule), 0 18px 30px -24px rgba(16, 32, 43, 0.5); }
.db-article-side .db-win:not(.db-note) { border-top: 2px solid var(--db-ink); padding-top: 1rem; }
.db-article-side .db-h2 { font-size: 1.1875rem; }
.db-toc a { display: flex; align-items: center; min-height: 40px; font-weight: 550; border-top: 1px solid var(--db-line); }
.db-toc li:first-child a { border-top: 0; }
.db-toc a:hover { color: var(--db-link); }

.db-prose { font-family: var(--db-font-prose); font-size: 1.25rem; line-height: 1.68; max-width: 40rem; }
.db-prose > * + * { margin-top: 1.4rem; }
.db-prose h2 { font-family: var(--db-font-display); font-stretch: var(--db-display-stretch); font-weight: 780; font-size: 1.75rem; line-height: 1.12; letter-spacing: -0.015em; margin-top: 3.25rem; }
.db-prose a { color: var(--db-link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.18em; }
.db-prose code { font-family: var(--db-font-code); font-size: 0.8em; padding: 0.12em 0.36em; border-radius: 4px; background: color-mix(in srgb, currentColor 9%, transparent); }
/* Kapton as a highlighter: the one line worth remembering. */
.db-prose mark { color: inherit; padding: 0.08em 0.2em; background: linear-gradient(100deg, rgba(242, 169, 0, 0.5), rgba(242, 169, 0, 0.36)); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.db-term { font-family: var(--db-font-code); font-size: 0.875rem; line-height: 1.6; border-radius: 8px; background: var(--db-graphite); color: #dce6ea; overflow: hidden; max-width: 46rem; }
.db-term-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; font-weight: 550; font-size: 0.8125rem; color: #a9bac2; border-bottom: 1px solid #2a3c48; }
.db-term-body { padding: 1rem; overflow-x: auto; }
.db-term-line { display: block; white-space: pre; }
.db-term-in { padding-left: 2ch; }
.db-term .cmd { color: #fff; font-weight: 600; }
.db-term .hit { color: #ffcf5a; }
.db-tip { font-family: var(--db-font-ui); font-size: 1.0625rem; line-height: 1.5; padding: 1.1rem 1.25rem; border: 1px solid var(--db-line); border-radius: 4px; background: color-mix(in srgb, var(--db-surface) 70%, transparent); }
.db-tip b { font-weight: 700; }
.db-article-foot { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 2px solid var(--db-ink); max-width: 40rem; display: flex; flex-direction: column; gap: 1.25rem; }
.db-pager { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; }
.db-pager a { flex: 1 1 14rem; display: block; padding: 0.25rem 0; }
.db-pager span { display: block; font-size: 0.875rem; color: var(--db-muted); }
.db-pager b { font-weight: 650; line-height: 1.28; display: block; }
.db-pager a:hover b { color: var(--db-link); }

@media (max-width: 40rem) {
  .db-article-side { order: -1; }
  .db-entry { grid-template-columns: minmax(0, 1fr); }
  .db-entry-date { padding-top: 0; }
  .db-nav { margin-left: 0; width: 100%; order: 3; }
  .db-prose { font-size: 1.125rem; }
  .db-note { max-width: none; }
}

/* ---------- WordPress content: what the editor can produce ---------- */
.db-prose-note { font-family: var(--db-font-ui); font-size: 1.125rem; line-height: 1.6; }
.db-prose :is(ul, ol) { padding-left: 1.4em; }
.db-prose ul { list-style: disc; }
.db-prose ol { list-style: decimal; }
.db-prose li + li { margin-top: 0.4em; }
.db-prose h3 { font-family: var(--db-font-display); font-weight: 720; font-size: 1.3125rem; line-height: 1.2; margin-top: 2.25rem; }
.db-prose :is(img, video, iframe) { max-width: 100%; height: auto; border-radius: 4px; }
.db-prose figure { max-width: 100%; }
.db-prose figcaption, .db-prose .wp-caption-text { font-family: var(--db-font-ui); font-size: 0.875rem; line-height: 1.4; color: var(--db-muted); margin-top: 0.5rem; }
.db-prose .wp-caption { max-width: 100%; }
.db-prose .alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; max-width: 50%; }
.db-prose .alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; max-width: 50%; }
.db-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.db-prose hr { border: 0; border-top: 1px solid var(--db-line); margin: 2.5rem 0; }
/* Terminal: any <pre> in a post. Wrap the command in <b> and the line that matters in <mark>. */
.db-prose pre { font-family: var(--db-font-code); font-size: 0.875rem; line-height: 1.6; padding: 1rem; border-radius: 8px; background: var(--db-graphite); color: #dce6ea; overflow-x: auto; max-width: 46rem; white-space: pre; }
.db-prose pre code { font-size: inherit; padding: 0; background: none; }
.db-prose pre b, .db-prose pre strong { color: #fff; font-weight: 600; }
.db-prose pre mark { background: none; color: #ffcf5a; padding: 0; }
/* "Worth knowing": any blockquote in a post. */
.db-prose blockquote { font-family: var(--db-font-ui); font-size: 1.0625rem; line-height: 1.5; margin-left: 0; margin-right: 0; padding: 1.1rem 1.25rem; border: 1px solid var(--db-line); border-radius: 4px; background: color-mix(in srgb, var(--db-surface) 70%, transparent); }
.db-prose blockquote > * + * { margin-top: 0.75rem; }
.db-prose table { width: 100%; border-collapse: collapse; font-family: var(--db-font-ui); font-size: 1rem; display: block; overflow-x: auto; }
.db-prose :is(th, td) { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--db-line); }
.db-prose::after { content: ""; display: table; clear: both; }
.db-about > * + * { margin-top: 0.75rem; }
.db-col-side .db-win-body > p:last-child:not(:first-child) { margin-top: 0.5rem; }
.db-comments .comment-respond { margin-top: 2.5rem; }
.db-archive-note { color: var(--db-muted); margin-top: 0.35rem; flex-basis: 100%; }
.db-empty { padding: 1.35rem 0; border-top: 1px solid var(--db-line); color: var(--db-muted); }
.db-pagination { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 2px solid var(--db-ink); }
.db-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.db-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 0.75rem; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-pagination a.page-numbers:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.db-pagination .page-numbers.current { background: var(--db-graphite); color: #fff; }
.db-search { display: flex; gap: 0.5rem; }
.db-search input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 0.85rem; border: 1px solid var(--db-line); border-radius: 6px; background: var(--db-surface); color: var(--db-graphite); font: inherit; }
.db-search button { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 6px; background: var(--db-graphite); color: #fff; font-weight: 600; cursor: pointer; }
.db-comments { margin-top: 3rem; max-width: 40rem; font-family: var(--db-font-ui); }
.db-comments .comment-list { margin-top: 1rem; }
.db-comments .comment-list li { padding: 1.1rem 0; border-top: 1px solid var(--db-line); }
.db-comments .children { margin-left: 1.5rem; }
.db-comments .comment-meta { font-size: 0.875rem; color: var(--db-muted); }
.db-comments .comment-author { font-weight: 650; color: var(--db-ink); }
.db-comments .comment-author img { display: none; }
.db-comments .comment-content { margin-top: 0.5rem; }
.db-comments .comment-content > * + * { margin-top: 0.75rem; }
.db-comments .reply { margin-top: 0.5rem; font-size: 0.875rem; font-weight: 600; }
.db-comments :is(input[type="text"], input[type="email"], input[type="url"], textarea) { width: 100%; min-height: 44px; padding: 0.6rem 0.85rem; border: 1px solid var(--db-line); border-radius: 6px; background: var(--db-surface); color: var(--db-graphite); font: inherit; }
.db-comments label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.3rem; }
.db-comments .comment-form > * { margin-top: 1rem; }
.db-comments .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.db-comments input[type="submit"] { min-height: 48px; padding: 0 1.4rem; border: 0; border-radius: 6px; background: var(--db-graphite); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.db-skip:focus { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100000; width: auto; height: auto; clip-path: none; padding: 0.75rem 1rem; background: var(--db-surface); color: var(--db-graphite); font-weight: 650; border-radius: 6px; }
.db-nav ul { display: contents; }
.db-nav .current-menu-item > a { border-bottom-color: var(--db-mat); }
.db-footer-links ul { display: contents; }

/* ---------- Front-end management: /write/ and /site-settings/ ---------- */
.db-btn-ink { background: var(--db-graphite); color: #fff; }
.db-btn-ink:hover { background: var(--db-mat-deep); }
.db-btn-quiet { background: transparent; color: var(--db-ink); border: 1px solid var(--db-line); }
.db-btn-quiet:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.db-btn-danger { color: #a3261a; }
.db-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-left: auto; }
.db-owner .db-btn { min-height: 44px; }
.db-edit { min-height: 0; }
.db-manage-wrap { padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.db-manage-wrap .db-main { padding: 0; }
.db-form .db-col-side { gap: 2rem; }
.db-field { display: block; margin-top: 1.1rem; }
.db-win-body > .db-field:first-child { margin-top: 0; }
.db-field > label, .db-field > .db-check { display: block; font-weight: 650; font-size: 0.9375rem; margin-bottom: 0.35rem; }
.db-check input, .db-checks input { width: 1.1rem; height: 1.1rem; margin: 0 0.5rem 0 0; vertical-align: -0.15em; accent-color: var(--db-mat); }
.db-input { display: block; width: 100%; min-height: 44px; padding: 0.6rem 0.8rem; border: 1px solid var(--db-rule); border-radius: 6px; background: #fff; color: var(--db-graphite); font: inherit; line-height: 1.4; }
textarea.db-input { resize: vertical; }
.db-input-title { font-family: var(--db-font-display); font-stretch: var(--db-display-stretch); font-weight: 760; font-size: 1.5rem; letter-spacing: -0.01em; min-height: 56px; }
.db-hint { display: block; margin-top: 0.35rem; font-size: 0.875rem; line-height: 1.4; color: var(--db-muted); }
.db-notice { padding: 0.75rem 1rem; margin-bottom: 1.1rem; border-left: 4px solid var(--db-solved); background: #fff; color: var(--db-graphite); font-weight: 550; }
.db-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.db-radios { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.db-radio { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.55rem 0; cursor: pointer; }
.db-radio input { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--db-mat); }
.db-radio b { display: block; font-weight: 650; }
.db-radio .db-hint { margin-top: 0.1rem; }
.db-actions .db-btn { width: 100%; }
.db-checks { display: flex; flex-direction: column; }
.db-checks label { display: flex; align-items: center; min-height: 40px; }
.db-editor-wrap .wp-editor-container { border: 1px solid var(--db-rule); border-radius: 6px; overflow: hidden; background: #fff; }
.db-editor-wrap .wp-editor-tabs { font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; }
.db-editor-wrap textarea.wp-editor-area { font-family: var(--db-font-code); font-size: 0.9375rem; line-height: 1.6; color: var(--db-graphite); border: 0; width: 100%; padding: 1rem; }
.db-manage-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.75rem 4.5rem; margin-top: 3.5rem; align-items: start; }
.db-manage-lists .db-win { border-top: 2px solid var(--db-ink); padding-top: 1rem; }
.db-manage-lists .db-h2 { font-size: 1.1875rem; }
/* Inside TinyMCE's own iframe: the same prose styles as the published page, on white. */
body.db-editor { min-height: 0; max-width: none; margin: 0; padding: 1.25rem 1.5rem; background: #fff; }

/* ---------- Resources: the Community Bookmarks mirror ----------
   Its own look inside the site's system: a parts catalogue. The mat carries the search,
   categories are drawers with a big tabular count, entries sit two-up like a parts list. */
.db-res-hero-inner { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.db-res-hero .db-title { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem); }
.db-res-hero .db-lede { max-width: 44rem; }
.db-res-search { margin-top: 2rem; max-width: 46rem; }
.db-res-q { display: block; width: 100%; min-height: 60px; padding: 0 1.25rem; border: 0; border-radius: 6px; background: #fff; color: var(--db-graphite); font: inherit; font-size: 1.125rem; box-shadow: 0 1px 0 rgba(7, 54, 70, 0.5), 0 18px 34px -22px rgba(3, 26, 34, 0.7); }
.db-res-q::placeholder { color: #6a7780; }
.db-res-found { min-height: 1.5rem; margin-top: 0.6rem; font-size: 0.9375rem; color: var(--db-muted); }
.db-res-cat { display: block; padding: 0; }
.db-res-cat > summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.2rem 0; cursor: pointer; list-style: none; }
.db-res-cat > summary::-webkit-details-marker { display: none; }
.db-res-cat-text { display: block; min-width: 0; }
.db-res-cat-name { display: block; font-family: var(--db-font-display); font-stretch: var(--db-display-stretch); font-weight: 760; font-size: 1.375rem; }
.db-res-cat-desc { display: block; margin-top: 0.25rem; }
.db-res-count { flex: none; min-width: 3.5ch; text-align: right; font-family: var(--db-font-display); font-stretch: var(--db-display-stretch); font-weight: 300; font-size: 2.25rem; line-height: 1; letter-spacing: -0.02em; color: var(--db-muted); }
.db-res-cat[open] > summary .db-res-count { color: var(--db-link); font-weight: 760; }
.db-res-cat > summary:hover .db-res-cat-name { color: var(--db-link); }
.db-res-body { padding-bottom: 1.75rem; }
.db-res-group + .db-res-group { margin-top: 1.75rem; }
.db-res-sub { display: inline-block; padding: 0.2rem 0.7rem; font-weight: 650; font-size: 0.875rem; color: var(--db-kapton-ink); background: rgba(242, 169, 0, 0.42); }
.db-res-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); column-gap: 2.5rem; margin-top: 0.4rem; }
.db-res-item { padding: 0.8rem 0; border-bottom: 1px solid var(--db-line); min-width: 0; }
.db-res-name { font-weight: 650; line-height: 1.3; color: var(--db-link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.db-res-name:hover { text-decoration-color: currentColor; }
.db-res-desc { display: block; margin-top: 0.25rem; font-size: 0.9375rem; line-height: 1.42; }
.db-res-meta { display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; margin-top: 0.35rem; font-size: 0.8125rem; color: var(--db-muted); }
.db-res-host { font-family: var(--db-font-code); font-size: 0.75rem; overflow-wrap: anywhere; }
.db-res-flag { font-weight: 650; color: #8a4b00; }
.db-res-item.is-archived .db-res-name { text-decoration-style: dotted; }
.db-res-index a { justify-content: space-between; gap: 1rem; }
.db-res-index a span:last-child { color: var(--db-muted); }
.db-notice-error { border-left-color: #a3261a; margin-top: 0.75rem; font-weight: 500; font-size: 0.9375rem; }
@media (max-width: 40rem) {
  .db-res-count { font-size: 1.75rem; }
  .db-res-q { font-size: 1rem; }
}

/* ---------- Work: the consulting page ---------- */
.db-work-owner { padding-top: 1rem; }
.db-work-owner .db-notice { margin-bottom: 1rem; }
.db-work-hero-inner { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.db-work-hero .db-title { max-width: 60rem; }
.db-work-hero .db-lede { max-width: 40rem; font-size: 1.375rem; }
.db-work { display: flex; flex-direction: column; gap: clamp(3rem, 6vw, 5rem); padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.db-work > .db-win > .db-win-head { border-top: 2px solid var(--db-ink); padding-top: 1rem; }
.db-work .db-h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.db-work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 3rem; }
.db-work-item { padding: 1.3rem 0; border-bottom: 1px solid var(--db-line); }
.db-work-item-title { font-weight: 700; font-size: 1.1875rem; line-height: 1.25; }
.db-work-item-text { margin-top: 0.4rem; color: var(--db-muted); max-width: 32rem; }
/* Steps are a real sequence, so they are numbered -- by a counter, in big tabular figures. */
.db-work-steps { counter-reset: db-step; display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 2rem 2rem; }
.db-work-step { counter-increment: db-step; }
.db-work-step::before { content: counter(db-step); display: block; font-family: var(--db-font-display); font-stretch: var(--db-display-stretch); font-weight: 800; font-size: 3.25rem; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--db-link); padding-bottom: 0.7rem; margin-bottom: 0.8rem; border-bottom: 2px solid var(--db-ink); }
.db-work-tools .db-chip { min-height: 38px; padding: 0 1rem; font-size: 0.9375rem; background: var(--db-surface); }
.db-work-contact-text { font-size: 1.25rem; line-height: 1.45; max-width: 38rem; }
.db-work-contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.db-rep-row { position: relative; padding: 1rem 0 1.1rem; border-top: 1px solid var(--db-line); }
.db-rep-row .db-field:first-child { margin-top: 0; }
.db-rep-remove { min-height: 40px; margin-top: 0.75rem; font-size: 0.9375rem; }
.db-rep-add { margin-top: 0.5rem; }
.db-form .db-col-main { display: flex; flex-direction: column; gap: 2.75rem; }

/* =========================================================================
 * Skin layer — what changes the moment any OS skin is switched on.
 * skins.css (ported from the Beachball Help member theme) paints the window
 * chrome; these rules hand the default design's own type, colour and layout
 * decisions over to it so each skin reads as that OS, not as this site in a
 * costume.
 * ========================================================================= */
.db-root.db-skinned {
  --db-font-display: inherit;
  --db-font-ui: inherit;
  --db-font-prose: inherit;
  --db-display-stretch: 100%;
  --db-ink: inherit;
  --db-muted: inherit;
  --db-link: inherit;
  --db-line: color-mix(in srgb, currentColor 22%, transparent);
}
.db-root.db-skinned .db-win,
.db-root.db-skinned .db-note { --db-ink: inherit; --db-muted: inherit; --db-link: inherit; --db-line: color-mix(in srgb, currentColor 22%, transparent); }
.db-root.db-skinned .db-tape { display: none; }
.db-root.db-skinned .db-status { color: inherit; }
.db-root.db-skinned .db-status::before { background: #2fb360; }
.db-root.db-skinned .db-hero { width: calc(100% - 3rem); max-width: 73rem; margin: 2rem auto 0; background-image: none; }
.db-root.db-skinned .db-hero-grid { padding: 1.5rem 0 0.5rem; max-width: none; width: auto; gap: 1.5rem 3rem; align-items: flex-start; }
.db-root.db-skinned .db-title { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.75rem); line-height: 1.1; letter-spacing: 0; font-weight: 700; margin-top: 0; }
.db-root.db-skinned .db-lede { font-size: 1.0625rem; margin-top: 0.9rem; }
.db-root.db-skinned .db-note { box-shadow: none; border: 1px solid; border-color: color-mix(in srgb, currentColor 35%, transparent); border-radius: 0; background: transparent; color: inherit; padding: 1rem; }
.db-root.db-skinned .db-main,
.db-root.db-skinned .db-article-grid { gap: 1.5rem; padding-top: 1.5rem; }
.db-root.db-skinned .db-col-side,
.db-root.db-skinned .db-article-side { gap: 1.5rem; }
.db-root.db-skinned .db-col-side .db-win,
.db-root.db-skinned .db-article-side .db-win { border-top-width: 1px; padding-top: 0; }
.db-root.db-skinned .db-entry { padding: 0.9rem 1rem; }
.db-root.db-skinned .db-win-body { margin-bottom: 0; }
.db-root.db-skinned .db-article-head { padding: 1.5rem 0 0; }
.db-root.db-skinned .db-article-head .db-facts { border-top-width: 1px; }
.db-root.db-skinned .db-article .db-win-body { padding-bottom: 0.5rem; }
.db-root.db-skinned .db-prose { font-size: 1.0625rem; line-height: 1.6; max-width: 44rem; }
.db-root.db-skinned .db-prose h2 { font-size: 1.3125rem; margin-top: 2rem; }
.db-root.db-skinned .db-prose mark { background: color-mix(in srgb, currentColor 16%, transparent); }
.db-root.db-skinned .db-prose pre mark { background: none; }
.db-root.db-skinned .db-article-foot { border-top-width: 1px; }
.db-root.db-skinned .db-footer { margin-top: 1rem; }
.db-root.db-skinned .db-work-hero-inner { padding: 1.25rem 0 0.5rem; max-width: none; width: auto; }
.db-root.db-skinned .db-work { gap: 1.5rem; padding-top: 1.5rem; }
.db-root.db-skinned .db-work-step::before { font-size: 1.75rem; border-bottom-width: 1px; color: inherit; }
.db-root.db-skinned .db-work-tools .db-chip { background: transparent; }
.db-root.db-skinned .db-form .db-col-main { gap: 1.5rem; }
.db-root.db-skinned .db-work-owner .db-notice { background: #fff; color: #000; }
.db-root.db-skinned .db-res-hero-inner { padding: 1.25rem 0 0.25rem; max-width: none; width: auto; }
.db-root.db-skinned .db-res-search { margin-top: 1rem; }
.db-root.db-skinned .db-res-q { min-height: 44px; font-size: 1rem; box-shadow: none; border: 1px solid; border-radius: 0; }
.db-root.db-skinned .db-res-cat { padding: 0 1rem; }
.db-root.db-skinned .db-res-cat > summary { padding: 0.8rem 0; }
.db-root.db-skinned .db-res-cat-name { font-size: 1.125rem; }
.db-root.db-skinned .db-res-count { font-size: 1.375rem; font-weight: 700; }
.db-root.db-skinned .db-res-sub { background: none; padding: 0; color: inherit; text-decoration: underline; }
.db-root.db-skinned .db-res-flag { color: inherit; }
.db-root.db-skinned .db-manage-wrap { padding-top: 1.5rem; }
.db-root.db-skinned .db-manage-wrap .db-main { padding: 0; }
.db-root.db-skinned .db-manage-lists { gap: 1.5rem; margin-top: 1.5rem; }
.db-root.db-skinned .db-manage-lists .db-win { border-top-width: 1px; padding-top: 0; }
.db-root.db-skinned .db-owner { margin: 0 0 0.5rem; }
.db-root.db-skinned .db-win-head:has(.db-owner) { display: flex; }
.db-root.db-skinned .db-win-head:has(.db-owner) > :not(.db-owner) { display: none; }
.db-root.db-skinned .db-notice { border: 1px solid; border-left-width: 4px; background: transparent; color: inherit; }
.db-root.db-skinned .db-btn-danger { color: inherit; }
.db-root.db-skinned .db-pagination { border-top-width: 1px; }
.db-root.db-skinned .db-prose blockquote { background: transparent; }

