/* The AML structuring demo.
   Deliberately plainer than the rest of the product pages: this page exists
   because the site read as too technical to a business reader, so the visual
   budget goes on one large number, one meter and one verdict, and nothing
   competes with them. */

/* base.html loads this file at {% block head %}, before product-experience.css,
   so a bare .amlx loses to .ek-page's 1320px on equal specificity and the page
   stretches to full width. Both classes sit on the same element, so naming
   both is the honest fix rather than !important. */
.ek-page.amlx { max-width: 940px; }

.amlx-hero { padding: 8px 0 34px; }
.amlx-hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1;
  letter-spacing: -1.2px; margin: 10px 0 18px; text-wrap: balance; }
.amlx-lede { font-size: 15.5px; line-height: 1.75; max-width: 62ch; color: var(--ek-ink); }

/* ---- The lab ---------------------------------------------------------- */
.amlx-lab { border: 1px solid var(--ek-line); border-radius: 14px; overflow: hidden;
  background: #fcfdfa; }
.amlx-lab-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--ek-line);
  background: linear-gradient(#f4f9ef, #fcfdfa); }
.amlx-lab-head h2 { font-size: 19px; letter-spacing: -.4px; margin: 0 0 5px; }
.amlx-lab-head p { font-size: 13px; color: var(--ek-muted); margin: 0; }
.amlx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.amlx-controls { padding: 22px 24px; border-right: 1px solid var(--ek-line); }
.amlx-readout { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }

.amlx-dep { margin-bottom: 18px; }
.amlx-dep label { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--ek-muted); margin-bottom: 7px; }
.amlx-dep label b { font: 650 11px/1 ui-monospace, Consolas, monospace; color: var(--ek-green); }
.amlx-dep input[type=range] { width: 100%; accent-color: var(--ek-green); cursor: pointer; }
.amlx-dep output { display: block; margin-top: 5px;
  font: 650 17px/1 Inter, sans-serif; color: var(--ek-ink);
  letter-spacing: -.4px; font-variant-numeric: tabular-nums; }

.amlx-presets { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ek-line); }
.amlx-preset-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.amlx-preset-row button { cursor: pointer; font: 600 12px/1 Inter, sans-serif;
  color: var(--ek-ink); background: #f4f8ef; border: 1px solid var(--ek-line);
  border-radius: 999px; padding: 8px 13px;
  transition: background .16s ease, border-color .16s ease, color .16s ease; }
