# Engine Details

> One protocol engine's own page with its live card, per-day history, record timeline and the fixed protocol it follows.

Source: https://docs.nasaqui.com/components/engine-details

## Install

```bash
npx shadcn@latest add https://docs.nasaqui.com/r/engine-details.json
```

The page behind an [`EngineCard`](https://docs.nasaqui.com/components/engine-card). It shows the live card, then for the engines that
judge days (hydration, caffeine, GERD) a window switch, counts of days on protocol, off protocol and not judged,
current and best streaks, a chart and a strip of every day. Then the engine's record as a timeline and the fixed
protocol constants.

Only counts and verdicts appear, never a rate. A day the engine did not judge is not a failure: it ends a streak
without counting against you, and it has its own shape in the strip.

## When to use

- The screen a dashboard card links to.

## When not to use

- A summary of one day: use [`DailySummary`](https://docs.nasaqui.com/components/daily-summary).

## Import

```tsx
import { EngineDetails } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"
```

## Quick start

```tsx
import { EngineDetails, type HistoryDay } from "@fadymondy/nasaq/web";

export function HydrationPage({ history }: { history: HistoryDay[] }) {
  return (
    <EngineDetails
      snapshot={{ engine: "hydration", state: "idle", totalMl: 1500, dailyCapMl: 5000, unitMl: 250, unitsLogged: 6, unitsTotal: 20 }}
      history={history}
      windows={[7, 30, 365]}
      onWindowChange={async (days) => { /* load that window, pass it back through history */ }}
      records={[{ id: "1", at: "2026-09-29T07:10:00Z", title: "250 mL logged", tone: "success" }]}
      backHref="/health"
    />
  );
}
```

## Anatomy

```
EngineDetails                 data-slot="engine-details"  data-engine
├─ header                     back link (mirrors in RTL), icon, h1, lede
├─ EngineCard                 hideTitle
├─ history section            ToggleGroup, StatGrid, Chart, EngineHistoryStrip, legend
├─ record section             Timeline
└─ protocol section           definition list of constants
```

## API

| Prop | Type | Notes |
| --- | --- | --- |
| `snapshot` | `EngineSnapshot` | Required. |
| `history` | `HistoryDay[]` | Oldest first, one per civil day. |
| `historyLoading` / `historyError` / `onRetry` | | Skeleton, the server's message, retry. |
| `windows` | `number[]` | Default `[7, 30, 365]`. |
| `windowDays` / `onWindowChange` | | Controlled window. |
| `records` | `EngineRecordEntry[]` | Newest first. `tone` picks an icon as well as a colour. |
| `onAction`, `now` | | Passed to the card. |
| `backHref` | `string` | Omit to hide the link. |
| `labels` | `Partial<EngineDetailsLabels>` | Override any string. |

## Code

### React

```tsx
import { EngineDetails, type HistoryDay } from "@fadymondy/nasaq/web";

export function HydrationPage({ history }: { history: HistoryDay[] }) {
  return (
    <EngineDetails
      snapshot={{ engine: "hydration", state: "idle", totalMl: 1500, dailyCapMl: 5000, unitMl: 250, unitsLogged: 6, unitsTotal: 20 }}
      history={history}
      windows={[7, 30, 365]}
      onWindowChange={async (days) => { /* load that window, pass it back through history */ }}
      records={[{ id: "1", at: "2026-09-29T07:10:00Z", title: "250 mL logged", tone: "success" }]}
      backHref="/health"
    />
  );
}
```

### shadcn

```tsx
import { EngineDetails } from "@/components/ui/engine-details";
import { type HistoryDay } from "@/components/ui/health-engines";

export function HydrationPage({ history }: { history: HistoryDay[] }) {
  return (
    <EngineDetails
      snapshot={{ engine: "hydration", state: "idle", totalMl: 1500, dailyCapMl: 5000, unitMl: 250, unitsLogged: 6, unitsTotal: 20 }}
      history={history}
      windows={[7, 30, 365]}
      onWindowChange={async (days) => { /* load that window, pass it back through history */ }}
      records={[{ id: "1", at: "2026-09-29T07:10:00Z", title: "250 mL logged", tone: "success" }]}
      backHref="/health"
    />
  );
}
```

### Vue

```vue
<script setup lang="ts">
import { NqEngineDetails, type HistoryDay } from "@fadymondy/nasaq/vue";

const history: HistoryDay[] = Array.from({ length: 7 }, (_, i) => ({
  date: `2026-09-${String(23 + i).padStart(2, "0")}`,
  verdict: i === 3 ? "off_protocol" : i === 0 ? "unevaluated" : "on_protocol",
  entries: 4 + i,
}));

// Load that window and pass it back through `history`.
async function loadWindow(days: number) {
  void days;
}
</script>

<template>
  <NqEngineDetails
    :snapshot="{ engine: 'hydration', state: 'idle', totalMl: 1500, dailyCapMl: 5000, unitMl: 250, unitsLogged: 6, unitsTotal: 20 }"
    :history="history"
    :windows="[7, 30, 365]"
    :on-window-change="loadWindow"
    :records="[{ id: '1', at: '2026-09-29T07:10:00Z', title: '250 mL logged', tone: 'success' }]"
    back-href="/health"
  />
</template>
```

### Blade

```blade
@php
    $history = [];
    for ($i = 0; $i < 7; $i++) {
        $history[] = ['date' => sprintf('2026-09-%02d', 23 + $i), 'verdict' => $i === 3 ? 'off_protocol' : ($i === 0 ? 'unevaluated' : 'on_protocol'), 'entries' => 4 + $i];
    }
@endphp
<x-nq::engine-details
    :snapshot="['engine' => 'hydration', 'state' => 'idle', 'totalMl' => 1500, 'dailyCapMl' => 5000, 'unitMl' => 250, 'unitsLogged' => 6, 'unitsTotal' => 20]"
    :history="$history"
    :windows="[7, 30, 365]"
    :records="[['id' => '1', 'at' => '2026-09-29T07:10:00Z', 'title' => '250 mL logged', 'tone' => 'success']]"
    back-href="/health" />
```

### HTML + Alpine

```html
<div data-slot="engine-details" data-engine="hydration" x-data="nqEngineDetails(7)" class="mx-auto flex w-full max-w-4xl flex-col gap-8">
    <header class="flex flex-col gap-4">
                    <a href="/health" data-slot="engine-details-back" class="inline-flex h-8 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-control px-3 text-label text-foreground transition-colors hover:bg-accent [&amp;_svg]:size-4 -ms-2.5 w-fit">
                <svg aria-hidden="true" class="rtl:-scale-x-100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="m15 18-6-6 6-6"/>
</svg>                Back to today
            </a>
                <div class="flex items-center gap-4">
            <span aria-hidden="true" class="grid size-14 shrink-0 place-items-center rounded-card bg-secondary text-muted-foreground [&_svg]:size-7"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z"/>
  <path d="M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97"/>
</svg></span>
            <div class="flex min-w-0 flex-col gap-1">
                <h1 id="nq-engine-details-hydration" class="text-h1 text-foreground">Hydration</h1>
                <p class="text-pretty text-body text-muted-foreground">What this engine says right now, and what it has recorded.</p>
            </div>
        </div>
    </header>
    <div data-slot="engine-card" data-engine="hydration" data-state="idle" data-tone="neutral"
     aria-label="Hydration"          class="flex flex-col gap-4 rounded-card border border-border bg-card py-4 text-card-foreground min-w-0">
            <div data-slot="card-header" class="grid auto-rows-min items-start gap-1 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] grid-cols-[1fr_auto]"><span class="text-label text-muted-foreground">State</span>
                        <div data-slot="card-action" class="col-start-2 row-span-2 row-start-1 self-start justify-self-end"><span data-slot="engine-card-state" title="State" class="inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-[4px] border px-1.5 text-caption font-medium [&amp;_svg]:size-3 border-border bg-secondary text-foreground">
                    <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="10"/>
  <path d="M8 12h8"/>
</svg>                    Ready to log
                </span></div></div>
        <div data-slot="card-content" class="px-4 flex flex-col gap-4"><div class="flex flex-col gap-3">
                    <div class="flex flex-wrap items-baseline gap-x-2 gap-y-1">
                        <span data-slot="engine-card-value" class="text-h2 leading-tight text-foreground"><bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">1,500 mL</bdi></span>
                        <span class="text-body-sm text-muted-foreground">of <bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">5,000 mL</bdi></span>
                    </div>
                    <div data-slot="meter" data-tone="default" role="meter"  aria-labelledby="nq-meter-08894704-label"     aria-valuemin="0" aria-valuemax="20" aria-valuenow="6" aria-valuetext="6%"
    class="flex w-full flex-col gap-1.5">
            <div data-slot="progress-head" class="flex items-baseline justify-between gap-3 text-body-sm">
            <span id="nq-meter-08894704-label" class="text-label text-foreground">Units today</span>            <span aria-hidden="true" class="text-muted-foreground tabular-nums">⁦6 cups⁩ / ⁦20 cups⁩</span>        </div>
        <div data-slot="meter-track" class="relative block w-full overflow-hidden rounded-full bg-nq-surface-soft h-2">
        <div data-slot="meter-indicator" style="inset-inline-start:0;width:30%" class="block h-full rounded-full transition-[width] duration-300 ease-nq motion-reduce:transition-none bg-primary"></div>
    </div>
</div>
                    <ol aria-hidden="true" data-slot="engine-card-units" class="m-0 flex list-none flex-wrap gap-1 p-0">
                                                    <li class="size-3.5 rounded-full border border-primary bg-primary"></li>
                                                    <li class="size-3.5 rounded-full border border-primary bg-primary"></li>
                                                    <li class="size-3.5 rounded-full border border-primary bg-primary"></li>
                                                    <li class="size-3.5 rounded-full border border-primary bg-primary"></li>
                                                    <li class="size-3.5 rounded-full border border-primary bg-primary"></li>
                                                    <li class="size-3.5 rounded-full border border-primary bg-primary"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                                    <li class="size-3.5 rounded-full border border-border bg-transparent"></li>
                                            </ol>
                </div></div>
            </div>
            <section aria-labelledby="nq-engine-details-hydration-history" class="flex flex-col gap-4">
            <div data-slot="section-header" class="flex items-end justify-between gap-4">
    <div class="flex min-w-0 flex-col gap-1">
        <h2  id="nq-engine-details-hydration-history"  class="text-h2 text-foreground">History</h2>
                    <p class="text-pretty text-body-sm text-muted-foreground">Days on protocol, off it, and days the engine declined to judge. Counts, never a rate.</p>
            </div>
            <div class="shrink-0"><div role="group" data-slot="toggle-group" data-variant="segmented" data-orientation="horizontal"
    x-data="nqToggleGroup(JSON.parse('[\u00227\u0022]'), false)" x-modelable="value" x-bind="root"
            aria-label="History window" x-model="selected" class="flex w-fit max-w-full gap-0.5 rounded-control bg-secondary p-0.5">
    <button type="button" data-slot="toggle" aria-pressed="true"
     x-bind="toggle('7')"      data-pressed         class="inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap px-3 text-label text-muted-foreground outline-none transition-colors duration-150 ease-nq hover:text-foreground [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus data-disabled:pointer-events-none data-disabled:opacity-50 rounded-[calc(var(--radius-control)-2px)] data-pressed:bg-card data-pressed:text-foreground data-pressed:shadow-xs">7 days</button>
                                                    <button type="button" data-slot="toggle" aria-pressed="false"
     x-bind="toggle('30')"             class="inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap px-3 text-label text-muted-foreground outline-none transition-colors duration-150 ease-nq hover:text-foreground [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus data-disabled:pointer-events-none data-disabled:opacity-50 rounded-[calc(var(--radius-control)-2px)] data-pressed:bg-card data-pressed:text-foreground data-pressed:shadow-xs">30 days</button>
                                                    <button type="button" data-slot="toggle" aria-pressed="false"
     x-bind="toggle('365')"             class="inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap px-3 text-label text-muted-foreground outline-none transition-colors duration-150 ease-nq hover:text-foreground [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus data-disabled:pointer-events-none data-disabled:opacity-50 rounded-[calc(var(--radius-control)-2px)] data-pressed:bg-card data-pressed:text-foreground data-pressed:shadow-xs">365 days</button>
</div></div>
    </div>
                            <div class="flex flex-col gap-4">
                    <div data-slot="stat-grid" class="grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3"><div data-slot="stat-card"   class="flex flex-col gap-3 rounded-card border border-border bg-card px-4 py-4 text-card-foreground">
            <div class="flex items-center gap-2">
                            <span data-slot="stat-card-icon" aria-hidden="true" class="grid size-8 shrink-0 place-items-center rounded-control bg-secondary text-muted-foreground [&_svg]:size-4"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="10"/>
  <path d="m9 12 2 2 4-4"/>
</svg></span>
                        <div data-slot="stat-card-label" class="min-w-0 truncate text-body-sm text-muted-foreground">Days on protocol</div>
        </div>
        <div class="flex items-end justify-between gap-3">
            <div class="flex min-w-0 flex-col gap-1">
                <div data-slot="stat-card-value" class="text-h2 leading-tight text-foreground tabular-nums">
                                            <bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">5 days</bdi>
                                    </div>
                            </div>
                    </div>
    </div>
                        <div data-slot="stat-card"   class="flex flex-col gap-3 rounded-card border border-border bg-card px-4 py-4 text-card-foreground">
            <div class="flex items-center gap-2">
                            <span data-slot="stat-card-icon" aria-hidden="true" class="grid size-8 shrink-0 place-items-center rounded-control bg-secondary text-muted-foreground [&_svg]:size-4"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="10"/>
  <path d="m15 9-6 6"/>
  <path d="m9 9 6 6"/>
</svg></span>
                        <div data-slot="stat-card-label" class="min-w-0 truncate text-body-sm text-muted-foreground">Days off protocol</div>
        </div>
        <div class="flex items-end justify-between gap-3">
            <div class="flex min-w-0 flex-col gap-1">
                <div data-slot="stat-card-value" class="text-h2 leading-tight text-foreground tabular-nums">
                                            <bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">1 day</bdi>
                                    </div>
                            </div>
                    </div>
    </div>
                        <div data-slot="stat-card"   class="flex flex-col gap-3 rounded-card border border-border bg-card px-4 py-4 text-card-foreground">
            <div class="flex items-center gap-2">
                            <span data-slot="stat-card-icon" aria-hidden="true" class="grid size-8 shrink-0 place-items-center rounded-control bg-secondary text-muted-foreground [&_svg]:size-4"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M10.1 2.182a10 10 0 0 1 3.8 0"/>
  <path d="M13.9 21.818a10 10 0 0 1-3.8 0"/>
  <path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"/>
  <path d="M2.182 13.9a10 10 0 0 1 0-3.8"/>
  <path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"/>
  <path d="M21.818 10.1a10 10 0 0 1 0 3.8"/>
  <path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"/>
  <path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"/>
</svg></span>
                        <div data-slot="stat-card-label" class="min-w-0 truncate text-body-sm text-muted-foreground">Days not judged</div>
        </div>
        <div class="flex items-end justify-between gap-3">
            <div class="flex min-w-0 flex-col gap-1">
                <div data-slot="stat-card-value" class="text-h2 leading-tight text-foreground tabular-nums">
                                            <bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">1 day</bdi>
                                    </div>
                            </div>
                    </div>
    </div>
                        <div data-slot="stat-card"   class="flex flex-col gap-3 rounded-card border border-border bg-card px-4 py-4 text-card-foreground">
            <div class="flex items-center gap-2">
                        <div data-slot="stat-card-label" class="min-w-0 truncate text-body-sm text-muted-foreground">Current streak</div>
        </div>
        <div class="flex items-end justify-between gap-3">
            <div class="flex min-w-0 flex-col gap-1">
                <div data-slot="stat-card-value" class="text-h2 leading-tight text-foreground tabular-nums">
                                            <bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">3 days</bdi>
                                    </div>
                            </div>
                    </div>
    </div>
                        <div data-slot="stat-card"   class="flex flex-col gap-3 rounded-card border border-border bg-card px-4 py-4 text-card-foreground">
            <div class="flex items-center gap-2">
                        <div data-slot="stat-card-label" class="min-w-0 truncate text-body-sm text-muted-foreground">Best streak</div>
        </div>
        <div class="flex items-end justify-between gap-3">
            <div class="flex min-w-0 flex-col gap-1">
                <div data-slot="stat-card-value" class="text-h2 leading-tight text-foreground tabular-nums">
                                            <bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">3 days</bdi>
                                    </div>
                            </div>
                    </div>
    </div></div>
                    <div data-slot="card" class="flex flex-col gap-4 rounded-card border border-border bg-card py-4 text-card-foreground"><div data-slot="card-header" class="grid auto-rows-min items-start gap-1 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto]"><h3 data-slot="card-title" class="text-foreground text-h3">Entries per day</h3>
                            <div data-slot="card-description" class="text-body-sm text-muted-foreground">Protocol history for the last 7 days</div></div>
                        <div data-slot="card-content" class="px-4 flex flex-col gap-4"><div data-slot="chart"  role="img" aria-label="Entries per day. Protocol history for the last 7 days"   style="--color-entries: var(--primary)"     class="flex w-full text-caption [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line]:stroke-border [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-dot]:stroke-card [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector]:stroke-card [&_.recharts-surface]:outline-hidden aspect-auto h-52 flex-col justify-start gap-2">
    <div class="flex min-h-0 flex-1 gap-2">
        <div aria-hidden="true" class="flex w-7 shrink-0 flex-col justify-between text-end text-muted-foreground tabular-nums"><span>10</span><span>0</span></div>
        <div class="flex min-w-0 flex-1 items-end gap-1 border-b border-border bg-[linear-gradient(to_bottom,var(--border)_1px,transparent_1px)] bg-[length:100%_50%]">
                                            <div data-slot="chart-bar" title="23 Sep: Entries 4" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 40%; background-color: var(--color-entries)"></span>
                                    </div>
                                            <div data-slot="chart-bar" title="24 Sep: Entries 5" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 50%; background-color: var(--color-entries)"></span>
                                    </div>
                                            <div data-slot="chart-bar" title="25 Sep: Entries 6" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 60%; background-color: var(--color-entries)"></span>
                                    </div>
                                            <div data-slot="chart-bar" title="26 Sep: Entries 7" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 70%; background-color: var(--color-entries)"></span>
                                    </div>
                                            <div data-slot="chart-bar" title="27 Sep: Entries 8" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 80%; background-color: var(--color-entries)"></span>
                                    </div>
                                            <div data-slot="chart-bar" title="28 Sep: Entries 9" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 90%; background-color: var(--color-entries)"></span>
                                    </div>
                                            <div data-slot="chart-bar" title="29 Sep: Entries 10" class="flex h-full min-w-0 flex-1 flex-col-reverse justify-start">
                                            <span class="block w-full rounded-t-[3px]" style="height: 100%; background-color: var(--color-entries)"></span>
                                    </div>
                    </div>
    </div>
    <div aria-hidden="true" class="flex justify-between ps-9 text-muted-foreground"><span>23 Sep</span><span>29 Sep</span></div>
</div>
                                                        <div class="flex flex-col gap-2">
                                <span class="text-label text-foreground">Every day</span>
                                <div data-slot="engine-history-strip" class="flex flex-col gap-3">
                    <section aria-label="September 2026" class="flex flex-col gap-1.5">
            <h4 class="text-caption text-muted-foreground">September 2026</h4>
            <ol class="m-0 flex list-none flex-wrap gap-1 p-0">
                                                        <li data-date="2026-09-23" data-verdict="unevaluated" title="Sep 23, 2026: Not judged, 4 entries" class="size-4 shrink-0 rounded-full border border-dashed border-muted-foreground bg-transparent"><span class="sr-only">Sep 23, 2026: Not judged, 4 entries</span></li>
                                                        <li data-date="2026-09-24" data-verdict="on_protocol" title="Sep 24, 2026: On protocol, 5 entries" class="size-4 shrink-0 rounded-[3px] border border-nq-success bg-nq-success"><span class="sr-only">Sep 24, 2026: On protocol, 5 entries</span></li>
                                                        <li data-date="2026-09-25" data-verdict="on_protocol" title="Sep 25, 2026: On protocol, 6 entries" class="size-4 shrink-0 rounded-[3px] border border-nq-success bg-nq-success"><span class="sr-only">Sep 25, 2026: On protocol, 6 entries</span></li>
                                                        <li data-date="2026-09-26" data-verdict="off_protocol" title="Sep 26, 2026: Off protocol, 7 entries" class="size-4 shrink-0 rounded-[3px] border border-nq-danger bg-[repeating-linear-gradient(45deg,var(--nq-danger)_0_2px,transparent_2px_5px)]"><span class="sr-only">Sep 26, 2026: Off protocol, 7 entries</span></li>
                                                        <li data-date="2026-09-27" data-verdict="on_protocol" title="Sep 27, 2026: On protocol, 8 entries" class="size-4 shrink-0 rounded-[3px] border border-nq-success bg-nq-success"><span class="sr-only">Sep 27, 2026: On protocol, 8 entries</span></li>
                                                        <li data-date="2026-09-28" data-verdict="on_protocol" title="Sep 28, 2026: On protocol, 9 entries" class="size-4 shrink-0 rounded-[3px] border border-nq-success bg-nq-success"><span class="sr-only">Sep 28, 2026: On protocol, 9 entries</span></li>
                                                        <li data-date="2026-09-29" data-verdict="on_protocol" title="Sep 29, 2026: On protocol, 10 entries" class="size-4 shrink-0 rounded-[3px] border border-nq-success bg-nq-success"><span class="sr-only">Sep 29, 2026: On protocol, 10 entries</span></li>
                            </ol>
        </section>
    </div>
                                <ul data-slot="engine-history-legend" aria-label="Legend" class="m-0 flex list-none flex-wrap gap-x-4 gap-y-1 p-0 text-caption text-muted-foreground">
            <li class="flex items-center gap-1.5">
            <span aria-hidden="true" class="size-3 rounded-[3px] border border-nq-success bg-nq-success"></span>
            <svg aria-hidden="true" class="size-3.5 text-nq-success-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="10"/>
  <path d="m9 12 2 2 4-4"/>
</svg>            On protocol
        </li>
            <li class="flex items-center gap-1.5">
            <span aria-hidden="true" class="size-3 rounded-[3px] border border-nq-danger bg-[repeating-linear-gradient(45deg,var(--nq-danger)_0_2px,transparent_2px_5px)]"></span>
            <svg aria-hidden="true" class="size-3.5 text-nq-danger-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="10"/>
  <path d="m15 9-6 6"/>
  <path d="m9 9 6 6"/>
</svg>            Off protocol
        </li>
            <li class="flex items-center gap-1.5">
            <span aria-hidden="true" class="size-3 rounded-full border border-dashed border-muted-foreground bg-transparent"></span>
            <svg aria-hidden="true" class="size-3.5 text-muted-foreground" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M10.1 2.182a10 10 0 0 1 3.8 0"/>
  <path d="M13.9 21.818a10 10 0 0 1-3.8 0"/>
  <path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"/>
  <path d="M2.182 13.9a10 10 0 0 1 0-3.8"/>
  <path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"/>
  <path d="M21.818 10.1a10 10 0 0 1 0 3.8"/>
  <path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"/>
  <path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"/>
</svg>            Not judged
        </li>
    </ul>
                            </div></div></div>
                </div>
                    </section>
    <section aria-labelledby="nq-engine-details-hydration-record" class="flex flex-col gap-4">
        <div data-slot="section-header" class="flex items-end justify-between gap-4">
    <div class="flex min-w-0 flex-col gap-1">
        <h2  id="nq-engine-details-hydration-record"  class="text-h2 text-foreground">Record</h2>
                    <p class="text-pretty text-body-sm text-muted-foreground">What this engine has written down, newest first.</p>
            </div>
    </div>
                    <div data-slot="card" class="flex flex-col gap-4 rounded-card border border-border bg-card py-4 text-card-foreground"><div data-slot="card-content" class="px-4"><ol data-slot="timeline" class="m-0 flex list-none flex-col p-0"><li data-slot="timeline-item" class="group/timeline grid grid-cols-[2rem_1fr] gap-x-3">
    <div class="flex flex-col items-center">
        <span data-slot="timeline-marker" class="flex size-8 shrink-0 items-center justify-center">
                            <span class="flex size-8 items-center justify-center rounded-full border border-border bg-secondary text-muted-foreground [&_svg]:size-4"><svg aria-hidden="true" class="text-nq-success-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="10"/>
  <path d="m9 12 2 2 4-4"/>
</svg></span>
                    </span>
        <span aria-hidden="true" data-slot="timeline-rail" class="my-1 w-px flex-1 bg-border group-last/timeline:hidden"></span>
    </div>
    <div data-slot="timeline-content" class="flex min-w-0 flex-col gap-1 pb-6 pt-1 group-last/timeline:pb-0">
        <div class="flex items-baseline justify-between gap-3">
            <p class="min-w-0 text-body-sm font-medium text-foreground">250 mL logged</p>
                            <time data-slot="date-time" datetime="2026-09-29T07:10:00+00:00" dir="auto"  title="Sep 29, 2026"     class="tabular-nums [unicode-bidi:isolate] shrink-0 text-caption text-muted-foreground">1 hour ago</time>
                    </div>
                    </div>
</li></ol></div></div>
    </section>
    <section aria-labelledby="nq-engine-details-hydration-protocol" class="flex flex-col gap-4">
        <div data-slot="section-header" class="flex items-end justify-between gap-4">
    <div class="flex min-w-0 flex-col gap-1">
        <h2  id="nq-engine-details-hydration-protocol"  class="text-h2 text-foreground">The protocol</h2>
                    <p class="text-pretty text-body-sm text-muted-foreground">The fixed rules this engine follows. They live in the engine, not in this screen.</p>
            </div>
    </div>
        <div data-slot="card" class="flex flex-col gap-4 rounded-card border border-border bg-card py-4 text-card-foreground"><div data-slot="card-content" class="px-4"><dl class="m-0 grid gap-x-6 gap-y-3 sm:grid-cols-2">
                                            <div class="flex min-w-0 flex-col gap-0.5 border-b border-border pb-3 last:border-b-0 sm:[&:nth-last-child(2)]:border-b-0">
                            <dt class="text-caption text-muted-foreground">Loggable unit</dt>
                            <dd class="m-0 text-body-sm font-medium text-foreground"><bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">250 mL</bdi></dd>
                        </div>
                                            <div class="flex min-w-0 flex-col gap-0.5 border-b border-border pb-3 last:border-b-0 sm:[&:nth-last-child(2)]:border-b-0">
                            <dt class="text-caption text-muted-foreground">Daily cap</dt>
                            <dd class="m-0 text-body-sm font-medium text-foreground"><bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">5,000 mL</bdi></dd>
                        </div>
                                            <div class="flex min-w-0 flex-col gap-0.5 border-b border-border pb-3 last:border-b-0 sm:[&:nth-last-child(2)]:border-b-0">
                            <dt class="text-caption text-muted-foreground">Cooldown between entries</dt>
                            <dd class="m-0 text-body-sm font-medium text-foreground"><bdi data-slot="measure" data-numeric="" dir="ltr" class="tabular-nums [unicode-bidi:isolate]">30 seconds</bdi></dd>
                        </div>
                                    </dl></div></div>
    </section>
    <p class="text-caption text-muted-foreground">Every line on this page is about the protocol and what was logged. None of it is a claim about your body.</p>
</div>
```
