/* Orshi. Generated from src/ui/palette.js and src/ui/system.css --
   edit those, never this. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/ui/fonts/bricolage-grotesque-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/ui/fonts/bricolage-grotesque-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/ui/fonts/figtree-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/ui/fonts/figtree-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Figtree';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url('/ui/fonts/figtree-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Figtree';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url('/ui/fonts/figtree-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --tp-heading-font: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tp-body-font: 'Figtree', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --tp-paper: #FBF6EF;
  --tp-card: #FFFFFF;
  --tp-soft: #F4ECE2;
  --tp-softer: #F8F2EB;
  --tp-line: #EADFD3;
  --tp-ink-strong: #2A211C;
  --tp-ink: #4A3F38;
  --tp-ink-quiet: #6B5E55;
  --tp-primary: #B34A1B;
  --tp-primary-hover: #8E3A14;
  --tp-on-primary: #FFFFFF;
  --tp-good-ink: #1C6E61;
  --tp-good-tint: #DDF0EA;
  --tp-good-strong: #17594E;
  --tp-pending-edge: #B9862A;
  --tp-pending-tint: #FFF8EA;
  --tp-pending-ink: #7A4F0A;
  --tp-attention-tint: #FBE1D3;
  --tp-attention-ink: #8A3A15;
  --tp-emergency-ink: #A9302A;
  --tp-emergency-tint: #FBE3E0;
  --tp-emergency-edge: #C75A50;
  --tp-cancelled: #EEE9E3;
  --tp-on-call-tint: #E8EEF6;
  --tp-on-call-ink: #2D4A70;
  --tp-badge: #A9302A;
  --tp-on-badge: #FFFFFF;
  --tp-hq-bar: #2A211C;
  --tp-hq-active: #4A3F38;
  --tp-hq-ink: #E6DCD1;

  --tp-card-radius: 20px;
  --tp-panel-radius: 18px;
  --tp-button-radius: 14px;
  --tp-chip-radius: 999px;
  --tp-tap: 44px;
  --tp-tap-primary: 52px;
}

/* ---------------------------------------------------------------------------
   THE DESIGN SYSTEM.

   One stylesheet, every surface: the technician's phone, the manager's phone,
   the office on a computer, and the platform's own tool. A screen that needs a
   look nobody else has is a screen that has drifted, and the twentieth of
   those is a product with no design at all.

   WHAT IS AND IS NOT IN HERE.
     * Colour is NOT in here. Every colour is a var(--tp-*) written out of
       src/ui/palette.js, and `npm run check:contrast` fails on any hex typed
       into this file. That is what stops the palette becoming a suggestion.
     * Layout that belongs to one screen is not in here either. This is the
       vocabulary -- a card, a pill, a tab bar -- and a screen arranges them.

   THE RULES THAT ARE NOT DECORATION.
     * Nothing scrolls sideways, ever, at any width.
     * Anything you tap is at least 44px, because a thumb is not a mouse; a
       primary action on a phone is 52.
     * A state is never only a colour. Dashed for offered, filled for settled,
       stripes for time off -- and a word, always, in every one of them.
   --------------------------------------------------------------------------- */

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

/* HIDDEN MEANS HIDDEN.
   Several components below set `display`, and a `display` on a class beats the
   browser's own rule for `[hidden]`. Without this, a button the page has hidden
   -- the office switch a technician must never see, the offline banner -- is
   drawn as an empty shape. */
[hidden] { display: none !important; }

html {
  /* The palette is a warm light one and has no dark twin. Saying so stops a
     browser painting its own idea of dark over the form controls. */
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--tp-paper);
  color: var(--tp-ink);
  font-family: var(--tp-body-font);
  font-size: 16px;
  line-height: 1.5;
  /* NOTHING SCROLLS SIDEWAYS. */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .tp-display {
  font-family: var(--tp-heading-font);
  color: var(--tp-ink-strong);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  line-height: 1.2;
}
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

a { color: var(--tp-primary); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--tp-primary-hover); }

strong { color: var(--tp-ink-strong); font-weight: 650; }
small, .tp-quiet { color: var(--tp-ink-quiet); font-size: 13px; }

