/* Generated by scripts/gen-tokens.py from tokens/tokens.json. Do not edit. */

:root, [data-theme="gruvbox-dark"] {
  --hw-background: #282828;
  --hw-background-deep: #1d2021;
  --hw-panel: #32302f;
  --hw-panel-line: #3c3836;
  --hw-surface: #3c3836;
  --hw-surface-raised: #504945;
  --hw-border: #665c54;
  --hw-text: #ebdbb2;
  --hw-text-muted: #a89984;
  --hw-text-faint: #928374;
  --hw-ink: #ebdbb2;
  --hw-rust: #fe8019;
  --hw-rust-soft: #d65d0e;
  --hw-accent: #8ec07c;
  --hw-caret: #fabd2f;
  --hw-selection: #504945;
  --hw-note: #fabd2f;
  --hw-spelling: #fb4934;
  --hw-link: #83a598;
  --hw-success: #b8bb26;
  --hw-danger: #fb4934;
}

[data-theme="gruvbox-light"] {
  --hw-background: #fbf1c7;
  --hw-background-deep: #f9f5d7;
  --hw-panel: #f2e5bc;
  --hw-panel-line: #e0d0a8;
  --hw-surface: #ebdbb2;
  --hw-surface-raised: #d5c4a1;
  --hw-border: #bdae93;
  --hw-text: #3c3836;
  --hw-text-muted: #665c54;
  --hw-text-faint: #7c6f64;
  --hw-ink: #3c3836;
  --hw-rust: #af3a03;
  --hw-rust-soft: #d65d0e;
  --hw-accent: #427b58;
  --hw-caret: #b57614;
  --hw-selection: #d5c4a1;
  --hw-note: #b57614;
  --hw-spelling: #9d0006;
  --hw-link: #076678;
  --hw-success: #79740e;
  --hw-danger: #9d0006;
}

:root {
  --hw-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --hw-size-caption: 12px;
  --hw-size-small: 13px;
  --hw-size-body: 16px;
  --hw-size-typewriter: 20px;
  --hw-size-heading: 22px;
  --hw-size-title: 28px;
  --hw-space-xxs: 2px;
  --hw-space-xs: 4px;
  --hw-space-s: 8px;
  --hw-space-m: 12px;
  --hw-space-l: 16px;
  --hw-space-xl: 24px;
  --hw-space-xxl: 32px;
  --hw-space-xxxl: 48px;
  --hw-line-body: 1.6;
  --hw-line-typewriter: 1.8;
  --hw-measure: 72ch;
}

/* humanwritten web: Gruvbox and IBM Plex Mono (fonts: web/public/fonts, OFL). Colours
   and sizes come from tokens.css, generated from tokens/tokens.json; the build puts both in
   assets/app.css, so font addresses are relative to assets/. */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: block;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* The same page must draw the same boxes in a browser, a Mac web view and an iOS web view (the
   side-by-side check, docs/SHELL.md §2). So nothing is left to an engine's defaults: every line
   has an explicit unitless line height (no `normal`, which WebKit on iOS measures differently for
   Plex Mono), iOS never resizes text on its own, and form controls draw no native chrome. */
:root {
  /* Interface text (chrome, cards, notes, controls); the writing itself uses --hw-line-body. */
  --hw-line-ui: 1.4;
  /* One line of control text, its padding and its 1px border. */
  --hw-control-height: calc(1em * var(--hw-line-ui) + 2 * var(--hw-space-xs) + 2px);
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html[data-theme="gruvbox-light"] {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--hw-background);
  color: var(--hw-text);
  font-family: var(--hw-font-mono);
  font-size: var(--hw-size-small);
  line-height: var(--hw-line-ui);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--hw-selection);
}

/* One rule for every control: no native appearance, and every metric stated. */
button,
input,
textarea,
select {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  line-height: var(--hw-line-ui);
  color: inherit;
  background-color: transparent;
  border: 1px solid var(--hw-border);
  border-radius: 2px;
  padding: var(--hw-space-xs) var(--hw-space-s);
}

button,
input,
select {
  height: var(--hw-control-height);
}

/* An input with no width is sized by the engine's guess of 20 characters; state it instead.
   Fields that fill their column say width: 100% where they are laid out. */
input,
textarea {
  width: 20ch;
}

textarea {
  height: auto;
}

/* Ticks keep their native look, at a stated size. */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 13px;
  height: 13px;
  padding: 0;
  border: none;
}

input[type="range"] {
  -webkit-appearance: auto;
  appearance: auto;
  padding: 0;
  border: none;
}

/* Without its native chrome a select shows its arrow as a small drawn chevron. */
select {
  padding-right: calc(var(--hw-space-s) + 12px);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    right calc(var(--hw-space-s) + 4px) center,
    right var(--hw-space-s) center;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}

button {
  padding: var(--hw-space-xs) var(--hw-space-m);
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

button:hover:not(:disabled, [aria-disabled="true"]) {
  background: var(--hw-surface);
}

/* `aria-disabled` keeps a control focusable, so it can say why it can't act (its title). */
button:disabled,
button[aria-disabled="true"] {
  cursor: default;
  color: var(--hw-text-faint);
  border-color: var(--hw-surface-raised);
}

button[aria-pressed="true"] {
  background: var(--hw-surface-raised);
  color: var(--hw-accent);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--hw-caret);
  outline-offset: 1px;
}

input:not([type]),
input[type="url"],
textarea,
select {
  background-color: var(--hw-background-deep);
}

.hw-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* Who wrote it: ink, rust, unrecorded (docs/SHELL.md §5). Never a colour for anything else. */

.hw-ink {
  color: var(--hw-ink);
}

.hw-rust {
  color: var(--hw-rust);
}

/*
 * Declared, not recorded (imported, pasted or dropped in): a person's, so the ink colour, but at
 * 62% with a dotted underline, so a reader sees exactly what is proven ink (fish hw-0053). One
 * rule for every view: read, live, source, playback and the video frame.
 */
.hw-unrecorded {
  color: color-mix(in srgb, var(--hw-ink) 62%, transparent);
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.hw-note-comment {
  text-decoration: underline 2px var(--hw-note);
  text-underline-offset: 4px;
}

.hw-note-spelling {
  text-decoration: underline wavy var(--hw-spelling);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* A word's meaning (docs/FORMAT.md §4.3): underlined like spelling, the meaning on hover. */
.hw-note-definition {
  text-decoration: underline dotted var(--hw-note);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: help;
}

/* A seat: a place kept for the human's words. The human's ink colour, faint, and never text. */
.hw-seat {
  display: inline-block;
  margin: 0 var(--hw-space-xxs);
  padding: 0 var(--hw-space-xs);
  border: 1px dashed currentColor;
  border-radius: 2px;
  color: color-mix(in srgb, var(--hw-ink) 45%, transparent);
  font-style: italic;
  line-height: 1.4;
  user-select: none;
}

/* A heading's section counted (hw-0076): faint, small, at the right end of the heading's line, so
   it never reads before the writing. Never text, never selected, never coloured like provenance. */
.hw-section-count {
  float: right;
  margin-left: var(--hw-space-m);
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
  font-style: normal;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  user-select: none;
  pointer-events: none;
}

.hw-section-count::after {
  content: attr(data-label);
}

/* A seat with the human's words in it: the box gives way to them. A faint dashed line under the
   seat's opening words keeps the place (hw-0081: under every word, a long filled seat read as
   "everything underlined"); the rest shows it only under the pointer. Their colour stays the
   provenance's. */
.hw-seat-filled-start,
.hw-seat-filled:hover {
  text-decoration: underline dashed color-mix(in srgb, var(--hw-ink) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* The words an edit in a thread changed, while its line is hovered or focused. */
.hw-highlight {
  background: color-mix(in srgb, var(--hw-note) 28%, transparent);
  outline: 1px solid var(--hw-note);
}

/* Layout: the editor app. Container queries, so a frame (render mode, a phone) lays out by its
   own width, the same in every engine, not by the window's. */

.hw-app {
  --hw-margin-width: 300px;
  /* 72 characters of body text (a Plex Mono character is 0.6em wide) beside the notes margin. */
  max-width: calc(72 * 0.6 * var(--hw-size-body) + var(--hw-margin-width) + var(--hw-space-xxxl) * 2);
  margin: 0 auto;
  padding: var(--hw-space-xl) var(--hw-space-xl) 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  container-type: inline-size;
}

/* One quiet line of chrome. Sticky, so typewriter can scroll the page under it. */
.hw-chrome {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-l);
  padding: var(--hw-space-s) 0;
  background: var(--hw-background);
  border-bottom: 1px dashed var(--hw-border);
  transition: opacity 400ms ease;
}

/* While the writer types, the chrome steps back; the mouse or the keyboard brings it forward. */
.hw-app[data-typing="true"] .hw-chrome {
  opacity: 0.12;
}

.hw-app[data-typing="true"] .hw-chrome:hover,
.hw-app[data-typing="true"] .hw-chrome:focus-within {
  opacity: 1;
}

.hw-chrome button,
.hw-chrome .hw-segmented > label {
  border-color: transparent;
  color: var(--hw-text-muted);
}

.hw-chrome button:hover:not(:disabled, [aria-disabled="true"]) {
  color: var(--hw-text);
}

.hw-chrome button[aria-pressed="true"] {
  color: var(--hw-accent);
  background: var(--hw-surface);
}

.hw-chrome button:disabled,
.hw-chrome button[aria-disabled="true"] {
  color: var(--hw-text-faint);
  opacity: 0.6;
}

/* In the Mac and iOS shells the app is the window: no site around it. */
.hw-shell .hw-chrome .hw-site-nav {
  display: none;
}

.hw-site-nav {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: var(--hw-space-l);
}

.hw-chrome .hw-site-nav {
  flex: 0 1 auto;
}

.hw-site-nav a {
  color: var(--hw-text-muted);
  text-decoration: none;
}

.hw-site-nav a:hover,
.hw-site-nav a[aria-current="page"] {
  color: var(--hw-accent);
}

.hw-site-nav .hw-wordmark {
  color: var(--hw-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-s);
}

/* The view is a quiet picker, not a row of tabs (hw-0028). */
.hw-view-picker {
  display: inline-flex;
  align-items: center;
  gap: var(--hw-space-s);
  color: var(--hw-text-muted);
}

.hw-view-picker select {
  border-color: transparent;
  background-color: transparent;
  color: var(--hw-text);
}

/*
 * The chrome's focus, for the keyboard: a thin accent ring clear of its neighbours on the
 * control's own quiet fill, the chrome's colours rather than the caret's yellow (hw-0054).
 */
.hw-chrome button:focus-visible,
.hw-chrome select:focus-visible,
.hw-chrome summary:focus-visible {
  outline: 1px solid var(--hw-accent);
  outline-offset: 2px;
  background-color: var(--hw-surface);
}

/* WebKit matches :focus-visible on a select the mouse opened; the workspace marks pointer use. */
html[data-pointer="true"] .hw-chrome select:focus-visible {
  outline: none;
  background-color: transparent;
}

.hw-details {
  position: relative;
  margin-left: auto;
}

.hw-details summary {
  cursor: pointer;
  color: var(--hw-text-muted);
  padding: var(--hw-space-xs) var(--hw-space-s);
  list-style: none;
}

.hw-details summary::-webkit-details-marker {
  display: none;
}

.hw-details-body {
  position: absolute;
  right: 0;
  top: calc(100% + var(--hw-space-xs));
  z-index: 4;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-m);
  padding: var(--hw-space-m);
  background: var(--hw-surface);
  border: 1px solid var(--hw-border);
  border-radius: 3px;
}

.hw-actions,
.hw-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hw-space-s);
}

.hw-segmented {
  display: inline-flex;
  border: none;
  margin: 0;
  padding: 0;
}

.hw-segmented > button,
.hw-segmented > label {
  border-radius: 0;
  margin-left: -1px;
}

