/* ==========================================================================
   Hero, the Envee app replica inside it, and the product sections that
   reuse its components: module strip and the platform explorer.
   index.html only.

   The app window is a faithful rebuild of the real Envee web app: same
   sidebar order, module names, colour tokens (lifted from the app's
   theme.css), icon family and card anatomy. It is drawn in HTML rather than
   shown as a screenshot so it stays sharp, follows the site theme, and can
   animate. heroapp.js runs the tour; without it the markup is a finished,
   static dashboard.

   Depends on the tokens in styles.css section 1. Loads after styles.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero frame: copy on the left, the app on the right, both above the fold
   on a 1080p screen. Below 1240px they stack, copy first.
   -------------------------------------------------------------------------- */

/* Animatable, so the plat can open out from behind the app on load */
@property --reveal {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 140%;
}

.hero {
  --plat-ink: rgba(17, 104, 79, 0.15);
  position: relative;
  isolation: isolate;
  padding-block: clamp(28px, 3.4vw, 52px) clamp(20px, 2.4vw, 36px);
}

:root[data-theme="dark"] .hero {
  --plat-ink: rgba(143, 224, 189, 0.085);
}

/* A soft light from the app side, so the page does not open on a flat field */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(50% 70% at 72% 40%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg-tint) 60%, var(--bg)), var(--bg));
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Option 1, the default: a county parcel layer. Lots, blocks and a canal,
   generated (assets/parcels.svg) and used as a mask so each theme sets the
   ink. Strongest around the app, clear behind the copy, gone at the bottom. */
.hero-plat,
.hero-sheet {
  position: absolute;
  inset: 0;
  display: none;
  -webkit-mask-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.18) 10%, rgba(0, 0, 0, 0.5) 38%, #000 62%),
    linear-gradient(to bottom, #000 62%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.18) 10%, rgba(0, 0, 0, 0.5) 38%, #000 62%),
    linear-gradient(to bottom, #000 62%, transparent 98%);
  mask-composite: intersect;
}

.hero[data-bg="parcels"] .hero-plat,
.hero[data-bg="sheet"] .hero-sheet {
  display: block;
}

.hero-plat i {
  position: absolute;
  inset: 0;
  background: var(--plat-ink);
  /* Native scale, never stretched: a phone sees small lots, not giant ones */
  -webkit-mask:
    url("assets/parcels.svg") center top / max(1800px, 100%) auto repeat-y,
    radial-gradient(circle at 70% 42%, #000 calc(var(--reveal) - 30%), transparent var(--reveal));
  -webkit-mask-composite: source-in;
  mask:
    url("assets/parcels.svg") center top / max(1800px, 100%) auto repeat-y,
    radial-gradient(circle at 70% 42%, #000 calc(var(--reveal) - 30%), transparent var(--reveal));
  mask-composite: intersect;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-plat i {
    animation: platReveal 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
  }
}

@keyframes platReveal {
  from {
    --reveal: 0%;
  }
  to {
    --reveal: 140%;
  }
}

/* Option 2: a survey sheet. A coordinate grid with registration crosses,
   the frame a site plan figure is drawn on. */
.hero-sheet {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M60 54v12M54 60h12' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 120px 120px,
    repeating-linear-gradient(to right, transparent 0 119px, #000 119px 120px),
    repeating-linear-gradient(to bottom, transparent 0 119px, #000 119px 120px);
  opacity: 0.11;
}

:root[data-theme="dark"] .hero-sheet {
  filter: invert(1);
  opacity: 0.07;
}

/* Map furniture: north arrow, scale and position, as on a figure */
.hero-mapnote {
  position: absolute;
  right: clamp(16px, 2.4vw, 40px);
  bottom: clamp(10px, 1.4vw, 18px);
  display: none;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--ink-3) 85%, transparent);
  font: 600 10.5px/1 ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}

.hero[data-bg="parcels"] .hero-mapnote,
.hero[data-bg="sheet"] .hero-mapnote {
  display: inline-flex;
}

.hero-mapnote svg {
  width: 8px;
  height: 11px;
  fill: currentColor;
}

.hero-mapnote b {
  margin-left: -6px;
}

.hero-scale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-scale i {
  width: 48px;
  height: 5px;
  border: 1px solid currentColor;
  background: linear-gradient(to right, currentColor 50%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(32px, 3.2vw, 56px);
  align-items: center;
  width: min(1560px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.hero-head {
  display: grid;
  justify-items: start;
  max-width: 540px;
}

.hero h1 {
  max-width: 11ch;
  margin: 0 0 var(--s-5);
}

.hero-sub {
  max-width: 46ch;
}

.hero-actions {
  margin-top: var(--s-6);
}

.hero-proof {
  display: grid;
  gap: var(--s-2);
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: var(--t-sm);
  font-weight: 550;
}

.hero-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-proof li::before {
  content: "";
  width: 15px;
  height: 15px;
  background-color: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 2.5 2.5L16 9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 2.5 2.5L16 9'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The stage sizes the app: its own width decides the sidebar, not the viewport */
.hero-stage {
  position: relative;
  min-width: 0;
  container: stage / inline-size;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 4% 2% 10%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(55% 60% at 28% 40%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(50% 55% at 76% 60%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  filter: blur(60px);
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 1240px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(1180px, 100% - var(--gutter) * 2);
  }

  .hero-head {
    justify-items: center;
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
  }

  .hero h1 {
    max-width: 15ch;
    margin-inline: auto;
  }

  .hero-actions,
  .hero-proof {
    justify-content: center;
  }

  .hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-6);
  }

  /* Stacked: faint behind the copy, fuller around the app below it */
  .hero-plat,
  .hero-sheet {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000 62%, transparent 96%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 40%, #000 62%, transparent 96%);
  }
}

/* --------------------------------------------------------------------------
   The app window. Tokens from the real app's theme.css.
   -------------------------------------------------------------------------- */

.ea,
.px,
.rwd {
  --ea-bg: #edf0f2;
  --ea-head: #f3f2ee;
  --ea-side: #f4f2ed;
  --ea-side-deep: #eceae4;
  --ea-card: #ffffff;
  --ea-ink: #102a32;
  /* Muted text and the chip inks run a shade darker than the app's own
     tokens so the small labels clear 4.5:1 at these sizes */
  --ea-muted: #5b6b72;
  --ea-line: #dbe6e3;
  --ea-green: #0f6c4b;
  --ea-green-soft: #dcefe8;
  --ea-primary: #116b5a;
  --ea-blue: #438fe6;
  --ea-blue-strong: #1d6884;
  --ea-blue-soft: #dceff6;
  --ea-amber: #dfa438;
  --ea-amber-strong: #7d5d0e;
  --ea-amber-soft: #f2e6c7;
  --ea-deep: #137a55;
  --ea-bar-green: #3cb371;
  --ea-shadow: 0 1px 2px rgba(16, 42, 50, 0.05);
}

.ea {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 50, 0.12);
  border-radius: 14px;
  background: var(--ea-bg);
  box-shadow:
    0 2px 6px rgba(8, 36, 28, 0.06),
    0 40px 90px -30px rgba(8, 36, 28, 0.38);
  color: var(--ea-ink);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}

:root[data-theme="dark"] .ea,
:root[data-theme="dark"] .px,
:root[data-theme="dark"] .rwd {
  --ea-bg: #111a1d;
  --ea-head: #152326;
  --ea-side: #1e2c30;
  --ea-side-deep: #182529;
  --ea-card: #152326;
  --ea-ink: #edf7f5;
  --ea-muted: #9eb0b5;
  --ea-line: #284044;
  --ea-green: #5cc79a;
  --ea-green-soft: rgba(34, 151, 111, 0.18);
  --ea-primary: #177760;
  --ea-blue-soft: rgba(67, 143, 230, 0.16);
  --ea-blue-strong: #7cb8f0;
  --ea-amber-soft: rgba(190, 143, 35, 0.2);
  --ea-amber-strong: #e7bd62;
  --ea-shadow: none;
}

:root[data-theme="dark"] .ea {
  border-color: rgba(234, 243, 238, 0.12);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
}

/* Browser chrome */
.ea-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ea-line);
  background: var(--ea-side-deep);
}

.ea-dots {
  display: inline-flex;
  gap: 6px;
  width: 60px;
}

.ea-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ea-ink) 18%, transparent);
}

