@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@500;600&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --bg: #0f0f14;
  --bg-2: #16161d;
  --bg-3: #1c1c26;
  --fg: #f4f4f5;
  --muted: #c4c4cc;
  --faint: #8b8b96;
  --line: #2a2a35;
  --line-strong: #3f3f4d;
  --accent: #a78bfa;
  --accent-2: #c4b5fd;
  --btn: #7c3aed;
  --btn-fg: #fff;
  --ok: #4ade80;
  --radius: 0.55rem;
  --serif: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --sans: "Source Sans 3", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: "Source Code Pro", ui-monospace, "Cascadia Code", Consolas, monospace;
  --shell: 76rem;
  --rail: 17.25rem;
  --header-h: 3.6rem;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font: 18px/1.5 var(--sans);
  background: var(--bg);
  color: var(--fg);
}

a {
  color: var(--accent-2);
  text-underline-offset: 0.15em;
}

a:hover { color: var(--fg); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  font-weight: 500;
  color: var(--accent-2);
  background: var(--bg-3);
  padding: 0.05em 0.22em;
  border-radius: 0.28rem;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--btn);
  color: var(--btn-fg);
  padding: 0.4rem 0.7rem;
  z-index: 40;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.bar {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--fg); }
.brand small {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-left: 0.45rem;
  vertical-align: middle;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
  font-size: 0.92rem;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.site-header nav a:hover { color: var(--fg); }
.site-header nav a[aria-current="page"] {
  color: var(--fg);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.hero-wrap {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.hero {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2.4rem 1.5rem 2.6rem;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(17rem, 0.92fr);
    gap: 2.75rem;
    align-items: center;
    padding-top: 2.8rem;
    padding-bottom: 3rem;
  }
}

.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--fg); }

h1 {
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-family: var(--sans);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.55rem;
  scroll-margin-top: 4.6rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 1.25rem 0 0.4rem;
  scroll-margin-top: 4.6rem;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 0.2rem;
  max-width: 38rem;
}

.lead strong { color: var(--fg); font-weight: 650; }

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}

.cta a,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1.05rem;
  border-radius: 0.45rem;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.cta .primary,
.btn.primary {
  background: var(--btn);
  color: var(--btn-fg);
  border: 1px solid var(--btn);
}
.cta .primary:hover,
.btn.primary:hover {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
}

.cta .ghost,
.btn.ghost {
  border: 1px solid var(--line-strong);
  color: var(--fg);
  background: transparent;
}
.cta .ghost:hover,
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) var(--rail);
    gap: 2.5rem 2.25rem;
    align-items: start;
    padding-top: 2.4rem;
  }
}

.primary { min-width: 0; }

.primary > :first-child { margin-top: 0; }

.page-intro {
  margin-bottom: 0.4rem;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 900px) {
  .rail {
    position: sticky;
    top: 4.5rem;
  }
}

.rail-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.1rem;
}

.rail-card h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.7rem;
}

.jump {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.jump a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.2rem 0;
}
.jump a:hover { color: var(--accent-2); }
.jump a small {
  display: block;
  color: var(--faint);
  font-weight: 400;
  font-size: 0.8rem;
}

.pid-sheet {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.28rem 0.7rem;
  font-size: 0.86rem;
  margin: 0;
}
.pid-sheet dt {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent-2);
}
.pid-sheet dd {
  margin: 0;
  color: var(--muted);
}

.rail-card .cta {
  flex-direction: column;
  align-items: stretch;
  margin-top: 0.15rem;
}
.rail-card .cta a { width: 100%; }

.rail-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.rail-card p:last-child { margin-bottom: 0; }

img.shot {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0a0a0c;
  display: block;
}

.grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-family: var(--serif);
  font-weight: 600;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.card a { font-weight: 650; text-decoration: none; }
.card a:hover { color: var(--fg); }
.card .meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 600;
}

