.theme-compare .page-hero {
  overflow: hidden;
}

.theme-compare .page-hero h1 {
  max-width: 9.5ch;
}

.theme-compare section[id] {
  scroll-margin-top: 100px;
}

.comparison-scope {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2rem;
}

.comparison-scope a {
  padding: .48rem .7rem;
  border: 1px solid var(--ink);
  background: var(--white);
  font: 700 .65rem PlexMono, monospace;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}

.comparison-scope a:hover {
  background: var(--ink);
  color: var(--white);
}

.signal-board {
  position: relative;
  padding: 1.4rem;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.signal-board::before {
  content: "THREE JOBS / ONE SYSTEM";
  display: block;
  margin-bottom: 1.25rem;
  color: var(--lime);
  font: 700 .65rem PlexMono, monospace;
  letter-spacing: .12em;
}

.signal-rail {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 106px;
  padding: 1.15rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
}

.signal-rail:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.signal-rail strong {
  font: 800 .72rem PlexMono, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.signal-rail-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}

.signal-rail-path span {
  position: relative;
  min-width: 0;
  font: 700 .7rem/1.25 Hanken, sans-serif;
  text-align: center;
}

.signal-rail-path span::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto .55rem;
  border: 2px solid var(--ink);
  background: var(--lime);
  box-shadow: 0 0 0 2px var(--lime);
}

.signal-rail-path span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 5px;
  left: calc(50% + 11px);
  width: calc(100% + 1rem - 22px);
  height: 2px;
  background: var(--lime);
}

.signal-rail:nth-child(2) .signal-rail-path span::before,
.signal-rail:nth-child(2) .signal-rail-path span:not(:last-child)::after {
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--orange);
}

.signal-rail:nth-child(2) .signal-rail-path span:not(:last-child)::after {
  box-shadow: none;
}

.signal-rail:nth-child(3) .signal-rail-path span::before,
.signal-rail:nth-child(3) .signal-rail-path span:not(:last-child)::after {
  background: var(--white);
  box-shadow: 0 0 0 2px var(--white);
}

.signal-rail:nth-child(3) .signal-rail-path span:not(:last-child)::after {
  box-shadow: none;
}

.comparison-note {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
  border-left: 6px solid var(--lime);
  background: var(--paper-2);
}

.comparison-note-stack {
  display: grid;
  gap: 1rem;
}

.comparison-note a {
  font-weight: 750;
  text-underline-offset: 3px;
}

.comparison-note-scope {
  border-left-color: var(--orange);
}

.comparison-note-disclosure {
  border-left-color: var(--ink);
}

.comparison-note strong {
  font: 800 .7rem PlexMono, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.comparison-note p {
  margin: 0;
  color: var(--ink-2);
}

.comparison-note .choice-line {
  display: block;
}

.comparison-note .choice-line + .choice-line {
  margin-top: .7rem;
}

.comparison-note-dark {
  border-left-color: var(--orange);
  background: #17312a;
}

.comparison-note-dark p {
  color: #d6e0dc;
}

.comparison-wrap {
  overflow-x: auto;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 16px 40px rgba(17, 35, 31, .08);
}

.comparison-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: .88rem;
  line-height: 1.42;
}

.comparison-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.comparison-table tbody th,
.comparison-table tbody td {
  color: var(--ink);
}

.comparison-table th:last-child,
.comparison-table td:last-child {
  border-right: 0;
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.comparison-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--ink);
  color: var(--white);
  font: 700 .62rem/1.35 PlexMono, monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.comparison-table tbody th {
  width: 170px;
  background: var(--paper-2);
  font: 800 .92rem/1.3 Archivo, sans-serif;
}

.comparison-table tbody th a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.comparison-table .openshack-row th,
.comparison-table .openshack-row td {
  background: #f2f7d7;
}

.comparison-table .openshack-row th {
  border-left: 7px solid var(--orange);
  color: var(--ink);
}

.comparison-table .openshack-row strong {
  color: var(--orange-dark);
}

.comparison-table .openshack-path-row th,
.comparison-table .openshack-path-row td {
  background: #edf3e5;
}

.comparison-table .openshack-path-row th {
  border-left-color: var(--lime);
}

.comparison-table .cell-yes {
  font-weight: 750;
  color: var(--ink);
}

.comparison-table .cell-limited {
  color: var(--muted);
}

.table-key {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.4rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .78rem;
}

.table-key span:first-child::before {
  content: "";
  display: inline-block;
  width: .72rem;
  height: .72rem;
  margin-right: .45rem;
  border-left: 4px solid var(--orange);
  background: #f2f7d7;
  vertical-align: -.05rem;
}

.comparison-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 2.5rem;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .2);
}

.security-focus {
  border-top: 8px solid var(--lime);
  background: #dce9e3;
}

.security-note {
  border-left-color: var(--lime);
  background: var(--white);
}

.security-table {
  min-width: 960px;
}

.flex-focus {
  border-top: 8px solid var(--orange);
  background: #dce9e3;
}

.flex-note {
  border-left-color: var(--orange);
  background: var(--white);
}

.flex-route {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 2rem;
  border: 1px solid var(--ink);
  background: var(--ink);
}

