/* The Hotwire Native shells: the structure of the page inside the app (design-direction.md section 11).

   Everything here hangs from `data-native` (`ios`, `android` or `app`), which the server puts on <body> when the request comes from a
   shell (ApplicationHelper#native_surface) and which the previews put on a frame to show a shell. A browser's page has no such
   attribute, so not one rule in this file, in 96-native-ios.css or in 97-native-android.css reaches the website. The server also
   decides what is drawn (layouts/console and layouts/light draw NativeFrameComponent in a shell and the masthead, the rail and the
   footer in a browser), so this file styles what a shell has, and never hides what a browser has.

   This file is the structure the two platforms share: the page's frame, the room a bar takes from the foot of it, the mechanics of the
   tab bar and of the menu sheet, and the grouped list that a menu and a page of lists are both drawn with. How it looks (radii, glass or
   a tinted bar, the weight of a row) is the platform's, in the next two files, so each reads as the platform it is on. Tokens only
   and logical properties, like every stylesheet of ours; the insets of the device are physical and are used by way of --safe-*. Linked
   after every page's own stylesheet (the numbers run to 92), so a page's rule does not win over it by coming later. */

/* ── The shell's room ────────────────────────────────────────────────────
   The tab bar floats over the page, so the foot of the page leaves room for it (`--native-bar-room`): the platform's file says how tall
   its bar is (`--native-tabs-h`) and how far above the bottom edge it floats (`--native-tabs-offset`). A phone's text is the platform's own face: the system font reads as the app it is, and takes the person's text size
   with it; the institution's display face stays on the titles, where it is the brand. */
[data-native] {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --native-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --native-tabs-h: 3.875rem;
  --native-tabs-offset: var(--safe-bottom);
  --native-bar-room: calc(var(--native-tabs-h) + var(--native-tabs-offset) + var(--space-4));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* A finger is not a pointer: no flash of the browser's own highlight on a tap (the control draws its own pressed state), no text
   selection started by a long press on a control, and no double-tap zoom delay on anything a person taps. */
[data-native] :is(a, button, summary, label, [role="button"], input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
[data-native] :is(button, summary, [role="button"], .native-row, .native-tab, .btn) {
  -webkit-user-select: none;
  user-select: none;
}

/* ── The frame ───────────────────────────────────────────────────────────
   One <main>, in the surface's own class as well (`console-main`, `light-main`), so a rule written for a page of that surface still
   reaches it. The top is the status bar's inset (--safe-top) and then the page: the shells draw no bar above a page, root or pushed, so every
   page begins under the status bar and the way back is in the page's own header (below). */
[data-native] .native-frame {
  display: flex;
  flex-direction: column;
  min-block-size: 100dvh;
  background: var(--surface);
}
[data-native] .native-page,
[data-native] .native-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-inline-size: 0;
}
[data-native] .native-main {
  flex: 1;
  inline-size: 100%;
  margin-inline: auto;
  padding-block: calc(var(--space-4) + var(--safe-top)) calc(var(--native-bar-room) + var(--space-5));
  padding-inline: var(--page-gutter);
}
/* A sheet has no bar under it: the page ends where its own last thing does, clear of the home indicator. */
[data-native][data-native-modal] .native-main {
  padding-block-end: calc(var(--space-6) + var(--safe-bottom));
}

/* ── The tab bar: the mechanics ──────────────────────────────────────────
   Pinned to the bottom edge, clear of the home indicator and of a landscape notch. The strip itself takes no taps (it is only the
   width of the screen); the list inside it does, so the page behind a floating bar can still be scrolled and tapped around it. */
[data-native] .native-tabs {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 40;
  padding-block-end: var(--native-tabs-offset);
  padding-inline: max(var(--safe-left), var(--safe-right));
  pointer-events: none;
}
[data-native] .native-tabs-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: auto;
}
[data-native] .native-tabs-list > li {
  display: flex;
  flex: 1 1 0;
  min-inline-size: 0;
}
[data-native] .native-tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-inline-size: 0;
  min-block-size: var(--target-min);
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
[data-native] .native-tab-icon {
  display: grid;
  place-items: center;
  min-inline-size: 0;
  max-inline-size: 100%;
}
[data-native] :is(.btn-icon, .native-tab-icon) > .icon {
  max-inline-size: 100%;
  max-block-size: 100%;
  block-size: auto;
}
[data-native] .native-tab-label {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: center;
}
[data-native] .native-tab:focus-visible,
[data-native] .native-row:focus-visible,
[data-native] .native-menu-close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

