@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/PixelifySans.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Bangers";
  src: url("assets/fonts/Bangers-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --blue: #091f9d;
  --bright-blue: #1026ad;
  --purple: #650077;
  --green: #087016;
  --pink: #ed2e86;
  --yellow: #fff232;
  --orange: #e55019;
  --paper: #eee9d6;
  --panel: #f5f1df;
  --ink: #111111;
  --silver: #c7c7c7;
  --link: #0000ee;
  --visited: #551a8b;
  --c64-blue: #40318d;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 12px; }

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background: #b8b8b8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, select { min-height: 42px; }
button { color: var(--ink); }
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--visited); }
a:hover { color: #d00072; }
:focus-visible { outline: 3px dotted #d10072; outline-offset: 3px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border: 3px outset #fff;
  background: var(--yellow);
  color: #000080;
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }
.desktop, .browser-shell { width: 100%; }

.browser-shell {
  max-width: 1200px;
  margin: 0 auto;
  border: 2px outset #eee;
  background: var(--silver);
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.28);
}

.network-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px 9px;
  border-top: 1px solid #fff;
  border-bottom: 2px ridge #ddd;
  color: #111459;
  background: var(--yellow);
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
}

.ticker-window { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-block; min-width: max-content; animation: ticker 18s linear infinite; }
#connectionLabel { flex: 0 0 auto; color: #b0005d; white-space: nowrap; }
.is-connecting #connectionLabel { animation: old-web-blink 0.65s steps(1, end) infinite; }

#mainContent {
  background-color: var(--paper);
  background-image: radial-gradient(#c8bca1 0.75px, transparent 0.75px);
  background-size: 5px 5px;
}

.noscript {
  margin: 0;
  padding: 12px;
  border: 3px double #800000;
  color: #800000;
  background: #fff9bd;
  text-align: center;
  font-weight: 800;
}

.construction-zone {
  display: grid;
  grid-template-columns: 150px 1fr 190px;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 12px 20px;
  border-top: 4px double #13269e;
  border-bottom: 4px double #13269e;
  background: #fffce0;
  text-align: center;
}