.flex-route span {
  position: relative;
  padding: 1.15rem 2.2rem 1.15rem 1rem;
  background: #17312a;
  color: var(--white);
  font: 700 .68rem/1.45 PlexMono, monospace;
  letter-spacing: .035em;
}

.flex-route span::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: .85rem;
  color: var(--lime);
  font: 800 1.3rem/1 Archivo, sans-serif;
  transform: translateY(-50%);
}

.flex-route span:last-child::after {
  color: var(--orange);
}

.comparison-point {
  min-height: 250px;
  padding: 1.7rem;
  background: var(--ink);
}

.comparison-point span {
  color: var(--lime);
  font: 700 .64rem PlexMono, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.comparison-point h3 {
  margin: 2.8rem 0 .75rem;
  font: 790 1.55rem/1.05 Archivo, sans-serif;
  letter-spacing: -.02em;
}

.comparison-point p {
  margin: 0;
  color: #c4d0cb;
  font-size: .92rem;
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.subsection-head {
  max-width: 850px;
  margin-top: 4.5rem;
}

.subsection-head h3 {
  margin: .35rem 0 .8rem;
  font: 800 clamp(2rem, 4vw, 3.5rem)/.98 Archivo, sans-serif;
  letter-spacing: -.02em;
}

.subsection-head p {
  margin: 0;
  color: var(--ink-2);
}

.software-table {
  min-width: 940px;
}

.buying-focus {
  border-top: 8px solid var(--ink);
  background: #edf3e5;
}

.buying-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.buying-card {
  min-height: 330px;
  padding: 1.55rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.buying-card span {
  color: var(--orange-dark);
  font: 700 .64rem PlexMono, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.buying-card h3 {
  margin: 2.3rem 0 1rem;
  font: 800 1.45rem/1.08 Archivo, sans-serif;
  letter-spacing: -.02em;
}

.buying-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  font-size: .9rem;
}

.buying-card li + li {
  margin-top: .35rem;
}

.buying-note {
  margin-top: 1.5rem;
  background: var(--white);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
}

.verdict {
  min-height: 280px;
  padding: 1.8rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.verdict span {
  color: var(--orange-dark);
  font: 700 .64rem PlexMono, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.verdict h3 {
  margin: 3rem 0 .8rem;
  font: 800 1.65rem/1.05 Archivo, sans-serif;
  letter-spacing: -.02em;
}

.verdict p {
  margin: 0;
  color: var(--ink-2);
}

.source-list {
  columns: 2;
  column-gap: 4rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  break-inside: avoid;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .9rem;
}

.source-list a {
  font-weight: 750;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .signal-board {
    transform: none;
  }

  .comparison-points,
  .verdict-grid,
  .flex-route {
    grid-template-columns: 1fr;
  }

  .buying-grid {
    grid-template-columns: 1fr 1fr;
  }

  .comparison-point,
  .verdict {
    min-height: auto;
  }

  .comparison-point h3,
  .verdict h3 {
    margin-top: 1.8rem;
  }
}

@media (min-width: 1180px) {
  .comparison-wrap {
    overflow: visible;
  }

  .comparison-table {
    min-width: 0;
  }

  .comparison-table thead th {
    top: 82px;
    z-index: 5;
  }
}

@media (min-width: 701px) and (max-width: 1179px) {
  .comparison-table thead th:first-child,
  .comparison-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
  }

  .comparison-table thead th:first-child {
    z-index: 3;
  }
}

@media (max-width: 700px) {
  .theme-compare .page-hero h1 {
    max-width: 100%;
    font-size: clamp(2.7rem, 12.8vw, 4rem);
  }

  .signal-board {
    padding: 1rem;
  }

  .signal-rail {
    grid-template-columns: 1fr;
    gap: .8rem;
    padding-inline: .35rem;
  }

  .signal-rail strong {
    color: var(--lime);
  }

  .signal-rail-path {
    gap: .45rem;
  }

  .signal-rail-path span {
    font-size: .58rem;
  }

  .signal-rail-path span:not(:last-child)::after {
    width: calc(100% + .45rem - 22px);
  }

  .comparison-note {
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .comparison-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .comparison-table {
    min-width: 0;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .comparison-table tbody tr {
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    background: var(--white);
  }

  .comparison-table tbody th {
    width: 100%;
    padding: 1rem;
    border-right: 0;
    background: var(--ink);
    color: var(--white);
  }

  .comparison-table tbody td {
    display: grid;
    grid-template-columns: minmax(105px, .8fr) minmax(0, 1.4fr);
    gap: .8rem;
    padding: .85rem 1rem;
    border-right: 0;
  }

  .comparison-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font: 700 .57rem/1.35 PlexMono, monospace;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .comparison-table .openshack-row th {
    border-top: 7px solid var(--orange);
    border-left: 0;
    background: var(--ink);
    color: var(--white);
  }

  .comparison-table .openshack-path-row th {
    border-top-color: var(--lime);
  }

  .source-list {
    columns: 1;
  }

  .buying-grid {
    grid-template-columns: 1fr;
  }

  .buying-card {
    min-height: auto;
  }

  .cta-actions {
    justify-content: stretch;
  }

  .cta-actions .button {
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .comparison-table tbody td {
    grid-template-columns: 1fr;
    gap: .3rem;
  }
}
