:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #737373;
  --line: #e5e5e5;
  --soft: #f7f7f7;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.page { width: min(960px, 100% - 64px); margin: 0 auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.brand { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.8px; line-height: 1; text-decoration: none; }
.brand a { text-decoration: none; }
nav { display: flex; align-items: center; gap: 24px; font-size: 12px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }
nav .repo { color: var(--ink); }
.setup { margin: 24px 0; }
.mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.mode-switch [aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); background: var(--soft); }
.panel { min-width: 0; padding: 24px 0; border-top: 1px solid var(--line); }
.client-panel { padding: 0; border: 0; }
.download-panel { margin-top: 24px; padding-bottom: 0; }
h2 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.search, .check input, select { width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline-offset: 3px; }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23171717' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px 16px; font-size: 14px; }
.search::placeholder, .check input::placeholder { color: var(--muted); }
.search { margin-bottom: 12px; }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.option, .segment, .btn { appearance: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 48px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: none; text-align: center; }
.option:hover, .segment:hover, .btn:hover { background: var(--soft); border-color: #b0b0b0; }
.option[aria-checked="true"], .segment[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); background: var(--soft); }
.all-clients { margin-top: 12px; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.segment { flex-direction: column; gap: 2px; }
.segment span { font-size: 11px; font-weight: 400; color: var(--muted); }
.hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.tier-hint { margin-top: 12px; }
.result { margin-top: 20px; }
.actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; }
button:disabled { cursor: default; opacity: .45; }
.text-button { min-height: 32px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--ink); }
.download-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 20px; }
.download-meta .build-status { margin: 0; }
.download-meta .text-button { line-height: 20px; }
details { border-top: 1px solid var(--line); }
.result details:first-of-type { margin-top: 16px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 0; font-size: 14px; font-weight: 500; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex-shrink: 0; color: var(--muted); font-size: 16px; font-weight: 400; }
details[open] > summary::after { content: "−"; }
.steps { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps.single { padding-left: 0; }
.steps li { margin: 8px 0; padding-left: 4px; }
pre { max-width: 100%; margin: 0 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
.snippet-copy { margin-bottom: 16px; }
.extra-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 0; font-size: 12px; }
.extra-file a { overflow-wrap: anywhere; }
.build-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.badge { flex-shrink: 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.check { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.verdict { margin-top: 16px; }
.verdict h3 { margin: 0 0 8px; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.verdict table { width: 100%; border-collapse: collapse; font-size: 12px; }
.verdict td, .verdict th { padding: 8px 0; border-top: 1px solid var(--line); text-align: left; }
.verdict th { width: 90px; font-weight: 400; color: var(--muted); }
.verdict .no { color: var(--muted); }
.catalogue { border: 0; }
.catalogue > .search { margin: 0; }
#service-list { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; margin-top: 16px; }
.service-category { padding: 16px 0; border-bottom: 1px solid var(--line); }
.service-category:first-child { padding-top: 0; }
.service-category:last-child { border: 0; padding-bottom: 0; }
.service-category h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.service-item { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; cursor: pointer; }
.service-item:has(input:checked) { background: var(--soft); border-color: var(--ink); }
.service-item input { width: 16px; height: 16px; flex-shrink: 0; margin: 0; accent-color: var(--ink); }
.service-item span { overflow-wrap: anywhere; }
.service-item small { margin-left: auto; color: var(--muted); font-size: 9px; }
.builder-actions { display: grid; grid-template-columns: minmax(0, 1fr) 180px 180px; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.selection-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.builder-actions .hint { margin: 0; }
.builder-actions select, .builder-actions .primary { width: 100%; height: 48px; }
#selection-clear { min-height: 32px; }
.faq { margin: 0 0 24px; }
.faq summary { min-height: 56px; }
details p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 32px; border-top: 1px solid var(--line); }
.foot .brand { font-size: 15px; }
.foot p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.footer-actions { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.footer-actions a { color: var(--muted); text-decoration: none; }
.footer-actions a:hover { color: var(--ink); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 12px; background: #fff; }
@media (max-width: 640px) {
  .page { width: calc(100% - 32px); }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav { gap: 16px; }
  nav a:first-child { display: none; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .selection-meta { grid-column: 1 / -1; justify-content: space-between; }
  #service-list { max-height: 360px; }
  .foot { align-items: flex-start; }
  .footer-actions { flex-direction: column; align-items: flex-end; gap: 8px; }
}
@media (max-width: 360px) {
  .page { width: calc(100% - 24px); }
  .service-grid { grid-template-columns: 1fr; }
  .builder-actions .hint { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
