/* Food Cost Calculator — ticket printer. Tokens in /tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-worktop: var(--paper);
  --bg-surface: var(--white);
  --bg-subtle: var(--paper-inner);
  --border-dark: var(--ink);
  --border-subtle: var(--line);
  --text-ink: var(--ink);
  --text-muted: var(--ink-muted);
  --pass-green: var(--ok);
  --pass-green-dark: var(--ok);
  --pass-green-bg: var(--white);
  --chef-amber: var(--grease);
  --chef-amber-dark: var(--grease-dark);
  --alert-red: var(--ticket-red);
  --alert-red-dark: var(--ticket-red);
  --alert-red-bg: #FBEDEA;
  --font-display: "Arial Narrow", "Helvetica Neue Condensed", Impact, "Franklin Gothic Medium", sans-serif;
}

html {
  background: var(--bg-worktop);
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--text-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--bg-worktop);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text-ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

/* Header & Expo Rail Navigation */
.rail {
  background: #111827;
  color: #FFFFFF;
  border-bottom: 2px solid #000000;
  padding: 0.75rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 100vw;
  box-sizing: border-box;
}

.mark {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.mark-badge {
  background: var(--chef-amber);
  color: #111827;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.nav a {
  color: #9CA3AF;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: #FFFFFF;
  background: #1F2937;
  border: 1px solid #374151;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid #374151;
}

.user-tag {
  color: #D1D5DB;
  font-size: 0.82rem;
  font-family: var(--font-ticket);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Layout container */
.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  box-sizing: border-box;
}

/* Commercial Kitchen Expo Ticket Card */
.ticket {
  background: #FFFFFF;
  border: 2px solid var(--border-dark);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* The Red Ticket Clip Tab at Top Center */
.ticket-clip {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 14px;
  background: var(--alert-red);
  border: 2px solid var(--border-dark);
  border-radius: 4px;
  z-index: 10;
}

.ticket-body {
  padding: 2rem 2.25rem 2.25rem;
}

/* Ticket Header Row (Title on left, Margin Health on right) */
.ticket-header-row,
.calculator-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ticket-header-left {
  flex: 1;
  min-width: 260px;
}

.ticket-kicker,
.kicker {
  font-family: var(--font-ticket);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--alert-red);
  margin: 0 0 0.35rem;
}

.ticket-dish-name,
.dish-hero-title {
  font-size: clamp(2rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-ink);
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

.ticket-subtitle,
.dish-hero-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

/* Margin Health Box (Screen 1 top right) */
.margin-health-box {
  background: var(--bg-subtle);
  border: 2px solid var(--border-dark);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 300px;
  max-width: 330px;
  flex-shrink: 0;
}

.margin-health-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.margin-health-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-ink);
}

.margin-health-status {
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-ticket);
  color: var(--pass-green-dark);
}

.margin-health-status.is-tight {
  color: var(--chef-amber-dark);
}

.margin-health-status.is-hazard {
  color: var(--alert-red);
}

.margin-health-track-wrap {
  width: 100%;
}

.margin-health-gradient-track {
  height: 8px;
  border-radius: 4px;
  border: 1px solid var(--border-dark);
  background: linear-gradient(90deg, #10B981 0%, #34D399 40%, #F59E0B 70%, #EF4444 100%);
  position: relative;
}

.margin-health-needle {
  position: absolute;
  top: -3px;
  width: 2.5px;
  height: 14px;
  background: var(--border-dark);
  border-radius: 1px;
  transform: translateX(-50%);
}

.margin-health-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-ticket);
  font-weight: 600;
  margin-top: 0.35rem;
}

.margin-health-scale .scale-burning {
  color: var(--alert-red);
  font-weight: 700;
}

/* 4 Output Stat Cards (Screen 1) */
.stats-grid,
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
}

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

.calculation-errors {
  grid-column: 1 / -1;
  width: 100%;
  background: #FEF2F2;
  border: 2px solid var(--alert-red);
  color: #991B1B;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 1rem;
  box-sizing: border-box;
}