/* ── The menu sheet: the mechanics ───────────────────────────────────────
   Rises from the bottom edge over a scrim. Closed it is off screen and `visibility: hidden`, so nothing in it is reached by Tab or
   a screen reader until it opens (the delay lets it slide away before it hides); the `drawer` controller sets `data-open`. It takes at
   most the height that leaves the status bar clear, and scrolls inside. */
[data-native] .native-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--scrim);
  animation: native-fade 220ms ease-out;
}
[data-native] .native-menu {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-block-size: calc(100dvh - var(--safe-top) - var(--space-6));
  background: var(--surface);
  color: var(--fg1);
  box-shadow: var(--shadow-lift);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 340ms var(--native-ease), visibility 0s linear 340ms;
}
[data-native] .native-menu[data-open="true"] {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}
[data-native] .native-menu-head {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-5) var(--space-3);
  padding-inline: calc(var(--space-4) + max(var(--safe-left), var(--safe-right)));
}
[data-native] .native-menu-grabber {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-start: 50%;
  inline-size: 2.25rem;
  block-size: 0.3125rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg3) 45%, transparent);
  transform: translateX(-50%);
}
html[dir="rtl"] [data-native] .native-menu-grabber {
  transform: translateX(50%);
}
[data-native] .native-menu-brand {
  min-inline-size: 0;
}
[data-native] .native-menu-close {
  display: grid;
  flex: none;
  place-items: center;
  inline-size: var(--target-min);
  block-size: var(--target-min);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg1) 8%, transparent);
  color: var(--fg2);
  cursor: pointer;
}
[data-native] .native-menu-close .icon {
  --icon-size: 1.25rem;
}
[data-native] .native-menu-body {
  flex: 1;
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block-end: calc(var(--space-5) + var(--safe-bottom));
  padding-inline: max(var(--safe-left), var(--safe-right));
}

/* ── The assistant ───────────────────────────────────────────────────────
   The pill is a round button in a shell, above the tab bar at the trailing edge, with the sparkles for a face; its words stay for a
   screen reader (the name does not change, so a voice command that says it still finds it), and the keyboard hint is not drawn,
   because there is no keyboard to press it on. */
[data-native] .assistant-fab {
  inset-block-end: calc(var(--native-tabs-h) + var(--native-tabs-offset) + var(--space-3));
  inset-inline-end: calc(var(--page-gutter) + max(var(--safe-left), var(--safe-right)));
  inline-size: 3.5rem;
  block-size: 3.5rem;
  min-block-size: 3.5rem;
  justify-content: center;
  gap: 0;
  padding: 0;
}
[data-native] .assistant-fab-dot,
[data-native] .assistant-kbd {
  display: none;
}
/* Not in a sheet: a form in a sheet is a short errand, and a round button floating over its fields would cover them. The assistant is on the page behind. */
[data-native-modal] .assistant-fab {
  display: none;
}
[data-native] .assistant-fab-label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[data-native] .assistant-fab-icon {
  --icon-size: 1.5rem;
}

@keyframes native-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── The grouped list ────────────────────────────────────────────────────
   What the menu is drawn with, and what a page of lists is drawn with after it: a group, its small heading, and rows that are the
   width of the group, each at least a finger tall, with a hairline between that starts where the words do. The platform's file
   decides the group's radius and background and the weight of the words. A row is a link (or a button), so it takes the finger
   and the keyboard, and its pressed state is the surface a finger leaves behind. */