.ea-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: min(340px, 50%);
  margin-inline: auto;
  padding: 4px 14px;
  border: 1px solid var(--ea-line);
  border-radius: 7px;
  background: var(--ea-card);
  color: var(--ea-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.ea-url .ei {
  width: 11px;
  height: 11px;
  color: var(--ea-green);
}

.ea-url-path {
  color: var(--ea-ink);
}

.ea-chrome-end {
  width: 60px;
}

.ea-body {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  height: 560px;
}

/* Sidebar */
.ea-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 12px;
  border-right: 1px solid var(--ea-line);
  background: var(--ea-side);
}

.ea-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px 12px;
  border-bottom: 1px solid var(--ea-line);
}

.ea-brand img {
  flex: none;
  width: 30px;
  height: 30px;
}

.ea-brand strong {
  display: block;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1;
}

.ea-brand small {
  display: block;
  margin-top: 3px;
  color: var(--ea-muted);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ea-org {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
}

.ea-org-mark,
.ea-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #d8a94f;
  color: #3d2a00;
  font-size: 11px;
  font-weight: 750;
}

.ea-avatar {
  border-radius: 50%;
}

.ea-org-name {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.ea-org-name small,
.ea-user small {
  color: var(--ea-muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ea-org-name strong,
.ea-user strong {
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-org > .ei {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--ea-muted);
}

.ea-nav {
  display: grid;
  gap: 1px;
}

.ea-nav-label {
  padding: 9px 10px 4px;
  color: var(--ea-muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ea-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.ea-nav-item:hover {
  background: color-mix(in srgb, var(--ea-ink) 5%, transparent);
}

.ea-nav-item.is-static {
  cursor: default;
}

.ea-nav-item.is-static:hover {
  background: none;
}

.ea-nav-item.is-active {
  background: var(--ea-green-soft);
  color: var(--ea-green);
}

.ea-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 10px 6px 0;
  border-top: 1px solid var(--ea-line);
}

.ea-user > span:last-child {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

/* Main column: views stack in one box and cross-fade */
.ea-main {
  position: relative;
  min-width: 0;
  overflow: hidden;
  container: eam / inline-size;
}

.ea-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms var(--ease), visibility 0s linear 320ms;
}

.ea-view.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 320ms var(--ease), visibility 0s linear 0s;
}

.ea-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ea-line);
  background: var(--ea-head);
}

.ea-title {
  min-width: 0;
}

.ea-title strong {
  display: block;
  overflow: hidden;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The subtitle only: the report header wraps both lines in a span of its own */
.ea-title strong + span {
  display: block;
  color: var(--ea-muted);
  font-size: 11px;
}

.ea-title-back {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ea-title-back > span:last-child {
  min-width: 0;
}

.ea-title-back strong {
  font-size: 17px;
}

.ea-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.ea-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 200px;
  padding: 7px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
  color: var(--ea-muted);
  font-size: 11px;
}

.ea-search .ei {
  width: 13px;
  height: 13px;
}

.ea-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.ea-btn .ei {
  width: 13px;
  height: 13px;
}

.ea-btn-primary {
  border-color: transparent;
  background: var(--ea-primary);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--ea-primary) 80%, transparent);
  color: #fff;
}

.ea-btn-file img {
  width: 16px;
  height: 16px;
}

.ea-btn-sm {
  justify-self: start;
  margin-top: 4px;
  padding: 5px 9px;
  border-color: color-mix(in srgb, var(--ea-green) 35%, var(--ea-line));
  color: var(--ea-green);
  font-size: 10.5px;
}

.ea-btn-block {
  justify-content: center;
  margin-top: 4px;
}

.ea-icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
}

.ea-saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
  color: var(--ea-green);
  font-size: 11px;
  font-weight: 650;
}

.ea-saved .ei {
  width: 13px;
  height: 13px;
}

/* Shared bits */
.ea-panel {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  box-shadow: var(--ea-shadow);
}

.ea-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ea-panel-head strong {
  font-size: 12.5px;
  font-weight: 700;
}

