.apt-page {
  --apt-ink: #19332d;
  --apt-muted: #64756f;
  --apt-line: #dce7e2;
  --apt-soft: #f5f8f6;
  --apt-card: #fff;
  --apt-accent: #16785e;
  --apt-accent-strong: #0e5947;
  --apt-accent-soft: #e5f4ee;
  --apt-warm: #d89b3c;
  --apt-danger: #b94b43;
  color: var(--apt-ink);
  max-width: 1640px;
  margin: 0 auto;
  min-width: 0;
}

.apt-page--harvest { --apt-accent: #9a6920; --apt-accent-strong: #70501c; --apt-accent-soft: #faf0d9; }
.apt-page--sun { --apt-accent: #b45f3e; --apt-accent-strong: #85432e; --apt-accent-soft: #fbece4; }
.apt-page--ink { --apt-accent: #386d82; --apt-accent-strong: #245264; --apt-accent-soft: #e6f1f5; }
.apt-page *, .apt-dialog * { box-sizing: border-box; }
.apt-page button, .apt-page input, .apt-page select, .apt-dialog button, .apt-dialog input { font: inherit; }
.apt-page button, .apt-page a, .apt-dialog button, .apt-dialog label { -webkit-tap-highlight-color: transparent; }

.apt-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  gap: 28px;
  padding: 34px;
  overflow: hidden;
  border-radius: 24px;
  color: #f7fbf9;
  background:
    radial-gradient(circle at 84% 16%, rgba(234, 190, 104, .28), transparent 22%),
    radial-gradient(circle at 12% 110%, rgba(77, 180, 141, .34), transparent 38%),
    linear-gradient(135deg, #113f35 0%, #185f4e 54%, #223d39 100%);
  box-shadow: 0 20px 55px rgba(21, 62, 52, .18);
}

.apt-page--harvest .apt-hero { background: radial-gradient(circle at 84% 15%, rgba(255, 219, 132, .34), transparent 25%), linear-gradient(135deg, #4b381b, #7a5620 60%, #59411d); }
.apt-page--sun .apt-hero { background: radial-gradient(circle at 86% 12%, rgba(255, 221, 161, .32), transparent 24%), linear-gradient(135deg, #56342a, #914b34 62%, #633a2f); }
.apt-page--ink .apt-hero { background: radial-gradient(circle at 87% 14%, rgba(132, 202, 225, .3), transparent 23%), linear-gradient(135deg, #183542, #275c70 58%, #203d48); }
.apt-hero::after { content: ""; position: absolute; right: -54px; bottom: -98px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.035), 0 0 0 76px rgba(255,255,255,.025); pointer-events: none; }
.apt-hero-copy, .apt-hero aside { position: relative; z-index: 1; min-width: 0; }
.apt-eyebrow { display: block; margin-bottom: 12px; color: #b8e5d5; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.apt-page--harvest .apt-eyebrow, .apt-page--sun .apt-eyebrow { color: #f5d49e; }
.apt-page--ink .apt-eyebrow { color: #b7e1ef; }
.apt-hero h1 { margin: 0; color: #fff; font-size: clamp(30px, 3vw, 46px); line-height: 1.13; letter-spacing: -.03em; }
.apt-hero-copy > p { max-width: 760px; margin: 14px 0 18px; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.75; }
.apt-hero-copy > div { display: flex; flex-wrap: wrap; gap: 8px; }
.apt-hero aside { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 22px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.apt-hero aside > span { color: rgba(255,255,255,.62); font-size: 12px; font-weight: 800; }
.apt-hero aside > strong { margin-top: 7px; color: #fff; font-size: 18px; }
.apt-hero aside > small { margin-top: 9px; color: rgba(255,255,255,.7); line-height: 1.55; }
.apt-hero aside button { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 0; border: 0; color: #fff; background: transparent; font-weight: 800; cursor: pointer; }
.apt-hero aside button svg { width: 16px; }

.apt-module-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 10px; }
.apt-module-rail a { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; align-items: center; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--apt-line); border-radius: 16px; color: var(--apt-ink); background: #fff; text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.apt-module-rail a:hover { border-color: color-mix(in srgb, var(--apt-accent) 42%, white); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31,67,57,.08); }
.apt-module-rail a.is-active { border-color: var(--apt-accent); background: linear-gradient(135deg, var(--apt-accent-soft), #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--apt-accent) 14%, transparent); }
.apt-module-rail a > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--apt-accent); background: var(--apt-accent-soft); font-size: 12px; font-style: normal; font-weight: 900; }
.apt-module-rail a span { min-width: 0; }
.apt-module-rail a strong, .apt-module-rail a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-module-rail a strong { font-size: 14px; }
.apt-module-rail a small { margin-top: 4px; color: var(--apt-muted); font-size: 11px; }
.apt-module-rail a > svg { width: 16px; color: var(--apt-accent); }

.apt-page-rail { display: flex; gap: 6px; margin-bottom: 18px; padding: 6px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--apt-line); border-radius: 14px; background: #f7faf8; scrollbar-width: thin; }
.apt-page-rail a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border-radius: 10px; color: var(--apt-muted); text-decoration: none; }
.apt-page-rail a span { font-size: 10px; font-weight: 900; }
.apt-page-rail a strong { font-size: 13px; white-space: nowrap; }
.apt-page-rail a.is-active { color: #fff; background: var(--apt-accent); box-shadow: 0 6px 15px color-mix(in srgb, var(--apt-accent) 25%, transparent); }

.apt-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.apt-metrics article { position: relative; min-height: 138px; padding: 18px; overflow: hidden; border: 1px solid var(--apt-line); border-radius: 18px; background: var(--apt-card); box-shadow: 0 8px 26px rgba(29,58,50,.045); }
.apt-metrics article > span { display: block; color: var(--apt-muted); font-size: 12px; font-weight: 800; }
.apt-metrics article > strong { display: block; margin: 8px 0 5px; color: var(--apt-ink); font-size: 26px; line-height: 1; }
.apt-metrics article > p { max-width: calc(100% - 30px); margin: 0 0 12px; color: var(--apt-muted); font-size: 11px; line-height: 1.45; }
.apt-metric-icon { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px; color: var(--apt-accent); background: var(--apt-accent-soft); }
.apt-metric-icon svg { width: 17px; }

.apt-workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); gap: 16px; align-items: start; }
.apt-workspace { min-width: 0; padding: 20px; border: 1px solid var(--apt-line); border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(32,64,55,.055); }
.apt-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.apt-section-head .kicker, .apt-action-panel .kicker, .apt-dialog .kicker { color: var(--apt-accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.apt-section-head h2 { margin: 5px 0 4px; font-size: 21px; }
.apt-section-head p { max-width: 700px; margin: 0; color: var(--apt-muted); font-size: 13px; line-height: 1.6; }

.apt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 10px; border: 1px solid var(--apt-line); border-radius: 14px; background: var(--apt-soft); }
.apt-toolbar form { display: flex; flex: 1; gap: 8px; min-width: 0; }
.apt-toolbar label { position: relative; display: flex; align-items: center; min-width: 0; }
.apt-toolbar label:first-child { flex: 1; }
.apt-toolbar label > svg { position: absolute; left: 11px; width: 16px; color: var(--apt-muted); pointer-events: none; }
.apt-toolbar input, .apt-toolbar select { width: 100%; min-height: 38px; border: 1px solid #d5e1dc; border-radius: 10px; color: var(--apt-ink); background: #fff; outline: 0; }
.apt-toolbar input { min-width: 180px; padding: 8px 10px 8px 34px; }
.apt-toolbar select { min-width: 130px; padding: 8px 30px 8px 10px; }
.apt-filter-submit, .apt-view-actions button { min-height: 38px; padding: 8px 12px; border: 1px solid #d5e1dc; border-radius: 10px; color: var(--apt-muted); background: #fff; font-weight: 800; cursor: pointer; }
.apt-filter-submit { color: #fff; border-color: var(--apt-accent); background: var(--apt-accent); }
.apt-view-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.apt-view-actions button.is-active { color: var(--apt-accent-strong); border-color: var(--apt-accent); background: var(--apt-accent-soft); }
.apt-view-actions button svg { width: 16px; }

.apt-table-shell { min-width: 0; overflow: auto; border: 1px solid var(--apt-line); border-radius: 14px; scrollbar-width: thin; }
.apt-table-shell table { width: 100%; min-width: 760px; border-collapse: collapse; }
.apt-table-shell th, .apt-table-shell td { padding: 13px 14px; border-bottom: 1px solid #e7eeeb; text-align: left; vertical-align: middle; }
.apt-table-shell th { color: var(--apt-muted); background: #f7faf8; font-size: 11px; font-weight: 900; white-space: nowrap; }
.apt-table-shell td { color: #42534e; font-size: 12px; line-height: 1.5; }
.apt-table-shell td strong { display: block; color: var(--apt-ink); font-size: 13px; }
.apt-table-shell td small { display: block; margin-top: 3px; color: #83908c; font-size: 10px; }
.apt-table-shell tr:last-child td { border-bottom: 0; }
.apt-table-shell tr[data-apt-state="attention"] td:first-child { box-shadow: inset 3px 0 var(--apt-warm); }
.apt-no-results { display: grid; place-items: center; gap: 6px; min-height: 190px; padding: 32px; color: var(--apt-muted); text-align: center; }
.apt-no-results svg { width: 28px; color: var(--apt-accent); }
.apt-no-results strong { color: var(--apt-ink); }

.apt-action-panel { position: sticky; top: 18px; display: grid; gap: 12px; min-width: 0; }
.apt-action-panel > section, .apt-action-panel > a { padding: 18px; border: 1px solid var(--apt-line); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(30,59,51,.04); }
.apt-action-panel h3 { margin: 7px 0 8px; font-size: 18px; }
.apt-action-panel p { margin: 0; color: var(--apt-muted); font-size: 12px; line-height: 1.65; }
.apt-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; margin-top: 16px; padding: 9px 13px; border: 0; border-radius: 11px; color: #fff; background: var(--apt-accent); font-weight: 900; cursor: pointer; box-shadow: 0 8px 18px color-mix(in srgb, var(--apt-accent) 24%, transparent); }
.apt-primary svg, .apt-link-button svg, .apt-action-panel > a svg { width: 16px; }
.apt-link-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 12px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--apt-line); color: var(--apt-accent); background: transparent; font-weight: 900; cursor: pointer; }
.apt-action-panel > a { display: grid; grid-template-columns: minmax(0,1fr) 18px; color: var(--apt-ink); text-decoration: none; }
.apt-action-panel > a span, .apt-action-panel > a strong { display: block; }
.apt-action-panel > a span { color: var(--apt-muted); font-size: 11px; }
.apt-action-panel > a strong { margin-top: 5px; font-size: 13px; }
.apt-action-panel > a svg { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--apt-accent); }

.apt-surface { min-width: 0; }
.apt-map-layout, .apt-passport, .apt-document-layout, .apt-evidence-layout, .apt-code-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(270px, .9fr); gap: 14px; }
.apt-map-canvas { position: relative; min-height: 380px; overflow: hidden; border-radius: 16px; background: linear-gradient(150deg, #dfeee2, #eef4e7 60%, #e6eddf); }
.apt-map-grid { position: absolute; inset: 0; opacity: .25; background-image: linear-gradient(rgba(31,91,72,.24) 1px, transparent 1px), linear-gradient(90deg, rgba(31,91,72,.24) 1px, transparent 1px); background-size: 32px 32px; transform: rotate(-6deg) scale(1.18); }
.apt-map-canvas::before, .apt-map-canvas::after { content: ""; position: absolute; border: 2px solid rgba(61,117,78,.28); background: rgba(83,151,94,.14); transform: rotate(-8deg); }
.apt-map-canvas::before { left: 11%; top: 15%; width: 42%; height: 48%; border-radius: 45% 30% 42% 28%; }
.apt-map-canvas::after { right: 10%; top: 30%; width: 32%; height: 38%; border-radius: 35% 48% 32% 45%; }
.apt-map-zone { position: absolute; z-index: 2; display: grid; grid-template-columns: 14px minmax(0,1fr); padding: 10px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 8px 20px rgba(34,78,58,.15); }
.apt-map-zone--one { left: 20%; top: 24%; }
.apt-map-zone--two { right: 14%; top: 49%; }
.apt-map-zone i { grid-row: 1 / span 2; width: 10px; height: 10px; margin-top: 4px; border: 3px solid #fff; border-radius: 50%; background: var(--apt-accent); box-shadow: 0 0 0 3px var(--apt-accent); }
.apt-map-zone strong { font-size: 12px; }
.apt-map-zone small { margin-top: 3px; color: var(--apt-muted); font-size: 9px; }
.apt-map-canvas footer { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 10px; padding: 12px; border-radius: 12px; color: #fff; background: rgba(21,60,47,.86); }
.apt-map-canvas footer svg { flex: 0 0 auto; width: 20px; }
.apt-map-canvas footer strong, .apt-map-canvas footer small { display: block; }
.apt-map-canvas footer small { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 10px; }
.apt-map-list { min-width: 0; }
.apt-map-list .apt-table-shell { height: 380px; }
.apt-map-list table { min-width: 680px; }

.apt-passport-card, .apt-timeline-card, .apt-document-preview, .apt-document-index, .apt-evidence-layout > section, .apt-evidence-layout > aside, .apt-code-visual, .apt-code-chain { padding: 18px; border: 1px solid var(--apt-line); border-radius: 16px; background: var(--apt-soft); }
.apt-passport-card > header, .apt-document-preview > header, .apt-evidence-layout > section > header { display: flex; align-items: center; gap: 10px; }
.apt-passport-card > header > span, .apt-document-preview > header > span, .apt-evidence-layout > section > header > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--apt-accent); background: var(--apt-accent-soft); }
.apt-passport-card > header svg, .apt-document-preview > header svg { width: 21px; }
.apt-passport-card h3, .apt-document-preview h3, .apt-timeline-card h3 { margin: 3px 0; font-size: 17px; }
.apt-passport-card header p, .apt-document-preview header p { margin: 0; color: var(--apt-muted); font-size: 11px; }
.apt-passport-card > header .badge, .apt-document-preview > header .badge { margin-left: auto; }
.apt-growth-ring { display: grid; place-content: center; width: 146px; height: 146px; margin: 24px auto; border-radius: 50%; background: radial-gradient(circle at center, #fff 60%, transparent 61%), conic-gradient(var(--apt-accent) calc(var(--apt-progress) * 1%), #dbe6e1 0); text-align: center; }
.apt-growth-ring strong, .apt-growth-ring span { display: block; }
.apt-growth-ring strong { font-size: 26px; }
.apt-growth-ring span { margin-top: 4px; color: var(--apt-muted); font-size: 10px; }
.apt-passport-card dl, .apt-compare dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.apt-passport-card dl div, .apt-compare dl div { padding: 10px; border-radius: 10px; background: #fff; }
.apt-passport-card dt, .apt-compare dt { color: var(--apt-muted); font-size: 10px; }
.apt-passport-card dd, .apt-compare dd { margin: 4px 0 0; font-size: 12px; font-weight: 800; }
.apt-timeline-card header span { color: var(--apt-accent); font-size: 11px; font-weight: 900; }
.apt-timeline-card ol, .apt-process-timeline, .apt-code-chain ol { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.apt-timeline-card li, .apt-process-timeline li, .apt-code-chain li { position: relative; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; min-height: 68px; }
.apt-timeline-card li:not(:last-child)::after, .apt-process-timeline li:not(:last-child)::after, .apt-code-chain li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 32px; bottom: 4px; width: 1px; background: var(--apt-line); }
.apt-timeline-card li > i, .apt-process-timeline li > time, .apt-code-chain li > i { z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--apt-line); border-radius: 50%; color: var(--apt-muted); background: #fff; font-size: 10px; font-style: normal; font-weight: 900; }
.apt-timeline-card li.is-done > i, .apt-process-timeline li.is-done > time { color: #fff; border-color: var(--apt-accent); background: var(--apt-accent); }
.apt-timeline-card li.is-current > i, .apt-process-timeline li.is-current > time, .apt-code-chain li.is-current > i { color: var(--apt-accent); border-color: var(--apt-accent); background: var(--apt-accent-soft); }
.apt-timeline-card li strong, .apt-process-timeline li strong, .apt-code-chain li strong { display: block; font-size: 12px; }
.apt-timeline-card li small, .apt-process-timeline li small, .apt-code-chain li small { display: block; margin-top: 4px; color: var(--apt-muted); font-size: 10px; }

.apt-timeline-layout { display: grid; grid-template-columns: minmax(220px,.35fr) minmax(0,.65fr); gap: 14px; }
.apt-process-timeline { margin: 0; padding: 16px; border: 1px solid var(--apt-line); border-radius: 14px; background: var(--apt-soft); }
.apt-document-sheet { margin-top: 16px; padding: 24px; border: 1px solid #e2ddd0; border-radius: 4px; background: #fffdf7; box-shadow: 0 12px 22px rgba(86,73,49,.07); }
.apt-document-sheet > span { color: var(--apt-muted); font-size: 10px; }
.apt-document-sheet > strong { display: block; margin-top: 5px; font-family: ui-serif, Georgia, serif; font-size: 20px; }
.apt-document-sheet > p { color: #5f625c; font-size: 12px; line-height: 1.8; }
.apt-document-sheet > div { display: flex; flex-wrap: wrap; gap: 6px; }
.apt-document-sheet b { padding: 6px 8px; border-radius: 6px; color: #6a552e; background: #f6ead0; font-size: 9px; }
.apt-document-index h3 { margin: 0 0 12px; font-size: 15px; }
.apt-document-index button { display: grid; grid-template-columns: 30px minmax(0,1fr) 16px; align-items: center; gap: 9px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--apt-line); color: var(--apt-ink); background: transparent; text-align: left; cursor: pointer; }
.apt-document-index button:last-child { border-bottom: 0; }
.apt-document-index button > i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--apt-accent); background: var(--apt-accent-soft); font-size: 10px; font-style: normal; font-weight: 900; }
.apt-document-index strong, .apt-document-index small { display: block; }
.apt-document-index strong { font-size: 12px; }
.apt-document-index small { margin-top: 3px; color: var(--apt-muted); font-size: 9px; }
.apt-document-index svg { width: 15px; color: var(--apt-accent); }

.apt-compare { display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); gap: 10px; align-items: stretch; margin-bottom: 14px; }
.apt-compare > section { padding: 16px; border: 1px solid var(--apt-line); border-radius: 14px; background: var(--apt-soft); }
.apt-compare > section.is-after { border-color: color-mix(in srgb, var(--apt-accent) 44%, white); background: var(--apt-accent-soft); }
.apt-compare > section > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.apt-compare > section > header > span { font-weight: 900; }
.apt-compare > i { display: grid; place-items: center; color: var(--apt-accent); }
.apt-compare > i svg { width: 22px; }

.apt-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.apt-card-grid > article { padding: 16px; border: 1px solid var(--apt-line); border-radius: 15px; background: linear-gradient(180deg,#fff,var(--apt-soft)); }
.apt-card-grid > article > header { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.apt-card-grid > article > header > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--apt-accent); background: var(--apt-accent-soft); }
.apt-card-grid > article > header svg { width: 19px; }
.apt-card-grid > article > header small { color: var(--apt-muted); font-size: 9px; }
.apt-card-grid > article h3 { margin: 3px 0 0; font-size: 14px; }
.apt-card-grid dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 15px 0; }
.apt-card-grid dl div { padding: 9px; border-radius: 9px; background: #fff; }
.apt-card-grid dt { color: var(--apt-muted); font-size: 9px; }
.apt-card-grid dd { margin: 4px 0 0; font-size: 11px; font-weight: 800; }
.apt-card-grid footer button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 0 0; border: 0; border-top: 1px solid var(--apt-line); color: var(--apt-accent); background: transparent; font-size: 11px; font-weight: 900; cursor: pointer; }
.apt-card-grid footer svg { width: 15px; }
.apt-page.is-compact .apt-card-grid { grid-template-columns: 1fr; }

.apt-flow-surface > ol { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.apt-flow-surface > ol li { display: grid; grid-template-columns: 30px minmax(0,1fr) 16px; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--apt-line); border-radius: 12px; background: var(--apt-soft); }
.apt-flow-surface > ol li.is-current { border-color: var(--apt-accent); background: var(--apt-accent-soft); }
.apt-flow-surface > ol i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--apt-accent); background: #fff; font-size: 9px; font-style: normal; font-weight: 900; }
.apt-flow-surface > ol strong, .apt-flow-surface > ol small { display: block; }
.apt-flow-surface > ol strong { font-size: 11px; }
.apt-flow-surface > ol small { margin-top: 3px; color: var(--apt-muted); font-size: 8px; }
.apt-flow-surface > ol svg { width: 14px; color: var(--apt-accent); }

.apt-evidence-layout > section > article { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 9px; margin-top: 10px; padding: 11px; border: 1px solid #d9e9e2; border-radius: 11px; background: #fff; }
.apt-evidence-layout > section > article.is-blocked { border-color: #efd3c7; background: #fff8f4; }
.apt-evidence-layout > section > article > i { color: var(--apt-accent); }
.apt-evidence-layout > section > article.is-blocked > i { color: var(--apt-danger); }
.apt-evidence-layout > section > article svg { width: 18px; }
.apt-evidence-layout > section > article strong, .apt-evidence-layout > section > article small { display: block; }
.apt-evidence-layout > section > article strong { font-size: 11px; }
.apt-evidence-layout > section > article small { margin-top: 3px; color: var(--apt-muted); font-size: 9px; }
.apt-evidence-layout > aside { min-width: 0; padding: 0; overflow: hidden; }
.apt-evidence-layout table { min-width: 680px; }

.apt-code-visual { display: flex; align-items: center; gap: 18px; min-height: 220px; background: linear-gradient(135deg,var(--apt-accent-soft),#fff); }
.apt-code-mark { display: grid; grid-template-columns: repeat(6,10px); grid-auto-rows: 10px; gap: 3px; padding: 13px; border: 8px solid #fff; background: #fff; box-shadow: 0 8px 20px rgba(20,50,44,.12); }
.apt-code-mark i { background: #e3e9e6; }
.apt-code-mark i.is-on { background: var(--apt-ink); }
.apt-code-visual > div:last-child span, .apt-code-visual > div:last-child strong, .apt-code-visual > div:last-child small { display: block; }
.apt-code-visual > div:last-child span { color: var(--apt-muted); font-size: 10px; }
.apt-code-visual > div:last-child strong { margin: 6px 0; font-size: 16px; }
.apt-code-visual > div:last-child small { color: var(--apt-danger); font-size: 9px; }
.apt-code-chain h3 { margin: 0; font-size: 15px; }
.apt-code-layout + .apt-table-shell { margin-top: 14px; }

.apt-ledger-banner { display: grid; grid-template-columns: minmax(220px,.35fr) minmax(0,.65fr); gap: 12px; margin-bottom: 14px; }
.apt-ledger-banner > div { display: grid; place-content: center; min-height: 180px; padding: 20px; border-radius: 15px; color: #fff; background: linear-gradient(145deg,var(--apt-accent-strong),var(--apt-accent)); text-align: center; }
.apt-ledger-banner > div span, .apt-ledger-banner > div strong, .apt-ledger-banner > div small { display: block; }
.apt-ledger-banner > div span { color: rgba(255,255,255,.68); font-size: 10px; }
.apt-ledger-banner > div strong { margin: 8px 0; font-size: 42px; }
.apt-ledger-banner > div small { color: rgba(255,255,255,.74); font-size: 10px; line-height: 1.6; }
.apt-ledger-banner ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.apt-ledger-banner li { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--apt-line); border-radius: 12px; background: var(--apt-soft); }
.apt-ledger-banner li i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--apt-accent); background: #fff; font-size: 10px; font-style: normal; font-weight: 900; }
.apt-ledger-banner li strong, .apt-ledger-banner li small { display: block; }
.apt-ledger-banner li strong { font-size: 11px; }
.apt-ledger-banner li small { margin-top: 3px; color: var(--apt-muted); font-size: 9px; }

.apt-boundary { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 16px; padding: 15px 18px; border: 1px solid #dbe7e1; border-radius: 16px; color: #40554d; background: #f5f9f6; }
.apt-boundary > svg { width: 22px; color: var(--apt-accent); }
.apt-boundary strong, .apt-boundary p { display: block; margin: 0; }
.apt-boundary strong { color: var(--apt-ink); font-size: 12px; }
.apt-boundary p { margin-top: 4px; color: var(--apt-muted); font-size: 10px; line-height: 1.5; }

.apt-state { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 118px; margin-bottom: 16px; padding: 20px; border: 1px solid #d8e6e0; border-radius: 18px; background: #f5faf7; }
.apt-state > svg { width: 28px; color: var(--apt-accent); }
.apt-state strong { font-size: 16px; }
.apt-state p { margin: 5px 0 0; color: var(--apt-muted); font-size: 12px; }
.apt-state button { padding: 9px 12px; border: 1px solid var(--apt-line); border-radius: 10px; color: var(--apt-accent); background: #fff; font-weight: 800; }
.apt-state--forbidden, .apt-state--error, .apt-state--server-error { border-color: #eccfc9; background: #fff7f5; }
.apt-state--forbidden > svg, .apt-state--error > svg, .apt-state--server-error > svg { color: var(--apt-danger); }
.apt-state--loading { min-height: 240px; background: linear-gradient(90deg,#f4f8f6 25%,#eaf1ee 37%,#f4f8f6 63%); background-size: 400% 100%; animation: apt-skeleton 1.35s ease infinite; }
@keyframes apt-skeleton { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.apt-dialog-backdrop { position: fixed; z-index: 1500; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(15,35,30,.55); backdrop-filter: blur(7px); }
.apt-dialog { display: flex; flex-direction: column; width: min(680px,100%); max-height: min(760px,calc(100vh - 40px)); overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(13,37,31,.32); }
.apt-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 18px; border-bottom: 1px solid var(--apt-line); }
.apt-dialog h2 { margin: 5px 0 4px; font-size: 22px; }
.apt-dialog header p { max-width: 550px; margin: 0; color: var(--apt-muted); font-size: 12px; line-height: 1.55; }
.apt-dialog [data-apt-close][aria-label] { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--apt-line); border-radius: 10px; color: var(--apt-muted); background: #fff; font-size: 22px; cursor: pointer; }
.apt-dialog-body { overflow-y: auto; padding: 20px 24px; }
.apt-dialog-summary { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 13px; border-radius: 13px; color: #fff; background: linear-gradient(135deg,#184f41,#26715d); }
.apt-dialog-summary > svg { width: 20px; }
.apt-dialog-summary strong, .apt-dialog-summary small { display: block; }
.apt-dialog-summary strong { font-size: 13px; }
.apt-dialog-summary small { margin-top: 3px; color: rgba(255,255,255,.68); font-size: 9px; }
.apt-dialog fieldset { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; border: 0; }
.apt-dialog legend { margin-bottom: 8px; color: var(--apt-muted); font-size: 11px; font-weight: 900; }
.apt-dialog fieldset label { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; padding: 13px; border: 1px solid var(--apt-line); border-radius: 12px; cursor: pointer; }
.apt-dialog fieldset input { position: absolute; opacity: 0; pointer-events: none; }
.apt-dialog fieldset label > i { position: relative; width: 20px; height: 20px; border: 2px solid #b8c8c2; border-radius: 6px; background: #fff; }
.apt-dialog fieldset input:checked + i { border-color: var(--apt-accent); background: var(--apt-accent); }
.apt-dialog fieldset input:checked + i::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.apt-dialog fieldset strong, .apt-dialog fieldset small { display: block; }
.apt-dialog fieldset strong { font-size: 12px; }
.apt-dialog fieldset small { margin-top: 3px; color: var(--apt-muted); font-size: 9px; }
.apt-dialog-result { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 13px; border-radius: 12px; color: #195a47; background: #e7f5ef; }
.apt-dialog-result svg { width: 20px; }
.apt-dialog-result strong, .apt-dialog-result small { display: block; }
.apt-dialog-result strong { font-size: 12px; }
.apt-dialog-result small { margin-top: 3px; color: #4f7568; font-size: 9px; }
.apt-dialog > footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--apt-line); background: var(--apt-soft); }
.apt-dialog > footer > span { display: flex; align-items: center; gap: 7px; margin-right: auto; color: var(--apt-muted); font-size: 10px; }
.apt-dialog > footer > span svg { width: 15px; }
.has-apt-dialog { overflow: hidden; }

.apt-page :is(a,button,input,select,[tabindex]):focus-visible, .apt-dialog :is(button,input,label):focus-visible { outline: 3px solid color-mix(in srgb, var(--apt-accent) 34%, transparent); outline-offset: 2px; }
[data-apt-record][hidden] { display: none !important; }

@media (max-width: 1200px) {
  .apt-module-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .apt-workspace-grid { grid-template-columns: minmax(0,1fr) 270px; }
  .apt-toolbar { align-items: stretch; flex-direction: column; }
  .apt-view-actions { justify-content: flex-end; }
  .apt-map-layout, .apt-document-layout, .apt-evidence-layout { grid-template-columns: 1fr; }
  .apt-map-list .apt-table-shell { height: auto; }
}

@media (max-width: 1024px) {
  .apt-hero { grid-template-columns: 1fr; }
  .apt-hero aside { min-height: auto; }
  .apt-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .apt-workspace-grid { grid-template-columns: 1fr; }
  .apt-action-panel { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .apt-action-panel > a { grid-column: 1 / -1; }
  .apt-passport, .apt-code-layout { grid-template-columns: 1fr; }
  .apt-flow-surface > ol { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 768px) {
  .apt-page { width: 100%; overflow: clip; }
  .apt-hero { gap: 18px; padding: 24px 20px; border-radius: 18px; }
  .apt-hero h1 { font-size: 30px; }
  .apt-hero-copy > p { font-size: 14px; }
  .apt-module-rail { display: flex; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .apt-module-rail a { flex: 0 0 250px; scroll-snap-align: start; }
  .apt-metrics { gap: 9px; }
  .apt-metrics article { min-height: 125px; padding: 15px; }
  .apt-workspace { padding: 15px; border-radius: 16px; }
  .apt-section-head { flex-direction: column; }
  .apt-toolbar form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .apt-toolbar label:first-child { grid-column: 1 / -1; }
  .apt-toolbar input, .apt-toolbar select { min-width: 0; }
  .apt-timeline-layout, .apt-ledger-banner { grid-template-columns: 1fr; }
  .apt-card-grid { grid-template-columns: 1fr; }
  .apt-compare { grid-template-columns: 1fr; }
  .apt-compare > i { transform: rotate(90deg); }
  .apt-boundary { grid-template-columns: 24px minmax(0,1fr); }
  .apt-boundary .badge { grid-column: 2; justify-self: start; }
  .apt-dialog-backdrop { align-items: end; padding: 0; }
  .apt-dialog { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
}

@media (max-width: 560px) {
  .apt-metrics { grid-template-columns: 1fr 1fr; }
  .apt-metrics article { min-height: 132px; }
  .apt-metric-icon { width: 31px; height: 31px; }
  .apt-toolbar form { grid-template-columns: 1fr; }
  .apt-toolbar label:first-child { grid-column: auto; }
  .apt-view-actions { justify-content: stretch; }
  .apt-view-actions button { flex: 1; }
  .apt-action-panel { grid-template-columns: 1fr; }
  .apt-action-panel > a { grid-column: auto; }
  .apt-flow-surface > ol { grid-template-columns: 1fr; }
  .apt-passport-card dl, .apt-card-grid dl { grid-template-columns: 1fr; }
  .apt-map-canvas { min-height: 330px; }
  .apt-map-zone--one { left: 9%; }
  .apt-map-zone--two { right: 7%; }
  .apt-table-shell { overflow: visible; border: 0; }
  .apt-table-shell table, .apt-table-shell tbody, .apt-table-shell tr, .apt-table-shell td { display: block; width: 100%; min-width: 0; }
  .apt-table-shell thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .apt-table-shell tbody { display: grid; gap: 10px; }
  .apt-table-shell tr { padding: 12px; border: 1px solid var(--apt-line); border-radius: 13px; background: #fff; }
  .apt-table-shell tr[data-apt-state="attention"] { border-left: 3px solid var(--apt-warm); }
  .apt-table-shell tr[data-apt-state="attention"] td:first-child { box-shadow: none; }
  .apt-table-shell td { display: grid; grid-template-columns: minmax(88px,.35fr) minmax(0,.65fr); gap: 9px; padding: 7px 0; border-bottom: 1px dashed #e3ebe7; }
  .apt-table-shell td:last-child { border-bottom: 0; }
  .apt-table-shell td::before { content: attr(data-label); color: var(--apt-muted); font-size: 10px; font-weight: 800; }
  .apt-map-list .apt-table-shell { height: auto; }
  .apt-state { grid-template-columns: 34px minmax(0,1fr); }
  .apt-state button { grid-column: 2; justify-self: start; }
  .apt-dialog > header, .apt-dialog-body, .apt-dialog > footer { padding-left: 18px; padding-right: 18px; }
  .apt-dialog > footer { flex-wrap: wrap; }
  .apt-dialog > footer > span { width: 100%; margin: 0 0 4px; }
}

@media (max-width: 375px) {
  .apt-hero { padding: 21px 16px; }
  .apt-hero h1 { font-size: 27px; }
  .apt-hero aside { padding: 16px; }
  .apt-module-rail a { flex-basis: 225px; }
  .apt-metrics { grid-template-columns: 1fr; }
  .apt-metrics article { min-height: 116px; }
  .apt-workspace { padding: 12px; }
  .apt-toolbar { padding: 8px; }
  .apt-map-zone { max-width: 160px; }
  .apt-code-visual { align-items: flex-start; flex-direction: column; }
  .apt-ledger-banner ol { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .apt-page *, .apt-dialog * { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
