/* Desk
   The look comes from the design mockups: Inter, cool grey paper, near black ink, one blue for action.
   The rules of use come from docs/design-standards.md. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #15171C;
  --slate: #5B6270;
  --line: #E3E6EB;
  --soft: #EEF0F3;
  --blue: #1F5FD6;
  --blue-dark: #1A4FB3;
  --blue-soft: #EAF1FD;
  --ok: #1B7A4B;
  --ok-soft: #E4F3EA;
  --bad: #9A2A1C;
  --bad-soft: #FBEAE7;
  --warn: #8A5200;
  --warn-soft: #FCF1DC;
  --violet: #5B44C4;
  --violet-soft: #ECE8FB;
  --track: #E7E9EE;
  --track-ink: #4A505C;
  --knob-off: #C5CAD3;
  --dash: #A9B0BC;
  --blue-line: #C9D8F5;
  --added: #FAFCFF;
  --r-panel: 14px;
  --r-ctl: 10px;
  color-scheme: light;
}
/* Dark, when the device is set to dark: the same tokens, as Refer MWT does it (Peter, 12/02/2026). Nothing else in
   this file names a colour of its own for paper, ink or lines, so a new rule follows the device by itself. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10141D;
    --surface: #181E2A;
    --ink: #E9ECF3;
    --slate: #9BA4B6;
    --line: #283142;
    --soft: #202838;
    --blue: #4C8BF5;
    --blue-dark: #3A78E0;
    --blue-soft: #16264A;
    --ok: #63C793;
    --ok-soft: #173326;
    --bad: #F08176;
    --bad-soft: #3A1C1A;
    --warn: #E7A74A;
    --warn-soft: #33270F;
    --violet: #AD9CFF;
    --violet-soft: #272246;
    --track: #0C1018;
    --track-ink: #9BA4B6;
    --knob-off: #46506A;
    --dash: #55607A;
    --blue-line: #2B416E;
    --added: #1B2436;
    color-scheme: dark;
  }
  .chatscreen { --tint: #16264A; --tint-ink: #9DC0FF; --green: #173326; --green-ink: #7FD7A6; --green-line: #2C5A41; --amber: #33270F; --amber-ink: #F0C36B; --amber-line: #6B5422; }
  .logo { filter: brightness(1.6) saturate(1.1); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3, p, ul { margin: 0; }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.1rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
h3 { font-size: 1rem; }
.small { font-size: .875rem; }
.muted { color: var(--slate); }
.bad { color: var(--bad); }

/* Top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
       padding-top: env(safe-area-inset-top, 0px); }
/* The page frame has the margins Refer MWT has (Peter, 12/02/2026): the top bar runs the width of the screen, a page is
   up to 1280 wide, one with a table up to 1480, and the gutters grow a little with the screen. */
.topin { margin: 0 auto; display: flex; align-items: center; gap: 20px; height: 60px;
         padding: 0 max(clamp(20px, 3vw, 28px), env(safe-area-inset-right, 0px)) 0 max(clamp(20px, 3vw, 28px), env(safe-area-inset-left, 0px)); }
.brand { font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .logo { height: 24px; width: auto; display: block; }
.brand.big .logo { height: 32px; }
.brand.big { font-size: 1.6rem; }
.menu { display: flex; gap: 4px; flex: 1; }
.bell { margin-left: auto; }
.menu a { padding: 8px 12px; border-radius: var(--r-ctl); color: var(--slate); text-decoration: none; }
.menu a:hover { background: var(--soft); color: var(--ink); }
.menu a.on { background: var(--blue-soft); color: var(--blue-dark); }
.me { position: relative; }
.me summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-ctl); }
.me summary::-webkit-details-marker { display: none; }
.me summary:hover { background: var(--soft); }
.me summary svg { width: 16px; height: 16px; }
.me .who { white-space: nowrap; }
.me .sheet { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--r-panel); padding: 14px; min-width: 220px; box-shadow: 0 8px 24px rgba(20, 23, 28, .12);
             display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 90px); overflow: auto; }

main { width: 100%; max-width: 1280px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; gap: 16px;
       padding: clamp(16px, 3vw, 32px) max(clamp(20px, 3vw, 28px), env(safe-area-inset-right, 0px)) 48px max(clamp(20px, 3vw, 28px), env(safe-area-inset-left, 0px)); }
main:has(table.tbl) { max-width: 1480px; }
.foot { text-align: center; padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }

/* The page's name, with the question mark that shows the explanations */
.pagehead { display: flex; align-items: center; gap: 12px; }
.helpbtn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
           color: var(--slate); font: inherit; cursor: pointer; line-height: 1; }
.helpbtn:hover, .helpbtn[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.help { display: none; }
html.showhelp .help, .showhelp .help { display: block; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--track); border-radius: 12px; overflow-x: auto; align-self: flex-start; max-width: 100%; }
.tabs a { padding: 8px 16px; border-radius: 9px; color: var(--track-ink); text-decoration: none; white-space: nowrap; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 23, 28, .08); }

/* Boxes */
.boxes { display: grid; gap: 16px; grid-template-columns: minmax(0, 640px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(16px, 2.4vw, 24px);
         display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* A box the page jumps to stops under the top bar, not behind it */
.panel[id] { scroll-margin-top: calc(76px + env(safe-area-inset-top, 0px)); }
.panel.narrow { width: 100%; max-width: 400px; margin: 8vh auto 0; }
.panel.flush { padding: 20px 0 0; overflow: hidden; }
.panel.flush .in { margin: 0 20px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* Forms */
form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; width: 100%; color: var(--slate); font-size: .875rem; }
.hint { color: var(--slate); }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
                border-radius: var(--r-ctl); height: 44px; padding: 0 12px; width: 100%; }
/* An iPhone zooms the whole page in when a box with small type is tapped, and leaves it shifted. 16px stops that. */
input, select, textarea { font-size: 16px; }
input[type="file"] { padding: 9px 12px; height: auto; }
input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input:focus, select:focus, .btn:focus-visible, .helpbtn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; }

/* Buttons. Save is blue. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
       border-radius: var(--r-ctl); border: 1px solid var(--blue); background: var(--blue); color: #fff;
       font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { background: var(--soft); color: var(--ink); border-color: var(--line); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns form { width: auto; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Messages */
.flash { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--ok-soft); color: var(--ok); }
.flash.bad { background: var(--bad-soft); color: var(--bad); }

/* A connection: whether it works, what is known, and how the last check went */
.connsay { display: flex; align-items: center; gap: 8px; color: var(--bad); }
.connsay.ok { color: var(--ok); }
.connsay.going { color: var(--blue-dark); }
.connsay.quiet { color: var(--slate); }
.tick { width: 20px; height: 20px; flex: none; }
.facts { display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.facts span { color: var(--slate); font-size: .875rem; }
.facts b { overflow-wrap: anywhere; }
.checks { list-style: none; padding: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 20px 150px minmax(0, 1fr); gap: 10px; align-items: start; }
.checks li.ok .tick { color: var(--ok); }
.checks li.bad .tick { color: var(--bad); }
.checks li.bad .val { color: var(--bad); }
.checks li.opt .tick, .checks li.opt .val { color: var(--slate); }
.checks .lbl { color: var(--slate); font-size: .875rem; padding-top: 2px; }
.checks .val { overflow-wrap: anywhere; }
.more summary { cursor: pointer; color: var(--blue); padding: 4px 0; }
.more[open] summary { margin-bottom: 12px; }

/* Tables. A wide table scrolls inside its own box and never widens the page. */
.tablewrap { position: relative; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .8125rem; color: var(--slate); white-space: nowrap; background: var(--paper); }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl td:first-child, .tbl td:nth-child(2) { white-space: nowrap; }
.empty { padding: 28px 20px; text-align: center; }

/* Asking before something that cannot be undone */
dialog { border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; max-width: min(420px, calc(100vw - 40px)); color: var(--ink); }
dialog::backdrop { background: rgba(20, 23, 28, .45); }
dialog p { margin-bottom: 16px; }

/* Phones */
@media (max-width: 640px) {
  main { padding-top: 16px; }
  .topin { gap: 8px; }
  .me .who { display: none; }
  .facts div, .checks li { grid-template-columns: 20px minmax(0, 1fr); }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .checks .val { grid-column: 2; }
  .btns > .btn, .btns form { flex: 1 1 auto; }
  .btns form .btn { width: 100%; }
  .tabs { align-self: stretch; }
  .tabs a { flex: 1; text-align: center; padding: 8px 6px; font-size: .9375rem; }
  /* Each row of a table becomes a card */
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; }
  .tbl.cards tr { border-top: 1px solid var(--line); padding: 12px 20px; }
  .tbl.cards td { border: 0; padding: 2px 0; white-space: normal; }
  .tbl.cards td:first-child { padding-left: 0; }
  .tbl.cards td:empty { display: none; }
  .tbl.cards td::before { content: attr(data-l) ": "; color: var(--slate); font-size: .875rem; }
}

/* On a phone the menu is a bar at the foot of the screen (the Refer MWT model): an icon over a word, Add in the middle. */
.tabbar { display: none; }
@media (max-width: 760px) {
  .menu.desk { display: none; }
  .topin { justify-content: space-between; }
  body.in main { padding-bottom: 24px; }
  body.in .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .72rem; color: var(--slate);
              text-decoration: none; border-radius: 12px; }
  .tabbar a.on, .tabbar a.add { color: var(--blue); }
  .tabbar svg { width: 24px; height: 24px; }
  /* More: the fifth place in the bar, a drawer that opens upward with whatever did not fit. */
  .tabbar .drawer { position: relative; }
  .tabbar .drawer summary { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .72rem; color: var(--slate); font-weight: 600;
                            list-style: none; cursor: pointer; border-radius: 12px; }
  .tabbar .drawer summary::-webkit-details-marker { display: none; }
  .tabbar .drawer.on summary, .tabbar .drawer[open] summary { color: var(--blue); }
  .drawersheet { position: absolute; right: 0; bottom: calc(100% + 12px); min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
                 box-shadow: 0 8px 28px rgba(21, 23, 28, .16); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
  .tabbar .drawersheet a { flex-direction: row; gap: 12px; padding: 12px 14px; font-size: .9375rem; color: var(--ink); justify-content: flex-start; }
  .tabbar .drawersheet a.on { color: var(--blue); background: var(--blue-soft); }
  /* While something is being typed the bar is put away, so an iPhone cannot leave it in the middle of the page. */
  html.typing .tabbar { display: none; }
  /* Ask Desk is in the bottom bar on a phone, so it leaves the top one. */
  .top .askbtn { display: none; }
  .top .askbtn + .bell { margin-left: auto; }
  html.homeapp .top .askbtn + .bell { margin-left: 0; }
  .sheet .widesettings { display: none; }      /* the bottom bar already has Settings */
}
/* The Home Screen app must not rubber band: a pull would drag the bar off the foot of the screen. */
@media (display-mode: standalone) { html, body { overscroll-behavior-y: none; } }
html.homeapp, html.homeapp body { overscroll-behavior-y: none; }