/* Anything a keyboard lands on says so, on every surface. */
:focus-visible {
  outline: 3px solid var(--tp-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- the page header ------------------------------------------------------ */

.tp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--tp-card);
  border-bottom: 1px solid var(--tp-line);
  position: sticky;
  top: 0;
  z-index: 20;
  /* A phone with a notch. */
  padding-top: max(14px, env(safe-area-inset-top));
}
.tp-header__title { flex: 1; min-width: 0; }
.tp-header__title h1, .tp-header__title h2 { margin: 0; }
.tp-header__sub { color: var(--tp-ink-quiet); font-size: 13px; margin: 2px 0 0; }
.tp-header__back {
  background: none;
  border: 0;
  padding: 0 4px;
  min-width: var(--tp-tap);
  min-height: var(--tp-tap);
  color: var(--tp-primary);
  font-size: 15px;
  cursor: pointer;
}

/* --- cards and panels ----------------------------------------------------- */

.tp-card {
  background: var(--tp-card);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-card-radius);
  padding: 16px;
  margin: 0 0 12px;
}
.tp-card--tight { padding: 12px 14px; }
.tp-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.tp-card__head h2, .tp-card__head h3 { margin: 0; }

/* The one on the top of the pile: the next job, the thing to do now. */
.tp-card--lead {
  border-color: var(--tp-primary);
  box-shadow: 0 1px 0 var(--tp-primary) inset, 0 4px 14px rgba(42, 33, 28, 0.06);
}

.tp-panel {
  background: var(--tp-soft);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-panel-radius);
  padding: 14px 16px;
  margin: 0 0 12px;
}
.tp-panel--softer { background: var(--tp-softer); }

/* SOMETHING OFFERED, AND NOT YET ANYBODY'S.
   Dashed, always, and never dashed alone -- the card says who it is offered to
   and that it is not theirs until they accept. */
.tp-card--offered {
  background: var(--tp-pending-tint);
  border: 2px dashed var(--tp-pending-edge);
  color: var(--tp-pending-ink);
}
.tp-card--offered h2, .tp-card--offered h3 { color: var(--tp-pending-ink); }

.tp-card--emergency {
  background: var(--tp-emergency-tint);
  border: 2px solid var(--tp-emergency-edge);
  color: var(--tp-emergency-ink);
}
.tp-card--emergency h2, .tp-card--emergency h3 { color: var(--tp-emergency-ink); }

.tp-card--attention {
  background: var(--tp-attention-tint);
  border: 1px solid var(--tp-line);
  color: var(--tp-attention-ink);
}

.tp-card--cancelled {
  background: var(--tp-cancelled);
  border: 1px solid var(--tp-line);
  color: var(--tp-ink-quiet);
}
.tp-card--cancelled .tp-card__title { text-decoration: line-through; }

.tp-card--oncall {
  background: var(--tp-on-call-tint);
  border: 1px solid var(--tp-line);
  color: var(--tp-on-call-ink);
}

/* TIME OFF IS STRIPES, not a colour. Approved is solid stripes; asked for and
   not yet answered is dashed, and says "waiting for approval" in words. */
.tp-block--timeoff {
  background-color: var(--tp-cancelled);
  background-image: repeating-linear-gradient(
    45deg,
    var(--tp-line) 0,
    var(--tp-line) 6px,
    var(--tp-cancelled) 6px,
    var(--tp-cancelled) 12px
  );
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-panel-radius);
  color: var(--tp-ink);
  padding: 12px 14px;
}
.tp-block--timeoff-asked { border-style: dashed; border-width: 2px; }

/* --- buttons -------------------------------------------------------------- */

.tp-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: var(--tp-tap);
  padding: 10px 16px;
  border-radius: var(--tp-button-radius);
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  color: var(--tp-ink-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.25;
}
/* A link drawn as a button is a button: it should not also be underlined. */
a.tp-btn { text-decoration: none; }
.tp-btn:hover { border-color: var(--tp-primary); color: var(--tp-primary-hover); }
.tp-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tp-btn:disabled:hover { border-color: var(--tp-line); color: var(--tp-ink-strong); }