.stat-card,
.stat {
  background: #FFFFFF;
  border: 2px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card-label,
.stat dt {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.stat-card-value,
.stat dd {
  margin: 0 0 0.35rem;
  font-family: var(--font-ticket);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.stat-card-value.stat-value-orange,
.stat[data-status="watch"] dd {
  color: var(--chef-amber);
}

.stat-card-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-ticket);
}

.stat-card-sub.stat-sub-green {
  color: var(--pass-green-dark);
  font-weight: 700;
}

/* Hero Card: Food Cost % in bright mint green */
.stat-card.stat-card-hero,
.stat.stat-card-hero {
  background: var(--pass-green-bg);
  border: 2.5px solid var(--pass-green);
}

.stat-card-hero .stat-card-label,
.stat-card-hero dt {
  color: var(--pass-green-dark);
}

.stat-card-hero .stat-card-value,
.stat-card-hero dd {
  color: var(--pass-green-dark);
  font-size: clamp(2.2rem, 3.8vw, 3rem);
}

.stat-card-hero .stat-card-sub {
  color: var(--pass-green-dark);
  font-weight: 700;
}

/* Committed Ingredients 2-Column Grid (Screen 1) */
.committed-section {
  margin: 1.75rem 0 2rem;
}

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

.committed-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-ink);
}

.committed-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.committed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.committed-card {
  background: #FFFFFF;
  border: 2px solid var(--border-dark);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  box-sizing: border-box;
}

.committed-card-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.committed-card-info {
  min-width: 0;
  overflow: hidden;
}

.committed-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.committed-card-name {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-ink);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.committed-card-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-ticket);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.committed-card-cost {
  font-weight: 800;
  font-size: 1.15rem;
  font-family: var(--font-ticket);
  color: var(--text-ink);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Sysco Invoice Drift Board (Screen 2) */
.drift-board-container {
  margin: 1.5rem 0 2rem;
}

.drift-alert-banner {
  background: var(--alert-red-bg);
  border: 2.5px solid var(--alert-red);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.drift-alert-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.drift-alert-title {
  color: var(--alert-red-dark);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}

.drift-alert-subtitle {
  color: #7F1D1D;
  font-size: 0.85rem;
  margin: 0;
  font-weight: 500;
}

.drift-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.drift-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0.95rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.drift-card.breached {
  border: 2.5px solid var(--alert-red);
}

.drift-card.stable {
  border: 2.5px solid var(--pass-green);
}

.drift-card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.drift-card-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.drift-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-ink);
  margin: 0 0 0.2rem;
}

.drift-card-delta {
  font-family: var(--font-ticket);
  font-size: 0.82rem;
  color: #4B5563;
  margin: 0;
}

.drift-card-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.drift-card-margins {
  text-align: right;
}

.drift-card-margin-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.15rem;
}

.drift-card-margin-values {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.4rem;
}

.drift-card-new-margin {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-ticket);
  color: var(--alert-red);
}

.drift-card-old-margin {
  text-decoration: line-through;
  color: #9CA3AF;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-ticket);
}

.drift-card-safe-margin {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-ticket);
  color: var(--pass-green-dark);
}

.btn-reprice {
  background: var(--alert-red);
  border: 2.5px solid var(--border-dark);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s ease, background 0.15s ease;
}

.btn-reprice:hover {
  background: #DC2626;
}

.badge-stable {
  background: #D1FAE5;
  color: #065F46;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.drift-footer-bar {
  border-top: 2px solid var(--border-dark);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.drift-footer-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-ink);
}

.btn-apply-all {
  background: var(--chef-amber);
  border: 2.5px solid var(--border-dark);
  color: var(--text-ink);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-apply-all:hover {
  background: #FBBF24;
}

/* Forms, Recipe Card & Inputs */
.recipe-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.recipe-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-ink);
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4B5563;
}

input, select, textarea {
  background: #FFFFFF;
  border: 1.5px solid #D1D5DB;
  color: var(--text-ink);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
  min-height: 42px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-dark);
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.15);
}