[data-native] .native-group {
  margin-block: 0 var(--space-5);
  min-inline-size: 0;
}
[data-native] .native-group-title {
  margin: 0 0 var(--space-2);
  padding-inline: calc(var(--space-4) + var(--space-2));
  color: var(--fg3);
  font-family: var(--font-sans);
  overflow-wrap: anywhere;
}
[data-native] .native-group-list {
  margin-block: 0;
  margin-inline: var(--space-4);
  padding: 0;
  overflow: hidden;
  list-style: none;
}
/* A group of an area (Navigation, "GROUPS"): its own list under a smaller heading, in sentence case, so it reads as part of the area. */
[data-native] .native-group-list + .native-subgroup-title {
  margin-block-start: var(--space-4);
}
[data-native] .native-group-title.native-subgroup-title {
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0;
}
[data-native] .native-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-3);
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: 3.25rem;
  margin: 0;
  padding-block: var(--space-2);
  padding-inline: var(--space-3) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--fg1);
  font-family: var(--font-sans);
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
/* A row with no icon in front starts its words at the edge, and its hairline with them. */
[data-native] .native-row > .native-row-label:first-child {
  grid-column: 1 / 3;
}
[data-native] .native-row-label {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
[data-native] .native-row-chevron {
  display: grid;
  color: var(--fg3);
}
[data-native] .native-row-chevron .icon {
  --icon-size: 1.125rem;
}
html[dir="rtl"] [data-native] .native-row-chevron .icon {
  transform: scaleX(-1);
}
/* The area's tessera is a memory aid, never the only signal: the row says its name. A tinted tile with the drawing in the area's own
   color (a graphical object of at least 3:1 on its tint, in both modes: every --tess-* is a mid or light tone of its own mode), so
   no tile needs a color of its own. */
[data-native] .native-tile {
  display: grid;
  flex: none;
  place-items: center;
  --icon-size: 1.25rem;
  background: color-mix(in srgb, var(--tile, var(--accent)) 16%, var(--surface-raised));
  color: var(--tile, var(--accent));
}
[data-native] .native-tile[data-tess="people"]    { --tile: var(--tess-people); }
[data-native] .native-tile[data-tess="housing"]   { --tile: var(--tess-housing); }
[data-native] .native-tile[data-tess="arrival"]   { --tile: var(--tess-arrival); }
[data-native] .native-tile[data-tess="support"]   { --tile: var(--tess-support); }
[data-native] .native-tile[data-tess="standards"] { --tile: var(--tess-standards); }
[data-native] .native-tile[data-tess="campus"]    { --tile: var(--tess-campus); }
[data-native] .native-tile[data-tess="events"]    { --tile: var(--tess-events); }
[data-native] .native-tile[data-tess="risk"]      { --tile: var(--tess-risk); }
[data-native] .native-tile[data-tess="reporting"] { --tile: var(--tess-reporting); }
[data-native] .native-tile[data-tess="admin"]     { --tile: var(--tess-admin); }

/* The account at the foot of the menu: who it is, then the group of the phones and the way out, then how Tessera looks. */
[data-native] .native-account-who {
  margin: 0 0 var(--space-2);
  padding-inline: calc(var(--space-4) + var(--space-2));
  color: var(--fg1);
  font-family: var(--font-sans);
  overflow-wrap: anywhere;
}
[data-native] .native-appearance .mode-switch {
  margin-inline: var(--space-4);
}
[data-native] .native-row[data-tone="danger"] .native-row-label {
  color: var(--tone-bad-fg);
}

/* ── The page header: a large title ──────────────────────────────────────
   What every page says first. A phone app's title is large and sits under the status bar (and under the way back, which is the header's own
   first row: see "The way back"), with the page's own words after it: so the web's hairline-and-eyebrow header is tightened to that, the title set at the size of a
   large title in the institution's display face (the one place the brand's own face is the platform's convention too), and the page's
   actions are a column of full-width buttons under it, each a finger tall, not a row of pills that wraps to the width of its words. The
   light shell keeps its gold hairline over the eyebrow: it is the brand's own mark, and a student's pages should carry it. */
[data-native] .page-header {
  gap: var(--space-1);
  padding-block: var(--space-2) var(--space-5);
}
[data-native] .page-header::before {
  margin-block-end: var(--space-2);
}
[data-native] .page-header-title {
  font-size: clamp(1.75rem, 1.45rem + 1.3vw, 2.125rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
[data-native] .page-header-eyebrow {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
[data-native] .page-header-row {
  display: grid;
  align-items: start;
  gap: var(--space-4);
}
[data-native] .page-header-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}
[data-native] .page-header-actions form {
  display: contents;
}
[data-native] .page-header-actions .btn {
  inline-size: 100%;
}

/* ── The way back ────────────────────────────────────────────────────────
   A bar above a pushed page held one arrow in a band the width of the screen, a hundred pixels of nothing for a button. So there is no bar, and the
   header's first row carries the control, on the line the eyebrow is already on (NativeBackComponent; `data-native-back` on <body> says "back" for a
   page pushed above another, "close" for a sheet, and is absent for a page nothing is behind). The row is a finger tall (the control is the 44px
   floor) and no more: the page begins under the status bar and the row is its first line, so Back costs the height of its own target and nothing else.
   The glyph's edge is on the content's edge, and the target runs on into the gutter. The system's own ways back (the swipe from the edge, the button)
   still work: the stack is the app's. */
[data-native] .btn.native-back,
[data-native] .btn.native-close {
  display: none;
}
[data-native][data-native-back="back"] .btn.native-back,
[data-native][data-native-back="close"] .btn.native-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: var(--target-min);
  block-size: var(--target-min);
  min-block-size: var(--target-min);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--accent-text);
}
[data-native][data-native-back="close"] .btn.native-close {
  order: 2;
  margin-inline-start: auto;
  color: var(--fg2);
}
/* Back points the way a page's text begins: it turns round in a right-to-left language. The cross is the same in both. */
html[dir="rtl"] [data-native] .btn.native-back .icon {
  transform: scaleX(-1);
}
/* The glyph's edge is on the content's edge and the target runs on into the gutter. No margin of a control reaches past the box that holds it (a box with
   something past its end has overflow, and the page could be dragged sideways): the header's own box reaches into the gutter by what the target adds to the glyph
   and pads it back, and the row reaches back into that padding. The gutter is wider than that. */
[data-native][data-native-back] :is(.page-header, .person-header) {
  --back-bleed: max(0px, calc((var(--target-min) - 1.5rem) / 2));
  margin-inline: calc(-1 * var(--back-bleed));
  padding-inline: var(--back-bleed);
}
[data-native][data-native-back] :is(.page-header-top, .person-header-top) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-block-size: var(--target-min);
  min-inline-size: 0;
  margin-inline: calc(-1 * var(--back-bleed));
}
/* The row is the page's first line, so what was the top padding of a page under a bar is not needed, and the hairline of the light shell goes under the
   row and over the title, which is where it was relative to the title. */
