:root {
  color-scheme: light;
  --cream: #fffbef;
  --cream-deep: #f6eedc;
  --orange: #f47736;
  --orange-dark: #d95621;
  --navy: #143965;
  --sky: #79d4f5;
  --paper-shadow: 0 18px 54px rgba(20, 57, 101, 0.16), 0 3px 10px rgba(20, 57, 101, 0.1);
  --header-height: 94px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--cream);
  font-family: "Arial Narrow", "Avenir Next Condensed", "Roboto Condensed", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--cream);
  background: var(--navy);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: var(--header-height);
  border-bottom: 3px solid var(--sky);
  background: rgba(255, 251, 239, 0.96);
  backdrop-filter: blur(14px);
}

.site-nav {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1440px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
}

.nav-link,
.order-link {
  width: max-content;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-link {
  justify-self: start;
}

.nav-link:hover {
  color: var(--orange-dark);
}

.brand-link {
  display: grid;
  justify-self: center;
  place-items: center;
}

.brand-logo {
  display: block;
  width: 142px;
  height: 72px;
  object-fit: contain;
}

.order-link {
  justify-self: end;
  padding: 16px 20px 15px;
  color: #fffdf5;
  background: var(--orange);
  box-shadow: 4px 4px 0 var(--navy);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.order-link:hover {
  background: var(--orange-dark);
  box-shadow: 2px 2px 0 var(--navy);
  transform: translate(2px, 2px);
}

.menu-main {
  min-width: 0;
  min-height: calc(100vh - var(--header-height));
}

.viewer-toolbar {
  position: sticky;
  z-index: 15;
  top: var(--header-height);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid rgba(20, 57, 101, 0.18);
  background: rgba(246, 238, 220, 0.94);
  backdrop-filter: blur(12px);
}

.toolbar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  align-items: baseline;
}

.eyebrow {
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-summary {
  color: rgba(20, 57, 101, 0.74);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.toolbar-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.tool-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(20, 57, 101, 0.32);
  border-radius: 0;
  color: var(--navy);
  background: var(--cream);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 36px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.tool-button:hover:not(:disabled) {
  border-color: var(--navy);
  background: #fff;
}

.tool-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 34px;
}

.zoom-level {
  min-width: 48px;
  color: rgba(20, 57, 101, 0.74);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
}

.status-card,
.error-card,
.noscript-card {
  width: min(520px, calc(100% - 40px));
  margin: clamp(50px, 12vh, 130px) auto;
  padding: 34px;
  border: 2px solid var(--sky);
  color: var(--navy);
  background: #fffdf7;
  text-align: center;
  box-shadow: 8px 8px 0 rgba(121, 212, 245, 0.5);
}

.status-card p,
.error-card p {
  margin: 14px 0 0;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.loader {
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border: 4px solid rgba(121, 212, 245, 0.5);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.progress-track {
  overflow: hidden;
  width: min(320px, 100%);
  height: 5px;
  margin: 22px auto 0;
  background: rgba(20, 57, 101, 0.12);
}

.progress-bar {
  display: block;
  width: 3%;
  height: 100%;
  background: var(--orange);
  transition: width 180ms ease;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.error-card h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-transform: uppercase;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  min-width: 130px;
  padding: 12px 18px;
  border: 2px solid var(--navy);
  color: var(--cream);
  background: var(--navy);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.secondary-button {
  color: var(--navy);
  background: transparent;
}

.pdf-pages {
  overflow-x: auto;
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: clamp(18px, 3vw, 38px);
  align-items: start;
  min-height: 50vh;
  padding: clamp(20px, 4vw, 52px) clamp(10px, 3vw, 48px) clamp(36px, 7vw, 88px);
  background:
    linear-gradient(90deg, transparent 0 22px, rgba(121, 212, 245, 0.18) 22px 24px, transparent 24px calc(100% - 24px), rgba(121, 212, 245, 0.18) calc(100% - 24px) calc(100% - 22px), transparent calc(100% - 22px)),
    var(--cream);
}

.pdf-page-shell {
  position: relative;
  overflow: hidden;
  justify-self: center;
  flex: none;
  border-radius: 2px;
  background: var(--cream);
  box-shadow: var(--paper-shadow);
}

.pdf-page-shell::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(20, 57, 101, 0.11);
  content: "";
  pointer-events: none;
}

.pdf-page-canvas {
  display: block;
  max-width: none;
  background: var(--cream);
}

.site-footer {
  padding: 24px max(24px, calc((100vw - 1180px) / 2)) 44px;
  color: var(--navy);
  background: var(--cream);
  text-align: center;
}

.footer-divider {
  display: block;
  width: min(860px, 84vw);
  height: auto;
  margin: 0 auto 28px;
}

.site-footer p {
  margin: 0 0 9px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--orange-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  :root {
    --header-height: 78px;
  }

  .site-nav {
    width: calc(100% - 24px);
  }

  .brand-logo {
    width: 104px;
    height: 58px;
  }

  .nav-link,
  .order-link {
    font-size: 0.67rem;
    letter-spacing: 0.09em;
  }

  .order-link {
    padding: 12px 10px 11px;
    box-shadow: 3px 3px 0 var(--navy);
  }

  .viewer-toolbar {
    position: relative;
    top: auto;
    display: grid;
    gap: 10px;
    padding: 12px 10px 13px;
  }

  .toolbar-summary {
    justify-content: center;
  }

  .toolbar-actions {
    overflow-x: auto;
    justify-content: center;
    padding: 2px;
  }

  .tool-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.68rem;
    line-height: 34px;
  }

  .icon-button {
    flex: 0 0 36px;
    width: 36px;
    padding: 0;
    font-size: 1.25rem;
  }

  .print-button {
    display: none;
  }

  .pdf-pages {
    gap: 18px;
    padding: 18px 8px 42px;
    background: var(--cream);
  }

  .pdf-page-shell {
    box-shadow: 0 8px 26px rgba(20, 57, 101, 0.13);
  }

  .site-footer {
    padding: 18px 20px 34px;
  }
}

@media (max-width: 430px) {
  .zoom-level {
    display: none;
  }

  .toolbar-actions {
    gap: 5px;
  }

  .site-footer p {
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

  .loader {
    animation-duration: 1.8s;
  }
}

@media print {
  @page {
    size: auto;
    margin: 0;
  }

  body,
  .pdf-pages {
    background: #fff;
  }

  .skip-link,
  .site-header,
  .viewer-toolbar,
  .status-card,
  .error-card,
  .site-footer {
    display: none !important;
  }

  .pdf-pages {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .pdf-page-shell {
    width: 100% !important;
    height: auto !important;
    margin: 0;
    break-after: page;
    box-shadow: none;
  }

  .pdf-page-canvas {
    width: 100% !important;
    height: auto !important;
  }
}