.ea-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--ea-line);
  border-radius: 6px;
  color: var(--ea-muted);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.ea-select .ei {
  width: 10px;
  height: 10px;
}

.ea-select-lg {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--ea-card);
  color: var(--ea-ink);
  font-size: 11.5px;
}

.ea-link {
  color: var(--ea-green);
  font-size: 10.5px;
  font-weight: 700;
}

.ea-muted {
  color: var(--ea-muted);
  font-size: 10.5px;
}

/* Tone pairs used by chips, KPI bars, donut and board dots */
[data-tone="green"] { --t: var(--ea-bar-green); --t-soft: var(--ea-green-soft); --t-ink: var(--ea-green); }
[data-tone="blue"]  { --t: var(--ea-blue); --t-soft: var(--ea-blue-soft); --t-ink: var(--ea-blue-strong); }
[data-tone="amber"] { --t: var(--ea-amber); --t-soft: var(--ea-amber-soft); --t-ink: var(--ea-amber-strong); }
[data-tone="deep"]  { --t: var(--ea-deep); --t-soft: var(--ea-green-soft); --t-ink: var(--ea-green); }

.ea-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-style: normal;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: var(--t-soft, var(--ea-green-soft));
  color: var(--t-ink, var(--ea-green));
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.ea-chip .ei {
  width: 10px;
  height: 10px;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.ea-scroll {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px 18px;
  overflow: hidden;
}

.ea-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ea-kpi {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px 12px 18px;
  overflow: hidden;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  box-shadow: var(--ea-shadow);
}

.ea-kpi img {
  flex: none;
  width: 34px;
  height: 34px;
}

.ea-kpi div {
  min-width: 0;
}

.ea-kpi span {
  display: block;
  overflow: hidden;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ea-kpi strong {
  display: block;
  font-size: 24px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.ea-kpi small {
  color: var(--ea-muted);
  font-size: 9.5px;
}

.ea-kpi small b {
  color: var(--ea-green);
}

.ea-kpi > i {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 3px;
  border-radius: 3px;
  background: var(--t);
  transform-origin: left;
}

.ea-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
}

.ea-progress {
  grid-column: span 2;
}

.ea-donut-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ea-donut {
  position: relative;
  flex: none;
  width: 92px;
  height: 92px;
}

.ea-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ea-donut circle {
  fill: none;
  stroke-width: 12;
}

.ea-donut-track {
  stroke: var(--ea-line);
}

.ea-seg {
  stroke: var(--t);
}

.ea-donut > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}

.ea-donut b {
  font-size: 19px;
  font-weight: 750;
}

.ea-donut small {
  color: var(--ea-muted);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ea-legend {
  display: grid;
  flex: 1;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10.5px;
}

.ea-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ea-muted);
}

.ea-legend li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t);
}

.ea-legend b {
  margin-left: auto;
  color: var(--ea-ink);
}

.ea-deadlines ul,
.ea-progress ul,
.ea-downloads ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ea-deadlines li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ea-date {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  padding: 3px 0;
  border: 1px solid var(--ea-line);
  border-radius: 7px;
  color: var(--ea-muted);
  font-size: 7.5px;
  font-weight: 750;
  line-height: 1.15;
  text-transform: uppercase;
}

.ea-date b {
  color: var(--ea-ink);
  font-size: 12px;
}

.ea-dl-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.ea-dl-copy strong,
.ea-progress strong,
.ea-downloads strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-dl-copy small,
.ea-progress small,
.ea-downloads small {
  color: var(--ea-muted);
  font-size: 9.5px;
}

.ea-minimap {
  position: relative;
  height: 112px;
  overflow: hidden;
  border-radius: 8px;
}

.ea-minimap svg {
  width: 100%;
  height: 100%;
}

