:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --control-border: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --accent-emerald: #059669;
  --accent-emerald-bg: #ecfdf5;
  --accent-emerald-border: #a7f3d0;
  --support-size: 0.875rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 10px 24px -4px rgb(15 23 42 / 0.04);
  --shadow-hover: 0 10px 25px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.035) 0px, transparent 40%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.035) 0px, transparent 40%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header & Navigation */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bar strong {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  text-decoration: none;
}

/* Hero Section */
.intro {
  padding: clamp(2rem, 5vw, 3.75rem) 0 2rem;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-main);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-top: 0;
}

.intro > p:last-child {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 64ch;
  color: var(--text-muted);
  margin: 0;
}

/* Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: clamp(1.2rem, 3vw, 1.85rem);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

/* Panel Head & Quick Presets */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-subtle);
}

.presets-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.preset-pill {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.preset-pill:hover {
  background: var(--bg-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
}

.panel-head h2 {
  margin: 0;
}

button {
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.15s ease;
}

.sample {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  min-height: 34px;
}

.sample:hover {
  background: #e2e8f0;
  color: var(--primary);
  border-color: #cbd5e1;
}

.sample svg {
  color: var(--primary);
}

/* Form & Inputs */
fieldset {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  min-width: 0;
}

legend {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  padding: 0 0 0.5rem;
  margin-bottom: 0.5rem;
  display: block;
  width: 100%;
  border-bottom: 1px solid var(--line-subtle);
}

/* 3D Parcel Preview Card & Stage */
.parcel-preview-card {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.5rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.parcel-preview-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.preview-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.preview-title svg {
  color: var(--primary);
}

.volume-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: all 0.2s ease;
}

.parcel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  cursor: grab;
  perspective: 600px;
  transform-style: preserve-3d;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.parcel-stage:active {
  cursor: grabbing;
}

.parcel-svg {
  width: 100%;
  max-height: 185px;
  overflow: visible;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.04));
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dim-guide {
  transition: opacity 0.2s ease;
}

.dim-guide text {
  user-select: none;
}

.fields {
  display: grid;
  gap: 0.75rem;
}

.dimensions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.divisors, .comparison {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.divisors > div {
  background: #fcfdfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.divisors > div label:first-of-type {
  color: var(--primary);
  font-weight: 700;
}

.weight {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: var(--support-size);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

input, select {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-main);
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover, select:hover {
  border-color: #94a3b8;
}

input:focus, select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[readonly] {
  background: var(--bg-subtle);
  color: var(--text-subtle);
  border-color: var(--line);
  cursor: not-allowed;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
  margin-bottom: 0.75rem;
}

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: 0;
  padding: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.action:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

.action:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.note, .basis, small, .result-card dt {
  font-size: var(--support-size);
  color: var(--text-subtle);
}

.note {
  margin: 0.65rem 0 0;
  line-height: 1.5;
}

.carrier-link-wrap {
  margin: 0.4rem 0 0.85rem;
  font-size: var(--support-size);
}

.error {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: var(--support-size);
  font-weight: 500;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 1.5rem;
  text-align: center;
  border: 1.5px dashed var(--control-border);
  border-radius: var(--radius-md);
  background: #fafcfe;
}

.empty-icon-wrap {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.35rem;
}

.empty {
  color: var(--text-subtle);
  margin: 0;
  max-width: 38ch;
  line-height: 1.5;
}

/* Result Cards */
@keyframes fadeInScale {
  0% {
    opacity: 0.88;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem 0.85rem;
  margin-top: 0.55rem;
  animation: fadeInScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-card {
  position: relative;
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.05rem 1.05rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-wrap: anywhere;
}

.result-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.result-card.is-winner {
  border-color: var(--accent-emerald-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-emerald-bg) 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.result-card.is-winner:hover {
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.18);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  margin: 0;
}

.result-card h3 {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.card-divisor-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.48rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.18);
  }
  50% {
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.32);
  }
}

.winner-badge {
  position: absolute;
  top: -11px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.6rem;
  border-radius: 9999px;
  background: #059669;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  animation: badgeGlow 2.5s infinite;
}

.billable-hero {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.82rem;
  margin: 0;
  align-self: stretch;
}

.result-card.is-winner .billable-hero {
  background: #ffffff;
  border-color: var(--accent-emerald-border);
}

.billable-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  white-space: nowrap;
}

.billable-val-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-top: 0.18rem;
}

.billable-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.billable-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-subtle);
}

.weights-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.38rem;
  margin: 0;
}

