:root {
  color-scheme: light;
  --ink: #1b2420;
  --forest: #22362c;
  --forest-hover: #2e473a;
  --cream: #f8f5ef;
  --sand: #efe8dc;
  --paper: #fffdf9;
  --line: #e3dccd;
  --muted: #59625c;
  --brass: #7a5c2c;
  --brass-soft: #f4ecdd;
  --display: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font: 16px/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  scroll-padding-top: 1rem;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden], .budgethub:not([href]) { display: none !important; }
body { margin: 0; overflow-wrap: anywhere; }
a { color: var(--forest); text-underline-offset: .2em; }
a:hover { color: var(--brass); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; }
h2 { font-size: clamp(1.5rem, 2.75vw, 2.1rem); line-height: 1.15; letter-spacing: -.025em; }
button, select, input { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { opacity: .56; cursor: default; }
:focus-visible { outline: 2px solid #9b753b; outline-offset: 3px; }
code { font-family: var(--mono); }
.wrap { width: min(1240px, calc(100% - clamp(32px, 7vw, 88px))); margin-inline: auto; }

.visually-hidden, .clipboard-fallback { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.clipboard-fallback { position: fixed; inset: 0 auto auto 0; opacity: 0; }
.skip { position: fixed; inset: .5rem auto auto .5rem; z-index: 3; padding: .6rem .85rem; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); background: var(--cream); }
.header-inner { min-height: 66px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.8rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; color: var(--ink); font: 700 1.15rem var(--display); text-decoration: none; }
.brand img { display: block; border-radius: .45rem; }
.header-inner nav { display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; }
.header-inner nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.header-inner nav a:first-child, .header-inner nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: #a7834b; text-underline-offset: .48rem; }

.hero-band { background: #f1ece2; border-bottom: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(240px, .85fr); align-items: center; gap: clamp(1.2rem, 4vw, 4.6rem); padding-block: clamp(1.45rem, 3.9vw, 3.3rem); }
.eyebrow { color: var(--brass); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: .48rem; }
h1 { margin: .45rem 0 .65rem; font-size: clamp(2.35rem, 4.7vw, 4.3rem); line-height: 1.02; letter-spacing: -.043em; }
h1 em { font-style: normal; }
.hero-copy { color: var(--muted); max-width: 54ch; }
.hero-budgethub { margin-top: .65rem; }
.hero-budgethub a {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  max-width: 100%;
  min-height: 44px;
  padding: .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brass-soft);
  font-size: .85rem;
  font-weight: 600;
}
.facts, .related { display: flex; flex-wrap: wrap; gap: .35rem .5rem; padding: 0; list-style: none; }
.facts { margin: .9rem 0 0; }
.facts li { padding: .2rem .65rem; border: 1px solid #dfd4c2; border-radius: 99px; background: #faf7f0; font-size: .74rem; }
.led { flex: none; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.routing-preview { border: 1px solid #dcd3c3; border-radius: 1.15rem; background: var(--paper); }
.routing-preview figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .7rem .85rem; border-bottom: 1px solid var(--line); font-size: .8rem; font-weight: 700; }
.routing-preview .led { color: #587260; }
.preview-tap { margin-left: auto; color: var(--brass); font: .65rem var(--mono); }
.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; padding: .8rem; }
.channel { background: #f0eee5; border: 1px solid #dedbcb; border-radius: .55rem; padding: .5rem .6rem; }
.channel + .channel { background: #e9efe8; border-color: #d6e1d5; }
.channel-label { display: flex; justify-content: space-between; gap: .18rem; font-size: .79rem; font-weight: 700; }
.channel-label span, .channel small { color: var(--muted); }
.channel small { display: block; margin-top: .3rem; font-size: .72rem; }
.meter { height: .32rem; margin-top: .4rem; border-radius: 99px; background: linear-gradient(90deg, #a7834b 59%, #dcd6c6 59%); }
.meter-airpods { background: linear-gradient(90deg, #628573 78%, #d2ddd2 78%); }

.workbench { margin-top: clamp(1rem, 3vw, 2rem); }
.checker-bar, .verdict, .installation, .builder-controls, .code-block, .lookup, .table-shell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--paper);
}
.checker-bar, .installation, .verdict, .builder-controls { padding: clamp(.85rem, 2vw, 1.25rem); }
.filter-heading { display: flex; justify-content: space-between; align-items: center; gap: .55rem 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.button, .budgethub, .copy, .chips button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .38rem .85rem;
  background: var(--paper); color: var(--forest); border: 1px solid #c9c1b2; border-radius: 99px;
  font-size: .82rem; font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none;
}
.button:hover:not(:disabled), .copy:hover:not(:disabled), .chips button:hover { border-color: var(--forest); background: var(--cream); }
.budgethub { background: var(--forest); color: #fff; border-color: var(--forest); }
.budgethub:hover { background: var(--forest-hover); color: #fff; }
.budgethub-hint { flex-basis: 100%; width: 0; color: var(--muted); font-size: .8rem; }
#budgethub:not([href]) + .budgethub-hint { display: none; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.filter-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr) minmax(0, 1.35fr); gap: .65rem .9rem; }
label { display: block; min-width: 0; color: var(--ink); font-size: .82rem; font-weight: 680; }
select, input:not([type="checkbox"]) {
  width: 100%; min-width: 0; min-height: 44px; display: block; margin-top: .24rem; padding: .36rem .65rem;
  background: #fff; border: 1px solid #d8d0c2; color: var(--ink); border-radius: .58rem; font-size: .88rem;
}
input[type="checkbox"] { accent-color: var(--forest); }

.result-cards { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: start; gap: 1rem; margin-top: .9rem; }
.result-cards:has(.installation[hidden]) { grid-template-columns: minmax(0, 1fr); }
.verdict { --status: #365a45; --status-bg: #edf3ea; background: linear-gradient(var(--status-bg), var(--status-bg)) top / 100% 62px no-repeat var(--paper); }
.verdict[data-status="os"] { --status: #893e30; --status-bg: #f6e8e2; }
.verdict[data-status="outsideScope"], .verdict[data-status="permission"] { --status: #714e18; --status-bg: #f5ebda; }
.verdict-label { display: inline-flex; align-items: center; gap: .4rem; border-radius: 99px; background: var(--paper); padding: .3rem .6rem; color: var(--status); font-size: .8rem; }
.platform { margin-top: 1.4rem; color: var(--ink); font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.15; }
#result-detail, #alternatives { margin-top: .55rem; color: var(--muted); font-size: .91rem; }
#alternatives { padding-top: .55rem; border-top: 1px solid var(--line); }
.installation h3 { font-family: var(--display); font-size: 1.26rem; font-weight: 400; line-height: 1.2; }
.checklist { list-style: none; padding: 0; margin: .65rem 0; counter-reset: checklist; display: grid; gap: .4rem; }
.checklist li { counter-increment: checklist; position: relative; min-width: 0; padding: .48rem .55rem .48rem 2.15rem; background: var(--cream); border: 1px solid var(--line); border-radius: .55rem; color: var(--muted); font-size: .81rem; }
.checklist li::before { content: counter(checklist); position: absolute; left: .55rem; top: .48rem; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--brass-soft); color: var(--brass); font-weight: 700; }
.checklist strong { color: var(--ink); }

#builder, .reference { margin-top: 1.65rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.panel-head { margin-bottom: .7rem; }
.panel-head .eyebrow { margin-bottom: .15rem; }
.builder-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: .65rem 1rem; }
.builder-controls { grid-row: span 2; }
.field-help { margin: .26rem 0 .58rem; color: var(--muted); font-size: .79rem; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .45rem 0 .75rem; }
.chips button { padding-inline: .6rem; }
.chips button[aria-pressed="true"] { background: #e7eee5; border-color: #a5b5a1; color: var(--forest); }
.toggle { display: flex; flex-wrap: wrap; align-items: center; gap: .32rem; min-height: 44px; cursor: pointer; }
.validation { color: #893e30; font-size: .84rem; }
.outputs { min-width: 0; display: grid; gap: .55rem; align-content: start; }
.code-block { border-radius: .65rem; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-width: 0; padding: .35rem .5rem .35rem .72rem; background: #e9ede6; border-bottom: 1px solid #d7dfd3; border-radius: calc(.65rem - 1px) calc(.65rem - 1px) 0 0; font: 680 .77rem var(--mono); }
.copy { padding-inline: .7rem; }
pre { max-width: 100%; margin: 0; padding: .68rem .72rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--forest); font: .82rem/1.55 var(--mono); }
.lookup { grid-column: 2; padding: .3rem .7rem; border-radius: .65rem; }
.lookup[open] { padding-bottom: .7rem; }
.lookup input { margin-bottom: .5rem; }
summary { padding: .55rem 0; font-weight: 650; font-size: .93rem; }

.table-shell { margin-top: .7rem; overflow-x: auto; border-radius: .65rem; }
table { width: 100%; border-collapse: collapse; font-size: .89rem; text-align: left; }
th, td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
th:first-child { width: 22%; min-width: 6.5rem; }
thead { background: #eee8db; }
tbody tr:last-child > * { border-bottom: 0; }
.scope-note, .notice { margin-top: .55rem; color: var(--muted); font-size: .86rem; }
.faq { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: .7rem 1.4rem; margin-bottom: 2.2rem; }
.faq p { color: var(--muted); margin-top: .35rem; font-size: .88rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details p { padding-bottom: .6rem; }
.source-links { display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.site-footer { background: var(--forest); color: #e6e8da; padding-block: 1.45rem 2.1rem; }
.site-footer h2 { color: #fffdf9; font-size: 1.32rem; }
.related { gap: .35rem .8rem; margin: .7rem 0; font-size: .86rem; }
.site-footer a { color: #e6e8da; }
.site-footer a:hover { color: #fff; }
.disclaimer { font-size: .8rem; }
.toast:not(:empty) { position: fixed; right: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); padding: .65rem .85rem; border-radius: .5rem; background: var(--forest); color: #fff; font-size: .88rem; }

@media (max-width: 740px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-break { display: none; }
  .routing-preview { width: min(440px, 100%); }
  .result-cards, .builder-grid, .faq { grid-template-columns: minmax(0, 1fr); }
  .lookup, .builder-controls { grid-column: auto; grid-row: auto; }
}
@media (max-width: 530px) {
  .header-inner { padding-block: .2rem; }
  .header-inner nav { width: 100%; }
  .header-inner nav a { min-height: 38px; }
  .filter-fields { grid-template-columns: minmax(0, 1fr); }
  .routing-preview { display: none; }
  th, td { padding: .5rem; }
}