.ea-mm-sea { fill: #cfe3e9; }
.ea-mm-land { fill: #e7ece2; }
.ea-mm-road { fill: none; stroke: #fff; stroke-width: 2.4; }
.ea-mm-water { fill: none; stroke: #b5d3dc; stroke-width: 3; }

:root[data-theme="dark"] .ea-mm-sea { fill: #1b3138; }
:root[data-theme="dark"] .ea-mm-land { fill: #22322f; }
:root[data-theme="dark"] .ea-mm-road { stroke: #2f4440; }
:root[data-theme="dark"] .ea-mm-water { stroke: #26424a; }

.ea-mm-pin {
  position: absolute;
  width: 0;
  height: 0;
}

.ea-mm-pin i {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: var(--ea-primary);
  box-shadow: 0 2px 5px rgba(16, 42, 50, 0.3);
}

.ea-mm-pin.is-home i {
  border-radius: 3px;
  background: var(--ea-ink);
}

.ea-progress li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
}

.ea-progress li > span:first-child {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.ea-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ea-line);
}

.ea-bar i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: var(--ea-amber);
  transform-origin: left;
}

.ea-progress b {
  font-size: 10.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ea-downloads li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ea-downloads li > span {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.ea-downloads img {
  flex: none;
}

/* --------------------------------------------------------------------------
   Projects board
   -------------------------------------------------------------------------- */

.ea-board {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  padding: 14px 18px;
}

.ea-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--ea-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ea-ink) 3%, transparent);
}

.ea-col-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ea-col-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--t);
}

.ea-col-head b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  border: 1px solid var(--ea-line);
  border-radius: 50%;
  background: var(--ea-card);
  font-size: 10px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.ea-col-list {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
}

.ea-pcard {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  box-shadow: var(--ea-shadow);
}


.ea-pcard-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ea-pcard-top img {
  flex: none;
}

.ea-pcard-top > span {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.ea-pcard-top strong {
  font-size: 12px;
}

.ea-pcard-top small {
  overflow: hidden;
  color: var(--ea-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-pcard-top em {
  flex: none;
  align-self: flex-start;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: var(--ea-green-soft);
  color: var(--ea-green);
  font-size: 7.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ea-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ea-green);
  font-size: 9.5px;
  font-weight: 700;
}

.ea-tag .ei {
  width: 10px;
  height: 10px;
}

.ea-arts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ea-art {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 5px;
  padding: 3px 7px 3px 5px;
  border: 1px solid color-mix(in srgb, var(--t, var(--ea-muted)) 35%, transparent);
  border-radius: 7px;
  background: var(--t-soft, transparent);
  line-height: 1.2;
}

.ea-art .ei {
  grid-row: span 2;
  width: 12px;
  height: 12px;
  color: var(--t-ink);
}

.ea-art b {
  font-size: 9.5px;
}

.ea-art small {
  color: var(--t-ink);
  font-size: 8.5px;
  font-weight: 650;
}

.ea-art.is-off {
  --t: var(--ea-muted);
  --t-soft: transparent;
  --t-ink: var(--ea-muted);
  border-style: dashed;
}

.ea-more {
  padding: 2px;
  color: var(--ea-muted);
  font-size: 10px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Report writer
   -------------------------------------------------------------------------- */

.ea-rw {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-columns: 172px minmax(0, 1fr) 196px;
  min-height: 0;
}

.ea-outline,
.ea-lib {
  min-width: 0;
  padding: 14px;
  background: var(--ea-card);
}

.ea-outline {
  border-right: 1px solid var(--ea-line);
}

.ea-lib {
  display: grid;
  align-content: start;
  gap: 8px;
  border-left: 1px solid var(--ea-line);
}

.ea-ring {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ea-ring svg {
  flex: none;
  width: 42px;
  height: 42px;
  transform: rotate(-90deg);
}

.ea-ring circle {
  fill: none;
  stroke-width: 4;
}

.ea-ring-track {
  stroke: var(--ea-line);
}

.ea-ring-fill {
  stroke: var(--ea-bar-green);
  stroke-linecap: round;
}

.ea-ring > span {
  display: grid;
  line-height: 1.2;
}

.ea-ring b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.ea-ring small {
  color: var(--ea-muted);
  font-size: 9.5px;
}

.ea-outline ol {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10.5px;
}

.ea-outline li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 7px;
  color: var(--ea-muted);
}

.ea-outline li i {
  position: relative;
  flex: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--ea-line);
  border-radius: 50%;
}

.ea-outline li.is-done i {
  border-color: var(--ea-bar-green);
  background: var(--ea-bar-green);
}

.ea-outline li.is-done i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.ea-outline li.is-current {
  background: var(--ea-green-soft);
  color: var(--ea-green);
  font-weight: 700;
}

.ea-outline li.is-current i {
  border-color: var(--ea-green);
}

.ea-page-wrap {
  min-width: 0;
  padding: 16px 18px 0;
  overflow: hidden;
}

/* The page is paper in both themes, set in the report's own serif */
.ea-page {
  min-height: 100%;
  padding: 20px 26px;
  border: 1px solid #dfe5e2;
  background: #fff;
  box-shadow: 0 8px 24px -14px rgba(16, 42, 50, 0.4);
  color: #1d2b2f;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.ea-page-firm {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #116b5a;
  color: #33464b;
  font-size: 11px;
}

.ea-page h4,
.ea-page h5 {
  color: #12343c;
  font-family: inherit;
  letter-spacing: 0;
}

.ea-page h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.ea-page h5 {
  margin: 10px 0 4px;
  font-size: 13px;
}

.ea-page p {
  margin: 0 0 8px;
}

/* Report fields, as the app shows them: teal capitals until resolved */
.ea-tok {
  padding: 1px 5px;
  border-radius: 3px;
  background: #dff3ee;
  color: #0b6675;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Once filled from the project record, a field reads as document text with a
   faint mark showing where it came from */
.ea-tok.is-resolved {
  padding: 0 2px;
  background: rgba(60, 179, 113, 0.14);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  white-space: normal;
}

/* Both grow open when inserted, so they clip what has not arrived yet */
.ea-inserted,
.ea-fig-insert {
  overflow: hidden;
}

.ea-fig-insert {
  width: 34%;
  margin: 4px 0 0;
}

.ea-fig-insert svg {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #c9d2cf;
}

.ea-fig-insert figcaption {
  margin-top: 3px;
  font-size: 10.5px;
  font-style: italic;
}

.ea-lib-tabs {
  display: flex;
  gap: 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ea-line);
  color: var(--ea-muted);
  font-size: 11px;
  font-weight: 700;
}

.ea-lib-tabs .is-on {
  color: var(--ea-green);
  box-shadow: 0 9px 0 -7px var(--ea-green);
}

.ea-lib-card {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
}

.ea-lib-card small {
  color: var(--ea-green);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ea-lib-card strong {
  font-size: 11.5px;
}

.ea-lib-card p {
  color: var(--ea-muted);
  font-size: 10px;
  line-height: 1.4;
}

.ea-lib-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ea-muted);
  font-size: 9.5px;
}

.ea-lib-note .ei {
  width: 12px;
  height: 12px;
}

.ea-toast {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  box-shadow: 0 18px 36px -16px rgba(16, 42, 50, 0.45);
}

.ea-toast > span {
  display: grid;
  line-height: 1.3;
}

.ea-toast strong {
  font-size: 11px;
}

.ea-toast small {
  color: var(--ea-muted);
  font-size: 9.5px;
}

.ea-toast .ei {
  color: var(--ea-bar-green);
}

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */

.ea-figbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--ea-line);
  background: var(--ea-card);
}

.ea-seg-ctl {
  display: inline-flex;
  gap: 2px;
  margin-right: 8px;
  padding: 3px;
  border-radius: 9px;
  background: var(--ea-bg);
}

.ea-seg-ctl > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ea-seg-ctl b {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ea-line);
  border-radius: 4px;
  background: var(--ea-card);
  font-size: 9px;
}

.ea-seg-ctl .is-on {
  background: var(--ea-green-soft);
  color: var(--ea-green);
}

.ea-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}

.ea-tool .ei {
  width: 14px;
  height: 14px;
}

.ea-tool.is-on {
  background: var(--ea-green-soft);
  color: var(--ea-green);
}

.ea-fig {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 196px;
  min-height: 0;
}

.ea-canvas {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
}

.ea-sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  padding: 7px;
  border: 1px solid #2b2f31;
  background: #fff;
  box-shadow: 0 10px 28px -16px rgba(16, 42, 50, 0.5);
}

.ea-aerial {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 260;
}