.tp-btn--primary {
  background: var(--tp-primary);
  border-color: var(--tp-primary);
  color: var(--tp-on-primary);
}
.tp-btn--primary:hover {
  background: var(--tp-primary-hover);
  border-color: var(--tp-primary-hover);
  color: var(--tp-on-primary);
}
.tp-btn--danger {
  background: var(--tp-card);
  border-color: var(--tp-emergency-edge);
  color: var(--tp-emergency-ink);
}
.tp-btn--danger:hover { background: var(--tp-emergency-tint); color: var(--tp-emergency-ink); }

.tp-btn--quiet { background: transparent; border-color: transparent; color: var(--tp-primary); }
.tp-btn--quiet:hover { background: var(--tp-soft); }

.tp-btn--small { min-height: var(--tp-tap); padding: 8px 12px; font-size: 14px; }
.tp-btn--wide { width: 100%; }

/* The one somebody presses standing in somebody else's kitchen. */
.tp-btn--big { min-height: var(--tp-tap-primary); font-size: 16px; padding: 12px 20px; }

.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-actions--stack { flex-direction: column; }

/* --- status pills --------------------------------------------------------- */

.tp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--tp-chip-radius);
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.5;
  border: 1px solid transparent;
  white-space: nowrap;
}
/* SETTLED IS FILLED. Offered is dashed. The shape says it as well as the
   colour, so the two are told apart without seeing either. */
.tp-pill--confirmed { background: var(--tp-good-tint); color: var(--tp-good-strong); }
.tp-pill--offered {
  background: var(--tp-pending-tint);
  color: var(--tp-pending-ink);
  border: 1px dashed var(--tp-pending-edge);
}
.tp-pill--attention { background: var(--tp-attention-tint); color: var(--tp-attention-ink); }

/* SOMETHING IS WAITING ON SOMEBODY ELSE AND MUST NOT BE READ AS SETTLED.
   Build 16's change-to-an-accepted-quote sentence is the first of these: a
   technician reading a new total with no weight on it is a technician about to
   start work nobody has agreed to pay for. Colour is never the only carrier --
   the sentence itself says "waiting" and "not agreed". */
.tp-flag {
  background: var(--tp-attention-tint);
  color: var(--tp-attention-ink);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 14px;
}
.tp-pill--emergency {
  background: var(--tp-emergency-tint);
  color: var(--tp-emergency-ink);
  border: 1px solid var(--tp-emergency-edge);
}
.tp-pill--cancelled { background: var(--tp-cancelled); color: var(--tp-ink-quiet); }
.tp-pill--oncall { background: var(--tp-on-call-tint); color: var(--tp-on-call-ink); }
.tp-pill--quiet { background: var(--tp-soft); color: var(--tp-ink-quiet); }

/* --- what the AI suggested ------------------------------------------------ */
/*
   ALWAYS WEARING ITS LABEL. Nothing a model produced is ever shown without the
   chip that says so, and nothing in here is an action -- the buttons under it
   are, and a person presses them. See CLAUDE.md: AI recommends, a person
   approves.
*/
.tp-suggestion {
  background: var(--tp-softer);
  border: 1px solid var(--tp-line);
  border-left: 4px solid var(--tp-primary);
  border-radius: var(--tp-panel-radius);
  padding: 14px 16px;
  margin: 0 0 12px;
}
.tp-suggestion__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tp-soft);
  color: var(--tp-primary-hover);
  border-radius: var(--tp-chip-radius);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.tp-suggestion__why { color: var(--tp-ink-quiet); font-size: 13.5px; margin-top: 6px; }

/* --- the number that means somebody is waiting ---------------------------- */
/*
   ZERO IS NO BADGE AT ALL. A badge showing "0" is a thing that catches an eye
   for nothing, and a screen that cries wolf is a screen people stop reading.
   The count is per person and per role: a technician's own, a manager's what-a-
   manager-must-decide.
*/
.tp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--tp-chip-radius);
  background: var(--tp-badge);
  color: var(--tp-on-badge);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.tp-badge--onTab {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 4px;
}

/* --- the bottom tab bar (a phone) ----------------------------------------- */

.tp-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--tp-card);
  border-top: 1px solid var(--tp-line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}
.tp-tab {
  position: relative;
  min-height: var(--tp-tap-primary);
  border: 0;
  background: none;
  color: var(--tp-ink-quiet);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  cursor: pointer;
}
.tp-tab__icon { font-size: 18px; line-height: 1; }
/* THE TAB YOU ARE ON IS NOT ONLY A COLOUR: it carries a bar above it, and
   aria-current says so to anything reading the page aloud. */
