:root {
  --green: #153f2f;
  --green-strong: #0d2f22;
  --red: #a8322d;
  --paper: #fffdf8;
  --ink: #1d241f;
  --line: rgba(21, 63, 47, 0.16);
  --shadow: 0 8px 24px rgba(15, 36, 27, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: #e8ece9;
  font-family: "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid rgba(194, 154, 74, 0.85);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: -80px;
  left: 16px;
  padding: 10px 14px;
  color: #fff;
  background: var(--green);
  border-radius: 6px;
}

.skip-link:focus {
  top: 10px;
}

.topbar {
  position: relative;
  z-index: 10;
  min-height: 76px;
  padding: 8px clamp(12px, 2.5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--green);
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 150px;
  height: 58px;
  object-fit: contain;
}

.brand span {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.action,
.icon-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.action {
  padding: 9px 13px;
}

.action-secondary {
  color: var(--green);
  background: #fff;
  border-color: var(--line);
}

.action-secondary:hover {
  background: #eef4f0;
  border-color: rgba(21, 63, 47, 0.3);
}

.action-primary {
  color: #fff;
  background: var(--red);
}

.action-primary:hover {
  background: #8f2925;
}

.icon-action {
  width: 42px;
  padding: 0;
  color: #fff;
  background: var(--green);
}

.icon-action:hover {
  background: var(--green-strong);
}

.action svg,
.icon-action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.catalog-viewer {
  width: 100%;
  height: calc(100dvh - 76px);
  min-height: 420px;
  background: #dce2de;
}

.catalog-viewer iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #dce2de;
}

.fallback {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(520px, calc(100% - 32px));
  margin: 0;
  padding: 18px;
  transform: translate(-50%, -50%);
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.fallback a {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 760px) {
  .topbar {
    min-height: 64px;
    gap: 10px;
    padding: 6px 10px;
  }

  .brand {
    gap: 0;
  }

  .brand img {
    width: 112px;
    height: 48px;
  }

  .brand span,
  .action-primary span {
    display: none;
  }

  .action {
    min-height: 40px;
    padding: 8px 10px;
  }

  .icon-action {
    width: 40px;
    min-height: 40px;
  }

  .catalog-viewer {
    height: calc(100dvh - 64px);
    min-height: 300px;
  }
}

@media (max-width: 460px) {
  .action-secondary span {
    display: none;
  }

  .action-secondary {
    width: 40px;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action,
  .icon-action {
    transition: none;
  }
}