.ea-lbl {
  position: absolute;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.ea-lbl-site {
  background: #d93a2b;
  color: #fff;
}

.ea-obs {
  position: absolute;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #116b5a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.ea-legend-box {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  gap: 2px;
  padding: 5px 8px;
  border: 1px solid #333;
  background: #fff;
  color: #111;
  font-size: 8px;
  line-height: 1.3;
}

.ea-legend-box span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ea-lg-boundary {
  display: inline-block;
  width: 14px;
  height: 2px;
  background: #d93a2b;
}

.ea-lg-obs {
  display: grid;
  place-items: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #116b5a;
  color: #fff;
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.ea-north {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 16px;
}

.ea-north svg {
  display: block;
  width: 100%;
}

.ea-north path {
  fill: #111;
}

.ea-north text {
  fill: #111;
  font-size: 7px;
  font-weight: 800;
}

.ea-inspector {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-left: 1px solid var(--ea-line);
  background: var(--ea-card);
}

.ea-insp-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 9px;
  background: var(--ea-bg);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.ea-insp-tabs span {
  padding: 5px;
  border-radius: 7px;
}

.ea-insp-tabs .is-on {
  background: var(--ea-green-soft);
  color: var(--ea-green);
  font-weight: 700;
}

.ea-insp-title {
  margin-top: 4px;
  font-size: 12px;
}

.ea-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
}

.ea-layer .ei {
  width: 13px;
  height: 13px;
  color: var(--ea-muted);
}

.ea-layer > span {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.ea-layer small {
  color: var(--ea-muted);
  font-size: 9px;
  font-weight: 500;
}

.ea-switch {
  position: relative;
  flex: none;
  width: 26px;
  height: 15px;
  margin-left: auto;
  border-radius: 9px;
  background: var(--ea-line);
  transition: background var(--dur-2) var(--ease);
}

.ea-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur-2) var(--ease);
}

.ea-switch.is-on {
  background: var(--ea-bar-green);
}

.ea-switch.is-on::after {
  transform: translateX(11px);
}

/* --------------------------------------------------------------------------
   CD Analyzer
   -------------------------------------------------------------------------- */

.ea-cd {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 12px;
  min-height: 0;
  padding: 14px 18px;
}

.ea-listings ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
}

.ea-listings li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
}

.ea-listings li b {
  color: var(--ea-green);
}

.ea-listings li span {
  overflow: hidden;
  color: var(--ea-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-listings li em {
  font-style: normal;
  white-space: nowrap;
}

.ea-listings li.is-scan {
  background: var(--ea-green-soft);
}

.ea-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.ea-history th {
  padding: 0 8px 6px;
  border-bottom: 1px solid var(--ea-line);
  color: var(--ea-muted);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.ea-history td {
  padding: 8px;
  border-bottom: 1px solid var(--ea-line);
  white-space: nowrap;
}

.ea-history td:first-child {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.ea-cd-out {
  grid-column: 1 / -1;
}

.ea-cd-file {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ea-cd-file > span:not(.ea-chip) {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.ea-cd-file strong {
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ea-cd-file small {
  color: var(--ea-muted);
  font-size: 10px;
}

.ea-cd-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--ea-muted);
  font-size: 10px;
}

.ea-cd-note .ei {
  width: 12px;
  height: 12px;
  color: var(--ea-green);
}

/* --------------------------------------------------------------------------
   Cursor and tour
   -------------------------------------------------------------------------- */

.ea-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  width: 20px;
  height: 20px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.ea-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ea-cursor path {
  fill: #111;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.ea-cursor i {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ea-bar-green);
  border-radius: 50%;
  opacity: 0;
}

.ea-tour {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: var(--s-5);
}

.ea-tour-btn {
  display: grid;
  gap: 7px;
  min-width: 128px;
  padding: 9px 14px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--ink-3);
  font-size: var(--t-sm);
  font-weight: 650;
  text-align: center;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}

.ea-tour-btn:hover {
  color: var(--ink);
}

.ea-tour-btn[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow-1);
  color: var(--ink);
}

.ea-tour-btn i {
  display: block;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.ea-tour-btn b {
  display: block;
  height: 100%;
  background: var(--brand);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   Module strip under the hero
   -------------------------------------------------------------------------- */

.modules-strip {
  padding-block: clamp(44px, 5.5vw, 72px) clamp(36px, 4.5vw, 56px);
}

.modules-lead {
  margin-bottom: var(--s-5);
  color: var(--ink-3);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.modules-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3) var(--s-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.modules-list li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: var(--t-md);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.modules-list .ei {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Platform explorer: one tab per tool, each with a hands-on demo built from
   the replica's tokens. platform.js runs the tabs and the demos.
   -------------------------------------------------------------------------- */

.px {
  display: grid;
  gap: var(--s-4);
}

.px-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s-2);
}

.px-tab {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink-2);
  text-align: left;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.px-tab .ei {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--brand);
}

.px-tab > span {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.px-tab strong {
  color: var(--ink);
  font-size: var(--t-sm);
}

.px-tab small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-tab:hover {
  border-color: var(--line-2);
}

.px-tab[aria-selected="true"] {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand), var(--shadow-1);
}

.px-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: clamp(20px, 2.6vw, 36px);
  min-height: 470px;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
  box-shadow: var(--shadow-2);
}

.px-panel[hidden] {
  display: none;
}

.px-copy h3 {
  margin-bottom: var(--s-2);
  font-size: var(--t-xl);
  line-height: 1.25;
}

.px-copy > p:not(.px-try) {
  color: var(--ink-3);
  font-size: var(--t-sm);
  line-height: 1.6;
}

.px-copy ul {
  display: grid;
  gap: 7px;
  margin: var(--s-4) 0 var(--s-5);
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: var(--t-sm);
}

.px-copy li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.px-copy li::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background-color: var(--brand);
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
  transform: translateY(1px);
}

.px-try {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.px-try .ei {
  width: 14px;
  height: 14px;
}

.px-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-4);
  color: var(--brand-ink);
  font-size: var(--t-sm);
  font-weight: 650;
}

.px-more::after {
  content: "";
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transition: transform var(--dur-2) var(--ease);
}

.px-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.px-more:hover::after {
  transform: translateX(3px);
}

.px-try a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.px-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--warn-tint);
  color: var(--warn-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 3px;
}

