/* P5-116 MY DAY ON A DESK (R-1013-28; JD 2026-10-13 6:43 PM R-1013-19:
   "I think all areas in computer view ought to look like that" - the Office
   screen). Approved mockup: outbox/2026-10-14_mock_4-my-day.html.
   EVERY RULE IS INSIDE THE ONE MEDIA QUERY BELOW, except the tiles' phone
   rule: under 900 px the page is exactly the p5-39 phone page.
   The Office look (office-home.css p5-11 desk grid): titled group cards with
   a coloured top edge, rows with a coloured left edge and a chevron drawn
   with borders. Colours are storm-look.css / tokens.css tokens only - no
   value is declared here. Glove floors: no text under 18 px, nothing to tap
   under 44 px. */

/* phone: the count tiles are not drawn (the phone page has none) */
#md-tiles { display: none; }

@media (min-width: 900px) {
  /* the page: the Office width, not the 430 px phone column */
  html body.storm .st-phone { max-width: 1360px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
  html body.storm #md-main { font-size: 18px; }
  /* the header strip (page-header.js) carries the serif page name at desk */
  html:not(.ph-none) #md-main > h1 { display: none; }

  /* PICKERS - Day, Mechanic, Show on one row, label over its box */
  #md-picker:not([hidden]) {
    display: grid;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    column-gap: 12px; row-gap: 4px;
    align-items: end;
    margin: 14px 0 4px;
  }
  #md-picker label { font-size: 18px; font-weight: 700; color: var(--c-text-3, var(--c-text-2)); margin: 0; }
  #md-picker input, #md-picker select { min-height: 44px; min-width: 200px; font-size: 18px; margin: 0; }
  #md-picker #md-show { grid-row: 2; min-height: 44px; margin: 0; }

  /* COUNT TILES - Fixed today, Can wait, High, Parts open */
  #md-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
  #md-tiles .md-tile {
    display: flex; flex-direction: column; justify-content: center;
    min-height: 84px; padding: 8px 16px;
    background: var(--c-panel, var(--c-bg));
    color: var(--c-text);
    border: 2px solid var(--c-border);
    border-left: 6px solid var(--oh-c);
    border-radius: var(--radius-card, var(--radius));
    text-decoration: none;
  }
  #md-tiles .md-tile b { font-size: 40px; line-height: 1; }
  #md-tiles .md-tile span { font-size: 18px; color: var(--c-text-3, var(--c-text-2)); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  #md-tiles .md-tile:focus-visible { outline: 3px solid var(--c-text); outline-offset: 2px; }
  #md-tile-fixed-a { --oh-c: var(--c-green, var(--c-border)); }
  #md-tile-wait-a  { --oh-c: var(--c-amber, var(--c-border)); }
  #md-tile-high-a  { --oh-c: var(--c-red-text, var(--c-border)); }
  #md-tile-parts-a { --oh-c: var(--c-cyan, var(--c-border)); }

  /* THREE GROUP CARDS side by side */
  #md-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
  #md-groups > section {
    --oh-c: var(--c-blue-2, var(--c-border));
    display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px;
    min-width: 0; min-height: 520px;
    margin: 0;
    padding: 4px 16px 14px;
    background: var(--c-panel-2, var(--c-bg));
    border: 1px solid var(--c-line, var(--c-border));
    border-top: 4px solid var(--oh-c);
    border-radius: var(--radius-card, var(--radius));
    align-content: start;
  }
  #md-fixed { --oh-c: var(--c-green, var(--c-border)) !important; }
  #md-wait  { --oh-c: var(--c-amber, var(--c-border)) !important; }
  #md-parts { --oh-c: var(--c-cyan, var(--c-border)) !important; }
  /* every child a full row, except the title and its "+ New" button share the head */
  #md-groups > section > * { flex: 1 1 100%; min-width: 0; order: 3; }
  #md-groups > section > h2 {
    flex: 1 1 auto; order: 0;
    font-family: var(--font-ui); font-size: 18px; font-weight: 800; line-height: 1.2;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--c-text-3, var(--c-text-2));
    margin: 12px 2px 10px; padding: 0; border: 0;
    background: none; -webkit-text-fill-color: currentColor; text-shadow: none;
  }
  #md-wait-new, #md-parts-new { flex: 0 0 auto; order: 1; min-height: 44px; margin: 0; font-size: 18px; }
  #md-groups > section > p.big { order: 2; font-size: 18px; color: var(--c-text-3, var(--c-text-2)); margin: 0 0 8px; }
  #md-groups > section > p.st-small { order: 2; font-size: 18px; color: var(--c-text-3, var(--c-text-2)); margin: 0 0 8px; }

  /* ROWS - the Office door: coloured left edge and a chevron */
  #md-fixed-list .st-card, #md-wait-list .st-card, #md-parts-list .st-card {
    position: relative;
    margin: 0 0 8px;
    padding: 8px 44px 8px 14px;
    min-height: 56px;
    background: var(--c-panel, var(--c-bg));
    border: 2px solid var(--c-border);
    border-left: 6px solid var(--oh-c);
    border-radius: var(--radius-card, var(--radius));
    font-size: 18px;
  }
  #md-fixed-list .st-card::after, #md-wait-list .st-card::after, #md-parts-list .st-card::after {
    content: "";
    position: absolute; right: 18px; top: 28px;
    width: 10px; height: 10px; margin-top: -5px;
    border-top: 3px solid var(--c-text-3, var(--c-text-2));
    border-right: 3px solid var(--c-text-3, var(--c-text-2));
    transform: rotate(45deg);
  }
  #md-groups .st-card .unit { font-weight: 700; font-size: 18px; }
  #md-groups .st-card .meta, #md-groups .st-card .why { font-size: 18px; color: var(--c-text-3, var(--c-text-2)); }
  #md-groups .st-card button, #md-groups .st-card select, #md-groups .st-card input { min-height: 44px; font-size: 18px; }
  #md-groups .st-empty { font-size: 18px; }

  /* THE NEW ITEM - a side sheet, so the three lists stay in view */
  #md-wait-form:not([hidden]) {
    position: fixed; right: 24px; top: 120px; z-index: 20;
    width: 460px; max-height: 70vh; overflow: auto;
    padding: 8px 18px 16px;
    background: var(--c-panel-2, var(--c-bg));
    border: 2px solid var(--c-accent);
    border-radius: var(--radius-card, var(--radius));
    box-shadow: 0 10px 40px var(--c-bg);
  }
  #md-wait-form label { display: block; font-size: 18px; font-weight: 700; margin: 10px 0 4px; }
  #md-wait-form input, #md-wait-form select { width: 100%; min-height: 44px; font-size: 18px; }
  #md-wait-form button { min-height: 44px; font-size: 18px; margin-top: 8px; }
}