.tp-tab[aria-current='page'] { color: var(--tp-primary-hover); }
.tp-tab[aria-current='page']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 3px;
  border-radius: var(--tp-chip-radius);
  background: var(--tp-primary);
}

/* Room for the bar, so the last card is never under it. */
.tp-phone { padding: 12px 16px 96px; max-width: 480px; margin: 0 auto; }

/* --- the sidebar (a computer) --------------------------------------------- */

.tp-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.tp-side {
  background: var(--tp-card);
  border-right: 1px solid var(--tp-line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-side__brand {
  font-family: var(--tp-heading-font);
  font-weight: 800;
  font-size: 18px;
  color: var(--tp-ink-strong);
  padding: 6px 12px 14px;
}
.tp-side__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tp-tap);
  padding: 8px 12px;
  border-radius: var(--tp-button-radius);
  border: 0;
  background: none;
  color: var(--tp-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.tp-side__link:hover { background: var(--tp-soft); }
.tp-side__link[aria-current='page'] {
  background: var(--tp-soft);
  color: var(--tp-primary-hover);
  box-shadow: inset 3px 0 0 var(--tp-primary);
}
.tp-side__spacer { flex: 1; }
.tp-main { padding: 20px 24px 40px; min-width: 0; }

/* THE PLATFORM OWNER'S OWN TOOL IS DARK, and that is the point: nobody confuses
   place that can see every company with a company's own screen. */
.tp-side--hq {
  background: var(--tp-hq-bar);
  border-right-color: var(--tp-hq-bar);
  color: var(--tp-hq-ink);
}
.tp-side--hq .tp-side__brand { color: var(--tp-hq-ink); }
.tp-side--hq .tp-side__link { color: var(--tp-hq-ink); }
.tp-side--hq .tp-side__link:hover { background: var(--tp-hq-active); }
.tp-side--hq .tp-side__link[aria-current='page'] {
  background: var(--tp-hq-active);
  color: var(--tp-hq-ink);
  box-shadow: inset 3px 0 0 var(--tp-hq-ink);
}

/* A computer screen is not the only thing this runs on. */
@media (max-width: 900px) {
  .tp-shell { grid-template-columns: 1fr; }
  .tp-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--tp-line); }
  .tp-side__brand { display: none; }
  .tp-side__spacer { display: none; }
  .tp-main { padding: 16px; }
}

/* --- nothing here yet ----------------------------------------------------- */
/*
   AN EMPTY SCREEN SAYS WHY IT IS EMPTY. "Nothing booked for you today" is an
   answer; a blank rectangle is the software looking broken.
*/
.tp-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--tp-ink-quiet);
  background: var(--tp-softer);
  border: 1px dashed var(--tp-line);
  border-radius: var(--tp-card-radius);
}
.tp-empty__mark { font-size: 28px; margin-bottom: 8px; }

/* --- a sheet that slides up, and a window on a computer -------------------- */

.tp-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 33, 28, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
}
.tp-sheet {
  background: var(--tp-card);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--tp-card-radius) var(--tp-card-radius) 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.tp-sheet__grab {
  width: 44px;
  height: 4px;
  border-radius: var(--tp-chip-radius);
  background: var(--tp-line);
  margin: 0 auto 14px;
}
@media (min-width: 720px) {
  .tp-sheet-backdrop { align-items: center; }
  .tp-sheet { border-radius: var(--tp-card-radius); max-height: 82vh; }
}

/* --- forms ---------------------------------------------------------------- */

.tp-field { display: block; margin: 0 0 14px; }
.tp-field__label {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--tp-ink-strong);
  margin-bottom: 5px;
}
.tp-field__hint { display: block; font-size: 13px; color: var(--tp-ink-quiet); margin-top: 5px; }
.tp-input, .tp-select, .tp-textarea {
  width: 100%;
  min-height: var(--tp-tap);
  font-family: inherit;
  font-size: 16px; /* 16 exactly: anything smaller makes an iPhone zoom on focus. */
  color: var(--tp-ink-strong);
  background: var(--tp-card);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-button-radius);
  padding: 10px 12px;
}
.tp-textarea { min-height: 96px; resize: vertical; }
.tp-input:focus, .tp-select:focus, .tp-textarea:focus { border-color: var(--tp-primary); }