.hw-segmented > :first-child {
  border-radius: 2px 0 0 2px;
  margin-left: 0;
}

.hw-segmented > :last-child {
  border-radius: 0 2px 2px 0;
}

.hw-segmented > label {
  display: inline-flex;
  align-items: center;
  gap: var(--hw-space-xs);
  border: 1px solid var(--hw-border);
  padding: var(--hw-space-xs) var(--hw-space-m);
  cursor: pointer;
}

.hw-field {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xxs);
  color: var(--hw-text-muted);
  font-size: var(--hw-size-caption);
}

.hw-field input,
.hw-field textarea {
  width: 100%;
  color: var(--hw-text);
  font-size: var(--hw-size-small);
}

.hw-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--hw-space-xs);
  color: var(--hw-text-muted);
}

.hw-toggle input,
.hw-scrubber input {
  accent-color: var(--hw-accent);
}

.hw-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--hw-space-m);
  margin: var(--hw-space-m) 0 0;
  padding: var(--hw-space-s) var(--hw-space-m);
  border-radius: 2px;
}

.hw-error {
  color: var(--hw-danger);
}

.hw-banner.hw-error {
  border: 1px solid var(--hw-danger);
}

.hw-banner button {
  border: none;
  padding: 0 var(--hw-space-xs);
}

.hw-origin {
  color: var(--hw-text-muted);
  border: 1px dashed var(--hw-border);
}

.hw-page {
  flex: 1;
}

.hw-sheet {
  /* The measure counts characters of the writing's own size, not the toolbar's. */
  font-size: var(--hw-size-body);
  display: grid;
  grid-template-columns: minmax(0, var(--hw-measure)) var(--hw-margin-width);
  gap: var(--hw-space-xxxl);
  position: relative;
}

.hw-read {
  padding-top: var(--hw-space-xl);
}

/* The status line: who wrote it first, then the document's counts. */
.hw-status {
  position: sticky;
  bottom: 0;
  padding: var(--hw-space-s) 0;
  background: var(--hw-background);
  border-top: 1px solid var(--hw-surface);
  color: var(--hw-text-muted);
  font-size: var(--hw-size-caption);
}

.hw-shares {
  display: inline;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/*
 * The status line wraps between its parts, never inside one, so no word ("browser") is left alone
 * on a line (hw-0057): each part keeps together; the " · " before it may break.
 */
.hw-share,
.hw-status-rest > span {
  white-space: nowrap;
}

.hw-status-rest > span > span[aria-hidden="true"] {
  white-space: normal;
}

/* A rail line in the live view: its label and its control on one row, not an orphan button. */
.cm-editor .hw-insert-rail {
  display: flex;
  align-items: center;
  gap: var(--hw-space-s);
}

.hw-share-ink {
  color: var(--hw-ink);
}

.hw-share-rust {
  color: var(--hw-rust);
}

.hw-share-unrecorded {
  color: var(--hw-text-muted);
}

.hw-share-empty {
  color: var(--hw-text-faint);
}

/* The editor. */

.hw-editor .cm-editor {
  min-height: 50vh;
}

.hw-placeholder {
  color: var(--hw-text-faint);
}

/* Markdown, highlighted like Zed (source) and styled in place (live): markers and addresses take
   the colour, never the words, so ink and rust always show. */
.hw-md-heading,
.hw-md-strong {
  font-weight: 700;
}

.hw-md-em,
.hw-md-quote {
  font-style: italic;
}

.hw-md-strike {
  text-decoration: line-through;
}

.hw-md-mark {
  opacity: 0.55;
}

.hw-md-url,
.hw-md-link {
  text-decoration: underline;
  text-decoration-color: var(--hw-link);
  text-underline-offset: 3px;
}

.hw-md-code {
  background: var(--hw-surface);
  border-radius: 2px;
}

/* Code (hw-0064). In a document, fenced code keeps the words' ink, rust and unrecorded colours:
   only weight, slant and fading mark it. A plain file has no provenance to show, so its code
   takes colours. Rust's own colour is never one of them: in humanwritten it means a model wrote it. */
.hw-code-keyword,
.hw-code-type {
  font-weight: 600;
}

.hw-code-comment {
  font-style: italic;
  color: color-mix(in srgb, currentColor 62%, transparent);
}

.hw-plain-editor .hw-code-keyword,
.hw-plain-editor .hw-code-tag {
  color: var(--hw-danger);
}

.hw-plain-editor .hw-code-string {
  color: var(--hw-success);
}

.hw-plain-editor .hw-code-comment {
  color: var(--hw-text-faint);
}

.hw-plain-editor .hw-code-literal,
.hw-plain-editor .hw-code-type {
  color: var(--hw-note);
}

.hw-plain-editor .hw-code-function {
  color: var(--hw-accent);
}

.hw-plain-editor .hw-code-property {
  color: var(--hw-link);
}

.hw-plain-editor .hw-code-meta {
  color: var(--hw-text-muted);
}

.hw-plain-editor .cm-editor {
  min-height: 50vh;
}

/* A plain file (hw-0064): its own editor, no notes, nothing of the recording in the chrome, and
   the status line says what it is instead of who wrote it. */
.hw-app:not([data-file="plain"]) .hw-plain-editor,
.hw-app[data-file="plain"] .hw-editor:not(.hw-plain-editor),
.hw-app[data-file="plain"] .hw-margin,
.hw-app[data-file="plain"] .hw-document-only,
.hw-app[data-file="plain"] .hw-shares,
.hw-app[data-file="plain"] > .hw-dock-right {
  display: none !important;
}

/* No notes and no history: the panel's column goes, and the file sits in the documents' column. */
.hw-grid[data-file="plain"] {
  --hw-right-width: 0px;
}

.hw-app[data-file="plain"] .hw-sheet {
  grid-template-columns: minmax(0, var(--hw-measure));
  max-width: var(--hw-measure);
}

.hw-file-mode:not([hidden]) {
  display: inline;
  margin: 0;
}

.cm-editor[data-view="live"] .hw-md-h1 {
  font-size: 1.45em;
}

.cm-editor[data-view="live"] .hw-md-h2 {
  font-size: 1.25em;
}

.hw-card-slot {
  display: flow-root;
}

/* An insert's own text: `[word:` and `]` dimmed, the body as written. */
.hw-insert-mark {
  opacity: 0.55;
  text-decoration: underline dotted var(--hw-link);
  text-underline-offset: 3px;
}

/* Typewriter is a setting over either view: larger type, the typing line in the middle. */
.cm-editor[data-typewriter="true"] {
  font-size: var(--hw-size-typewriter);
}

.cm-editor[data-typewriter="true"] .cm-content {
  line-height: var(--hw-line-typewriter);
  padding: 45vh 0;
}

/* Inline inserts: a citation, a formula, a link, inside a line. */
.hw-insert-cite {
  font-style: normal;
  color: var(--hw-link);
}

.hw-insert-tex,
.hw-tex {
  font-family: var(--hw-font-mono);
  background: var(--hw-surface);
  border-radius: 2px;
  padding: 0 var(--hw-space-xxs);
}

a.hw-insert-link,
.hw-reading a {
  color: var(--hw-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cm-content .hw-insert-cite,
.cm-content .hw-insert-tex,
.cm-content a.hw-insert-link {
  cursor: text;
}

/* Block inserts: cards in live, figures in read. */
.hw-card {
  margin: var(--hw-space-s) 0 var(--hw-space-l);
  padding: var(--hw-space-m);
  border: 1px solid var(--hw-border);
  border-radius: 3px;
  background: var(--hw-background-deep);
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
  user-select: none;
}

/* size: small · medium · wide · full (docs/FORMAT.md §5); no size reads as wide. */
.hw-card[data-size="small"] {
  width: 40%;
}

.hw-card[data-size="medium"] {
  width: 65%;
}

.hw-card[data-size="full"] {
  margin-right: calc(-1 * var(--hw-space-xxxl));
}

.hw-card img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  border-radius: 2px;
}

.hw-card video {
  width: 100%;
  max-height: 360px;
  background: var(--hw-surface);
}

.hw-card-alt::before {
  content: "▣ ";
}

.hw-card-missing img {
  display: none;
}

.hw-card-missing {
  padding: var(--hw-space-xl) var(--hw-space-l);
  background: repeating-linear-gradient(
    -45deg,
    var(--hw-background-deep),
    var(--hw-background-deep) 8px,
    var(--hw-surface) 8px,
    var(--hw-surface) 9px
  );
}

.hw-card-label {
  color: var(--hw-text);
  font-weight: 500;
}

.hw-card-video::before {
  content: "▶ video";
  color: var(--hw-text);
  font-weight: 500;
}

.hw-card-link .hw-card-label::before {
  content: "↗ ";
}

.hw-card-url {
  color: var(--hw-link);
  word-break: break-all;
}

.hw-card figcaption {
  font-style: italic;
  color: var(--hw-text);
}

.hw-card-caption {
  width: 100%;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px dashed var(--hw-border) !important;
  padding: var(--hw-space-xxs) 0 !important;
  font-style: italic;
  color: var(--hw-text);
}

.hw-card-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-s);
  font-size: var(--hw-size-caption);
}

.hw-card-controls select {
  font-size: var(--hw-size-caption);
}

/* A card's controls are chrome: never the rust or ink of the words the card holds (hw-0057). */
.hw-card-controls,
.hw-card-controls button {
  color: var(--hw-text-muted);
}

.hw-card-controls button {
  margin-left: auto;
  font-size: var(--hw-size-caption);
  border-color: var(--hw-border);
}

.hw-card-cite {
  margin: var(--hw-space-s) 0;
}

.hw-card-cite cite {
  font-style: normal;
  color: var(--hw-link);
}

.hw-poll-question {
  margin: 0;
  color: var(--hw-text);
  font-weight: 500;
}

.hw-poll-options {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xs);
}

.hw-poll-option::before {
  content: "○ ";
}

.hw-card-tex .hw-tex {
  align-self: flex-start;
  color: var(--hw-text);
}

.hw-piece-list {
  margin: 0;
  padding-left: var(--hw-space-l);
}

.hw-piece-list a {
  color: var(--hw-text);
}

/* The slash menu (hw-0030): small, under the line, keyboard first. */
.cm-tooltip.cm-tooltip {
  background: var(--hw-surface);
  border: 1px solid var(--hw-border);
  border-radius: 3px;
  color: var(--hw-text);
}

.hw-slash {
  display: flex;
  flex-direction: column;
  min-width: 260px;
  padding: var(--hw-space-xxs) 0;
  font-size: var(--hw-size-small);
}

.hw-slash-item {
  display: flex;
  justify-content: space-between;
  gap: var(--hw-space-l);
  padding: var(--hw-space-xxs) var(--hw-space-m);
  cursor: pointer;
}

.hw-slash-item[aria-selected="true"] {
  background: var(--hw-surface-raised);
  color: var(--hw-accent);
}

.hw-slash-hint {
  color: var(--hw-text-faint);
}

/* The notes margin */

.hw-margin {
  position: relative;
  padding-top: var(--hw-space-xl);
}

.hw-margin-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.hw-note-form {
  position: sticky;
  top: var(--hw-space-l);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
  margin-bottom: var(--hw-space-l);
  padding: var(--hw-space-m);
  background: var(--hw-surface);
  border-left: 3px solid var(--hw-note);
  border-radius: 2px;
}

.hw-note-form fieldset {
  border: none;
}

.hw-note-quote {
  margin: 0;
  color: var(--hw-text-muted);
  overflow-wrap: anywhere;
}

.hw-note-card {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--hw-note);
  background: var(--hw-background-deep);
  transition: top 120ms ease-out;
}

.hw-note-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--hw-space-xs);
}

/*
 * A card's rail is chrome: every note keeps the notes' colour, whoever wrote it. Its byline ("rust ·
 * the machine · when") says a machine wrote it, in rust, as a label of those words (hw-0057).
 */

