:root, html body {
  --sw-ink: #14201f;
  --sw-muted: #5c6b69;
  --sw-paper: #f4f2eb;
  --sw-card: #ffffff;
  --sw-line: #ddd9ce;
  --sw-accent: #0f6b6b;
  --sw-accent-ink: #0a4f4f;
  --sw-accent-soft: #dcefee;
  --sw-header: #fbfaf7;
  --sw-serif: Georgia, "Times New Roman", Times, serif;
  --sw-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sw-max: 1100px;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: var(--sw-sans);
  color: var(--sw-ink);
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(15, 107, 107, 0.08), transparent 55%),
    radial-gradient(900px 360px at 90% 0%, rgba(20, 32, 31, 0.04), transparent 50%),
    var(--sw-paper);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: clip;
  max-width: 100%;
}
img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}
a { color: var(--sw-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--sw-accent-ink); }
.sw-skip {
  position: absolute; left: -999px; top: 0;
  background: var(--sw-ink); color: #fff; padding: 8px 12px;
}
.sw-skip:focus { left: 8px; z-index: 99; }

/* —— Header / nav —— */
.sw-header {
  background: var(--sw-header);
  border-bottom: 1px solid var(--sw-line);
  position: relative;
  z-index: 50;
  max-width: 100%;
  overflow-x: clip;
}
.sw-top {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 16px 20px 10px;
  display: flex;
  align-items: baseline;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.sw-brand {
  font-family: var(--sw-serif);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--sw-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
}
.sw-brand:hover { color: var(--sw-accent); }
.sw-tag {
  margin: 0;
  color: var(--sw-muted);
  font-size: 0.92rem;
}
.sw-nav {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 0 12px 0;
  border-top: 1px solid rgba(20, 32, 31, 0.06);
}
.sw-nav-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  /* IMPORTANT: never overflow:hidden/auto here — it clips dropdowns */
  overflow: visible;
}
.sw-nav-item {
  position: relative;
  flex: 1 1 auto;
  margin: 0;
  border: 0;
  min-width: 0;
}
.sw-nav-item > summary.sw-nav-link {
  list-style: none;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  border-radius: 0;
  user-select: none;
}
.sw-nav-item > summary.sw-nav-link::-webkit-details-marker { display: none; }
.sw-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--sw-ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.sw-nav-item[open] > summary.sw-nav-link,
.sw-nav-link:hover {
  border-bottom-color: var(--sw-accent);
  color: var(--sw-accent);
  background: rgba(15, 107, 107, 0.04);
}
.sw-caret {
  font-size: 0.65em;
  opacity: 0.7;
  line-height: 1;
  transition: transform 0.15s ease;
}
.sw-nav-item[open] .sw-caret { transform: rotate(180deg); }
.sw-dd {
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  z-index: 60;
  min-width: 240px;
  max-width: min(340px, 92vw);
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--sw-line);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 32px rgba(20, 18, 14, 0.14);
}
.sw-nav-item:nth-last-child(-n+2) .sw-dd {
  left: auto;
  right: 0;
}
.sw-dd li { margin: 0; }
.sw-dd a {
  display: block;
  padding: 8px 16px;
  color: var(--sw-ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 0;
  white-space: normal;
}
.sw-dd a:hover,
.sw-dd a:focus {
  background: var(--sw-accent-soft);
  color: var(--sw-accent-ink);
  outline: none;
}
.sw-dd-hub a {
  font-weight: 700;
  border-bottom: 1px solid var(--sw-line);
  margin-bottom: 4px;
  padding-bottom: 10px;
  color: var(--sw-accent);
}

.sw-crumbs {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 12px 20px 0;
  font-size: 0.88rem;
  color: var(--sw-muted);
}
.sw-crumbs a { color: var(--sw-muted); }
.sw-sep { margin: 0 8px; opacity: 0.5; }
.sw-main {
  max-width: var(--sw-max);
  margin: 0 auto;
  padding: 22px 20px 72px;
  width: 100%;
  overflow-x: clip;
}
.sw-topic, .sw-hub, .sw-about, .sw-prose, .sw-sec {
  min-width: 0;
  max-width: 100%;
}
.sw-prose a, .sw-sources a, .sw-oneliner a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* —— Home —— */
.sw-hero {
  padding: 10px 0 6px;
  max-width: 40rem;
}
.sw-hero-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sw-accent);
}
.sw-hero h1, .sw-hub h1, .sw-topic h1, .sw-about h1 {
  font-family: var(--sw-serif);
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  line-height: 1.18;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.sw-lead { font-size: 1.12rem; color: var(--sw-muted); max-width: 40rem; margin: 0 0 12px; }
.sw-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.sw-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.88rem;
  color: var(--sw-muted);
}
.sw-stat strong { color: var(--sw-ink); font-weight: 700; }
.sw-start-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 4px;
}
.sw-start-chips a {
  text-decoration: none;
  color: var(--sw-ink);
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.9rem;
  font-weight: 600;
}
.sw-start-chips a:hover {
  border-color: var(--sw-accent);
  color: var(--sw-accent);
  background: var(--sw-accent-soft);
}