.px-demo {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--ea-line);
  border-radius: 16px;
  background: var(--ea-bg);
  color: var(--ea-ink);
  font-size: 12px;
  line-height: 1.4;
}

.px-layers-h,
.px-mini-h strong {
  font-size: 12.5px;
  font-weight: 700;
}

.px-mini-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.px-mini-h span {
  color: var(--ea-muted);
  font-size: 10.5px;
}

/* Projects: the board, moved by workflow actions as in the app. The
   first column holds the live project, so it gets the room. */
.px-board {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 360px;
}

.px-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--ea-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ea-ink) 3%, transparent);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.px-col-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.px-col-h i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--t);
}

.px-col-h b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  border: 1px solid var(--ea-line);
  border-radius: 50%;
  background: var(--ea-card);
  font-size: 10px;
  letter-spacing: 0;
}

.px-list {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 8px;
  min-height: 140px;
}

.px-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  box-shadow: var(--ea-shadow);
  text-align: left;
}

.px-card-top {
  display: grid;
  line-height: 1.3;
}

.px-card-top b {
  font-size: 12px;
}

.px-card-top small {
  overflow: hidden;
  color: var(--ea-muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-card .ea-chip {
  justify-self: start;
  font-size: 9px;
}

/* The live project's deliverables, each with the action that moves it on */
.px-flow {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.px-step {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid var(--ea-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ea-ink) 2%, var(--ea-card));
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}

.px-step .ei {
  width: 14px;
  height: 14px;
  color: var(--ea-blue-strong);
}

.px-step > span {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.px-step b {
  font-size: 10.5px;
}

.px-step small {
  overflow: hidden;
  color: var(--ea-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-step[data-state="done"] {
  border-color: color-mix(in srgb, var(--ea-green) 35%, var(--ea-line));
  background: var(--ea-green-soft);
}

.px-step[data-state="done"] .ei,
.px-step[data-state="done"] small,
.px-step[data-state="ready"] .ei {
  color: var(--ea-green);
}

.px-step[data-state="locked"] .ei {
  color: var(--ea-muted);
}

.px-step[data-step="report"][data-state="work"] .ei {
  color: var(--ea-amber-strong);
}

.px-act {
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ea-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--dur-1) var(--ease);
}

.px-act:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ea-primary) 82%, #000);
}

.px-act:disabled {
  border-color: var(--ea-line);
  background: transparent;
  color: var(--ea-muted);
  cursor: not-allowed;
}

.px-act-wide {
  width: 100%;
  min-height: 28px;
}

.px-meter {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ea-ink) 8%, transparent);
}

.px-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ea-amber);
}

.px-col[data-stage="active"] .px-meter i {
  background: var(--ea-blue);
}

.px-meter-t {
  margin-top: -3px;
  color: var(--ea-muted);
  font-size: 10px;
}

.px-deliv {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.px-deliv li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
}

.px-deliv .ei {
  width: 12px;
  height: 12px;
  color: var(--ea-green);
}

.px-deliv li[data-state="off"],
.px-deliv li[data-state="off"] .ei {
  color: var(--ea-muted);
}

.px-deliv b {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--ea-green-soft);
  color: var(--ea-green);
  font-size: 9px;
}

.px-reset {
  display: block;
  margin: 10px 0 0 auto;
  padding: 4px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 999px;
  background: var(--ea-card);
  color: var(--ea-muted);
  font-size: 11px;
  font-weight: 650;
}

.px-reset:hover {
  border-color: var(--ea-green);
  color: var(--ea-green);
}

/* Field app: a phone you can work on */
.px-demo-phone {
  display: grid;
  place-items: center;
  min-height: 430px;
  background:
    radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--ea-green) 12%, transparent), transparent 70%),
    var(--ea-bg);
}

.px-phone {
  display: grid;
  gap: 10px;
  width: 280px;
  padding: 12px 14px 14px;
  border: 9px solid #1d2b2f;
  border-radius: 36px;
  background: var(--ea-card);
  box-shadow: 0 30px 60px -24px rgba(16, 42, 50, 0.55);
}

.px-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
}

.px-signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--ea-green-soft);
  color: var(--ea-green);
  font-size: 10.5px;
  font-weight: 750;
}

.px-signal i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.px-signal[aria-pressed="false"] {
  background: var(--ea-amber-soft);
  color: var(--ea-amber-strong);
}

.px-phone-head {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.px-phone-head small {
  color: var(--ea-muted);
  font-size: 10.5px;
}

.px-phone-head strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.px-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ea-line);
}

.px-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ea-bar-green);
  transition: width var(--dur-3) var(--ease);
}

.px-progress-text {
  color: var(--ea-muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.px-checks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.px-checks button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  font-size: 12px;
  text-align: left;
  transition: background var(--dur-1) var(--ease);
}

.px-checks button::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ea-line);
  border-radius: 5px;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.px-checks button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--ea-green-soft) 55%, var(--ea-card));
}

.px-checks button[aria-pressed="true"]::before {
  border-color: var(--ea-bar-green);
  background: var(--ea-bar-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.px-shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.px-shots svg,
.px-shoot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
}

.px-shoot {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  border: 1.5px dashed color-mix(in srgb, var(--ea-green) 50%, var(--ea-line));
  color: var(--ea-green);
  font-size: 9.5px;
  font-weight: 700;
}

.px-shoot .ei {
  width: 15px;
  height: 15px;
}

.px-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  color: var(--ea-green);
  font-size: 11px;
  font-weight: 650;
}

.px-sync i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.px-sync.is-offline {
  color: var(--ea-amber-strong);
}

/* Figures: switch the base, toggle the layers */
.px-fig-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.px-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
}

.px-seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
}

.px-seg b {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ea-line);
  border-radius: 4px;
  font-size: 9px;
}

.px-seg button[aria-pressed="true"] {
  background: var(--ea-green-soft);
  color: var(--ea-green);
}

.px-draw,
.px-export button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
  font-size: 11.5px;
  font-weight: 700;
}

.px-draw .ei {
  width: 13px;
  height: 13px;
}

.px-draw:hover,
.px-export button:hover,
.px-lang:hover {
  border-color: color-mix(in srgb, var(--ea-green) 45%, var(--ea-line));
}