.weight-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.36rem;
  border-bottom: 1px dashed var(--line);
}

.weight-item:nth-child(2) {
  padding-bottom: 0;
  border-bottom: 0;
}

.weight-item dt {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.weight-item dd {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.basis {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  align-self: center;
  padding: 0.24rem 0.55rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

.limit {
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 0.75rem 0.82rem;
  display: flex;
  flex-direction: column;
}

.limit-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.limit-title svg {
  flex-shrink: 0;
}

.limit p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

.limit .max-h-val {
  display: block;
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.22;
  margin: 0.15rem 0 0.2rem;
}

.limit small {
  display: block;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--text-subtle);
}

.disclaimer {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-subtle);
  color: var(--text-subtle);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Guide Sections & Carrier Table */
.guide {
  padding: 3.5rem 0 1.5rem;
}

#guide, .guide:not(#carrier-rules) {
  max-width: 76ch;
}

.guide h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.5rem 0 0.85rem;
  letter-spacing: -0.02em;
}

.guide p:not(.eyebrow) {
  color: var(--text-muted);
  line-height: 1.65;
}

/* Rules Toolbar, Tabs & Search */
.rules-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.85rem;
}

.rules-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.tab-pill {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.tab-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.65);
}

.tab-pill.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.tab-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.tab-pill.is-active .tab-count {
  background: var(--primary-light);
  color: var(--primary);
}

.rules-search-wrap {
  position: relative;
  flex: 1;
  max-width: 340px;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.rules-search-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  padding: 6px 12px 6px 32px;
  font-size: 0.84rem;
  background: #ffffff;
}

.rules-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 0.85rem;
}

.rules-counter {
  font-weight: 600;
  color: var(--text-main);
}

.rules-check-date {
  color: var(--text-subtle);
}

.formula {
  padding: 1.15rem 1.4rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  margin-top: 0.85rem;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--support-size);
}

th, td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

thead th:nth-child(1) { width: 22%; min-width: 150px; }
thead th:nth-child(2) { width: 13%; min-width: 105px; white-space: nowrap; }
thead th:nth-child(3) { width: 20%; min-width: 150px; }
thead th:nth-child(4) { width: 24%; min-width: 170px; }
thead th:nth-child(5) { width: 9%; min-width: 95px; white-space: nowrap; }
thead th:nth-child(6) { width: 12%; min-width: 135px; white-space: nowrap; }

thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  color: var(--text-subtle);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  box-shadow: 0 1px 0 var(--line);
}

