:root {
  --brand: #0099ff;
  --brand-dark: #0077c7;
  --ink: #183044;
  --muted: #607283;
  --line: #d8e4ed;
  --surface: #f5faff;
  --printer-column: 8.25rem;
  --comparison-column-min: 15rem;
  --comparison-column-max: 21.875rem;
}

* {
  box-sizing: border-box;
}

body {
  max-width: 74rem;
  min-height: 100vh;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(180deg, #f3faff 0, #fff 20rem);
}

main {
  width: 100%;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus {
  text-decoration: underline;
}

.page-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-title {
  margin: 0 0 0.5rem;
  color: #212529;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
}

.intro {
  max-width: 42rem;
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.intro li + li {
  margin-top: 0.45rem;
}

.table-stage {
  position: relative;
}

.table-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 0.8rem 2.5rem rgba(44, 92, 127, 0.12);
  overflow: hidden;
}

.mobile-table-pagination {
  position: absolute;
  z-index: 8;
  top: 0.15rem;
  right: 0;
  left: var(--printer-column);
  display: none;
  width: max-content;
  margin: 0 auto;
}

.mobile-table-pagination[hidden] {
  display: none;
}

.table-pagination-dots {
  display: flex;
  align-items: center;
  gap: 0;
}

.table-pagination-dot {
  display: grid;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 0;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.table-pagination-dot::before {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  content: "";
  background: #b8c0c7;
  transition:
    background-color 220ms ease,
    transform 220ms ease;
}

.table-pagination-dot.is-active::before {
  background: #596671;
  transform: scale(1.15);
}

.table-pagination-dot:focus-visible {
  border-radius: 999px;
  outline: 2px solid #727e88;
  outline-offset: 1px;
}

@media (max-width: 30rem) {
  .table-stage.has-phone-pagination {
    padding-top: 1.75rem;
  }

  .mobile-table-pagination:not([hidden]) {
    display: block;
  }
}

.table-shell::after {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1.25rem;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(32, 75, 105, 0.16));
  opacity: 0;
  transition: opacity 160ms ease;
}

.table-shell.is-scrollable::after {
  opacity: 1;
}

.table-navigation {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.table-navigation[hidden] {
  display: none;
}

.table-navigation-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.table-navigation-buttons {
  display: inline-flex;
  gap: 0.4rem;
}

.table-navigation-button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--brand);
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.table-navigation-button:hover:not(:disabled),
.table-navigation-button:focus-visible {
  background: var(--brand);
  outline: 3px solid rgba(0, 153, 255, 0.3);
  outline-offset: 2px;
}

.table-navigation-button:disabled {
  border-color: #b7c7d3;
  color: #718391;
  background: #dce7ee;
  cursor: not-allowed;
}

.table-scroll {
  container-type: inline-size;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-padding-inline-start: var(--printer-column);
  scroll-snap-type: inline proximity;
  scrollbar-color: var(--brand) #e7f1f8;
  scrollbar-width: thin;
}

.table-scroll:focus-visible {
  outline: 3px solid rgba(0, 153, 255, 0.4);
  outline-offset: -3px;
}

@media (hover: hover) and (pointer: fine) {
  .table-navigation:not([hidden]) {
    display: flex;
  }

  .table-scroll.is-draggable {
    cursor: grab;
  }

  .table-scroll.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
  }
}

.comparison-table {
  width: max-content;
  min-width: 100%;
  margin: 0;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  font-size: 0.92rem;
}

.comparison-table th,
.comparison-table td {
  width: min(
    var(--comparison-column-min),
    calc(100cqw - var(--printer-column) - 1px)
  );
  min-width: min(
    var(--comparison-column-min),
    calc(100cqw - var(--printer-column) - 1px)
  );
  max-width: var(--comparison-column-max);
  padding: 1rem 0.85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: break-word;
}

.comparison-table thead th:not(:first-child) {
  scroll-snap-align: start;
}

.comparison-table thead th:last-child {
  scroll-snap-align: start end;
}

.comparison-table tr:last-child > * {
  border-bottom: 0;
}

.comparison-table tr > *:last-child {
  border-right: 0;
}

.comparison-table thead th {
  position: relative;
  z-index: 3;
  top: 0;
  transform: translateY(var(--sticky-header-offset, 0));
  color: #fff;
  background: var(--brand);
  font-size: 0.83rem;
  letter-spacing: 0.01em;
  text-align: left;
}

.comparison-table tbody th {
  color: var(--ink);
  background: var(--surface);
  font-weight: 900;
}

.comparison-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.comparison-table tr > :first-child {
  position: sticky;
  z-index: 2;
  left: 0;
  width: var(--printer-column);
  min-width: var(--printer-column);
  max-width: var(--printer-column);
  box-shadow: 0.4rem 0 0.75rem -0.65rem rgba(24, 48, 68, 0.8);
}

.comparison-table thead tr > :first-child {
  z-index: 4;
  background: var(--brand-dark);
}

.mobile-swipe-hint {
  position: absolute;
  z-index: 6;
  top: calc(var(--comparison-header-height, 3.5rem) + 0.35rem);
  right: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 5rem;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1s ease,
    visibility 0s linear 1s;
}

.mobile-swipe-hint.is-visible {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 1s ease,
    visibility 0s;
}

.swipe-copy {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  align-self: stretch;
  color: #8e9aa3;
}

.swipe-visual {
  position: relative;
  width: 5rem;
  height: 3rem;
  margin-top: -0.3rem;
}

.swipe-finger {
  position: absolute;
  z-index: 3;
  top: 0.25rem;
  right: 0.65rem;
  display: block;
  width: 2.8rem;
  height: 2.85rem;
  animation: swipe-finger 1.65s cubic-bezier(0.55, 0.05, 0.25, 1) infinite;
  animation-play-state: paused;
}

.mobile-swipe-hint.is-visible .swipe-finger {
  animation-play-state: running;
}

@keyframes swipe-finger {
  0%,
  12% {
    transform: translateX(0.8rem) rotate(4deg);
  }

  68%,
  100% {
    transform: translateX(-1.15rem) rotate(-7deg);
  }
}

.star-rating {
  display: inline-flex;
  gap: 0.12rem;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.star-filled {
  color: var(--brand);
  text-shadow: 0 1px 0 rgba(0, 95, 158, 0.18);
}

.star-empty {
  color: #c7d2da;
}

.star-half {
  color: transparent;
  background: linear-gradient(90deg, var(--brand) 50%, #c7d2da 50%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rating-secondary-text {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.35;
}

.maintenance-cost {
  display: block;
  margin-top: 0.45rem;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.purchase-links {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
}

.purchase-link {
  color: var(--brand);
  font-weight: 800;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.purchase-link:hover,
.purchase-link:focus-visible {
  color: var(--brand);
  outline: none;
  text-decoration-thickness: 0.14em;
}

.purchase-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.purchase-link-disabled,
.purchase-link-button:disabled {
  color: #9ba9b4;
  font-weight: 400;
  text-decoration: none;
  cursor: not-allowed;
  pointer-events: none;
}

.purchase-link-completed {
  color: var(--ink);
  font-weight: 400;
  text-decoration: underline;
  cursor: pointer;
}

.purchase-help {
  margin-top: 0.35rem;
  color: #c62828;
  font-weight: 400;
  line-height: 1.4;
}

.purchase-help-link {
  display: inline;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.purchase-help-link:hover,
.purchase-help-link:focus-visible {
  color: #8e0000;
  outline: none;
  text-decoration-thickness: 0.14em;
}

.bag-purchase-placeholder {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.bag-purchase-copy {
  color: var(--ink);
  line-height: 1.55;
}

.bag-purchase-copy p {
  margin: 0;
}

.bag-purchase-copy p + p {
  margin-top: 0.75rem;
  color: var(--ink);
}

.bag-purchase-copy .bag-purchase-price {
  color: var(--ink);
  font-weight: 700;
}

.bag-purchase-contacts {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-style: normal;
}

.bag-purchase-contacts a {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--brand);
  text-decoration: none;
}

.bag-purchase-contacts a strong {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.bag-purchase-contacts a:hover,
.bag-purchase-contacts a:focus-visible {
  color: var(--brand);
}

.bag-purchase-copy .bag-purchase-thanks {
  color: var(--ink);
}

.comparison-points {
  display: grid;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
}

.comparison-table td > .comparison-points:first-child {
  margin-top: 0;
}

.comparison-points li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--ink);
  line-height: 1.35;
}

.comparison-points li::before {
  position: absolute;
  top: 0;
  left: 0;
  font-weight: 900;
}

.comparison-point-positive::before {
  color: var(--brand);
  content: "+";
}

.comparison-point-negative::before {
  color: #c62828;
  content: "−";
}

.health-warning {
  color: #c62828;
}

.printer-name {
  display: block;
}

.printer-video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.printer-video-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.printer-video-link:hover,
.printer-video-link:focus-visible {
  color: var(--brand);
}

.accessory-video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.35rem;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  vertical-align: middle;
}

.accessory-video-link svg {
  width: 0.85rem;
  height: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.accessory-video-link:hover,
.accessory-video-link:focus-visible {
  color: var(--brand);
}

.printer-accessories {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.printer-accessories [hidden] {
  display: none !important;
}

.accessory-item {
  position: relative;
  display: block;
  padding-left: 0.85rem;
  color: var(--ink);
  line-height: 1.35;
}

.accessory-item::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--brand);
  content: "+";
  font-weight: 900;
}

.accessory-item-negative::before {
  color: #c62828;
  content: "−";
}

.accessory-summary-empty {
  color: var(--muted);
  font-weight: 600;
  font-style: italic;
}

.accessory-summary-error {
  position: relative;
  display: block;
  padding-left: 0.85rem;
  color: #e00000;
  font-weight: 800;
  line-height: 1.35;
}

.accessory-summary-error::before {
  position: absolute;
  top: 0;
  left: 0;
  content: "!";
  font-weight: 900;
}

.printer-final-price {
  display: grid;
  gap: 0.05rem;
  margin-top: 0.35rem;
  color: var(--ink);
  line-height: 1.25;
}

.printer-final-price strong {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 900;
}

.accessory-unavailable-note {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.35;
}

.accessory-edit-button {
  justify-self: start;
  margin-top: 0.3rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--brand);
  border-radius: 0.4rem;
  color: var(--brand);
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.accessory-edit-button:hover,
.accessory-edit-button:focus-visible {
  color: #fff;
  background: var(--brand);
  outline: none;
}

.accessory-popover {
  width: min(40rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1.5rem 4rem rgba(14, 43, 65, 0.3);
  overflow: hidden;
}

.accessory-popover::backdrop {
  background: rgba(13, 35, 51, 0.58);
  backdrop-filter: blur(2px);
}

.accessory-popover-form {
  display: flex;
  max-height: calc(100dvh - 1.5rem);
  flex-direction: column;
}

.accessory-popover-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.accessory-popover-eyebrow {
  margin: 0 0 0.2rem;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.accessory-popover h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  line-height: 1.2;
}

.accessory-popover-close {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.accessory-popover-close:hover,
.accessory-popover-close:focus-visible {
  color: var(--ink);
  background: #e3eef6;
  outline: none;
}

.accessory-popover-content {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
  overflow-y: auto;
}

.accessory-option-group {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0;
  border: 0;
}

.accessory-option-group legend {
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.accessory-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.accessory-option:hover {
  border-color: #9fcfea;
  background: #f9fcff;
}

.accessory-option:has(input:focus-visible) {
  outline: 3px solid rgba(0, 153, 255, 0.3);
  outline-offset: 1px;
}

.accessory-option:has(input:checked) {
  border-color: var(--brand);
  background: #f2faff;
}

.accessory-option input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.12rem 0 0;
  accent-color: var(--brand);
}

.accessory-option input:disabled {
  cursor: not-allowed;
}

.accessory-option-copy {
  display: grid;
  gap: 0.2rem;
}

.accessory-option-copy-with-image {
  grid-template-columns: 5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}

.accessory-option-text {
  display: grid;
  gap: 0.2rem;
}

.accessory-option-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.55rem;
}

.accessory-option-media {
  display: grid;
  gap: 0.4rem;
}

.accessory-option-image {
  display: block;
  width: 5rem;
  height: 3.75rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  object-fit: contain;
  background: #fff;
}

.accessory-option-name {
  font-size: 0.95rem;
  font-weight: 900;
}

.accessory-option-description {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.accessory-option-price {
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.accessory-video-link-popover {
  justify-content: center;
  width: 5rem;
  margin: 0;
  padding: 0.4rem 0.3rem;
  border-radius: 0.4rem;
  color: #fff;
  background: var(--brand);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.accessory-video-link-popover svg {
  width: 0.95rem;
  height: 0.95rem;
}

.accessory-video-link-popover:hover,
.accessory-video-link-popover:focus-visible {
  color: #fff;
  background: var(--brand);
  outline: 3px solid rgba(0, 153, 255, 0.3);
  outline-offset: 2px;
  text-decoration: none;
}

.accessory-inline-error {
  margin: 0;
  padding: 0.2rem 0;
  border: 0;
  color: #e00000;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.accessory-popover-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.accessory-popover-done {
  padding: 0.65rem 1.2rem;
  border: 0;
  border-radius: 0.55rem;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.accessory-popover-done:hover,
.accessory-popover-done:focus-visible {
  background: var(--brand);
  outline: 3px solid rgba(0, 153, 255, 0.3);
  outline-offset: 2px;
}

@media (max-width: 30rem) {
  .accessory-popover {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .accessory-popover-form {
    max-height: calc(100dvh - 1rem);
  }

  .accessory-popover-header,
  .accessory-popover-content,
  .accessory-popover-footer {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .accessory-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 48rem) {
  :root {
    --printer-column: 11rem;
  }

  body {
    padding: 2.5rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 1.15rem;
  }
}

@media (max-width: 24rem) {
  :root {
    --printer-column: 7.5rem;
  }

  .page-header {
    align-items: flex-start;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.85rem 0.7rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .table-scroll {
    scroll-behavior: auto;
  }

  .swipe-finger {
    animation: none;
  }

  .mobile-swipe-hint,
  .mobile-swipe-hint.is-visible {
    transition: none;
  }

  .table-pagination-dot::before {
    transition: none;
  }

}
