:root {
  --ink: #0f1d2d;
  --muted: #64748a;
  --green: #008b00;
  --green-deep: #036b18;
  --steel: #6e7b8b;
  --midnight: #191970;
  --surface: #f3f1ec;
  --line: rgba(25, 25, 112, 0.08);
  --shadow: 0 28px 80px rgba(15, 29, 45, 0.12);
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 139, 0, 0.08), transparent 28%),
    radial-gradient(circle at right 20%, rgba(110, 123, 139, 0.12), transparent 26%),
    linear-gradient(180deg, #f7f5f1 0%, var(--surface) 100%);
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
}

.landing-page {
  position: relative;
  min-height: 100vh;
  padding: 0.75rem;
}

.landing-page.profile-overlay-open .browser-shell {
  filter: blur(2px) saturate(0.88);
}

.ambient {
  position: absolute;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-left {
  top: 4rem;
  left: -4rem;
  background: rgba(0, 139, 0, 0.14);
}

.ambient-right {
  right: -5rem;
  bottom: 2rem;
  background: rgba(110, 123, 139, 0.18);
}

.frame-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 1.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-shell {
  width: min(1120px, 100%);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.browser-topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 250, 0.92));
  border-bottom: 1px solid rgba(25, 25, 112, 0.06);
  padding: 0.85rem 1rem 1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}

.brand-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--green);
  background: rgba(0, 139, 0, 0.08);
  border: 1px solid rgba(0, 139, 0, 0.18);
}

.nav-links,
.nav-actions,
.hero-actions,
.flag-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-links {
  display: none;
}

.nav-links.is-open {
  display: flex;
  width: 100%;
  order: 3;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--green-deep);
  text-decoration: none;
}