.sw-oneliner { font-size: 1.1rem; margin: 0 0 18px; max-width: 42rem; }
.sw-meta { color: var(--sw-muted); font-size: 0.9rem; }
.sw-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sw-accent);
  margin: 0 0 8px;
}
.sw-sec-h {
  font-family: var(--sw-serif);
  font-size: 1.45rem;
  margin: 32px 0 14px;
}
.sw-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.sw-hub-card {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  padding: 16px 16px 14px;
  border-top: 3px solid var(--sw-accent);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.sw-hub-card:hover {
  box-shadow: 0 8px 22px rgba(20, 32, 31, 0.07);
  border-color: #c9c4b8;
}
.sw-hub-card h2 { font-size: 1.12rem; margin: 0 0 8px; font-family: var(--sw-serif); }
.sw-hub-card h2 a { color: inherit; text-decoration: none; }
.sw-hub-card h2 a:hover { color: var(--sw-accent); }
.sw-hub-card p { margin: 0 0 8px; color: var(--sw-muted); font-size: 0.93rem; }
.sw-hub-card ul { margin: 10px 0 0; padding-left: 1.1rem; }
.sw-hub-card li { margin: 0 0 4px; font-size: 0.92rem; }
.sw-home-editor {
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, var(--sw-accent-soft), #eef6f4 55%, #fff);
  border: 1px solid #c7e0de;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 22px 0 6px;
}
.sw-home-editor img, .sw-author img, .sw-about-hero img {
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
  flex: 0 0 auto;
}
.sw-home-editor h2 {
  font-family: var(--sw-serif);
  font-size: 1.15rem;
  margin: 0 0 4px;
}
.sw-home-editor p { margin: 0; color: var(--sw-muted); font-size: 0.95rem; }
.sw-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 10px;
  overflow: hidden;
}
.sw-feature-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sw-line);
}
.sw-feature-list li:last-child { border-bottom: 0; }
.sw-feature-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--sw-ink);
}
.sw-feature-list a:hover { color: var(--sw-accent); }
.sw-index, .sw-start { columns: 2; gap: 24px; padding-left: 1.1rem; }
.sw-index li, .sw-start li { break-inside: avoid; margin: 0 0 6px; }
.sw-topic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
.sw-infobox {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 0;
  margin: 0 0 16px;
  overflow: hidden;
}
.sw-infobox-h {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--sw-accent);
  padding: 8px 14px;
}
.sw-infobox > div {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--sw-line);
  align-items: start;
}
.sw-infobox > div:last-child { border-bottom: 0; }
.sw-infobox dt { color: var(--sw-muted); font-size: 0.82rem; }
.sw-infobox dd { margin: 0; font-weight: 600; font-size: 0.9rem; line-height: 1.35; }
.sw-infobox dd a { font-weight: 600; }
.sw-author {
  display: flex; gap: 12px; align-items: center;
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}
.sw-author span { display: block; color: var(--sw-muted); font-size: 0.85rem; }
.sw-oneliner {
  font-size: 1.15rem;
  line-height: 1.45;
  margin: 0 0 8px;
  max-width: 42rem;
}
.sw-meta-bar {
  display: flex; flex-wrap: wrap; gap: 6px 8px;
  align-items: center;
  color: var(--sw-muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.sw-meta-bar .sw-dot { opacity: 0.55; }
.sw-meta-bar a { color: inherit; }
.sw-sec { margin: 20px 0; }
.sw-sec h2 {
  font-family: var(--sw-serif);
  font-size: 1.28rem;
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--sw-accent);
}
.sw-sec--takes {
  background: var(--sw-accent-soft);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.sw-sec--takes h2 { margin-top: 0; }
.sw-sec--example, .sw-sec--not, .sw-sec--when {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 12px 16px;
}
.sw-prose p { margin: 0 0 10px; }
.sw-prose ul, .sw-prose ol, .sw-takes { margin: 0 0 12px; padding-left: 1.2rem; }
.sw-prose li, .sw-takes li { margin: 0 0 6px; }
.sw-prose li::marker { color: var(--sw-accent); }
.sw-prose ul ul, .sw-prose ol ol, .sw-prose ul ol, .sw-prose ol ul,
.sw-prose li > ul, .sw-prose li > ol {
  margin: 6px 0 4px;
  padding-left: 1.15rem;
}
.sw-prose ul ul { list-style-type: circle; }
.sw-prose ul ul ul { list-style-type: disc; }
.sw-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  color: var(--sw-accent-ink);
  background: var(--sw-accent-soft);
  border: 1px solid #c7e0de;
  border-radius: 4px;
  padding: 0.12em 0.4em;
}
.sw-prose pre.sw-code code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.9em;
  border-radius: 0;
}
.sw-check { list-style: none; padding-left: 0; }
.sw-check li { margin: 0 0 10px; }
.sw-check label {
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer;
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 10px 12px;
}
.sw-check input { margin-top: 4px; flex: 0 0 auto; accent-color: var(--sw-accent); }
.sw-sidebar {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sw-sidebar .sw-infobox { margin: 0; }
.sw-toc {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  overflow: hidden;
  position: static;
}
.sw-toc-h {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sw-muted);
  padding: 10px 14px 0;
}
.sw-toc ol { margin: 8px 0 12px; padding-left: 2rem; }
.sw-toc li { margin: 0 0 6px; }
.sw-next-cards { display: grid; gap: 10px; }
.sw-next-grid .sw-next-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sw-next-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-left: 4px solid var(--sw-accent);
  border-radius: 8px;
  padding: 14px 16px;
}
.sw-next-card:hover { border-color: var(--sw-accent); }
.sw-next-label {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sw-muted);
  margin-bottom: 4px;
}
.sw-next-card strong { display: block; color: var(--sw-accent); margin-bottom: 4px; }
.sw-next-card span { color: var(--sw-muted); font-size: 0.95rem; }
.sw-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 14px;
  max-width: 100%;
  border: 1px solid var(--sw-line);
  border-radius: 8px;
  background: var(--sw-card);
}
table.sw-compare,
table.sw-md {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--sw-card);
  margin: 0;
}
table.sw-compare th, table.sw-compare td,
table.sw-md th, table.sw-md td {
  border: 1px solid var(--sw-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}
table.sw-compare thead th,
table.sw-md thead th {
  background: #eef6f6;
  color: var(--sw-ink);
  font-weight: 700;
  white-space: nowrap;
}
table.sw-compare tbody th,
table.sw-md tbody th {
  background: #fafaf7;
  font-weight: 600;
  width: 28%;
}
table.sw-compare tbody tr:nth-child(even) td,
table.sw-md tbody tr:nth-child(even) td {
  background: rgba(15, 107, 107, 0.03);
}
table.sw-compare tbody tr:nth-child(even) th,
table.sw-md tbody tr:nth-child(even) th {
  background: #f3f5f2;
}
pre.sw-code,
.sw-prose pre.sw-code {
  margin: 0 0 14px;
  padding: 12px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #eef6f6;
  border: 1px solid #c7e0de;
  border-left: 3px solid var(--sw-accent);
  border-radius: 8px;
  color: var(--sw-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}
code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  color: var(--sw-accent-ink);
  background: var(--sw-accent-soft);
  border: 1px solid #c7e0de;
  border-radius: 4px;
  padding: 0.12em 0.4em;
}
.sw-reviewed {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--sw-line);
  color: var(--sw-muted);
  font-size: 0.9rem;
}
.sw-sources { padding-left: 1.2rem; }
.sw-sources .sw-src-why { color: var(--sw-muted); font-weight: 400; }
.sw-topic details.sw-faq,
.sw-topic > .sw-sec details {
  margin: 0 0 8px;
  border: 1px solid var(--sw-line);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--sw-card);
}
.sw-topic summary { cursor: pointer; font-weight: 600; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-chip {
  background: var(--sw-card);
  border: 1px solid var(--sw-line);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--sw-ink);
  font-size: 0.9rem;
}
.sw-chip:hover { border-color: var(--sw-accent); color: var(--sw-accent); }
.sw-sources a { word-break: break-word; }
.sw-feat { margin: 0 0 14px; max-width: 720px; }
.sw-feat img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  max-height: 220px;
}
@media (max-width: 700px) {
  .sw-feat { display: none; }
}
.sw-about-hero { display: flex; gap: 20px; align-items: center; margin: 18px 0 22px; }
.sw-footer {
  border-top: 1px solid var(--sw-line);
  background: #ebe7dc;
  padding: 28px 20px 40px;
}
.sw-footer-grid {
  max-width: var(--sw-max);
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.sw-copy { max-width: var(--sw-max); margin: 0 auto; color: var(--sw-muted); font-size: 0.85rem; }
.sw-404 { text-align: center; padding: 60px 0; }
@media (max-width: 900px) {
  .sw-top { padding: 12px 14px 8px; gap: 8px 10px; }
  .sw-brand { font-size: 1.4rem; }
  .sw-tag { font-size: 0.82rem; }
  .sw-nav { padding: 0 8px; width: 100%; max-width: 100%; }
  .sw-nav-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    justify-content: stretch;
    gap: 0;
  }
  .sw-nav-item {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  .sw-nav-link {
    width: 100%;
    padding: 9px 4px;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    justify-content: center;
  }
  .sw-caret { display: none; }
  /* Full-width dropdown panel — never wider than the viewport */
  .sw-dd {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: 55vh;
    overflow-y: auto;
    z-index: 80;
  }
  .sw-nav-item:nth-last-child(-n+2) .sw-dd {
    left: 10px;
    right: 10px;
  }
  .sw-main { padding: 16px 14px 56px; }
  .sw-crumbs { padding-left: 14px; padding-right: 14px; }
  .sw-start-chips { gap: 6px; }
  .sw-start-chips a { font-size: 0.82rem; padding: 6px 10px; }
  .sw-hero-stats { gap: 6px; }
  .sw-stat { font-size: 0.8rem; padding: 4px 10px; }
  .sw-hub-grid { grid-template-columns: 1fr; }
  .sw-feature-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  table.sw-compare,
  table.sw-md {
    min-width: 100%;
    font-size: 0.84rem;
  }
  table.sw-compare thead th,
  table.sw-md thead th {
    white-space: normal;
  }
  .sw-home-editor { flex-direction: row; padding: 12px; gap: 12px; }
  .sw-meta-bar { font-size: 0.82rem; }
}
@media (max-width: 860px) {
  .sw-topic-grid, .sw-footer-grid { grid-template-columns: 1fr; }
  .sw-index, .sw-start { columns: 1; }
}
@media (max-width: 380px) {
  .sw-nav-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sw-nav-link { font-size: 0.68rem; padding: 8px 2px; }
}