[data-native][data-native-back] .native-main {
  padding-block-start: var(--safe-top);
}
[data-native][data-native-back] .page-header {
  padding-block-start: 0;
}
[data-native][data-native-back] .page-header-top {
  order: -1;
}
[data-native][data-native-back] .person-header {
  margin-block-start: 0;
}
[data-native][data-native-back] .person-header-crumb {
  display: none;
}

/* ── Buttons: a finger's ──────────────────────────────────────────────────
   The structure shared by the platforms; the shape, the weight and what a press does are each platform's (96 and 97). There is no hover
   on a phone, and the web's hover wash stays on a button after a tap until the finger lands elsewhere, so it is not drawn: a button is its
   colors at rest and its pressed state. */
[data-native] .btn {
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}
[data-native] .btn:hover:where(:not(:disabled, [aria-disabled="true"])) {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-border);
  box-shadow: none;
  filter: none;
}
/* Beside the sheet's one decision (Save, Close this case) the other way out is not an underlined word but a button of its own. */
[data-native] .form-cancel {
  text-decoration: none;
}

/* ── Rows: the whole entry is the target ─────────────────────────────────
   A list on a phone is rows, and a row is tapped anywhere. An entry whose title is a link is stretched over (the link's own box covers
   the entry, so there is nothing to aim at), with a chevron at its end, level with its title, that says it opens; the controls inside an entry (its actions, a
   link in its words) keep their own targets, above the stretch. The chevron is two borders turned, so it is `currentColor` and mirrors
   by turning the other way. */
