/* ════════════════════════════════════════════
   AGENTIC EXTRACTION DEMO — shared stylesheet.

   Loaded only by the pages that embed the demo
   (landing/home.html, landing/occupiers.html)
   alongside static/js/ae-demo.js and one of the
   static/js/ae-data-*.js datasets.

   Everything here is scoped under .ae. It inherits
   four tokens from reavant.css / the host page:
   --brass, --brass-deep, --ink-soft, --ease, --mono.
   ════════════════════════════════════════════ */

.ae{
  /* --rv-* tokens, verbatim from the product */
  --g:#9e8c5f; --g-h:#8a7a52; --g-l:#d3b58a; --g-bg:#f3f0e6; --g-bd:#ddd5c2;
  --t:#2e1a47; --t-mid:#4a3f5c; --t-mut:#8a8292; --t-ph:#b5b0ba;
  --w:#fff; --sf:#f5f2ed; --bd:#e2ded6; --bd-l:#eae7e0; --hd:#e4e0d8;
  --red:#c9414b; --red-bg:#fdf0f0; --red-bd:#e8bcbe;
  --coral:#d98558; --coral-bg:#fdf2eb; --coral-bd:#f0d0b8;
  --sage:#5c7064; --sage-bg:#eaf0ec; --sage-bd:#b8c8be;
  --green:#3a7a50; --green-bg:#eaf5ee; --green-bd:#b8d9c5;
  --pur:#2e1a47; --pur-bg:#efeaf6; --pur-bd:#d5cce8;
  --ff:'DM Sans','Schibsted Grotesk',system-ui,sans-serif;
  --fm:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --row:46px; --head:62px;
  /* frame height — set per page to suit the number of rows in its table */
  --body-h:513px;
  font-family:var(--ff);color:var(--t);
  position:relative;
  background:var(--w);
  border:1px solid var(--t);
  border-radius:8px;
  box-shadow:0 32px 64px -32px rgba(46,26,71,.32), 0 1px 0 rgba(46,26,71,.05);
  overflow:hidden;
}
.ae *{box-sizing:border-box}
.ae button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
/* the frame is a display piece — it scrolls, but never shows a scrollbar */
.ae *{scrollbar-width:none;-ms-overflow-style:none}
.ae ::-webkit-scrollbar{width:0;height:0;display:none}

/* ——— app bar ——— */
.ae-bar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:11px 16px;background:var(--sf);border-bottom:1px solid var(--bd);
}
.ae-bar-l{display:flex;align-items:center;gap:10px;min-width:0}
.ae-bar h3{font-family:var(--ff);font-size:13px;font-weight:600;color:var(--t);letter-spacing:0}
.ae-bar-meta{font-size:11px;color:var(--t-mut);white-space:nowrap}
.ae-prog{display:flex;align-items:center;gap:8px;flex-shrink:0}
.ae-prog-track{width:88px;height:4px;background:var(--bd);border-radius:2px;overflow:hidden}
.ae-prog-fill{height:100%;background:var(--g);border-radius:2px;width:100%}
.ae-prog-num{font-family:var(--fm);font-size:10px;color:var(--t-mut);white-space:nowrap}
/* progress and the run controls share the right-hand end of the bar */
.ae-bar-r{display:flex;align-items:center;gap:16px;flex-shrink:0}
.ae-tools{display:flex;align-items:center;gap:8px}
@media(max-width:760px){.ae-bar-meta,.ae-prog{display:none}}
/* on a narrow bar the reporting date yields; Run all never does */
@media(max-width:860px){.ae-tools .ae-btn:not(.gold){display:none}}

/* product Button: gold / default / ghost */
.ae-btn{
  display:inline-flex;align-items:center;gap:5px;border-radius:7px;border:1px solid var(--bd);
  padding:7px 13px;font-size:12px;font-weight:500;line-height:1;letter-spacing:.01em;
  background:var(--w);color:var(--t-mid);box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:background .15s,border-color .15s,color .15s;
}
.ae-btn:hover{background:var(--sf)}
.ae-btn.gold{background:var(--g);border-color:var(--g);color:var(--w);box-shadow:0 1px 3px rgba(158,140,95,.3)}
.ae-btn.gold:hover{background:var(--g-h)}
.ae-btn.ghost{background:none;border-color:transparent;color:var(--t-mut)}
.ae-btn.ghost:hover{background:var(--sf);color:var(--t)}