.nav-links.is-open a {
  border: 1px solid rgba(25, 25, 112, 0.09);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.icon-button,
.menu-button {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
}

.icon-button {
  border: 1px solid rgba(25, 25, 112, 0.08);
  background: #fff;
  color: var(--ink);
}

.menu-button {
  border: 1px solid rgba(0, 139, 0, 0.16);
  background: rgba(0, 139, 0, 0.06);
  color: var(--green-deep);
}

.launch-button,
.primary-button,
.secondary-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.launch-button,
.primary-button {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 25px rgba(0, 139, 0, 0.18);
}

.secondary-button {
  border: 1px solid rgba(0, 139, 0, 0.24);
  background: #fff;
  color: var(--green);
}

.launch-button:hover,
.launch-button:focus,
.primary-button:hover,
.primary-button:focus {
  color: #fff;
  text-decoration: none;
}

.secondary-button:hover,
.secondary-button:focus {
  color: var(--green-deep);
  text-decoration: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: center;
  padding: 1.25rem 1rem 1.1rem;
}

.hero-copy h1 {
  margin: 0.4rem 0 0.8rem;
  font-size: clamp(2.3rem, 11vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.hero-actions {
  margin-top: 1.35rem;
  flex-direction: column;
  align-items: stretch;
}

.hero-overline {
  margin: 0;
  color: var(--green-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.67rem;
  font-weight: 700;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(25, 25, 112, 0.04);
  border: 1px solid rgba(25, 25, 112, 0.1);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.hero-badge i {
  color: var(--green);
  font-size: 0.65rem;
}

.features-section {
  margin: 0 1rem 1rem;
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 29, 45, 0.06);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.feature-step {
  display: grid;
  grid-template-columns: minmax(130px, 42%) minmax(0, 1fr);
  grid-template-areas: "image copy";
  align-items: center;
  column-gap: 0.85rem;
  overflow: hidden;
  padding: 0.75rem;
  text-align: left;
}

.feature-image {
  display: block;
  grid-area: image;
  width: 100%;
  aspect-ratio: 1.04 / 1;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid rgba(25, 25, 112, 0.08);
  background: linear-gradient(180deg, #f8fafb 0%, #edf2f4 100%);
  padding: 0.25rem;
}

.feature-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
}

.feature-copy h3 {
  margin: 0;
}

.feature-copy p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.map-window {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 139, 0, 0.15);
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(15, 29, 45, 0.12);
  overflow: hidden;
}

.map-window-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.75rem;
  background: linear-gradient(180deg, rgba(237, 243, 236, 0.8), rgba(255, 255, 255, 0.98));
  border-bottom: 1px solid rgba(0, 139, 0, 0.08);
}

.tab {
  width: 1.45rem;
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(110, 123, 139, 0.28);
}

.tab.active {
  width: 2.6rem;
  background: var(--green);
}

.map-window-pill {
  margin-left: auto;
  min-height: 1.55rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: rgba(0, 139, 0, 0.08);
  color: var(--green-deep);
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
}

.map-window-body {
  display: grid;
  grid-template-columns: 3rem 1fr 3.55rem;
  min-height: 14rem;
}

.map-sidebar {
  background: linear-gradient(180deg, rgba(246, 250, 246, 0.96), rgba(255, 255, 255, 0.96));
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.map-canvas {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(237, 243, 236, 0.4)),
    linear-gradient(90deg, rgba(110, 123, 139, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(110, 123, 139, 0.08) 1px, transparent 1px);
  background-size: auto, 3.1rem 3.1rem, 3.1rem 3.1rem;
}

.sidebar-header,
.sidebar-block,
.sidebar-chip,
.sidebar-card {
  border-radius: 8px;
  background: rgba(0, 139, 0, 0.08);
}

.sidebar-header { height: 1.55rem; }
.sidebar-block { height: 2.7rem; }
.sidebar-block.tall { height: 4.6rem; }
.sidebar-chip { height: 1.35rem; }
.sidebar-card { height: 3.3rem; }
.sidebar-card.short { height: 2.4rem; }

.parcel {
  position: absolute;
  border: 1.5px solid rgba(110, 123, 139, 0.28);
  background: rgba(255, 255, 255, 0.55);
}

.parcel-a { inset: 1.1rem 4.8rem 4.4rem 0.9rem; }
.parcel-b { inset: 3.1rem 0.9rem 1rem 5.2rem; }
.parcel-c { inset: 6.7rem 6.5rem 1rem 1.9rem; }
.parcel-d { inset: 1.6rem 1.8rem 7.2rem 8.1rem; }

.route {
  position: absolute;
  border-radius: 999px;
  background: #364152;
}

.route-main {
  width: 11.5rem;
  height: 0.24rem;
  top: 5.2rem;
  left: 1.4rem;
  transform: rotate(22deg);
}

.route-secondary {
  width: 6rem;
  height: 0.18rem;
  top: 7rem;
  left: 4.8rem;
  transform: rotate(-32deg);
}

.map-tag {
  position: absolute;
  min-height: 1.35rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-deep);
  font-size: 0.62rem;
  display: inline-flex;
  align-items: center;
}

.tag-one { top: 2.4rem; left: 3.8rem; }
.tag-two { right: 1.6rem; bottom: 2.8rem; }

.screenshot-frame {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 139, 0, 0.15);
  box-shadow: 0 18px 48px rgba(15, 29, 45, 0.16);
  overflow: hidden;
  background: #fff;
}

.screenshot-topbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(180deg, rgba(237, 243, 236, 0.9), rgba(255, 255, 255, 0.98));
  border-bottom: 1px solid rgba(0, 139, 0, 0.08);
}

.screenshot-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.screenshot-label {
  margin-left: 0.45rem;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenshot-img {
  display: block;
  width: 100%;
  height: auto;
}

.how-section,
.case-studies-section,
.digitaf-section {
  margin: 0 1rem 1rem;
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 29, 45, 0.06);
}

.section-head {
  text-align: center;
  margin-bottom: 1rem;
}

.section-overline {
  margin: 0;
  color: var(--green-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.67rem;
  font-weight: 700;
}

.section-head h2 {
  margin: 0.4rem 0 0;
  font-size: 1.35rem;
}

.section-head p,
.digitaf-cta p,
.case-body p,
.how-step p {
  color: var(--muted);
}

.how-steps,
.case-grid,
.digitaf-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.how-step,
.case-card {
  border-radius: 12px;
  border: 1px solid rgba(25, 25, 112, 0.08);
  background: #fff;
}

.how-step {
  padding: 0.85rem;
  text-align: center;
}

.how-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0, 139, 0, 0.2);
  background: rgba(0, 139, 0, 0.09);
  color: var(--green);
}

.case-image {
  height: 7.8rem;
  background-size: cover;
  background-position: center;
}

.case-image-a { background: linear-gradient(145deg, rgba(0, 139, 0, 0.55), rgba(11, 45, 23, 0.7)); }
.case-image-b { background: linear-gradient(145deg, rgba(25, 25, 112, 0.5), rgba(0, 139, 0, 0.65)); }
.case-image-c { background: linear-gradient(145deg, rgba(110, 123, 139, 0.65), rgba(0, 139, 0, 0.55)); }

.case-body { padding: 0.85rem; }

.case-meta {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.case-meta span {
  font-size: 0.7rem;
  min-height: 1.4rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(0, 139, 0, 0.08);
  color: var(--green-deep);
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green-deep);
  text-decoration: none;
  font-weight: 600;
}

.view-all-link:hover,
.view-all-link:focus {
  color: var(--green);
  text-decoration: none;
}

.country-list-card {
  border-radius: 12px;
  border: 1px solid rgba(25, 25, 112, 0.08);
  background: #fff;
  padding: 1rem;
}

.country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 139, 0, 0.07);
  border: 1px solid rgba(0, 139, 0, 0.14);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.country-pill:hover,
.country-pill:focus {
  color: var(--ink);
  text-decoration: none;
  border-color: rgba(0, 139, 0, 0.28);
  box-shadow: 0 10px 20px rgba(15, 29, 45, 0.08);
  transform: translateY(-1px);
}