.hw-note-card-definition dfn {
  font-style: normal;
  font-weight: 500;
  color: var(--hw-text);
}

.hw-note-card-seat-label {
  color: color-mix(in srgb, var(--hw-ink) 45%, transparent);
  font-style: italic;
}

.hw-note-card-seat {
  border-left-style: dashed;
  border-left-color: color-mix(in srgb, var(--hw-ink) 45%, transparent);
}

/* Who and when, in the author's colour: ink or rust. */
.hw-note-by {
  font-size: var(--hw-size-caption);
}

/* A comment thread: replies and edits under the root, in the order they were made. */
.hw-thread {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
  padding: 0 var(--hw-space-m) var(--hw-space-s);
  font-size: var(--hw-size-small);
}

.hw-thread-fold summary {
  cursor: pointer;
  color: var(--hw-text-muted);
  font-size: var(--hw-size-caption);
}

.hw-thread-items {
  list-style: none;
  margin: var(--hw-space-xs) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
}

.hw-thread-reply,
.hw-thread-edit {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xxs);
  padding-left: var(--hw-space-s);
  /* Chrome: who wrote a reply or an edit is in its byline, never its rule (hw-0057). */
  border-left: 2px solid var(--hw-border);
}

.hw-thread-edit {
  border-left-style: dotted;
  cursor: default;
}

.hw-thread-edit:hover,
.hw-thread-edit:focus-visible {
  background: color-mix(in srgb, var(--hw-note) 12%, transparent);
}

.hw-thread-edit-words {
  color: var(--hw-text-muted);
  overflow-wrap: anywhere;
}

.hw-thread-edit-words del {
  color: var(--hw-text-faint);
}

.hw-thread-edit-words ins {
  text-decoration: none;
}

.hw-thread-resolves {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-reply-form {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xs);
}

.hw-reply-form textarea {
  width: 100%;
  resize: vertical;
}

.hw-note-card-spelling {
  border-left-color: var(--hw-spelling);
}

.hw-note-card-body {
  flex: 1;
  min-width: 0;
  /* A note's card holds several lines: it grows with them. */
  height: auto;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xxs);
  border: none;
  text-align: left;
  text-transform: none;
  padding: var(--hw-space-s) var(--hw-space-m);
}

.hw-note-card-kind {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-note-card-quote,
.hw-note-card-spelling s {
  color: var(--hw-text-muted);
  overflow-wrap: anywhere;
}

.hw-note-card-spelling strong {
  color: var(--hw-text);
  font-weight: 500;
}

.hw-note-card-text {
  color: var(--hw-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hw-note-card-remove {
  border: none;
  color: var(--hw-text-faint);
  padding: var(--hw-space-xs) var(--hw-space-s);
}

/* Spelling from the system checker: suggestions, each fixed (the writer's edit) or noted (as written). */
.hw-suggestions {
  list-style: none;
  margin: 0 0 var(--hw-space-l);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xs);
}

.hw-suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-xs);
  padding: var(--hw-space-xs) var(--hw-space-s);
  border-left: 3px solid var(--hw-spelling);
  background: var(--hw-background-deep);
  font-size: var(--hw-size-small);
}

/* A guess keeps the writer's spelling of it (SDKs, not sdks); the chosen one is filled. */
.hw-suggestion .hw-suggestion-guess {
  text-transform: none;
}

/* The two things to do with the chosen guess, "fix" and "note": outlined, so they read as acts,
   apart from the guesses they act on. */
.hw-suggestion .hw-suggestion-action {
  border-color: var(--hw-border);
  color: var(--hw-text);
}

/* "fix", "note" and × on their own row under the word, at its right: the same place every time. */
.hw-suggestion-actions {
  display: flex;
  flex-basis: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: var(--hw-space-xs);
}

/* Playback */

.hw-playback {
  /* Same measure as the editor column (72 characters of body text), the notes beside it. */
  font-size: var(--hw-size-body);
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-l);
  max-width: calc(var(--hw-measure) + var(--hw-margin-width, 300px) + var(--hw-space-xxl));
  padding-top: var(--hw-space-l);
}

.hw-playback-controls {
  font-size: var(--hw-size-small);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-m);
}

.hw-scrubber {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xs);
}

.hw-scrubber input {
  width: 100%;
}

.hw-scrubber-readout {
  color: var(--hw-text-muted);
  font-size: var(--hw-size-caption);
  font-variant-numeric: tabular-nums;
}

/* The text as it was, and beside it the notes and replies made by then. */
.hw-playback-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hw-margin-width, 300px);
  gap: var(--hw-space-xxl);
}

.hw-playback-stage[data-notes="false"] {
  grid-template-columns: minmax(0, 1fr);
}

.hw-playback-notes {
  list-style: none;
  margin: 0;
  padding: var(--hw-space-l) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
}

.hw-playback-notes .hw-note-card {
  position: static;
}

/* A piece imported whole has nothing to play: one quiet line says so, beside the way back. */
.hw-playback-none {
  margin: 0;
  color: var(--hw-text-muted);
  font-size: var(--hw-size-small);
}

/* The text at a moment, drawn by the read view's renderer: its paragraphs keep their own lines. */
.hw-playback-text {
  overflow-wrap: anywhere;
  font-size: var(--hw-size-body);
  line-height: var(--hw-line-body);
  color: var(--hw-ink);
  min-height: 40vh;
  padding: var(--hw-space-l) 0 30vh;
}

.hw-playback-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--hw-caret);
  animation: hw-blink 1.1s steps(1) infinite;
}

@keyframes hw-blink {
  50% {
    opacity: 0;
  }
}

/* The site: an index of papers and notes, and one page per piece. */

.hw-site {
  max-width: calc(72 * 0.6 * var(--hw-size-body) + var(--hw-margin-width, 300px) + var(--hw-space-xxxl) * 2);
  margin: 0 auto;
  padding: var(--hw-space-xl);
  container-type: inline-size;
}

.hw-site > .hw-site-nav {
  padding-bottom: var(--hw-space-m);
  border-bottom: 1px dashed var(--hw-border);
}

.hw-index {
  font-size: var(--hw-size-body);
  max-width: var(--hw-measure);
  padding: var(--hw-space-xxl) 0;
}

.hw-index-intro {
  color: var(--hw-text-muted);
  line-height: var(--hw-line-body);
  margin: 0 0 var(--hw-space-xxl);
}

.hw-index-section + .hw-index-section {
  margin-top: var(--hw-space-xxxl);
}

.hw-index-heading {
  font-size: var(--hw-size-small);
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--hw-text-faint);
  margin: 0 0 var(--hw-space-l);
}

.hw-count {
  color: var(--hw-text-faint);
  opacity: 0.7;
}

.hw-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xl);
}

.hw-index-item {
  display: grid;
  grid-template-columns: 11ch 1fr;
  gap: var(--hw-space-l);
}

.hw-index-date {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-small);
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.hw-index-body {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xs);
  min-width: 0;
}

.hw-index-title {
  color: var(--hw-text);
  text-decoration: none;
  font-weight: 500;
}

.hw-index-title:hover {
  color: var(--hw-accent);
}

/* One line: the shown title carries the piece, the excerpt only hints. */
.hw-index-excerpt {
  margin: 0;
  color: var(--hw-text-muted);
  font-size: var(--hw-size-small);
  line-height: var(--hw-line-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hw-index-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hw-space-xs) var(--hw-space-s);
  align-items: center;
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

/* A paper's shares always take a line of their own, so no card wraps them and another doesn't. */
.hw-index-meta .hw-inkbar {
  flex-basis: 100%;
}

/* A list as dated lines (`[list: …]` without `layout=cards`). */
.hw-index-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
}

.hw-index-row {
  display: grid;
  grid-template-columns: 11ch 1fr;
  gap: var(--hw-space-l);
  align-items: baseline;
}

.hw-index-empty {
  margin: 0;
  color: var(--hw-text-faint);
  font-size: var(--hw-size-small);
}

/* The quiet links under a site page (a quiet collection, e.g. samples): small, faint, below it all. */
/* Right under the content: the last list's own bottom margin is the space above it (hw-0057). */
.hw-site-footer {
  display: flex;
  gap: var(--hw-space-l);
  margin-top: 0;
  padding-top: var(--hw-space-m);
  border-top: 1px dashed var(--hw-border);
  font-size: var(--hw-size-small);
}

.hw-site-footer a {
  color: var(--hw-text-faint);
  text-decoration: none;
}

.hw-site-footer a:hover,
.hw-site-footer a[aria-current="page"] {
  color: var(--hw-accent);
}

/* A page's own text (content/pages/): an intro, then its featured pieces and lists. */
.hw-page-text > .hw-p {
  margin-bottom: var(--hw-space-xxl);
}

.hw-page-text .hw-index-section {
  margin: 0 0 var(--hw-space-xxxl);
}

/* The last list leads into the footer: a section's gap, not a page's. */
.hw-page-text .hw-index-section:last-child {
  margin-bottom: var(--hw-space-xl);
}

/* The lists keep the index's quiet look inside the reading column. */
.hw-page-text .hw-index-heading {
  font-size: var(--hw-size-small);
  line-height: inherit;
  color: var(--hw-text-faint);
  margin: 0 0 var(--hw-space-l);
}

.hw-page-text a.hw-index-title {
  color: var(--hw-text);
  text-decoration: none;
}

.hw-page-text a.hw-index-title:hover {
  color: var(--hw-accent);
}

/* `[[slug]]`: a link to another piece, or marked when there is nothing by that name yet. */
.hw-wiki {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

a.hw-wiki:hover {
  text-decoration-style: solid;
}

.hw-wiki-missing {
  text-decoration-color: var(--hw-text-faint);
  text-decoration-style: wavy;
  cursor: help;
}

.cm-hw-wiki {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.hw-linked-from {
  margin-top: var(--hw-space-xxl);
  padding-top: var(--hw-space-l);
  border-top: 1px dashed var(--hw-border);
  font-size: var(--hw-size-small);
  max-width: var(--hw-measure);
}

.hw-linked-from .hw-index-heading {
  margin-bottom: var(--hw-space-s);
}

/* Signed out on the web, `write` asks first (sign-in.ts); the editor waits underneath. */
.hw-sign-in {
  max-width: var(--hw-measure);
  margin: var(--hw-space-xxxl) auto;
  padding: 0 var(--hw-space-xl);
  font-size: var(--hw-size-body);
  line-height: var(--hw-line-body);
}

.hw-sign-in-title {
  font-size: var(--hw-size-heading);
  margin: 0 0 var(--hw-space-l);
}

.hw-sign-in-text {
  color: var(--hw-text-muted);
  margin: 0 0 var(--hw-space-xl);
}

.hw-sign-in-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hw-space-m);
}

.hw-sign-in-note {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-small);
  min-height: 1.5em;
}

.hw-app[data-sign-in="ask"] .hw-toolbar,
.hw-app[data-sign-in="ask"] .hw-details,
.hw-app[data-sign-in="ask"] .hw-page,
.hw-app[data-sign-in="ask"] .hw-status {
  display: none;
}

.hw-tag {
  border: 1px dashed var(--hw-border);
  border-radius: 2px;
  padding: 0 var(--hw-space-xs);
}

.hw-tag-recorded {
  border-style: solid;
  color: var(--hw-accent);
}

/* On a narrow card the words drop under the bar rather than run off the edge (hw-0057). */
.hw-inkbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-xxs) var(--hw-space-s);
  max-width: 100%;
}

.hw-inkbar-track {
  display: inline-flex;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.hw-inkbar-ink {
  background: var(--hw-ink);
}

.hw-inkbar-rust {
  background: var(--hw-rust);
}

.hw-inkbar-unrecorded {
  background: var(--hw-text-faint);
}

.hw-inkbar-label {
  white-space: nowrap;
}

.hw-piece {
  padding-top: var(--hw-space-l);
}

.hw-piece-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-m);
  color: var(--hw-text-faint);
  font-size: var(--hw-size-small);
  margin-bottom: var(--hw-space-xl);
}

