/* look-d.css (PRD-86/87, ADR-025): new look "D" (version 3 Loud). Every rule is scoped
   under html[data-look="d"] inside @media screen. styles.css is never edited. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-v1-latin.woff2') format('woff2');
}

@media screen {
  /* ---- tokens: D palette, Archivo, light only ---- */
  html[data-look='d'] {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-alt: #eef2ee;
    --color-border: #e4ebe0;
    --color-text: #233022;
    --color-text-muted: #5b6555;
    --color-accent: #a5b89d;
    --color-accent-soft: rgba(165, 184, 157, 0.18);
    --color-primary: #233022;
    --color-primary-contrast: #ffffff;
    --color-accent-contrast: #233022;
    --color-danger: #9b2c1f;
    --color-focus: #233022;
    --radius-lg: 20px;
    --font-base:
      'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-card: none;
    --blur-glass: none;
    color-scheme: light;
  }

  html[data-look='d'] body {
    background: #ffffff;
    color: #233022;
    font-family: var(--font-base);
  }

  /* ---- search bar: a white bar on white, docked under the hero's white curve ---- */
  html[data-look='d'] #global-search {
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: none;
    margin: 0;
    /* 24px below so a list's first section label never sits on the bar (All SOPs, 375). */
    padding: var(--space-4) var(--space-4) var(--space-5);
    /* Desktop: line up with the content column under the hero title, not the window edge. */
    padding-inline: max(var(--space-4), calc((100% - var(--content-max)) / 2 + var(--space-5)));
  }

  html[data-look='d'] .global-search__input {
    min-height: 56px;
    padding: 0 var(--space-4);
    border: 1px solid #c9d4c6;
    border-radius: 999px;
    background: #ffffff;
    color: #233022;
    font-weight: 600;
  }

  /* The Search screen's box sits inside the green band: same white pill as the docked home bar. */
  html[data-look='d'] #search-input.search-bar__input {
    min-height: 48px;
    padding: 0 var(--space-4);
    border: 1px solid #c9d4c6;
    border-radius: 999px;
    background: #ffffff;
    color: #233022;
    font-weight: 600;
  }

  html[data-look='d'] #search-input.search-bar__input::placeholder {
    color: #5b6555;
  }

  /* Programmatic focus is not :focus-visible, so the old green-band ring needs a look-d twin. */
  html[data-look='d'] #search-input.search-bar__input:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #233022;
  }

  html[data-look='d'] .global-search__mic {
    min-width: 56px;
    min-height: 56px;
    border: 1px solid #c9d4c6;
    background: #ffffff;
    color: #233022;
  }

  html[data-look='d'] .global-search__mic.is-listening {
    background: #a5b89d;
    color: #233022;
  }

  /* ---- slim green band (overrides the old glass header, incl. dark leftover) ---- */
  html[data-look='d'] .app-header {
    /* 48px button + 8px above and below = the 64px the sticky section labels sit under. */
    padding-block: var(--space-2);
    /* A round floating glow (2:1, not a thin streak) on the right of the band, inside its 64px so
       there is no seam with the hero; the small band title sits at the left, clear of it (>= 4.5:1, measured). */
    background:
      radial-gradient(
        72px 32px at 86% 50%,
        rgba(154, 169, 155, 0.6) 0%,
        rgba(154, 169, 155, 0) 100%
      ),
      #4a624c url('../icons/grain.png');
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: none;
    color: #ffffff;
  }

  /* The band is a small caps label; the big letters live in the hero under it. */
  html[data-look='d'] .app-header__title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
    line-height: 1.3;
    text-transform: uppercase;
  }

  html[data-look='d'] .app-header .icon-btn {
    min-width: 48px;
    min-height: 48px;
    border: none;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
  }

  html[data-look='d'] .app-header .icon-btn:active {
    background: rgba(255, 255, 255, 0.18);
  }

  /* The arrow glyph sits low in its line box, ~4px under the band title's optical centre.
     8px of bottom padding lifts it 4px (the 48px tap target does not change). */
  html[data-look='d'] .app-header .back-btn {
    padding-top: 0;
    padding-bottom: 8px;
  }

  /* ---- section labels, hairline rows, round ticks ---- */
  html[data-look='d'] .checklist-section {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 1px solid #e4ebe0;
    color: #4a624c;
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 12px;
  }

  html[data-look='d'] .checklist-row {
    min-height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e4ebe0;
  }

  html[data-look='d'] .checklist-row:active {
    background: #eef2ee;
  }

  html[data-look='d'] .checklist-row__box {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2.5px solid #233022;
    background: #ffffff;
  }

  html[data-look='d'] .checklist-row.is-checked .checklist-row__box {
    background: #233022;
    border-color: #233022;
    color: #ffffff;
  }

  /* Recipe steps are not tickable: the ring shows the step number on mist, never a filled tick. */
  html[data-look='d'] .checklist-row--static .checklist-row__box {
    border-color: #c9d4c6;
    background: #eef2ee;
    color: #233022;
  }

  html[data-look='d'] .checklist-row--static:active {
    background: #ffffff;
  }

  html[data-look='d'] .checklist-row__text {
    font-weight: 700;
    font-size: 16px;
  }

  /* ---- pill buttons: ink primary, sage secondary, ringed icon button ---- */
  html[data-look='d'] .admin-btn {
    min-height: 56px;
    border: none;
    border-radius: 999px;
    background: #a5b89d;
    color: #233022;
    font-size: 16px;
    font-weight: 800;
  }

  html[data-look='d'] .admin-btn:hover {
    background: #a5b89d;
    opacity: 0.92;
  }

  html[data-look='d'] .admin-btn:disabled:hover {
    opacity: 0.5;
  }

  html[data-look='d'] .admin-btn--primary,
  html[data-look='d'] .signin__btn {
    border: none;
    background: #233022;
    color: #ffffff;
  }

  /* Hover: a slightly lighter dark green (white text 9.5:1) so the pill visibly reacts; a disabled one stays put. */
  html[data-look='d'] .admin-btn--primary:hover:not(:disabled),
  html[data-look='d'] .signin__btn:hover:not(:disabled) {
    background: #3a4a38;
  }

  html[data-look='d'] .signin__btn {
    font-size: 16px;
    font-weight: 800;
  }

  html[data-look='d'] .icon-btn {
    border: 1px solid #c9d4c6;
    border-radius: 999px;
    background: #ffffff;
  }

  /* ---- chips, badges ---- */
  html[data-look='d'] .chip {
    border: 1px solid #c9d4c6;
    background: #ffffff;
    font-weight: 800;
  }

  html[data-look='d'] .chip.is-active {
    background: #233022;
    border-color: #233022;
    color: #ffffff;
  }

  html[data-look='d'] .meta-chip {
    background: #eef2ee;
    border-color: #e4ebe0;
  }

  /* ---- list-like choices: hairlines, no boxes ---- */
  html[data-look='d'] .shop-choice {
    min-height: 64px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    font-weight: 800;
  }

  html[data-look='d'] .shop-choice:active {
    background: #eef2ee;
  }

  html[data-look='d'] .shop-chooser__signout {
    min-height: 56px;
    border: 1px solid #c9d4c6;
    border-radius: 999px;
    background: #ffffff;
    font-weight: 800;
  }

  /* ---- forms ---- */
  html[data-look='d'] #screen-signin {
    --signin-input-border: #7a8873;
  }

  html[data-look='d'] .signin__input,
  html[data-look='d'] .admin-field input[type='text'],
  html[data-look='d'] .admin-field input[type='password'],
  html[data-look='d'] .admin-field input[type='email'],
  html[data-look='d'] .admin-field select {
    background: #ffffff;
    color: #233022;
    border-radius: 14px;
  }

  /* ---- focus rings: 3px, visible on white and on green ---- */
  html[data-look='d'] :focus-visible {
    outline: 3px solid #233022;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #ffffff;
  }

  /* The search bar is on white now, so it keeps the default dark ring above. */
  html[data-look='d'] .app-header :focus-visible {
    outline: 3px solid #ffffff;
    box-shadow: 0 0 0 5px #233022;
  }

  /* Sign-in tablet checkbox: room so its ring never touches the label's first letter. */
  html[data-look='d'] .signin__choice {
    gap: var(--space-3);
  }

  /* ---- hero (PRD-88): a normal block after the sticky band, so it scrolls away ---- */
  html[data-look='d'] .app-hero {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    min-height: 172px;
    padding: var(--space-3) var(--space-5) 52px;
    /* --look-col / --look-pad: set per screen at desktop widths (end of file) so the hero follows that screen's column. */
    padding-inline: max(
      var(--space-5),
      calc((100% - var(--look-col, var(--content-max))) / 2 + var(--look-pad, var(--space-5)))
    );
    /* Jake 2026-11-16: four glows - a big light one bottom-right, a softer deeper one bottom-left
       (white words sit there), and two floating ones in the upper part that fade out before the
       top edge (no seam under the flat band). White words stay >= 3:1 on the lightest pixel
       behind them: measured on rendered screens, not guessed. */
    background:
      radial-gradient(
        ellipse 75% 130% at 100% 100%,
        #9aa99b 0%,
        rgba(154, 169, 155, 0.6) 30%,
        rgba(154, 169, 155, 0) 70%
      ),
      radial-gradient(
        ellipse 70% 130% at 0% 100%,
        rgba(122, 147, 123, 0.95) 0%,
        rgba(122, 147, 123, 0.5) 35%,
        rgba(122, 147, 123, 0) 72%
      ),
      radial-gradient(
        420px 52px at 76% 42%,
        rgba(154, 169, 155, 0.6) 0%,
        rgba(154, 169, 155, 0) 100%
      ),
      radial-gradient(
        320px 48px at 30% 40%,
        rgba(122, 147, 123, 0.55) 0%,
        rgba(122, 147, 123, 0) 100%
      ),
      #4a624c url('../icons/grain.png');
    color: #ffffff;
    overflow: hidden;
  }

  /* Phones: the title fills the short hero, so only the two bottom glows stay, at the strength
     measured safe there (>= 3.44:1); the band carries the floating glow instead. */
  @media (max-width: 639.98px) {
    /* A long band title ("TROUBLESHOOTING") reaches x~240 on a phone: the band glow keeps right of it. */
    html[data-look='d'] .app-header {
      background:
        radial-gradient(
          64px 30px at 92% 50%,
          rgba(154, 169, 155, 0.8) 0%,
          rgba(154, 169, 155, 0) 100%
        ),
        #4a624c url('../icons/grain.png');
    }

    html[data-look='d'] .app-hero {
      background:
        radial-gradient(
          ellipse 70% 130% at 100% 100%,
          #8b9b8c 0%,
          rgba(139, 155, 140, 0.55) 35%,
          rgba(139, 155, 140, 0) 72%
        ),
        radial-gradient(
          ellipse 65% 130% at 0% 100%,
          rgba(122, 147, 123, 0.9) 0%,
          rgba(122, 147, 123, 0.45) 35%,
          rgba(122, 147, 123, 0) 72%
        ),
        #4a624c url('../icons/grain.png');
    }
  }

  html[data-look='d'] .app-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    background: #ffffff;
    border-radius: 28px 28px 0 0;
  }

  html[data-look='d'] .app-hero__number {
    flex: none;
    font-size: 104px;
    font-weight: 900;
    font-stretch: 125%;
    line-height: 0.86;
    letter-spacing: -1px;
  }

  html[data-look='d'] .app-hero__side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    min-width: 0;
    padding-bottom: 4px;
  }

  html[data-look='d'] .app-hero__label {
    font-size: 22px;
    font-weight: 800;
    font-stretch: 112%;
    line-height: 1.05;
  }

  html[data-look='d'] .app-hero__title {
    max-width: 100%;
    font-size: 44px;
    font-weight: 900;
    font-stretch: 125%;
    line-height: 1;
    overflow-wrap: anywhere;
    text-transform: uppercase;
  }

  /* A longer word keeps nearly the same height and narrows instead (Archivo width axis),
     so big titles read as one size from screen to screen. */
  html[data-look='d'] .app-hero__title--long {
    font-size: 40px;
    font-stretch: 87%;
  }

  html[data-look='d'] .app-hero__title--xlong {
    font-size: 36px;
    font-stretch: 62%;
  }

  html[data-look='d'] .app-hero__pill {
    padding: 3px 10px;
    border-radius: 999px;
    background: #ffffff;
    color: #233022;
    font-size: 13px;
    font-weight: 800;
  }

  html[data-look='d'] .app-hero__pill.is-alert {
    color: #9b2c1f;
  }

  /* ---- Home: caps tiles, two columns on phones, Today and tasks tiles in ink ---- */
  html[data-look='d'] .launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  html[data-look='d'] .launcher-tile {
    min-height: 64px;
    border: none;
    border-radius: 20px;
    background: #eef2ee;
    color: #233022;
    padding-inline: var(--space-2);
    font-size: clamp(11px, 3.4vw, 14px);
    font-weight: 900;
    font-stretch: 92%;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }

  html[data-look='d'] .launcher-tile[data-tile='today'],
  html[data-look='d'] .launcher-tile[data-tile='my-tasks'] {
    background: #233022;
    color: #ffffff;
  }

  html[data-look='d'] .launcher-tile:active {
    opacity: 0.9;
  }

  html[data-look='d'] .launcher-tile__badge--alert {
    background: #ffffff;
    color: #9b2c1f;
    font-weight: 900;
  }

  html[data-look='d'] .launcher-signout {
    min-height: 56px;
    border: 1px solid #c9d4c6;
    border-radius: 999px;
    background: #ffffff;
    font-weight: 800;
  }

  /* ---- SOP lists, category, search overlay, tasks: hairline rows, no boxes ---- */
  html[data-look='d'] .sop-list > li,
  html[data-look='d'] .search-results > li {
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    font-weight: 700;
  }

  html[data-look='d'] #screen-search.is-active {
    background: #ffffff;
  }

  html[data-look='d'] .task-section__title {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  html[data-look='d'] .task-row {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
  }

  html[data-look='d'] .task-row__title {
    font-size: 16px;
    font-weight: 700;
  }

  html[data-look='d'] .task-btn,
  html[data-look='d'] .task-btn--done {
    min-height: 48px;
    border: none;
    border-radius: 999px;
    background: #233022;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
  }

  /* ---- emergency button stays red and loud, pill shaped ---- */
  html[data-look='d'] .emergency-fab {
    min-height: 56px;
    border-radius: 999px;
    background: #9b2c1f;
    font-weight: 800;
  }

  /* ---- shop tablet landscape: green panel left, tiles right ---- */
  @media (min-width: 1000px) {
    /* 76px = the search bar above the screen (12 + 56 + 8). */
    html[data-look='d'] #screen-home.is-active {
      display: grid;
      grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
      /* Row 1: the band (left) and the search bar (right); row 2: the panel and the tiles. */
      grid-template-rows: auto 1fr;
      min-height: calc(100vh - 76px);
      /* The room .screen keeps for the emergency button moves to the tile column,
         so the green panel reaches the bottom of the window. */
      padding-bottom: 0;
    }

    html[data-look='d'] #screen-home > .app-header {
      grid-column: 1;
      grid-row: 1;
      padding-inline: var(--space-6);
      /* The panel band is only ~420px wide and 96px tall: a round glow keeps right of "LEI-BIBLE". */
      background:
        radial-gradient(
          84px 42px at 82% 50%,
          rgba(154, 169, 155, 0.5) 0%,
          rgba(154, 169, 155, 0) 100%
        ),
        #4a624c url('../icons/grain.png');
    }

    html[data-look='d'] #screen-home > .app-hero {
      grid-column: 1;
      grid-row: 2;
      flex-wrap: wrap;
      align-content: flex-start;
      align-items: flex-end;
      min-height: 0;
      padding: 150px var(--space-6) var(--space-6);
    }

    html[data-look='d'] #screen-home > .app-hero::after {
      display: none;
    }

    /* The tall panel: the % glows would stretch full height and leave a dark stripe between
       them, so both rise from the bottom and overlap; two floating glows sit above and below
       the number, clear of it. */
    html[data-look='d'] #screen-home > .app-hero {
      background:
        radial-gradient(
          ellipse 130% 45% at 100% 100%,
          #9aa99b 0%,
          rgba(154, 169, 155, 0.6) 30%,
          rgba(154, 169, 155, 0) 70%
        ),
        radial-gradient(
          ellipse 120% 40% at 0% 100%,
          rgba(122, 147, 123, 0.95) 0%,
          rgba(122, 147, 123, 0.5) 35%,
          rgba(122, 147, 123, 0) 72%
        ),
        radial-gradient(
          360px 110px at 75% 130px,
          rgba(154, 169, 155, 0.5) 0%,
          rgba(154, 169, 155, 0) 100%
        ),
        radial-gradient(
          320px 200px at 25% 60%,
          rgba(122, 147, 123, 0.5) 0%,
          rgba(122, 147, 123, 0) 100%
        ),
        #4a624c url('../icons/grain.png');
    }

    html[data-look='d'] #screen-home > .app-hero .app-hero__title {
      font-size: 72px;
      line-height: 0.92;
    }

    html[data-look='d'] #screen-home > .app-hero .app-hero__title--long {
      font-size: 52px;
    }

    html[data-look='d'] #screen-home > .app-hero .app-hero__title--xlong {
      font-size: 40px;
    }

    /* The docked search bar takes the top of the tile column. */
    html[data-look='d'] #screen-home > #global-search {
      grid-column: 2;
      grid-row: 1;
      align-self: start;
      /* Same 48px inset as the tiles (launcher-mount 32px + launcher 16px). */
      padding-inline: calc(var(--space-6) + var(--space-4));
    }

    html[data-look='d'] #screen-home > .launcher-mount {
      grid-column: 2;
      grid-row: 2;
      padding: var(--space-2) var(--space-6) calc(var(--touch-min) + var(--space-6));
    }

    html[data-look='d'] #screen-home .launcher-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-4);
    }

    html[data-look='d'] #screen-home .launcher-tile {
      min-height: 120px;
      font-size: 22px;
      letter-spacing: 2px;
    }
  }

  /* ---- Staff reference screens: hairline rows, caps labels, soft tiles ---- */
  /* ---- one left edge: list text, section labels and empty lines start where the
     hero text starts (24px on phones, the centred column on wide screens) ---- */
  html[data-look='d'] .category-grid,
  html[data-look='d'] .sop-list,
  html[data-look='d'] .updates-list {
    padding-inline: var(--space-5);
  }

  html[data-look='d'] .category-group__label {
    padding-inline: 0;
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
  }

  html[data-look='d'] #screen-signin .signin {
    width: calc(100% - 2 * var(--space-5));
  }

  html[data-look='d'] .search-results,
  html[data-look='d'] .checklist {
    padding-inline: var(--space-5);
  }

  html[data-look='d'] .search-results > li,
  html[data-look='d'] .checklist-row,
  html[data-look='d'] .checklist-section {
    padding-inline: 0;
  }

  html[data-look='d'] #screen-troubleshooting-detail .ts-detail {
    width: calc(100% - 2 * var(--space-5));
    max-width: calc(var(--content-max) - 2 * var(--space-5));
  }

  /* A section label inside a list (Contacts) is a label, not a row: no row height, no rule. */
  html[data-look='d'] .sop-list > li.category-group__label,
  html[data-look='d'] #screen-contacts .sop-list > li.category-group__label.category-group__label {
    min-height: 0;
    padding-top: var(--space-3);
    border-bottom: none;
  }

  /* Phone Home has no back arrow, so its band label, tiles and search bar sit at 16px:
     the number joins them. */
  @media (max-width: 999px) {
    html[data-look='d'] #screen-home > .app-hero {
      padding-inline: var(--space-4);
    }
  }

  /* Rows are flush with the text edge, so a hover fill would sit against the letters:
     the row answers a press instead. */
  html[data-look='d'] .category-row:hover {
    background: transparent;
  }

  html[data-look='d'] .category-row:active {
    background: #eef2ee;
  }

  /* All SOPs: hairline rows like every other list, no boxed cards */
  html[data-look='d'] .category-list {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-look='d'] .category-row,
  html[data-look='d'] .category-row:last-child {
    padding-inline: 0;
    border-bottom: 1px solid #e4ebe0;
  }

  html[data-look='d'] .category-row::after {
    color: #4a624c;
  }

  html[data-look='d'] .sop-list > li,
  html[data-look='d'] #screen-updates .updates-card,
  html[data-look='d'] #screen-troubleshooting .ts-row__link,
  html[data-look='d'] #screen-tasks .task-row {
    padding-inline: 0;
  }

  html[data-look='d'] #screen-troubleshooting .ts-list {
    width: calc(100% - 2 * var(--space-5));
    max-width: calc(var(--content-max) - 2 * var(--space-5));
  }

  html[data-look='d'] #screen-tasks > .admin-panel {
    max-width: var(--content-max);
  }

  /* ---- one empty-state line: plain, muted, on the left edge, no rule under it ---- */
  html[data-look='d'] .empty-state,
  html[data-look='d'] .sop-list > li.empty-state,
  html[data-look='d'] .task-empty,
  html[data-look='d'] #screen-today > .admin-hint,
  html[data-look='d'] #screen-manager-sops > .admin-hint {
    margin: 0;
    padding-block: var(--space-4);
    border: none;
    color: #5b6555;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
  }

  html[data-look='d'] .empty-state,
  html[data-look='d'] .sop-list > li.empty-state,
  html[data-look='d'] .task-empty {
    padding-inline: 0;
  }

  html[data-look='d'] #screen-today > .admin-hint,
  html[data-look='d'] #screen-manager-sops > .admin-hint {
    padding-inline: max(var(--space-5), calc((100% - var(--content-max)) / 2 + var(--space-5)));
  }

  /* ---- My tasks: "Done" is a status word, not a button; the SOP link is a full tap target ---- */
  html[data-look='d'] .task-chip--done {
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  /* The "Done ... / Couldn't load" line above the lists reads as a notice with room around it. */
  html[data-look='d'] .task-status {
    min-height: 0;
  }

  html[data-look='d'] .task-status:not(:empty) {
    margin: 0 0 var(--space-5);
    padding: var(--space-3) var(--space-4);
    border-radius: 12px;
    background: #eef2ee;
    color: #233022;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
  }

  html[data-look='d'] .task-row__sop {
    min-height: 48px;
    color: #233022;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  html[data-look='d'] #screen-today .today-card,
  html[data-look='d'] #screen-today .today-card__next {
    border: none;
    border-radius: 20px;
    background: #eef2ee;
    box-shadow: none;
    color: #233022;
  }

  html[data-look='d'] #screen-today .today-card__title {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-today .today-card__subtitle {
    color: #5b6555;
    font-weight: 700;
  }

  html[data-look='d'] #screen-today .today-card__row {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: transparent;
  }

  html[data-look='d'] #screen-today .today-card__row-time {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-today .today-card__row-text {
    font-size: 16px;
    font-weight: 700;
  }

  html[data-look='d'] #screen-recipes .sop-list > li:not(.empty-state),
  html[data-look='d'] #screen-contacts .sop-list > li:not(.empty-state),
  html[data-look='d'] #screen-abbrev .sop-list > li:not(.empty-state),
  html[data-look='d'] #screen-ordering .sop-list > li:not(.empty-state),
  html[data-look='d'] #screen-supplier .sop-list > li:not(.empty-state) {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    font-weight: 700;
  }

  html[data-look='d'] #screen-recipes .recipe-row,
  html[data-look='d'] #screen-contacts .contact-row--highlight {
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  html[data-look='d'] #screen-recipe .recipe-spec {
    border: none;
    border-radius: 20px;
    background: #eef2ee;
    box-shadow: none;
    color: #233022;
  }

  /* Call / Email / Website links are the app's sage secondary pill (same as .admin-btn: 56px, sage,
     ink text) and carry no emoji (app.js setIconLabel drops it in this look): no other control has one. */
  html[data-look='d'] #screen-contacts .contact-action-btn,
  html[data-look='d'] .emergency-contact-row__phone:not(.emergency-contact-row__phone--none) {
    min-height: 56px;
    padding-inline: var(--space-4);
    border: none;
    border-radius: 999px;
    background: #a5b89d;
    color: #233022;
    font-size: 16px;
    font-weight: 800;
  }

  html[data-look='d'] #screen-troubleshooting .ts-rows {
    gap: 0;
  }

  html[data-look='d'] #screen-troubleshooting .ts-row__link {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    color: #233022;
    font-weight: 700;
  }

  html[data-look='d'] #screen-troubleshooting-detail .ts-contact-plain {
    min-height: 56px;
    border-radius: 0;
    box-shadow: none;
    font-weight: 700;
  }

  html[data-look='d'] #screen-supplier .supplier-header,
  html[data-look='d'] #screen-supplier .supplier-destination {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-updates .updates-card {
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  html[data-look='d'] #screen-updates .updates-card__title {
    font-size: 16px;
    font-weight: 700;
  }

  html[data-look='d'] #screen-updates .updates-card__meta,
  html[data-look='d'] #screen-update-detail .update-detail-meta {
    color: #5b6555;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-updates .updates-card__open-sop {
    min-height: 48px;
    border: none;
    border-radius: 999px;
    background: #a5b89d;
    color: #233022;
    font-weight: 800;
  }

  html[data-look='d'] #screen-update-detail .update-detail-body {
    color: #233022;
    font-size: 16px;
    line-height: 1.5;
  }

  /* ---- new-look-b step 2 (PRD-90): manager and owner screens ---- */
  html[data-look='d'] #screen-admin-tasks .task-section__title,
  html[data-look='d'] #screen-admin-tasks .task-group__name,
  html[data-look='d'] #screen-admin-task-report .task-section__title {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-admin-tasks .task-group {
    padding: var(--space-4);
    border: none;
    border-radius: 20px;
    background: #eef2ee;
    box-shadow: none;
  }

  html[data-look='d'] #screen-admin-tasks .task-row {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-look='d'] #screen-admin-tasks .task-row__title {
    font-size: 16px;
    font-weight: 700;
  }

  html[data-look='d'] #screen-admin-tasks .task-row__status,
  html[data-look='d'] #screen-admin-tasks .task-row__note {
    color: #233022;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-admin-tasks .task-row__status {
    padding: 4px 12px;
    border-radius: 999px;
    background: #ffffff;
  }

  html[data-look='d'] #screen-admin-tasks .task-btn,
  html[data-look='d'] #screen-admin-task-report .task-btn {
    min-height: 56px;
    border: none;
    border-radius: 999px;
    background: #a5b89d;
    color: #233022;
    font-size: 16px;
    font-weight: 800;
  }

  html[data-look='d'] #screen-admin-tasks .task-btn--primary,
  html[data-look='d'] #screen-admin-task-report .task-btn--primary {
    background: #233022;
    color: #ffffff;
  }

  html[data-look='d'] #screen-admin-tasks .task-input,
  html[data-look='d'] #screen-admin-tasks .task-select,
  html[data-look='d'] #screen-admin-task-report .task-select {
    min-height: 56px;
    border: 1px solid #c9d4c6;
    border-radius: 14px;
    background: #ffffff;
    color: #233022;
  }

  html[data-look='d'] #screen-admin-tasks .task-field__label {
    color: #5b6555;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-admin-task-report .report-table {
    color: #233022;
  }

  html[data-look='d'] #screen-admin-task-report .report-table th,
  html[data-look='d'] #screen-admin-task-report .report-table td {
    border-bottom: 1px solid #e4ebe0;
  }

  html[data-look='d'] #screen-admin-task-report .report-table th {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-admin-task-report .report-table caption {
    font-weight: 800;
  }

  /* Desktop table: headings sit on the bottom line and number columns line up on the right (Dev journey 2026-11-16). */
  @media (min-width: 640px) {
    html[data-look='d'] #screen-admin-task-report .report-table thead th {
      font-size: 11px;
      letter-spacing: 0.6px;
      vertical-align: bottom;
    }

    html[data-look='d'] #screen-admin-task-report .report-table thead th:not(:first-child),
    html[data-look='d'] #screen-admin-task-report .report-table tbody td {
      text-align: right;
      font-variant-numeric: tabular-nums;
    }
  }

  /* Phone: a wide number ("100%") keeps its label by letting the label drop to the next line. */
  @media (max-width: 479.98px) {
    html[data-look='d'] .app-hero {
      flex-wrap: wrap;
      row-gap: var(--space-2);
    }
  }

  html[data-look='d'] #screen-staff #staff-mount {
    color: #233022;
  }

  html[data-look='d'] #screen-staff .task-btn {
    min-height: 56px;
    border: none;
    border-radius: 999px;
    background: #a5b89d;
    color: #233022;
    font-weight: 800;
  }

  html[data-look='d'] #screen-manager-sops .sop-list > li:not(.empty-state) {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    font-weight: 700;
  }

  /* ---- owner + editor screens (PRD-90): white page, hairline rows, small caps labels ---- */
  html[data-look='d'] #screen-admin-login .admin-panel,
  html[data-look='d'] #screen-admin-sops .admin-panel,
  html[data-look='d'] #screen-admin-roster .admin-panel,
  html[data-look='d'] #screen-admin-contracts .admin-panel,
  html[data-look='d'] #screen-admin-contract-requests .admin-panel,
  html[data-look='d'] #screen-admin-editor .admin-panel,
  html[data-look='d'] #screen-admin-history .admin-panel,
  html[data-look='d'] #screen-admin-announcement .admin-panel {
    border: none;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  html[data-look='d'] #screen-admin-login .admin-field__label,
  html[data-look='d'] #screen-admin-roster .admin-field__label,
  html[data-look='d'] #screen-admin-editor .admin-field__label,
  html[data-look='d'] #screen-admin-announcement .admin-field__label {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-admin-login .admin-error,
  html[data-look='d'] #screen-admin-roster .admin-error,
  html[data-look='d'] #screen-admin-editor .admin-error,
  html[data-look='d'] #screen-admin-announcement .admin-error {
    color: #9b2c1f;
    font-weight: 700;
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-row,
  html[data-look='d'] #screen-admin-sops .sop-list > li:not(.empty-state),
  html[data-look='d'] #screen-admin-history .sop-list > li:not(.empty-state) {
    min-height: 56px;
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  html[data-look='d'] #screen-admin-contracts .admin-contract-row,
  html[data-look='d'] #screen-admin-contract-requests .sop-list > li:not(.empty-state) {
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  /* ---- ui-review round 1 (2026-11-16): one column, one heading style, hairline rows on owner screens ---- */
  html[data-look='d'] #screen-admin-roster #admin-roster-tablets,
  html[data-look='d'] #screen-admin-roster .admin-roster-list {
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
  }

  html[data-look='d'] #screen-admin-roster #admin-roster-tablets {
    padding-inline: var(--space-2);
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-list {
    padding-inline: var(--space-5);
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-add-form > .admin-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    gap: var(--space-2) var(--space-3);
    padding-inline: 0;
    text-align: left;
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-row > .sop-list-item__title,
  html[data-look='d'] #screen-admin-roster .admin-roster-row > .sop-list-item__meta {
    grid-column: 1;
    justify-content: flex-start;
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-row > .admin-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  html[data-look='d'] #screen-admin-roster .tablet-revoke__title,
  html[data-look='d'] #screen-admin-contracts .admin-picker__title,
  html[data-look='d'] #screen-admin-contract-requests .admin-picker__title {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  html[data-look='d'] #screen-admin-contracts .admin-picker__row,
  html[data-look='d'] #screen-admin-contract-requests .admin-picker__row {
    border: none;
    border-bottom: 1px solid #e4ebe0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  html[data-look='d'] #screen-admin-editor .admin-step-row {
    border: none;
    border-radius: 20px;
    background: #eef2ee;
  }

  /* A switched-off button reads as off: tint with muted ink, never white on grey. */
  html[data-look='d'] .admin-screen .admin-btn:disabled,
  html[data-look='d'] .admin-screen .admin-btn:disabled:hover {
    background: #e4ebe0;
    color: #5b6555;
    opacity: 1;
  }

  /* ui-review LOW (Batch C job 2): the owner screens have exactly three pill roles. Sage = an action you can press,
     pale-sage fill = an action that is switched off, white with a hairline ring and cup-green text = a tag chip
     (roster tags, contract Starts/Started badges). Warn/done/caution badges keep their own colours. */
  html[data-look='d'] #screen-admin-roster .meta-chip,
  html[data-look='d'] #screen-admin-contracts .admin-badge--info,
  html[data-look='d'] #screen-admin-contract-requests .admin-badge--info {
    border: 1px solid #c9d4c6;
    border-radius: 999px;
    background: #ffffff;
    color: #4a624c;
    font-weight: 700;
  }

  /* The email field is the longest value on the add form: a full row, so "name@example.com" is never clipped on a phone. */
  html[data-look='d'] #screen-admin-roster .admin-roster-add-form > .admin-field:has(#admin-roster-add-email) {
    grid-column: 1 / -1;
  }

  html[data-look='d'] #screen-admin-task-report .report-table-wrap {
    border-radius: 0;
  }

  html[data-look='d'] #screen-admin-task-report .report-table .task-btn {
    white-space: nowrap;
  }

  @media (min-width: 640px) {
    html[data-look='d'] #screen-admin-task-report .report-table tbody th,
    html[data-look='d'] #screen-admin-task-report .report-table tbody td {
      vertical-align: middle;
    }

    html[data-look='d'] #screen-admin-task-report .report-table th:first-child,
    html[data-look='d'] #screen-admin-task-report .report-table caption {
      padding-left: 0;
    }

    /* Eight columns fit the 672px column without a sideways scroll: number columns shrink to their heading. */
    html[data-look='d'] #screen-admin-task-report .report-table th:not(:first-child) {
      min-width: 0;
    }

    html[data-look='d'] #screen-admin-task-report .report-table th:last-child,
    html[data-look='d'] #screen-admin-task-report .report-table td:last-child {
      padding-right: 0;
    }
  }

  html[data-look='d'] #screen-admin-editor .admin-steps-list {
    margin-left: 0;
    padding-left: 0;
  }

  html[data-look='d'] #screen-admin-editor .admin-step-row {
    margin-left: 0;
  }

  html[data-look='d'] #screen-admin-editor .admin-steps-header h2 {
    color: #4a624c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  /* ui-review round 2: the contracts form reads as three groups, and long condensed titles keep a word gap. */
  html[data-look='d'] #screen-admin-contracts .admin-error:not(:empty) {
    margin-bottom: var(--space-4);
  }

  html[data-look='d'] #screen-admin-contracts .admin-contract-levelbar {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid #e4ebe0;
  }

  html[data-look='d'] #screen-admin-contracts .admin-contract-row {
    gap: var(--space-3);
    padding-block: var(--space-5);
  }

  html[data-look='d'] #screen-admin-contracts .admin-contract-row > .admin-btn {
    align-self: flex-start;
    width: auto;
  }

  html[data-look='d'] .app-hero__title--xlong {
    word-spacing: 0.22em;
  }

  html[data-look='d'] #screen-admin-roster .admin-roster-row {
    column-gap: var(--space-4);
  }

  html[data-look='d'] #screen-admin-task-report .report-table caption {
    padding-left: 0;
  }

  html[data-look='d'] #screen-admin-contract-requests .admin-requests {
    margin-top: var(--space-6, 32px);
  }

  /* ui-review round 3: on a phone the Disable button sits under the chips, never beside them. */
  @media (max-width: 479.98px) {
    html[data-look='d'] #screen-admin-roster .admin-roster-row {
      grid-template-columns: minmax(0, 1fr);
    }

    html[data-look='d'] #screen-admin-roster .admin-roster-row > .admin-btn {
      grid-column: 1;
      grid-row: auto;
    }

    html[data-look='d'] #screen-admin-roster .admin-roster-row .meta-chip {
      overflow-wrap: anywhere;
    }
  }

  @media (max-width: 639.98px) {
    /* The two long labels get a full line each, so "(clock-out)" never breaks at the hyphen. */
    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(3),
    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(4) {
      grid-column: 1 / -1;
    }
  }

  /* Desktop: column headings keep to one line ("Not done (clock-out)" never breaks at its hyphen),
     and a person's detail sits in a readable column instead of floating across the page. */
  @media (min-width: 1024px) {
    /* One-line headings make the table ~730px; the report alone gets a wider column so all eight fit. */
    html[data-look='d'] #screen-admin-task-report .admin-panel {
      max-width: 960px;
    }

    html[data-look='d'] #screen-admin-task-report .task-picker {
      max-width: 480px;
    }

    html[data-look='d'] #screen-admin-task-report .report-table thead th {
      white-space: nowrap;
    }

    html[data-look='d'] #screen-admin-task-report .task-summary,
    html[data-look='d'] #screen-admin-task-report .task-list,
    html[data-look='d'] #screen-admin-task-report .task-empty {
      max-width: 640px;
      line-height: 1.6;
    }
  }

  /* Phones: the report table reads as a row per person (CSS only, markup unchanged). */
  @media (max-width: 639.98px) {
    html[data-look='d'] #screen-admin-task-report .report-table {
      display: block;
      min-width: 0;
    }

    /* Hidden visually (clip), not display:none, so column headers stay in the accessibility tree. */
    html[data-look='d'] #screen-admin-task-report .report-table thead {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
      border: 0;
    }

    /* The sideways-swipe hint is false once the table is a row per person. */
    html[data-look='d'] #screen-admin-task-report .report-scroll-hint {
      display: none;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody,
    html[data-look='d'] #screen-admin-task-report .report-table caption {
      display: block;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody tr {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px var(--space-3);
      padding: var(--space-3) 0;
      border-bottom: 1px solid #e4ebe0;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody th {
      display: block;
      grid-column: 1 / -1;
      min-width: 0;
      border: none;
      padding: 0;
      font-size: 16px;
      font-weight: 800;
      letter-spacing: 0;
      text-transform: none;
      color: #233022;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td {
      display: block;
      min-width: 0;
      padding: 0;
      border: none;
      text-align: left;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(1)::before {
      content: 'Assigned: ';
      font-weight: 700;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(2)::before {
      content: 'Done: ';
      font-weight: 700;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(3)::before {
      content: 'Not done (clock-out): ';
      font-weight: 700;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(4)::before {
      content: 'Not done (end of day): ';
      font-weight: 700;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(5)::before {
      content: 'Done rate: ';
      font-weight: 700;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(6)::before {
      content: 'Inspected: ';
      font-weight: 700;
    }

    html[data-look='d'] #screen-admin-task-report .report-table tbody td:nth-of-type(7)::before {
      content: 'Failed: ';
      font-weight: 700;
    }
  }

  /* ---- desktop: band title, hero title and body column share one left edge (2026-11-16) ----
     Only at >= 1024px, so nothing changes below it. Home keeps its own layout. */
  @media (min-width: 1024px) {
    /* Screens whose body is the 720px .admin-panel (24px inner padding); the SOP and history lists stay on the 1024 column. */
    html[data-look='d'] #screen-admin-roster,
    html[data-look='d'] #screen-admin-contracts,
    html[data-look='d'] #screen-admin-contract-requests,
    html[data-look='d'] #screen-admin-tasks,
    html[data-look='d'] #screen-admin-announcement {
      --look-col: 720px;
    }

    /* The report's body column is 960px. */
    html[data-look='d'] #screen-admin-task-report {
      --look-col: 960px;
    }

    /* The SOP editor's panel is 900px (styles.css .admin-editor-body). */
    html[data-look='d'] #screen-admin-editor {
      --look-col: 900px;
    }

    /* Sign-in: a 480px column with no inner padding (the band already follows it, styles.css). */
    html[data-look='d'] #screen-signin {
      --look-col: 480px;
      --look-pad: 0px;
    }

    html[data-look='d'] #screen-admin-roster > .app-header,
    html[data-look='d'] #screen-admin-contracts > .app-header,
    html[data-look='d'] #screen-admin-contract-requests > .app-header,
    html[data-look='d'] #screen-admin-tasks > .app-header,
    html[data-look='d'] #screen-admin-editor > .app-header,
    html[data-look='d'] #screen-admin-announcement > .app-header,
    html[data-look='d'] #screen-admin-task-report > .app-header {
      padding-inline: max(var(--space-4), calc((100% - var(--look-col)) / 2 + var(--space-4)));
    }
  }
}
