/* Device support page only. Tokens come from styles.css. */
.device-support-page {
  --route-direct: #087479;
  --route-direct-bg: #dff5f3;
  --route-driver: #2f5d8a;
  --route-driver-bg: #e4eef8;
  --route-files: #6a3d8f;
  --route-files-bg: #f1e9f8;
}
.device-hero .eyebrow { color: var(--aqua); }
.device-hero h1 { font-size: clamp(2.8rem, 5.6vw, 5.6rem); }

/* Three routes */
.ds-how { background: var(--paper); }
.ds-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1280px; margin: auto; }
.ds-route { --c: var(--route-direct); --bg: var(--route-direct-bg); padding: 26px; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 22px; background: var(--card); box-shadow: 0 10px 30px rgba(16, 36, 43, .06); }
.ds-route-driver { --c: var(--route-driver); --bg: var(--route-driver-bg); }
.ds-route-files { --c: var(--route-files); --bg: var(--route-files-bg); }
.ds-flow { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 22px; padding: 18px 10px; list-style: none; border-radius: 16px; background: var(--bg); }
.ds-flow li { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; color: var(--ink); font-size: .72rem; font-weight: 800; text-align: center; }
.ds-flow img, .ds-flow svg { width: 44px; height: 44px; padding: 8px; border-radius: 12px; background: var(--card); box-shadow: 0 4px 12px rgba(16, 36, 43, .1); }
.ds-flow img { padding: 0; }
.ds-flow svg { fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ds-flow .ds-arrow { flex: 1 1 18px; max-width: 46px; height: 2px; margin-bottom: 22px; background: var(--c); position: relative; }
.ds-flow .ds-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--c); border-right: 0; }
.ds-route-num { margin: 0 0 6px; color: var(--c); font-size: .74rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.ds-route h3 { margin: 0 0 10px; font-size: 1.35rem; }
.ds-route p { color: var(--muted); line-height: 1.55; }
.ds-route p b { color: var(--ink); }
.ds-route .ds-route-eg { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; }

/* Labels */
.ds-legend { max-width: 1280px; margin: 28px auto 0; padding: 22px 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.ds-legend h3 { margin: 0 0 12px; font-size: 1.05rem; }
.ds-legend ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.ds-legend li { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.ds-legend .ds-badge { display: table; margin-bottom: 8px; }
.ds-badge { display: inline-block; padding: 5px 10px; border-radius: var(--radius-pill); font-size: .76rem; font-weight: 800; line-height: 1.3; }
.ds-badge::before { margin-right: 6px; }
.ds-tested { color: #0b5e46; background: #daf5ea; }
.ds-tested::before { content: "✓"; content: "✓" / ""; }
.ds-testing { color: #7a4b00; background: #fff0d2; }
.ds-testing::before { content: "◐"; content: "◐" / ""; }
.ds-prep { color: #2f5562; background: #e7f2f5; }
.ds-prep::before { content: "↗"; content: "↗" / ""; }
.ds-profile { color: #3d4f6b; background: #e8edf5; }
.ds-profile::before { content: "○"; content: "○" / ""; }

/* Table */
.ds-table-section { background: #eaf3f3; }
.ds-white-note { max-width: 1280px; margin: 0 auto 20px; padding: 16px 20px; border-left: 5px solid var(--amber); border-radius: 12px; background: var(--card); color: var(--ink); line-height: 1.55; }
.ds-table { width: 100%; max-width: 1280px; margin: auto; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid #c9dada; border-radius: 20px; background: var(--card); font-size: .92rem; }
.ds-table caption { padding: 0 14px 12px; color: var(--muted); font-size: .85rem; text-align: left; caption-side: top; }
.ds-table th, .ds-table td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.45; }
.ds-table thead th { color: var(--card); background: var(--navy); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.ds-table tbody tr:last-child > * { border-bottom: 0; }
.ds-table tbody tr:nth-child(even) { background: #f7fafa; }
.ds-table tbody th { width: 22%; }
.ds-table td:nth-child(2) { width: 20%; }
.ds-table tbody th b { display: block; font-size: 1rem; }
.ds-table small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.ds-pill { display: inline-block; padding: 5px 10px; border-left: 4px solid; border-radius: 8px; font-size: .8rem; font-weight: 800; }
.ds-pill-direct { color: var(--route-direct); border-color: var(--route-direct); background: var(--route-direct-bg); }
.ds-pill-driver { color: var(--route-driver); border-color: var(--route-driver); background: var(--route-driver-bg); }
.ds-pill-files { color: var(--route-files); border-color: var(--route-files); background: var(--route-files-bg); }
.ds-pill-none { color: var(--muted); border-color: #9aa9b0; background: #eef2f3; }

/* Jump links and model list */
.ds-jump { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1280px; margin: 0 auto 18px; }
.ds-jump a { padding: 8px 14px; border: 1px solid #c9dada; border-radius: var(--radius-pill); background: var(--card); color: var(--ink); font-size: .86rem; font-weight: 800; text-decoration: none; }
.ds-jump a:hover, .ds-jump a:focus-visible { border-color: var(--teal); color: var(--teal); }
.ds-table tbody tr { scroll-margin-top: 90px; }
.ds-models { margin-top: 10px; font-size: .85rem; }
.ds-models summary { color: var(--teal); font-weight: 800; cursor: pointer; }
.ds-models ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.5; }
.ds-models b { color: var(--ink); }

/* Not listed */
.ds-unlisted { background: var(--paper); }
.ds-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1280px; margin: auto; padding: 0; list-style: none; }
.ds-steps li { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.ds-steps span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px; color: var(--teal); background: #dff8f5; font-weight: 900; }
.ds-steps b { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.ds-steps small { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.ds-unlisted-cta { margin: 28px 0 0; text-align: center; }

@media (max-width: 1000px) {
  .ds-routes, .ds-steps { grid-template-columns: 1fr; max-width: 680px; }
  .ds-legend ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: table rows become stacked cards */
@media (max-width: 760px) {
  .ds-how, .ds-table-section, .ds-unlisted { padding-left: 16px !important; padding-right: 16px !important; }
  .ds-route { padding: 20px; }
  .ds-table, .ds-table tbody, .ds-table tr, .ds-table th, .ds-table td { display: block; width: auto; }
  .ds-table { overflow: visible; border: 0; border-radius: 0; background: none; }
  .ds-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ds-table caption { display: block; }
  .ds-table tbody tr { display: flex; flex-direction: column; margin-bottom: 14px; overflow: hidden; border: 1px solid #c9dada; border-radius: 16px; background: var(--card) !important; }
  .ds-table tbody th { width: auto; color: var(--card); background: var(--navy); }
  .ds-table tbody th small { color: var(--on-dark-muted); }
  .ds-table td { padding: 12px 16px; }
  .ds-table td::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
  .ds-table tbody th { order: -2; }
  .ds-table td[data-label="Tested?"] { order: -1; }
  .ds-table tbody tr > *, .ds-table tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
  .ds-table tbody tr > td[data-label="White ink"] { border-bottom: 0; }
  .ds-legend ul { grid-template-columns: 1fr; }
}
