DASHBOARD CONTRACT (schema 1.15.0 — emit JSON conforming to this)

Dashboard: {"name": str, "description"?: str, "settings"?: {...}, "layout": [tile, ...]}.
settings: {"interval_enabled": bool, "interval_ms": 1000..3600000}.

Tile: {"id": str (unique), "position": {...}, "block": {...},
  optional: "title" (the card header), "card", "load", "exec", "query", "triggered_by", "placeholder",
  "flavor_text", "tags", "artifact", "controls"}.
position: {"row": int, "order": int, "width": 1..12, "stack"?: name,
  "portrait"?: {"order","width","height","align"}, "hide_on"?: "portrait"|"landscape"}.
  STACK: tiles with the same row and the same stack name form ONE vertical column (one under another,
  in order; as wide as its widest tile). A row's columns (a stack counts once) add up to 12.
  Controls always go in one stack ("stack": "controls", width 3); KPI cards in a band or a stack.
card: an OBJECT — {"color": primary|secondary|info|warning|danger|..., "outline": true,
  "show_header"?: bool, "visible"?: false (no card chrome), "border"?: top|middle|bottom|all
  (box a run of visible:false tiles), "timestamp"?: true, "badge"?: {"text": "Slow · ~20 s", "level"?:
  warning|danger|info|success, "detail"?: "on hover"} (a pill in the header, e.g. for a slow tile)}.
load: {"mode": load_once|input|manual|interval|always, "indicator"?: none|auto|loading|spinner|status,
  "keep_previous"?: bool, "interval_ms"?: 5000..3600000}.
controls: {"run_button"?: bool, "run_icon"?: play|refresh, "run_position"?: left|right}.
artifact: {"download": true} adds a download button for the tile's result.
placeholder: markdown shown until the tile's first result.

block: {"type": plotly|plotly_resampler|table|markdown|image|raw_html|input_select|input_range|input_text|html_app,
  "config": {...}}
  plotly        config.figure (Plotly JSON), height ("320px" — a STRING), theme_colors (true), template,
                graph_config, resample/max_points (long line traces). Binding to the tile's result:
                "@col" = the column (array) · "@col[0]" / "@col[-1]" = one value (first / last row)
                trace "split_by": "<col>" = one trace per distinct value (one line per well/region)
                trace "transforms": [{"type": filter|groupby|aggregate|sort, ...}] applied by StrataBI
                indicator "value": "@col" shows the column's last value (live KPI)
  plotly_resampler  as plotly, for very long series (each line drawn from max_points; zoom for detail)
  table         config.column_defs [{"field", "headerName", "format"?: integer|number[:n]|currency[:n]|
                percent[:n]|ratio[:n]|compact|date|datetime, "sort"?, "width"?, "flex"?, "pinned"?}],
                page_size, height, max_rows
  markdown      config.content (string or array of lines), config.template — filled from the first
                row of the tile's result: "### {revenue_ytd:,.0f}\n{yoy_pct:+.1f}% vs last year"
                (Python format specs; the way to make a live KPI card or a note quoting live numbers);
                config.html: "none" (default: HTML shown as text) | "basic" (a sanitized, non-executable
                subset: div span details tables br …, links, data: images; classes only md-cols-2|3,
                md-callout-info|warn|ok|bad, md-badge, md-badge-info|ok|warn|bad|muted (pills, also in
                table cells), md-muted, md-accent, md-left|center|right, md-nowrap; inline style= with
                colours, var(--bs-*), font, text, padding, margin, border, width only; no url/position);
                config.style (Dash style dict on the container, as other blocks)
  image         config.src (authorized s3:// or https url), width
  raw_html      config.html, height, sandbox — or config.extension {module_id, block, version?} +
                options: an installed external block (governed). Prefer native blocks.
  html_app      config.module_id (an installed html_app module), height, params [names the app sets as
                page inputs]: an embedded application, no exec/query. Only for a real application.
  input_select  config.input_id, options [{"label","value"}], component(dropdown|radio|checklist), value, multi,
                label, label_position(left|top), label_width
  input_range   config.input_id, label (required), min, max, step, value (number or [lo,hi]), label_position
  input_text    config.input_id, label, multiline, rows, placeholder, label_position

exec (how a tile gets data; OMIT exec entirely for static markdown/image/raw_html/input blocks):
  {"type": athena, workgroup?, database?, async?, result_kind?, result_format?}
     + tile "query": {"sql": str|[lines], "params"?: {"name": "<input_id>"}}  (:name in the SQL)
  {"type": cache,  cache_s3_uri (permitted locations only)}
  {"type": lambda, module_id, lambda_index, sync?: bool, timeout_seconds?: >=1 (sync: at most 120, default the install's 25; async: no default, no maximum)}
Tiles driven by inputs: "triggered_by": ["<input tile id>"], "load": {"mode": "input", "keep_previous": true}.

RULES: tile ids are unique; use only the modules / workgroups / locations listed under PERMITTED
EXECUTION; never invent s3 uris, workgroups or module ids. A conversational answer needs no edit ops.
Read the DESIGN GUIDE for how it should look: stacks, live KPI cards, split_by, formatted tables.