.hw-back {
  color: var(--hw-text-muted);
  text-decoration: none;
}

.hw-back:hover {
  color: var(--hw-accent);
}

.hw-piece-modes {
  margin-left: auto;
}

.hw-piece-status {
  margin-top: var(--hw-space-xl);
}

/* The read view: the same sheet in the editor and on a piece's page. */
.hw-piece-sheet {
  font-size: var(--hw-size-body);
  display: grid;
  grid-template-columns: minmax(0, var(--hw-measure)) 300px;
  gap: var(--hw-space-xxxl);
}

.hw-reading {
  line-height: var(--hw-line-body);
  color: var(--hw-ink);
  /* A long address (a reference's link) breaks rather than widen the page on a phone (hw-0057). */
  overflow-wrap: anywhere;
}

.hw-reading .hw-p {
  margin: 0 0 var(--hw-space-l);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hw-reading h1,
.hw-reading h2,
.hw-reading h3,
.hw-reading h4,
.hw-reading h5,
.hw-reading h6 {
  line-height: 1.35;
  color: var(--hw-text);
  margin: var(--hw-space-xl) 0 var(--hw-space-m);
  overflow-wrap: anywhere;
}

.hw-reading .hw-h2 {
  font-size: 1.15em;
}

.hw-reading .hw-h3,
.hw-reading .hw-h4,
.hw-reading .hw-h5,
.hw-reading .hw-h6 {
  font-size: 1em;
}

/* A piece has no heading of its own: its first line reads as one. */
.hw-reading .hw-piece-headline {
  font-size: var(--hw-size-heading);
  font-weight: 700;
  margin: 0 0 var(--hw-space-l);
}

.hw-reading .hw-md-code {
  padding: 0 var(--hw-space-xxs);
}

.hw-reading .hw-card {
  user-select: text;
}

.hw-reading .hw-card-image .hw-card-alt {
  display: none;
}

.hw-reading .hw-card-missing .hw-card-alt {
  display: block;
}

.hw-piece-origin {
  margin: calc(-1 * var(--hw-space-m)) 0 var(--hw-space-l);
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

/* A paper's layers: a legend, and a switch to read it with or without them. */
.hw-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-xs) var(--hw-space-l);
  margin-bottom: var(--hw-space-xl);
  padding: var(--hw-space-s) var(--hw-space-m);
  border: 1px dashed var(--hw-border);
  border-radius: 3px;
  font-size: var(--hw-size-small);
  width: fit-content;
  max-width: var(--hw-measure);
}

/* The switch on a line of its own, the three keys together under it: no key left alone on a row. */
.hw-legend > .hw-toggle {
  flex-basis: 100%;
}

.hw-legend-key::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: var(--hw-space-xs);
  border-radius: 2px;
  vertical-align: -1px;
}

.hw-legend-ink::before {
  background: var(--hw-ink);
}

.hw-legend-rust {
  color: var(--hw-rust);
}

.hw-legend-rust::before {
  background: var(--hw-rust);
}

.hw-legend-unrecorded::before {
  background: var(--hw-text-faint);
}

/* Emphasis (papers): the model's words stand out on a rust wash and the person's ink steps back a
   little. Without it rust is still drawn: AI writing is never shown as ink. */
.hw-piece[data-emphasis="true"] .hw-reading .hw-rust {
  background: color-mix(in srgb, var(--hw-rust) 16%, transparent);
  border-radius: 2px;
}

.hw-piece[data-emphasis="true"] .hw-reading .hw-p [data-by="human"] {
  color: var(--hw-text-muted);
}

.hw-theme-toggle {
  margin-left: auto;
  border: none;
  color: var(--hw-text-muted);
}

.hw-piece-notes {
  position: relative;
}

.hw-margin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Beside the text, each annotation sits level with its line (placed by place-notes.ts). */
.hw-piece-notes .hw-note-card-static {
  position: absolute;
  left: 0;
  right: 0;
  transition: top 120ms ease-out;
}

.hw-note-card-static {
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xxs);
  padding: var(--hw-space-s) var(--hw-space-m);
  border-left: 3px solid var(--hw-note);
  background: var(--hw-background-deep);
  font-size: var(--hw-size-small);
}

.hw-note-card-static.hw-note-card-spelling {
  border-left-color: var(--hw-spelling);
}

.hw-note-card-static .hw-thread-fold {
  margin-top: var(--hw-space-xs);
}

/* Narrow (a phone, a render frame): one column, notes under the text. */
@container (max-width: 900px) {
  .hw-sheet,
  .hw-piece-sheet {
    grid-template-columns: minmax(0, 1fr);
  }

  .hw-note-card,
  .hw-piece-notes .hw-note-card-static {
    position: static;
    margin-bottom: var(--hw-space-s);
  }

  .hw-playback-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .hw-index-item {
    grid-template-columns: 1fr;
    gap: var(--hw-space-xxs);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-playback-caret {
    animation: none;
  }

  .hw-note-card,
  .hw-piece-notes .hw-note-card-static {
    transition: none;
  }
}

/* Render mode (docs/SHELL.md §2): one document, still. No caret, no motion, no focus ring, no
   scrollbars; the frame is exactly its width and as tall as what it draws. */
html.hw-render,
html.hw-render body {
  min-height: 0;
  scrollbar-width: none;
}

html.hw-render ::-webkit-scrollbar {
  display: none;
}

html.hw-render *,
html.hw-render *::before,
html.hw-render *::after {
  animation: none !important;
  transition: none !important;
  caret-color: transparent !important;
  outline: none !important;
}

.hw-frame {
  container-type: inline-size;
  padding: var(--hw-space-l);
  background: var(--hw-background);
}

html.hw-render .cm-editor {
  min-height: 0;
}

html.hw-render .cm-editor .cm-content {
  padding: 0;
}

html.hw-render .cm-cursorLayer,
html.hw-render .cm-selectionLayer {
  display: none;
}

html.hw-render .hw-status {
  position: static;
}

/* Paper mode (docs/FORMAT.md §9): a paper set like its PDF. Rails in the margin say who wrote
   each block (rust, ink, pending), as provenance.sty draws them; ink is italic there and here.
   rust: written by an agent (Claude, Opus 5.5) in build-1, 2026-10-18, school hw-papers. */

.hw-paper {
  font-size: var(--hw-size-body);
}

.hw-paper-front {
  margin-bottom: var(--hw-space-xxl);
  text-align: center;
}

.hw-reading .hw-paper-title {
  font-size: var(--hw-size-title);
  margin-bottom: var(--hw-space-s);
}

.hw-paper-subtitle {
  margin: 0 0 var(--hw-space-l);
  font-size: var(--hw-size-heading);
  color: var(--hw-text);
}

.hw-paper-authors,
.hw-paper-affiliation,
.hw-paper-date {
  margin: 0 0 var(--hw-space-xs);
  color: var(--hw-text-muted);
}

.hw-paper-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--hw-space-l);
  margin-top: var(--hw-space-l);
  font-size: var(--hw-size-small);
}

.hw-legend-pending::before {
  background: var(--hw-text-faint);
}

.hw-paper-abstract {
  margin: 0 var(--hw-space-xl) var(--hw-space-xxl);
  font-size: 0.95em;
}

.hw-reading .hw-paper-abstract-title {
  text-align: center;
  font-size: 1em;
}

.hw-paper-number,
.hw-paper-float-number,
.hw-paper-equation-number,
.hw-paper-ref-number {
  color: var(--hw-text-muted);
  font-variant-numeric: tabular-nums;
}

.hw-paper-number {
  margin-right: var(--hw-space-s);
}

/* The rails: a thin bar beside each block, coloured by who wrote its words. */
.hw-paper .hw-rail {
  border-left: 2px solid var(--hw-rust);
  padding-left: var(--hw-space-m);
  margin-left: calc(-1 * var(--hw-space-m) - 2px);
}

.hw-paper .hw-rail[data-rail="ink"],
.hw-paper .hw-rail[data-rail="unrecorded"] {
  border-left-color: var(--hw-ink);
  font-style: italic;
}

.hw-paper .hw-rail[data-rail="unrecorded"] {
  border-left-style: dashed;
}

.hw-paper .hw-rail[data-rail="mixed"] {
  border-left-color: var(--hw-rust);
  border-left-style: double;
  border-left-width: 4px;
}

.hw-paper .hw-rail[data-rail="mixed"] .hw-ink,
.hw-paper .hw-rail[data-rail="mixed"] .hw-unrecorded {
  font-style: italic;
}

.hw-paper .hw-rail[data-rail="pending"] {
  border-left-color: var(--hw-text-faint);
  color: var(--hw-text-faint);
  font-style: italic;
}

.hw-paper .hw-p {
  white-space: normal;
}

.hw-rail-tag {
  margin: var(--hw-space-l) 0 var(--hw-space-xs);
  font-size: var(--hw-size-caption);
  color: var(--hw-rust);
}

.hw-rail-tag-human,
.hw-rail-tag-steering,
.hw-paper .hw-rail[data-rail="pending"] .hw-rail-tag {
  color: var(--hw-text-muted);
}

.hw-paper-runin {
  font-style: normal;
}

.hw-paper-list {
  margin: 0 0 var(--hw-space-l);
  padding-left: var(--hw-space-xl);
}

.hw-paper-figure,
.hw-paper-table,
.hw-paper-tex {
  margin: var(--hw-space-xl) 0;
}

/* A table wider than a phone scrolls inside itself; the page never scrolls sideways (hw-0057). */
.hw-paper-table {
  max-width: 100%;
  overflow-x: auto;
}

.hw-paper-figure img {
  display: block;
  max-width: 100%;
  margin: 0 auto var(--hw-space-s);
  background: #fff;
  border-radius: 3px;
}

.hw-paper-figure figcaption,
.hw-paper-table figcaption {
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
}

.hw-paper-table table {
  border-collapse: collapse;
  margin: var(--hw-space-s) auto 0;
  font-size: var(--hw-size-small);
}

.hw-paper-table th,
.hw-paper-table td {
  padding: var(--hw-space-xxs) var(--hw-space-s);
  border-bottom: 1px solid var(--hw-border);
}

.hw-paper-table thead th {
  border-bottom-width: 2px;
}

/* Raw LaTeX passed through: a quiet box, emitted verbatim in the .tex. */
.hw-paper-tex {
  padding: var(--hw-space-s) var(--hw-space-m);
  border: 1px dashed var(--hw-border);
  border-radius: 3px;
  font-size: var(--hw-size-caption);
  color: var(--hw-text-faint);
  overflow-wrap: anywhere;
}

.hw-paper-tex code {
  display: block;
  white-space: pre-wrap;
}

.hw-tex-inline {
  font-size: var(--hw-size-caption);
  color: var(--hw-text-faint);
}

.hw-paper-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hw-space-l);
  margin: var(--hw-space-l) 0;
  overflow-x: auto;
}

.hw-cite a,
.hw-ref a,
.hw-footnote-mark a {
  color: inherit;
  text-decoration: underline 1px var(--hw-border);
  text-underline-offset: 3px;
}

.hw-cite-missing,
.hw-ref-missing {
  color: var(--hw-danger);
}

.hw-paper-footnotes,
.hw-paper-references ol {
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
}

.hw-paper-references ol {
  list-style: none;
  padding-left: 0;
}

.hw-paper-references li {
  margin-bottom: var(--hw-space-xs);
}

/* The rails carry a paper's layers; the emphasis wash would paint the whole page rust. */
.hw-piece[data-emphasis="true"] .hw-paper .hw-rust {
  background: none;
}

.hw-paper .katex {
  font-size: 1.05em;
}