.construction-zone div { display: grid; gap: 1px; }
.construction-zone strong {
  color: #d70071;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: clamp(20px, 2.5vw, 29px);
  line-height: 1.1;
}
.construction-zone span { color: #142064; font-size: 15px; font-weight: 700; }
.construction-gif, .construction-still { width: 130px; height: 98px; object-fit: contain; image-rendering: pixelated; }
.construction-still { display: none; }
.motion-button { min-height: 42px; padding: 6px 9px; border: 3px outset #eee; color: #101c83; background: #d6d6d6; font-size: 13px; font-weight: 900; cursor: pointer; }
.motion-button:active { border-style: inset; }

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 22px;
}

.hero-copy {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: minmax(480px, 1.35fr) minmax(260px, 0.65fr);
  grid-template-rows: auto;
  column-gap: clamp(22px, 2.5vw, 34px);
  align-items: center;
  width: 100%;
  min-width: 0;
}

.hero-brand {
  position: relative;
  isolation: isolate;
  z-index: 1;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  justify-items: start;
  width: min(520px, 100%);
  min-width: 0;
  padding: 10px 0 3px;
}

.hero-brand::before {
  position: absolute;
  z-index: 0;
  inset: -12px -20px 16px -24px;
  background:
    radial-gradient(circle at 2px 2px, rgba(25, 5, 53, 0.78) 1.2px, transparent 1.4px) 0 0 / 7px 7px,
    linear-gradient(135deg, #43117d 0%, #8432c5 58%, #5d1f99 100%);
  clip-path: polygon(0 48%, 17% 36%, 5% 8%, 31% 28%, 42% 0, 51% 27%, 70% 4%, 70% 33%, 97% 20%, 80% 49%, 100% 67%, 72% 65%, 82% 96%, 56% 76%, 40% 100%, 34% 73%, 7% 88%, 20% 60%);
  content: "";
  pointer-events: none;
  transform: rotate(-1.2deg);
}

.hero-brand::after {
  position: absolute;
  z-index: 1;
  inset: 4px -6px 5px -12px;
  background: linear-gradient(118deg, #ef2588 0 43%, #ffbb16 43% 54%, #7a1eb7 54% 100%);
  clip-path: polygon(0 74%, 23% 49%, 10% 25%, 38% 42%, 50% 5%, 60% 39%, 88% 17%, 74% 52%, 100% 64%, 70% 69%, 82% 97%, 54% 78%, 31% 100%, 36% 70%);
  content: "";
  opacity: 0.9;
  pointer-events: none;
}

.brand-logo {
  position: relative;
  isolation: isolate;
  z-index: 2;
  display: block;
  width: min(430px, 100%);
  aspect-ratio: 2079 / 756;
  filter: drop-shadow(2px 3px 1px rgba(0, 0, 0, 0.38));
}

.brand-logo-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("assets/bugg-wordmark-mask.png") center / contain no-repeat;
  mask: url("assets/bugg-wordmark-mask.png") center / contain no-repeat;
}

.brand-logo-shadow {
  z-index: 0;
  background: #29170c;
  transform: translate(6px, 6px);
}

.brand-logo-depth {
  z-index: 1;
  background: #d85a00;
  transform: translate(3px, 3px);
}

.brand-logo-face {
  z-index: 2;
  background: linear-gradient(145deg, #fffbd0 0%, #fff03b 23%, #ffe11a 48%, #ffc400 73%, #d98700 100%);
  filter: drop-shadow(-1px -1px 0 #fffbd0);
}

.hero-copy h1 {
  position: relative;
  z-index: 3;
  display: block;
  width: min(500px, 100%);
  margin: -2px 0 0;
  padding: 7px 16px 9px;
  clip-path: polygon(1% 15%, 8% 8%, 19% 13%, 31% 5%, 43% 12%, 55% 4%, 67% 12%, 79% 6%, 91% 13%, 100% 8%, 98% 83%, 88% 91%, 77% 85%, 66% 95%, 55% 87%, 43% 96%, 31% 87%, 19% 94%, 7% 85%, 0 91%);
  color: var(--pink);
  background: #111;
  filter: drop-shadow(3px 4px 0 rgba(92, 0, 55, 0.62));
  text-align: center;
  white-space: nowrap;
  transform: rotate(-1deg);
}

.hero-copy h1 span {
  display: block;
  font-family: "Bangers", "Pixelify Sans", sans-serif;
  font-size: clamp(30px, 3.4vw, 43px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 #52002f, -1px -1px 0 #ff91c4;
  transform: skew(-7deg);
}

.hero-copy p {
  --comic-burst: polygon(50% 0, 58% 14%, 69% 3%, 72% 20%, 85% 9%, 83% 29%, 98% 25%, 91% 42%, 100% 51%, 88% 59%, 96% 77%, 80% 73%, 78% 96%, 64% 84%, 55% 100%, 48% 84%, 34% 98%, 30% 80%, 14% 91%, 18% 70%, 2% 67%, 11% 51%, 0 41%, 14% 34%, 7% 17%, 25% 20%, 31% 3%, 43% 16%);
  position: relative;
  isolation: isolate;
  display: block;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: min(330px, 100%);
  min-height: 190px;
  margin: 0;
  padding: 38px 38px;
  color: var(--yellow);
  background: transparent;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-shadow: 2px 2px 0 #111, -1px -1px 0 #111;
  filter: drop-shadow(5px 6px 0 rgba(22, 9, 23, 0.72));
  transform: rotate(-1deg);
}

.hero-copy p::before,
.hero-copy p::after {
  position: absolute;
  clip-path: var(--comic-burst);
  content: "";
  pointer-events: none;
}

.hero-copy p::before {
  z-index: 0;
  inset: 0;
  background: #111;
}

.hero-copy p::after {
  z-index: 1;
  inset: 5px;
  background:
    radial-gradient(circle at 2px 2px, rgba(0, 71, 82, 0.34) 1px, transparent 1.25px) 0 0 / 7px 7px,
    linear-gradient(150deg, #2cd4d0 0%, #0da3b6 62%, #087e98 100%);
}

.hero-copy p span {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 114px;
  place-items: center;
}

.hero-product {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  width: 195px;
  min-width: 0;
  margin: 0;
  justify-self: center;
}
.hero-pack-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1746 / 1331;
  border: 4px ridge #e32789;
  background: #eee;
  animation: packet-jitter 2.4s steps(2, end) infinite;
}

.hero-pack {
  position: absolute;
  top: -100%;
  left: 0;
  width: 200%;
  max-width: none;
  height: auto;
  mix-blend-mode: multiply;
}

.burst {
  position: absolute;
  z-index: 2;
  top: -5px;
  right: -13px;
  display: grid;
  width: 82px;
  height: 82px;
  place-content: center;
  padding: 10px;
  clip-path: polygon(50% 0, 61% 20%, 80% 7%, 83% 30%, 100% 32%, 88% 50%, 100% 67%, 81% 70%, 78% 94%, 60% 80%, 50% 100%, 40% 80%, 21% 94%, 20% 70%, 0 67%, 12% 50%, 0 32%, 18% 29%, 20% 7%, 39% 20%);
  color: #ffe930;
  background: #d6207b;
  text-align: center;
  text-shadow: 2px 2px #000;
  transform: rotate(5deg);
  animation: burst-jump 1.2s steps(2, end) infinite;
}

.burst strong { font-size: 25px; line-height: 0.82; }
.burst small { font-size: 11px; font-weight: 900; text-transform: uppercase; }
.burst em { display: block; font-size: 13px; font-style: normal; font-weight: 900; }

.page-columns {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 0 20px 22px;
}

.directory {
  align-self: start;
  padding: 11px 13px;
  border: 3px ridge #a14a91;
  color: #fff;
  background: #16051c;
}

.directory h2 { margin: 0 0 13px; color: #70ff24; font-size: 18px; text-align: center; }
.directory nav { display: flex; flex-direction: column; gap: 9px; padding-bottom: 16px; border-bottom: 1px solid #8b778d; }
.directory a, .directory a:visited { color: #ff70bb; font-size: 15px; font-weight: 800; }
.directory a:hover, .directory a.active { color: #fff127; }
.new-badge { display: inline-block; margin-left: 3px; color: #7dff38; font-family: "Courier New", monospace; font-size: 11px; text-decoration: none; }
.didyouknow { padding-top: 10px; }
.didyouknow h3 { margin: 5px 0 8px; color: #ffef22; font-size: 16px; }
.didyouknow p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; }
.didyouknow img {
  width: 100%;
  height: 105px;
  margin-top: 7px;
  object-fit: contain;
  mix-blend-mode: screen;
  transform-origin: 50% 84%;
  animation: sidebar-wiggle 0.72s steps(2, end) infinite alternate;
}
.best-viewed { margin: 18px 0 3px; color: #ddd; font-family: "Times New Roman", serif; font-size: 13px; line-height: 1.35; text-align: center; }
.content-column { min-width: 0; }

.panel, .module, .webmaster-box {
  margin: 0 0 15px;
  border: 3px ridge #ddd;
  background: var(--panel);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.24);
}

.section-bar, .result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 5px 10px;
  color: #fff;
  background: var(--purple);
  text-shadow: 1px 1px #000;
}

.section-bar h2, .result-header h3 { margin: 0; font-size: 18px; line-height: 1.15; }
.section-bar > span, .result-header > span { font-family: "Courier New", monospace; font-size: 13px; font-weight: 800; white-space: nowrap; }
.calculator-body { padding: 18px 22px 20px; }

.year-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px 18px;
  padding: 4px 18px 20px;
}

.year-form > label { grid-column: 1 / -1; font-size: 20px; font-weight: 900; }
.select-line { display: flex; align-items: stretch; gap: 14px; }
.select-line select { min-width: 250px; padding: 7px 10px; border: 3px inset #eee; background: #fff; font-size: 20px; font-weight: 800; }

.calculate-button, .result-actions button, .game-buttons button, .touch-controls button, .preset-row button, .poll-form > button {
  border: 3px outset #eee;
  background: #d6d6d6;
  font-weight: 900;
  cursor: pointer;
}

.calculate-button { padding: 7px 18px; color: #d32b82; font-size: 20px; }
.calculate-button:active, .result-actions button:active, .game-buttons button:active, .touch-controls button:active, .preset-row button:active, .poll-form > button:active { border-style: inset; transform: translateY(1px); }
#yearHelp { grid-column: 1 / -1; margin: 0; color: #343434; font-size: 15px; }

.preset-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 4px;
  border-top: 1px dotted #777;
  font-size: 14px;
  font-weight: 700;
}

.preset-row button { min-height: 34px; padding: 3px 10px; color: #000080; font-size: 14px; }
.preset-row button[aria-pressed="true"] { border-style: inset; background: #ffc8e1; }
.result-board { margin: 0; box-shadow: none; }
.result-header { background: var(--green); }

.result-screen {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0;
  min-height: 240px;
  padding: 16px 18px;
  background: #f8f5e8;
}

.main-result { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 22px 10px 8px; border-right: 1px solid #666; }
.main-result span { font-size: 17px; font-weight: 700; }
.main-result strong { color: #d1267b; font-size: clamp(38px, 5vw, 58px); line-height: 1; }
.main-result em { color: #25257d; font-size: 16px; font-style: normal; font-weight: 800; }

.result-facts { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; gap: 0; margin: 0; padding: 7px 0 7px 14px; }
.result-facts div { display: flex; flex-direction: column; justify-content: center; gap: 9px; min-width: 0; padding: 8px 13px; border-right: 1px solid #9b978b; }
.result-facts div:last-child { border-right: 0; }
.result-facts dt { font-size: 14px; font-weight: 700; line-height: 1.3; }
.result-facts dd { margin: 0; color: #1627a8; font-size: 21px; font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.result-screen.is-updating .main-result strong { animation: result-pop 0.65s steps(3, end); }

.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; border-top: 2px ridge #eee; background: #d9d9d9; }
.result-actions button { min-height: 37px; padding: 4px 10px; color: #172699; font-size: 13px; }
#actionStatus { color: #286700; font-size: 14px; font-weight: 800; }

.poll-bar { background: #b90067; }
.poll-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 16px; padding: 15px 18px 17px; }
.poll-form fieldset { min-width: 0; margin: 0; padding: 8px 12px 12px; border: 2px groove #eee; }
.poll-form legend { padding: 0 6px; color: #18258f; font-size: 19px; font-weight: 900; }
.poll-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 7px; }
.poll-options label { display: flex; align-items: center; gap: 6px; min-height: 43px; padding: 6px 9px; border: 2px outset #eee; background: #fffbd3; font-weight: 800; cursor: pointer; }
.poll-options label:has(input:checked) { color: #fff; background: #17269b; }
.poll-options input { width: 19px; height: 19px; accent-color: #d1267b; }
.poll-form > button { min-width: 112px; padding: 7px 16px; color: #b00065; font-size: 18px; }
.poll-form p { grid-column: 1 / -1; margin: 0; color: #363636; font-size: 14px; }
.archive-bar, .time-bar { background: var(--bright-blue); }
.about-bar { background: #25307f; }
.game-bar { background: var(--c64-blue); }
.table-scroll { max-width: 100%; overflow-x: auto; padding: 5px 15px 15px; }

table { width: 100%; min-width: 590px; border-collapse: collapse; background: #fffdf4; font-size: 16px; }
caption { padding: 6px; color: #202b86; font-weight: 800; text-align: left; }
th, td { padding: 8px 10px; border: 1px solid #555; text-align: center; }
th { background: #e9e3cd; }
tbody tr:nth-child(even) { background: #f6eefa; }
tbody tr.is-selected th, tbody tr.is-selected td { background: #f596c3; font-weight: 900; }
.examples-table input { width: 116px; min-height: 38px; padding: 4px 7px; border: 2px inset #eee; background: #fff; font-weight: 700; text-align: right; }
.examples-table td:last-child { color: #15269f; font-weight: 900; }
.price-editor { display: inline-flex; align-items: center; gap: 5px; }
.mobile-cell-label { display: none; }

.device-bar { color: var(--ink); background: var(--orange); text-shadow: none; }
.device-table { table-layout: fixed; }
.device-table th:first-child { width: 15%; white-space: nowrap; }
.device-table th:nth-child(2) { width: 43%; }
.device-table th:nth-child(3),
.device-table th:nth-child(4) { width: 21%; }
.device-table td:nth-child(2) { text-align: left; }
.device-table td:last-child { color: #15269f; font-weight: 900; }
.device-model-copy { display: grid; gap: 2px; min-width: 0; }
.device-model-copy strong { color: #8a0050; font-size: 16px; line-height: 1.2; }
.device-model-copy small { color: #333; font-size: 14px; line-height: 1.35; }
.device-sources { margin-top: 2px; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.device-table tr.is-unavailable { color: #666; }
.device-table tr.is-unavailable .device-model-copy strong { color: #555; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(190px, 0.65fr); gap: 16px; padding: 17px; background: #d4cfbb; }
.c64-computer { padding: 14px; border: 5px outset #e9e2c7; border-radius: 7px 7px 16px 16px; background: #b9ab8a; }
.game-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 7px 10px; border: 3px inset #b7ad94; color: #fff; background: var(--c64-blue); font-family: "Courier New", monospace; font-size: 15px; font-weight: 700; }
.game-status b { color: #fff46b; }
#buggGame { display: block; width: 100%; height: auto; margin-top: 8px; border: 9px inset #8f8369; background: var(--c64-blue); image-rendering: pixelated; touch-action: none; }
.game-buttons, .touch-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 10px; }
.game-buttons button, .touch-controls button { min-width: 135px; padding: 5px 12px; color: #202572; font-size: 14px; }
.game-buttons button:disabled { color: #777; cursor: default; }
.touch-controls button { flex: 1; min-height: 50px; font-size: 16px; user-select: none; -webkit-user-select: none; }
.game-manual { align-self: start; padding: 13px; border: 2px dashed #70684f; color: #17165a; background: #fffbd0; font-family: "Courier New", monospace; }
.game-manual h3 { margin: 0 0 10px; color: #b00065; font-size: 18px; text-align: center; }
.game-manual p { margin: 10px 0; font-size: 14px; font-weight: 700; line-height: 1.45; }
kbd { padding: 1px 5px; border: 2px outset #eee; background: #ddd; font-family: inherit; }
.game-tip { color: #d30071; text-align: center; }

.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; padding: 15px 16px; }
.about-grid > div { padding: 3px 16px; border-right: 1px solid #777; }
.about-grid > div:last-child { border-right: 0; }
.about-grid h3 { margin: 0 0 8px; color: #14269e; font-size: 18px; }
.about-grid p, .source-details { font-size: 15px; font-weight: 500; line-height: 1.5; }
.source-details { margin: 0 16px 17px; padding: 9px 11px; border: 2px inset #eee; background: #fffdf4; }
.source-details summary { color: #17269b; font-weight: 800; cursor: pointer; }
.source-details li { margin: 8px 0; }
.independent-note { margin: 0 16px 17px; color: #555; font-size: 13px; }

.webmaster-box { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 12px 17px 18px; background: #fffbd2; }
.webmaster-box p { margin: 0; font-size: 15px; }
.mailbox { display: block; font-size: 44px; animation: mailbox-flag 0.8s steps(2, end) infinite; }
.rainbow-rule {
  grid-column: 1 / -1;
  height: 6px;
  background: repeating-linear-gradient(90deg, #ff1f87 0 28px, #fff125 28px 56px, #21c950 56px 84px, #1332ae 84px 112px);
  background-size: 112px 100%;
  animation: rainbow-cycle 2s steps(4, end) infinite;
}

.browser-statusbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 46px; padding: 8px 14px; border-top: 2px ridge #999; color: #67ff19; background: #171717; font-family: "Courier New", monospace; font-size: 13px; }
.browser-statusbar span:last-child { color: #fff33b; }

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  max-width: min(390px, calc(100vw - 36px));
  padding: 11px 15px;
  border: 3px outset #eee;
  color: #fff;
  background: #17268f;
  font-weight: 800;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.blink { animation: old-web-blink 0.9s steps(1, end) infinite; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; scroll-behavior: auto !important; }
.motion-paused .construction-gif { display: none; }
.motion-paused .construction-still { display: block; }

@keyframes old-web-blink { 0%, 48% { visibility: visible; } 49%, 100% { visibility: hidden; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes packet-jitter { 0%, 80% { transform: translateX(0); } 81% { transform: translateX(-2px); } 100% { transform: translateX(2px); } }
@keyframes burst-jump { from { transform: rotate(4deg) scale(1); } to { transform: rotate(7deg) scale(1.04); } }
@keyframes result-pop { 0% { transform: scale(0.96); color: #1326a5; } 100% { transform: scale(1); color: #d1267b; } }
@keyframes mailbox-flag { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes rainbow-cycle { from { background-position: 0 0; } to { background-position: -112px 0; } }
@keyframes sidebar-wiggle {
  0% { transform: translateX(-3px) rotate(-2.5deg); }
  50% { transform: translateY(-2px) rotate(1deg); }
  100% { transform: translateX(3px) rotate(2.5deg); }
}

@media (min-width: 761px) and (max-width: 1044px) {
  .masthead { grid-template-columns: 190px minmax(0, 1fr); gap: 13px; padding-inline: 13px; }
  .hero-product { width: 170px; }
  .burst { right: -6px; width: 74px; height: 74px; }
  .burst strong { font-size: 22px; }
  .burst small { font-size: 10px; }
  .burst em { font-size: 12px; }
  .hero-copy { grid-template-columns: minmax(330px, 1.25fr) minmax(190px, 0.75fr); column-gap: 16px; }
  .hero-brand { width: 100%; padding-inline: 0; }
  .brand-logo { width: min(390px, 100%); }
  .hero-copy h1 { width: 100%; padding-inline: 11px; }
  .hero-copy h1 span { font-size: clamp(25px, 3.4vw, 34px); }
  .hero-copy p { width: min(290px, 100%); min-height: 170px; padding: 31px 26px; font-size: 19px; }
  .hero-copy p span { min-height: 108px; }
}

@media (max-width: 980px) {
  .masthead { grid-template-columns: 190px minmax(0, 1fr); gap: 13px; padding-inline: 13px; }
  .hero-product { width: 170px; }
  .burst { right: -6px; width: 74px; height: 74px; }
  .burst strong { font-size: 22px; }
  .burst small { font-size: 10px; }
  .burst em { font-size: 12px; }
  .hero-copy { grid-template-columns: minmax(330px, 1.25fr) minmax(190px, 0.75fr); column-gap: 16px; }
  .hero-brand { width: 100%; padding-inline: 0; }
  .brand-logo { width: min(390px, 100%); }
  .hero-copy h1 { width: 100%; padding-inline: 11px; }
  .hero-copy h1 span { font-size: clamp(25px, 3.4vw, 34px); }
  .hero-copy p { width: min(290px, 100%); min-height: 170px; padding: 31px 26px; font-size: 19px; }
  .hero-copy p span { min-height: 108px; }
  .page-columns { grid-template-columns: 190px minmax(0, 1fr); gap: 13px; padding-inline: 13px; }
  .result-screen, .game-layout { grid-template-columns: 1fr; }
  .main-result { border-right: 0; border-bottom: 1px solid #777; }
  .poll-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .network-strip { display: block; padding: 5px; text-align: center; }
  #connectionLabel { display: block; margin-top: 2px; }
  .construction-zone { grid-template-columns: 110px 1fr; padding-inline: 10px; }
  .construction-gif, .construction-still { width: 100px; height: 75px; }
  .motion-button { grid-column: 1 / -1; justify-self: center; }
  .construction-zone strong { font-size: 18px; }
  .construction-zone span { font-size: 12px; }
  .masthead { grid-template-columns: 1fr; gap: 18px; padding: 18px 10px; }
  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    width: min(360px, 100%);
    justify-self: center;
  }
  .hero-brand { grid-column: 1; grid-row: 1; justify-items: center; width: 100%; padding: 8px 12px 3px; }
  .hero-brand::before { inset: -7px -14px 14px; }
  .hero-brand::after { inset: 8px 1px 8px; }
  .brand-logo { width: min(330px, 90%); }
  .hero-copy h1 { width: min(350px, 100%); padding: 6px 9px 8px; }
  .hero-copy h1 span { font-size: clamp(22px, 7.2vw, 30px); }
  .hero-copy p { grid-column: 1; grid-row: 2; justify-self: center; width: min(300px, 100%); min-height: 145px; padding: 27px 30px; font-size: 18px; }
  .hero-copy p span { min-height: 91px; }
  .hero-product { grid-column: 1; grid-row: 2; width: min(205px, 100%); max-width: 205px; margin: 0 auto; justify-self: center; }
  .burst { right: -6px; width: 80px; height: 80px; }
  .burst strong { font-size: 24px; }
  .page-columns { grid-template-columns: 1fr; padding-inline: 10px; }
  .directory nav { display: grid; grid-template-columns: 1fr 1fr; }
  .didyouknow { display: grid; grid-template-columns: 1fr 100px; gap: 7px 12px; align-items: center; }
  .didyouknow h3 { grid-column: 1 / -1; }
  .didyouknow img { height: 80px; margin: 0; }
  .year-form { grid-template-columns: 1fr; padding-inline: 0; }
  .select-line { display: grid; grid-template-columns: 1fr; }
  .select-line select { width: 100%; min-width: 0; }
  .result-facts { grid-template-columns: 1fr; padding-left: 0; }
  .result-facts div, .result-facts div:last-child { border-right: 0; border-bottom: 1px dotted #8a8479; }
  .poll-form { grid-template-columns: 1fr; }
  .poll-form > button { justify-self: start; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid > div { padding: 10px 5px; border-right: 0; border-bottom: 1px dotted #777; }
  .about-grid > div:last-child { border-bottom: 0; }
  .browser-statusbar { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 680px) {
  .table-scroll { overflow-x: visible; padding: 5px 10px 15px; }
  .responsive-table { min-width: 0; border-collapse: separate; background: transparent; }
  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .responsive-table tbody { display: grid; gap: 11px; }
  .responsive-table tbody tr {
    display: grid;
    border: 3px outset #eee;
    background: #fffdf4;
    box-shadow: 2px 2px 0 #888;
  }
  .responsive-table tbody tr:nth-child(even) { background: #f6eefa; }
  .responsive-table tbody th,
  .responsive-table tbody td { border: 0; }
  .responsive-table tbody th {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    padding: 9px 11px;
    border-bottom: 1px solid #777;
    color: #111;
    background: #e9e3cd;
    font-size: 17px;
    text-align: left;
  }
  .responsive-table tbody td {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    align-items: center;
    gap: 12px;
    min-height: 43px;
    padding: 7px 10px;
    border-bottom: 1px dotted #999;
    text-align: right;
  }
  .responsive-table tbody td:last-child { border-bottom: 0; }
  .responsive-table .mobile-cell-label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
  }
  .responsive-table .table-value,
  .responsive-table .price-editor { justify-self: end; }
  .device-table { table-layout: auto; }
  .device-table tbody th:first-child { width: 100%; white-space: normal; }
  .device-table tbody td:first-of-type {
    grid-template-columns: minmax(100px, 0.65fr) minmax(0, 1.35fr);
    align-items: start;
  }
  .responsive-table .device-model-copy { justify-self: end; max-width: 100%; text-align: right; }
  .responsive-table .device-sources { text-align: right; }
  .responsive-table tbody tr.is-selected {
    border-color: #df4e95;
    box-shadow: 2px 2px 0 #8e2057;
  }
  .responsive-table tbody tr.is-selected th,
  .responsive-table tbody tr.is-selected td { background: #f596c3; }
  .examples-table input { width: min(106px, 30vw); }
}

@media (max-width: 430px) {
  .hero-brand { padding-inline: 8px; }
  .hero-copy h1 { padding-inline: 7px; }
  .hero-copy h1 span { font-size: clamp(20px, 7.1vw, 25px); }
  .hero-copy p { min-height: 138px; padding: 25px 27px; font-size: 16px; }
  .hero-copy p span { min-height: 88px; }
  .burst { top: -3px; right: -5px; width: 74px; height: 74px; }
  .burst small { font-size: 11px; }
  .burst strong { font-size: 24px; }
  .burst em { font-size: 13px; }
  .directory nav { grid-template-columns: 1fr; }
  .calculator-body, .result-screen, .game-layout { padding: 12px; }
  .poll-options { grid-template-columns: 1fr; }
  .game-status { font-size: 12px; }
  .touch-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .game-buttons button, .touch-controls button { min-width: 0; }
}

@media (forced-colors: active) {
  .hero-brand::before,
  .hero-brand::after,
  .hero-copy p::before,
  .hero-copy p::after { display: none; }
  .hero-copy h1,
  .hero-copy p { clip-path: none; border: 2px solid CanvasText; filter: none; }
  .hero-copy p { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .blink { visibility: visible !important; }
  .didyouknow img { transform: none; }
  .construction-gif { display: none; }
  .construction-still { display: block; }
}

@media print {
  body { background: #fff; }
  .network-strip, .construction-zone, .directory, .result-actions, .game-panel, .webmaster-box, .browser-statusbar, .toast { display: none !important; }
  .browser-shell, .panel, .module { max-width: none; border: 1px solid #444; box-shadow: none; }
  .page-columns { display: block; padding: 0; }
}
