:root {
  --bg-canvas: #efede7;
  --bg-surface: #faf9f5;
  --bg-subtle: #e6e3da;
  --bg-muted: #f3f1eb;
  --bg-dark: #161815;
  --bg-dark-elevated: #20231e;

  --text-primary: #181917;
  --text-secondary: #43453f;
  --text-muted: #65675f;
  --text-on-dark: #f4f3ee;
  --text-muted-on-dark: #b3b7ab;

  --accent: #d8f76f;
  --accent-strong: #c5eb46;
  --accent-border: #8fa834;
  --accent-ink: #141712;

  --border-subtle: #d6d2c7;
  --border-strong: #b8b3a6;
  --border-dark: #2f342c;



  --status-missing-border: #b8b4a8;

  --status-incompatible-border: #d59d90;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;

  --shadow-panel: 0 1px 2px rgba(22, 24, 21, 0.05), 0 6px 20px rgba(22, 24, 21, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

.skip-link {
  position: absolute;
  top: -3.5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  background-color: var(--bg-dark);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
}

.skip-link:focus {
  top: 0.75rem;
}

:focus-visible {
  outline: 3px solid var(--bg-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent);
}

.shell {
  width: min(100% - 2rem, 74rem);
  margin-inline: auto;
}

.site-header {
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.brand-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.025rem;
  letter-spacing: -0.015em;
}

.brand-mark {
  position: relative;
  width: 1.35rem;
  height: 1.05rem;
  border-radius: 0.22rem;
  background-color: var(--bg-dark);
  border: 1.5px solid var(--bg-dark);
  box-shadow: inset 0 0 0 2px var(--accent);
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.22rem;
  border-radius: 0.08rem;
  background-color: var(--accent);
  opacity: 0.35;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  background-color: var(--accent);
  border-color: var(--accent-border);
}

.main-content {
  flex: 1;
  padding-block: 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero {
  display: grid;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(to right, rgba(216, 247, 111, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(216, 247, 111, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 82% 28%, rgba(216, 247, 111, 0.12), transparent 55%);
  background-size: 20px 20px, 20px 20px, 100% 100%;
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-panel);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text-on-dark);
}

.hero-lead {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(0.92rem, 1.3vw, 1.04rem);
  line-height: 1.48;
  color: var(--text-muted-on-dark);
}

.selector-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.laptop-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.875rem;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label,
.laptop-form label,
.model-sheet label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.laptop-form input[type="search"],
.laptop-form input[type="text"],
.laptop-form select,
.model-sheet select {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.laptop-form input[type="search"]::placeholder {
  color: var(--text-muted);
}

.laptop-form input[type="search"]:hover,
.laptop-form select:hover,
.model-sheet select:hover {
  border-color: var(--text-primary);
}

.model-help {
  margin: 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
  background-color: var(--bg-muted);
  border-left: 3px solid var(--accent-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 0.25rem;
}

.quick-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.quick-models {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-models button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.quick-models button[data-family-only] {
  background-color: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.17em;
}

@media (max-width: 560px) {
  .quick-models button[data-laptop^="macbook-air-13-"] {
    min-block-size: 44px;
  }
}

.quick-models button:hover {
  background-color: var(--accent);
  border-color: var(--accent-border);
  color: var(--accent-ink);
}

.quick-models button[aria-pressed="true"],
.quick-models button.active,
.quick-models button.is-active,
.quick-models button.selected {
  background-color: var(--bg-dark);
  border-color: var(--bg-dark);
  color: var(--accent);
}

.model-info:empty {
  display: none;
}

.model-sheet {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.model-sheet h2,
.model-sheet h3,
.model-sheet h4 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.model-sheet p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.model-sheet ul,
.model-sheet dl {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.model-sheet li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.results-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding-inline: 0.15rem;
}

.results-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#results-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.results-summary {
  margin: 0;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.affiliate-disclosure {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  max-width: 36rem;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22.5rem), 1fr));
  gap: 1rem;
  align-items: stretch;
}

.result-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
}

.result-card.missing {
  border-top-color: var(--status-missing-border);
}

.result-card.incompatible {
  border-top-color: var(--status-incompatible-border);
  background-color: #f7f5f0;
}

@media (prefers-reduced-motion: no-preference) {
  .featured-sleeve > .result-card,
  [data-fit-starter] > .result-card {
    animation: sleeve-card-enter 240ms ease-out;
  }

  @keyframes sleeve-card-enter {
    from { transform: translateY(4px); }
    to { transform: translateY(0); }
  }
}

.result-main {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.result-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.result-heading h3,
.result-heading h4 {
  margin: 0.1rem 0 0;
  font-size: 1.1rem;
  line-height: 1.28;
  color: var(--text-primary);
}

.result-brand {
  display: block;
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.result-variant {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.12rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.24rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-muted);
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.fit-note {
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.855rem;
  line-height: 1.45;
  color: var(--text-primary);
  background-color: var(--bg-muted);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.result-card.incompatible .fit-note {
  border-left-color: var(--status-incompatible-border);
  background-color: #fbf0ed;
}

.fit-comparison {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 56rem) {
  .featured-sleeve .fit-comparison:has(.readouts) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  }

  .featured-sleeve .fit-comparison .clearance-heading {
    grid-column: 1 / -1;
  }

  .featured-sleeve .fit-comparison .readouts {
    align-content: start;
  }
}

.readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.readout {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.readout--thickness {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 0.65rem;
}

.readout--thickness .clearance-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.5rem;
}

.readout span,
.readout small,
.readout dt {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.readout strong,
.readout dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dimension-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dimension-table table {
  width: 100%;
  border-collapse: collapse;
}

.dimension-table caption {
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.45rem 0.6rem 0.25rem;
}

.dimension-table th,
.dimension-table td {
  padding: 0.42rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.dimension-table thead th {
  background-color: var(--bg-muted);
  font-size: 0.73rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.dimension-table tbody tr:last-child th,
.dimension-table tbody tr:last-child td {
  border-bottom: none;
}

.dimension-table td:not(:first-child),
.dimension-table th:not(:first-child) {
  font-family: var(--font-mono);
}

.data-source,
details.data-source {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.data-source a,
a.data-source,
.model-sheet a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 0.16em;
}

.data-source a:hover,
a.data-source:hover,
.model-sheet a:hover {
  background-color: var(--accent);
  text-decoration-color: var(--text-primary);
}

details.data-source,
.result-card details,
.model-sheet details {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
}

details.data-source summary,
.result-card details summary,
.model-sheet details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.button-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  color: var(--text-on-dark);
  background-color: var(--bg-dark);
  border: 1.5px solid var(--bg-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.button-link:hover {
  background-color: var(--accent);
  border-color: var(--accent-border);
  color: var(--accent-ink);
}

.actions .button-link:not(:first-child),
.button-link.secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.actions .button-link:not(:first-child):hover,
.button-link.secondary:hover {
  background-color: var(--bg-muted);
  border-color: var(--text-primary);
}

.other-results {
  margin-top: 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
}

.other-results summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--text-primary);
  padding-block: 0.15rem;
}

.other-results[open] summary {
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.other-results h3 {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
}

.empty-state {
  background-color: var(--bg-surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.35rem;
  text-align: left;
  color: var(--text-secondary);
}

.empty-state p {
  margin: 0;
  max-width: 58ch;
}

.empty-state p + p {
  margin-top: 0.35rem;
}

.empty-state-heading {
  font-weight: 750;
  font-size: 1rem;
  color: var(--text-primary);
}

.method-section {
  margin-top: 1rem;
  padding: 1.35rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.method-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.method-header h2 {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.4rem);
  letter-spacing: -0.015em;
}

.method-intro {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 65ch;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.9rem;
}

.method-card {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.method-card h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.method-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.52;
  color: var(--text-secondary);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  padding-block: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0;
}

.footer-link {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
}

@media (max-width: 780px) {
  .shell {
    width: min(100% - 1.25rem, 74rem);
  }

  .header-inner {
    padding-block: 0.55rem;
  }

  .main-content {
    padding-block: 0.65rem 2rem;
    gap: 0.75rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
  }

  .hero h1 {
    font-size: 1.45rem;
  }

  .hero-lead {
    font-size: 0.85rem;
    line-height: 1.38;
  }


  .selector-panel {
    padding: 0.95rem 1rem;
    gap: 0.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .result-card {
    padding: 0.95rem;
  }

  .dimension-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.76rem;
  }

  .dimension-table th,
  .dimension-table td {
    padding: 0.35rem 0.42rem;
    white-space: nowrap;
  }
}

.search-suggestions {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
}

.search-suggestions button {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-muted);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.search-suggestions button:hover {
  background: var(--accent);
}

.clearance-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.clearance-label {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.clearance-cue {
  display: inline-block;
  padding: 0.16rem 0.46rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background-color: var(--bg-muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.clearance-cue.zero,
.readout.zero,
.dimension-table td.zero {
  color: #602c02;
  background-color: #fdefc8;
  border-color: #ac630f;
}

.clearance-cue.negative,
.readout.negative,
.dimension-table td.negative {
  color: #702821;
  background-color: #fbe7e4;
  border-color: #a95042;
}

.clearance-value strong,
.clearance-value .axis-clearance-note {
  display: block;
  color: inherit;
}

.clearance-value .axis-clearance-note {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 650;
  white-space: normal;
}

.result-grid {
  align-items: start;
}

@media (max-width: 560px) {
  .hero {
    padding-block: 1.15rem;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 6vw, 2rem);
  }
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.9rem;
}

.guide-article {
  width: min(100%, 46rem);
  margin-inline: auto;
  padding: clamp(1rem, 4vw, 2.4rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.guide-article h1 {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-block: 1rem 0.75rem;
}

.guide-article h2 {
  margin-block: 1.75rem 0.5rem;
  font-size: 1.25rem;
}

.guide-article p {
  margin: 0 0 0.8rem;
}

.guide-article .guide-answer {
  font-weight: 650;
}

.guide-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.guide-presets .button-link {
  white-space: normal;
  text-align: center;
}

.guide-faq {
  padding: 0.6rem 0;
  border-block-start: 1px solid var(--border-subtle);
}

.guide-faq summary {
  font-weight: 650;
  cursor: pointer;
}

.guide-faq p {
  margin: 0.55rem 0 0;
}

.guide-article li + li {
  margin-top: 0.35rem;
}
.fit-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 0.86rem;
}

@media (prefers-reduced-motion: no-preference) {
  .fit-diagram {
    transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
  }
}

@media (hover: hover) and (pointer: fine) {
  .fit-diagram:hover {
    border-color: var(--accent-border);
    box-shadow: inset 0 0 0 1px var(--accent);
  }
}

.result-card:has(:focus-visible) .fit-diagram {
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 1px var(--accent);
}

@media (hover: none) {
  .result-card:focus-within .fit-diagram {
    border-color: var(--accent-border);
    box-shadow: inset 0 0 0 1px var(--accent);
  }
}

.fit-diagram__stage {
  position: relative;
  flex: 0 0 clamp(6.75rem, 24vw, 8.5rem);
  aspect-ratio: 1;
}

.fit-diagram__plot {
  position: absolute;
  inset: 1.125rem 0 0 1.125rem;
}

.fit-diagram__axis {
  position: absolute;
  color: var(--text-secondary);
  pointer-events: none;
}

.fit-diagram__axis--length {
  inset-block-start: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  border-block-start: 1px solid var(--border-strong);
}

.fit-diagram__axis--width {
  inset-block-start: 50%;
  inset-inline-start: 0;
  transform: translateY(-50%);
  border-inline-start: 1px solid var(--border-strong);
}

.fit-diagram__axis-label {
  position: absolute;
  font-size: 0.65rem;
  line-height: 1;
}

.fit-diagram__axis--length .fit-diagram__axis-label {
  bottom: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
}

.fit-diagram__axis--width .fit-diagram__axis-label {
  top: 50%;
  right: 0.2rem;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}

.fit-diagram__rect {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}

.fit-diagram__rect--sleeve {
  border: 3px solid #677b20;
}

.fit-diagram__rect--laptop {
  border: 2px dashed var(--text-primary);
}

.fit-diagram__legend {
  flex: 1 1 7rem;
  min-width: 0;
}

.fit-diagram__key {
  display: flex;
  align-items: flex-start;
  gap: 0.38rem;
  margin: 0 0 0.2rem;
}

.fit-diagram__swatch {
  flex: 0 0 0.7rem;
  height: 0.7rem;
  margin-top: 0.25rem;
  border: 2px solid #677b20;
}

.fit-diagram__key--laptop .fit-diagram__swatch {
  border: 1.5px dashed var(--text-primary);
}

.fit-diagram__cap,
.fit-diagram__note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.fit-diagram__cap {
  flex-basis: 100%;
}

[data-fit-starter] .result-main > p {
  margin: 0;
}

.refine-fit {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  background: var(--bg-surface);
}

.refine-fit summary {
  cursor: pointer;
  font-weight: 700;
}

.refine-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.refine-form p {
  margin: 0;
  color: var(--text-secondary);
}

.refine-form fieldset {
  padding: 0.65rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.refine-form legend {
  font-weight: 650;
}

.refine-form input[type="number"],
.refine-form select {
  width: 100%;
  padding: 0.55rem;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg-surface);
}

.refine-dimensions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.refine-preferences {
  display: grid;
  gap: 0.4rem;
}

.refine-error {
  font-weight: 650;
}

[data-fit-starter] > p:first-child {
  margin-top: 0;
}

@media (max-width: 560px) {
  .results-container {
    gap: 0.75rem;
  }

  .result-card {
    gap: 0.65rem;
  }
}

.remaining-sleeves {
  display: grid;
  gap: 0.75rem;
}

.refine-form .button-link {
  justify-self: start;
  cursor: pointer;
}

.refine-dimensions {
  margin-top: 0.55rem;
}

[data-fit-starter] {
  margin-top: 0.8rem;
}

.change-laptop {
  align-self: flex-start;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration-color: var(--accent-border);
}

.guide-grid h3 a,
.guide-article a:not(.button-link) {
  color: var(--text-primary);
  text-decoration-color: var(--accent-border);
  text-underline-offset: 0.16em;
}

.offer-check {
  align-self: center;
  color: var(--text-secondary);
  font-size: 0.84rem;
}