@media print {
  .hw-site-nav,
  .hw-piece-meta,
  .hw-legend,
  .hw-chrome,
  .hw-status,
  .hw-piece-notes {
    display: none !important;
  }

  .hw-piece-sheet {
    display: block;
  }
}

/* Media: the video frame (fish hw-0046) and votable polls (fish hw-0047). docs/SHELL.md §8. */

/* The video frame: exactly the frame's size, the text scaled to its shorter side. */
html.hw-video,
html.hw-video body {
  margin: 0;
  overflow: hidden;
  background: var(--hw-background);
}

.hw-video-frame {
  container-type: size;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 7cqmin 7cqmin 6cqmin;
  gap: 2.5cqmin;
  background: var(--hw-background);
  color: var(--hw-ink);
  font-family: var(--hw-font-mono);
}

.hw-video-title {
  margin: 0;
  font-size: max(var(--hw-size-small), 3.4cqmin);
  line-height: var(--hw-line-ui);
  color: var(--hw-text-muted);
}

.hw-video-text {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: max(var(--hw-size-body), 4.4cqmin);
  line-height: var(--hw-line-body);
}

.hw-video-text .hw-rust {
  color: var(--hw-rust);
}

/* Notes made by the moment shown, under the text, the newest in view (as playback shows them). */
.hw-video-notes {
  flex: 0 1 auto;
  max-height: 40%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hw-video-notes[hidden] {
  display: none;
}

.hw-video-progress {
  display: block;
  height: max(2px, 0.5cqmin);
  background: var(--hw-surface);
}

.hw-video-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--hw-caret);
}

.hw-video-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2cqmin;
  font-size: max(var(--hw-size-caption), 3cqmin);
  line-height: var(--hw-line-ui);
  color: var(--hw-text-muted);
}

/* Too narrow for both on one line: the clock moves under the shares, still on the right. */
.hw-video-footer {
  flex-wrap: wrap;
}

.hw-video-footer .hw-shares {
  margin: 0;
  font-size: inherit;
  white-space: nowrap;
}

.hw-video-clock {
  margin-left: auto;
  white-space: nowrap;
}

/* Polls: each option is a button once votes can be read; the bar is its share of the votes. */
.hw-poll-option.hw-poll-votable {
  list-style: none;
}

/* The still card's ○ marks an option; a votable one is its own button. */
.hw-poll-option.hw-poll-votable::before {
  content: none;
}

.hw-poll-choice {
  appearance: none;
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: var(--hw-space-s);
  width: 100%;
  margin: 0;
  padding: var(--hw-space-xs) var(--hw-space-s);
  border: 1px solid var(--hw-border);
  border-radius: 4px;
  background: transparent;
  color: var(--hw-text);
  font: inherit;
  font-size: var(--hw-size-small);
  line-height: var(--hw-line-ui);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.hw-poll-choice:disabled {
  cursor: default;
}

.hw-poll-choice[aria-pressed="true"] {
  border-color: var(--hw-accent);
}

.hw-poll-share {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--hw-selection);
  z-index: 0;
}

.hw-poll-label,
.hw-poll-count {
  position: relative;
  z-index: 1;
}

.hw-poll-count {
  color: var(--hw-text-muted);
}

.hw-poll-footer {
  display: flex;
  gap: var(--hw-space-s);
  align-items: baseline;
  margin: var(--hw-space-xs) 0 0;
  font-size: var(--hw-size-caption);
  line-height: var(--hw-line-ui);
  color: var(--hw-text-muted);
}

.hw-poll-sign-in {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hw-link);
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* A video on a video site: its still until clicked, then the site's player in the same box. */
.hw-card-embed::before {
  content: none;
}

.hw-embed,
.hw-embed-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 2px;
  background: var(--hw-background-deep);
}

.hw-embed {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.hw-card .hw-embed img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.hw-embed-play {
  position: absolute;
  inset: 0;
  width: 56px;
  height: 56px;
  margin: auto;
  border-radius: 50%;
  background: var(--hw-background);
  opacity: 0.85;
  transition: opacity 120ms ease;
}

.hw-embed:hover .hw-embed-play,
.hw-embed:focus-visible .hw-embed-play {
  opacity: 1;
}

.hw-embed-play::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  margin: auto;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--hw-text);
  transform: translateX(2px);
}

.hw-embed-from {
  position: absolute;
  left: var(--hw-space-xs);
  bottom: var(--hw-space-xs);
  padding: 0 var(--hw-space-xs);
  border-radius: 2px;
  background: var(--hw-background);
  color: var(--hw-text-muted);
  font-size: var(--hw-size-caption);
  line-height: var(--hw-line-ui);
}

/* A video that can't be found says which file, as an image says what it was of. */
.hw-card-video .hw-card-alt {
  display: none;
}

.hw-card-video.hw-card-missing .hw-card-alt {
  display: block;
}

.hw-card-missing video {
  display: none;
}

/*
 * A gated page (fish hw-0083): one piece, read, watched and accounted for. One column at the
 * reading measure. Provenance colours appear only on the writing and on the bars that measure it;
 * every bar also says its numbers in words, so the page reads in monochrome.
 */

.hw-gated {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--hw-space-l) var(--hw-space-xl) var(--hw-space-xxxl);
}

.hw-gated-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--hw-space-s) 0 var(--hw-space-xxl);
}

.hw-gated-top .hw-wordmark {
  color: var(--hw-text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hw-gated-top .hw-bar-button {
  min-height: 44px;
  min-width: 64px;
}

.hw-gated-header {
  margin-bottom: var(--hw-space-xxl);
}

.hw-gated-intro {
  font-size: var(--hw-size-body);
  line-height: var(--hw-line-body);
  margin: 0;
  max-width: var(--hw-measure);
}

.hw-gated-intro-by {
  margin: var(--hw-space-xs) 0 0;
  font-size: var(--hw-size-caption);
  color: var(--hw-text-faint);
}

.hw-gated-title {
  font-size: var(--hw-size-title);
  font-weight: 600;
  line-height: 1.25;
  margin: var(--hw-space-xxl) 0 var(--hw-space-s);
  color: var(--hw-text);
}

.hw-gated-facts,
.hw-gated-muted,
.hw-gated-section-meta,
.hw-gated-foot {
  color: var(--hw-text-muted);
  font-size: var(--hw-size-small);
}

.hw-gated-facts {
  margin: 0;
}

/* Who wrote it, overall. */

.hw-gated-overview {
  border-top: 1px solid var(--hw-panel-line);
  border-bottom: 1px solid var(--hw-panel-line);
  padding: var(--hw-space-xl) 0;
  margin-bottom: var(--hw-space-xl);
}

.hw-gated-bar {
  display: flex;
  height: 6px;
  min-width: 80px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--hw-panel-line);
  gap: 2px;
}

.hw-gated-big .hw-gated-bar {
  height: 14px;
  border-radius: 2px;
}

.hw-gated-bar-ink {
  background: var(--hw-ink);
}

.hw-gated-bar-rust {
  background: var(--hw-rust);
}

/* Unrecorded is hatched, so it is not just a lighter ink. */
.hw-gated-bar-unrecorded {
  background: repeating-linear-gradient(135deg, var(--hw-text-faint) 0 2px, transparent 2px 5px);
  box-shadow: inset 0 0 0 1px var(--hw-text-faint);
}

.hw-gated-shares {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hw-space-s) var(--hw-space-xl);
  margin: var(--hw-space-m) 0 0;
  font-size: var(--hw-size-heading);
}

.hw-gated-share b {
  font-weight: 400;
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
  margin-right: var(--hw-space-xs);
}

.hw-gated-legend li {
  display: grid;
  grid-template-columns: 12ch 1fr;
  gap: var(--hw-space-s);
}

.hw-gated-legend {
  list-style: none;
  padding: 0;
  margin: var(--hw-space-l) 0 0;
  display: grid;
  gap: var(--hw-space-xs);
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
}

.hw-gated-legend .hw-ink,
.hw-gated-legend .hw-rust,
.hw-gated-legend .hw-unrecorded,
.hw-gated-structure {
  display: inline-block;
  min-width: 11ch;
}

.hw-gated-structure {
  color: var(--hw-text-faint);
}

/* Read or watch. */

.hw-gated-modes {
  margin: var(--hw-space-l) 0 var(--hw-space-xl);
}

.hw-gated-modes button,
.hw-gated-controls button {
  min-height: 44px;
}

/* The read view, section by section. */

.hw-gated-section {
  margin-bottom: var(--hw-space-xxl);
}

.hw-gated-section-head {
  display: flex;
  align-items: center;
  gap: var(--hw-space-l);
}

.hw-gated-section-head .hw-gated-bar {
  flex: 0 0 120px;
}

.hw-gated-heading {
  font-size: var(--hw-size-heading);
  font-weight: 600;
  margin: 0;
  color: var(--hw-text);
  flex: 1 1 auto;
}

.hw-gated-section-meta {
  margin: var(--hw-space-xs) 0 var(--hw-space-l);
}

.hw-gated-body {
  padding: 0;
  max-width: var(--hw-measure);
}

.hw-gated-hidden,
.hw-gated-empty {
  color: var(--hw-text-muted);
  border-left: 2px solid var(--hw-panel-line);
  padding-left: var(--hw-space-m);
  font-size: var(--hw-size-small);
}

/* Playback. */

.hw-gated-playback {
  margin-bottom: var(--hw-space-xxl);
}

.hw-gated-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hw-space-m) var(--hw-space-l);
}

.hw-gated-play {
  min-width: 88px;
}

.hw-gated-clock {
  font-variant-numeric: tabular-nums;
  color: var(--hw-text-muted);
  font-size: var(--hw-size-small);
  margin-left: auto;
}

.hw-gated-scrub {
  position: relative;
  margin: var(--hw-space-m) 0 var(--hw-space-l);
}

.hw-gated-strip {
  display: block;
  width: 100%;
  height: 28px;
}

.hw-gated-scrub input[type="range"] {
  width: 100%;
  margin: var(--hw-space-xs) 0 0;
  accent-color: var(--hw-accent);
  min-height: 24px;
}

.hw-gated-playtext {
  min-height: 60vh;
  max-height: 70vh;
  overflow-y: auto;
  border-top: 1px solid var(--hw-panel-line);
  padding-top: var(--hw-space-l);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hw-gated-play-h {
  font-weight: 600;
  color: var(--hw-text-faint);
  margin: var(--hw-space-s) 0;
}

.hw-gated-play-h::before {
  content: "## ";
  color: var(--hw-panel-line);
}

.hw-gated-play-blank {
  min-height: 0.8em;
}

.hw-gated-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin: 0 -1px;
  vertical-align: text-bottom;
  background: var(--hw-caret);
}

/* How it was written. */

.hw-gated-block {
  border-top: 1px solid var(--hw-panel-line);
  padding-top: var(--hw-space-xl);
  margin-top: var(--hw-space-xxl);
}

.hw-gated-block-title {
  font-size: var(--hw-size-heading);
  font-weight: 600;
  margin: 0 0 var(--hw-space-l);
}

.hw-gated-sub-title {
  font-size: var(--hw-size-body);
  font-weight: 600;
  margin: var(--hw-space-xxl) 0 var(--hw-space-s);
}

.hw-gated-sub {
  font-size: var(--hw-size-small);
  font-weight: 400;
  color: var(--hw-text-muted);
  margin: var(--hw-space-l) 0 var(--hw-space-xs);
}

.hw-gated-chart {
  margin: 0 0 var(--hw-space-xl);
}

.hw-gated-chart-plot {
  position: relative;
  height: 112px;
  border-bottom: 1px solid var(--hw-border);
}

.hw-gated-col {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column-reverse;
}

.hw-gated-col > span {
  display: block;
  width: 100%;
}

.hw-gated-col-typed {
  background: var(--hw-ink);
}

.hw-gated-col-deleted {
  background: var(--hw-text-faint);
}

.hw-gated-col-fixed {
  background: var(--hw-note);
}

