/* Field view is selected by the native pointer/900px rule, not a CSS width guess. */
body[data-shell=mobile] .workspace-field-note,body[data-shell=mobile] .workspace-tabs{display:none}
html[data-shell=mobile]{height:auto;overflow:auto}body[data-shell=mobile]{height:auto;overflow:visible}
body[data-shell=mobile] .wrap{display:flex;flex-direction:column;width:100%;height:auto;overflow:visible;max-width:720px;margin:0 auto;padding:12px;gap:12px}
body[data-shell=mobile] .workspace-resource{position:static}body[data-shell=mobile] .workspace-resource .verdict{max-height:none;overflow:visible}
body[data-shell=mobile] #empty:not(.hidden){display:block}
body[data-shell=mobile] header{margin:0}body[data-shell=mobile] header p{font-size:1rem}
body[data-shell=mobile] .search-row{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}
body[data-shell=mobile] #addr{flex:1 1 220px;min-width:0;font-size:16px}
body[data-shell=mobile] :is(button,input:not([type=hidden]),select,summary){min-height:44px!important;font-size:16px}
body[data-shell=mobile] :is(.tag,.stamp,.workspace-chrome .stamp,footer .stamp){font-size:12px}
body[data-shell=mobile] [data-help]:not(:hover):not(:focus-visible)::after{display:none}
body[data-shell=mobile] [data-help]::after{max-width:min(320px,calc(100vw - 48px))}body[data-shell=mobile] .cell:nth-child(2n)[data-help]::after{left:auto;right:0}
/* R7 AC8 nothing scrolls sideways, in a REAL touch state: a tap leaves the tapped row :hover, and `tr[data-help]::after` (site-screen.css: left:16px, up to 320px wide) then reaches past the drawer body's right edge, so the body scrolls about 48px sideways. Measured on the phone cards: 108 of 114 hovers overflowed, every one a table row. Keep a row's tooltip inside the row. */
body[data-shell=mobile] tr[data-help]::after{left:0;right:auto;max-width:100%;box-sizing:border-box}
body[data-shell=mobile] button{min-width:44px;white-space:normal}
body[data-shell=mobile] :is(input[type=checkbox],input[type=radio]){min-width:44px}
body[data-shell=mobile] .leaflet-control-zoom a{width:44px;height:44px;line-height:44px}
/* The generic `a` rule above made Leaflet's stacked zoom buttons sit side by side; restore the stack so the control stays one 44 px column at the map's left edge. */
body[data-shell=mobile] .leaflet-bar a{display:block}
body[data-shell=mobile] a{display:inline-block;min-height:44px;min-width:44px;align-content:center}
/* R7 AC8: the tappable provenance tags and defined terms (role=button, tag-explain.mjs) are real 44 px boxes in flow, not hit-slop: no two targets share area, so a tap lands on the one drawn under the finger. Desktop keeps the 16-17 px chips. */
body[data-shell=mobile] :is(.tag,.term)[role=button]{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;min-width:44px;max-width:100%;text-align:center;vertical-align:middle}
body[data-shell=mobile] input[type=range]{display:none}
body[data-shell=mobile] #out .workspace-region,body[data-shell=mobile] .wrap>#site-visual,body[data-shell=mobile] #out #revenue-binder{display:none}
body[data-shell=mobile] .workspace-verdict-card{margin:0}
body[data-shell=mobile] #field-shell{display:block}
body[data-shell=mobile] #field-shell[hidden]{display:none}
#field-cards{display:grid;gap:10px}#field-cards button{text-align:left;padding:16px;border:1px solid var(--hair-strong);border-radius:8px;background:var(--s1);color:var(--ink);font-size:18px}
/* Share, Copy link and Use my location sat one element away from the field cards and were
   the browser's own buttons: with color-scheme dark that is rgb(107,107,107) behind a 2px
   outset white bevel and no radius. Same shape as the cards beside them, and the 44 px tap
   target stated here rather than inherited from a rule that a UA default could outrank. */