[data-native] .entry:has(.entry__title a),
[data-native] .link-card {
  position: relative;
}
[data-native] .entry:has(.entry__title a) {
  padding-inline-end: calc(var(--space-4) + 1.5rem);
}
[data-native] .entry__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
[data-native] .entry:has(.entry__title a)::after,
[data-native] .link-card::after {
  content: "";
  position: absolute;
  inset-block-start: calc(var(--space-4) + 0.7rem);
  inset-inline-end: var(--space-4);
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-block-end: 2px solid var(--fg3);
  border-inline-end: 2px solid var(--fg3);
  background: none;
  color: var(--fg3);
  line-height: 0;
  transform: translateY(-50%) rotate(-45deg);
  transition: none;
  pointer-events: none;
}
html[dir="rtl"] [data-native] .entry:has(.entry__title a)::after,
html[dir="rtl"] [data-native] .link-card::after {
  transform: translateY(-50%) rotate(135deg);
}
[data-native] .link-card:hover::after {
  transform: translateY(-50%) rotate(-45deg);
}
[data-native] .entry :is(button, input, select, textarea, summary, label, .btn, .entry__actions a, .entry__body a, .entry__meta a, .entry__fact a) {
  position: relative;
  z-index: 1;
}
[data-native] .entry__title a {
  min-block-size: 0;
}
[data-native] .link-card {
  padding-inline-end: calc(var(--space-4) + 1.5rem);
}
[data-native] .link-card__head {
  padding-inline-end: 0;
}
/* The pressed state of a row is a wash over the whole of it. */
[data-native] .entry:has(.entry__title a:active),
[data-native] .link-card:active {
  background: color-mix(in srgb, var(--fg1) 6%, var(--surface-raised));
}

/* ── Tables: a list of cards ─────────────────────────────────────────────
   A table that scrolls sideways is a desktop's answer, and on a phone it cut its second column in half behind a pinned one. A row is a card (the
   entry's own: raised, hairlined, the platform's radius), its row header the title, each other cell a fact that names itself (`data-label`, put on every
   cell by DataTableComponent), and a column the caller marked `fold` is not drawn: a card has room for a few facts, and the rest are on the page the row
   opens. The headers that sort are kept, as a strip of links over the list, and the rest are not drawn (a column's name is on each fact). A row's one
   link (a cell with nothing but a button: Open) is stretched over the card and drawn as the chevron every row has, so the card is tapped anywhere. */
