:root {
  --brand-red: #e8000d;
  --brand-blue: #0051ba;
  --brand-wheat: #f2a900;
  --brand-navy: #003459;
  --base-white: #ffffff;
  --navy-8: rgba(0, 52, 89, 0.08);
  --navy-12: rgba(0, 52, 89, 0.12);
  --navy-16: rgba(0, 52, 89, 0.16);
  --text-subtle: rgba(0, 52, 89, 0.72);
  --r-sm: 10px;
  --r-md: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Geist", "Geist Sans", "Inter", system-ui, -apple-system, sans-serif;
  color: var(--brand-navy);
  background: #eef3f8;
  min-height: 100vh;
  padding-top: 0;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 12% 8%, rgba(0, 81, 186, 0.14), transparent 70%),
    radial-gradient(800px 380px at 86% 14%, rgba(0, 52, 89, 0.1), transparent 72%),
    radial-gradient(700px 320px at 50% 100%, rgba(0, 81, 186, 0.08), transparent 74%);
  filter: blur(22px);
  z-index: -1;
}

.app {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  background: var(--base-white);
  display: flex;
  box-shadow: 0 18px 44px rgba(0, 52, 89, 0.12);
}

.sidebar {
  width: 264px;
  border-right: 1px solid var(--navy-12);
  background: var(--base-white);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar__brand {
  padding: 16px;
  border-bottom: 1px solid var(--navy-12);
}

.sidebar__logo {
  height: 40px;
  width: auto;
}

.nav-overview {
  border: 0;
  background: transparent;
  color: var(--brand-navy);
  text-align: left;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  padding: 0;
  margin: 12px 0 2px 26px;
  width: fit-content;
  cursor: pointer;
  transition: color 140ms ease;
}

.nav-overview:hover {
  color: var(--brand-blue);
}

.sidebar__progress span {
  display: block;
  height: 38px;
  width: 100%;
  background: var(--brand-blue);
  border-radius: 999px;
  transition: transform 180ms ease, height 180ms ease;
}

.mobile-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-blue);
  transition: width 180ms ease;
}

.sidebar__nav {
  position: relative;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__progress {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 4px;
  height: calc(100% - 28px);
  background: var(--navy-8);
  border-radius: 999px;
}

.nav-btn,
.mobile-pill,
.nav-sub {
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--navy-16);
  background: var(--base-white);
  color: var(--brand-navy);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  padding: 0 12px;
  cursor: pointer;
}

button {
  pointer-events: auto;
}

.swatch__copy {
  pointer-events: auto;
}

.nav-btn {
  text-align: left;
  margin-left: 12px;
}

.nav-btn.active,
.mobile-pill.active,
.nav-sub.active {
  color: var(--brand-blue);
  background: rgba(0, 81, 186, 0.1);
  border-color: rgba(0, 81, 186, 0.3);
}

.nav-sub {
  height: auto;
  font-size: 12px;
  line-height: 16px;
  border-radius: 0;
  margin-left: 28px;
  text-align: left;
  color: var(--text-subtle);
  border: 0;
  background: transparent;
  padding: 4px 0;
  min-height: 0;
  width: calc(100% - 28px);
}

.nav-sub:hover {
  color: var(--brand-navy);
}

.nav-sub.active {
  background: transparent;
  border: 0;
  color: var(--brand-blue);
}

.download-btn {
  pointer-events: none;
}

.nav-btn:focus-visible,
.mobile-pill:focus-visible,
.download-btn:focus-visible {
  outline: 3px solid var(--brand-wheat);
  outline-offset: 2px;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(0, 52, 89, 0.01) 100%);
}

.mobile-header {
  display: none;
}

.panel {
  border: 1px solid var(--navy-12);
  border-radius: var(--r-md);
  background: var(--base-white);
  padding: 18px;
  box-shadow: 0 4px 14px rgba(0, 52, 89, 0.08);
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 36px; font-weight: 700; }
h2 { font-size: 22px; line-height: 28px; font-weight: 500; }
h3 { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.01em; }
p { font-size: 16px; line-height: 24px; color: var(--text-subtle); }

#overview {
  padding: 34px 42px;
  min-height: 220px;
}

.overview-layout {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.overview-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 620px;
}