/* The bell, with its little light: green while there is something new, red when every notification is turned off. */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-ctl);
        color: var(--slate); flex: none; }
.bell:hover, .bell.on { background: var(--soft); color: var(--ink); }
.bell svg { width: 22px; height: 22px; }
.bell .led { position: absolute; top: 7px; right: 8px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--surface); display: none; }
.askbtn { margin-left: auto; }
.askbtn + .bell { margin-left: 0; }
.starters { gap: 8px; }
.starters .btn { height: auto; min-height: 44px; padding: 8px 14px; white-space: normal; text-align: left; justify-content: flex-start; width: 100%; }
.based a { margin-right: 2px; }
.bell.new .led { display: block; background: #2FA866; box-shadow: 0 0 0 0 rgba(47, 168, 102, .6); animation: led 1.8s ease-out infinite; }
.bell.off .led { display: block; background: var(--bad); }
@keyframes led { 0% { box-shadow: 0 0 0 0 rgba(47, 168, 102, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(47, 168, 102, 0); } }
@media (prefers-reduced-motion: reduce) { .bell.new .led { animation: none; } }
.notice.unseen { border-color: var(--blue); }
.me { margin-left: 0; }

/* The menu under a person's name: every button the same width */
.me .sheet .btn, .me .sheet form { width: 100%; }

/* A switch: an oval 62 by 32 with an oval knob that sits flush. Grey when off, blue when on. It saves when flipped. */
.switches { gap: 16px; width: 100%; }
.switchrow { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.switch { flex-direction: row; align-items: center; gap: 12px; width: auto; color: var(--ink); font-size: 1rem; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 62px; height: 32px; margin: 0; cursor: pointer; }
.switch .knob { position: relative; flex: none; width: 62px; height: 32px; border-radius: 16px; background: var(--knob-off); transition: background .15s; }
.switch .knob::after { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 32px; border-radius: 16px; background: #fff;
                       border: 1px solid var(--knob-off); transition: left .15s, border-color .15s; box-sizing: border-box; }
.switch input:checked + .knob { background: var(--blue); }
.switch input:checked + .knob::after { left: 22px; border-color: var(--blue); }
.switch input:focus-visible + .knob { outline: 2px solid var(--blue); outline-offset: 2px; }
.switchrow .help { margin-left: 74px; }

/* Looking at Desk as somebody else */
.viewing { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); }
.viewin { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
          padding: 10px max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); }
.viewin form { width: auto; }
.viewin .btn svg { width: 16px; height: 16px; }
.rowform { flex-direction: row; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.rowform label { flex: 1; min-width: 180px; width: auto; }

/* Tags. One with no colour is an outline only. */
.tag { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .8125rem; color: var(--ink);
       white-space: nowrap; vertical-align: middle; }
.tag.new { background: var(--blue); border-color: var(--blue); color: #fff; }
.tag.going { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--blue-dark); }
.tag.wait { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.tag.ok { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.lblrow { display: flex; align-items: center; gap: 2px; }
.tag.ai { background: var(--violet-soft); border-color: var(--violet-soft); color: var(--violet); margin-left: 6px; }

/* Back, and the line of buttons over a list */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--slate); text-decoration: none; align-self: flex-start; }
.back svg { width: 18px; height: 18px; }
.resultbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -8px; }
.pagehead h1 { overflow-wrap: anywhere; }
.btn.sm { height: 34px; padding: 0 12px; font-size: .875rem; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }
.inlineform { display: inline-flex; width: auto; }
textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
           padding: 10px 12px; width: 100%; resize: vertical; min-height: 44px; }
textarea:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; margin: 0; width: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; }
legend { color: var(--slate); font-size: .875rem; padding: 0 4px; }
.pick, .check { flex-direction: row; align-items: center; gap: 8px; width: auto; color: var(--ink); font-size: 1rem; }
.pick input, .check input { width: 20px; height: 20px; padding: 0; flex: none; }
.choice { display: flex; gap: 18px; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* A store's tickets: one card each */
.stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 640px); }
h2.plain { border: 0; padding: 0; }
.ticketcard { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--r-panel); padding: 16px; color: var(--ink); text-decoration: none; }
.ticketcard:hover { border-color: var(--blue); color: var(--ink); }
.cardtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel.empty { max-width: 640px; }