input[inputmode="decimal"],
input[type="number"],
input[name="packPrice"],
input[name="packSize"],
input[name="amountUsed"],
input[name="bottleCost"],
input[name="menuPrice"],
input[name="targetPercent"] {
  font-family: var(--font-ticket);
  font-variant-numeric: tabular-nums;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #FFFFFF;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

th, td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: #F3F4F6;
  color: #4B5563;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

td input {
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
  min-height: 36px;
}

.ingredient-row.is-missing {
  background: #FEF2F2;
}

.ingredient-row.is-missing td:nth-child(2) input {
  border-color: var(--alert-red);
}

.field-with-action {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.field-with-action input {
  flex: 1;
}

.btn-remove-row {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #9CA3AF;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.stepper-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.stepper-wrap input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 5.5rem !important;
  text-align: center;
  margin: 0;
  font-size: 16px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  border: 1.5px solid #D1D5DB;
  border-radius: 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-ink);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.stepper-btn:hover {
  background: #E5E7EB;
  border-color: #9CA3AF;
}

.stepper-btn:active {
  background: #D1D5DB;
  transform: scale(0.96);
}

.sticky-margin-bar {
  display: none;
}


.btn-remove-row:hover,
.btn-remove-row:focus-visible {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #FCA5A5;
  outline: none;
}

@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 4px #10B981; }
  50% { box-shadow: 0 0 0 6px #F59E0B; }
  100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); }
}

.highlight-pulse {
  animation: highlightPulse 1.2s ease-out;
}