.amlx-preset-row button:hover { border-color: #9dbb8c; background: #eaf3e2; }
.amlx-preset-row button[aria-pressed="true"] { background: var(--ek-green);
  border-color: var(--ek-green); color: #fff; }

/* ---- Meter ------------------------------------------------------------ */
/* scaleX on a composited layer rather than width, so dragging a slider does
   not relayout the page on every input event. */
.amlx-meter-track { position: relative; height: 34px; border-radius: 6px;
  background: #eef3e8; border: 1px solid var(--ek-line); overflow: hidden; }
.amlx-meter-fill { position: absolute; inset: 0; transform-origin: left center;
  transform: scaleX(0); background: var(--ek-green);
  transition: transform .22s cubic-bezier(.16, 1, .3, 1), background .22s ease; }
.amlx-meter-fill[data-state="HOLD"] { background: #b8860b; }
.amlx-meter-fill[data-state="REPORT"] { background: #a13d27; }
.amlx-meter-line { position: absolute; inset: 0; pointer-events: none;
  border-right: 2px dashed #7d8c76; }
.amlx-meter-line span { position: absolute; right: 0; top: calc(100% + 6px);
  font: 650 9.5px/1 ui-monospace, Consolas, monospace; color: var(--ek-muted);
  letter-spacing: .04em; white-space: nowrap; }
.amlx-meter-sum { display: flex; align-items: baseline; gap: 9px; margin-top: 26px; }
.amlx-meter-sum strong { font: 650 30px/1 Inter, sans-serif; letter-spacing: -1px;
  color: var(--ek-ink); font-variant-numeric: tabular-nums; }
.amlx-meter-sum span { font-size: 12px; color: var(--ek-muted); }

/* ---- Verdict ---------------------------------------------------------- */
.amlx-verdict { border-left: 3px solid var(--ek-green); padding: 2px 0 2px 15px; }
.amlx-verdict[data-state="HOLD"] { border-left-color: #b8860b; }
.amlx-verdict[data-state="REPORT"] { border-left-color: #a13d27; }
.amlx-verdict-tag { display: inline-block; font: 650 10px/1 ui-monospace, Consolas, monospace;
  letter-spacing: .1em; padding: 5px 8px; border-radius: 3px; margin-bottom: 8px;
  color: #2c5a34; background: #e0efd6; border: 1px solid #b6d3a4; }
.amlx-verdict[data-state="HOLD"] .amlx-verdict-tag { color: #7a5a08;
  background: #fdf3dd; border-color: #e6cd9b; }
.amlx-verdict[data-state="REPORT"] .amlx-verdict-tag { color: #8c3320;
  background: #fbe7e2; border-color: #e5b8ac; }
.amlx-verdict p { font-size: 13.5px; line-height: 1.6; margin: 0; color: var(--ek-ink); }

/* ---- The record ------------------------------------------------------- */
.amlx-record { margin: 0; border: 1px solid var(--ek-line); border-radius: 8px;
  background: #fff; overflow: hidden; }
.amlx-record > div { display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 13px; border-top: 1px solid var(--ek-line); }
.amlx-record > div:first-child { border-top: 0; }
.amlx-record dt { font: 650 9.5px/1.4 ui-monospace, Consolas, monospace;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ek-muted); }
.amlx-record dd { margin: 0; font: 11.5px/1.4 ui-monospace, Consolas, monospace;
  color: var(--ek-ink); text-align: right; overflow-wrap: anywhere; }
.amlx-record-note { font-size: 12px; line-height: 1.65; color: var(--ek-muted); margin: 0; }
.amlx-fineprint { font-size: 11px; line-height: 1.7; color: #5c7152;
  padding: 14px 24px 18px; margin: 0; border-top: 1px solid var(--ek-line); }

/* ---- Cost ------------------------------------------------------------- */
.amlx-cost { margin: 48px 0 0; padding: 28px 26px; border: 1px solid var(--ek-line);
  border-radius: 14px; background: linear-gradient(#f7faf3, #fcfdfa); }
.amlx-cost h2 { font-size: clamp(20px, 2.5vw, 27px); letter-spacing: -.7px;
  margin: 8px 0 20px; text-wrap: balance; }
.amlx-cost p { font-size: 14px; line-height: 1.75; max-width: 68ch; }
.amlx-cost-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--ek-line); }
.amlx-cost-figs div { display: flex; flex-direction: column; gap: 5px; }
.amlx-cost-figs strong { font: 650 26px/1.05 Inter, sans-serif; letter-spacing: -.8px;
  color: var(--ek-green); font-variant-numeric: tabular-nums; }
/* The cost figure is the one that makes the rest credible, so it is not drawn
   in the success colour. */
.amlx-cost-figs .is-cost strong { color: #a1621b; }
.amlx-cost-figs span { font-size: 12px; line-height: 1.5; color: var(--ek-muted); }
.amlx-cost .ek-actions { margin-top: 20px; }

/* ---- Two-up ----------------------------------------------------------- */
.amlx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 0; }
.amlx-two article { padding: 24px; border: 1px solid var(--ek-line); border-radius: 12px;
  background: #fcfdfa; }
.amlx-two h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.3px;
  margin: 9px 0 12px; text-wrap: balance; }
.amlx-two p { font-size: 13.5px; line-height: 1.7; }
.amlx-steps { margin: 4px 0 0; padding-left: 19px; }
.amlx-steps li { font-size: 13.5px; line-height: 1.65; margin-bottom: 9px; }
.amlx-two .ek-actions { margin-top: 18px; }

.amlx-limits { font-size: 11.5px; line-height: 1.75; color: #5c7152; max-width: 82ch;
  margin: 34px 0 0; padding-top: 20px; border-top: 1px solid var(--ek-line); }

@media (max-width: 760px) {
  .amlx-grid { grid-template-columns: 1fr; }
  .amlx-controls { border-right: 0; border-bottom: 1px solid var(--ek-line); }
  .amlx-two { grid-template-columns: 1fr; }
  .amlx-cost-figs { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .amlx-meter-fill, .amlx-preset-row button { transition: none; }
}