.px-fig-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 12px;
}

.px-sheet {
  padding: 7px;
  border: 1px solid #2b2f31;
  background: #fff;
  box-shadow: 0 10px 28px -16px rgba(16, 42, 50, 0.5);
}

.px-map {
  position: relative;
  overflow: hidden;
  aspect-ratio: 400 / 260;
}

.px-aerial,
.px-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The topographic base: USGS-style brown contours on a tan sheet */
.px-topo {
  position: absolute;
  inset: 0;
  display: none;
  background: #f1ead6;
}

.px-topo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(151, 94, 48, 0.7);
  -webkit-mask: url("assets/topo-contours.svg") 30% 40% / 260% auto no-repeat;
  mask: url("assets/topo-contours.svg") 30% 40% / 260% auto no-repeat;
}

.px-topo::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  top: 9%;
  height: 7%;
  border-radius: 50%;
  background: #9ec3d2;
  transform: rotate(-2deg);
}

.px-fig[data-base="topo"] .px-aerial {
  display: none;
}

.px-fig[data-base="topo"] .px-topo {
  display: block;
}

.px-fig[data-base="topo"] .px-l-parcels {
  stroke: #7a6a50;
}

.px-l-parcels,
.px-l-boundary,
.px-l-labels,
.px-l-obs {
  transition: opacity var(--dur-2) var(--ease);
}

.px-l-labels,
.px-l-obs {
  position: absolute;
  inset: 0;
}

.px-fig.no-parcels .px-l-parcels,
.px-fig.no-boundary .px-l-boundary,
.px-fig.no-labels .px-l-labels,
.px-fig.no-obs .px-l-obs {
  opacity: 0;
}

.px-sheet-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding: 7px 2px 1px;
  color: #33464b;
  font-size: 10px;
}

.px-sheet-foot strong {
  color: #12343c;
}

.px-legend-l {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.px-legend-l i {
  width: 14px;
  height: 2px;
  background: #d93a2b;
}

.px-layers {
  display: grid;
  align-content: start;
  gap: 6px;
}

.px-layers-h {
  margin-bottom: 2px;
}

.px-layers label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.px-layers label:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.px-layers input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.px-layers label i {
  position: relative;
  flex: none;
  width: 26px;
  height: 15px;
  margin-left: auto;
  border-radius: 9px;
  background: var(--ea-line);
  transition: background var(--dur-2) var(--ease);
}

.px-layers label i::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur-2) var(--ease);
}

.px-layers input:checked ~ i {
  background: var(--ea-bar-green);
}

.px-layers input:checked ~ i::after {
  transform: translateX(11px);
}

/* City directories */
.px-cd {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.px-cd-list,
.px-cd-out {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
}

.px-cd-list ol {
  display: grid;
  gap: 2px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 11px;
}

.px-cd-list li {
  display: flex;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.px-cd-list li b {
  color: var(--ea-green);
}

.px-cd-list li span {
  color: var(--ea-muted);
}

.px-cd-list li.is-scan {
  background: var(--ea-green-soft);
}

.px-run {
  width: 100%;
  min-height: 36px;
  font-size: 13px;
}

.px-run:disabled {
  opacity: 0.6;
  cursor: progress;
}

.px-cd-out table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.px-cd-out th {
  padding: 0 6px 6px;
  border-bottom: 1px solid var(--ea-line);
  color: var(--ea-muted);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.px-cd-out td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--ea-line);
  white-space: nowrap;
}

.px-cd-out td:first-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* One group per property: the subject first, then each adjoining direction */
.px-cd-out .px-cd-group th {
  padding: 10px 6px 6px;
  border-bottom: 1px solid var(--ea-line);
  color: var(--ea-blue-strong);
  font-size: 10px;
  letter-spacing: 0.01em;
  text-transform: none;
}

.px-cd-dl {
  margin-top: 10px;
}

.px-xls {
  width: 16px;
  height: 16px;
  color: #1d6f42;
}

.px-cd-out .px-exported {
  margin-top: 8px;
}

/* Figures: adjoining labels, sent to the report's adjoining tables */
.px-adj {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding: 10px 12px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
}

.px-adj label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--ea-line);
  font-size: 11px;
  cursor: pointer;
}

.px-adj .px-layers-h + label {
  border-top: 0;
}

.px-adj input {
  margin: 2px 0 0;
  accent-color: var(--ea-green);
}

.px-adj b {
  display: block;
  font-size: 11.5px;
}

.px-adj small {
  color: var(--ea-muted);
  font-size: 10px;
}

.px-adj .px-run {
  margin-top: 8px;
}

/* Report writer */
.px-rw {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
}

.px-rw-page {
  min-height: 330px;
  padding: 18px 22px;
  border: 1px solid #dfe5e2;
  background: #fff;
  box-shadow: 0 8px 24px -14px rgba(16, 42, 50, 0.4);
  color: #1d2b2f;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.px-rw-firm {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #116b5a;
  color: #33464b;
  font-size: 11px;
}

.px-rw-page h4 {
  margin: 0 0 6px;
  color: #12343c;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0;
}

.px-rw-page p {
  margin: 0 0 8px;
}

.px-rw-empty {
  padding: 10px;
  border: 1px dashed #c9d2cf;
  border-radius: 6px;
  color: #5b6b72;
  font-family: var(--font);
  font-size: 11.5px;
}

.px-rw-body p.is-new {
  background: rgba(60, 179, 113, 0.12);
}

.px-rw-lib {
  display: grid;
  align-content: start;
  gap: 8px;
}

.px-lang {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 9px;
  background: var(--ea-card);
  text-align: left;
}

.px-lang small {
  color: var(--ea-green);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.px-lang strong {
  font-size: 11.5px;
}

.px-lang span {
  color: var(--ea-green);
  font-size: 10.5px;
  font-weight: 700;
}

.px-lang[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--ea-green) 45%, var(--ea-line));
  background: var(--ea-green-soft);
}

.px-export {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.px-exported {
  color: var(--ea-green);
  font-size: 11px;
  font-weight: 650;
}

/* Records requests: a preview, clearly marked as not shipped */
.px-records {
  display: grid;
  gap: 8px;
}

.px-records > span:not(.px-records-tag) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-card);
  opacity: 0.75;
}