/* A ticket: the work on the left, what is known about it on the right */
.two { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg.mine { background: var(--blue-soft); border-color: var(--blue-soft); }
.msg.note { background: var(--warn-soft); border-color: var(--warn-soft); }

/* The chat is the ticket build (docs/mockups/ChatToTicket.html). The conversation takes the whole screen: a header, a slim
   strip saying how far the ticket has got, the talk, and the bar to type in pinned at the foot. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.chatpage { height: 100dvh; min-height: 0; overflow: hidden; }
body.chatpage main { padding: 0; gap: 0; max-width: none; min-height: 0; }
body.chatpage .foot { display: none; }
body.chatpage main > .flash { margin: 8px 16px 0; }
.chatscreen { --tint: #EEF3FE; --tint-ink: #1A4FB3; --green: #E8F5EC; --green-ink: #1E7A3C; --green-line: #9ED3AE; --amber: #FFF4E0; --amber-ink: #8A5300; --amber-line: #F0C36B;
              display: flex; flex-direction: column; width: 100%; max-width: 640px; margin: 0 auto; height: calc(100dvh - 61px); min-height: 0; background: var(--paper); }
.chathdr { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 2px; flex: none; }
.chathdr h1 { font-size: 1.0625rem; letter-spacing: 0; margin: 0; }
.chathdr form { width: auto; }
.chathdr .linkbtn { text-decoration: none; padding: 0 8px; white-space: nowrap; }
.hdrpad { width: 44px; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink);
           flex: none; border-radius: 22px; position: relative; cursor: pointer; }
.iconbtn svg { width: 22px; height: 22px; }
.spark { width: 16px; height: 16px; flex: none; }

/* The strip: the only part of the screen that is not chat */
.strip { margin: 0 16px 6px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--blue-line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; flex: none; }
.strip .r { display: flex; align-items: center; gap: 8px; font-size: .8125rem; width: 100%; }
.strip .r form { flex: none; }
.strip .spark, .strip .linkbtn, .strip .link { color: var(--blue); }
.strip .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .count { color: var(--slate); }
.strip .linkbtn, .strip .link { text-decoration: none; font-size: .8125rem; }
.strip progress { width: 100%; height: 3px; border: 0; border-radius: 2px; background: var(--track); overflow: hidden; appearance: none; -webkit-appearance: none; display: block; }
.strip progress::-webkit-progress-bar { background: var(--track); }
.strip progress::-webkit-progress-value { background: var(--blue); transition: width .5s; }
.strip progress::-moz-progress-bar { background: var(--blue); }
.strip.check progress::-webkit-progress-value { background: var(--amber-line); }
.strip.check progress::-moz-progress-bar { background: var(--amber-line); }
.strip.sent { border-color: var(--green-line); background: var(--green); }
.strip.sent progress::-webkit-progress-value { background: var(--green-ink); }
.strip.sent progress::-moz-progress-bar { background: var(--green-ink); }
.strip .done { color: var(--green-ink); }

/* The chat takes the rest of the screen */
.thread { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.thread::before { content: ""; flex: 1; }
.row { display: flex; gap: 8px; align-items: flex-end; max-width: min(340px, 92%); flex-wrap: nowrap; }
.avatar { width: 28px; height: 28px; flex: none; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.row .stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; grid-template-columns: none; }
.bubble { margin: 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; font-size: .9375rem; line-height: 1.4;
          align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.talked { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.talked .bubble { background: var(--paper); }
.talked .me .bubble { background: var(--blue); }
/* Ask Desk on the chat screen */
.starts { display: flex; flex-direction: column; gap: 6px; }
.start { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--blue);
         font: inherit; font-size: .875rem; line-height: 1.35; cursor: pointer; text-decoration: none; min-height: 0; }
.start:hover { background: var(--blue-soft); }
a.chip { text-decoration: none; }
a.chip:hover { text-decoration: underline; }
.bubble.working .doing { margin-left: 6px; font-size: .8125rem; color: var(--slate); line-height: 7px; }
.fineprint { margin: 0; font-size: .75rem; color: var(--slate); text-align: center; }
.bubble.warn { background: var(--amber); border-color: var(--amber-line); color: var(--amber-ink); }
.me { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: min(280px, 82%); }
.me .bubble { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.chatscreen .card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; font-size: .875rem; line-height: 1.4; display: flex; flex-direction: column; gap: 8px; }
.chatscreen .card .lbl { font-size: .75rem; color: var(--slate); display: flex; align-items: center; gap: 6px; }
.card.added { border-color: var(--blue-line); background: var(--added); }
.card.added .lbl:not(.plain) { color: var(--tint-ink); }
.chatscreen .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chatscreen .chip { display: inline-block; padding: 5px 9px; border-radius: 8px; border: 0; font-size: .78rem; background: var(--tint); color: var(--tint-ink); white-space: normal;
                    max-width: 100%; overflow-wrap: anywhere; }
.chatscreen .chip.cat { background: var(--ink); color: var(--paper); }
.chatscreen .chip.need { background: transparent; border: 1px dashed var(--dash); color: var(--slate); }
.chip.new { animation: glow 1.6s ease 2; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(31, 95, 214, .55); } 70% { box-shadow: 0 0 0 7px rgba(31, 95, 214, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 95, 214, 0); } }
.choices { display: flex; flex-direction: row; gap: 8px; flex-wrap: wrap; }
.choice { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--blue); border-radius: 20px; background: var(--surface); color: var(--blue);
          font: inherit; font-size: .875rem; cursor: pointer; }
.choice.picked { background: var(--blue); color: #fff; cursor: default; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.thumbs .thumb { width: 92px; height: 116px; border-radius: 12px; }
.num { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); }
.num.ok { flex-direction: row; align-items: center; justify-content: space-between; }
.num .k { font-size: .75rem; color: var(--slate); }
.num .v { font-size: .9375rem; letter-spacing: .2px; overflow-wrap: anywhere; }
.num .note { font-size: .75rem; }
.num.amber { background: var(--amber); border-color: var(--amber-line); }
.num.amber .note { color: var(--amber-ink); }
.num.ok { background: var(--green); border-color: var(--green-line); }
.num.ok .note { flex: none; }
.num.ok .note { color: var(--green-ink); }
.numtext { min-width: 0; flex: 1; }
.numacts { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.numacts form { width: auto; flex-direction: row; gap: 6px; align-items: center; }
.mini { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--blue); background: var(--surface); color: var(--blue);
        font: inherit; font-size: .8125rem; cursor: pointer; white-space: nowrap; list-style: none; }
.mini::-webkit-details-marker { display: none; }
.mini.solid { background: var(--blue); color: #fff; }
.fix[open] summary { display: none; }
.fix input { height: 32px; width: 150px; border-radius: 16px; padding: 0 10px; }
.sum .subj { font-size: 1rem; line-height: 1.3; }
.sumrow { display: flex; justify-content: space-between; gap: 10px; font-size: .8125rem; padding: 5px 0; border-top: 1px solid var(--line); }
.sumrow span:first-child { color: var(--slate); flex: none; }
.sumrow span:last-child { text-align: right; overflow-wrap: anywhere; }
.send { height: 44px; width: 100%; border: 0; border-radius: 22px; background: var(--blue); color: #fff; font: inherit; font-size: .9375rem; cursor: pointer; }
.send.sent { background: var(--green); color: var(--green-ink); cursor: default; }
.fine { font-size: .75rem; color: var(--slate); }
.sys { align-self: center; max-width: 300px; text-align: center; font-size: .8125rem; color: var(--green-ink); background: var(--green); border: 1px solid var(--green-line);
       border-radius: 12px; padding: 8px 12px; margin: 0; }
/* The three dots while Desk works. Not called typing: that word is the class the page wears while the keyboard is up. */
.bubble.working { display: flex; gap: 4px; padding: 14px; }
.bubble.working i { width: 7px; height: 7px; border-radius: 4px; background: var(--dash); animation: think 1s infinite; }
.bubble.working i:nth-child(2) { animation-delay: .15s; }
.bubble.working i:nth-child(3) { animation-delay: .3s; }
@keyframes think { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.fadein { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bubble.working i, .chip.new, .fadein { animation: none; } }

/* The box to type in, at the foot: one rounded card, the words on top and round buttons in a row under them
   (Peter, 11/30/2026, from a picture of the box he types to Claude in). */
.inputbar { flex: none; gap: 6px; margin: 4px 12px calc(12px + env(safe-area-inset-bottom, 0px)); padding: 10px 10px 10px; background: var(--surface); border: 1px solid var(--line);
            border-radius: 28px; box-shadow: 0 4px 18px rgba(21, 23, 28, .08); align-items: stretch; width: auto; }
.inputbar:focus-within { border-color: var(--blue-line); box-shadow: 0 4px 20px rgba(31, 95, 214, .14); }
.inputbar textarea, .inputbar textarea:focus { border: 0; outline: 0; box-shadow: none; background: transparent; resize: none; min-height: 40px; max-height: 140px; padding: 8px 10px 4px;
            line-height: 1.4; font-size: 1.0625rem; width: 100%; border-radius: 0; }
.inputbar textarea::placeholder { color: var(--slate); }
.tools { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.tools .grow { flex: 1; min-width: 0; }
.round, .sendbtn { position: relative; width: 44px; height: 44px; flex: none; border: 0; border-radius: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.round { background: var(--soft); color: var(--ink); flex-direction: row; }
.round svg { width: 22px; height: 22px; }
.attach input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; padding: 0; cursor: pointer; }
.attach .count { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--blue); color: #fff; font-size: .7rem; display: flex;
                 align-items: center; justify-content: center; padding: 0 4px; }
.attach:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.sendbtn { background: var(--ink); color: var(--paper); }
.sendbtn svg { width: 20px; height: 20px; }
.pill { flex: 0 1 auto; min-width: 0; width: auto; }
.pill select, .pill input { height: 44px; border-radius: 22px; border: 0; background-color: var(--soft); color: var(--ink); padding: 0 34px 0 16px; max-width: 100%; min-width: 0; width: auto; }
.pill input { padding: 0 14px; }
.tools .fineprint { text-align: left; padding-left: 10px; }
.inputbar [disabled], .thread [disabled] { opacity: .6; }
/* On a phone nothing else is on the screen: no top bar, no bottom bar. Back is in the chat's own header. */
@media (max-width: 760px) {
  body.chatpage .top, body.chatpage .tabbar, body.chatpage .viewing { display: none; }
  /* The page is held to what can be seen without pinning the body in place: with the body pinned, an iPhone put the
     menu of the plus button in the middle of the screen instead of at the button (Peter, 11/30/2026). */
  html:has(body.chatpage) { height: var(--seen, 100dvh); overflow: hidden; }
  body.chatpage { height: var(--seen, 100dvh); }
  .chatscreen { height: var(--seen, 100dvh); max-width: none; padding-top: env(safe-area-inset-top, 0px); }
  html.typing .inputbar { margin: 2px 8px 6px; }
}
.msg.ai { background: var(--soft); border-color: var(--soft); }
.msg header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.files, .filelist { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.filelist li { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.thumb { display: block; width: 96px; height: 96px; border-radius: var(--r-ctl); overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.filechip { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-ctl);
            text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.events { list-style: none; padding: 0; display: grid; gap: 10px; }
.events li { display: flex; flex-direction: column; }
/* The ticket as the team will read it: a short sheet, not a form */
h2.big { font-size: 1.3rem; line-height: 1.25; }
.summary { gap: 12px; }
.sheet { margin: 0; display: grid; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.sheet div { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.sheet div:first-child { border-top: 0; }
.sheet dt { color: var(--slate); font-size: .875rem; }
.sheet dd { margin: 0; overflow-wrap: anywhere; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; align-items: start; }
.pair .wide { grid-column: 1 / -1; }
.opt { color: var(--slate); font-size: .75rem; margin-left: 6px; }
@media (max-width: 640px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.trial { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.tryform { flex-wrap: nowrap; align-items: center; }
.tryform select { height: 34px; width: auto; min-width: 0; padding: 0 8px; }
.hintbox, .filesbox, .answer { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.hintbox ul, .needs { margin: 0; padding-left: 20px; }
.needs { color: var(--bad); }
.facts.stack div { grid-template-columns: minmax(0, 1fr); gap: 0; }

/* Narrowing a list */
.filterbar { flex-direction: row; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
label.inline { width: auto; min-width: 160px; }
label.grow { flex: 1; min-width: 200px; }
.pager { display: flex; align-items: center; gap: 12px; }
.tbl.rows td { vertical-align: middle; }
.rowlink { color: var(--ink); text-decoration: none; }
.rowlink:hover { color: var(--blue); }
.tbl tr.off td { color: var(--slate); }
.acts { white-space: nowrap; }
.acts .btn { margin-right: 6px; }
.teamrow { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.teamrow.off { opacity: .6; }

@media (max-width: 900px) {
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .filterbar { flex-direction: column; align-items: stretch; }
  label.inline { width: 100%; }
  .tbl.cards td.acts::before { content: none; }
  .tbl.cards td.acts { padding-top: 8px; }
  .menu a { padding: 8px 9px; }
  .topin { gap: 6px; }
}

/* Text weight. Headers, subheaders and buttons may be bold. All other text is regular.
   Everything takes its weight from what it sits in, and only those kinds are named here. */
body * { font-weight: inherit; }
h1, h2, h3, th, legend, .brand, .subj { font-weight: 700; }
.tabbar a { font-weight: 600; }
.tag { font-weight: 400; }
.btn, .helpbtn, .linkbtn, .choice, .mini, .send, .chip.cat, .chip b, .strip .grow, .chatscreen .lbl, .sys { font-weight: 600; }

/* Refresh, in the app on a Home Screen only: there it has no browser bar to pull the newest page with. */
.refresh { display: none; border: 0; background: transparent; cursor: pointer; padding: 0; }
html.homeapp .refresh { display: inline-flex; }
@media (display-mode: standalone) { .refresh { display: inline-flex; } }
.refresh.turning svg { animation: turn .6s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.top .refresh + .bell { margin-left: 0; }
.chathdr h1 { flex: 1; text-align: center; }
html.homeapp .chathdr .hdrpad { width: 88px; }

/* The date pill. An iPhone draws an empty date box as a sliver with nothing in it, so the pill has a width of its own and
   says Pick the Date until a date is in it. */
.pill.date { position: relative; flex: 0 0 auto; width: 168px; }
.pill.date input { width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; color: transparent; display: block; text-align: left; }
.pill.date input::-webkit-date-and-time-value { text-align: left; }
.pill.date .ph { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--ink); pointer-events: none; white-space: nowrap; }
.pill.date .ph svg { width: 18px; height: 18px; flex: none; }
.pill.date.has input { color: var(--ink); }
.pill.date.has .ph { display: none; }

@media (max-width: 760px) and (display-mode: standalone) { .top .askbtn + .bell { margin-left: 0; } }

/* The chat's title sits in the true middle of the header, whatever is on either side of it. */
.chathdr { position: relative; min-height: 46px; }
.chathdr h1 { position: absolute; left: 50%; transform: translateX(-50%); flex: none; white-space: nowrap; pointer-events: none; }
.chathdr > form, .chathdr > .hdrpad { margin-left: auto; }
.chathdr .linkbtn { font-size: .8125rem; }

/* What is waiting on a person shows where it belongs: a red number on Tickets and a red dot on the ticket itself. */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D92D20; color: #fff;
         font-size: .6875rem; font-weight: 600; line-height: 1; margin-left: 6px; vertical-align: middle; }
.tabbar a { position: relative; }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; border: 2px solid var(--surface); box-sizing: content-box; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #D92D20; margin-right: 8px; vertical-align: middle; }

/* Improve Wording, under a large text box */
.improve { display: flex; align-items: center; gap: 14px; margin-top: -4px; min-height: 28px; }
.improve .linkbtn { text-decoration: none; font-size: .875rem; font-weight: 600; }
.improve .linkbtn[disabled] { opacity: .5; }

/* A chat does not zoom by itself: not when a box is tapped (an iPhone zooms in on any box whose letters are under 16
   points) and not on a double tap. */
.chatscreen { touch-action: manipulation; }
.chatscreen input, .chatscreen select, .chatscreen textarea { font-size: max(16px, 1rem); }
.inputbar textarea, .inputbar textarea:focus { font-size: 1.0625rem; }

/* The bell is a switch with a light: green while notifications are on, red while they are off (Peter, 11/30/2026). */
button.bell { border: 0; background: transparent; cursor: pointer; padding: 0; }
.bell.yes .led { display: block; background: #2FA866; }
.bell.off .led { display: block; background: #D92D20; animation: none; box-shadow: none; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--paper);
         padding: 10px 16px; border-radius: 22px; font-size: .875rem; box-shadow: 0 6px 22px rgba(21, 23, 28, .25); white-space: nowrap; }

/* Developer issues */
#report { width: min(440px, calc(100vw - 32px)); }
#report form { display: flex; flex-direction: column; gap: 12px; }
#report h3 { margin: 0; }
.issue { gap: 10px; }
.issue .answer { background: var(--ok-soft); border-radius: var(--r-ctl); padding: 10px 12px; }
.issue .body { white-space: pre-wrap; }
.chathdr .flag { color: var(--slate); }

/* Nothing may make the page wider than the screen. An iPhone gives a date box a width of its own that ignores the box
   it sits in, which pushed the whole page sideways in the installed app (Peter, 11/30/2026). */
html, body { overflow-x: clip; max-width: 100%; }
input, select, textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
label, .pair > *, .panel, form { min-width: 0; }
input[type=date], input[type=time], input[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: 44px; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }

.tabbar .drawer summary { position: relative; }
.tabbar .drawersheet .badge { position: static; border: 0; margin-left: auto; }

/* In the installed app an iPhone softens whatever sits at the very top of the screen unless a bar with a solid ground is
   held there, as the site's own top bar is. The chat's header had no ground of its own, so its icons and title came out
   blurred (Peter's issue 4, 11/30/2026). It is now a held bar on solid paper, and the strip above it is painted too. */
.chathdr { position: sticky; top: 0; z-index: 6; background: var(--paper); }
body.chatpage::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--paper); z-index: 7; }
@media (max-width: 760px) {
  .chatscreen { padding-top: 0; }
  .chathdr { padding-top: calc(6px + env(safe-area-inset-top, 0px)); top: 0; }
  .chathdr h1 { top: calc(50% + env(safe-area-inset-top, 0px) / 2); transform: translate(-50%, -50%); }
}

/* Flag an Issue */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--track); border-radius: 12px; align-self: flex-start; }
.seg label { flex-direction: row; width: auto; margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 8px 14px; border-radius: 9px; color: var(--track-ink); cursor: pointer; font-weight: 600; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 28, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }
.issuepic { max-width: min(100%, 320px); max-height: 420px; border: 1px solid var(--line); border-radius: var(--r-ctl); display: block; }
.top .flagbtn { margin-left: auto; color: var(--slate); }
.top .flagbtn + .bell, .top .flagbtn + .refresh + .bell { margin-left: 0; }
.top .flagbtn ~ .bell { margin-left: 0; }
.viewin .btn.quiet { margin-left: auto; }

/* A picture, opened over the page */
#viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; margin: 0; }
#viewer[open] { display: flex; align-items: center; justify-content: center; }
#viewer::backdrop { background: rgba(21, 23, 28, .86); }
#viewer img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 120px); border-radius: 10px; background: #fff; }
#viewer img { touch-action: none; cursor: zoom-in; will-change: transform; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#viewer.zoomed img { cursor: grab; border-radius: 0; }
#viewer .btn { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 2; }

/* Desk does not zoom: sliding the page up, down and sideways is all a touch does. */
html { touch-action: pan-x pan-y; }
/* The typing card sits a little clear of the bottom edge of the screen. With the keyboard up it sits on the keyboard. */
.inputbar { margin-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
html.typing .inputbar { margin-bottom: 6px; }

/* Admin, Categories */
.catrow { gap: 8px; }
.catrow.off { opacity: .65; }
.catrow h3 { margin: 0; }
.catrow .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.catrow .tags:empty { display: none; }
.fieldrow { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); min-width: 0; }
.fieldrow.blank { border-style: dashed; }
.boxes.wide { grid-template-columns: minmax(0, 900px); }

/* Buttons, site wide (Peter, 11/30/2026): blue sends, submits or saves; white edits, cancels or does something lesser;
   red deletes, discards, removes or turns off. In a row the blue one comes first and the red one sits apart at the far end. */
.btn.danger { background: #D92D20; border-color: #D92D20; color: #fff; }
.btn.danger:hover { background: #B42318; border-color: #B42318; color: #fff; }
.linkbtn.danger { color: #D92D20; }
.btns { align-items: center; }
.btns > .danger, .btns > form:has(.danger) { margin-left: auto; }
.acts form { display: inline-flex; width: auto; vertical-align: middle; }
@media (max-width: 640px) {
  /* On a phone a button is as wide as its words, in a row from the left, the same on every page. */
  .btns > .btn, .btns form { flex: 0 0 auto; }
  .btns form .btn { width: auto; }
}
/* The first card of a list has no line over it (Peter's issue 15). */
@media (max-width: 640px) { .tbl.cards tbody tr:first-child { border-top: 0; padding-top: 4px; } }

/* A row of buttons is a row whatever holds it, and as wide as its box, so the red one reaches the far end. */
form.btns { flex-direction: row; align-items: center; }
form > .btns, .panel > .btns { align-self: stretch; width: 100%; }
.btns > .danger ~ .danger, .btns > form:has(.danger) ~ .danger, .btns > .danger ~ form:has(.danger) { margin-left: 0; }
.picks { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 640px) { .btn { padding: 0 14px; } .btns { gap: 8px; } }

.fieldrow .tall { grid-column: 1 / -1; }
.fieldrow textarea { resize: vertical; }

/* Reports mockup */
.mocknote { background: var(--warn-soft); color: var(--warn); border-radius: var(--r-ctl); padding: 10px 14px; margin: 0; font-size: .9375rem; }
.reportrow { gap: 8px; }
.reportrow h3 { margin: 0; }
.filterrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--blue-dark); font-size: .875rem; }
.chip.need { background: transparent; border: 1px dashed var(--dash); color: var(--slate); }
.chip .x { color: var(--slate); }
.chips.cols { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.pair.three { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile span { color: var(--slate); font-size: .8125rem; }
.tile b { font-size: 1.6rem; letter-spacing: -0.02em; }
.tile i { font-style: normal; font-size: .8125rem; color: var(--ok); }
.chart { width: 100%; max-width: 520px; height: auto; }
.chart .bar { fill: var(--blue); }
.chart .lbl { font-size: 11px; fill: var(--slate); }
.chart .val { font-size: 11px; fill: var(--ink); font-weight: 600; }
.histrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); width: 100%; }
.histrow:first-of-type { border-top: 0; }
.histrow a { margin-left: auto; }
.askai textarea { background: var(--paper); }

/* Admin, Roles */
.rolecard { gap: 10px; }
.rolecard h3 { margin: 0; }
.rolemod { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); width: 100%; }
.rolemod .lbl { color: var(--slate); font-size: .875rem; }
.rolemod ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.rolemod li.new { font-weight: 600; }
.rolemod.none { opacity: .6; }
@media (max-width: 640px) { .rolemod { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* A report built in Ask Desk */
.card.report { gap: 10px; }
table.reptable { width: 100%; border-collapse: collapse; font-size: .875rem; display: table; }
table.reptable th { text-align: left; color: var(--slate); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.reptable td { padding: 4px 6px; border-bottom: 1px solid var(--soft); overflow-wrap: anywhere; }
table.reptable th:nth-child(n+2), table.reptable td:nth-child(n+2) { text-align: right; white-space: nowrap; width: 1%; }

/* Reports. A grid of things to tick, tables whose numbers line up on the right, and a page that prints as the report alone. */
.ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; width: 100%; }
.ticks:empty { display: none; }
.tbl.nums th:nth-child(n+2), .tbl.nums td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.tbl.nums td:first-child { white-space: normal; min-width: 120px; }
.tbl.nums th, .tbl.nums td { padding-left: 10px; padding-right: 10px; }
.tbl.nums th { white-space: normal; vertical-align: bottom; min-width: 64px; }
.panel.flush > h2, .panel.flush > p { margin-left: 20px; margin-right: 20px; }
.panel.flush > p { padding-bottom: 14px; }
.reportrow h3 a { color: inherit; text-decoration: none; }
.tile i { color: var(--slate); }
.tbl.replist td { white-space: normal; overflow-wrap: anywhere; }
.tbl.replist td:first-child { white-space: nowrap; }
@media print {
  header.top, .tabbar, .noprint, .helpbtn, .flash, dialog { display: none !important; }
  body { background: #fff; }
  .panel, .tile { border-color: #ccc; box-shadow: none; break-inside: avoid; }
}
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; }
.btn.google svg { width: 20px; height: 20px; flex: none; }
.signin h2.plain { font-size: 1rem; margin: 0; }

/* Tables that sort and search (app.js): a heading is a button that looks like the heading, with an arrow once it sorts */
.sorthead { all: unset; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; }
.sorthead:hover, .sorthead:focus-visible { color: var(--ink); text-decoration: underline; }
.tabletools { display: flex; align-items: center; gap: 10px; padding: 0 0 10px; }
.panel.flush > .tabletools { padding: 0 20px 10px; }
.tabletools .btn svg { width: 18px; height: 18px; display: block; }
.tabletools input { max-width: 320px; }
.tabletools .toolsend { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (min-width: 641px) { .tabletools .one { display: none; } }
.colsearch th { padding-top: 0; background: var(--paper); }
.colsearch input { min-width: 70px; height: 34px; padding: 4px 8px; font-size: .875rem; }
.colmenu { position: relative; }
.colmenu > summary { list-style: none; cursor: pointer; }
.colmenu > summary::-webkit-details-marker { display: none; }
.colmenu .sheet { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
                  padding: 12px 14px; display: grid; gap: 8px; min-width: 200px; max-height: 60vh; overflow: auto; box-shadow: 0 8px 24px rgba(20, 23, 28, .16); }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0 0; }
.panel.flush > .pager { padding: 12px 20px 16px; }
.pager select { width: auto; height: 36px; padding: 4px 28px 4px 10px; }
.pager .btn[disabled] { opacity: .45; cursor: default; }

/* A timeline: a dotted line with a coloured dot for each entry, newest first (docs/design-standards.md, Timelines) */
.timeline { list-style: none; margin: 0 0 0 6px; padding: 0 0 0 20px; border-left: 2px dotted var(--line); display: grid; gap: 18px; width: 100%; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--slate); border: 2px solid var(--surface); }
.timeline li.k-reply::before { background: var(--blue); }
.timeline li.k-message::before { background: var(--ok); }
.timeline li.k-note::before { background: var(--warn); }
.timeline .body { margin: 0; }
.tlhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag.kind.k-reply { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--blue-dark); }
.tag.kind.k-message { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.tag.kind.k-note { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.timeline details.fold > summary { cursor: pointer; list-style: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline details.fold > summary::-webkit-details-marker { display: none; }
.timeline details.fold[open] > summary { display: none; }
@media (prefers-color-scheme: dark) { .tag.kind.k-reply { color: var(--blue); } }

/* Helps brought over from Refer MWT (extras.js) */
.casehint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 4px; font-size: .86rem; color: var(--slate); }
.casehint b { color: var(--ink); }
.casehint .linkbtn { font-size: .86rem; padding: 2px 0; }
dialog.floatbox { padding: 0; border: 0; background: transparent; max-width: min(720px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 32px); overflow: auto; }
dialog.floatbox .boxes { grid-template-columns: minmax(0, 1fr); }
dialog.floatbox p { margin-bottom: 0; }
.flash { position: relative; padding-right: 44px; }
.flashx { all: unset; position: absolute; top: 4px; right: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; border-radius: 8px; }
.flashx:hover, .flashx:focus-visible { background: rgba(127, 127, 127, .18); }
.periodrow { display: flex; flex-direction: row; align-items: flex-end; gap: 10px; flex-wrap: wrap; width: 100%; }
.periodrow label.inline { min-width: 0; }
.periodrow .btn { flex: none; }
.periodrow label.inline { width: auto; }
.periodrow input[type=date] { width: 160px; max-width: 100%; }
nav.seg.fit a { display: block; padding: 8px 14px; border-radius: 9px; color: var(--track-ink); text-decoration: none; white-space: nowrap; }
nav.seg.fit a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 28, .12); }
@media (max-width: 640px) { .periodrow label.inline { flex: 1 1 130px; } .periodrow input[type=date] { width: 100%; } nav.seg.fit { align-self: stretch; } nav.seg.fit a { flex: 1; text-align: center; padding: 8px 6px; } }
.tbl.rows td:nth-child(2) { white-space: normal; min-width: 240px; }

/* Flag an Issue by pointing (issue.js). The bar keeps clear of what stays put on the screen: at the foot on a computer,
   under the top bar on a phone, where the tabs are at the foot. */
.issuebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3000; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 8px 12px; width: max-content; max-width: calc(100vw - 16px); padding: 10px 14px; border-radius: var(--r-panel);
  background: var(--ink); color: var(--paper); border: 2px solid #D92D20; box-shadow: 0 12px 30px -12px rgba(10, 20, 50, .6); font-weight: 600; }
.issuebar .issuebtns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
@media (max-width: 760px) { .issuebar { bottom: auto; top: calc(64px + env(safe-area-inset-top, 0px)); padding: 8px 10px; gap: 6px 8px; } }
.issuering { position: fixed; z-index: 2999; pointer-events: none; outline: 3px solid #D92D20; outline-offset: 2px; background: rgba(217, 45, 32, .10); }
html.issue-pointing, html.issue-pointing * { cursor: crosshair !important; }
dialog.issueask { width: min(94vw, 480px); max-width: none; }
dialog.issueask form { display: flex; flex-direction: column; gap: 12px; }
dialog.issueask p { margin: 0; }
dialog.issueask::backdrop { background: rgba(10, 16, 30, .12); }
.issuewhat { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-left: 3px solid #D92D20; border-radius: 6px; padding: 8px 10px; margin: 0; overflow-wrap: anywhere; }
.issueshot { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--paper); max-width: 100%; border-radius: var(--r-ctl); }
.issueshot iframe { display: block; border: 0; transform-origin: 0 0; background: #fff; }

/* Where buttons sit (Peter, 12/02/2026, the same on Refer MWT): in any window that sends or saves, the blue button is at
   the right. Cancel is next to it on its left, then Edit and the other white ones, and a red Delete is at the far
   left. The pages write the blue one first and the red one last, so a row with a blue button is simply drawn from the
   right. A row with no blue button (the choices on a list) stays as it is, and so does the chat. */
.btns:has(.btn:not(.quiet):not(.danger)), dialog .row { flex-direction: row-reverse; justify-content: flex-start; }
.btns:has(.btn:not(.quiet):not(.danger)) > .danger, .btns:has(.btn:not(.quiet):not(.danger)) > form:has(.danger) { margin-left: 0; margin-right: auto; }
.btns:has(.btn:not(.quiet):not(.danger)) > .danger ~ .danger, .btns:has(.btn:not(.quiet):not(.danger)) > form:has(.danger) ~ .danger,
.btns:has(.btn:not(.quiet):not(.danger)) > .danger ~ form:has(.danger) { margin-right: 0; }
[data-chat] .btns, [data-chat] .row { flex-direction: row; }
/* a form whose one button stands by itself under its boxes: that button is at the right as well */
form:has(> label):not(.filterbar):not(.rowform):not(.periodrow):not(.inlineform) > button.btn:not(.quiet):not(.danger) { align-self: flex-end; margin-left: auto; }
/* a red button by itself in a window (Turn Off under a Save of its own) is at the left too */
.btns:not(:has(.btn:not(.danger))) > .danger, .btns:not(:has(.btn:not(.danger))) > form:has(.danger) { margin-left: 0; margin-right: auto; }

/* The dates row: every box, Show and the day buttons sit on one line at the foot of the row (issue 27) */
.periodrow nav.seg, .periodrow .daybtns { align-self: flex-end; }
.periodrow input[type=date], .periodrow .btn { height: 44px; }
/* a pop-up's buttons run the width of the box, so they reach its right side; and the issue box can be dragged by its heading */
dialog .row { width: 100%; max-width: none; }
dialog.issueask .movehandle { cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; margin: -20px -20px 0; padding: 14px 20px 12px; border-bottom: 1px solid var(--line); background: var(--paper); border-radius: var(--r-panel) var(--r-panel) 0 0; }
.periodedit .rowform { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.periodedit label.inline { min-width: 0; width: 90px; flex: 0 0 90px; }
.periodedit .btns { width: auto; }
fieldset.plainset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; }

/* A pop-up message sits at the top of the page, under the top bar, with an x, until it is closed (issue 32) */
.toast { top: calc(72px + env(safe-area-inset-top, 0px)); bottom: auto; display: flex; align-items: center; gap: 10px; white-space: normal; max-width: calc(100vw - 24px);
         border-radius: var(--r-ctl); padding: 10px 8px 10px 16px; }
.toast .flashx { position: static; flex: none; }

/* Tickets: the views, the round + that adds a fast filter of the person's own, and Remove Filter on one of theirs */
.tabsrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.tabsrow .tabs { align-self: center; min-width: 0; }
.tabadd { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--blue); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.tabadd:hover, .tabadd:focus-visible { border-color: var(--blue); background: var(--blue-soft); }
.tabadd svg { width: 18px; height: 18px; }
.fastadd { max-width: 720px; }

/* The ticket board: four columns of cards. On a phone the columns sit side by side and are swiped across. */
main:has(.board) { max-width: 1480px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; width: 100%; }
.bcol { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; min-width: 0; }
.bcol.over { border-color: var(--blue); background: var(--blue-soft); }
.bcol > h2 { font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; cursor: grab; min-width: 0; }
.bcard.lifting { opacity: .45; }
.bcard .bsubject { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .btn { align-self: flex-end; }
.bempty { margin: 0 2px; }
#move { width: min(94vw, 460px); max-width: none; }
#move form { gap: 12px; }
#move p { margin: 0; }
@media (max-width: 760px) {
  .board { grid-template-columns: repeat(4, 84vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .bcol { scroll-snap-align: start; }
}
/* Improve Wording goes away with the box it belongs to */
[hidden] + .improve { display: none; }

/* A tab or a day button the person added themselves: a red x at its top right corner, shown when the pointer is over it
   (always shown where there is no pointer to hover with), removes it. */
.hasx, .seg span.hasx { position: relative; display: flex; padding: 0; border-radius: 0; font-weight: inherit; cursor: auto; }
@media (max-width: 640px) { .tabs .hasx, nav.seg.fit .hasx { flex: 1; } .tabs .hasx > a, nav.seg.fit .hasx > a { flex: 1; } nav.seg.fit { flex-wrap: wrap; } }
.tabs .hasx > a, nav.seg.fit .hasx > a { display: block; }
.tabx { all: unset; position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; border-radius: 50%; background: #D92D20; color: #fff; font-size: 12px; line-height: 16px;
        text-align: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.hasx:hover .tabx, .tabx:focus-visible { opacity: 1; }
@media (hover: none) { .tabx { opacity: 1; width: 20px; height: 20px; line-height: 20px; font-size: 14px; top: -5px; } nav.seg.fit:has(.tabx) { gap: 14px 22px; padding: 8px 12px; } }
.adddays { position: relative; align-self: flex-end; }
.adddays > summary { list-style: none; cursor: pointer; height: 44px; width: 44px; }
.adddays > summary::-webkit-details-marker { display: none; }
.adddaysbox { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--r-panel); padding: 12px; box-shadow: 0 8px 24px rgba(20, 23, 28, .16); }
.adddaysbox label.inline { width: 90px; min-width: 0; }
.tabx.tabedit { right: auto; left: -3px; background: var(--blue); display: flex; align-items: center; justify-content: center; }
.tabx.tabedit svg { width: 10px; height: 10px; }
.adddays[data-full]:not([open]) > summary { display: none; }      /* no room for another button: the + is put away, the box still opens to change one */

/* Sort buttons on a heading: an up and a down arrow, the one in use drawn dark (issue 38) */
.sortwrap { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sortbtns { display: inline-flex; flex-direction: column; gap: 1px; }
.sortbtn { all: unset; cursor: pointer; display: flex; width: 16px; height: 10px; align-items: center; justify-content: center; color: var(--slate); opacity: .55; border-radius: 3px; }
.sortbtn svg { width: 12px; height: 12px; }
.sortbtn:hover, .sortbtn:focus-visible { opacity: 1; color: var(--blue); }
th[aria-sort="ascending"] .sortbtn.up, th[aria-sort="descending"] .sortbtn.down { opacity: 1; color: var(--ink); }
@media (max-width: 640px) { .sortbtn { width: 22px; height: 16px; } .sortbtn svg { width: 15px; height: 15px; } }

/* The subject of a ticket on a list keeps to about a third of the table (issue 37): two lines, then three dots */
@media (min-width: 761px) {
  td.subjcol { width: 30%; max-width: 330px; }
  td.subjcol .rowlink { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
}

/* A message is a bar across the page, under the top bar: green when it went well, red when it did not (issue 42) */
.topsay, .flash.topsay { position: fixed; left: 0; right: 0; top: var(--say-top, 0px); z-index: 70; margin: 0; border-radius: 0; display: flex; align-items: center; justify-content: center;
          gap: 10px; text-align: center; background: #1B7A4B; color: #fff; padding: 11px max(52px, env(safe-area-inset-right, 0px)) 11px max(52px, env(safe-area-inset-left, 0px));
          box-shadow: 0 2px 10px rgba(20, 23, 28, .18); }
.topsay.bad, .flash.topsay.bad { background: #B42318; color: #fff; }
.topsay .flashx { position: absolute; top: 50%; right: max(10px, env(safe-area-inset-right, 0px)); transform: translateY(-50%); color: #fff; }

/* Search and select: a long list, as on Refer MWT (issue 41) */
.pick { width: 100%; min-width: 0; }
.pick-now { display: flex; align-items: center; gap: 8px 10px; min-height: 44px; box-sizing: border-box; padding: 3px 4px 3px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.pick-who { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pick-now .btn { flex: none; min-height: 36px; }
.pick-find { margin-top: 6px; }
.pick-find input { margin: 0; width: 100%; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.pick-list { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-ctl) var(--r-ctl); max-height: 320px; overflow-y: auto; background: var(--surface); }
.pick-item { all: unset; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; width: 100%; padding: 9px 12px; border-top: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.pick-list > :first-child { border-top: 0; }
.pick-item:hover, .pick-item:focus-visible { background: var(--blue-soft); }
.pick-more { padding: 9px 12px; border-top: 1px solid var(--line); }

/* Date boxes and their calendar, as Refer MWT has them (extras.js builds both on a computer; a phone keeps its own
   date wheel). The box shows the date with a calendar mark at its right edge. The calendar has large day squares,
   the month and year across the top, and Today and Clear along the bottom. */
input.datebox { padding-right: 44px; background-repeat: no-repeat; background-position: right 13px center; background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8395' stroke-width='1.8'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.periodrow input.datebox { width: 164px; max-width: 100%; height: 44px; padding-right: 38px; background-position: right 10px center; }
.cal { position: fixed; inset: auto; margin: 0; z-index: 80; width: 328px; padding: 14px 14px 10px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: 0 18px 50px -18px rgb(10 20 50 / .55); font-size: .95rem; overflow: visible; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-size: 1.02rem; font-weight: 700; }
.cal button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; border-radius: 8px; }
.cal .cal-nav { width: 40px; height: 40px; font-size: 1.5rem; line-height: 1; color: var(--slate); border: 1px solid var(--line); }
.cal .cal-nav:hover { background: var(--paper); color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid span { display: grid; place-items: center; height: 30px; font-size: .78rem; color: var(--slate); }
.cal .cal-day { height: 40px; display: grid; place-items: center; }
.cal .cal-day:hover:not(:disabled) { background: var(--blue-soft); }
.cal .cal-day.cal-other { color: var(--slate); opacity: .65; }
.cal .cal-day.cal-today { box-shadow: inset 0 0 0 1.5px var(--blue); }
.cal .cal-day.cal-picked, .cal .cal-day.cal-picked:hover { background: var(--blue); color: #fff; opacity: 1; }
.cal .cal-day:disabled { opacity: .28; cursor: not-allowed; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal .cal-link { color: var(--blue); padding: 6px 4px; }
.cal .cal-link:hover:not(:disabled) { text-decoration: underline; }
.cal .cal-link:disabled { color: var(--slate); opacity: .5; cursor: not-allowed; }

/* The edit pencil on a tab or a day button of the person's own: a small icon with a circle round it (Peter, 12/02/2026) */
.tabx.tabedit, .tabs a.tabx.tabedit { box-sizing: border-box; width: 18px; height: 18px; padding: 0; border-radius: 50%; background: var(--surface); color: var(--blue); border: 1px solid var(--blue);
                                      display: flex; align-items: center; justify-content: center; flex: none; top: -4px; right: -4px; left: auto; box-shadow: none; }
.tabx.tabedit svg { width: 10px; height: 10px; }
.tabx.tabedit:hover { background: var(--blue); color: #fff; }
td.subjcol { width: 24%; }
.bpager { justify-content: space-between; gap: 6px; padding: 4px 0 0; flex-wrap: nowrap; }
.bpager .btn { padding-left: 10px; padding-right: 10px; }
.bcard[hidden] { display: none; }

/* Ask Desk on a ticket: a floating box opened by its button (issue 44). What was asked is at the right in blue,
   what Desk found under it. On a phone it is a sheet over the lower part of the screen. */
.askfloat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; min-width: 0; }
.askjs .askfloat { display: none; position: fixed; z-index: 55; right: 24px; bottom: 24px; width: 420px; max-width: calc(100vw - 16px); height: min(620px, calc(100vh - 110px));
                   box-shadow: 0 18px 50px -12px rgba(10, 20, 50, .45); }
.askjs .askfloat.on { display: flex; }
.askhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 12px 18px; border-bottom: 1px solid var(--line); cursor: move; touch-action: none; user-select: none; }
.askhead h2 { margin: 0; font-size: 1rem; }
.askhead .flashx { position: static; flex: none; }
.askthread { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 14px 16px; min-height: 120px; }
.askq { align-self: flex-end; max-width: 88%; margin: 0; padding: 8px 12px; border-radius: 14px 14px 4px 14px; background: var(--blue); color: #fff; overflow-wrap: anywhere; }
.aska { align-self: flex-start; max-width: 100%; margin: 0; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--soft); color: var(--ink); overflow-wrap: anywhere; }
.aska .body { margin: 0; white-space: pre-wrap; }
.askrefs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.askrefs .chip { font-size: .8125rem; padding: 4px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.askstarts { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.askstarts .btn { width: auto; white-space: normal; text-align: left; height: auto; min-height: 36px; }
.askfoot { border-top: 1px solid var(--line); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.askfoot textarea { min-height: 56px; width: 100%; }
@media (max-width: 640px) {
  .askjs .askfloat { left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: min(78vh, 640px); border-radius: var(--r-panel) var(--r-panel) 0 0; z-index: 65;
                     padding-bottom: env(safe-area-inset-bottom, 0px); }
  .askhead { cursor: default; }
}

/* A black button: closing a ticket (issue 46). It sits at the far left of its row unless Delete is there. */
.btn.dark { background: #000; border-color: #000; color: #fff; }
@media (prefers-color-scheme: dark) { .btn.dark { border-color: var(--line); } }
.btns:has(.btn:not(.quiet):not(.danger):not(.dark)) > .dark:last-child, .btns:has(.btn:not(.quiet):not(.danger):not(.dark)) > form:has(.dark):last-child { margin-right: auto; }

/* The box for photos or files (issue 45): roomy, dashed, with a button, and the names of what was chosen */
.filehidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label:has(> .filedrop) { position: relative; }
.filedrop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 22px 16px; border: 1.5px dashed var(--dash, var(--line)); border-radius: var(--r-ctl);
            background: var(--paper); color: var(--slate); cursor: pointer; text-align: center; transition: border-color .12s, background .12s; }
.filedrop:hover, .filedrop.over { border-color: var(--blue); background: var(--blue-soft); }
.filedrop > svg { width: 22px; height: 22px; flex: none; }
.filedrop .btn { pointer-events: none; }
.filedrop .filenames { flex: 1 1 100%; color: var(--ink); overflow-wrap: anywhere; }
.filedrop.has { border-style: solid; }

/* The pencil's circle shows whole (issue 43): a row of tabs that scrolls sideways would cut it at its edge, so on a
   computer the row does not clip, and on a phone the pencil sits just inside the tab. */
@media (min-width: 641px) { .tabs:has(.tabedit) { overflow: visible; } }
@media (max-width: 640px) { .tabx.tabedit, .tabs a.tabx.tabedit { top: 0; right: 0; } }
@media (max-width: 640px) { .tabs .hasx:has(.tabedit) > a, nav.seg.fit .hasx:has(.tabedit) > a { padding-right: 22px; } }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.facts b { overflow-wrap: anywhere; }
.btn.dark:hover { background: #26282e; border-color: #26282e; color: #fff; }

/* One search box over a list: the search mark inside it at the left */
.searchone { position: relative; display: block; width: 100%; max-width: 520px; }
.searchone > svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--slate); pointer-events: none; }
.searchone input { padding-left: 40px; width: 100%; }

/* The round button at the corner of a ticket that opens Ask Desk about it (issue 50). Put away while the box is open. */
.asklaunch { display: none; }
.askjs .asklaunch { position: fixed; z-index: 54; right: 24px; bottom: 24px; width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center;
                    justify-content: center; box-shadow: 0 10px 26px -8px rgba(31, 95, 214, .7); transition: transform .12s, background .12s; }
.askjs .asklaunch:hover { background: var(--blue-dark); transform: scale(1.06); }
.asklaunch svg { width: 26px; height: 26px; }
.askjs .asklaunch:has(+ .askfloat.on) { display: none; }
@media (max-width: 640px) { .askjs .asklaunch { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } html.typing .asklaunch { display: none; } }
@media print { .asklaunch, .askfloat { display: none !important; } }
form.pager { flex-direction: row; width: auto; } form.pager select { width: auto; }

/* The email designer, as Refer MWT has it: the form at the left, the picture of the email at the right */
.designer { display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); gap: 16px; align-items: start; width: 100%; }
main:has(.designer) { max-width: 1480px; }
.designview { position: sticky; top: 76px; overflow: hidden; }
.designframe { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
.designgroup { border: 0; padding: 0; margin: 0 0 6px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.designgroup legend { font-weight: 700; padding: 0; margin-bottom: 6px; color: var(--ink); }
.designgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.designgrid .wide, .designgrid .check { grid-column: 1 / -1; }
.designgrid .check { flex-direction: row; align-items: center; gap: 8px; }
.designgrid .check input { width: auto; height: auto; }
.colourrow { display: flex; gap: 6px; }
.colourrow input[type=color] { flex: none; width: 48px; height: 44px; padding: 2px; cursor: pointer; }
.colourrow input:not([type=color]) { min-width: 0; }
.designside h2 { margin: 6px 0 0; }
.designside form { gap: 14px; }
.blocklist { display: flex; flex-direction: column; gap: 10px; }
.blockcard { border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--r-ctl); padding: 10px 12px 12px; background: var(--paper); display: flex; flex-wrap: wrap; gap: 10px; }
.blockcard > label, .blockcard > .blockhead, .blockcard > .linkrow { flex: 1 1 100%; }
.blockhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); }
.blockacts { display: flex; gap: 4px; }
.blockacts .btn { min-width: 36px; padding: 0 8px; }
.blockcard .blockpick { flex: 1 1 calc(50% - 6px); min-width: 0; }
.linkrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.linkrow input { height: 38px; font-size: .875rem; min-width: 0; }
@media (max-width: 520px) { .linkrow { grid-template-columns: 1fr; } }
.blockadd { display: flex; gap: 8px; align-items: flex-end; }
.blockadd label { flex: 1; }
.blockadd .btn { flex: none; }
.varlist { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.varchip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; color: var(--ink); }
.varchip:hover { border-color: var(--blue); color: var(--blue); }
details.fold > summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 6px 0; }
@media (max-width: 900px) { .designer { grid-template-columns: 1fr; } .designview { position: static; } }
/* Before Email Can Go Out: what is done has a green tick, what is left has its number */
ul.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.checks li { display: flex; gap: 10px; align-items: flex-start; }
ul.checks .mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8125rem; background: var(--soft); color: var(--slate); }
ul.checks li.ok .mark { background: var(--ok); color: #fff; }

/* The question mark inside a box, beside its heading (issue 57) */
.helpbtn.inbox { width: 22px; height: 22px; font-size: .75rem; margin-left: 8px; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.helpbtn[hidden] { display: none; }
/* Pick one or type one */
.combo { position: relative; display: block; width: 100%; }
.combo input { width: 100%; padding-right: 40px; }
.comboarrow { all: unset; position: absolute; top: 0; right: 0; width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--slate); }
.comboarrow svg { width: 18px; height: 18px; }
.combolist { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: 0 10px 28px -10px rgba(10, 20, 50, .35); display: block; }
.combolist[hidden] { display: none; }
.combolist .pick-item.on { background: var(--blue-soft); }
.ticketfacts { padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }

/* The Ask Desk button sits at the top right corner of a ticket, under the top bar, and pulses twice when the page
   opens (issue 61). The box opens under it. */
.askjs .asklaunch { top: calc(var(--say-top, 61px) + 16px); bottom: auto; right: 24px; animation: askpulse 1.1s ease-out 0.5s 2; }
@keyframes askpulse { 0% { box-shadow: 0 0 0 0 rgba(31, 95, 214, .55); transform: scale(1); } 35% { transform: scale(1.12); } 100% { box-shadow: 0 0 0 20px rgba(31, 95, 214, 0); transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .askjs .asklaunch { animation: none; } }
.askjs .askfloat { top: calc(var(--say-top, 61px) + 16px); bottom: auto; }
@media (max-width: 640px) {
  .askjs .asklaunch { top: calc(var(--say-top, 61px) + 10px); bottom: auto; right: 14px; width: 46px; height: 46px; }
  .askjs .askfloat { top: auto; bottom: 0; }
}

/* Editing a person's own tab or day button is off the button (issue 63): a round pencil beside the +, which edits
   whichever one is selected (issue 69). */
.tabadd.editpen { color: var(--slate); cursor: pointer; padding: 0; font: inherit; }
.tabadd.editpen svg { width: 15px; height: 15px; }
.periodrow .tabadd.editpen, .periodrow .adddays { align-self: flex-end; }
.periodrow .tabadd.editpen { height: 36px; margin-bottom: 4px; }

/* Flag an Issue: a tidier box (issue 70). Its heading is the handle it is dragged by, with an x; what was pointed at is
   a quiet line; the photo is the same roomy box every file field has, and shows the picture chosen. */
dialog.issueask { width: min(94vw, 520px); padding: 20px; }
dialog.issueask form { gap: 16px; }
dialog.issueask .movehandle { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -20px -20px 0; padding: 12px 12px 12px 20px; font-size: 1.0625rem; }
dialog.issueask .movehandle .flashx { position: static; flex: none; }
dialog.issueask .issuewhat { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ink); overflow-wrap: anywhere; }
dialog.issueask .issuewhat .tag { flex: none; }
dialog.issueask .issuewhat span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
dialog.issueask textarea { min-height: 110px; }
dialog.issueask .filedrop { padding: 16px; }
dialog.issueask .row { margin-top: 2px; }
.filedrop .filenames { display: flex; align-items: center; justify-content: center; gap: 10px; }
.filethumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
dialog.issueask form { align-items: stretch; }
dialog.issueask { max-height: calc(100dvh - 24px); overflow-y: auto; }
dialog.issueask .issuewhat, dialog.issueask .movehandle { align-self: stretch; }

/* Email settings, laid out as Refer MWT's are (issue 71) */
.panel.attention { border-color: var(--warn); background: var(--warn-soft); }
.panel.attention h2, .panel.attention li { color: var(--ink); }
ul.plainlist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; width: 100%; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.senderline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.senderline .inlineswitch { width: auto; margin-left: auto; gap: 0; }
.tag.warn { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.copyfact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.copyfact > span:first-child { grid-column: 1 / -1; }
.copyfact code { font-size: .82rem; overflow-wrap: anywhere; min-width: 0; color: var(--ink); }
.copyfact > span + span { grid-column: 1 / -1; }

/* List or Board at the left and the dates at the right of one line (issue 74) */
.toprow { display: flex; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; width: 100%; }
.toprow > .tabs { align-self: flex-end; }
.toprow > .periodrow { width: auto; margin-left: auto; justify-content: flex-end; }
@media (max-width: 640px) { .toprow > .periodrow { width: 100%; margin-left: 0; justify-content: flex-start; } }
/* Filters, folded, as Refer MWT has them (issue 73) */
details.filters { width: 100%; }
details.filters > summary { cursor: pointer; color: var(--slate); padding: 4px 0; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.filters > summary::-webkit-details-marker { display: none; }
details.filters > summary::before { content: "\25B8"; display: inline-block; transition: transform .15s; }
details.filters[open] > summary::before { transform: rotate(90deg); }
.filtergrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 6px; }
.filtergrid .pick-find { position: absolute; z-index: 30; left: 0; right: 0; margin-top: 4px; box-shadow: 0 10px 28px -10px rgba(10, 20, 50, .35); border-radius: var(--r-ctl); }
.filtergrid label { position: relative; }
.pick-find input[type=search] { height: 40px; padding: 0 12px; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.filtergrid .pick-find { background: var(--surface); }

/* Delete on a ticket is a quiet red word, not a red button (issue 81). It keeps its place at the far left. */
.linkbtn.wordbtn { min-height: 44px; padding: 0 6px; color: #D92D20; text-decoration: none; }
.linkbtn.wordbtn:hover, .linkbtn.wordbtn:focus-visible { text-decoration: underline; }
@media (prefers-color-scheme: dark) { .linkbtn.wordbtn { color: #F08176; } }
.btns > form:has(.wordbtn) { display: flex; align-items: center; }

/* On a phone or a narrow window the ticket page is one column, and the Ticket box sits right under Details, before
   Activity (issue 82). The two columns give up their boxes to one list so that they can be put in that order. */
@media (max-width: 900px) {
  .two.ticketpage { display: flex; flex-direction: column; gap: 16px; }
  .two.ticketpage > .col { display: contents; }
  .two.ticketpage .panel { order: 4; width: 100%; max-width: none; box-sizing: border-box; align-self: stretch; }      /* every box the full width (issue 85) */
  .two.ticketpage #details { order: 1; }
  .two.ticketpage #ticketbox { order: 2; }
  .two.ticketpage #reply { order: 3; }
}

/* A drafted reply stands apart from what Desk says about it (issue 84): its own box in the blue of a reply, with its
   name over it, a clear gap above, and its buttons under a line. */
.askdraft { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--blue); border-left: 1px solid var(--blue); border-radius: 12px; background: var(--blue-soft); color: var(--ink); }
.askdraftlabel { display: block; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 6px; }
.askdraft .body { white-space: pre-wrap; }
.askdraft .btns { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--blue-line, var(--line)); }

/* A quiet word is small and not bold (issue 87): Delete on a ticket */
.linkbtn.wordbtn { font-weight: 400; font-size: .875rem; }
/* A name, store, team or category that leads to its tickets (issue 86): the colour of the text it sits in, underlined when pointed at */
.ticketfacts b a, a.quietlink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--slate); }
.ticketfacts b a:hover, a.quietlink:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* Every button in a row of buttons is the same height in every browser (issue 88): a button, a link drawn as a button
   and a button inside its own small form are all held to 44px, with nothing of the browser's own added. */
.btns { align-items: center; }
.btns .btn, dialog .row .btn { box-sizing: border-box; height: 44px; min-height: 44px; max-height: 44px; line-height: 1.2; margin: 0; -webkit-appearance: none; appearance: none; }
.btns .btn.sm, dialog .row .btn.sm { height: 34px; min-height: 34px; max-height: 34px; }
.btns > form { display: flex; flex-direction: row; align-items: center; gap: 0; margin: 0; height: 44px; }

/* On a phone each column of the board stops in the middle of the screen when it is swiped to (issue 89): the board
   runs edge to edge, each column is most of the width, and a column lands with an even sliver of its neighbours at
   both sides. */
@media (max-width: 760px) {
  .board { grid-template-columns: repeat(4, 84vw); gap: 12px; scroll-snap-type: x mandatory; scroll-padding-inline: 8vw;
           margin-inline: -20px; width: calc(100% + 40px); padding-inline: 8vw; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
  .bcol { scroll-snap-align: center; scroll-snap-stop: always; }
}
.askpicks { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.askpicks .btn { width: auto; }

/* Thumbs under an answer of Ask Desk (issue 91) */
.fb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.fbbtn { all: unset; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--slate); }
.fbbtn svg { width: 17px; height: 17px; }
.fbbtn:hover:not([disabled]), .fbbtn:focus-visible { background: var(--soft); color: var(--ink); }
.fbbtn[disabled] { cursor: default; opacity: .45; }
.fbbtn.on { opacity: 1; color: var(--ok); }
.fbbtn.on.bad { color: #D92D20; }
.fbwhy { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fbchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fbchip { all: unset; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .8125rem; cursor: pointer; color: var(--ink); background: var(--surface); }
.fbchip:hover { border-color: var(--blue); }
.fbchip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.fbwhy input { width: 100%; }

/* 93: the two round + buttons are one size everywhere, the pencils with them */
.tabadd, .adddays > summary.tabadd { width: 36px; height: 36px; }
.adddays { height: 44px; display: flex; align-items: center; }
/* 94: List and Board are not squeezed on a phone */
@media (max-width: 640px) { .toprow > .tabs { align-self: flex-start; } .toprow > .tabs a { flex: none; padding: 8px 20px; } }

/* The list of issues (issue 97): what was wrong keeps to two lines, as a ticket's subject does */
@media (min-width: 761px) { .tbl td.subjcol { max-width: 420px; } }

/* Smaller and lighter type across Desk (issue 98: "reduce the font size and make it less of a heavy font"): one size
   down everywhere, the light weight Refer MWT uses for running text, and headings and buttons a step lighter than
   they were. A box that is typed in keeps 16px, or an iPhone zooms the page when it is tapped. */
html { font-size: 93.75%; }
body { font-size: 15px; font-weight: 300; }
h1, h2, h3, th, legend, .brand, .subj, .cal-head b, .designgroup legend, details.fold > summary { font-weight: 600; }
.btn, .helpbtn, .linkbtn, .choice, .mini, .send, .chip.cat, .chip b, .strip .grow, .chatscreen .lbl, .sys, .tabbar a, .seg span, .improve .linkbtn { font-weight: 500; }
.linkbtn.wordbtn { font-weight: 300; }
h1 { font-size: 1.6rem; }
input, select, textarea { font-size: 16px; font-weight: 300; }

/* On a phone a row of a list is a card. Its facts sit two to a line, so a card is about half as tall (issue 67: "You
   have a lot of space inside these boxes"). What names the row, a subject and the row's buttons keep a full line.
   (Put back in Build 224: an edit for issue 69 had cut this block out of the file by mistake.) */
@media (max-width: 640px) {
  .tbl.cards tr:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 14px; padding: 10px 16px; align-items: start; }
  .tbl.cards td { overflow-wrap: anywhere; min-width: 0; }
  .tbl.cards td:first-child, .tbl.cards td.acts, .tbl.cards td.subjcol, .tbl.cards td.wide, .tbl.cards td[colspan] { grid-column: 1 / -1; }
  .tbl.cards td.subjcol::before { content: none; }
  .tbl.cards td, .tbl.cards td:nth-child(2) { white-space: normal; min-width: 0; width: auto; max-width: none; }
  .tbl.cards.rows td:nth-child(2) { grid-column: 1 / -1; }                      /* the subject of an archived ticket */
  .tbl.cards td.subjcol .rowlink { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* The floating Ask Desk box drawn as the ticket chat is (issue 104) */
.askfloat { background: var(--paper); }
.askfloat .askhead { background: var(--surface); border-radius: var(--r-panel) var(--r-panel) 0 0; gap: 6px; }
.askfloat .askhead h2 { margin-right: auto; }
.askfloat .askclear { width: auto; margin: 0; }
.askfloat .askclear .linkbtn { text-decoration: none; font-size: .8125rem; padding: 0 6px; }
.askfloat .thread { padding: 12px 14px; gap: 10px; }
.askfloat .thread::before { content: none; }
.askfloat .row { max-width: 94%; align-items: flex-start; flex-direction: row; }
.askfloat .me { max-width: 86%; }
.askfloat .bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.askfloat .bubble.askhello { color: var(--slate); font-size: .875rem; }
.askfloat .inputbar { margin: 4px 10px 10px; }
.askfloat .inputbar textarea { width: 100%; min-height: 40px; }
.askfloat .starts .start { width: auto; font: inherit; cursor: pointer; }
.askfloat .askdraft { margin-top: 0; }
@media (max-width: 640px) { .askfloat .inputbar { margin-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); } }
.askfloat .askq, .askfloat .aska { background: none; padding: 0; border-radius: 0; margin: 0; color: inherit; }
.askfloat .aska { align-self: flex-start; }
.askfloat .aska .body { white-space: pre-wrap; }

/* What narrows a list sits inside the list's own box, over it (issue 106) */
.panelbar { padding: 16px 20px 4px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.panelbar p { margin: 0; }
.panelbar details.filters { padding-bottom: 6px; }
@media (max-width: 640px) { .panelbar { padding: 12px 16px 2px; } }

/* The row at the top of the ticket list's box (issue 107): search, Columns and Export at the left, the views at the right */
.listbar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.listbar .toolslot { display: flex; align-items: center; min-width: 0; }
.listbar .tabsrow { margin-left: auto; width: auto; max-width: 100%; }
.tabletools.inslot, .panel.flush .tabletools.inslot { padding: 0; }
.tabletools.inslot .toolsend { margin-left: 0; }
@media (max-width: 640px) { .listbar .tabsrow { margin-left: 0; width: 100%; order: -1; } .listbar .toolslot { width: 100%; } .tabletools.inslot { width: 100%; } .tabletools.inslot .toolsend { margin-left: auto; } }
.askfloat .askline { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.askfloat .askline textarea { flex: 1; min-width: 0; }
.askfloat .inputbar { padding: 8px 8px 8px 10px; }
.askfloat .askline .sendbtn { width: 40px; height: 40px; border-radius: 20px; }

/* Links under an answer are easy to press on a phone (issue 111): one to a line, as tall as a button */
@media (max-width: 640px) {
  .askrefs { flex-direction: column; gap: 8px; }
  .askrefs .chip { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; font-size: .9375rem; border-radius: 12px; white-space: normal; }
  .chatscreen .chips .chip, .chatscreen .chips a.chip { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; font-size: .9375rem; }
  .chatscreen .card.added .chips { flex-direction: column; }
  .askfloat .starts .start, .starts .start, .choices .choice { min-height: 44px; }
}
@media (max-width: 640px) { .askrefs .chip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 28px; } }
/* Only the question box and its send button, on the Ask Desk page too (issue 112) */
.inputbar .askline { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.inputbar .askline textarea { flex: 1; min-width: 0; }
/* The List and Board switch has room for its words on a phone on the board page too (issue 115) */
@media (max-width: 640px) { nav.tabs[aria-label="Layout"] { align-self: flex-start; flex: none; width: auto; } nav.tabs[aria-label="Layout"] a { flex: none; padding: 8px 20px; } }

/* On a phone card the status is the chip at the top right corner, without the word Status (issue 118) */
@media (max-width: 640px) {
  .tbl.cards tr { position: relative; }
  .tbl.cards td[data-l="Status"] { position: absolute; top: 10px; right: 16px; padding: 0; width: auto; }
  .tbl.cards td[data-l="Status"]::before { content: none; }
  .tbl.cards td:first-child { padding-right: 130px; }
}
@media (max-width: 640px) {
  /* a row with more than one tag in its status (People) keeps them in the card, where they fit */
  .tbl.cards td[data-l="Status"]:has(.tag ~ .tag) { position: static; padding: 2px 0; }
  .tbl.cards td[data-l="Status"]:has(.tag ~ .tag)::before { content: attr(data-l) ": "; }
  .tbl.cards tr:has(td[data-l="Status"] .tag ~ .tag) td:first-child, .tbl.cards tr:not(:has(td[data-l="Status"])) td:first-child { padding-right: 0; }
}

/* A search and select for several (issue 119): what is selected as tags with an x, and a box to add another */
.multipick { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.multichosen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.multitag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .875rem; }
.multix { all: unset; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--slate); font-size: 1.1rem; line-height: 1; }
.multix:hover, .multix:focus-visible { background: var(--soft); color: #D92D20; }
.multipick .combo input { padding-right: 12px; }
.ticks[hidden] { display: none; }

/* The field identifier under a name that can be changed (issue 121): quiet, small, in the type a code is written in */
.identifier { font-size: .8125rem; color: var(--slate); }
.identifier code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; color: var(--ink); background: var(--soft); padding: 1px 6px; border-radius: 6px; user-select: all; }
.btns > .wordbtn { margin-right: auto; }      /* a quiet Delete word that is itself in the row sits at the far left */

/* On a phone card of People, Edit is at the left and View As and Manage As are at the right (issue 122) */
@media (max-width: 640px) {
  .tbl.cards td.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .tbl.cards td.acts > a.btn:first-child + form { margin-left: auto; }
  .tbl.cards td.acts > form:first-child { margin-left: auto; }
}

/* A tag that says something went wrong (a resource that could not be copied) */
.tag.bad { color: var(--bad); border-color: var(--bad); }

/* Areas and Markets are as wide as the list of stores over them, and an area is one row: its name, market, manager and
   Save side by side (issue 123). The identifier sits under the name, so the row lines up along the top. */
.boxes.full { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .rowform.oneline { flex-wrap: nowrap; }
  .rowform.oneline > .btn { flex: none; }
}

/* Two buttons of one small form on a row of a list sit side by side (Resources) */
.inlineform.side { flex-direction: row; align-items: center; gap: 6px; }
@media (min-width: 641px) { .tbl td.acts:has(.inlineform.side) { white-space: nowrap; } .tbl td.acts:has(.inlineform.side) > a.btn { margin-right: 6px; } }

/* Something a row of a form only says (how many stores an area has, its identifier): a small heading with the fact
   under it, as tall as the boxes beside it (issue 127) */
.rowfact { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; min-width: 64px; color: var(--slate); font-size: .875rem; }
.rowfact.wide { min-width: 150px; }
.rowfact b { display: flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 1rem; }
.rowfact code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; }

/* Roles as one table: a tick or a dash under each role, centred; how many people have the role under its name */
.roletable th .rolecount { display: block; }
.roletable td.rolehas, .roletable th:nth-child(n+3) { text-align: center; }
.roletable td.rolehas .tick { color: var(--dash); }
.roletable td.rolehas.yes .tick { color: var(--ok); }
.tbl td.wide { white-space: normal; min-width: 220px; }

.bubble.looked { white-space: pre-line; }

/* Server health: each measure is a row of blocks lit from the left, an equalizer laid on its side (Peter, 12/03/2026) */
.meter { display: grid; gap: 6px; padding: 10px 0; }
.meter + .meter { border-top: 1px solid var(--line); }
.meterhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--slate); font-size: .875rem; }
.meterhead b { color: var(--ink); }
.eq { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 22px; }
.eq i { background: var(--track); border-radius: 2px; }
.eq i.on { background: var(--ok); }
.eq i.on.warm, .meter.warn .eq i.on { background: var(--eq-yellow); }
.eq i.on.hot, .meter.bad .eq i.on { background: var(--eq-red); }
:root { --eq-yellow: #E5B100; --eq-red: #D93025; }

/* Outbound requests: what was written keeps its lines; a photo in a row of a list is small */
.plainbody { white-space: pre-line; margin: 12px 0 0; }
.tbl td .thumb { display: inline-block; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; margin: 0 4px 4px 0; vertical-align: middle; }
.tbl td .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tabs .badge { margin-left: 6px; }

/* A page that holds a list is as wide as the window, however wide that is, with the page's own margins kept at the
   sides (issue 147). A phone is not touched: it is already as wide as it goes. */
main:has(table.tbl), main:has(.board) { max-width: none; }
/* A status that says more when rested on or tapped (the closure type and resolution of a closed request, issue 151) */
.tag[data-tip] { cursor: help; }

/* List or Board at the far end of the row that starts a request */
.resultbar .tabs.pushright { margin-left: auto; }
.toprow > .tabsrow { align-self: flex-end; }

/* Notifications: a kind of news to a row, with a switch for Push and a switch for Email at its end (issue 155) */
.notifyrow { display: grid; grid-template-columns: minmax(0, 1fr) 62px 62px; gap: 6px 18px; align-items: center; width: 100%; }
.notifyrow.head { color: var(--slate); font-size: .8125rem; }
.notifyrow.head span { text-align: center; }
.notifyrow .help { margin: 2px 0 0; }
.notifyrow .switch { justify-self: center; width: auto; }

/* How far the reading of a source has got (Admin, Data Sources): a thin bar under the step, the file in hand under it */
.reading { margin-top: 6px; min-width: 180px; max-width: 320px; display: flex; flex-direction: column; gap: 4px; }
.reading progress { width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--track); overflow: hidden; appearance: none; -webkit-appearance: none; display: block; }
.reading progress::-webkit-progress-bar { background: var(--track); }
.reading progress::-webkit-progress-value { background: var(--blue); transition: width .5s; }
.reading progress::-moz-progress-bar { background: var(--blue); }
.reading div { overflow-wrap: anywhere; }

/* The search of a request list with nothing in it has no headings to put boxes under, so its one box shows at every width */
@media (min-width: 641px) { .tabletools .one.all:not([hidden]) { display: block; } }
/* A request list is as wide as the window with nothing in it too */
main:has(.listbar) { max-width: none; }

/* A page with a list is as wide as the window, less a twentieth of it at each side (issue 162: "5% margin on both
   sides"). A phone keeps its own narrow margins. */
@media (min-width: 900px) { main:has(table.tbl), main:has(.board), main:has(.listbar) { padding-left: max(5vw, env(safe-area-inset-left, 0px)); padding-right: max(5vw, env(safe-area-inset-right, 0px)); } }