.overview-mark {
  flex-shrink: 0;
  width: min(38%, 420px);
  min-width: 240px;
  height: auto;
  object-fit: contain;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 460px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.download-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-item {
  border: 1px solid var(--navy-12);
  border-radius: var(--r-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0, 52, 89, 0.07);
}

.download-item__thumb {
  width: 140px;
  height: 84px;
  border: 1px solid var(--navy-12);
  border-radius: 8px;
  background: var(--base-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}

.download-item__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.download-item__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 84px;
}

.download-item__copy h3 {
  line-height: 18px;
}

.download-item__copy p {
  line-height: 18px;
}

.download-btn {
  border: none;
  background: var(--brand-blue);
  color: var(--base-white);
  border-radius: var(--r-sm);
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.color-grid {
  margin-top: 12px;
}

.desktop-colors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-colors {
  display: none;
}

.swatch {
  height: 132px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.red { background: var(--brand-red); }
.blue { background: var(--brand-blue); }
.wheat { background: var(--brand-wheat); }
.navy { background: var(--brand-navy); }

.swatch__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-navy);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.swatch:hover .swatch__overlay,
.swatch:focus-within .swatch__overlay,
.swatch:focus .swatch__overlay {
  opacity: 1;
  transform: translateY(0);
}

.swatch__name {
  color: currentColor;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
}

.swatch__codes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.swatch__copy {
  position: relative;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.82);
  color: currentColor;
  border-radius: 8px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  padding: 8px 10px;
  min-height: 34px;
  cursor: pointer;
}

.swatch__copy:hover {
  background: #ffffff;
}

.swatch__copy.is-copied::after {
  content: "Copied";
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 14px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: currentColor;
  border: 1px solid currentColor;
  box-shadow: 0 2px 8px rgba(0, 52, 89, 0.18);
  opacity: 0;
  animation: copied-pop 900ms ease forwards;
  z-index: 2;
}

.swatch.red .swatch__overlay { color: #e8000d; }
.swatch.blue .swatch__overlay { color: #0051ba; }
.swatch.wheat .swatch__overlay { color: #a87500; }
.swatch.navy .swatch__overlay { color: #003459; }

.swatch.wheat .swatch__copy {
  background: rgba(255, 255, 255, 0.9);
}

@keyframes copied-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
}

.placeholder {
  background: linear-gradient(157deg, rgba(0, 52, 89, 0.06), rgba(0, 52, 89, 0.14));
}

.template-thumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
}

.template-thumb__mini {
  display: block;
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-radius: 4px;
  flex-shrink: 0;
}

.template-thumb__line {
  display: block;
  height: 28px;
  flex: 1;
  background: #ffffff;
  border-radius: 4px;
}

.template-thumb--red { background: var(--brand-red); }
.template-thumb--blue { background: var(--brand-blue); }
.template-thumb--wheat { background: var(--brand-wheat); }
.template-thumb--navy { background: var(--brand-navy); }

.template-item .download-item__copy {
  align-items: flex-start;
  text-align: left;
}

.request-placeholder {
  margin-top: 12px;
  min-height: 160px;
  border: 1px solid var(--navy-12);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 10px rgba(0, 52, 89, 0.06);
}

.footer-note {
  margin-top: auto;
  border-top: 1px solid var(--navy-12);
  padding: 12px 4px 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-subtle);
}

@media (max-width: 980px) {
  .app {
    border: none;
    max-width: 390px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 52, 89, 0.14);
    margin: 8px auto;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 12px;
    gap: 10px;
  }

  .mobile-header {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--navy-12);
    border-radius: var(--r-sm);
    background: var(--base-white);
    position: sticky;
    top: 8px;
    z-index: 5;
  }

  .mobile-header__logo {
    height: 30px;
    width: auto;
    margin: 12px auto;
  }

  .mobile-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 12px 10px;
    scrollbar-width: none;
  }

  .mobile-pills::-webkit-scrollbar {
    display: none;
  }

  .mobile-pill {
    height: 32px;
    white-space: nowrap;
    border-radius: 10px;
  }

  .mobile-progress {
    height: 4px;
    background: var(--navy-8);
  }

  .panel {
    padding: 12px;
    border-radius: 10px;
  }

  h1 { font-size: 22px; line-height: 28px; }
  p { font-size: 14px; line-height: 20px; }

  .hero-image {
    min-height: 100px;
    padding: 10px;
  }

  .hero-image img {
    max-width: 250px;
  }

  #overview {
    padding: 16px;
    min-height: 0;
  }

  .overview-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .overview-copy {
    max-width: none;
  }

  .overview-mark {
    width: 100%;
    min-width: 0;
    max-width: 250px;
    align-self: center;
  }

  .download-item {
    border-radius: 8px;
    padding: 10px;
    gap: 10px;
  }

  .download-item__thumb {
    width: 78px;
    height: 54px;
    padding: 6px;
  }

  .download-item__copy {
    gap: 4px;
    align-items: center;
    text-align: center;
    min-height: 54px;
  }

  .download-item__copy h3 {
    font-size: 13px;
    line-height: 16px;
  }

  .download-item__copy p {
    font-size: 12px;
    line-height: 16px;
  }

  .download-btn {
    padding: 8px 12px;
    height: auto;
    border-radius: 10px;
    font-size: 11px;
  }

  .desktop-colors {
    display: none;
  }

  .mobile-colors {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .mobile-colors .swatch {
    width: 100%;
    height: 120px;
  }

  .template-item .download-item {
    flex-direction: row;
  }

  .footer-note {
    padding-top: 8px;
  }
}
