/* The phone app layout, used below 761px and inside the desktop phone preview.
   Made for someone standing at a job site: large targets, one column, next job first. */
@media (max-width: 760px) {
  .app-body { --tabs: calc(60px + env(safe-area-inset-bottom, 0px)); font-size: 16px; }
  /* Inside the preview it should feel like a phone: dragging moves the screen instead of selecting text */
  .is-embed { user-select: none; -webkit-user-select: none; }
  .is-embed :is(input, textarea) { user-select: text; -webkit-user-select: text; }
  .app-body.is-embed { --bar: 0px; }
  .is-embed .demo-bar { display: none; }
  html:has(.is-embed) { scrollbar-width: none; }
  html:has(.is-embed)::-webkit-scrollbar { display: none; }

  /* Title bar */
  .m-bar { position: sticky; top: var(--bar); z-index: 12; display: flex; align-items: center; gap: 6px; min-height: 60px; padding: 8px 10px 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .m-bar h1, .m-bar .m-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 25px/1.2 var(--head); }
  .m-bar > div { display: flex; gap: 2px; }
  .m-bar > div:empty { display: none; }
  .m-app--sub .m-bar { padding-left: 6px; }
  .m-app--sub .m-bar h1, .m-app--sub .m-bar .m-title { font-size: 21px; }
  .m-icon { position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
  .m-icon:active { background: var(--soft); }
  .m-icon .icon { width: 22px; height: 22px; }
  .m-icon .dot { top: 2px; right: 1px; }

  .app-body .content.m-content { max-width: none; padding: 14px 14px calc(var(--tabs) + 28px); }
  .app-body .m-app--fab .content.m-content { padding-bottom: calc(var(--tabs) + 96px); }

  /* Bottom tab bar and add button */
  .m-tabs { position: fixed; z-index: 14; left: 0; right: 0; bottom: 0; height: var(--tabs); padding: 0 4px env(safe-area-inset-bottom, 0px); background: var(--surface); border-top: 1px solid var(--line); }
  .m-tabs ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 100%; }
  .m-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; padding: 6px 0; color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
  .m-tabs i { position: relative; display: grid; place-items: center; width: 44px; height: 25px; border-radius: 99px; font-style: normal; }
  .m-tabs i .icon { width: 18px; height: 18px; }
  .m-tabs i .dot { top: -4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10.5px; line-height: 16px; }
  .m-tabs a.is-on { color: var(--accent-dark); font-weight: 700; }
  .m-tabs a.is-on i { background: var(--accent-tint); }
  .m-fab { position: fixed; z-index: 13; right: 16px; bottom: calc(var(--tabs) + 16px); display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; box-shadow: 0 12px 24px -8px rgba(90, 52, 4, .7); cursor: pointer; }
  .m-fab .icon { width: 26px; height: 26px; }
  .m-fab:active { transform: scale(.95); }

  /* Screens shared with the desktop layout: the title bar already names them */
  .m-content .page-head { gap: 10px; }
  .m-content .page-head > div:first-child > h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .m-content .page-head p { margin: 0; font-size: 15px; }
  .m-content .page-head .page-actions:not(:has(.filter)) { display: none; }
  .m-content .page-head .page-actions, .m-content .page-head .filter { width: 100%; }
  .m-content .back { display: none; }
  .m-content .record-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .m-content .record-head h1 { font-size: 24px; line-height: 1.2; }
  .m-content .record-head p { font-size: 15px; }
  .m-content .actionbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-content .actionbar .btn:first-child:last-child, .m-content .actionbar .btn-primary:first-child { grid-column: 1 / -1; }
  .m-content .actionbar > .btn-primary:first-child ~ :last-child:nth-child(even), .m-content .actionbar > :first-child:not(.btn-primary) ~ :last-child:nth-child(odd) { grid-column: 1 / -1; }

  .btn { min-height: 48px; font-size: 15.5px; }
  .btn-small { min-height: 44px; font-size: 14.5px; }
  .badge { font-size: 13px; }
  .card { padding: 14px; border-radius: 12px; }
  .card-flush { padding: 0; }
  .card-head a { display: inline-flex; align-items: center; min-height: 36px; }
  .columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .column { gap: 12px; }
  .content .segmented { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .segmented button { min-height: 44px; padding: 0 8px; }
  .content > .m-list { margin-top: 12px; }
  .list-count { font-size: 14px; }

  /* Filters */
  .filterbar { gap: 10px; }
  .searchfield { flex: 1 1 100%; max-width: none; min-height: 48px; }
  .searchfield input { height: 46px; font-size: 16px; }
  .m-content .tabs { margin-inline: -14px; padding: 2px 14px; max-width: none; width: calc(100% + 28px); gap: 8px; background: none; border-radius: 0; }
  .m-content .tabs .tab { min-height: 42px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink); box-shadow: none; }
  .m-content .tabs .tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
  .m-content .tabs .tab.is-active .pill { background: #fff; color: var(--ink); }
  .filter-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .filter-selects .filter:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .filter select { width: 100%; min-height: 46px; font-size: 16px; }
  .filter-inline select { min-height: 44px; }

  /* Lists */
  .m-list { display: block; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .m-list > li + li { border-top: 1px solid var(--line); }
  .m-card { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .m-card--list { padding: 6px 14px; }
  .m-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
  .m-row:active { background: var(--accent-tint); }
  .m-row-main { display: grid; flex: 1; min-width: 0; line-height: 1.38; }
  .m-row-main strong { font-size: 16px; font-weight: 600; }
  .m-row-main > span { color: var(--ink-2); font-size: 14.5px; }
  .m-row-main > span .sku { margin-right: 4px; color: var(--ink); }
  .m-row-main small { margin-top: 2px; color: var(--ink-2); font-size: 13.5px; }
  .m-row-main small .late { font-size: inherit; }
  .m-row-end { display: grid; justify-items: end; gap: 2px; flex: none; max-width: 44%; text-align: right; }
  .m-row-end small { color: var(--ink-2); font-size: 13px; }
  .m-qty { font: 700 24px/1.1 var(--head); font-variant-numeric: tabular-nums; }
  .m-flag { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
  .m-flag .icon { width: 14px; height: 14px; }
  .flag-low { color: var(--warn); }
  .flag-out { color: var(--danger); }
  .m-count { padding: 0 2px 8px; color: var(--ink-2); font-size: 14px; }
  .m-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; margin-top: 4px; }
  .m-group-head h2 { font: 700 20px/1.2 var(--head); }
  .m-group-head a { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; font-weight: 600; text-decoration: none; }
  .m-list .queue > li > a { padding: 12px 14px; }
  .m-list .queue > li:first-child > a { padding-top: 12px; }

  /* Home */
  .m-lookup { display: grid; gap: 6px; }
  .m-lookup label { font: 700 17px/1.2 var(--head); }
  .m-lookup > div { display: flex; gap: 8px; }
  .m-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; min-height: 50px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink-2); }
  .m-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
  .m-search input { flex: 1; min-width: 0; width: 100%; height: 48px; border: 0; background: none; font-size: 16px; color: var(--ink); outline: none; text-overflow: ellipsis; }
  .m-lookup .btn { min-height: 50px; padding: 0 18px; }
  .m-bigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .m-big { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; min-height: 76px; padding: 12px; background: var(--navy); border-radius: 12px; color: #fff; text-decoration: none; }
  .m-big span { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--accent); }
  .m-big .icon { width: 23px; height: 23px; }
  .m-big strong { align-self: end; font: 700 21px/1.1 var(--head); }
  .m-big small { align-self: start; font-size: 13.5px; color: #cfd0d3; }
  .m-big:active { background: #3a3d42; }
  .m-hero { position: relative; display: grid; padding: 16px 44px 16px 18px; border-radius: 12px; background: var(--navy); color: #fff; text-decoration: none; }
  .m-hero span, .m-hero small { color: #cfd0d3; font-size: 14.5px; }
  .m-hero strong { font: 700 42px/1.15 var(--head); font-variant-numeric: tabular-nums; }
  .m-hero small { line-height: 1.5; }
  .m-hero > .icon { position: absolute; right: 14px; top: 50%; margin-top: -11px; width: 22px; height: 22px; }
  .m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .m-tile { display: grid; align-content: start; gap: 2px; padding: 10px 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
  .m-tile strong { font: 700 28px/1.15 var(--head); }
  .m-tile span { color: var(--ink-2); font-size: 13.5px; line-height: 1.3; }
  .m-card--list .empty { padding-block: 16px; }
  .approve-actions { width: 100%; padding-left: 46px; }
  .approve-actions .btn { flex: 1; }
  .alert-list > li > a { flex-basis: 100%; }
  .alert-list > li > div { justify-content: space-between; width: 100%; }
  .feed > li { gap: 10px; }
  .feed small { font-size: 13px; }
  .doc-list > li > a { min-height: 56px; }
  .lane { flex-wrap: wrap; }

  /* Search and More */
  .m-search--wide { margin-bottom: 14px; }
  .m-row strong.sku { font-size: 15px; }
  .m-me { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .m-me .avatar { width: 52px; height: 52px; font-size: 17px; }
  .m-me div { display: grid; }
  .m-me strong { font-size: 19px; }
  .m-me div span { color: var(--ink-2); font-size: 14.5px; }
  .m-menu :is(a, button) { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; background: none; color: var(--ink); font-size: 16.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
  .m-menu :is(a, button):active { background: var(--accent-tint); }
  .m-menu span { flex: 1; }
  .m-menu b { min-width: 22px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 13px; line-height: 22px; text-align: center; }
  .m-menu .icon:last-child { color: var(--ink-2); }

  /* Item, document and count screens */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitecards-3, .sitecards-2, .sitecards-1 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sitecard dl, .sitecards-1 dl, .sitecards-2 dl, .sitecards-3 dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .elsewhere { font-size: 15px; }
  .elsewhere strong { width: 100%; }
  .tally { font-size: 15px; text-align: left; }
  .steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 10px 6px; }
  .steps li, .steps li + li { flex-direction: column; justify-content: flex-start; gap: 4px; text-align: center; }
  .steps li + li::before { display: block; position: absolute; top: 13px; right: calc(50% + 18px); width: calc(100% - 32px); min-width: 0; margin: 0; }
  .steps span { font-size: 13px; line-height: 1.2; justify-items: center; overflow-wrap: anywhere; }
  .steps small { font-size: 13px; }
  .line-id { gap: 10px; }
  .line-id strong { font-size: 16px; line-height: 1.3; }
  .bin { min-width: 76px; padding: 8px 6px; font-size: 14.5px; }
  .line-money { margin-left: auto; }
  .line-facts { gap: 2px 16px; font-size: 15px; }
  .line-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .line-inputs .stepper > div { width: 100%; }
  .line-inputs .stepper:only-child { grid-column: 1 / -1; }
  .stepper button { width: 48px; flex-basis: 48px; }
  .stepper input { height: 52px; font-size: 22px; }
  .line-inputs > .btn { grid-column: 1 / -1; }
  .line-inputs > [data-act="pick"] { grid-column: auto; align-self: end; min-height: 54px; }
  .line-inputs .reason { grid-column: 1 / -1; }
  .field input, .field select, .field textarea { min-height: 48px; font-size: 16px; }
  .picked { width: 100%; justify-content: space-between; }
  .picked .btn { margin-left: auto; }
  .formbar .btn { flex: 1 1 100%; min-height: 52px; }
  .formbar > span { width: 100%; text-align: center; }
  .adj-list, .supplier-grid, .loc-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .adj-actions .btn, .supplier-actions .btn { flex: 1; }
  .exportbar > span { width: 100%; }
  .exportbar .btn { flex: 1 1 28%; padding: 0 8px; }
  .locked { margin: 24px auto; }

  /* Popups slide up from the bottom */
  dialog { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; margin: 0; max-height: calc(100dvh - var(--bar) - 12px); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  dialog form { max-height: calc(100dvh - var(--bar) - 12px); }
  dialog[open] { animation: m-up .24s cubic-bezier(.2, .8, .2, 1); }
  dialog .modal-head { position: relative; padding-top: 20px; }
  dialog .modal-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 99px; background: var(--line-2); }
  dialog .icon-btn { width: 44px; height: 44px; }
  dialog .modal-foot > .btn { flex: 1; min-height: 50px; }
  .addline { width: 100%; }
  .m-sheet ul { max-height: 62vh; overflow-y: auto; padding: 4px 8px 14px; }
  .m-sheet li button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
  .m-sheet li button:active { background: var(--accent-tint); }
  .m-sheet li button span { display: grid; min-width: 0; line-height: 1.38; }
  .m-sheet li b { font-weight: 600; }
  .m-sheet li small { color: var(--ink-2); font-size: 13.5px; }

  .toasts { left: 12px; right: 12px; max-width: none; bottom: calc(var(--tabs, 0px) + 84px); }

  /* The role choice screen */
  .signin { padding: 28px 16px 40px; }

  /* Nothing under 13px on a phone except the tab labels and count badges on the tab icons */
  .sku { font-size: max(.88em, 13px); }
  .pill { font-size: 13px; }
  .bin small { font-size: 13px; }
}
@media (max-width: 350px) {
  .m-tiles .m-tile { padding-inline: 8px; }
  .m-big { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .m-big span { grid-row: auto; }
  .sitecard dl { gap: 8px 6px; }
  /* On the narrowest phones each step takes the width of its own word, so no word breaks */
  .steps { grid-auto-columns: auto; justify-content: space-between; gap: 2px; padding-inline: 4px; }
  .steps li + li::before { display: none; }
  .steps span { overflow-wrap: normal; }
}
body.is-grabbing, body.is-grabbing * { cursor: grabbing !important; }
.tabs, .table-wrap { -webkit-overflow-scrolling: touch; }
@keyframes m-up { from { transform: translateY(40px); opacity: .4; } }

/* Desktop and phone switch in the demo bar */
.view-switch { display: none; }
.preview { display: none; }
@media (min-width: 900px) {
  .view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(66, 39, 0, .13); }
  .view-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 13px; border: 0; border-radius: 99px; background: none; color: #422700; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .view-switch button .icon { width: 15px; height: 15px; }
  .view-switch button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(66, 39, 0, .25); }

  .app-body.is-preview { background: #e7e7e2; }
  .is-preview #app, .is-preview > dialog, .is-preview .toasts { display: none; }
  .is-preview .preview { display: flex; align-items: center; justify-content: center; gap: clamp(32px, 6vw, 96px); min-height: calc(100vh - var(--bar)); padding: 20px 32px; }
  .preview-notes { max-width: 360px; }
  .preview-notes h2 { font: 700 clamp(28px, 2.8vw, 38px)/1.12 var(--head); }
  .preview-notes > p { margin-top: 10px; color: var(--ink-2); font-size: 17px; }
  .preview-notes ul { margin-top: 20px; border-top: 1px solid var(--line-2); }
  .preview-notes li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .preview-notes li .icon { margin-top: 2px; color: var(--accent); }

  .device { --h: 844px; flex: none; width: 414px; padding: 11px; border-radius: 56px; background: #141517; box-shadow: 0 40px 70px -30px rgba(20, 21, 23, .65), inset 0 0 0 2px #45474c; }
  .device-screen { position: relative; display: flex; flex-direction: column; width: 392px; height: var(--h); border-radius: 45px; overflow: hidden; background: var(--surface); isolation: isolate; }
  .device-status { display: flex; align-items: center; justify-content: space-between; flex: none; height: 44px; padding: 0 30px; background: var(--surface); font-size: 15px; font-weight: 700; }
  .device-status::after { content: ""; width: 25px; height: 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: linear-gradient(var(--ink), var(--ink)) 2px 50% / 16px 6px no-repeat; }
  .device-island { position: absolute; top: 10px; left: 50%; width: 108px; height: 26px; margin-left: -54px; border-radius: 99px; background: #141517; }
  .device iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: var(--bg); }
  .device-home { flex: none; height: 12px; background: var(--surface); }
}

@media (max-width: 760px) {
  /* Role screen: both roles are visible at once, each as one large row */
  .signin .roles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 22px; }
  .signin h1 { margin-top: 22px; font-size: 25px; text-wrap: balance; }
  .signin-sub { margin-inline: auto; font-size: 15px; text-wrap: balance; }
  .signin .role-points, .signin .role-org { display: none; }
  .signin .role { display: grid; grid-template-columns: 46px minmax(0, 1fr) 10px; grid-template-areas: "ico title go" "ico name go" "ico short go"; align-content: center; align-items: center; column-gap: 14px; row-gap: 1px; height: auto; min-height: 104px; padding: 16px; text-align: left; }
  .signin .role::after { content: ""; grid-area: go; width: 8px; height: 8px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); opacity: .55; }
  .signin .role-icon { grid-area: ico; align-self: center; }
  .signin .role-title { grid-area: title; margin: 0; font-size: 18px; line-height: 1.25; }
  .signin .role-name { grid-area: name; font-size: 14px; line-height: 1.35; }
  .signin .role-short { grid-area: short; display: block; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
}

/* ---------------- Crewmark phone additions ---------------- */
@media (max-width: 760px) {
  .m-bar { background: var(--navy); color: #fff; border-bottom: 3px solid var(--accent); }
  .m-bar .m-icon { color: #fff; }
  .m-bar .m-icon:active { background: #3a4248; }
  .m-bar .m-title { margin: 0; }
  .m-content .page-head > div:first-child > h1, .m-content .page-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .m-content .page-head .page-actions { display: none; }
  .m-content .page-head .page-actions:has(.datenav) { display: flex; width: 100%; }
  .m-content .page-head .page-actions:has(.datenav) > .btn-primary { display: none; }
  .datenav { width: 100%; }
  .datenav label { flex: 1; }
  .datenav input { width: 100%; height: 46px; }
  .datenav .icon-btn { width: 46px; height: 46px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 11px 13px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat-value { font-size: 26px; }
  .stat-sub { font-size: 13px; }
  .content .tabs { flex-wrap: nowrap; }
  .tabs .tab { min-height: 42px; }
  .q-card { padding: 12px 13px; }
  .q-card .btn { flex: 1; }
  .q-top a { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; }
  .skills span { font-size: 12.5px; }
  button.m-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
  .m-row-end { display: grid; justify-items: end; gap: 4px; }
  p.m-card { padding: 14px; }
  .flow { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .flow li { padding: 0; border-top-width: 6px; }
  .flow li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .flow li.is-now { grid-column: span 1; }
  .facts > div { grid-template-columns: 104px minmax(0, 1fr); }
  .crew a { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .crew .mini { display: none; }
  .agenda a { grid-template-columns: 66px minmax(0, 1fr); }
  .agenda a > .badge { grid-column: 2; justify-self: start; }
  .mini-list a, .todo a { min-height: 52px; }
  .checks .check { min-height: 52px; }
  .check input { width: 24px; height: 24px; }
  .rail { display: none; }
  .sums { justify-content: stretch; }
  .sums > div { grid-template-columns: minmax(0, 1fr) auto; }
  .doc { font-size: 13.5px; }
  .doc th, .doc td { padding: 8px 4px; }
  .card .doc th:first-child, .card .doc td:first-child { padding-left: 0; }
  .card .doc th:last-child, .card .doc td:last-child { padding-right: 0; }
  .doc .grow { min-width: 0; width: auto; }
  .doc th:nth-child(3), .doc td:nth-child(3) { display: none; }
  .card:not(.card-flush) > .table-wrap { margin-inline: 0; }
  .linerow, .linerow.has-cost { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .linerow > .field:first-child { grid-column: 1 / -1; }
  .linerow-x { margin-top: 23px; width: 44px; height: 48px; }
  .skillbox > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .areamap { grid-template-columns: minmax(0, 1fr); }
  .skeleton { grid-template-columns: minmax(0, 1fr); }
  .chips button { width: 44px; height: 44px; }
  .signin .brand { flex-direction: row; }
}

/* Desktop and Mobile switch sits in the exact middle of the bar */
@media (min-width: 900px) {
  .app-body .demo-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .app-body .demo-bar > p { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .app-body .demo-bar > .view-switch { justify-self: center; }
  .app-body .demo-bar > nav { justify-self: end; }
}
