/* ==========================================================================
   SoloWired, dark "gunmetal" layer (variant A: full dark)
   Load AFTER solowired.css. It only re-points tokens and patches the few
   rules in the base file that hard-code light-theme colors.

   Material idea: an equipment rack, not a "dark SaaS" page.
   - Gunmetal / anodized aluminium surfaces, cool and blue-grey.
   - Brushed-steel grain only on the shell (header, hero, footer), at ~5%.
   - Bare steel conductor for the switchboard bus; insulated wires keep
     their category colors.
   - No gold, brass or warm metal anywhere, so the yellow affiliate key
     stays the only warm, saturated, filled object on the page.
   ========================================================================== */

:root {
  /* metal neutrals */
  --sw-ink: #D8DEE5;          /* Steel white: body text, 12.8:1 on Gunmetal */
  --sw-head: #F2F5F8;         /* Polished: headings, 15.8:1 */
  --sw-graphite: #A3AEBA;     /* Satin steel: secondary text, 7.7:1 */
  --sw-paper: #161B21;        /* Gunmetal: page */
  --sw-surface: #1C232B;      /* Anodized: cards */
  --sw-panel: #222A33;        /* Machined: verdict, glance, table head */
  --sw-rule: #2F3A45;         /* Seam: hairlines */
  --sw-rule-strong: #46525F;  /* Seam, strong: card edges */
  --sw-edge: #8C99A6;         /* Bare steel: control borders, bus wire mid */
  --sw-deep: #0F1317;         /* Blackened steel: footer */
  --sw-cobalt: #8DB0FF;       /* Anodized blue: links + focus, 8.1:1 */
  --sw-cobalt-hover: #B5CBFF;

  /* affiliate key (unchanged hue, new edge for a dark page) */
  --sw-signal: #FFC53D;
  --sw-signal-hover: #FFD263;
  --sw-signal-edge: #9C6F00;  /* the key's side wall */
  --sw-signal-text: #18222D;  /* 10.2:1 on Signal */

  /* wire colors re-tuned for a dark background:
     wire = graphic (>= 6:1), ink = text (>= 7.5:1 on cards), tint = dark sleeve */
  --sw-email: #7EA4FF;   --sw-email-ink: #A9C3FF;   --sw-email-tint: #1D2A44;
  --sw-voice: #B08CFF;   --sw-voice-ink: #C9B0FF;   --sw-voice-tint: #2A2442;
  --sw-web: #2FC4B0;     --sw-web-ink: #5FD8C6;     --sw-web-tint: #15302F;
  --sw-course: #F0913A;  --sw-course-ink: #FFAA70;  --sw-course-tint: #33261B;
  --sw-privacy: #4FC26A; --sw-privacy-ink: #7ED894; --sw-privacy-tint: #18301F;
  --sw-biz: #FF6F66;     --sw-biz-ink: #FF9A92;     --sw-biz-tint: #362022;
  --sw-seo: #D49A5E;     --sw-seo-ink: #E2B486;     --sw-seo-tint: #30271E;
  --sw-prod: #9AA8B8;    --sw-prod-ink: #B7C3D0;    --sw-prod-tint: #252D37;
  --sw-non-us: #38BDF8;  --sw-non-us-ink: #7DD3FC;  --sw-non-us-tint: #0C283F;

  /* brushed-steel grain: horizontal fractal noise, white at very low alpha */
  --sw-brushed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='320'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.6' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)' opacity='0.055'/%3E%3C/svg%3E");
  /* specular sheen: one broad, soft light band, the thing that makes a dark
     surface read as metal rather than slate. Fixed angle, no animation. */
  --sw-sheen: linear-gradient(105deg, transparent 30%, rgba(200,215,230,.06) 48%, transparent 66%);
  --sw-steel-bar: linear-gradient(90deg, #5E6A77 0%, #C7CFD7 45%, #8C99A6 70%, #5E6A77 100%);

  color-scheme: dark;
}

/* ---------- base ---------- */
body.sw-site { background: var(--sw-paper); color: var(--sw-ink); }
.sw-site h1, .sw-site h2, .sw-site h3, .sw-site h4, .sw-site h5, .sw-site h6 { color: var(--sw-head, #F2F5F8); }
.sw-site strong, strong { font-weight: 600; }
.sw-site .sw-research h3, .sw-site .sw-proscons h3, .sw-method-band h3, .sw-card h3 {
  font-family: var(--sw-font-ui);
  font-weight: 650;
}
.sw-site :focus-visible { outline-color: var(--sw-cobalt); }
.sw-skip { background: var(--sw-signal-text); color: var(--sw-head) !important; outline: 2px solid var(--sw-cobalt); }
::selection { background: #3A5CA8; color: #fff; }

/* ---------- shell: brushed steel ---------- */
.sw-header, .sw-hero, .sw-footer {
  background-color: var(--sw-paper);
  background-image: var(--sw-sheen), var(--sw-brushed), linear-gradient(180deg, #1B2129 0%, var(--sw-paper) 100%);
  background-size: 100% 100%, 640px 320px, 100% 100%;
}
.sw-header {
  background-image: linear-gradient(105deg, transparent 18%, rgba(200,215,230,.055) 40%, transparent 62%), var(--sw-brushed), linear-gradient(180deg, #1D242C 0%, var(--sw-paper) 100%);
  border-bottom-color: #0B0E11;
  /* 1px lit lip on top (under the ribbon), groove + faint lip at the bottom */
  box-shadow: inset 0 1px 0 rgba(220,230,240,.10), 0 1px 0 rgba(255,255,255,.04);
}
.sw-hero {
  background-image: var(--sw-sheen), var(--sw-brushed); background-size: 100% 100%, 640px 320px;
  /* the faceplate ends on a machined seam: dark groove + lit lip */
  border-bottom: 1px solid #0B0E11; box-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.sw-hero + .sw-section { border-top: 0; }
.sw-logo { color: var(--sw-head); }
.sw-nav a { color: var(--sw-ink); }
.sw-nav a:hover { background: var(--sw-panel); color: var(--sw-head); }
.sw-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--sw-edge); }

/* Ribbon: same 8 wires, plus a thin steel ferrule line under it */
.sw-ribbon { box-shadow: 0 1px 0 #0B0E11, 0 2px 0 rgba(199,207,215,.18); position: relative; z-index: 1; }

/* ---------- buttons ---------- */
/* Internal actions are machined steel: dark fill, bare-steel rim, never bright. */
.sw-btn, .sw-aff-btn { border-color: var(--sw-edge); }
.sw-btn--ink {
  background: linear-gradient(180deg, #303A45, #252D37); color: var(--sw-head) !important;
  border-color: var(--sw-edge); box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sw-btn--ink:hover { background: linear-gradient(180deg, #3A4552, #2C3540); border-color: #B3BEC9; }
.sw-btn--line { color: var(--sw-ink) !important; border-color: var(--sw-rule-strong); }
.sw-btn--line:hover { background: var(--sw-panel); border-color: var(--sw-edge); }
.sw-btn--quiet { background: transparent; color: var(--sw-ink) !important; border-color: var(--sw-rule-strong); }
.sw-btn--quiet:hover { border-color: var(--sw-edge); background: var(--sw-panel); }

/* Affiliate key: the only warm, saturated, filled object. A physical keycap:
   amber side wall below, a lit top edge, dark legend. */
.sw-aff-btn {
  background: var(--sw-signal); color: var(--sw-signal-text) !important;
  border-color: #E5A91C;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 0 var(--sw-signal-edge), 0 4px 0 #07090B;
}
.sw-aff-btn:hover { background: var(--sw-signal-hover); }
.sw-aff-btn:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 var(--sw-signal-edge), 0 2px 0 #07090B; }
.sw-aff-btn:focus-visible { outline: 3px solid var(--sw-cobalt); outline-offset: 4px; }
.sw-key { background: var(--sw-signal); border-color: var(--sw-signal-edge); box-shadow: 0 1.5px 0 var(--sw-signal-edge); }

/* ---------- category label, marks ---------- */
.sw-mark {
  background: var(--wt, var(--sw-panel)); color: var(--wi, var(--sw-ink));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w, #fff) 38%, transparent), inset 0 1px 0 rgba(255,255,255,.06);
}

/* ---------- sections ---------- */
.sw-section + .sw-section { border-top-color: var(--sw-rule); }

/* ---------- switchboard: steel bus, insulated taps, terminal screw ---------- */
.sw-board__node {
  background: radial-gradient(circle at 36% 32%, #F1F4F7 0 12%, #B9C3CD 34%, #6B7784 72%, #46515D 100%);
  box-shadow: 0 0 0 5px var(--sw-paper), 0 0 0 7px var(--sw-edge);
  position: relative;
}
.sw-board__node::after { /* screw slot */
  content: ""; position: absolute; left: 6px; right: 6px; top: calc(50% - 1.25px); height: 2.5px;
  background: #2A323B; border-radius: 2px; transform: rotate(-28deg);
}
.sw-board__item::after { background: var(--sw-steel-bar); width: 3px; }
.sw-board__link { color: var(--sw-head) !important; }

/* ---------- tool cards ---------- */
.sw-card {
  background: var(--sw-surface); border-color: var(--sw-rule-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045); /* machined top edge, not a drop shadow */
}
.sw-card:hover { border-color: var(--sw-edge); }
.sw-card__title a, .sw-card__title a:hover { color: var(--sw-head); }
.sw-card__facts { border-top-color: var(--sw-rule); }

/* ---------- guides list ---------- */
.sw-guides { border-top-color: var(--sw-edge); }
.sw-guide { border-bottom-color: var(--sw-rule); }
.sw-guide__title a, .sw-guide__title a:hover { color: var(--sw-head); }

/* ---------- honesty band ---------- */
.sw-method-band__col--done { background: var(--sw-panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.sw-method-band__col--todo { border-color: var(--sw-edge); border-style: dashed; }

/* ---------- crumbs, chips ---------- */
.sw-crumbs li + li::before { color: var(--sw-rule-strong); }
.sw-chip { background: transparent; color: var(--sw-ink); border-color: var(--sw-rule-strong); }
.sw-chip:hover { border-color: var(--sw-edge); }
.sw-chip[aria-pressed="true"] { background: #D8DEE5; border-color: #D8DEE5; color: #161B21; }
.sw-chip[aria-pressed="true"] .sw-chip__count { color: #46525F; }
.sw-chip[aria-pressed="true"] .sw-glyph { filter: brightness(.7) saturate(1.3); }
.sw-toolbar { border-top-color: var(--sw-rule); }

/* ---------- single tool ---------- */
.sw-checked::before { background: var(--sw-edge); }
.sw-untested { border-color: var(--sw-edge); color: var(--sw-head); white-space: nowrap; max-width: 100%; }
.sw-glance { background: var(--sw-panel); box-shadow: inset 0 0 0 1px var(--sw-rule), inset 0 1px 0 rgba(255,255,255,.05); }
.sw-glance dl > div { border-top-color: var(--sw-rule-strong); }
.sw-features li { border-bottom-color: var(--sw-rule); }
.sw-proscons__col { border-color: var(--sw-rule-strong); background: var(--sw-surface); }
.sw-related { border-color: var(--sw-edge); color: var(--sw-head) !important; }
.sw-related:hover { background: var(--sw-panel); }
.sw-research, .sw-method { border-color: var(--sw-rule-strong); }
.sw-cta-end { background: var(--sw-panel); }

/* ---------- article ---------- */
.sw-article-head { border-bottom-color: var(--sw-rule); }
.sw-toc ol { border-left-color: var(--sw-rule); }
.sw-toc a:hover { color: var(--sw-head); border-left-color: var(--sw-edge); }
.sw-disclaimer { border-color: var(--sw-rule-strong); background: var(--sw-surface); border-left-color: var(--sw-non-us, #0284C7); color: var(--sw-ink); }
.sw-disclaimer p { max-width: 68ch; }
.sw-disclaimer strong { color: var(--sw-head); }
.sw-disclaimer a { color: var(--sw-cobalt); }
.sw-disclosure { border-color: var(--sw-rule-strong); background: var(--sw-surface); }
.sw-disclosure a { color: var(--sw-head); }

/* Long reading on dark: light-on-dark looks heavier and blooms, so the text
   is Steel white (not #fff), with a touch more leading and tracking. */
.sw-prose { color: var(--sw-ink); line-height: 1.74; letter-spacing: 0.004em; }
.sw-prose h2, .sw-prose h3 { color: var(--sw-head); }
.sw-prose strong { color: var(--sw-head); font-weight: 600; }
.sw-prose blockquote { border-left-color: var(--sw-edge); }
.sw-verdict { background: var(--sw-panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.sw-verdict li { border-top-color: var(--sw-rule-strong); }

.sw-table-wrap {
  border-color: var(--sw-rule-strong);
  background:
    linear-gradient(to right, var(--sw-paper) 30%, transparent) left / 32px 100% no-repeat local,
    linear-gradient(to left, var(--sw-paper) 30%, transparent) right / 32px 100% no-repeat local,
    linear-gradient(to right, rgba(0,0,0,.55), transparent) left / 14px 100% no-repeat scroll,
    linear-gradient(to left, rgba(0,0,0,.55), transparent) right / 14px 100% no-repeat scroll;
}
.sw-table th, .sw-table td { border-bottom-color: var(--sw-rule); }
.sw-table thead th { background: var(--sw-panel); color: var(--sw-head); border-bottom-color: var(--sw-edge); }
.sw-table tbody th, .sw-table tbody td:first-child { color: var(--sw-head); }
.sw-table tbody tr:nth-child(even) > * { background: rgba(255,255,255,.018); }

.sw-aff-row { border-color: var(--sw-rule-strong); background: var(--sw-surface); }
.sw-faq__item, .sw-faq__item:last-child { border-color: var(--sw-rule); }
.sw-sources li { border-bottom-color: var(--sw-rule); }
.sw-mentioned { border-top-color: var(--sw-edge); }

/* Fix (also present in the light theme): the "Tools in this guide" grid sits
   inside .sw-prose, so it inherited list indent and li+li margins. */
.sw-mentioned .sw-grid { padding-left: 0; }
.sw-prose .sw-mentioned .sw-grid > li + li { margin-top: 0; }
.sw-prose .sw-mentioned .sw-card__title { margin-top: 0; }
/* 3 tools = 3 columns on desktop, 1 column on phones. The compact card stacks
   its facts (label above value) and actions (key above Details). */
.sw-mentioned .sw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sw-s-4); }
.sw-mentioned .sw-card { padding: var(--sw-s-4); gap: var(--sw-s-3); }
.sw-mentioned .sw-card__head { flex-direction: column; align-items: flex-start; gap: var(--sw-s-2); }
.sw-mentioned .sw-card__title { font-size: var(--sw-fs-ui); }
.sw-mentioned .sw-card__facts div { grid-template-columns: 1fr; gap: 0; }
.sw-mentioned .sw-card__facts dt { font-size: var(--sw-fs-xs); }
.sw-mentioned .sw-card__actions { flex-direction: column-reverse; align-items: stretch; gap: var(--sw-s-2); }
.sw-mentioned .sw-card__actions > * { width: 100%; }
@media (max-width: 760px) {
  .sw-mentioned .sw-grid { grid-template-columns: 1fr; }
  .sw-mentioned .sw-card__actions { flex-direction: row; justify-content: space-between; align-items: center; }
  .sw-mentioned .sw-card__actions > * { width: auto; }
}

/* Mobile: close the gap between the article meta row and the first block */
@media (max-width: 640px) {
  .sw-article-head { padding-bottom: var(--sw-s-5); }
  .sw-article-grid { padding-top: var(--sw-s-5); }
}

/* "Our picks" strip: only on phones, where the comparison table is far down */
.sw-picks { display: none; }

/* ---------- footer: blackened steel ---------- */
.sw-footer { background-color: var(--sw-deep); background-image: linear-gradient(105deg, transparent 35%, rgba(200,215,230,.045) 52%, transparent 70%), var(--sw-brushed); background-size: 100% 100%, 640px 320px; color: #C3CCD5; border-top: 1px solid var(--sw-rule); }
.sw-footer a, .sw-footer a:hover, .sw-footer h2, .sw-footer .sw-logo { color: var(--sw-head); }
.sw-footer .sw-glyph { filter: none; }
.sw-footer :focus-visible { outline-color: var(--sw-cobalt); }
.sw-footer__legal { border-top-color: var(--sw-rule); color: #A9B4BF; }

@media print {
  :root { --sw-ink: #18222D; --sw-head: #18222D; --sw-paper: #fff; --sw-graphite: #4D5966; }
  .sw-header, .sw-hero { background: #fff !important; }
}