[data-native] .data-table-region {
  container-type: normal;
  overflow: visible;
  background: none;
}
[data-native] table.data.data-table,
[data-native] table.data.data-table :is(thead, tbody) {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  border: 0;
}
[data-native] table.data.data-table thead tr {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  padding-block: 0 var(--space-3);
}
/* A table that says `cards` (DataTableComponent) names its strip of sort links, as it does in a browser where it has little room (37-table-and-empty-state.css). */
[data-native] table.data.data-table[data-cards] thead tr {
  align-items: center;
}
[data-native] table.data.data-table[data-cards] thead tr[data-sort-label]::before {
  content: attr(data-sort-label);
  color: var(--fg3);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-native] table.data.data-table thead th {
  display: none;
  padding: 0;
  border: 0;
  background: none;
}
[data-native] table.data.data-table thead th:has(.data-table-sort) {
  display: block;
}
[data-native] table.data.data-table tbody tr {
  position: relative;
  box-sizing: border-box;
  inline-size: 100%;
  min-inline-size: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  margin-block-end: var(--space-2);
  padding: var(--space-3) calc(var(--space-4) + 1.5rem) var(--space-3) var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--native-card-radius, var(--radius-lg));
  background: var(--surface-raised);
}
[data-native] table.data.data-table tbody tr:hover {
  background: var(--surface-raised);
}
[data-native] table.data.data-table tbody th[scope="row"] {
  flex: 1 1 100%;
  padding: 0;
  border: 0;
}
[data-native] table.data.data-table tbody td {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  padding: 0;
  border: 0;
  color: var(--fg1);
  font-size: var(--text-sm);
}
[data-native] table.data.data-table tbody td::before {
  content: attr(data-label);
  color: var(--fg3);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-native] table.data.data-table tbody td[data-fold] {
  display: none;
}
[data-native] table.data.data-table tbody td:has(> a.btn:only-child) {
  display: block;
  position: static;
}
[data-native] table.data.data-table tbody td:has(> a.btn:only-child)::before {
  content: none;
}
[data-native] table.data.data-table tbody td > a.btn:only-child {
  position: absolute;
  inset: 0;
  min-block-size: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  box-shadow: none;
  color: transparent;
  font-size: 0;
}
[data-native] table.data.data-table tbody tr:has(td > a.btn:only-child)::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--space-4);
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-block-end: 2px solid var(--fg3);
  border-inline-end: 2px solid var(--fg3);
  transform: translateY(-50%) rotate(-45deg);
  pointer-events: none;
}
html[dir="rtl"] [data-native] table.data.data-table tbody tr:has(td > a.btn:only-child)::after {
  transform: translateY(-50%) rotate(135deg);
}
[data-native] table.data.data-table tbody tr:has(td > a.btn:only-child:active) {
  background: color-mix(in srgb, var(--fg1) 6%, var(--surface-raised));
}
/* The Directory's name cell: the monogram, and the name over what else is known, in the room the card has (its own width is measured against the region it scrolled in). */
[data-native] .directory-name {
  max-inline-size: 100%;
}
[data-native] .directory-name-text {
  display: grid;
  gap: 0;
}

/* ── Sheets: the native sheet is the card ────────────────────────────────
   A form in a sheet sits on the sheet, which the shell draws with its own corners and grabber, so the web's card around the form
   (its border, its raised surface, its shadow) would be a card inside a card and is not drawn. The sections stay separated by their
   hairlines. Actions follow the fields in document flow, with safe-area room for the home indicator and landscape notch.
   A pinned action bar can cover the entire visible form when large text and the keyboard leave little room. */