.hw-gated-col-undone {
  background: var(--hw-link);
}

.hw-gated-pause {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--hw-panel-line) 70%, transparent) 0 1px,
    transparent 1px 6px
  );
}

.hw-gated-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hw-gated-mark {
  position: absolute;
  top: -4px;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--hw-text-muted);
}

.hw-gated-mark::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -4px;
  width: 7px;
  height: 7px;
  background: var(--hw-text-muted);
}

.hw-gated-mark[data-kind="paste"] {
  border-left: 2px solid var(--hw-note);
}

.hw-gated-mark[data-kind="paste"]::before {
  background: var(--hw-note);
  border-radius: 50%;
}

.hw-gated-mark[data-kind="undo"] {
  border-left-color: var(--hw-link);
}

.hw-gated-mark[data-kind="undo"]::before {
  background: var(--hw-link);
}

.hw-gated-mark[data-kind="machine"] {
  border-left-color: var(--hw-rust);
}

.hw-gated-mark[data-kind="machine"]::before {
  background: var(--hw-rust);
  transform: rotate(45deg);
}

.hw-gated-axis {
  position: relative;
  height: 20px;
  font-size: var(--hw-size-caption);
  color: var(--hw-text-faint);
}

.hw-gated-tick {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
}

.hw-gated-tick:first-child {
  transform: none;
}

.hw-gated-axis-unit {
  position: absolute;
  right: 0;
  top: 4px;
}

.hw-gated-chart figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hw-space-xs) var(--hw-space-l);
  margin-top: var(--hw-space-s);
  font-size: var(--hw-size-caption);
  color: var(--hw-text-muted);
}

.hw-gated-key::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: var(--hw-space-xs);
  vertical-align: -1px;
  background: var(--hw-ink);
}

.hw-gated-key[data-kind="deleted"]::before {
  background: var(--hw-text-faint);
}

.hw-gated-key[data-kind="fixed"]::before {
  background: var(--hw-note);
}

.hw-gated-key[data-kind="undone"]::before {
  background: var(--hw-link);
}

.hw-gated-key[data-kind="pause"]::before {
  background: repeating-linear-gradient(135deg, var(--hw-text-faint) 0 1px, transparent 1px 4px);
  box-shadow: inset 0 0 0 1px var(--hw-panel-line);
}

.hw-gated-key[data-kind="embed"]::before {
  background: var(--hw-text-muted);
  width: 7px;
  height: 7px;
}

.hw-gated-key[data-kind="paste"]::before {
  background: var(--hw-note);
  border-radius: 50%;
}

.hw-gated-key[data-kind="machine"]::before {
  background: var(--hw-rust);
  transform: rotate(45deg) scale(0.8);
}

.hw-gated-callout {
  display: grid;
  gap: var(--hw-space-xs);
  border-left: 3px solid var(--hw-note);
  padding: var(--hw-space-s) var(--hw-space-m);
  margin: 0 0 var(--hw-space-xl);
  background: var(--hw-panel);
  font-size: var(--hw-size-small);
}

.hw-gated-callout span {
  color: var(--hw-text-muted);
}

.hw-gated-table-wrap {
  overflow-x: auto;
}

.hw-gated-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--hw-size-small);
  font-variant-numeric: tabular-nums;
}

.hw-gated-table caption {
  text-align: left;
  color: var(--hw-text-muted);
  font-size: var(--hw-size-caption);
  padding-bottom: var(--hw-space-s);
}

.hw-gated-table th,
.hw-gated-table td {
  padding: var(--hw-space-xs) var(--hw-space-s);
  border-bottom: 1px solid var(--hw-panel-line);
  text-align: right;
  white-space: nowrap;
}

.hw-gated-table th[scope="row"],
.hw-gated-table thead th:first-child {
  text-align: left;
  font-weight: 400;
  white-space: normal;
}

.hw-gated-table thead th {
  color: var(--hw-text-muted);
  font-weight: 400;
}

.hw-gated-table tfoot th,
.hw-gated-table tfoot td {
  font-weight: 600;
  border-bottom: 0;
}

.hw-gated-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--hw-space-s) var(--hw-space-xl);
  margin: 0;
  font-size: var(--hw-size-small);
}

.hw-gated-kinds div {
  display: grid;
  grid-template-columns: 12ch 1fr;
  gap: var(--hw-space-s);
  align-items: baseline;
}

.hw-gated-kinds dt {
  color: var(--hw-text-muted);
}

.hw-gated-kinds dd {
  margin: 0;
}

.hw-gated-kinds dd span {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-gated-note {
  color: var(--hw-text-muted);
  font-size: var(--hw-size-small);
  max-width: var(--hw-measure);
}

.hw-gated-fixes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hw-space-xs) var(--hw-space-l);
  font-size: var(--hw-size-small);
}

.hw-gated-fixes s {
  color: var(--hw-text-faint);
  text-decoration-color: var(--hw-note);
}

.hw-gated-list {
  padding-left: var(--hw-space-l);
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
}

.hw-gated-list b {
  color: var(--hw-text);
  font-weight: 400;
}

.hw-gated-details {
  margin-top: var(--hw-space-xxl);
}

.hw-gated-details summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.hw-gated-notes {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--hw-space-l);
}

.hw-gated-note-head {
  margin: 0;
  font-size: var(--hw-size-caption);
  color: var(--hw-text-faint);
}

.hw-gated-note-body {
  margin: var(--hw-space-xs) 0 0;
  font-size: var(--hw-size-small);
  max-width: var(--hw-measure);
}

.hw-gated-download {
  color: var(--hw-link);
  word-break: break-all;
}

.hw-gated-foot {
  margin-top: var(--hw-space-xxxl);
  padding-top: var(--hw-space-l);
  border-top: 1px solid var(--hw-panel-line);
  font-size: var(--hw-size-caption);
}

.hw-gated :focus-visible {
  outline: 2px solid var(--hw-accent);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .hw-gated {
    padding: var(--hw-space-s) var(--hw-space-l) var(--hw-space-xxl);
  }

  .hw-gated-section-head .hw-gated-bar {
    flex-basis: 64px;
  }

  .hw-gated-clock {
    margin-left: 0;
  }

  .hw-gated-shares {
    font-size: var(--hw-size-body);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-gated * {
    scroll-behavior: auto;
    transition: none;
  }
}

/* The shell's grid (fish hw-0055, option A as drawn on its options page): a title bar, the library
   on the left, tabs over the page, notes and history on the right, a status line. The write page
   and the site's pages share it (shell/markup.ts). Colours come from tokens.css; the panels are
   --hw-panel with --hw-panel-line between them. Every rule here hangs off .hw-grid, so render
   mode (the side-by-side check's frame) never meets it. */

.hw-grid {
  --hw-left-width: 264px;
  --hw-right-width: 344px;
  --hw-bar-height: 40px;
  --hw-status-height: 28px;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--hw-left-width) minmax(0, 1fr) var(--hw-right-width);
  grid-template-rows: var(--hw-bar-height) minmax(0, 1fr) var(--hw-status-height);
  grid-template-areas:
    "bar bar bar"
    "left center right"
    "status status status";
  overflow: hidden;
  container-type: normal;
}

body:has(> .hw-grid) {
  overflow: hidden;
}

.hw-grid[data-left="closed"] {
  --hw-left-width: 0px;
}

.hw-grid[data-right="closed"] {
  --hw-right-width: 0px;
}

.hw-grid[data-left="closed"] > .hw-dock-left,
.hw-grid[data-right="closed"] > .hw-dock-right {
  display: none;
}

/* Quiet buttons: the chrome's look, text that brightens, a fill when on. */
.hw-grid button {
  border-color: transparent;
  color: var(--hw-text-muted);
  text-transform: none;
}

.hw-grid button:hover:not(:disabled, [aria-disabled="true"]) {
  color: var(--hw-text);
  background: var(--hw-surface);
}

.hw-grid button[aria-pressed="true"],
.hw-grid button[aria-selected="true"],
.hw-grid button[aria-expanded="true"].hw-bar-button {
  color: var(--hw-text);
  background: var(--hw-surface);
}

.hw-grid button[aria-disabled="true"] {
  color: var(--hw-text-faint);
  opacity: 0.6;
  cursor: default;
}

.hw-grid button:focus-visible,
.hw-grid summary:focus-visible,
.hw-grid input:focus-visible,
.hw-grid a:focus-visible {
  outline: 1px solid var(--hw-accent);
  outline-offset: 1px;
}

.hw-titlebar button,
.hw-toolbar button,
.hw-toolbar summary,
.hw-dock-head button,
.hw-tabs button {
  white-space: nowrap;
}

.hw-key {
  margin-left: var(--hw-space-s);
  padding: 0 var(--hw-space-xs);
  border: 1px solid var(--hw-panel-line);
  border-radius: 3px;
  color: var(--hw-text-faint);
  font: inherit;
  font-size: 11px;
  line-height: 1.4;
}

/* ---- the title bar ---- */

.hw-titlebar {
  grid-area: bar;
  display: flex;
  align-items: center;
  gap: var(--hw-space-s);
  min-width: 0;
  padding: 0 var(--hw-space-m);
  background: var(--hw-panel);
  border-bottom: 1px solid var(--hw-panel-line);
  color: var(--hw-text-muted);
  transition: opacity 400ms ease;
}

.hw-titlebar .hw-wordmark {
  color: var(--hw-text);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: var(--hw-space-s);
}

.hw-crumbs {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hw-crumbs b {
  font-weight: 500;
  color: var(--hw-text);
}

.hw-crumb-step {
  color: var(--hw-text-faint);
  padding: 0 var(--hw-space-xs);
}

.hw-find-open {
  margin: 0 auto;
  width: min(360px, 34vw);
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--hw-panel-line) !important;
  background: var(--hw-background) !important;
  color: var(--hw-text-faint) !important;
  border-radius: 4px;
}

.hw-find-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* While the writer types, the chrome steps back; the mouse or the keyboard brings it forward. */
.hw-grid[data-typing="true"] .hw-titlebar,
.hw-grid[data-typing="true"] .hw-toolbar,
.hw-grid[data-typing="true"] .hw-tabs {
  opacity: 0.12;
}

.hw-grid[data-typing="true"] .hw-titlebar:hover,
.hw-grid[data-typing="true"] .hw-titlebar:focus-within,
.hw-grid[data-typing="true"] .hw-toolbar:hover,
.hw-grid[data-typing="true"] .hw-toolbar:focus-within,
.hw-grid[data-typing="true"] .hw-tabs:hover {
  opacity: 1;
}

/* ---- the docks ---- */

.hw-dock {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--hw-panel);
}

.hw-dock-left {
  grid-area: left;
  border-right: 1px solid var(--hw-panel-line);
}

.hw-dock-right {
  grid-area: right;
  border-left: 1px solid var(--hw-panel-line);
}

.hw-dock-head {
  display: flex;
  align-items: center;
  gap: var(--hw-space-xs);
  height: 38px;
  flex: none;
  padding: 0 var(--hw-space-s) 0 var(--hw-space-m);
  border-bottom: 1px solid var(--hw-panel-line);
}

.hw-dock-title {
  margin: 0 auto 0 0;
  font-size: var(--hw-size-caption);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--hw-text-faint);
}

