:root {
  color-scheme: light;
  --ink: #0f2530;
  --muted: #526c77;
  --teal: #0a6578;
  --teal-deep: #075260;
  --teal-soft: #e3f1f4;
  --line: #d8e6ea;
  --card: #ffffff;
  --amber: #a15c07;
  --amber-soft: #fff5e6;
  --green: #137a4b;
  --green-soft: #e6f6ee;
  --red: #b42318;
  --red-soft: #fdecea;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.55;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #f7fbfc 0%, #eef6f8 60%, #e8f1f3 100%);
  background-attachment: fixed;
}

a { color: var(--teal); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* nav */
.libNav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.libBrand img { height: 28px; width: auto; display: block; }
.libNav nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.libNav nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
}
.libNav nav a:hover { background: var(--teal-soft); }
.libNav nav a.ghost { border: 1px solid var(--line); background: #fff; }
.libNav nav a.solid, .solid {
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  border-radius: 8px;
}
.libNav nav a.solid:hover, .solid:hover { background: var(--teal-deep); }

/* page */
.lib { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 56px; }
.pair { max-width: 860px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 8px 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal); text-decoration: underline; }
.crumbs i { font-style: normal; opacity: .5; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
}
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; letter-spacing: -.02em; margin: 8px 0 12px; }
h1 em, .pairGrid em { font-style: normal; color: var(--muted); font-weight: 500; }
h2 { font-size: 19px; margin: 0 0 12px; letter-spacing: -.01em; }
.lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 8px; }
.muted { color: var(--muted); margin-top: -6px; }
.pageHead { margin-bottom: 24px; }
.pageHead.hero { padding: 24px 0 8px; }

.draftNote {
  display: inline-block;
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid #f3d9b0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin: 8px 0 0;
}
.draftNote a { color: var(--amber); }