.country-notes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.country-notes p {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(25, 25, 112, 0.03);
  color: var(--muted);
}

.flag-at { background: linear-gradient(180deg, #ed2939 33%, #fff 33%, #fff 66%, #ed2939 66%); }
.flag-be { background: linear-gradient(90deg, #000 33%, #ffd90c 33%, #ffd90c 66%, #ef3340 66%); }
.flag-cz { background: linear-gradient(180deg, #fff 50%, #d7141a 50%), linear-gradient(135deg, #11457e 50%, transparent 50%); }
.flag-dk { background: linear-gradient(90deg, #c60c30 38%, #fff 38%, #fff 46%, #c60c30 46%), linear-gradient(180deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%), #c60c30; }
.flag-fi { background: linear-gradient(90deg, #fff 30%, #003580 30%, #003580 42%, #fff 42%), linear-gradient(180deg, #fff 42%, #003580 42%, #003580 58%, #fff 58%); }
.flag-ie { background: linear-gradient(90deg, #169b62 33%, #fff 33%, #fff 66%, #ff883e 66%); }
.flag-nl { background: linear-gradient(180deg, #ae1c28 33%, #fff 33%, #fff 66%, #21468b 66%); }

.digitaf-links ul {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
}

.digitaf-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.digitaf-section {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(15, 29, 45, 0.18);
}

.digitaf-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.digitaf-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.digitaf-logo {
  display: block;
  width: min(100%, 230px);
  height: auto;
}

.digitaf-cta,
.digitaf-links > div {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.digitaf-cta {
  padding: 1rem;
}

.digitaf-overline {
  margin: 0;
  color: #ffb076;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.67rem;
  font-weight: 700;
}

.digitaf-cta h2 {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
}

.digitaf-cta p {
  margin-top: 0.65rem;
  max-width: 42rem;
}

.digitaf-implementation-note {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(36, 55, 68, 0.08);
  box-shadow: 0 10px 24px rgba(15, 29, 45, 0.08);
}

.digitaf-implementation-note p {
  margin: 0;
}

.digitaf-partner-logo {
  display: block;
  width: min(100%, 180px);
  max-width: 38%;
  height: auto;
  flex-shrink: 0;
}

.digitaf-cta-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  margin-top: 0.4rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(180deg, #ea7c2f 0%, #cb6520 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(234, 124, 47, 0.28);
}

.digitaf-links > div {
  padding: 0.95rem;
}

.digitaf-links h4 {
  margin: 0;
}

.digitaf-links ul {
  margin: 0.65rem 0 0;
  padding-left: 1rem;
}

.digitaf-links a:hover,
.digitaf-links a:focus {
  color: #ffcfab;
}

.repo-badge {
  font-size: 0.85rem;
  color: currentColor;
  opacity: 0.75;
  vertical-align: middle;
}

.flag-row {
  margin-top: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem;
}

.flag {
  display: inline-block;
  width: 1.95rem;
  height: 1.25rem;
  border-radius: 3px;
}

.layer-group .flag {
  width: 0.9rem;
  height: 0.5rem;
  border-radius: 3px;
  transform: translateY(50%);
  border: 1px solid lightgray;
}

.layer-group .layer-origin-modal .flag {
  transform: none;
}

.flag-pt { background: linear-gradient(90deg, #006600 40%, #ff0000 40%); }
.flag-se { background: linear-gradient(90deg, #005293 32%, #fecb00 32%, #fecb00 42%, #005293 42%); }
.flag-de { background: linear-gradient(180deg, #000 33%, #dd0000 33%, #dd0000 66%, #ffce00 66%); }
.flag-fr { background: linear-gradient(90deg, #0055a4 33%, #fff 33%, #fff 66%, #ef4135 66%); }
.flag-es { background: linear-gradient(180deg, #aa151b 26%, #f1bf00 26%, #f1bf00 74%, #aa151b 74%); }
.flag-hr { background: linear-gradient(180deg, #ff0000 33%, #fff 33%, #fff 66%, #171796 66%); }

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 22, 30, 0.62);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-dialog {
  width: min(960px, 100%);
  max-height: min(94vh, 860px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #fff;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35);
  padding: 1.1rem;
  position: relative;
}

.profile-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 29, 45, 0.16);
  background: #fff;
}

.profile-overline,
.profile-step,
.profile-footnote {
  text-align: center;
  margin: 0;
}

.profile-overline {
  color: var(--green-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.67rem;
  font-weight: 700;
}

.profile-dialog h2 {
  margin: 0.45rem 0 0;
  text-align: center;
  font-size: 1.5rem;
}

.profile-subtitle {
  margin: 0.45rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-step {
  margin-top: 0.85rem;
  font-size: 0.76rem;
  color: var(--green-deep);
}

.profile-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.profile-card {
  border: 1px solid rgba(25, 25, 112, 0.15);
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.profile-card.is-selected {
  border-color: rgba(0, 139, 0, 0.5);
  box-shadow: 0 16px 30px rgba(0, 139, 0, 0.16);
}

.profile-icon {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 139, 0, 0.24);
  background: rgba(0, 139, 0, 0.08);
  color: var(--green-deep);
}

.profile-continue {
  margin-top: 0.8rem;
  width: 100%;
  min-height: 2.2rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
}

.compass-page {
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 139, 0, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f5f1 0%, var(--surface) 100%);
  overflow: hidden;
}

.compass-shell.farmer-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 1px solid rgba(25, 25, 112, 0.08);
  border-radius: 0;
  background: #f4f7f6;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.compass-ui-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: #fff;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(25, 25, 112, 0.08);
}

.compass-branding {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.compass-brand-mark {
  margin-bottom: 0;
  gap: 0.45rem;
  flex-shrink: 0;
}

.compass-title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.compass-title-select-shell {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 0;
}

.compass-title-select {
  min-height: 1.95rem;
  border: 1px solid rgba(25, 25, 112, 0.18);
  border-radius: 7px;
  background: #fff;
  color: #1f2e40;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0 1.7rem 0 0.55rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #1f2e40 50%),
    linear-gradient(135deg, #1f2e40 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 52%,
    calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.compass-title-select:focus {
  outline: 2px solid rgba(0, 139, 0, 0.35);
  outline-offset: 1px;
}

.compass-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.compass-menu-links {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.header-link-button {
  min-height: 1.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(25, 25, 112, 0.18);
  background: #fff;
  color: #253347;
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0 0.62rem;
}

.header-link-button:hover,
.header-link-button:focus {
  text-decoration: none;
  border-color: rgba(0, 139, 0, 0.3);
  color: #1f2e40;
}

.header-link-button-prominent {
  background: rgba(0, 139, 0, 0.1);
  border-color: rgba(0, 139, 0, 0.26);
  color: #1e4f1a;
}

.tour-button {
  min-height: 1.95rem;
  border: none;
  border-radius: 6px;
  padding: 0 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #fff;
  background: #ea7c2f;
}

.search-shell {
  flex: 1 1 190px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.95rem;
  border: 1px solid rgba(25, 25, 112, 0.12);
  border-radius: 6px;
  background: #fff;
  padding: 0 0.55rem;
}

.search-shell input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.75rem;
}

.search-shell i {
  color: var(--muted);
}

.farmer-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.farm-left-panel,
.farm-right-panel {
  background: #eef1f3;
  padding: 0.85rem;
  min-height: 0;
}

.farm-left-panel {
  border-bottom: 1px solid rgba(25, 25, 112, 0.08);
  overflow-y: auto;
}

.policy-picker-shell {
  margin-bottom: 0.9rem;
  padding: 0.6rem;
  border: 1px solid rgba(25, 25, 112, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.policy-picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.policy-picker-grid label {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.69rem;
  font-weight: 600;
  color: #2d3c4f;
  overflow: hidden;
}

.policy-picker-grid select {
  min-height: 1.75rem;
  border: 1px solid rgba(25, 25, 112, 0.18);
  border-radius: 6px;
  background: #fff;
  color: #1f2e40;
  font-size: 0.72rem;
  padding: 0 0.45rem;
}

.policy-picker-grid select:disabled {
  background: #f2f4f8;
  color: #8a95a3;
}

.policy-insights-panel .indicator-accordion {
  margin-top: 0;
}

.policy-layers-panel .layer-group {
  margin-top: 0.65rem;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.panel-title-row h3 {
  margin: 0;
  font-size: 0.96rem;
}

.panel-title-row span {
  font-size: 0.7rem;
  background: rgba(0, 139, 0, 0.1);
  color: var(--green-deep);
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
}

.layer-group {
  margin-top: 0.8rem;
}

.layer-group h4 {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.layer-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.layer-group li {
  display: grid;
  grid-template-columns: 0.7rem 1fr 1.7rem;
  gap: 0.45rem;
  min-height: 1.65rem;
  font-size: 0.74rem;
  color: #253347;
}

.layer-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  border: 1px solid rgba(25, 25, 112, 0.1);
  transform: translateY(50%);
}

.layer-symbol {
  width: 0.62rem;
  height: 0.62rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f6f83;
  transform: translateY(34%);
}

.layer-symbol i {
  font-size: 0.6rem;
}

.layer-toggle {
  width: 1.55rem;
  height: 0.9rem;
  border-radius: 999px;
  background: rgba(25, 25, 112, 0.2);
  position: relative;
}

.layer-toggle::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: #fff;
}

.layer-toggle.is-on {
  background: #7fcf67;
}

.layer-toggle.is-on::after {
  left: calc(100% - 0.74rem);
}

/* ── layer-wfs items inside left-panel list ─────────────── */
.layer-group li .form-check {
  grid-column: 2 / -1;
  position: relative;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 0;
  padding-right: calc(1.55rem + 0.35rem); /* reserve space for absolutely-placed toggle */
  padding-left: 0;
  gap: 0.35rem;
}

.layer-group li .form-check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.layer-group li .form-check-label {
  flex: 1;
  font-size: 0.74rem;
  color: #253347;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

/* Toggle pill — absolute at right of .form-check so spinner sits between name and pill */
.layer-group li .form-check-label::after {
  content: "";
  position: absolute;
  right: 0;
  width: 1.55rem;
  height: 0.9rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 44%, transparent 45%) 2px center / 0.58rem 0.58rem no-repeat,
    rgba(25, 25, 112, 0.2);
}

/* Toggle pill (on state) */
.layer-group li .form-check-input:checked + .form-check-label::after {
  background:
    radial-gradient(circle, #fff 44%, transparent 45%) calc(100% - 2px) center / 0.58rem 0.58rem no-repeat,
    #7fcf67;
}

.layer-group li .spinner-border {
  width: 0.7rem;
  height: 0.7rem;
  border-width: 0.1rem;
  flex-shrink: 0;
  color: #7fcf67;
}

/* ── Layer inline legend ──────────────────────────────── */
.layer-legend-toggle {
  background: none;
  border: none;
  padding: 0 0.15rem;
  cursor: pointer;
  color: var(--muted, #8a9ab0);
  font-size: 0.55rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.65;
  transform: translateY(30%);
}

.layer-legend-toggle:hover {
  opacity: 1;
}

.layer-legend-inline {
  width: 100%;
  padding-top: 0.1rem;
  padding-bottom: 0.4rem;
}

.layer-origin-toggle {
  border: 0;
  background: transparent;
  padding: 0 0.08rem;
  line-height: 1;
  font-size: 0.66rem;
  color: #8a98a8;
  cursor: pointer;
  opacity: 0.72;
  transition: color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.layer-origin-toggle:hover {
  color: #51687d;
  opacity: 1;
  transform: translateY(-1px);
}

.layer-origin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 30, 0.42);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem;
}

.layer-origin-modal {
  width: min(31rem, 94vw);
  max-height: 72vh;
  overflow: auto;
  background:
    radial-gradient(circle at top right, rgba(143, 201, 109, 0.18), transparent 28%),
    linear-gradient(175deg, #f9fcf8 0%, #edf6f1 100%);
  border: 1px solid rgba(46, 125, 50, 0.18);
  border-radius: 0.8rem;
  box-shadow: 0 22px 48px rgba(20, 28, 44, 0.24);
  padding: 0.95rem 1rem;
}

.layer-origin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.layer-origin-modal-title {
  margin: 0;
  font-size: 0.92rem;
  color: #203546;
  max-width: calc(100% - 2rem);
}

.layer-origin-modal-close {
  border: 0;
  background: transparent;
  color: #567;
  line-height: 1;
  font-size: 1.35rem;
  padding: 0;
  cursor: pointer;
}

.layer-origin-text {
  font-size: 0.72rem;
  color: #395064;
  line-height: 1.42;
  margin-top: 0.55rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(36, 55, 68, 0.08);
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
}

.layer-origin-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.layer-origin-provider {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 246, 0.92));
  border: 1px solid rgba(46, 125, 50, 0.18);
  border-radius: 999px;
  padding: 0.28rem 0.56rem 0.28rem 0.32rem;
  box-shadow: 0 8px 18px rgba(32, 53, 70, 0.09);
}

.layer-origin-provider-logo {
  /*width: 1.35rem;*/
  height: 1.35rem;
  object-fit: contain;
  /*border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.08rem;
  box-shadow: inset 0 0 0 1px rgba(36, 55, 68, 0.08);*/
}

.layer-origin-provider-name {
  font-size: 0.7rem;
  color: #28465a;
  font-weight: 700;
}

.layer-origin-meta {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(36, 55, 68, 0.1);
}

.layer-origin-meta-item {
  display: grid;
  grid-template-columns: 6rem 1fr;
  align-items: center;
  gap: 0.35rem;
}

.layer-origin-meta-label {
  font-size: 0.63rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64798b;
}

.layer-origin-meta-value,
.layer-origin-service-link {
  font-size: 0.69rem;
  color: #2d4356;
  line-height: 1.2;
  word-break: break-word;
}

.layer-origin-service-link {
  text-decoration: underline dotted;
}

.layer-origin-country {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.69rem;
  color: #2d4356;
  font-weight: 600;
}

.layer-origin-flag {
  width: 1rem;
  height: 0.66rem;
  border: 1px solid rgba(36, 55, 68, 0.12);
  border-radius: 2px;
  transform: none;
}

.layer-origin-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.layer-origin-group-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 174, 78, 0.18), rgba(79, 174, 78, 0.1));
  color: #244c2a;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid rgba(79, 174, 78, 0.24);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.18rem;
}

.legend-swatch {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  border: 1px solid rgba(25, 25, 112, 0.15);
}

.legend-swatch--nodata {
  background: repeating-linear-gradient(
    45deg,
    #ccc,
    #ccc 2px,
    #fff 2px,
    #fff 5px
  ) !important;
}

.legend-label {
  font-size: 0.68rem;
  color: #253347;
  line-height: 1.2;
}

.farm-map-stage {
  position: relative;
  background: #dde8d2;
  border-bottom: 1px solid rgba(25, 25, 112, 0.08);
  height: calc(100dvh - 10.5rem);
  max-height: calc(100dvh - 10.5rem);
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 599px) {
  .compass-ui-header {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
  }

  .compass-branding {
    width: 100%;
    justify-content: space-between;
  }

  .compass-title-select-shell {
    width: 100%;
  }

  .compass-title-select {
    width: 100%;
  }

  .compass-top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .farmer-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
  }

  .farm-left-panel {
    flex: 0 1 40%;
    min-height: 0;
    border-right: 0;
  }

  .farm-map-stage {
    flex: 0 0 auto;
    height: 35dvh;
    max-height: 35dvh;
  }

  .farm-right-panel {
    flex: 1 1 auto;
    min-height: 0;
    border-top: 1px solid rgba(25, 25, 112, 0.08);
    overflow: auto;
  }

  .farmer-layout.policy-layout .policy-insights-panel {
    order: 3;
  }

  .farmer-layout.policy-layout .farm-map-stage {
    order: 2;
  }

  .farmer-layout.policy-layout .farm-left-panel {
    order: 1;
  }

  .basemap-switcher {
    top: 0.35rem;
    right: 0.35rem;
    gap: 0.25rem;
    padding: 0.25rem 0.35rem;
  }

  .basemap-switcher label {
    display: none;
  }

  .basemap-switcher select,
  .basemap-switcher .attribution-toggle-btn {
    min-height: 1.45rem;
    font-size: 0.65rem;
    padding: 0 0.35rem;
  }

  .basemap-switcher select {
    padding: 0 1.2rem 0 0.3rem;
    background-position: calc(100% - 10px) 50%, calc(100% - 6px) 50%;
  }

  .basemap-switcher .attribution-toggle-btn {
    padding: 0 0.3rem;
    white-space: nowrap;
  }

  .map-zoom-badge {
    left: 0.35rem;
    bottom: 1.8rem;
    min-height: 1.35rem;
    padding: 0 0.4rem;
    font-size: 0.62rem;
  }

  #compass-map .ol-zoom {
    top: 0.35rem;
    left: 0.35rem;
  }

  #compass-map .ol-custom-locate {
    top: 3.2rem;
    left: 0.35rem;
  }

  #compass-map #gcd-container {
    top: 5.7rem;
    left: 0.35rem;
  }

  .insight-cards {
    grid-template-columns: 1fr;
  }

  .lulc-parcel-cards {
    grid-template-columns: 1fr;
  }

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

  .panel-title-row {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .layer-group li {
    grid-template-columns: 0.6rem 1fr 1.5rem;
    gap: 0.35rem;
    min-height: 1.55rem;
    font-size: 0.7rem;
  }

  .tour-button {
    min-height: 1.85rem;
    font-size: 0.68rem;
  }

  .header-link-button {
    min-height: 1.85rem;
    font-size: 0.68rem;
    padding: 0 0.5rem;
  }

  .digitaf-implementation-note {
    flex-direction: column;
    align-items: flex-start;
  }

  .digitaf-partner-logo {
    max-width: 170px;
  }

  .compass-footer-note {
    flex-direction: column;
    align-items: flex-start;
  }

  .compass-funding-note {
    text-align: left;
  }
}

.basemap-switcher {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.45rem;
  border-radius: 7px;
  border: 1px solid rgba(25, 25, 112, 0.16);
  background: rgba(255, 255, 255, 0.94);
}

.basemap-switcher label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #2a3c3b;
}

.basemap-switcher select {
  min-height: 1.55rem;
  border: 1px solid rgba(25, 25, 112, 0.2);
  border-radius: 6px;
  background: #fff;
  color: #1f2e40;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0 1.4rem 0 0.4rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #1f2e40 50%),
    linear-gradient(135deg, #1f2e40 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 52%,
    calc(100% - 7px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.basemap-switcher .attribution-toggle-btn {
  min-height: 1.55rem;
  border: 1px solid rgba(25, 25, 112, 0.2);
  border-radius: 6px;
  background: #fff;
  color: #1f2e40;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0 0.5rem;
  cursor: pointer;
}

.basemap-switcher .attribution-toggle-btn:hover {
  background: rgba(25, 25, 112, 0.06);
}

.map-chip-list {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.map-chip {
  min-height: 1.45rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(25, 25, 112, 0.08);
  font-size: 0.67rem;
  color: #2a3c3b;
  display: inline-flex;
  align-items: center;
}

.farm-map-canvas {
  min-height: clamp(220px, 42dvh, 300px);
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #dde8d2;
}

.compass-map {
  width: 100%;
  height: 100%;
}

.map-zoom-badge {
  position: absolute;
  left: 0.5rem;
  bottom: 2.2rem;
  z-index: 7;
  min-height: 1.5rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(25, 25, 112, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #2a3c3b;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(15, 29, 45, 0.08);
  backdrop-filter: blur(8px);
}

#compass-map .ol-rotate {
  display: none;
}

#compass-map .ol-zoom {
  top: 0.5rem;
  left: 0.5rem;
  z-index: 5;
}

#compass-map #gcd-container {
  top: 6.3rem;
  left: 0.5rem;
}
#compass-map .ol-custom-locate {
  position: absolute;
  left: 0.5rem;
  z-index: 4;
  top: 3.8rem;
}
#compass-map .ol-geocoder .gcd-gl-btn {
  min-width: 2rem;
  min-height: 2rem;
  border: 1px solid rgba(25, 25, 112, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #253347;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
#compass-map .ol-geocoder .gcd-gl-input {
    padding: 3px;
}
#compass-map .ol-locate-btn {
  min-width: 2rem;
  min-height: 2rem;
  border: 1px solid rgba(25, 25, 112, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #253347;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#compass-map .ol-locate-btn {
  cursor: pointer;
}

#compass-map .ol-attribution {
  display: none;
}

.farm-map-canvas.show-attribution #compass-map .ol-attribution {
  display: block;
}

.field {
  position: absolute;
  border: 1px dotted rgba(19, 47, 16, 0.7);
}

.field-a { inset: 2.6rem 3.8rem 8.5rem 3.8rem; background: rgba(135, 220, 57, 0.8); }
.field-b { inset: 1.3rem 11rem 15rem 1rem; background: rgba(206, 219, 151, 0.78); }
.field-c { inset: 9rem 1rem 2.2rem 12rem; background: rgba(139, 176, 116, 0.74); }
.field-d { inset: 17rem 10rem 1rem 1.5rem; background: rgba(189, 197, 140, 0.8); }

.road {
  position: absolute;
  height: 2px;
  background: rgba(112, 124, 97, 0.85);
}

.road-a { width: 90%; top: 58%; left: 5%; transform: rotate(9deg); }
.road-b { width: 82%; top: 28%; left: 9%; transform: rotate(-36deg); }

.farm-right-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.farm-id {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.73rem;
  color: var(--muted);
}

.score-ring {
  --pct: 0%;
  --accent: #8abf5a;
  width: 84px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 var(--pct), rgba(25, 25, 112, 0.15) var(--pct) 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #eef1f3;
}

.score-ring.large {
  width: 138px;
  margin: 0 auto 0.85rem;
  --accent: #e67e22;
}

.score-ring > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-ring strong {
  display: block;
  font-size: 1.45rem;
}

.score-ring span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.mini-metrics .score-ring {
  width: 76px;
  margin: 0 auto;
}

.mini-metrics .score-ring strong {
  font-size: 1rem;
}

.insights-box {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(25, 25, 112, 0.1);
}

.insights-box h4 {
  margin: 0;
  font-size: 0.9rem;
}

.insights-box ul {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
}

.insights-box li {
  margin: 0.3rem 0;
  color: #324458;
  font-size: 0.74rem;
}

.policy-button {
  width: 100%;
  margin-top: 0.8rem;
  min-height: 2.2rem;
  border: 1px solid rgba(25, 25, 112, 0.18);
  border-radius: 7px;
  background: #fff;
  color: #253347;
  font-size: 0.75rem;
}

/* ── Indicator accordion ─────────────────────────────────────── */
.indicator-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
  overflow: auto;
  min-height: 0;
}

.layer-accordion {
  margin-top: 0.6rem;
}

.accordion-section {
  border: 1px solid rgba(25, 25, 112, 0.1);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: #253347;
  transition: background 0.15s;
}

.accordion-header:hover {
  background: rgba(25, 25, 112, 0.035);
}

.accordion-header:focus {
  outline: none;
}

.accordion-icon {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.accordion-title {
  flex: 1;
}

.accordion-chevron {
  font-size: 0.65rem;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.accordion-section.is-open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 0 0.65rem 0.6rem;
}

.accordion-section.is-open .accordion-body {
  display: block;
}

.insight-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.insight-card {
  background: #f4f7f5;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border: 1px solid rgba(25, 25, 112, 0.06);
  position: relative;
}

.card-label {
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.2;
}

.card-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #253347;
  line-height: 1.2;
}

.card-trend {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-size: 0.6rem;
}

.trend-up .card-trend { color: #4fae4e; }
.trend-down .card-trend { color: #c0392b; }
.trend-stable .card-trend { color: var(--muted); }

.accordion-note {
  margin: 0.4rem 0 0;
  font-size: 0.66rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Tree Cover Density panel ── */
.tcd-actions {
  margin-bottom: 0.6rem;
}
.tcd-calc-btn {
  font-size: 0.72rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid #4fae4e;
  border-radius: 4px;
  background: #f4fbf4;
  color: #2a6e2a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tcd-calc-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.tcd-section-label {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.2rem 0 0.3rem;
}

.tcd-land-use-hint {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
}

.tcd-pixels-link {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
  color: #4fae4e;
  text-decoration: underline dotted;
}
.tcd-pixels-link:hover {
  color: #2e7d32;
}

/* ── Land Use and Land Cover panel ── */
.lulc-parcel-cards {
  grid-template-columns: 1fr;
}

.lulc-parcel-card {
  gap: 0.25rem;
}

.lulc-card-parcel-id {
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.lulc-source-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
}

.lulc-source-dataset {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.lulc-source-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: #253347;
  text-align: right;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lulc-source-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.lulc-chart-sublabel {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 4px;
}

.lulc-pie-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lulc-pie-svg {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.lulc-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.lulc-pie-legend-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lulc-pie-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lulc-pie-legend-label {
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.lulc-pie-legend-label--highlight {
  font-weight: 700;
  color: #1b2737;
}

.lulc-pie-legend-pct {
  font-size: 0.62rem;
  font-weight: 600;
  color: #253347;
  flex-shrink: 0;
}

/* Farm prompt modal */
.farm-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(17, 28, 44, 0.42);
}
.farm-prompt-card {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1rem 1rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 91, 130, 0.22);
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  box-shadow: 0 18px 50px rgba(18, 35, 58, 0.24);
}
.farm-prompt-kicker {
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e7897;
}
.farm-prompt-text {
  color: #213246;
  font-size: 0.94rem;
  line-height: 1.4;
}
.farm-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}
.farm-prompt-btn {
  border: none;
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.farm-prompt-btn:hover {
  transform: translateY(-1px);
}
.farm-prompt-yes {
  background: #2e7d32;
  color: #fff;
  box-shadow: 0 8px 18px rgba(46, 125, 50, 0.22);
}
.farm-prompt-yes:hover { background: #1b5e20; }
.farm-prompt-no {
  background: #dfe8f1;
  color: #31465c;
}
.farm-prompt-no:hover { background: #cbd8e5; }

.compass-footer-note {
  border-top: 1px solid rgba(25, 25, 112, 0.1);
  background: #f9fbfa;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.compass-footer-partner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.compass-footer-partner-logo {
  display: block;
  width: 70px;
  height: auto;
}

.compass-funding-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.6rem;
  text-align: center;
}

.footer-latest-button {
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(25, 25, 112, 0.16);
  background: #fff;
  color: #2a3c3b;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}

.footer-latest-button:hover,
.footer-latest-button:focus {
  text-decoration: none;
  border-color: rgba(0, 139, 0, 0.3);
  color: #1f2e40;
}

@media (min-width: 768px) {
  .landing-page {
    padding: 1.25rem;
  }

  .frame-shell {
    min-height: calc(100vh - 2.5rem);
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
  }

  .profile-grid,
  .how-steps,
  .case-grid,
  .features-grid,
  .digitaf-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compass-ui-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
  }

  .farmer-layout {
    grid-template-columns: 270px 1fr;
  }

  .farm-left-panel {
    border-bottom: 0;
    border-right: 1px solid rgba(25, 25, 112, 0.08);
  }

  .farm-right-panel {
    border-top: 1px solid rgba(25, 25, 112, 0.08);
  }

  .farmer-layout.policy-layout {
    grid-template-columns: minmax(280px, 340px) 1fr minmax(220px, 260px);
  }

  .policy-insights-panel {
    border-right: 1px solid rgba(25, 25, 112, 0.08);
    border-bottom: 0;
  }

  .policy-layers-panel {
    border-left: 1px solid rgba(25, 25, 112, 0.08);
    border-top: 0;
  }
}

@media (min-width: 960px) {
  .compass-page {
    height: 100dvh;
    overflow: hidden;
  }

  .compass-shell.farmer-shell {
    height: 100dvh;
    min-height: 100dvh;
  }

  .nav-links {
    display: flex;
    width: auto;
    order: 0;
    flex-direction: row;
    margin-top: 0;
  }

  .menu-button {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.05fr);
    gap: 2rem;
    padding: 2.6rem 2rem 2rem;
  }

  .digitaf-header {
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) minmax(120px, 160px);
    gap: 1.25rem;
  }

  .how-steps,
  .case-grid,
  .digitaf-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .farmer-layout {
    grid-template-columns: 280px minmax(480px, 1fr) 320px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .farmer-layout.policy-layout {
    grid-template-columns: minmax(220px, 250px) minmax(300px, 460px) minmax(520px, 1fr);
  }

  .farm-map-stage {
    height: 100%;
    max-height: none;
  }

  .farm-map-canvas {
    min-height: 0;
  }

  .farm-right-panel {
    border-top: 0;
    border-left: 1px solid rgba(25, 25, 112, 0.08);
  }

  .farm-left-panel,
  .farm-right-panel {
    overflow: auto;
  }

  .compass-top-actions {
    justify-content: flex-end;
  }
}
