:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --surface: #fffdf8;
  --ink: #20231f;
  --muted: #62675f;
  --line: #ded7c9;
  --olive: #5f6f45;
  --olive-dark: #324021;
  --lake: #2f7180;
  --clay: #b5663b;
  --shadow: 0 18px 45px rgba(41, 45, 35, 0.12);
  --anchor-offset: 96px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: 86px;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(248, 245, 238, 0.92);
  border-bottom: 1px solid rgba(222, 215, 201, 0.78);
  backdrop-filter: blur(18px);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--olive-dark);
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand img {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.language-picker {
  position: relative;
  display: inline-grid;
  align-items: center;
}

.language-picker select {
  min-width: 86px;
  height: 42px;
  padding: 0 34px 0 12px;
  color: var(--olive-dark);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(41, 45, 35, 0.08);
  cursor: pointer;
  appearance: none;
}

.language-picker::after {
  position: absolute;
  right: 12px;
  color: var(--lake);
  font-size: 0.68rem;
  pointer-events: none;
  content: "▾";
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--olive-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(41, 45, 35, 0.08);
  cursor: pointer;
}

main {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 28px 18px 18px;
}

.hero-copy {
  padding: 18px 0 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--olive-dark);
  font-size: clamp(2.45rem, 14vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 42rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-badge {
  display: grid;
  place-items: center;
  min-height: 170px;
  background: linear-gradient(135deg, rgba(95, 111, 69, 0.14), rgba(47, 113, 128, 0.16));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-badge img {
  width: min(52vw, 210px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 14px 25px rgba(41, 45, 35, 0.16));
}

.search-panel {
  padding: 10px 18px 6px;
}

.search-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--olive-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(41, 45, 35, 0.06);
}

.search-box span {
  color: var(--lake);
  font-size: 1.3rem;
}

.search-box input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 20px;
}

.quick-action {
  display: grid;
  min-height: 88px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  color: var(--olive-dark);
  text-align: center;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(41, 45, 35, 0.06);
}

.quick-action span:first-child {
  font-size: 1.45rem;
}

.quick-action span:last-child {
  font-size: 0.86rem;
  font-weight: 800;
}

.content-sections {
  display: grid;
  gap: 24px;
  padding: 4px 18px 28px;
}

.section-block {
  scroll-margin-top: var(--anchor-offset);
}

.section-header {
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  color: var(--olive-dark);
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.card-grid {
  display: grid;
  gap: 10px;
}

.info-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  scroll-margin-top: var(--anchor-offset);
  width: 100%;
  min-height: 96px;
  padding: 16px;
  color: inherit;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(41, 45, 35, 0.07);
  cursor: pointer;
}

.info-card h3 {
  margin: 0;
  color: var(--olive-dark);
  font-size: 1.05rem;
  line-height: 1.2;
}

.info-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  max-width: 124px;
  padding: 5px 8px;
  color: var(--olive-dark);
  background: #edf0e5;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.info-card[data-status*="Da"] .status-pill,
.detail .status-pill[data-status*="Da"] {
  color: #733d22;
  background: #f8e7d8;
}

dialog {
  width: min(640px, calc(100% - 28px));
  max-height: min(760px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

dialog::backdrop {
  background: rgba(32, 35, 31, 0.42);
  backdrop-filter: blur(4px);
}

.detail {
  position: relative;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.detail h2 {
  margin: 14px 48px 8px 0;
  color: var(--olive-dark);
  font-size: 1.7rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.detail > p:not(.status-pill) {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

#detailBody {
  display: grid;
  gap: 10px;
}

#detailBody p {
  margin: 0;
  line-height: 1.58;
}

.detail-images {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.detail-images[hidden],
.detail-images:empty {
  display: none;
}

.detail-images figure {
  margin: 0;
  overflow: hidden;
  background: #f2eee5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-images figure[data-variant="icon"] {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px;
}

.detail-images img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.detail-images figure[data-variant="icon"] img {
  width: auto;
  max-width: 88px;
  max-height: 88px;
  margin: 0 auto;
  object-fit: contain;
}

.detail-images figcaption {
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.detail-images figure[data-variant="icon"] figcaption {
  padding: 0;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-links:empty,
.detail-links[hidden] {
  display: none;
}

.detail-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  background: var(--lake);
  border-radius: 8px;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: grid;
  min-height: 44px;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  border-radius: 6px;
}

.bottom-nav a:focus,
.bottom-nav a:hover {
  color: var(--olive-dark);
  background: #edf0e5;
  outline: 0;
}

.is-hidden {
  display: none;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (min-width: 760px) {
  body {
    padding-bottom: 28px;
  }

  .topbar {
    padding-inline: max(24px, calc((100vw - 1120px) / 2 + 24px));
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    align-items: center;
    min-height: 420px;
    padding: 58px 24px 28px;
  }

  h1 {
    max-width: 12ch;
  }

  .search-panel,
  .quick-actions,
  .content-sections {
    padding-inline: 24px;
  }

  .quick-actions {
    grid-template-columns: repeat(3, 180px);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    right: 24px;
    bottom: 24px;
    left: auto;
    width: 430px;
  }
}

@media (min-width: 1040px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