tbody tr {
  transition: background-color 0.18s ease;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody th {
  font-weight: 650;
  color: var(--text-main);
  max-width: 220px;
  min-width: 150px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.divisor-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.85rem;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.divisor-accent {
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.badge-imperial {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
  font-family: var(--font-sans);
}

.badge-tier {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #e9d5ff;
  font-family: var(--font-sans);
}

.badge-actual {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
  font-family: var(--font-sans);
}

.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
}

.scope-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 4px;
  white-space: nowrap;
}

.tag-air {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.tag-special {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tag-imperial {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tag-tier {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #f3e8ff;
}

.tag-actual {
  background: #f8fafc;
  color: #475569;
  border: 1px solid var(--line);
}

.table-empty-state {
  text-align: center;
  padding: 2.75rem 1rem;
  color: var(--text-subtle);
}

.table-empty-state .empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem;
}

.table-empty-state .empty-desc {
  font-size: 0.82rem;
  margin: 0 0 0.85rem;
}

.btn-clear-search {
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-search:hover {
  background: #dbeafe;
}

/* Actions Column: PINNED TO RIGHT (Sticky) */
.th-actions, .td-actions {
  position: sticky;
  right: 0;
  text-align: center;
  white-space: nowrap;
  min-width: 135px;
  box-shadow: -5px 0 10px -2px rgba(15, 23, 42, 0.08);
}

thead th.th-actions {
  z-index: 8;
  background: #f8fafc;
}

tbody td.td-actions {
  z-index: 2;
  background: #ffffff;
  padding: 0.5rem 0.65rem;
}

tbody tr:hover td.td-actions {
  background: #f8fafc;
}

tbody tr.row-highlight td.td-actions {
  background: #eef2ff;
}

.btn-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
  background: #ffffff;
  color: var(--primary);
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  margin: 0 2px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-apply:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.ext-icon {
  font-size: 0.78rem;
  display: inline-block;
  transition: transform 0.15s ease;
}

a:hover .ext-icon {
  transform: translate(2px, -2px);
}

/* Pulsing highlight animations */
@keyframes rowFlash {
  0% { background-color: rgba(37, 99, 235, 0.18); }
  100% { background-color: transparent; }
}

tbody tr.row-highlight {
  animation: rowFlash 2s ease-out;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  60% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.applied-pulse {
  animation: pulseGreen 1.4s ease-out;
  border-color: var(--accent-emerald) !important;
}

/* FAQ Section */
.faq-container {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq-heading {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--text-main);
  margin: 0 0 1rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  background: #ffffff;
  transition: all 0.15s ease;
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--primary-border);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.faq-item summary {
  padding: 0.85rem 1.15rem;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-content {
  padding: 0 1.15rem 1rem;
}

.faq-content p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 3rem;
  color: var(--text-subtle);
  font-size: var(--support-size);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-subtle);
}

.footer-brand strong {
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-logo {
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.footer-brand .sep {
  color: var(--control-border);
  user-select: none;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Top Nav, Unit Toggle, Share Button, Freshness Stamp & Topic Hub */
.top-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.unit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.unit-bar-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.unit-segmented {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.unit-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  min-height: 30px;
}

.unit-btn:hover {
  color: var(--text-main);
}

.unit-btn.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.result-panel-head {
  margin-bottom: 1rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  min-height: 34px;
}

.share-btn[hidden] {
  display: none;
}

.share-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.share-btn.is-copied {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald-border);
}

.rules-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.verified-stamp {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
  font-size: 0.73rem;
  font-weight: 700;
}

.topic-hub {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.topic-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem 1.25rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.topic-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text-main);
}

.topic-tag {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.topic-card strong {
  font-size: 1rem;
  color: var(--text-main);
}

.topic-card span:last-child {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.55;
}

.breadcrumb-nav {
  font-size: 0.84rem;
  color: var(--text-subtle);
  margin: 1.25rem 0 0;
}

.breadcrumb-nav a {
  color: var(--text-muted);
}

.cta-box {
  margin-top: 1.75rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-box p {
  margin: 0;
  color: var(--text-main);
  font-weight: 500;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #ffffff;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 0.9rem;
}

.cta-btn:hover {
  background: var(--primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.rules-tabs {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 0;
  margin-left: 0.25rem;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--bg-subtle);
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* Saved Box Presets Bar */
.preset-save-btn {
  border: 1px dashed var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.preset-save-btn:hover {
  background: #dbeafe;
  border-style: solid;
}

.preset-save-btn.is-saved {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
}

.saved-chip.is-fresh {
  border-color: var(--accent-emerald);
  animation: pulseGreen 1.2s ease-out;
}

.saved-boxes-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -0.45rem 0 1rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.saved-boxes-bar[hidden] {
  display: none;
}

.saved-bar-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.2rem;
}

.saved-chip {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.saved-chip-apply {
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
}

.saved-chip-apply:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.saved-chip-del {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text-subtle);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.22rem 0.42rem;
}

.saved-chip-del:hover {
  color: #dc2626;
  background: #fef2f2;
}

/* Multi-box & Qty Controls */
.weight-qty-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(92px, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.weight-qty-row .weight {
  margin-bottom: 0;
}

.multi-box-wrap {
  margin-bottom: 1.25rem;
}

.extra-boxes {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.extra-box-card {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
}

.extra-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.extra-box-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.btn-remove-box {
  border: 0;
  background: transparent;
  color: var(--text-subtle);
  font-size: 0.76rem;
  padding: 0.15rem 0.4rem;
}

.btn-remove-box:hover {
  color: #dc2626;
}

.extra-box-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}

.extra-box-grid label {
  font-size: 0.74rem;
  margin-bottom: 0.2rem;
}

.extra-box-grid input {
  min-height: 38px;
  padding: 0.35rem 0.5rem;
  font-size: 0.88rem;
}

.btn-add-box {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px dashed var(--control-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-add-box:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Simulate Carrier Rounding Switch & Result Enhancements */
.rounding-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.rounding-bar-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rounding-bar-text strong {
  font-size: 0.84rem;
  color: var(--text-main);
}

.rounding-bar-text small {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.toggle-switch {
  appearance: none;
  width: 40px;
  min-width: 40px;
  height: 22px;
  min-height: 22px;
  background: var(--control-border);
  border: 0;
  border-radius: 9999px;
  position: relative;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.toggle-switch:checked {
  background: var(--primary);
}

.toggle-switch:checked::after {
  transform: translateX(18px);
}

.shipment-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--text-main);
  font-size: 0.82rem;
}

.rounding-impact {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--primary);
}

.downsize-tip {
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.76rem;
  line-height: 1.4;
}

.downsize-tip.is-optimal {
  background: var(--accent-emerald-bg);
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Dark Theme Palette */
:root[data-theme="dark"] {
  --bg: #0b1120;
  --bg-card: #111827;
  --bg-subtle: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --line: #1e293b;
  --line-subtle: #1e293b;
  --control-border: #334155;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-light: rgba(59, 130, 246, 0.14);
  --primary-border: rgba(96, 165, 250, 0.32);
  --accent-emerald: #34d399;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(52, 211, 153, 0.32);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .preset-pill,
:root[data-theme="dark"] .rules-search-input,
:root[data-theme="dark"] .result-card,
:root[data-theme="dark"] .faq-item,
:root[data-theme="dark"] .topic-card,
:root[data-theme="dark"] .table-scroll,
:root[data-theme="dark"] tbody td.td-actions {
  background: var(--bg-card);
  color: var(--text-main);
}

:root[data-theme="dark"] .parcel-preview-card,
:root[data-theme="dark"] .divisors > div,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] thead,
:root[data-theme="dark"] thead th.th-actions {
  background: #0f172a;
}

:root[data-theme="dark"] tbody tr:hover,
:root[data-theme="dark"] tbody tr:hover td.td-actions {
  background: #1e293b;
}

:root[data-theme="dark"] .unit-segmented {
  background: #0f172a;
}

:root[data-theme="dark"] .unit-btn.is-active,
:root[data-theme="dark"] .tab-pill.is-active {
  background: #1e293b;
  color: var(--primary);
}

:root[data-theme="dark"] .result-card.is-winner {
  background: linear-gradient(180deg, #111827 0%, rgba(16, 185, 129, 0.14) 100%);
}

:root[data-theme="dark"] .result-card.is-winner .billable-hero {
  background: #0f172a;
}

:root[data-theme="dark"] .btn-apply {
  background: #1e293b;
}

:root[data-theme="dark"] .downsize-tip:not(.is-optimal) {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

/* Responsive */
@media (max-width: 840px) {
  .workspace, .topic-cards {
    grid-template-columns: 1fr;
  }
  .parcel-dimensions {
    display: flex;
    flex-direction: column;
  }
  .parcel-preview-card {
    order: 1;
    margin: 0.75rem 0 0;
  }
  .preview-header {
    flex-wrap: wrap;
  }
  .parcel-stage {
    min-height: 0;
  }
  .parcel-svg {
    height: 120px;
  }
}

/* Mobile Card View for Carrier Rules Table (< 640px) */
@media (max-width: 640px) {
  .extra-box-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #carrier-rules .table-scroll {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow-x: visible;
  }
  #carrier-rules thead {
    display: none;
  }
  #carrier-rules table,
  #carrier-rules tbody {
    display: block;
    width: 100%;
  }
  #carrier-rules tbody tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
  }
  #carrier-rules tbody th,
  #carrier-rules tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: none;
    min-width: 0;
    padding: 0.42rem 0;
    border-bottom: 1px solid var(--line-subtle);
    text-align: right;
  }
  #carrier-rules tbody th {
    font-size: 0.96rem;
    text-align: left;
    padding-top: 0;
    padding-bottom: 0.55rem;
    color: var(--text-main);
  }
  #carrier-rules tbody td::before {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
    text-align: left;
    flex-shrink: 0;
  }
  #carrier-rules tbody td:nth-of-type(1)::before { content: "Divisor"; }
  #carrier-rules tbody td:nth-of-type(2)::before { content: "Scope"; }
  #carrier-rules tbody td:nth-of-type(3)::before { content: "Conditions"; }
  #carrier-rules tbody td:nth-of-type(4)::before { content: "Source"; }
  #carrier-rules tbody td.td-actions {
    position: static;
    box-shadow: none;
    border-bottom: 0;
    padding: 0.65rem 0 0;
    justify-content: flex-end;
    background: transparent;
  }
  #carrier-rules tbody td.td-actions::before {
    content: "Quick apply";
    margin-right: auto;
    align-self: center;
  }
}

@media (max-width: 480px) {
  .dimensions, .weight-qty-row {
    grid-template-columns: 1fr;
  }
  .comparison, .divisors {
    grid-template-columns: 1fr;
  }
  .comparison {
    row-gap: 1.15rem;
  }
  .result-card {
    grid-row: auto;
    grid-template-rows: auto;
    row-gap: 0.7rem;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