/* blocks */
.libCard, .separator, .trap, .cta, .related {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin: 0 0 16px;
}
.separator { background: var(--teal); border-color: var(--teal); color: #fff; }
.separator span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.separator p { margin: 6px 0 0; font-size: 19px; font-weight: 650; line-height: 1.45; }
.trap { background: var(--amber-soft); border-color: #f3d9b0; }
.trap h2 { color: var(--amber); }
.trap p { margin: 0; }
.repairMove { margin-bottom: 0; }

.compare { display: grid; gap: 0; border-top: 1px solid var(--line); }
.cRow { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cRow span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 2px; }
.cRow p { margin: 0; }
.cHead strong { color: var(--teal); }

/* free question */
.cardTop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cardTop span { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--teal-soft); padding: 3px 8px; border-radius: 999px; }
.stem { font-size: 17px; }
.qChoices { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.qChoices button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}
.qChoices button:hover:not(:disabled) { border-color: var(--teal); background: #f7fcfd; }
.qChoices button b { flex: 0 0 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--teal-soft); color: var(--teal); font-size: 13px; }
.qChoices button.right { border-color: var(--green); background: var(--green-soft); }
.qChoices button.right b { background: var(--green); color: #fff; }
.qChoices button.wrong { border-color: var(--red); background: var(--red-soft); }
.qChoices button.wrong b { background: var(--red); color: #fff; }
.qChoices button:disabled { cursor: default; }
.qReveal summary { cursor: pointer; font-weight: 700; color: var(--teal); }
.qReveal h3 { font-size: 15px; margin: 14px 0 6px; }
.qReveal ul { padding-left: 18px; margin: 0; }
.qReveal li { margin-bottom: 6px; }
.qVerdict:empty { display: none; }
.qVerdict { font-weight: 750; padding: 8px 12px; border-radius: 8px; }
.qVerdict.ok { background: var(--green-soft); color: var(--green); }
.qVerdict.no { background: var(--red-soft); color: var(--red); }

.flash { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 8px; background: #fbfdfe; }
.flash summary { cursor: pointer; font-weight: 650; }
.flash p { margin: 8px 0 0; color: var(--teal-deep); font-weight: 600; }

.cta { display: flex; gap: 20px; align-items: center; justify-content: space-between; background: var(--ink); border-color: var(--ink); color: #fff; }
.cta h2 { color: #fff; }
.cta p { margin: 0; color: #c7d8de; }
.cta .solid { flex: 0 0 auto; padding: 12px 18px; }

.related ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.related a { text-decoration: none; font-weight: 600; }
.related li a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.related li a:hover { border-color: var(--teal); color: var(--teal); }
.related .more { font-weight: 700; }

/* grids */
.systemGrid, .pairGrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.systemGrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pairGrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 24px; }
.systemGrid a, .pairGrid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.systemGrid a:hover, .pairGrid a:hover { border-color: var(--teal); box-shadow: 0 4px 14px rgba(10, 101, 120, .08); }
.systemGrid span, .pairGrid span { color: var(--muted); font-size: 14px; }
.pairGrid.compact { margin-top: 12px; }
.pairGrid .none { color: var(--muted); padding: 8px 0; }

.stepBlock { margin: 28px 0; }
.stepHead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stepHead h2 { font-size: 24px; margin: 0; }
.stepHead small { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--amber); background: var(--amber-soft); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.stepHead a { font-weight: 700; }

.libSearch input {
  width: 100%;
  max-width: 640px;
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-top: 12px;
}
.libSearch input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

.libFooter {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.libFooter p { margin: 0; max-width: 620px; }
.libFooter nav { display: flex; gap: 14px; flex-wrap: wrap; }
.libFooter a { color: var(--muted); }

@media (max-width: 720px) {
  .libNav nav a:not(.solid):not(.ghost) { display: none; }
  .cRow { grid-template-columns: 1fr 1fr; }
  .cRow span { grid-column: 1 / -1; padding-top: 0; }
  .cHead span { display: none; }
  .cta { flex-direction: column; align-items: stretch; text-align: left; }
  .cta .solid { text-align: center; }
  .related ul { grid-template-columns: 1fr; }
  .pairGrid { grid-template-columns: 1fr; }
  .separator p { font-size: 17px; }
}
[hidden] { display: none !important; }

/* videos */
.vid { margin: 0; }
.ytLite, .vid iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px;
  overflow: hidden; background: #0b2530; padding: 0; cursor: pointer;
}
.vid.vertical .ytLite, .vid.vertical iframe { aspect-ratio: 9 / 16; }
.ytLite img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.ytLite:hover img { transform: scale(1.03); }
.ytLite .play {
  position: absolute; left: 50%; top: 50%; width: 62px; height: 44px; transform: translate(-50%, -50%);
  background: rgba(15, 37, 48, .82); border-radius: 12px;
}
.ytLite .play::after {
  content: ""; position: absolute; left: 25px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff;
}
.ytLite:hover .play { background: #c4302b; }
.ytLite .startAt { position: absolute; left: 10px; bottom: 10px; background: rgba(15, 37, 48, .85); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.vid figcaption { margin-top: 8px; font-size: 14px; line-height: 1.4; }
.vid figcaption span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); margin-bottom: 2px; }
.vid figcaption a { color: var(--ink); text-decoration: none; font-weight: 600; }
.vid figcaption a:hover { color: var(--teal); text-decoration: underline; }
.watch .shortsRow { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; margin-bottom: 16px; }
.videoBlock { margin: 32px 0; }
.videoBlock h2 { font-size: 24px; }
.videoBlock h3 { font-size: 16px; margin: 22px 0 10px; color: var(--teal-deep); }
.videoGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.hasVideo { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 800; color: #c4302b; background: #fdecea; border-radius: 999px; padding: 2px 8px; margin-top: 4px; }
.ctaInline { display: inline-block; padding: 10px 16px; margin-top: 6px; }
@media (max-width: 720px) {
  .watch .shortsRow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.watch > .vid:not(.vertical) { max-width: 560px; }

/* Test-it-now button under pair videos, FAQ answers, cross-system links */
.watch .testNow { display: inline-block; margin-top: 14px; padding: 11px 18px; }
.faq h3 { font-size: 1rem; margin: 16px 0 4px; }
.faq h3:first-of-type { margin-top: 4px; }
.faq p { margin: 0; }
.related li a small { display: block; margin-top: 2px; font-weight: 400; font-size: .82rem; color: var(--muted); }

/* Blog */
.topicList { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.topicList a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.topicList a:hover { border-color: var(--teal); color: var(--teal); }
.postList { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.postList a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: #fff; }
.postList a:hover { border-color: var(--teal); }
.postList strong { display: block; font-size: 1.15rem; margin: 4px 0 6px; }
.postList span:not(.postMeta) { color: var(--muted); }
.postMeta { font-size: .85rem; color: var(--muted); }
.post .pageHead .postMeta { margin-top: 8px; }
.postBody { max-width: 720px; font-size: 1.05rem; line-height: 1.7; }
.postBody h2 { margin: 32px 0 10px; }
.postBody .vid { margin: 18px 0; max-width: 560px; }
.pairCard { display: block; margin: 14px 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fff; }
.pairCard:hover { border-color: var(--teal); }
.pairCard strong { display: block; }
.pairCard span { display: block; margin: 4px 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.pairCard i { font-style: normal; font-weight: 700; color: var(--teal); font-size: .9rem; }
.postHero { display: block; width: 100%; max-width: 900px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin: 0 0 24px; }
.selfTest ol { padding-left: 22px; }
.selfTest li { margin: 8px 0; }
.selfTest summary { cursor: pointer; }
.selfTest details p { margin: 6px 0 0; }