#field-share,#field-copy,#field-location button{text-align:left;padding:16px;min-height:44px;border:1px solid var(--hair-strong);border-radius:8px;background:var(--s1);color:var(--ink);font-size:18px}
#field-share:disabled,#field-copy:disabled,#field-location button:disabled{opacity:.45;cursor:default}
#field-location{padding:12px;background:var(--s1);border:1px solid var(--hair);border-radius:8px}#field-location button{margin:4px}#field-location-map{height:260px;max-width:100%}
#field-sheet{box-sizing:border-box;min-height:100dvh;width:100%;padding:12px;background:var(--s1);color:var(--ink);overflow-wrap:anywhere}
#field-sheet[hidden]{display:none}body.field-open .wrap{display:none}
#field-sheet>button{color:var(--ink);border:1px solid var(--hair-strong);position:relative;background:var(--s1);margin-bottom:12px}
/* Back to site was declared sticky, but body was the scroll container of that stick (see the compact strip block in workspace.css) and never scrolls, so it never stuck: it has always scrolled away with the card. It stays that way on purpose: pinned it would cost a phone another 48px under the result strip, and the browser's own back gesture still leaves the card. */
#field-sheet .workspace-region{display:block;max-width:100%;min-width:0}#field-sheet .workspace-region[hidden]{display:none}
#field-sheet #site-visual{display:block;position:relative;inset:auto;height:540px;width:100%;min-width:0;grid-area:auto}
#field-sheet :is(input,select){max-width:100%;box-sizing:border-box}#field-sheet table{width:100%;max-width:100%;table-layout:auto}#field-sheet :is(td,th){overflow-wrap:break-word}
/* R7 AC8 nothing scrolls sideways: `td.n{white-space:nowrap}` (site-screen.css) is for numbers, but the Sources ledger also puts text there ("No Urban Centre designation", "One instrument"), which cannot wrap, so that table outgrew its drawer body and the value column was cut off at the card edge ("19,74", "not on r"). Let those TEXT cells wrap on the phone; a money cell (`td.n[data-v]`, which also draws a one-line magnitude bar) keeps `nowrap`, so a negative figure can never split into a lone sign and its digits. */
#field-sheet td.n:not([data-v]){white-space:normal}
#field-sheet dl{margin:12px 0}#field-sheet dt{font-weight:600;margin-top:16px}#field-sheet dd{margin:4px 0}
#field-sheet .workspace-modes{flex-wrap:wrap}#field-sheet #inputs{grid-template-columns:1fr}
/* R7 AC8 legibility: a drawer header is its title, then what it holds, then the count, each on its own line. The row layout let a long subtitle squeeze the title to a glyph ("Servicing" as S/er/vi/ci/n/g). */
#field-sheet .drawer>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:4px;align-items:center}
#field-sheet .drawer>summary>.d-t{grid-column:1;grid-row:1}
#field-sheet .drawer>summary>:is(.d-s,.d-v){grid-column:1/-1;margin:0;padding:0;justify-self:start;overflow-wrap:break-word}
#field-sheet .drawer>summary::after{grid-column:2;grid-row:1;margin:0}
/* Share and Copy link are two 44 px targets: give them room from each other and from the Assumptions button above. */
#field-shell :is(#field-share,#field-copy){margin:10px 10px 0 0}
/* R7 AC8, under 1024px only (the width the 48px/8px insets and the relative map come from; a coarse pointer at 1024px+ keeps the desktop toolbar and hero): the toolbar sits between the map's own controls - the 44 px zoom column on the left, the layers toggle on the right - instead of over them (the insets were sized for Leaflet's 30 px controls and hid zoom-out and the layers toggle). */
@media screen and (max-width:1023px){#field-sheet .workspace-modes{left:64px;right:64px}}
@media print{#field-shell,#field-location,#field-sheet>button{display:none!important}body.field-open .wrap{display:block}#field-sheet{min-height:0;padding:0}body[data-shell=mobile] #out .workspace-region{display:block}}

/* The assumption profile section of the Assumptions card (views/mobile.mjs hostProfile): the same rule and heading
   weight as the saved-scenarios section above the levers, on the same tokens. The controls in it are the desktop
   nodes moved here, so the 44 px target floor at the top of this file already applies to every one of them. */
#field-profile{margin-block:16px;padding-top:12px;border-top:1px solid var(--hair-strong);min-width:0}
#field-profile>h3{font:inherit;font-weight:700;margin:0 0 8px}
#field-profile .profile-row{min-width:0}

/* Loaded Massing owns its captions/help/still in normal flow; the map alone is fixed-height. */
#field-sheet #site-visual:has(#massing-region:not([hidden])){height:auto;overflow:visible}
/* The Servicing lens hosts the utility legend inside the hero; at the sheet's fixed 540px it spilled over the drawers below and covered their headers. Under 1024px only: that is where servicing-map.css puts the map and legend in flow; at 1024px+ (a coarse pointer, e.g. a landscape tablet) they are absolute and an auto height would collapse the hero to 0. */
@media screen and (max-width:1023px){#field-sheet #site-visual.workspace-utilities-open{height:auto;overflow:visible}}

/* The portal is outside .wrap, so it explicitly consumes the same Look font tokens. */
#field-sheet{font-family:var(--font-body);font-weight:var(--font-body-weight)}
#field-sheet>h2{font-family:var(--font-display);font-weight:var(--font-display-weight)}

/* ==== R5 of the assumptions workspace: the phone's assumption sheet ====
   The Assumptions card's exact-value list (Edit exact values) is the assumption sheet's own arrangement of the same row nodes (assumption-sheet.mjs arrangeRows): the sections Building,
   Revenue, Costs, Finance, each with its primary rows first, then the rest. A row is two lines: the name and its Source chip, then the box and its unit, with anything else the row says under
   them. Every control is still a 44px target (the rule at the top of this file). The desktop's grid (workspace.css, from 1024px) does not apply here. */
#field-sheet .sheet-root{min-width:0}
#field-sheet .sheet-heading{margin:18px 0 2px;padding:0 0 3px;font:600 12px/16px var(--font-body);letter-spacing:.07em;text-transform:uppercase;color:var(--ink-subtle);border-bottom:1px solid var(--hair-strong)}
#field-sheet .sheet-section:first-child>.sheet-heading{margin-top:4px}
#field-sheet .sheet-more{margin:0}
#field-sheet .sheet-more>summary{display:flex;align-items:center;padding:0;font:500 14px/1.2 var(--font-body);color:var(--accent-hi);cursor:pointer}
#field-sheet .sheet-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:2px;align-items:center;margin:0;padding:6px 0 8px;border-bottom:1px solid var(--hair)}
#field-sheet .sheet-row>*{min-width:0}
#field-sheet .sheet-row>.row-name{grid-column:1;grid-row:1;font-size:15px;line-height:1.25;color:var(--ink);overflow-wrap:anywhere}
/* the real label keeps every word for a screen reader and is out of the drawn line; the short name above is what the eye reads */
#field-sheet .sheet-row .sheet-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
#field-sheet .sheet-row .sheet-main{grid-column:1;grid-row:2;width:100%;box-sizing:border-box;margin:0}
#field-sheet .sheet-row :is(input[type=number],select){box-sizing:border-box;padding:2px 10px;font:inherit;font-size:16px;color:var(--ink);background:var(--canvas);border:1px solid var(--hair-strong);border-radius:var(--r-sm,6px)}
#field-sheet .sheet-row input[type=number]{text-align:right;font-variant-numeric:tabular-nums}
#field-sheet .sheet-row :is(input[type=number],select):focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}
#field-sheet .sheet-row>.row-unit{grid-column:2;grid-row:2;font-size:13px;color:var(--ink-subtle);white-space:nowrap}
#field-sheet .sheet-row .provenance-lever-host{display:contents}
#field-sheet .sheet-row .provenance-tap{grid-column:2;grid-row:1;justify-self:end}
/* citation prose leaves the row: the chip opens the Source sheet, which carries the sentence and the sources */
#field-sheet .sheet-row .provenance-inline,#field-sheet .sheet-row .printed-value{display:none}
#field-sheet .sheet-row[data-sheet-layout=select]>.sheet-main,#field-sheet .sheet-row[data-sheet-layout=gradient]>.sheet-main{grid-column:1 / -1}
#field-sheet .sheet-row[data-sheet-layout=gradient]>input[type=number]{grid-column:1;grid-row:3}
/* a tick box: the box, then the name, then the chip; the label's own words are the short name's twin for a screen reader and are not drawn twice */
#field-sheet .sheet-row[data-sheet-layout=check]{grid-template-columns:44px minmax(0,1fr) auto}
#field-sheet .sheet-row[data-sheet-layout=check]>.row-name{grid-column:2;grid-row:1}
#field-sheet .sheet-row[data-sheet-layout=check] .provenance-tap{grid-column:3;grid-row:1}
#field-sheet .sheet-row>.sheet-check{display:contents;font-size:0;color:var(--ink)}
#field-sheet .sheet-row>.sheet-check>.sheet-main{grid-column:1;grid-row:1;width:auto;justify-self:start;margin:0;accent-color:var(--accent)}
#field-sheet .sheet-row>.sheet-check>.why{grid-column:1 / -1;grid-row:2;margin:2px 0 0;font-size:13px;line-height:1.4}
#field-sheet .sheet-row>:not(.row-name,.row-unit,.sheet-label,.sheet-main,.sheet-check,input[type=range],.provenance-tap,.provenance-lever-host,.printed-value,.provenance-inline){grid-column:1 / -1;grid-row:auto}
/* Same essential-text token as the desktop sheet's identical rule (workspace.css): --ink-subtle, guarded >=4.5:1, not --ink-faint (Codex P2, 5158609a). */
#field-sheet .sheet-row .limit,#field-sheet .sheet-row .profile-mark,#field-sheet .sheet-row .scenario-reset-reference,#field-sheet .sheet-row .why,#field-sheet .sheet-row #target-share-basis,#field-sheet .sheet-row .tier-note{display:block;margin:1px 0 0;font-size:13px;line-height:1.4;color:var(--ink-subtle)}
#field-sheet .sheet-row .limit:empty,#field-sheet .sheet-row .profile-mark:empty,#field-sheet .sheet-row .why:empty,#field-sheet .sheet-row .tier-note:empty{display:none}
/* a long note is folded behind the row's one toggle: closed, none of it is drawn; open, all of it is */
#field-sheet .sheet-row :is(.why,.limit).sheet-folded{display:none}
#field-sheet .sheet-row[data-note-open=true] :is(.why,.limit).sheet-folded{display:block}
#field-sheet .sheet-row[data-note-long=true]:not(:has(.sheet-folded:not(:empty))) .row-note-toggle{display:none}
#field-sheet .sheet-row .why.sheet-moved{display:none}
#field-sheet .sheet-row .row-note-toggle{justify-self:start;padding:0;font:inherit;font-size:13px;color:var(--accent-hi);background:none;border:0;text-decoration:underline;text-underline-offset:.15em;cursor:pointer}
#field-sheet .sheet-row .limit.invalid{color:var(--bad)}
#field-sheet .sheet-row input[aria-invalid="true"]{border-color:var(--bad);background:var(--bad-tint)}
#field-sheet .sheet-row .profile-mark{color:var(--accent-hi)}
#field-sheet .sheet-row .scenario-reset-reference[hidden],#field-sheet .sheet-row .profile-mark[hidden]{display:none}
#field-sheet .sheet-row label[for=storeys-mode]{grid-column:1 / -1;grid-row:3;margin:2px 0 0;font-size:13px;color:var(--ink-subtle)}
#field-sheet .sheet-row #storeys-mode{grid-column:1 / -1;grid-row:4}
/* Reset, Auto and Unset are there when they can do something: the value differs from where it started, or a value has been set */
#field-sheet .sheet-row button.scenario-lever-action{display:none;justify-self:start;margin:2px 0 0}
#field-sheet .sheet-row:has(>.scenario-reset-reference:not([hidden])) button.scenario-lever-action:not([hidden]),#field-sheet .sheet-row:has(>.sheet-main[placeholder]:not(:placeholder-shown)) button.scenario-lever-action:not([hidden]){display:inline-flex;align-items:center}
#field-sheet .sheet-row[data-sheet-layout=note]{display:block;padding:6px 0}
#field-sheet .sheet-row .why a{color:inherit}

/* UNDO, REDO AND RESET ALL IN THE ASSUMPTIONS CARD (assumptions workspace R5 iteration 2). The pair the desktop keeps in its top bar (edit-actions.mjs) is parked here by views/mobile.mjs while the reader is in Edit exact values: three 44 px targets in a row under the Read assumptions button, so a change can be taken back without leaving the card. */
#field-edit-actions{margin:10px 0 12px}
#field-edit-actions .topbar-edit-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#field-edit-actions .topbar-edit-button{min-height:44px;padding:0 8px;border:1px solid var(--hair-strong);border-radius:8px;background:var(--s1);color:var(--ink);font-size:16px}
#field-edit-actions .topbar-edit-button:disabled{opacity:.45}