.hw-dock-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.hw-dock-foot {
  flex: none;
  margin: 0;
  padding: var(--hw-space-s) var(--hw-space-m);
  border-top: 1px solid var(--hw-panel-line);
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-dock-foot button {
  padding: 0 var(--hw-space-xs);
  height: auto;
  color: var(--hw-link);
}

.hw-sheet-close,
.hw-phonebar,
.hw-scrim {
  display: none;
}

.hw-filter {
  display: block;
  padding: var(--hw-space-m) var(--hw-space-m) var(--hw-space-xs);
}

.hw-filter input {
  width: 100%;
  height: 30px;
  border-color: var(--hw-panel-line);
  background-color: var(--hw-background);
}

/* ---- the tree ---- */

/* The app's tree (shell/tree.ts) and the site's (library/site-tree.ts) share these classes. */
.hw-tree {
  padding-bottom: var(--hw-space-l);
}

.hw-tree-collection > summary {
  display: flex;
  align-items: center;
  gap: var(--hw-space-xs);
  padding: var(--hw-space-m) var(--hw-space-m) var(--hw-space-xs);
  list-style: none;
  cursor: pointer;
  font-size: var(--hw-size-caption);
  letter-spacing: 0.06em;
  color: var(--hw-text-faint);
}

.hw-tree-collection > summary::-webkit-details-marker {
  display: none;
}

.hw-tree-collection > summary::before {
  content: "▸";
  flex: none;
  width: 1em;
}

.hw-tree-collection[open] > summary::before {
  content: "▾";
}

.hw-tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

a.hw-tree-name:hover,
a.hw-tree-name[aria-current="page"] {
  color: var(--hw-accent);
}

.hw-tree-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* A folder inside a collection: its name in the text's size, indented by its depth. */
.hw-tree-folder > summary {
  padding-top: var(--hw-space-xs);
  padding-left: calc(var(--hw-space-m) + var(--hw-depth, 0) * 14px);
  letter-spacing: 0;
  font-size: var(--hw-size-small);
  color: var(--hw-text-muted);
}

.hw-tree-pieces {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hw-tree-piece {
  display: flex;
  align-items: center;
  gap: var(--hw-space-s);
  padding-right: var(--hw-space-m);
}

.hw-tree-piece:hover,
.hw-tree-piece:has(> [aria-current]) {
  background: var(--hw-surface);
}

.hw-tree-link {
  flex: 1;
  min-width: 0;
  display: block;
  height: 28px;
  padding: 0 0 0 calc(22px + var(--hw-depth, 0) * 14px) !important;
  border: none;
  border-radius: 0;
  background: transparent !important;
  color: var(--hw-text) !important;
  text-align: left;
  line-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.hw-tree-empty {
  margin: 0;
  padding: 2px var(--hw-space-m) var(--hw-space-s) 22px;
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

/* A piece's shares as a short bar, ink then rust then unrecorded, from `--ink` and the rest. */
.hw-tree-shares {
  flex: none;
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--hw-ink) 0 var(--ink, 0%),
    var(--hw-rust) var(--ink, 0%) calc(var(--ink, 0%) + var(--rust, 0%)),
    var(--hw-text-faint) calc(var(--ink, 0%) + var(--rust, 0%))
      calc(var(--ink, 0%) + var(--rust, 0%) + var(--unrecorded, 0%)),
    var(--hw-panel-line) calc(var(--ink, 0%) + var(--rust, 0%) + var(--unrecorded, 0%)) 100%
  );
}

/* A row's ⋯: over the shares bar, and only when the row is in hand. A touch has no hover, so a
   phone keeps it beside the bar (the phone's block below). */
.hw-tree-piece,
.hw-tree-collection > summary {
  position: relative;
}

.hw-tree-more {
  position: absolute;
  right: var(--hw-space-s);
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 22px;
  padding: 0 !important;
  border: none;
  border-radius: 3px;
  color: var(--hw-text-muted);
  background: var(--hw-surface);
  opacity: 0;
}

/* A collection's head has more room above its name than below. */
.hw-tree-collection:not(.hw-tree-folder) > summary > .hw-tree-more {
  top: calc(50% + var(--hw-space-xs));
}

.hw-tree-piece:hover > .hw-tree-more,
.hw-tree-piece:focus-within > .hw-tree-more,
.hw-tree-collection > summary:hover > .hw-tree-more,
.hw-tree-collection > summary:focus-within > .hw-tree-more,
.hw-tree-more:focus-visible {
  opacity: 1;
}

@media (hover: none), (max-width: 760px) {
  .hw-tree-more {
    opacity: 1;
    background: transparent;
  }

  .hw-tree-count {
    margin-right: 30px;
  }

  .hw-tree-piece {
    padding-right: 36px;
  }
}

.hw-tree-collection[data-drop="true"] > summary {
  color: var(--hw-text);
  background: var(--hw-surface);
}

.hw-tree-collection[data-drop="true"] > .hw-tree-pieces {
  background: color-mix(in srgb, var(--hw-surface) 50%, transparent);
}

.hw-tree-rename {
  display: block;
  box-sizing: border-box;
  width: calc(100% - var(--hw-space-m) - 22px - var(--hw-depth, 0) * 14px);
  height: 26px;
  margin: 1px var(--hw-space-m) 1px calc(22px + var(--hw-depth, 0) * 14px);
  padding: 0 var(--hw-space-xs);
  border: 1px solid var(--hw-panel-line);
  border-radius: 3px;
  color: var(--hw-text);
  background: var(--hw-background);
  font: inherit;
}

.hw-trash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--hw-space-m) var(--hw-space-m) var(--hw-space-xs) var(--hw-space-s);
  font-size: var(--hw-size-caption);
  letter-spacing: 0.06em;
  color: var(--hw-text-faint);
}

.hw-trash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hw-space-s);
  padding: var(--hw-space-xs) var(--hw-space-s) var(--hw-space-xs) 22px;
}