.ident-grid {
  display: grid;
  gap: 1rem;
  margin: 0.85rem 0 1.6rem;
}
@media (min-width: 640px) {
  .ident-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .ident-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .ident-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.ident-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ident-card .ident-visual {
  background: #121218;
  border-bottom: 1px solid var(--line);
  min-height: 8.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 0.6rem 1.55rem;
}
.ident-card .ident-visual.kb-visual {
  min-height: 11.5rem;
  align-items: stretch;
  padding: 0.75rem 0.7rem 0.85rem;
}
.ident-card .ident-visual:has(.photo) {
  padding: 0;
}
.ident-card .ident-body {
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.ident-card .ident-body h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.ident-card .ident-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.ident-card .ident-body a {
  margin-top: auto;
  padding-top: 0.45rem;
  font-weight: 650;
  text-decoration: none;
  font-size: 0.9rem;
}
.ident-card .pid-line {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-2);
}

.photo {
  margin: 0;
  width: 100%;
  height: 9.2rem;
}
.photo img {
  width: 100%;
  height: 9.2rem;
  object-fit: cover;
  object-position: 50% 62%;
  display: block;
}
.credit {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--faint);
}
.credit a { color: var(--faint); }

.bottom-view {
  position: relative;
  background: linear-gradient(180deg, #2a2a35 0%, #16161d 100%);
  border: 1px solid var(--line-strong);
}
.bottom-view .tag {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.bottom-view.mouse {
  width: 5.4rem;
  height: 8.2rem;
  border-radius: 2.6rem 2.6rem 2.1rem 2.1rem;
}
.bottom-view.trackpad {
  width: 8.4rem;
  height: 5.6rem;
  border-radius: 0.7rem;
}
.bottom-view.aa::after,
.bottom-view.lightning::after,
.bottom-view.usbc::after {
  position: absolute;
  left: 50%;
  bottom: -1.15rem;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  white-space: nowrap;
  font-family: var(--sans);
}
.bottom-view.aa::after { content: "AA door"; }
.bottom-view.lightning::after { content: "Lightning"; }
.bottom-view.usbc::after { content: "USB-C"; }

.aa-door {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: 58%;
  border: 1px solid var(--line-strong);
  border-radius: 0.28rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.35rem;
}
.bottom-view.trackpad .aa-door {
  flex-direction: row;
  width: 70%;
  height: 48%;
  top: 58%;
}
.aa-cell {
  flex: 1;
  border: 1px dashed #71717a;
  border-radius: 0.2rem;
  background: #09090b;
}

.port {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #09090b;
  border: 1px solid #a1a1aa;
}
.port.lightning {
  bottom: 12%;
  width: 2.15rem;
  height: 0.62rem;
  border-radius: 0.08rem;
}
.port.usbc {
  bottom: 12%;
  width: 1.9rem;
  height: 0.72rem;
  border-radius: 0.4rem;
}
.bottom-view.trackpad .port {
  bottom: auto;
  top: 58%;
  transform: translate(-50%, -50%);
}

.kb {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.kb-face {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.4rem 0.45rem 0.35rem;
  aspect-ratio: 3.15 / 1;
  background: #2c2c36;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}
.kb-r {
  flex: 1;
  border-radius: 0.12rem;
  background: repeating-linear-gradient(
    90deg,
    #4e4e5c 0 0.52rem,
    #2c2c36 0.52rem 0.7rem
  );
}
.kb-r.space {
  background: #2c2c36;
  display: flex;
  justify-content: center;
  align-items: stretch;
}
.kb-r.space i {
  width: 42%;
  background: #4e4e5c;
  border-radius: 0.12rem;
}
.kb-find {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--bg);
  min-height: 2.6rem;
}
.kb-find p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.kb-find p strong {
  display: block;
  color: var(--fg);
  font-size: 0.84rem;
}
.kb-find .aa-door {
  position: static;
  transform: none;
  width: 2.6rem;
  height: 1.55rem;
  flex: 0 0 2.6rem;
  flex-direction: row;
  top: auto;
  left: auto;
}
.kb-find .port {
  position: static;
  transform: none;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
}

ul.plain {
  padding-left: 1.15rem;
  color: var(--muted);
  margin: 0.4rem 0 1rem;
}

.facts {
  margin: 0.55rem 0 1.35rem;
  padding-left: 1.25rem;
  color: var(--muted);
}
.facts li { margin: 0.4rem 0; }
.facts strong { color: var(--fg); }

ul.plain strong { color: var(--fg); }
ul.plain li { margin: 0.35rem 0; }

dl.faq dt { font-weight: 650; margin-top: 1.1rem; }
dl.faq dd { margin: 0.35rem 0 0; color: var(--muted); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.7rem 0 1.4rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--faint);
  font-weight: 650;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
td { color: var(--fg); }
td code {
  background: transparent;
  padding: 0;
}

.note {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--muted);
  margin: 1rem 0 1.4rem;
}

.how {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
  margin: 0 0 1.5rem;
}
.how h3 { margin-top: 0; }
.how ol {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.how ol strong { color: var(--fg); }
.how li { margin: 0.4rem 0; }
.how .note { margin: 0.85rem 0 0; }
.how > :last-child { margin-bottom: 0; }

.pick { list-style: none; padding: 0; margin: 1rem 0 1.6rem; }
.pick li { margin: 0 0 0.55rem; }
.pick a {
  display: block;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 0.55rem;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--fg);
  font-weight: 650;
}
.pick a:hover { border-color: var(--accent); }
.pick small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.2rem;
}

ol.steps { color: var(--muted); padding-left: 1.2rem; }
ol.steps strong { color: var(--fg); }
ol.steps li { margin: 0.4rem 0; }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer .bar {
  padding-top: 1.2rem;
  padding-bottom: 1.6rem;
  align-items: flex-start;
}
.site-footer p { margin: 0.2rem 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.diagram {
  margin: 1.2rem 0 1.8rem;
}
.diagram > p.caption {
  margin: 0.65rem 0 0;
  color: var(--faint);
  font-size: 0.82rem;
}
.pair {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .pair { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
}
.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  min-width: 0;
}
.panel.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.panel.bad { border-color: color-mix(in srgb, #c45c4a 50%, var(--line)); }
.panel h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-family: var(--sans);
}
.panel.ok h3 { color: var(--ok); }
.panel.bad h3 { color: #e8a090; }
.pair-then {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
  text-align: center;
  padding: 0.2rem 0.4rem;
}
@media (min-width: 720px) {
  .pair-then { writing-mode: vertical-rl; transform: rotate(180deg); }
}
.rooms {
  display: grid;
  gap: 0.45rem;
}
.room {
  border: 1px dashed var(--line-strong);
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-3);
}
.room strong { display: block; color: var(--fg); font-size: 0.95rem; }
.room span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }
.room.lost {
  opacity: 0.45;
  text-decoration: line-through;
}
.stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.stack li {
  margin: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--bg-3);
  color: var(--muted);
  font-size: 0.92rem;
}
.stack li strong { color: var(--fg); }
.stack li.hl {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-2));
  border-color: var(--accent);
  color: var(--fg);
}
.paths {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .paths { grid-template-columns: 1fr 1fr; }
}
.path-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.55rem 0 0;
}
.path-steps span {
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  color: var(--fg);
}
.path-steps .sep { border: 0; background: none; color: var(--faint); padding: 0; }


.sba-pair {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .sba-pair { grid-template-columns: 1fr 1fr; }
}
.sba {
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bg-2);
}
.sba .sba-title {
  margin: 0;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}
.sba .layer {
  padding: 0.62rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.sba .layer:last-child { border-bottom: 0; }
.sba .layer strong { display: block; color: var(--fg); font-weight: 650; }
.sba .filter-wrap {
  padding: 0.5rem 0.65rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.sba .filter {
  border: 2px solid var(--accent);
  border-radius: 0.4rem;
  padding: 0.7rem 0.85rem;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-2));
  display: grid;
  gap: 0.15rem;
  text-align: center;
}
.sba .filter strong { color: var(--fg); font-size: 0.95rem; }
.sba .filter em {
  font-style: normal;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 650;
}
.credit-box {
  margin: 1.4rem 0 1.8rem;
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.credit-box h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-family: var(--sans);
}
.credit-box p { color: var(--muted); margin: 0.4rem 0; }
.credit-box .cta { margin: 0.85rem 0 0.35rem; }