/* Action Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1.25rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 8px;
  border: 2px solid var(--border-dark);
  cursor: pointer;
  background: var(--border-dark);
  color: #FFFFFF;
  text-decoration: none;
  min-height: 44px;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #374151;
  color: #FFFFFF;
  text-decoration: none;
}

.btn-ghost {
  background: #FFFFFF;
  color: var(--text-ink);
  border: 2px solid var(--border-dark);
}

.btn-ghost:hover {
  background: #F3F4F6;
  color: var(--text-ink);
}

.btn-hazard,
.btn-danger {
  background: var(--alert-red);
  border-color: var(--border-dark);
  color: #FFFFFF;
}

.btn-hazard:hover,
.btn-danger:hover {
  background: #DC2626;
}

/* Tactile Jigger Chips (Pour Calculator) */
.jigger-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.chip,
.jigger-chip {
  min-height: 48px;
  min-width: 52px;
  padding: 0.6rem 1rem;
  font-family: var(--font-ticket);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  background: #FFFFFF;
  border: 2px solid var(--border-dark);
  color: var(--text-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.chip:hover,
.jigger-chip:hover {
  background: #F3F4F6;
}

.chip:focus-visible,
.jigger-chip:focus-visible {
  outline: 3px solid var(--pass-green);
  outline-offset: 2px;
}

.chip.active,
.chip.is-active,
.chip[aria-pressed="true"],
.jigger-chip.active,
.jigger-chip.is-active,
.jigger-chip[aria-pressed="true"] {
  background: #111827;
  color: #FFFFFF;
  border-color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bottle-yield-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: #F3F4F6;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-ticket);
  font-size: 0.82rem;
  color: var(--text-ink);
  margin-top: 0.5rem;
}

/* Tabs */
.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0 1.25rem;
  border-bottom: 2px solid var(--border-dark);
  padding-bottom: 0.6rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 6px;
  background: transparent;
  color: #4B5563;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-ink);
  background: #E5E7EB;
  text-decoration: none;
}

.tab-btn.is-active,
.tab-btn[aria-selected="true"] {
  color: #FFFFFF;
  background: var(--border-dark);
  border-color: var(--border-dark);
}

/* Alerts & Flash Notifications */
.alert {
  background: var(--alert-red-bg);
  border: 2px solid var(--alert-red);
  color: var(--alert-red-dark);
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.alert strong {
  color: var(--alert-red-dark);
}

.flash {
  background: var(--pass-green-bg);
  border: 2px solid var(--pass-green);
  color: var(--pass-green-dark);
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.error-line {
  color: var(--alert-red);
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 1.2rem;
  margin: 0.35rem 0;
}

/* Comparison Tables */
.compare {
  width: 100%;
}

.compare th:first-child {
  width: 25%;
  background: transparent;
}

.compare th:nth-child(2),
.compare td:nth-child(2) {
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid var(--chef-amber);
  border-right: 2px solid var(--chef-amber);
  font-weight: 700;
}

.compare th:nth-child(2) {
  color: var(--chef-amber-dark);
}

/* Location Switcher Pill */
.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border-dark);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Ticket Mini for Hub */
.ticket-mini {
  background: #FFFFFF;
  border: 2px solid var(--border-dark);
  border-radius: 10px;
  padding: 0.9rem 1.25rem;
  position: relative;
  margin-bottom: 0.75rem;
}

.ticket-mini.is-safe {
  border-left: 6px solid var(--pass-green);
}

.ticket-mini.is-tight {
  border-left: 6px solid var(--chef-amber);
}

.ticket-mini.is-hazard {
  border-left: 6px solid var(--alert-red);
}

.margin-meter-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: var(--font-ticket);
}

.margin-meter-badge.is-green {
  background: #D1FAE5;
  color: #065F46;
}

.margin-meter-badge.is-amber {
  background: #FEF3C7;
  color: #92400E;
}

.margin-meter-badge.is-red {
  background: #FEE2E2;
  color: #991B1B;
}

/* Footer */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #D1D5DB;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   Mobile-First Responsive System
   Precise touch targets (min 44px), zero horizontal clipping, swipeable rails.
   ========================================================================== */
@media (max-width: 768px) {
  .rail {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
    flex-direction: column;
    align-items: stretch;
  }

  .mark {
    font-size: 1.2rem;
  }

  .nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.82rem;
    padding: 0.4rem 0.65rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .nav-auth {
    margin-left: 0.25rem;
    padding-left: 0.5rem;
    flex-shrink: 0;
  }

  .ticket-header-row,
  .calculator-hero-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .ticket-header-left {
    min-width: 0;
    width: 100%;
  }

  .ticket-dish-name,
  .dish-hero-title {
    font-size: clamp(1.65rem, 6.5vw, 2.2rem);
  }

  .margin-health-box {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.85rem;
  }

  .stats-grid,
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
  }

  .stat-card,
  .stat {
    padding: 0.75rem 0.45rem;
    min-width: 0;
    overflow: hidden;
  }

  .stat-card-label,
  .stat dt {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .stat-card-value,
  .stat dd {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
    white-space: nowrap;
  }

  .stat-card-hero .stat-card-value,
  .stat-card-hero dd {
    font-size: clamp(1.55rem, 5.8vw, 2.1rem);
  }

  .stat-card-sub {
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .committed-section {
    margin: 1.25rem 0 1.5rem;
  }

  .committed-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .committed-card {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .committed-name {
    font-size: 0.95rem;
  }

  .committed-sub {
    font-size: 0.78rem;
  }

  .committed-cost {
    font-size: 1.2rem;
  }

  .drift-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .drift-card-left {
    gap: 0.75rem;
  }

  .drift-card-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    box-sizing: border-box;
  }

  .drift-card-right form {
    display: flex;
    justify-content: flex-end;
  }

  .drift-card-margins {
    text-align: left;
  }

  .drift-card-margin-values {
    justify-content: flex-start;
  }

  .btn-reprice {
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    border-radius: 6px;
    white-space: nowrap;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pricing-card.featured {
    transform: none;
  }

  .tabs-bar {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.4rem;
    margin: 1rem 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .tabs-bar::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
  }

  .compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
  }

  .wrap {
    width: 100%;
    padding: 0.75rem 0.65rem 2.5rem;
    box-sizing: border-box;
  }

  .ticket {
    border-radius: 12px;
    margin-bottom: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ticket-body {
    padding: 1.15rem 0.75rem 1.35rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .ticket-clip {
    width: 32px;
    height: 12px;
    top: -6px;
  }

  .stats-grid,
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    margin: 1rem 0 1.25rem;
  }

  .stat-card,
  .stat {
    padding: 0.65rem 0.35rem;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  .recipe-card {
    padding: 1rem 0.75rem;
    margin: 1.25rem 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-card-label,
  .stat dt {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stat-card-value,
  .stat dd {
    font-size: clamp(1.25rem, 4.8vw, 1.65rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.15rem;
    white-space: nowrap;
  }

  .stat-card-hero .stat-card-value,
  .stat-card-hero dd {
    font-size: clamp(1.4rem, 5.4vw, 1.85rem);
  }

  .stat-card-sub {
    font-size: 0.68rem;
    white-space: nowrap;
  }

  /* Mobile Touch Card Transformation for Ingredient Lines */
  .table-wrap {
    margin: 1rem 0 1.25rem;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    background: transparent;
    border: none;
    box-sizing: border-box;
  }

  /* Keep horizontal scroll for comparison and ladder data tables */
  .table-wrap:has(.ladder-table),
  .table-wrap:has(.compare) {
    overflow-x: auto;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
  }

  table.lines,
  table.lines tbody,
  table.lines tr,
  table.lines td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  table.lines thead {
    display: none;
  }

  table.lines tr.ingredient-row {
    background: #FFFFFF;
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  table.lines tr.ingredient-row:focus-within {
    border-color: var(--border-dark);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
  }

  table.lines tr.ingredient-row.is-missing {
    border-color: var(--alert-red);
    background: #FEF2F2;
  }

  table.lines td {
    padding: 0;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  table.lines td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
  }

  table.lines td input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    min-height: 48px;
    font-size: 1rem !important; /* Prevents iOS Safari auto-zoom */
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    border: 1.5px solid #D1D5DB;
    touch-action: manipulation;
  }

  .field-with-action {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .field-with-action input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 56px);
    min-height: 48px;
  }

  .btn-remove-row {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FEE2E2;
    color: #991B1B;
    border: 1.5px solid #FCA5A5;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }

  .btn-remove-row:hover,
  .btn-remove-row:active {
    background: #EF4444;
    color: #FFFFFF;
    border-color: #DC2626;
  }

  /* Form controls general mobile sizing */
  input,
  select,
  textarea {
    font-size: 1rem !important; /* 16px minimum prevents iOS zoom */
    min-height: 48px;
    touch-action: manipulation;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    min-height: 48px;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .price-ladder-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .price-ladder-right {
    width: 100%;
    justify-content: space-between;
  }

  .stepper-wrap {
    width: 100%;
  }

  .stepper-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.35rem;
    border-radius: 8px;
  }

  .sticky-margin-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #111827;
    color: #FFFFFF;
    border-top: 2px solid #000000;
    padding: 0 1rem;
    z-index: 99;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    align-items: center;
    justify-content: space-between;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sticky-margin-bar.is-visible {
    transform: translateY(0);
  }

  .sticky-margin-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
  }

  .sticky-plate-cost {
    font-family: var(--font-ticket);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #FFFFFF;
  }

  .sticky-pct-badge {
    font-family: var(--font-ticket);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    background: #064E3B;
    color: #34D399;
    letter-spacing: 0.02em;
  }

  .sticky-pct-badge.is-tight {
    background: #78350F;
    color: #FBBF24;
  }

  .sticky-pct-badge.is-hazard {
    background: #7F1D1D;
    color: #F87171;
  }

  .sticky-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .btn-sticky-add {
    background: #374151;
    color: #FFFFFF;
    border: 1.5px solid #4B5563;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    min-height: 42px;
    cursor: pointer;
    touch-action: manipulation;
  }

  .btn-sticky-save {
    background: var(--chef-amber);
    color: #111827;
    font-weight: 800;
    border: none;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 8px;
    min-height: 42px;
    cursor: pointer;
    touch-action: manipulation;
  }
}

/* Ticket lock (DESIGN.md). Last wins over Expo Arcade leftovers. */
html { background: var(--rail); }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}
.rail {
  background: var(--rail);
  border-bottom: 2px solid var(--ink);
  border-top: 6px solid var(--grease);
  box-shadow: none;
}
.mark {
  font-family: "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  color: var(--grease);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--grease);
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.ticket,
.stat,
.stat-card,
.committed-card,
.recipe-card,
.btn,
.margin-health-box,
.btn-sticky-add,
.btn-sticky-save,
input,
select,
textarea,
.stepper-btn {
  border-radius: 2px !important;
}
.ticket {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--rail);
}
.ticket-clip {
  background: var(--ticket-red);
  border-radius: 2px;
}
.ticket-target {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--ink-muted);
}
.stat-card-hero,
.stat.stat-card-hero {
  background: var(--white) !important;
  border: 2px solid var(--ink) !important;
}
.stat-card-hero dt,
.stat-card-hero .stat-card-label,
.stat-card-hero dd,
.stat-card-hero .stat-card-value,
.stat-card-hero .stat-card-sub {
  color: var(--ink) !important;
}
.stat dd,
.stat-card-value,
.stat-card-value.stat-value-orange,
.stat[data-status="watch"] dd,
.stat[data-status="ok"] dd,
.stat[data-status="over"] dd {
  color: var(--ink) !important;
  font-size: clamp(1.5rem, 2.8vw, 2.35rem);
}
.stat-card-hero[data-status="ok"] dd,
.stat-card-hero[data-status="ok"] .stat-card-value { color: var(--ok); }
.stat-card-hero[data-status="watch"] dd,
.stat-card-hero[data-status="watch"] .stat-card-value { color: var(--watch); }
.stat-card-hero[data-status="over"] dd,
.stat-card-hero[data-status="over"] .stat-card-value { color: var(--over); }
.btn {
  background: var(--grease);
  color: var(--ink);
  border: 2px solid var(--ink);
  text-transform: uppercase;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.btn:hover {
  background: var(--ink);
  color: var(--grease);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
h1 {
  font-family: "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  text-transform: uppercase;
}

.pack-lines {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}
.pack-line {
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 0.75rem;
  background: var(--white);
}
.pack-name input {
  width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
}
.pack-line input {
  font-size: 16px;
  min-height: 48px;
  width: 100%;
  box-sizing: border-box;
}
.pack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.65rem;
}
.pack-line .pack-remove {
  margin-top: 0.65rem;
  width: auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: "Arial Narrow", sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pack-line .stepper-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
}
.pack-line .stepper-wrap input {
  min-width: 5.5rem !important;
  width: auto !important;
  flex: 1 1 auto !important;
  font-size: 16px !important;
  min-height: 48px;
  text-align: center;
}
.pack-line .stepper-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 2px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.footer-links a {
  text-decoration: underline;
}
.proof-strip {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  margin: 0.75rem 0 0.5rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  background: var(--ticket-red);
  color: var(--white);
  border: 2px solid var(--ink);
  border-radius: 2px;
  text-transform: uppercase;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.stamp:hover { color: var(--grease); background: var(--ink); }
.landing {
  margin: 0 0 1.5rem;
}
.landing-hero {
  display: grid;
  gap: 1.25rem;
}
.hero-ticket {
  position: relative;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 1.35rem 1rem 1.15rem;
  box-shadow: 6px 6px 0 var(--rail);
}
.hero-ticket-name {
  font-family: "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.35rem 0 0.75rem;
}
.hero-ticket-nums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.hero-ticket-nums dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.hero-ticket-nums dd {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.15rem;
  margin: 0.15rem 0 0;
}
.stamp-hero {
  width: 100%;
  min-height: 52px;
  box-shadow: 4px 4px 0 var(--ink);
}
.landing-copy .lede {
  font-size: 1.15rem;
  max-width: 28rem;
}
.landing-steps {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}
.landing-steps article {
  background: var(--paper-inner, var(--white));
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 1rem;
}
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.65rem 0 0.85rem;
}
.mini-ticket {
  background: var(--white);
  border: 2px dashed var(--ink);
  padding: 0.65rem 0.7rem;
}
.mini-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 0.25rem;
}
@media (min-width: 720px) {
  .landing-hero {
    grid-template-columns: minmax(16rem, 0.9fr) 1.1fr;
    align-items: center;
  }
  .landing-steps {
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
  }
  .stamp-hero {
    width: auto;
  }
}
.kitchen-board {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .kitchen-board {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
.ticket-mini {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 1rem 1rem 0.85rem;
  position: relative;
  box-shadow: 4px 4px 0 var(--rail);
}
.ticket-mini .mini-clip {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 28px;
  height: 10px;
  margin-left: -14px;
  background: var(--rail-steel);
  border: 2px solid var(--ink);
  border-radius: 2px;
}
.ticket-mini.is-hazard {
  border-color: var(--ticket-red);
}
.ticket-mini h2 {
  font-family: "Arial Narrow", sans-serif;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin: 0.35rem 0 0.25rem;
}
.ticket-mini h2 a { color: inherit; }
@media (min-width: 720px) {
  .pack-grid {
    grid-template-columns: 7rem 6rem 5rem minmax(8rem, 1fr);
  }
}