.px-records b {
  font-size: 12px;
}

.px-records small {
  grid-row: 2;
  color: var(--ea-muted);
  font-size: 10.5px;
}

.px-records .ea-chip {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.px-records-tag {
  justify-self: center;
  margin-top: 6px;
  padding: 4px 12px;
  border: 1px dashed var(--ea-line);
  border-radius: var(--r-pill);
  color: var(--ea-muted);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .px-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .px-panel {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .px-tabs {
    display: flex;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .px-tab {
    flex: none;
    width: 200px;
    scroll-snap-align: start;
  }

  .px-demo {
    padding: 10px;
  }

  .px-board {
    grid-template-columns: 220px repeat(3, 150px);
    overflow-x: auto;
  }

  .px-fig-body,
  .px-cd,
  .px-rw {
    grid-template-columns: minmax(0, 1fr);
  }

  .px-layers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .px-layers-h {
    grid-column: 1 / -1;
  }

  .px-fig-bar {
    flex-wrap: wrap;
  }
}

/* --------------------------------------------------------------------------
   Responsive: the window keeps its anatomy and sheds secondary panes
   -------------------------------------------------------------------------- */

/* Breakpoints read the app's own column (container "stage"), not the window,
   so the same rules hold whether the app sits beside the copy or below it. */
@container stage (max-width: 900px) {
  .ea-body {
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .ea-side {
    padding-inline: 10px;
  }

  .ea-brand strong {
    font-size: 17px;
  }

  .ea-nav-item {
    gap: 9px;
    padding-inline: 8px;
    font-size: 12px;
  }
}

/* Sidebar becomes the app's icon rail */
@container stage (max-width: 640px) {
  .ea-body {
    grid-template-columns: 54px minmax(0, 1fr);
    height: 520px;
  }

  .ea-side {
    align-items: center;
    padding: 12px 8px;
  }

  .ea-brand {
    padding: 0 0 10px;
  }

  .ea-brand > span,
  .ea-org,
  .ea-nav-label,
  .ea-nav-item span,
  .ea-user > span:last-child {
    display: none;
  }

  .ea-nav {
    gap: 4px;
  }

  .ea-nav-item {
    justify-content: center;
    width: 36px;
    height: 34px;
    padding: 0;
  }

  .ea-user {
    padding-inline: 0;
  }
}

@container stage (max-width: 440px) {
  .ea-chrome {
    height: 32px;
  }

  .ea-dots,
  .ea-chrome-end {
    display: none;
  }

  .ea-url {
    min-width: 0;
    font-size: 10px;
  }

  .ea-body {
    height: 470px;
  }

  .ea-tour {
    gap: 4px;
  }

  .ea-tour-btn {
    min-width: 0;
    padding: 7px 10px 8px;
    font-size: 12.5px;
  }
}

/* Main area tiers. First the side panes slim down, then they go. */
@container eam (max-width: 780px) {
  .ea-search {
    display: none;
  }

  .ea-rw {
    grid-template-columns: 146px minmax(0, 1fr) 168px;
  }

  .ea-outline,
  .ea-lib,
  .ea-inspector {
    padding: 12px;
  }

  .ea-page {
    padding: 16px 18px;
    font-size: 12.5px;
  }

  .ea-fig {
    grid-template-columns: minmax(0, 1fr) 170px;
  }

  .ea-board {
    gap: 8px;
  }

  .ea-col {
    padding: 8px;
  }
}

@container eam (max-width: 620px) {

  .ea-dash-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .ea-sites,
  .ea-downloads {
    display: none;
  }

  .ea-rw {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .ea-lib {
    display: none;
  }

  .ea-fig {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-inspector {
    display: none;
  }

  .ea-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ea-col[data-col="completed"] {
    display: none;
  }

  .ea-tool-label {
    font-size: 0;
    gap: 0;
  }
}

@container eam (max-width: 560px) {
  .ea-head {
    min-height: 54px;
    padding: 10px 12px;
  }

  .ea-title strong {
    font-size: 16px;
  }

  .ea-title strong + span {
    font-size: 10px;
  }

  .ea-actions > :not(.ea-btn-primary) {
    display: none;
  }

  /* The report header has no primary button; keep its saved state */
  .ea-view[data-view="report"] .ea-saved {
    display: inline-flex;
  }

  .ea-btn-primary {
    padding: 6px 9px;
    font-size: 10.5px;
  }

  .ea-scroll,
  .ea-board,
  .ea-cd {
    padding: 10px 12px;
  }

  .ea-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ea-kpi {
    padding: 9px 9px 14px;
  }

  .ea-kpi img {
    width: 26px;
    height: 26px;
  }

  .ea-kpi strong {
    font-size: 19px;
  }

  .ea-kpi small {
    display: none;
  }

  .ea-dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-progress,
  .ea-status {
    display: none;
  }

  /* The map fills the space the wider panels leave */
  .ea-sites {
    display: block;
  }

  .ea-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ea-col[data-col="active"] {
    display: none;
  }

  /* Cards are about 100px wide here: the status badge would sit on the number */
  .ea-pcard {
    padding: 8px;
  }

  .ea-pcard-top em {
    display: none;
  }

  .ea-pcard-top img {
    width: 22px;
    height: 22px;
  }

  .ea-rw {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-outline {
    display: none;
  }

  .ea-page-wrap {
    padding: 10px 10px 0;
  }

  .ea-page {
    padding: 14px 16px;
    font-size: 12px;
  }

  .ea-figbar {
    padding: 6px 10px;
  }

  .ea-figbar .ea-tool:not(.ea-tool-label),
  .ea-seg-ctl > span:first-child {
    display: none;
  }

  .ea-canvas {
    padding: 10px;
  }

  .ea-cd {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-listings li:nth-child(n + 5) {
    display: none;
  }

  .ea-listings li {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ea-listings li span,
  .ea-history th:nth-child(3),
  .ea-history td:nth-child(3) {
    display: none;
  }

  .ea-history td {
    padding: 7px 6px;
  }

  .ea-toast {
    left: 12px;
    right: 12px;
  }
}

@media print {
  .ea-tour,
  .ea-cursor {
    display: none !important;
  }
}