[data-native-modal] :is(.sheet, .tform:has(> .form-section), .person-picker, .person-search) {
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
[data-native-modal] .tform > .form-actions:not([data-inline]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-inline: calc(-1 * var(--page-gutter));
  padding-block: var(--space-3) calc(var(--space-3) + var(--safe-bottom));
  padding-inline: calc(var(--page-gutter) + max(var(--safe-left), var(--safe-right)));
  border-block-start: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  [data-native-modal] .tform > .form-actions:not([data-inline]) {
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
  }
}
[data-native-modal] .tform > .form-actions:not([data-inline]) :is(.btn, .form-cancel) {
  inline-size: 100%;
}

/* ── The record pages: the dense panels, for a phone ─────────────────────
   The person, case and incident pages are laid out dense on purpose (13px data, 11px labels, rows of 6 to 8px) for a person at a desk with a
   mouse. On a phone that is small to read and small to hit, and it is the same markup, so the page's own type scale is raised here (15px data,
   13px meta, 12px labels: a phone's reading sizes) and the panels are cards of the platform: the head is a small heading and not a band, the
   note under it and not at its end, with the room a finger and an eye want. Nothing is hidden: the page is the same page. */
[data-native] .person-page,
[data-native] .person-panel {
  --person-data: 0.9375rem;
  --person-meta: 0.8125rem;
  --person-label: 0.75rem;
  --person-row-y: 0.625rem;
}
[data-native] .panel.person-panel {
  border-color: color-mix(in srgb, var(--fg1) 8%, transparent);
  border-radius: var(--native-card-radius);
}
[data-native] .person-panel .person-panel-head {
  padding: var(--space-4) var(--space-4) var(--space-2);
  border-block-end: 0;
  background: transparent;
}
[data-native] .person-panel .person-panel-title {
  color: var(--fg3);
  letter-spacing: 0.06em;
}
[data-native] .person-panel .person-panel-note {
  flex-basis: 100%;
  margin-inline-start: 0;
  text-align: start;
}
[data-native] .person-panel .person-panel-body {
  padding: var(--space-2) var(--space-4) var(--space-4);
}
[data-native] .person-panel .person-panel-foot {
  padding: var(--space-3) var(--space-4);
}
[data-native] .case-fact {
  padding-block: var(--space-3);
}
[data-native] .case-fact dt {
  color: var(--fg3);
  font-size: var(--text-sm);
}
[data-native] .case-fact dd {
  font-size: var(--text-base);
}

/* ── The case and incident pages ─────────────────────────────────────────
   The same treatment for the other dense page (68-case-page-layout.css): its own scale raised for a phone, each section a card of the platform
   with its heading as a small heading and its one sentence of help under it (no sunken band), and the facts of the case, which on a desk are a
   strip of cells side by side behind a ruled grid, as rows down the page: a label over its value, a hairline between, each the full width,
   so a date or a name wraps in the room of the screen and not the room of a cell. */
[data-native] .case-show {
  --case-data: 0.9375rem;
  --case-meta: 0.8125rem;
  --case-label: 0.75rem;
  --case-pad: 1rem;
}
[data-native] .case-show :is(.case-main, .case-side, .case-log, .tabs__panel) > :is(section, nav):not(.person-panel),
[data-native] .case-show .case-detail > section {
  gap: var(--space-2);
  padding-block-end: var(--space-4);
  border-color: color-mix(in srgb, var(--fg1) 8%, transparent);
  border-radius: var(--native-card-radius);
}
[data-native] .case-show :is(.case-main, .case-side, .case-log, .tabs__panel, .case-detail) > :is(section, nav) > .person-page-heading,
[data-native] .case-show :is(.case-main, .case-side, .case-log, .tabs__panel) > section > .case-work-head {
  padding-block: var(--space-4) var(--space-1);
  border-block-end: 0;
  background: transparent;
  color: var(--fg3);
  letter-spacing: 0.06em;
}
[data-native] .case-show :is(section, nav) > :is(.person-page-heading, .case-work-head) + .case-source {
  margin-block-start: 0;
  padding-block-end: var(--space-2);
  border-block-end: 0;
  background: transparent;
}
[data-native] .case-show .case-detail > .case-detail-facts {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "source" "facts";
}
[data-native] .case-show .case-detail > .case-detail-facts > .case-source {
  justify-content: flex-start;
  padding-block: 0 var(--space-2);
  background: transparent;
  text-align: start;
}
[data-native] .case-show .case-detail-facts > .case-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}
[data-native] .case-show .case-detail-facts .case-fact {
  margin: 0;
  padding: var(--space-3) var(--case-pad);
  border-inline-start: 0;
}
[data-native] .case-show .case-detail-facts .case-fact dd {
  font-size: var(--text-base);
  font-weight: 600;
}
[data-native] .case-show .case-detail-facts .case-fact dt,
[data-native] .case-show .case-detail-content .case-fact dt {
  letter-spacing: 0.06em;
}
[data-native] .case-show > .case-actions {
  padding: var(--space-3) var(--case-pad);
  border-color: color-mix(in srgb, var(--fg1) 8%, transparent);
  border-radius: var(--native-card-radius);
}

/* ── Focus: where a finger is and where a script puts it ─────────────────
   After a visit a script moves focus to the page's heading, so a screen reader says the new page (WCAG 4.1.3): the heading is not a control
   and not a tab stop (tabindex -1). Browsers draw their ring on a script's focus when no pointer has touched the page yet, which in an app
   is every page that is opened from a tab or a link, and a ring around a title is not a place the person is. Controls keep theirs. */
[data-native] [tabindex="-1"]:focus {
  outline: 0;
}

@media (prefers-reduced-motion: reduce) {
  [data-native] .native-menu {
    transition: none;
  }
  [data-native] .native-scrim {
    animation: none;
  }
}