/* product Badge */
.ae-badge{
  display:inline-flex;align-items:center;gap:3px;white-space:nowrap;border-radius:5px;
  border:1px solid;padding:3px 8px;font-size:10px;font-weight:600;line-height:1;letter-spacing:.02em;
}
.ae-badge.gold{color:var(--g);background:var(--g-bg);border-color:var(--g-bd)}
.ae-badge.purple{color:var(--pur);background:var(--pur-bg);border-color:var(--pur-bd)}
.ae-badge.green{color:var(--green);background:var(--green-bg);border-color:var(--green-bd)}
.ae-badge.coral{color:var(--coral);background:var(--coral-bg);border-color:var(--coral-bd)}
.ae-badge.red{color:var(--red);background:var(--red-bg);border-color:var(--red-bd)}
.ae-badge.sage{color:var(--sage);background:var(--sage-bg);border-color:var(--sage-bd)}
/* the collection badge is the doorway to the document chain */
.ae-tlbadge{cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.ae-tlbadge:hover{background:var(--pur);border-color:var(--pur);color:#fff}

/* ——— body: table | cell panel ———
   Height is pinned to header (62) + 9 rows (414) + footer (37) so the table
   fills its side exactly, leaving no void beside the panel. */
.ae-body{display:flex;align-items:stretch;height:var(--body-h)}
.ae-main{flex:1;min-width:0;display:flex;flex-direction:column}
.ae-scroll{overflow-x:auto;flex:1}

/* the Run button asks to be pressed, until it has been */
.ae-btn.gold.calls{animation:ae-call 2.4s ease-out infinite}
@keyframes ae-call{
  0%{box-shadow:0 1px 3px rgba(158,140,95,.3), 0 0 0 0 rgba(158,140,95,.45)}
  60%{box-shadow:0 1px 3px rgba(158,140,95,.3), 0 0 0 8px rgba(158,140,95,0)}
  100%{box-shadow:0 1px 3px rgba(158,140,95,.3), 0 0 0 0 rgba(158,140,95,0)}
}
.reduced .ae-btn.gold.calls{animation:none}
.ae-spin{animation:ae-rot .9s linear infinite;display:flex}
@keyframes ae-rot{to{transform:rotate(360deg)}}
.reduced .ae-spin{animation:none}
.ae-prog-fill{transition:width .3s var(--ease)}

/* ——— the extraction table ——— */
table.ae-t{width:100%;min-width:778px;border-collapse:collapse;table-layout:fixed}
.ae-t th:nth-child(1){width:236px}
.ae-t th:nth-child(2){width:84px}
.ae-t th:nth-child(3){width:176px}
.ae-t th:nth-child(4){width:136px}
.ae-t th:nth-child(5){width:146px}
.ae-t th{
  height:var(--head);background:var(--hd);border-bottom:1px solid var(--bd);
  text-align:left;padding:0 14px;font-size:11px;font-weight:600;color:var(--t-mid);
  letter-spacing:.01em;white-space:nowrap;vertical-align:middle;
}
.ae-t th .fmt{display:block;font-size:9px;font-weight:500;color:var(--t-mut);margin-top:3px;letter-spacing:.02em}
.ae-t td{
  height:var(--row);border-bottom:1px solid var(--bd-l);padding:0;
  font-size:13px;color:var(--t);vertical-align:middle;
}
.ae-t tbody tr{background:var(--w);transition:background .12s}
.ae-t tbody tr:hover{background:#f0ede6}
.ae-t tbody tr.sel{background:#f0ebe0}

/* document name cell */
.ae-doccell{display:flex;align-items:center;gap:6px;padding:0 14px;min-width:0}
.ae-docname{
  font-size:12px;font-weight:500;color:var(--t);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* a data cell — the whole cell is the hit target, as in the product */
.ae-cell{
  display:flex;align-items:center;gap:5px;width:100%;height:var(--row);
  padding:0 14px;font-size:13px;color:var(--t);text-align:left;
  transition:box-shadow .12s;
}
.ae-cell .val{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ae-cell.mono .val{font-family:var(--fm);font-size:12px}
.ae-cell:hover{box-shadow:inset 0 0 0 1px var(--g-bd)}
.ae-cell[aria-current=true]{background:var(--g-bg);box-shadow:inset 0 0 0 1px var(--g)}
/* run states — empty -> pending -> running -> completed, as in the product */
.ae-cell.is-empty .val{color:var(--t-ph)}
.ae-cell.is-pending .val{font-size:12px;color:var(--t-mut)}
.ae-cell.is-empty,.ae-cell.is-pending,.ae-cell.is-running{cursor:default}
.ae-cell.is-empty:hover,.ae-cell.is-pending:hover,.ae-cell.is-running:hover{box-shadow:none}
.ae-skel{
  display:block;height:9px;width:62%;border-radius:3px;
  background:linear-gradient(90deg,#eceae4 25%,#f7f5f1 37%,#eceae4 63%);
  background-size:400% 100%;animation:ae-shimmer 1.4s ease-in-out infinite;
}
@keyframes ae-shimmer{0%{background-position:100% 50%}100%{background-position:0 50%}}
.reduced .ae-skel{animation:none}
.ae-cell .ico{flex-shrink:0;display:flex;align-items:center}
.ae-cell .ico.warn{color:var(--red)}
.ae-cell .ico.flag{color:var(--coral)}
.ae-cell .ico.lock{color:var(--sage)}
/* highlight overlays — mirrors the View ▸ Highlight cells option */
.ae-cell.hl-err{background:var(--red-bg)}
.ae-cell.hl-flag{background:var(--coral-bg)}
.ae-cell.hl-lock{background:var(--sage-bg)}
.ae-t td.pad{padding:0 14px;color:var(--t-mut);font-size:12px}

/* the one affordance the product doesn't need but a first-time visitor does */
@keyframes ae-pulse{
  0%{box-shadow:0 0 0 0 rgba(158,140,95,.5)}
  70%{box-shadow:0 0 0 7px rgba(158,140,95,0)}
  100%{box-shadow:0 0 0 0 rgba(158,140,95,0)}
}
.ae-lede{
  display:flex;align-items:center;gap:10px;margin-top:14px;
  font-family:var(--mono);font-size:.72rem;line-height:1.5;letter-spacing:.06em;
  text-transform:uppercase;color:var(--brass-deep);
}
.ae-lede .pulse{
  width:7px;height:7px;border-radius:50%;background:var(--brass);flex-shrink:0;
  animation:ae-pulse 2s ease-out infinite;
}
.reduced .ae-lede .pulse{animation:none}
@media(max-width:620px){.ae-lede{font-size:.66rem;letter-spacing:.04em}}
/* the disclaimer shares the lede's line, pushed to the far end */
.ae-lede .msg{min-width:0}
.ae-lede .cap{margin-left:auto;color:var(--ink-soft);text-align:right;white-space:nowrap}
@media(max-width:860px){.ae-lede .cap{display:none}}

/* section label + its right-hand chips share one baseline */
.ae-sec-head{display:flex;align-items:center;gap:6px;margin-bottom:5px;flex-wrap:wrap}
.ae-sec-head .ae-sec-label{margin-bottom:0}
.ae-sec-head .ae-badge{margin-left:auto}
.ae-sec-head .ae-ts{margin-left:auto}
/* the literal text lifted from the document, shown under Extraction */
.ae-raw{
  font-size:11.5px;line-height:1.6;color:var(--t-mid);white-space:pre-wrap;
  padding:8px 10px;background:var(--sf);border:1px solid var(--bd-l);border-radius:7px;
}
/* evidence_type prints the enum verbatim */
.ae-ev{
  font-family:var(--fm);font-size:9px;font-weight:600;letter-spacing:.06em;
  padding:2px 6px;border-radius:4px;text-transform:uppercase;
}
.ae-ev.sage{color:var(--sage);background:var(--sage-bg)}
.ae-ev.gold{color:var(--g);background:var(--g-bg)}
/* the document-timeline card: icon, two lines, chevron */
.ae-tlcard{
  display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;border-radius:7px;
  background:var(--sf);border:1px solid var(--bd-l);text-align:left;
  transition:border-color .15s,background .15s;
}
.ae-tlcard:hover{border-color:var(--g);background:var(--g-bg)}
.ae-tlcard .ti{color:var(--g);flex-shrink:0;display:flex}
.ae-tlcard .tt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.ae-tlcard .t1{font-size:12px;font-weight:600;color:var(--t)}
.ae-tlcard .t2{font-size:11px;color:var(--t-mut)}
.ae-tlcard .chev{color:var(--t-mut);flex-shrink:0;display:flex}
.ae-openitems{
  display:flex;align-items:center;gap:5px;margin-top:7px;
  font-size:11px;font-weight:500;color:var(--red);
}
.ae-openitems svg{flex-shrink:0}
/* the panel's value actions — override, verify, flag */
.ae-actions .ae-ib.sm{width:24px;height:24px;border:1px solid var(--bd-l);border-radius:6px}
.ae-ib.on-sage{color:var(--sage);background:var(--sage-bg);border-color:var(--sage-bd)}
.ae-ib.on-coral{color:var(--coral);background:var(--coral-bg);border-color:var(--coral-bd)}
.ae-btn.sm{font-size:11px;padding:4px 8px}
.ae-note{margin-top:9px}

/* ——— table footer ——— */
.ae-foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:9px 16px;background:#f8f5f0;border-top:1px solid var(--bd);
  font-size:11px;color:var(--t-mut);
}
.ae-foot .mono{font-family:var(--fm)}

/* ——— cell side panel ——— */
.ae-panel{
  width:356px;flex-shrink:0;background:var(--w);border-left:1px solid var(--bd);
  display:flex;flex-direction:column;position:relative;
}
/* scrollbars are hidden, so the richest cells need a cue that there is more
   below. The fade sits over the body's bottom padding once fully scrolled. */
.ae-panel::after{
  content:'';position:absolute;left:1px;right:0;bottom:0;height:30px;pointer-events:none;
  background:linear-gradient(to bottom,rgba(255,255,255,0),var(--w));
}
@media(max-width:980px){.ae-panel::after{display:none}}
.ae-panel-head{
  height:var(--head);flex-shrink:0;display:flex;align-items:center;gap:8px;
  padding:0 12px 0 16px;border-bottom:1px solid var(--bd-l);
}
.ae-panel-head .crumb{flex:1;min-width:0}
.ae-panel-head .doc{
  font-size:10px;color:var(--t-mut);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ae-panel-head .col{font-size:14px;font-weight:600;color:var(--t);line-height:1.3}
.ae-panel-body{padding:14px 16px 26px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:13px}
.ae-sec-label{
  font-size:10px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--t-mut);margin-bottom:5px;
}
.ae-sub-label{font-size:10px;font-weight:600;color:var(--t-mut);margin-bottom:4px}
.ae-value{font-size:17px;font-weight:600;color:var(--t);line-height:1.25;margin-bottom:5px}
.ae-value.mono{font-family:var(--fm);font-size:16px}
.ae-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ae-actions{display:flex;gap:6px;margin-top:12px}

/* source card — the door to the document */
.ae-src{
  display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border-radius:7px;
  background:var(--sf);border:1px solid var(--bd-l);text-align:left;
  transition:border-color .15s,background .15s;
}
.ae-src:hover{border-color:var(--g);background:var(--g-bg)}
.ae-src .lk{color:var(--g);flex-shrink:0;display:flex}
.ae-src .meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.ae-src .nm{display:block;font-size:12px;font-weight:600;color:var(--t);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ae-src .pg{display:block;font-size:11px;color:var(--t-mut)}
.ae-src .rel{display:block;font-family:var(--fm);font-size:9px;letter-spacing:.06em;color:var(--t-mut);margin-top:2px}
.ae-src .chev{color:var(--t-mut);flex-shrink:0;transition:transform .2s}
.ae-src + .ae-src{margin-top:6px}
.ae-src.past .nm{font-weight:500;color:var(--t-mid)}
.ae-src.past .lk{color:var(--t-ph)}

/* cited passage — the product's signature quote block */
.ae-quote{
  padding:8px 10px;border-radius:7px;background:var(--sf);
  border:1px solid var(--bd-l);border-left:3px solid var(--g-l);
  font-size:11.5px;line-height:1.5;font-style:italic;color:var(--t-mid);
}
.ae-quote + .ae-quote{margin-top:5px}
.ae-quote .qh{
  display:block;font-family:var(--fm);font-style:normal;font-size:9px;letter-spacing:.04em;
  color:var(--t-mut);margin-bottom:5px;
}
.ae-reason{font-size:11.5px;line-height:1.5;color:var(--t-mid)}
.ae-note{
  display:flex;gap:6px;padding:9px 11px;border-radius:7px;font-size:11px;line-height:1.5;
}
.ae-note.err{background:var(--red-bg);border:1px solid var(--red-bd);color:var(--red)}
.ae-note.err b{font-weight:600}
.ae-ts{font-family:var(--fm);font-size:10px;color:var(--t-mut)}
.ae-empty{font-size:12px;font-style:italic;color:var(--t-ph);line-height:1.5}

/* ——— overlay panels: timeline + doc viewer ——— */
.ae-over{
  position:absolute;inset:0;z-index:20;background:rgba(46,26,71,.28);
  opacity:0;visibility:hidden;transition:opacity .25s var(--ease),visibility .25s;
}
.ae-over.open{opacity:1;visibility:visible}
/* a class-level display: wins over the [hidden] UA rule, which would leave the
   inactive overlay stacked on top of the active one, eating its clicks */
.ae-tl[hidden],.ae-dv[hidden]{display:none}

.ae-tl{
  position:absolute;top:0;bottom:0;right:0;width:440px;max-width:100%;
  background:var(--w);border-left:1px solid var(--bd);
  display:flex;flex-direction:column;
  transform:translateX(100%);transition:transform .35s var(--ease);
}
.ae-over.open .ae-tl{transform:none}
.reduced .ae-tl{transition:none}
.ae-tl-head{
  height:var(--head);flex-shrink:0;display:flex;align-items:center;gap:8px;
  padding:0 12px 0 16px;border-bottom:1px solid var(--bd-l);
}
.ae-tl-head .ti{color:var(--g);flex-shrink:0;display:flex}
.ae-tl-head .tt{flex:1;min-width:0;display:flex;flex-direction:column}
.ae-tl-head .t1{display:block;font-size:13px;font-weight:600;color:var(--t);line-height:1.3}
.ae-tl-head .t2{display:block;font-size:11px;color:var(--t-mut);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ae-tl-body{padding:16px 16px 16px 28px;overflow-y:auto;flex:1}
.ae-tl-list{position:relative}
.ae-tl-rail{position:absolute;left:-12px;top:8px;bottom:8px;width:2px;background:var(--bd-l);border-radius:1px}
.ae-ent{position:relative;margin-bottom:20px}
.ae-ent:last-child{margin-bottom:0}
.ae-dot{
  position:absolute;left:-17px;top:6px;width:10px;height:10px;border-radius:50%;
  background:var(--w);border:2px solid var(--g);
}
.ae-ent.first .ae-dot{background:var(--g)}
.ae-card{padding:10px 12px;border-radius:8px;background:var(--sf);border:1px solid var(--bd-l)}
.ae-card-top{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.ae-card-date{font-family:var(--fm);font-size:11px;font-weight:500;color:var(--t-mid)}
.ae-conf{
  font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  padding:1px 5px;border-radius:3px;
}
.ae-conf.high{color:var(--green);background:var(--green-bg)}
.ae-conf.medium{color:var(--g);background:var(--g-bg)}
.ae-conf.low{color:var(--coral);background:var(--coral-bg)}
.ae-card-open{margin-left:auto}
.ae-card-doc{font-size:12px;font-weight:500;color:var(--t);line-height:1.4;margin-bottom:4px;word-break:break-word}
.ae-card-chg{font-size:11px;color:var(--t-mid);line-height:1.6}
.ae-open-item{display:flex;gap:5px;margin-top:7px;font-size:11px;line-height:1.5;color:var(--t-mid)}
.ae-open-item .w{color:var(--red);flex-shrink:0;margin-top:2px}
.ae-open-item b{color:var(--red);font-weight:600}

/* ——— document viewer ——— */
.ae-dv{
  position:absolute;inset:0;background:var(--w);display:flex;flex-direction:column;
  transform:translateX(100%);transition:transform .35s var(--ease);
}
.ae-over.open .ae-dv{transform:none}
.reduced .ae-dv{transition:none}
.ae-dv-bar{
  height:44px;flex-shrink:0;display:flex;align-items:center;gap:8px;
  padding:0 10px 0 12px;border-bottom:1px solid var(--bd);background:var(--w);
}
.ae-dv-name{font-size:12px;font-weight:600;color:var(--t);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ae-dv-pg{font-family:var(--fm);font-size:11px;color:var(--t-mut);margin-left:auto;white-space:nowrap}
.ae-ib{
  width:26px;height:26px;border-radius:6px;display:flex;align-items:center;justify-content:center;
  color:var(--t-mut);border:1px solid transparent;flex-shrink:0;
}
.ae-ib:hover{color:var(--g);border-color:var(--bd)}
.ae-dv-body{flex:1;display:flex;min-height:0;background:var(--sf)}
.ae-thumbs{
  width:84px;flex-shrink:0;border-right:1px solid var(--bd);background:var(--w);
  overflow-y:auto;padding:10px 0;display:flex;flex-direction:column;align-items:center;gap:10px;
}
.ae-thumb{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px}
.ae-thumb .sheet{
  width:56px;height:72px;background:var(--w);border:1px solid var(--bd-l);border-radius:2px;
  overflow:hidden;padding:5px 4px;display:flex;flex-direction:column;gap:2px;
}
.ae-thumb .sheet i{display:block;height:2px;background:#e8e4dc;border-radius:1px}
.ae-thumb .sheet i.s{width:60%}
.ae-thumb[aria-current=true] .sheet{border:2px solid var(--g);box-shadow:0 0 0 1px #9e8c5f44}
.ae-thumb .n{font-size:9px;color:var(--t-mut)}
.ae-thumb[aria-current=true] .n{color:var(--g);font-weight:600}
.ae-thumb .cited{
  position:absolute;bottom:15px;left:50%;transform:translateX(-50%);
  width:8px;height:2px;background:var(--g);border-radius:1px;
}
.ae-page-wrap{flex:1;overflow-y:auto;padding:20px;display:flex;justify-content:center}
.ae-page{
  width:100%;max-width:520px;background:var(--w);border:1px solid var(--bd);border-radius:3px;
  box-shadow:0 4px 20px rgba(0,0,0,.08);padding:34px 38px;align-self:flex-start;
}
/* running head: the parties/reference line a real execution copy carries */
.ae-page-hd{
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;
  font-family:var(--ff);font-size:8px;font-weight:600;letter-spacing:.11em;text-transform:uppercase;
  color:var(--t-ph);border-bottom:1px solid var(--bd-l);padding-bottom:9px;margin-bottom:22px;
}
.ae-page-hd span:last-child{white-space:nowrap;font-style:italic;text-transform:none;letter-spacing:.03em}
.ae-page-ft{
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;
  font-family:var(--fm);font-size:8px;letter-spacing:.04em;color:var(--t-ph);
  border-top:1px solid var(--bd-l);padding-top:11px;margin-top:24px;
}
.ae-page h4{
  font-family:var(--ff);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--t-mut);margin-bottom:14px;
}
.ae-page p{font-size:11.5px;line-height:1.85;color:var(--t-mid);margin-bottom:11px;text-align:justify}
/* clause numbers hang in the margin, as they are set in a real contract */
.ae-page p:has(.cl){padding-left:34px;text-indent:-34px}
.ae-page .cl{font-weight:600;color:var(--t)}
.ae-page mark{background:rgba(158,140,95,.28);color:var(--t);padding:1px 0;border-radius:1px}
.ae-page .sig{margin-top:22px;padding-top:14px;border-top:1px solid var(--bd-l);font-family:var(--fm);font-size:9.5px;color:var(--t-ph);letter-spacing:.04em}
@media(max-width:760px){
  .ae-thumbs{display:none}
  .ae-page{padding:22px 20px}
}

/* ——— responsive: the panel becomes a stacked sheet ———
   height:auto is required — the pinned desktop height would clip the
   stack once the panel sits under the table rather than beside it. */
@media(max-width:980px){
  .ae-body{display:block;height:auto}
  .ae-main{max-height:none}
  .ae-panel{width:auto;border-left:none;border-top:1px solid var(--bd)}
  .ae-panel-head{height:auto;padding:12px 12px 12px 16px}
  .ae-panel-body{overflow:visible}
  table.ae-t{min-width:620px}
  /* the overlays must cover the whole frame, which is now much taller */
  .ae-tl{width:100%}
  .ae-over{position:fixed;z-index:60}
}
/* Below 760px the values — the whole point of the demo — would sit off-screen
   behind a horizontal scroll. Drop to Document + Annual rent, which still tells
   the story: a document, a number, and the source behind it. */
@media(max-width:760px){
  table.ae-t{min-width:0}
  .ae-t th:nth-child(2),.ae-t td:nth-child(2),
  .ae-t th:nth-child(3),.ae-t td:nth-child(3),
  .ae-t th:nth-child(5),.ae-t td:nth-child(5){display:none}
  .ae-t th:nth-child(1){width:58%}
  .ae-t th:nth-child(4){width:42%}
  .ae-scroll{overflow-x:hidden}
  .ae-foot{font-size:10px}
  .ae-doccell{gap:5px}
}
