/* How swaps work (/swaps/). Classes are sw- prefixed so site-wide .tabs/.panel/.notice rules don't apply. */
.sw-page {
  --bg: #0b1720;
  --surface: #10242d;
  --raised: #142d35;
  --line: #28444d;
  --ink: #edf3f7;
  --muted: #a9c0c5;
  --xmz: #69d5c2;        
  --xmz-soft: #69d5c21f;
  --btc: #f2a950;        
  --btc-soft: #f2a9501f;
  --ok: #93d9b6;
  --warn: #edc48d;
  --danger: #ff8a9f;
  --on-accent: #092820;
  --display: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Roboto Mono", Consolas, monospace;
  --radius: 12px;
  font: 16px/1.65 var(--body); color: var(--ink);
}
.sw-wrap {
  max-width: 1080px; margin: 0 auto;
  display: grid; gap: 48px;
}
.sw-page a { color: var(--xmz); }
.sw-page :focus-visible { outline: 3px solid var(--xmz); outline-offset: 3px; border-radius: 4px; }
.sw-page code, .sw-mono { font-family: var(--mono); font-size: .88em; }
.sw-intro { display: grid; gap: 14px; max-width: 760px; }
.sw-eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sw-page h1 { font: 800 clamp(34px, 6vw, 58px)/1.02 var(--display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.sw-page h1 .sw-b { color: var(--btc); }
.sw-page h1 .sw-x { color: var(--xmz); }
.sw-lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 65ch; }
.sw-notice {
    font-size: 14px; color: var(--warn); border: 1px solid #edc48d55; background: #edc48d10;
  border-radius: var(--radius); padding: 10px 14px; max-width: 760px; margin: 0;
}
.sw-page h2 { font: 700 clamp(24px, 3.4vw, 32px)/1.15 var(--display); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.sw-page h3 { font: 600 17px/1.3 var(--body); margin: 0; }
.sw-page section { display: grid; gap: 22px; }
.sw-sub { color: var(--muted); margin: 0; max-width: 65ch; }
.sw-cast { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sw-person { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--surface); display: grid; gap: 6px; min-width: 0; }
.sw-person.sw-bob { border-top: 3px solid var(--btc); }
.sw-person.sw-alice { border-top: 3px solid var(--xmz); }
.sw-person .sw-role { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.sw-bob .sw-role { color: var(--btc); }
.sw-alice .sw-role { color: var(--xmz); }
.sw-person p { margin: 0; color: var(--muted); font-size: 15px; }
.sw-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-tabs button {
  font: 600 15px/1 var(--body); color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; cursor: pointer;
}
.sw-tabs button:hover { color: var(--ink); border-color: var(--muted); }
.sw-tabs button[aria-selected="true"] { background: var(--xmz); color: var(--on-accent); border-color: var(--xmz); }
.sw-lanes-head, .sw-step { display: grid; grid-template-columns: 1fr 150px 1fr; gap: 14px; }
.sw-lanes-head { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sw-lanes-head span:first-child { color: var(--btc); }
.sw-lanes-head span:last-child { color: var(--xmz); text-align: right; }
.sw-lanes-head span:nth-child(2) { text-align: center; }
.sw-flow { display: grid; gap: 0; }
.sw-step { position: relative; padding-block: 14px; }
.sw-step + .sw-step { border-top: 1px dashed #28444d99; }
.sw-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: grid; gap: 6px; min-width: 0; align-self: start;
}
.sw-card.sw-bob { border-left: 3px solid var(--btc); }
.sw-card.sw-alice { border-left: 3px solid var(--xmz); }
.sw-card.sw-both { grid-column: 1 / -1; border-left: 3px solid var(--muted); }
.sw-card .sw-n { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .06em; }
.sw-card p { margin: 0; font-size: 15px; color: var(--muted); }
.sw-card p strong { color: var(--ink); font-weight: 600; }
.sw-empty { min-height: 1px; }
.sw-chain {
  align-self: center; display: grid; justify-items: center; gap: 6px; text-align: center;
  font: 500 12px/1.3 var(--mono); color: var(--muted);
}
.sw-pill { display: inline-block; font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.sw-pill.sw-btc { background: var(--btc-soft); color: var(--btc); border: 1px solid #f2a95055; }
.sw-pill.sw-xmz { background: var(--xmz-soft); color: var(--xmz); border: 1px solid #69d5c255; }
.sw-pill.sw-done { background: #93d9b61f; color: var(--ok); border: 1px solid #93d9b655; }
.sw-pill.sw-bad { background: #ff8a9f1a; color: var(--danger); border: 1px solid #ff8a9f55; }
.sw-arrow { font: 400 20px/1 var(--mono); }
.sw-arrow.sw-btc { color: var(--btc); }
.sw-arrow.sw-xmz { color: var(--xmz); }
.sw-arrow.sw-mut { color: var(--muted); }
.sw-key {
  grid-column: 1 / -1; border: 1px solid #69d5c266; background: var(--xmz-soft);
  border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 4px;
}
.sw-key h3 { color: var(--xmz); }
.sw-key p { margin: 0; font-size: 15px; }
.sw-timeline-wrap { overflow-x: auto; }
.sw-timeline { min-width: 620px; display: grid; gap: 10px; padding-block: 4px 8px; }
.sw-bar { position: relative; height: 34px; display: grid; grid-template-columns: 36fr 10fr 12fr; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.sw-bar div { display: flex; align-items: center; padding: 0 10px; font: 500 12px/1 var(--mono); white-space: nowrap; }
.sw-bar .sw-w1 { background: var(--xmz-soft); color: var(--xmz); }
.sw-bar .sw-w2 { background: var(--btc-soft); color: var(--btc); border-left: 1px solid var(--line); }
.sw-bar .sw-w3 { background: #ff8a9f14; color: var(--danger); border-left: 1px solid var(--line); }
.sw-ticks { display: grid; grid-template-columns: 36fr 10fr 12fr; font: 500 12px/1.3 var(--mono); color: var(--muted); }
.sw-ticks span { border-left: 1px solid var(--line); padding-left: 8px; }
.sw-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sw-fact { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; min-width: 0; }
.sw-fact p { margin: 0; color: var(--muted); font-size: 15px; }
.sw-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.sw-page table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.sw-page th, .sw-page td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sw-page th { font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.sw-page tr:last-child td { border-bottom: 0; }
.sw-page td.sw-num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-outro { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 6px; }
.sw-outro p { margin: 0; max-width: 75ch; }
@media (max-width: 760px) {
  .sw-cast, .sw-facts { grid-template-columns: 1fr; }
  .sw-lanes-head { display: none; }
  .sw-step { grid-template-columns: 1fr; gap: 10px; }
  .sw-empty { display: none; }
  .sw-chain { grid-auto-flow: column; justify-content: start; align-items: center; }
  .sw-arrow { transform: rotate(90deg); }
}
.sw-panel:not([hidden]) .sw-step { animation: rise .35s ease both; }
.sw-panel:not([hidden]) .sw-step:nth-child(2) { animation-delay: .04s; }
.sw-panel:not([hidden]) .sw-step:nth-child(3) { animation-delay: .08s; }
.sw-panel:not([hidden]) .sw-step:nth-child(4) { animation-delay: .12s; }
.sw-panel:not([hidden]) .sw-step:nth-child(5) { animation-delay: .16s; }
.sw-panel:not([hidden]) .sw-step:nth-child(6) { animation-delay: .2s; }
@keyframes rise { from { transform: translateY(6px); opacity: .55; } to { transform: none; opacity: 1; } }
.sw-head { display: grid; gap: 8px; }
.sw-clock { display: grid; gap: 10px; margin-top: 22px; }
.sw-clock .sw-sub, .sw-evidence-note { font-size: 14px; }
.sw-page h2 { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .sw-panel:not([hidden]) .sw-step { animation: sw-rise .35s ease both; }
  .sw-panel:not([hidden]) .sw-step:nth-child(2) { animation-delay: .04s; }
  .sw-panel:not([hidden]) .sw-step:nth-child(3) { animation-delay: .08s; }
  .sw-panel:not([hidden]) .sw-step:nth-child(4) { animation-delay: .12s; }
  .sw-panel:not([hidden]) .sw-step:nth-child(5) { animation-delay: .16s; }
  .sw-panel:not([hidden]) .sw-step:nth-child(6) { animation-delay: .2s; }
}
@keyframes sw-rise { from { transform: translateY(6px); opacity: .55; } to { transform: none; opacity: 1; } }