.hw-trash-words {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hw-trash-name,
.hw-trash-from {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hw-trash-from {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

/* The library's menu: a right-click, a row's ⋯ or ⌘K (shell/menu.ts). */
.hw-menu {
  position: fixed;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  max-width: 280px;
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: var(--hw-space-xs);
  background: var(--hw-panel);
  border: 1px solid var(--hw-panel-line);
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hw-menu[hidden] {
  display: none;
}

.hw-menu-item {
  flex: none;
  height: 28px;
  padding: 0 var(--hw-space-s) !important;
  border: none;
  border-radius: 2px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hw-text);
  background: transparent;
}

.hw-menu-item:hover,
.hw-menu-item:focus-visible {
  background: var(--hw-surface);
}

/* ---- the centre: tabs, toolbar, the page, the timeline ---- */

.hw-center {
  grid-area: center;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--hw-background);
}

.hw-tabs {
  display: flex;
  flex: none;
  height: 36px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--hw-panel);
  border-bottom: 1px solid var(--hw-panel-line);
  transition: opacity 400ms ease;
}

.hw-tabs::-webkit-scrollbar {
  display: none;
}

.hw-tab {
  display: flex;
  flex: none;
  align-items: center;
  max-width: 240px;
  border-right: 1px solid var(--hw-panel-line);
}

.hw-tab-open {
  height: 100%;
  min-width: 0;
  padding: 0 var(--hw-space-xs) 0 var(--hw-space-m) !important;
  border: none;
  border-radius: 0;
  background: transparent !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hw-tab-close {
  height: 100%;
  padding: 0 var(--hw-space-s) !important;
  border-radius: 0;
  color: var(--hw-text-faint) !important;
  background: transparent !important;
}

.hw-tab[aria-selected="true"] {
  background: var(--hw-background);
  margin-bottom: -1px;
}

.hw-tab[aria-selected="true"] .hw-tab-open {
  color: var(--hw-text);
}

.hw-tab[data-dirty="true"] .hw-tab-close::before {
  content: "●";
  font-size: 9px;
}

.hw-tab[data-dirty="true"] .hw-tab-close span {
  display: none;
}

.hw-grid .hw-toolbar {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--hw-space-s);
  height: 42px;
  padding: 0 var(--hw-space-l);
  border-bottom: 1px solid var(--hw-panel-line);
  transition: opacity 400ms ease;
}

.hw-toolbar-end {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.hw-views {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 4px;
  background: var(--hw-panel);
}

.hw-views button {
  height: 26px;
  padding: 0 var(--hw-space-m);
  border-radius: 3px;
}

.hw-grid .hw-views button[aria-checked="true"] {
  background: var(--hw-background);
  color: var(--hw-text);
  box-shadow: 0 0 0 1px var(--hw-panel-line);
}

.hw-grid .hw-details {
  margin-left: 0;
}

.hw-grid .hw-details-body {
  background: var(--hw-panel);
  border-color: var(--hw-panel-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hw-grid .hw-banner {
  margin: var(--hw-space-s) var(--hw-space-l) 0;
}

.hw-grid .hw-page {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--hw-space-xl) var(--hw-space-xxxl) var(--hw-space-xxl);
  container-type: inline-size;
}

.hw-grid .hw-sheet,
.hw-grid .hw-read,
.hw-grid .hw-playback {
  max-width: calc(var(--hw-measure) + var(--hw-margin-width) + var(--hw-space-xxxl));
  margin: 0 auto;
}

/* With the panel open the notes live there, so the page is the text alone, at its measure. A phone
   has no panel beside the page: its notes stay under the text. */
@media (min-width: 761px) {
  .hw-grid[data-right="open"] .hw-sheet {
    grid-template-columns: minmax(0, var(--hw-measure));
    max-width: var(--hw-measure);
  }

  .hw-grid[data-right="open"] .hw-read .hw-piece-sheet {
    grid-template-columns: minmax(0, var(--hw-measure));
  }

  .hw-grid[data-right="open"] .hw-read .hw-piece-notes {
    display: none;
  }
}

/* The site's piece: its notes are in the panel beside it while the panel shows (a wide window). */
@media (min-width: 1181px) {
  .hw-site-grid[data-right="open"] .hw-page .hw-piece-sheet {
    grid-template-columns: minmax(0, var(--hw-measure));
  }

  .hw-site-grid[data-right="open"] .hw-page .hw-piece-notes {
    display: none;
  }
}

.hw-grid .hw-read {
  padding-top: 0;
}

/* ---- the status line ---- */

.hw-grid > .hw-status {
  grid-area: status;
  position: static;
  display: flex;
  align-items: center;
  gap: var(--hw-space-s);
  min-width: 0;
  padding: 0 var(--hw-space-m);
  background: var(--hw-panel);
  border-top: 1px solid var(--hw-panel-line);
  white-space: nowrap;
  overflow: hidden;
}

.hw-grid > .hw-status .hw-status-rest {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On the right of the line the first part shown needs no dot before it (workspace.ts marks it). */
.hw-grid > .hw-status .hw-status-rest > [data-first="true"] > span[aria-hidden="true"]:first-child {
  display: none;
}

/* ---- the panel: notes and history ---- */

.hw-dock-right .hw-margin {
  padding: var(--hw-space-m);
}

/* In the panel a note is a card in a list, in the order of the text, not level with its line. */
.hw-dock-right .hw-note-card,
.hw-dock-right .hw-margin-notes > li {
  position: static !important;
  margin-bottom: var(--hw-space-s);
}

.hw-dock-right .hw-note-form {
  position: static;
}

/* No notes yet: the panel says how one is made rather than stand empty. */
.hw-dock-right .hw-margin-notes:empty::after {
  content: "no notes yet: select some words, then + note";
  color: var(--hw-text-faint);
  font-size: var(--hw-size-small);
}

/* A long note reads in three lines until the writer goes to it; its reply box waits until then too. */
.hw-dock-right .hw-note-card:not(:hover, :focus-within) .hw-note-card-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hw-dock-right .hw-note-card:not(:hover, :focus-within) .hw-reply-form {
  display: none;
}

.hw-suggestions-heading {
  margin: 0 0 var(--hw-space-s);
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-panel-section {
  padding: var(--hw-space-m) var(--hw-space-l);
}

.hw-panel-section + .hw-panel-section {
  border-top: 1px solid var(--hw-panel-line);
}

.hw-panel-heading {
  margin: 0 0 var(--hw-space-s);
  font-size: var(--hw-size-caption);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--hw-text-faint);
}

.hw-panel-row {
  display: flex;
  align-items: center;
  gap: var(--hw-space-m);
  margin-top: var(--hw-space-s);
  font-size: var(--hw-size-caption);
  color: var(--hw-text-muted);
}

.hw-panel-row > :last-child {
  margin-left: auto;
}

.hw-panel-empty {
  margin: 0;
  color: var(--hw-text-faint);
  font-size: var(--hw-size-small);
}

/* Where the edits were made (hw-0065): a caption under the chart, quieter than its own row. */
.hw-panel-where {
  margin: var(--hw-space-xs) 0 0;
  font-size: var(--hw-size-caption);
  color: var(--hw-text-faint);
}

/* The shares over time: ink at the bottom, rust above it, unrecorded on top. */
.hw-chart {
  display: block;
  width: 100%;
  overflow: visible;
}

.hw-chart-ink {
  fill: var(--hw-ink);
  opacity: 0.55;
}

.hw-chart-rust {
  fill: var(--hw-rust);
}

.hw-chart-unrecorded {
  fill: var(--hw-text-faint);
}

.hw-chart-axis {
  stroke: var(--hw-panel-line);
  stroke-width: 1;
}

.hw-chart-pin {
  stroke: var(--hw-note);
  stroke-width: 1.5;
}

.hw-chart-pin-rust {
  stroke: var(--hw-rust);
}

.hw-chart-dot {
  fill: var(--hw-note);
}

.hw-chart-dot-rust {
  fill: var(--hw-rust);
}

.hw-chart-head {
  stroke: var(--hw-caret);
  stroke-width: 2;
}

.hw-chart-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: var(--hw-space-xxs);
  font-size: 11px;
  color: var(--hw-text-faint);
  font-variant-numeric: tabular-nums;
}

/* A moment: when, what, its shares, and a line under it. */
.hw-moments {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hw-moment {
  display: grid;
  grid-template-columns: 7ch minmax(0, 1fr) auto;
  gap: 2px var(--hw-space-m);
  align-items: baseline;
  padding: var(--hw-space-s) 0;
  border-top: 1px solid var(--hw-panel-line);
  font-size: var(--hw-size-small);
}

.hw-moment-when {
  color: var(--hw-text-faint);
  font-variant-numeric: tabular-nums;
}

.hw-moment-what {
  color: var(--hw-text);
  overflow-wrap: anywhere;
}

.hw-moment-sub {
  grid-column: 2 / 4;
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
  overflow-wrap: anywhere;
}

.hw-moment-more {
  margin: var(--hw-space-s) 0 0;
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-dock-right .hw-thread-card,
.hw-dock-right .hw-panel-threads > li {
  position: static;
  margin-bottom: var(--hw-space-s);
}

.hw-panel-threads {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* An imported paper's journal (notes/journal.ts): its history, folded, in the chrome's colours. */
.hw-journal > summary {
  cursor: pointer;
  color: var(--hw-text-muted);
  font-size: var(--hw-size-small);
}

.hw-journal-list {
  list-style: none;
  margin: var(--hw-space-s) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hw-space-s);
}

.hw-journal-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: var(--hw-space-s);
  border-left: 2px solid var(--hw-panel-line);
  font-size: var(--hw-size-small);
}

.hw-journal-head {
  color: var(--hw-text);
}

.hw-journal-more {
  color: var(--hw-text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hw-journal-by {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
}

.hw-piece-journal:empty {
  display: none;
}

.hw-piece-journal {
  max-width: var(--hw-measure);
  margin-top: var(--hw-space-xl);
}

@media (min-width: 1181px) {
  .hw-site-grid[data-right="open"] .hw-piece-journal {
    display: none;
  }
}

/* ---- C's timeline, under the page, when it is on ---- */

.hw-ribbon {
  flex: none;
  padding: var(--hw-space-xs) var(--hw-space-l) var(--hw-space-s);
  border-top: 1px solid var(--hw-panel-line);
  background: var(--hw-panel);
}

.hw-ribbon-row {
  display: flex;
  align-items: center;
  gap: var(--hw-space-m);
  min-width: 0;
  margin-bottom: var(--hw-space-xs);
  font-size: var(--hw-size-caption);
  color: var(--hw-text-muted);
  white-space: nowrap;
}

.hw-ribbon-row > :last-child {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--hw-text-faint);
}

.hw-ribbon-track {
  display: block;
  width: 100%;
  cursor: pointer;
}

/* ---- ⌘K: the finder ---- */

.hw-finder {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  background: color-mix(in srgb, var(--hw-background-deep) 60%, transparent);
}

.hw-finder-box {
  width: min(600px, calc(100vw - 32px));
  background: var(--hw-panel);
  border: 1px solid var(--hw-panel-line);
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.hw-finder-box input {
  width: 100%;
  height: 44px;
  border: none;
  border-bottom: 1px solid var(--hw-panel-line);
  border-radius: 0;
  padding: 0 var(--hw-space-l);
  background: transparent;
  font-size: var(--hw-size-body);
}

.hw-finder-results {
  list-style: none;
  margin: 0;
  padding: var(--hw-space-xs) 0;
  max-height: 50vh;
  overflow: auto;
}

.hw-finder-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  height: auto;
  padding: var(--hw-space-s) var(--hw-space-l) !important;
  border: none;
  border-radius: 0;
  text-align: left;
}

.hw-finder-result[aria-selected="true"] {
  background: var(--hw-surface) !important;
  color: var(--hw-text) !important;
}

.hw-finder-title {
  color: var(--hw-text);
}

.hw-finder-sub {
  color: var(--hw-text-faint);
  font-size: var(--hw-size-caption);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hw-finder-sub mark {
  background: color-mix(in srgb, var(--hw-note) 28%, transparent);
  color: inherit;
}

/* ---- the site: the same grid, read only ---- */

.hw-grid.hw-site-grid {
  grid-template-columns: var(--hw-left-width) minmax(0, 1fr) var(--hw-right-width);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "left center right";
}

.hw-site-grid .hw-dock-head {
  height: 52px;
}

.hw-site-grid .hw-wordmark {
  margin-right: auto;
  color: var(--hw-text);
  font-weight: 700;
  text-decoration: none;
}

.hw-site-grid .hw-center > .hw-toolbar {
  height: 52px;
}

.hw-site-grid .hw-page > .hw-index,
.hw-site-grid .hw-page > .hw-piece {
  max-width: calc(var(--hw-measure) + var(--hw-margin-width) + var(--hw-space-xxxl));
  margin: 0 auto;
  padding-top: 0;
}

.hw-site-grid .hw-page > .hw-index {
  max-width: var(--hw-measure);
}

/* In the grid the page scrolls in its own box: a piece's shares end it, they don't float over it. */
.hw-site-grid .hw-piece-status {
  position: static;
}

.hw-site-links a {
  color: var(--hw-text-muted);
  text-decoration: none;
}

.hw-site-links a:hover,
.hw-site-links a[aria-current="page"] {
  color: var(--hw-accent);
}

.hw-panel-facts {
  margin-top: 0;
}

.hw-panel-shares {
  margin: var(--hw-space-s) 0 0;
  font-size: var(--hw-size-caption);
}

/* ---- narrower windows: the panel goes over the page ---- */

@media (max-width: 1180px) {
  .hw-grid {
    --hw-right-width: 0px;
  }

  .hw-grid[data-right="open"] > .hw-dock-right {
    position: fixed;
    top: var(--hw-bar-height);
    right: 0;
    bottom: var(--hw-status-height);
    z-index: 6;
    width: 344px;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
  }

  /* The site's panel repeats what is under the text; a narrower window just reads the page. */
  .hw-grid.hw-site-grid > .hw-dock-right {
    display: none !important;
  }
}

/* ---- a phone: one column, the library and the panel are sheets ---- */

@media (max-width: 760px) {
  .hw-grid,
  .hw-grid.hw-site-grid {
    --hw-left-width: 0px;
    --hw-right-width: 0px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--hw-bar-height) minmax(0, 1fr) auto auto;
    grid-template-areas:
      "bar"
      "center"
      "status"
      "phone";
  }

  .hw-grid.hw-site-grid {
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "center"
      "phone";
  }

  .hw-grid > .hw-dock-left,
  .hw-grid > .hw-dock-right {
    display: none;
  }

  .hw-grid[data-sheet="library"] > .hw-dock-left,
  .hw-grid[data-sheet="panel"] > .hw-dock-right {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    border: none;
    border-top: 1px solid var(--hw-panel-line);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  }

  .hw-grid[data-sheet="library"] > .hw-dock-left {
    top: 48px;
  }

  .hw-grid[data-sheet="panel"] > .hw-dock-right {
    top: 22vh;
  }

  .hw-grid[data-sheet] > .hw-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9;
    background: color-mix(in srgb, var(--hw-background-deep) 55%, transparent);
  }

  .hw-scrim[hidden] {
    display: none !important;
  }

  .hw-sheet-close {
    display: inline-flex;
  }

  .hw-dock-head {
    height: 48px;
  }

  .hw-tree-item,
  .hw-tree-link,
  .hw-menu-item {
    height: 44px;
  }

  .hw-tree-link {
    line-height: 44px;
  }

  .hw-tree-more {
    width: 36px;
    height: 36px;
  }

  .hw-tree-rename {
    height: 40px;
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 16px;
  }

  .hw-titlebar [data-testid="toggle-library"],
  .hw-titlebar [data-testid="toggle-panel"],
  .hw-titlebar .hw-crumbs,
  .hw-key {
    display: none;
  }

  .hw-find-open {
    width: auto;
    flex: 1;
    margin: 0 var(--hw-space-s);
  }

  .hw-grid .hw-toolbar {
    padding: 0 var(--hw-space-s);
    gap: 2px;
  }

  .hw-grid .hw-toolbar button,
  .hw-grid .hw-details summary {
    padding: 0 var(--hw-space-s);
  }

  .hw-views button {
    padding: 0 var(--hw-space-s);
  }

  .hw-titlebar [data-testid="theme-toggle"] {
    flex: none;
  }

  .hw-find-open {
    min-width: 0;
  }

  .hw-grid .hw-toolbar [data-testid="history-toggle"] {
    display: none;
  }

  .hw-grid .hw-page {
    padding: var(--hw-space-l) var(--hw-space-l) var(--hw-space-xl);
  }

  .hw-grid > .hw-status {
    height: auto;
    min-height: var(--hw-status-height);
    padding: var(--hw-space-xs) var(--hw-space-m);
    white-space: normal;
  }

  .hw-grid > .hw-status .hw-status-rest {
    display: none;
  }

  .hw-phonebar {
    grid-area: phone;
    display: flex;
    justify-content: space-around;
    height: 50px;
    border-top: 1px solid var(--hw-panel-line);
    background: var(--hw-panel);
  }

  .hw-phonebar button,
  .hw-phonebar a {
    flex: 1;
    height: 100%;
    border-radius: 0;
    font-size: var(--hw-size-small);
    color: var(--hw-text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hw-finder {
    padding-top: 56px;
  }
}

/* Signed out on the web, write asks first (sign-in.ts): until the writer answers there is no
   piece, so no tabs, no library or panel, no timeline and no bar at the foot either. */
.hw-grid[data-sign-in="ask"] > .hw-dock,
.hw-grid[data-sign-in="ask"] .hw-tabs,
.hw-grid[data-sign-in="ask"] .hw-ribbon,
.hw-grid[data-sign-in="ask"] > .hw-phonebar,
.hw-grid[data-sign-in="ask"] .hw-titlebar > :not(.hw-wordmark, [data-testid="theme-toggle"]) {
  display: none !important;
}

.hw-grid[data-sign-in="ask"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "bar"
    "center"
    "status";
}

/* In the shells the window is the app: no wordmark leading to the site. */
.hw-shell .hw-titlebar .hw-wordmark {
  display: none;
}

@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,math,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.19.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .katex-vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .katex-thinbox{display:inline-flex;flex-direction:row;max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.katex-root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .katex-stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .reflectbox{display:inline-block;transform:scaleX(-1)}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