.tp-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--tp-tap-primary);
  padding: 10px 0;
  border-bottom: 1px solid var(--tp-line);
}
.tp-toggle-row:last-child { border-bottom: 0; }
.tp-toggle-row__what { min-width: 0; }
.tp-toggle-row__what strong, .tp-toggle-row__what span { display: block; }
.tp-toggle-row input[type='checkbox'] {
  width: 26px;
  height: 26px;
  accent-color: var(--tp-primary);
  flex: none;
}

/* --- tables --------------------------------------------------------------- */

.tp-table-wrap { overflow-x: auto; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tp-table th, .tp-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--tp-line);
  vertical-align: top;
}
.tp-table th {
  font-family: var(--tp-heading-font);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tp-ink-quiet);
  font-weight: 700;
  white-space: nowrap;
}
.tp-table tr:last-child td { border-bottom: 0; }
.tp-table tbody tr:hover { background: var(--tp-softer); }

/* --- small bits everything uses ------------------------------------------- */

.tp-rows { display: grid; gap: 12px; }
.tp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tp-row--spread { justify-content: space-between; }
.tp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tp-tile {
  background: var(--tp-card);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-panel-radius);
  padding: 14px;
  min-height: var(--tp-tap-primary);
}
.tp-tile__count {
  font-family: var(--tp-heading-font);
  font-size: 30px;
  font-weight: 800;
  color: var(--tp-ink-strong);
  line-height: 1.05;
}
.tp-tile__what { color: var(--tp-ink-quiet); font-size: 13.5px; margin-top: 2px; }

.tp-stripe { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tp-stripe__day {
  flex: 1 0 44px;
  min-height: var(--tp-tap-primary);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-button-radius);
  background: var(--tp-card);
  font-family: inherit;
  color: var(--tp-ink);
  cursor: pointer;
  padding: 6px 2px;
  text-align: center;
  font-size: 12px;
}
.tp-stripe__day[aria-current='date'] {
  border-color: var(--tp-primary);
  color: var(--tp-primary-hover);
  font-weight: 700;
}

/* PHOTOS ON A JOB (Build 19): a grid of pictures, two to a row on a phone,
   each with who and when underneath. A photo waiting to send has the dashed
   edge of something not settled yet -- and says so in words as well. */
.tp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tp-photo { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tp-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--tp-panel-radius);
  border: 1px solid var(--tp-line);
  background: var(--tp-soft);
}
.tp-photo figcaption { font-size: 12.5px; overflow-wrap: anywhere; }
.tp-photo--waiting img { border-style: dashed; border-width: 2px; }

.tp-hr { border: 0; border-top: 1px solid var(--tp-line); margin: 14px 0; }

/* Something that has gone wrong, said in one line where it happened. */
.tp-said { min-height: 20px; font-size: 13.5px; color: var(--tp-ink-quiet); }
.tp-said--bad { color: var(--tp-emergency-ink); }
.tp-said--good { color: var(--tp-good-strong); }

/* For a screen reader and nobody else. */
.tp-only-read-aloud {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- "something's off" ----------------------------------------------------- */
/*
   ON EVERY SCREEN, and one press. It captures where somebody was, what role
   they were in and what was on the screen -- so a report is a thing somebody
   presses rather than a form they abandon.
*/
.tp-wrong {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 35;
  min-height: var(--tp-tap);
  padding: 8px 14px;
  border-radius: var(--tp-chip-radius);
  border: 1px solid var(--tp-line);
  background: var(--tp-card);
  color: var(--tp-ink-quiet);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(42, 33, 28, 0.10);
}
.tp-wrong:hover { color: var(--tp-primary-hover); border-color: var(--tp-primary); }
/* Above the tab bar on a phone, so it never covers a tab. */
.tp-has-tabs .tp-wrong { bottom: calc(76px + env(safe-area-inset-bottom)); }

@media print {
  .tp-tabs, .tp-wrong, .tp-side { display: none; }
}

/* Somebody who has asked their machine for less movement gets less movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
