.banner { --banner-image: url(../img/banner.svg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.step-head { display: flex; align-items: center; gap: 10px; }
.step-head .muted { margin-left: auto; }
.step-no { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--color-nav); color: var(--color-on-dark); font-family: var(--font-display); font-weight: 700; font-size: 16px; }

.use-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.use-tile { position: relative; }
.use-tile > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.use-tile > label { position: relative; height: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px 40px 14px 14px; border: 1.5px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.use-tile > label:hover { border-color: var(--color-control-border); }
.use-tile > label::after { content: ''; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border: 2px solid var(--color-control-border); border-radius: 50%; background: var(--color-surface); }
.use-tile > input:checked + label { border-color: var(--color-accent-border); box-shadow: inset 0 0 0 1px var(--color-accent-border); background: var(--color-accent-bg); }
.use-tile > input:checked + label::after { border-color: var(--color-accent-border); background: var(--color-accent-border) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.use-tile > input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.use-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--color-neutral-bg); color: var(--color-text); }
.use-tile > input:checked + label .use-icon { background: var(--color-accent-soft); color: var(--color-accent); }
.use-tile > input:checked + label .use-choice-name { color: var(--color-accent); }
.use-icon-sm { width: 28px; height: 28px; border-radius: 8px; }
.use-icon-sm svg { width: 18px; height: 18px; }
.use-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.use-choice-name { font-weight: 700; }
.use-choice-desc { font-size: 14px; color: var(--color-text-muted); line-height: 1.45; }

.sw-section { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--color-border-soft); }
.sw-section-title { display: flex; align-items: baseline; gap: 10px; font-size: 17px; font-weight: 700; }
.sw-group { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; align-items: start; padding: 12px 0; }
.sw-group + .sw-group:not([hidden]) { border-top: 1px dashed var(--color-border-soft); }
.sw-group-head { display: flex; align-items: center; gap: 8px; font-weight: 700; min-height: var(--target-min); }
.sw-group > .field, .sw-group > #game-selected { grid-column: 2; }
#game-picker { max-width: 480px; }
#game-picker .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pick-list:empty { display: none; }
.chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: var(--target-min); padding: 0 14px 0 36px; border: 1.5px solid var(--color-control-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.chip::before { content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 1.5px solid var(--color-control-border); border-radius: 50%; box-sizing: border-box; }
.chip:hover { border-color: var(--color-accent-border); }
.chip-input:checked + .chip { background: var(--color-accent-bg); border-color: var(--color-accent-border); color: var(--color-accent); }
.chip-input:checked + .chip::before { border-color: var(--color-accent-border); background: var(--color-accent-border) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.chip-input:focus-visible + .chip, .chip:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.chip-removable { padding: 0 12px 0 16px; background: var(--color-accent-bg); border-color: var(--color-accent-border); color: var(--color-accent); }
.chip-removable::before { display: none; }
.chip-removable .chip-x { font-size: 18px; line-height: 1; }

.platform-switch { margin-bottom: 4px; }
.platform-switch input:checked + label { background: var(--color-accent-bg); border-color: var(--color-accent-border); color: var(--color-accent); font-weight: 500; box-shadow: inset 0 0 0 1px var(--color-accent-border); }
.needs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.needs-table thead th { text-align: left; padding: 10px 12px; font-size: 14px; font-weight: 700; color: var(--color-on-dark); background: var(--color-nav); }
.needs-table thead th.tier-min { background: var(--color-tier-min); }
.needs-table thead th.tier-rec { background: var(--color-tier-rec); }
.needs-table tbody th { text-align: left; width: 20%; padding: 12px; font-weight: 700; vertical-align: top; }
.needs-table td { padding: 12px 12px 4px; vertical-align: top; width: 40%; overflow-wrap: anywhere; }
.needs-table tbody tr:not(.needs-detail-row) > th { padding-bottom: 4px; }
.needs-table tbody tr:not(.needs-detail-row) > * { border-top: 1px solid var(--color-border-soft); }
.needs-detail-row td { padding: 0 12px 10px; width: auto; }
.needs-detail-row summary { cursor: pointer; color: var(--color-link); font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }
.needs-detail { list-style: none; margin: 4px 0 0; padding: 10px 12px; background: var(--color-bg); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.needs-detail li { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.needs-detail-name { font-weight: 700; min-width: 8em; }
.needs-detail-text { color: var(--color-text-2); flex: 1 1 260px; }

#needs-body, #matches-body { display: flex; flex-direction: column; gap: 14px; }
#needs-body > p, #matches-body > p { margin: 0; }
.match-count { margin: 0; font-weight: 500; }
.match-group { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.match-group + .match-group { padding-top: 16px; border-top: 1px solid var(--color-border-soft); }
.match-group-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.match-group-title .tag { font-weight: 500; }
.match-group > .muted { margin: 0; }
.brand-group { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; background: var(--color-surface); }
.brand-title { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; min-height: var(--target-min); background: var(--color-bg); font-size: 15px; font-weight: 700; letter-spacing: .04em; color: var(--color-text-2); cursor: pointer; list-style: none; }
.brand-title::-webkit-details-marker { display: none; }
.brand-title::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.brand-group[open] > .brand-title::after { transform: rotate(-135deg); }
.brand-group[open] > .brand-title { border-bottom: 1px solid var(--color-border-soft); }
.brand-title:hover { color: var(--color-text); }
.match-list { list-style: none; margin: 0; padding: 0; }
.match-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 14px; border-left: 4px solid var(--match-color, transparent); }
.match-row + .match-row { border-top: 1px solid var(--color-border-soft); }
.match-row.match-rec { --match-color: var(--color-tier-rec); }
.match-row.match-min { --match-color: var(--color-tier-min); }
.match-row.match-unclear { --match-color: var(--color-neutral); }
.match-row.match-fail { --match-color: var(--color-fail); }
.match-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.match-name { font-size: 16px; font-weight: 700; color: var(--color-text); text-decoration: none; }
.match-name:hover { color: var(--color-link); text-decoration: underline; }
.match-specs { margin: 0; font-size: 14px; color: var(--color-text-2); }
.match-short { margin: 0; font-size: 14px; color: var(--color-warn); }
.match-configure { margin: 0; font-size: 14px; color: var(--color-accent); }
.match-row .badge { flex-shrink: 0; }
.match-other > summary { cursor: pointer; color: var(--color-link); min-height: var(--target-min); display: inline-flex; align-items: center; font-weight: 500; }
.match-other[open] > summary { margin-bottom: 8px; }

.sticky-cta { display: none; }

.result-title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.use-card { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
.use-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; padding: 16px 18px; background: var(--color-bg); }
.use-head-text { flex: 1 1 200px; min-width: 0; }
.use-head h3 { font-size: 18px; font-weight: 700; }
.use-desc { margin: 2px 0 0; font-size: 14px; color: var(--color-text-muted); }
.use-verdict { flex: 1 1 220px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.use-status { font-size: 22px; font-weight: 700; line-height: 1.3; }
.use-verdict-detail { font-size: 14px; color: var(--color-text-2); }
.use-more { margin: 0; padding: 4px 18px 8px; }

.sw-list { list-style: none; margin: 0; padding: 0; }
.sw-row { padding: 14px 18px; border-top: 1px solid var(--color-border-soft); display: flex; flex-direction: column; gap: 8px; }
.sw-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sw-head h4 { font-size: 16px; font-weight: 700; }
.sw-tiers { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sw-tier { display: flex; align-items: center; gap: 8px; }
.sw-tier dt { font-size: 13px; font-weight: 700; padding-left: 10px; border-left: 4px solid var(--tier-color); color: var(--color-text-2); }
.sw-tier dd { margin: 0; }
.sw-detail > summary { cursor: pointer; color: var(--color-link); font-size: 15px; min-height: var(--target-min); display: inline-flex; align-items: center; }
.sw-detail[open] > summary { margin-bottom: 4px; }
.tier-detail-block { margin-top: 10px; }
.tier-detail-block h5 { font-size: 14px; font-weight: 700; color: var(--color-on-dark); background: var(--tier-color); display: inline-block; padding: 3px 10px; border-radius: 6px; margin: 0 0 8px; }
.tier-detail-block.tier-min { --tier-color: var(--color-tier-min); }
.tier-detail-block.tier-rec { --tier-color: var(--color-tier-rec); }
.sw-tier.tier-min { --tier-color: var(--color-tier-min); }
.sw-tier.tier-rec { --tier-color: var(--color-tier-rec); }

.detail-table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14px; }
.detail-table thead th { text-align: left; padding: 8px 10px; font-weight: 700; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); }
.detail-table tbody th { text-align: left; padding: 10px; font-weight: 500; color: var(--color-text-2); vertical-align: top; width: 16%; }
.detail-table td { padding: 10px; vertical-align: top; overflow-wrap: anywhere; }
.detail-table td:nth-of-type(1) { width: 34%; }
.detail-table td:nth-of-type(2) { width: 30%; }
.detail-table tbody tr + tr > * { border-top: 1px solid var(--color-border-soft); }
.detail-table .cell-note a { color: var(--color-text-muted); }

.laptop-brand { margin: 0 0 4px; font-size: 14px; letter-spacing: 0.08em; color: var(--color-nav-text); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th { text-align: left; width: 30%; padding: 12px 14px; font-weight: 500; color: var(--color-text-2); background: var(--color-bg); vertical-align: top; }
.spec-table td { padding: 12px 14px; overflow-wrap: anywhere; }
.spec-table tr + tr > * { border-top: 1px solid var(--color-border-soft); }
#uses .use-card + .use-card { margin-top: 0; }

.filter-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.select { width: 100%; min-height: 50px; padding: 0 12px; font: inherit; color: var(--color-text); background: var(--color-surface); border: 1.5px solid var(--color-input-border); border-radius: var(--radius-control); }
.laptop-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.laptop-card { height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; color: var(--color-text); text-decoration: none; border-top: 4px solid var(--color-nav); }
.laptop-card:hover { color: var(--color-text); border-color: var(--color-input-border); }
.laptop-card-brand { font-size: 13px; letter-spacing: 0.08em; color: var(--color-text-muted); }
.laptop-card-name { font-size: 16px; font-weight: 700; line-height: 1.4; }
.laptop-card-specs { font-size: 14px; color: var(--color-text-2); line-height: 1.5; }

.method-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.method-table thead th { text-align: left; padding: 10px; background: var(--color-nav); color: var(--color-on-dark); font-weight: 700; }
.method-table th, .method-table td { padding: 10px; vertical-align: top; text-align: left; }
.method-table tbody th { font-weight: 700; }
.method-table tbody tr + tr > * { border-top: 1px solid var(--color-border-soft); }
.method-table td[lang="en"] a { color: var(--color-text-2); }

@media (max-width: 760px) {
  .use-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .use-tile > label { flex-direction: column; gap: 8px; padding: 12px 34px 12px 12px; }
  .use-choice-desc { font-size: 13px; }
  .sw-group { grid-template-columns: 1fr; }
  .sw-group > .field, .sw-group > #game-selected { grid-column: 1; }
  .needs-table thead { display: none; }
  .needs-table, .needs-table tbody, .needs-table tr, .needs-table th, .needs-table td { display: block; width: auto !important; }
  .needs-table tbody tr:not(.needs-detail-row) { padding: 10px 0 4px; border-top: 1px solid var(--color-border-soft); }
  .needs-table tbody tr:not(.needs-detail-row) > * { border-top: 0; padding: 2px 0; }
  .needs-table td::before { content: attr(data-label); display: inline-block; min-width: 5.5em; font-size: 13px; font-weight: 700; color: var(--tier-color); }
  .needs-table td.tier-min { --tier-color: var(--color-tier-min); }
  .needs-table td.tier-rec { --tier-color: var(--color-tier-rec); }
  .needs-detail-row td { padding: 0 0 8px; }
  .sticky-cta:not([hidden]) { display: flex; position: sticky; bottom: 12px; z-index: 15; align-self: center; background: var(--color-nav); color: var(--color-on-dark); box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28); }
  .sticky-cta:hover { color: var(--color-on-dark); }
  .use-verdict { align-items: flex-start; text-align: left; flex-basis: 100%; }
  .use-head { padding: 14px; }
  .sw-row { padding: 12px 14px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .detail-table { min-width: 0; }
  .detail-table thead { display: none; }
  .detail-table, .detail-table tbody, .detail-table tr, .detail-table th, .detail-table td { display: block; width: auto !important; }
  .detail-table tr { padding: 10px 0; }
  .detail-table tbody tr + tr > * { border-top: 0; }
  .detail-table tbody tr + tr { border-top: 1px solid var(--color-border-soft); }
  .detail-table tbody th { padding: 0 0 4px; font-weight: 700; color: var(--color-text); }
  .detail-table td { padding: 3px 0; }
  .detail-table td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
  .spec-table th { width: 38%; }
  .laptop-grid { grid-template-columns: 1fr; }
}
