/* One scale per role. Native plots retain their measured geometry and labels. */
:root{
 --ui-font:Roboto,Arial,sans-serif;
 --ui-zoom:1;
 --ui-control-base:32px;--ui-action-base:36px;--ui-tab-base:36px;--ui-compact-base:24px;
 --ui-font-base:13px;--ui-label-base:12px;--ui-caption-base:11px;
 --ui-radius:10px;--ui-card-radius:12px;--ui-gap:8px;
 --ui-border:#dce4ee;--ui-ink:#29394c;--ui-secondary:#61738a;--ui-accent:#176cff;
}
header,#sidebar,#views,#properties,footer{--ui-zoom:var(--density,1)}
body{font-family:var(--ui-font);font-size:var(--ui-font-base);color:var(--ui-ink)}
button,summary,input,select,textarea{font-family:var(--ui-font);letter-spacing:0;box-sizing:border-box}
button,summary{font-weight:500;line-height:1.25}
button,select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]){
 font-size:calc(var(--ui-font-base)/var(--ui-zoom));
 border-radius:var(--ui-radius);
}
button{min-height:calc(var(--ui-control-base)/var(--ui-zoom));padding:0 calc(10px/var(--ui-zoom))}
select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]){
 height:calc(var(--ui-control-base)/var(--ui-zoom));min-height:calc(var(--ui-control-base)/var(--ui-zoom));
 border-color:var(--ui-border);line-height:1.25;
}
button img,summary img{width:calc(16px/var(--ui-zoom));height:calc(16px/var(--ui-zoom));flex:none}
/* Main actions share a height and minimum width; long labels can grow. */
:where(dialog,.dialog-actions,.pw-actions,.ds-actions,.source-actions) :is(button,.apply,.secondary),
:is(.apply,.secondary){
 min-height:calc(var(--ui-action-base)/var(--ui-zoom));min-width:calc(88px/var(--ui-zoom));
 padding:calc(7px/var(--ui-zoom)) calc(14px/var(--ui-zoom));font-size:calc(var(--ui-font-base)/var(--ui-zoom));border-radius:var(--ui-radius);
}
/* Icon controls are square, across the header, tools and dialog close buttons. */
:is(header,#plot-toolbar,.dialog-head,.map-controls,.volume-controls,.volume-workspace-bar,.pw-plot-tools,.ds-tools) button:has(>img):not(:has(span)),
header :is(#choose-well,#properties-toggle,#layout-menu,#about),.dialog-head button,
:is(.map-controls,.volume-controls,.pw-plot-tools) button:empty{
 width:calc(var(--ui-control-base)/var(--ui-zoom));height:calc(var(--ui-control-base)/var(--ui-zoom));
 min-width:calc(var(--ui-control-base)/var(--ui-zoom));min-height:calc(var(--ui-control-base)/var(--ui-zoom));padding:0;flex-shrink:0;
}
header :is(button,summary,select){height:calc(var(--ui-control-base)/var(--ui-zoom));min-height:calc(var(--ui-control-base)/var(--ui-zoom));font-size:calc(var(--ui-font-base)/var(--ui-zoom));border-radius:var(--ui-radius)}
header #project-menu.brand{width:calc(var(--ui-control-base)/var(--ui-zoom));height:calc(var(--ui-control-base)/var(--ui-zoom));min-height:calc(var(--ui-control-base)/var(--ui-zoom));font-size:calc(24px/var(--ui-zoom));border-radius:var(--ui-radius)}
header :is(#project,#well,#bore){font-size:calc(var(--ui-font-base)/var(--ui-zoom));height:calc(var(--ui-control-base)/var(--ui-zoom));padding-inline:calc(8px/var(--ui-zoom));border-radius:var(--ui-radius)}
header :is(#save-view,#follow,#save,#show-graphs){padding-inline:calc(12px/var(--ui-zoom));border-radius:var(--ui-radius)}
/* Every module toolbar uses the same controls and rhythm. */
:is(#plot-toolbar,#rms-native-controls,.map-controls,.volume-controls,.volume-workspace-bar,.pw-object-tools,.pw-plot-tools,.ds-tools,.ds-filters) :is(button,select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])){
 min-height:calc(var(--ui-control-base)/var(--ui-zoom));height:calc(var(--ui-control-base)/var(--ui-zoom));
 font-size:calc(var(--ui-font-base)/var(--ui-zoom));border-radius:var(--ui-radius);line-height:1.25;
}
:is(.map-controls,.volume-workspace-bar,.pw-object-tools,.pw-plot-tools,.ds-tools,.ds-filters){gap:var(--ui-gap)}
:is(.ds-tabs,.pw-tabs,.source-tabs) button{height:var(--ui-tab-base);min-height:var(--ui-tab-base);padding-inline:14px;border-radius:var(--ui-radius);font-size:var(--ui-font-base)}
/* Rows and disclosures form their own compact family, not action buttons. */
#sidebar :is(.disclosure,.panel-head button){width:calc(var(--ui-compact-base)/var(--ui-zoom));height:calc(var(--ui-compact-base)/var(--ui-zoom));min-width:calc(var(--ui-compact-base)/var(--ui-zoom));min-height:calc(var(--ui-compact-base)/var(--ui-zoom));padding:0}
#sidebar .row{font-size:calc(var(--ui-label-base)/var(--ui-zoom));min-height:calc(28px/var(--ui-zoom));line-height:1.3}
#sidebar :is(.sidebar-detail,.sidebar-scope,.group-label,.offsets){font-size:calc(var(--ui-caption-base)/var(--ui-zoom));line-height:1.35}
#sidebar .sidebar-collection>summary{font-size:calc(var(--ui-label-base)/var(--ui-zoom));font-weight:500}
#sidebar :is(.panel-head,.search input){font-size:calc(var(--ui-label-base)/var(--ui-zoom))}
#sidebar .search{min-height:calc(var(--ui-control-base)/var(--ui-zoom))}
/* Typography follows content roles rather than module-specific font guesses. */
:is(#dialog-content,#property-form,#planning-workspace,#drillspot-workspace,.map-panel,.volume-panel){font-size:var(--ui-font-base);line-height:1.45}
#property-form{font-size:calc(var(--ui-font-base)/var(--ui-zoom))}
:is(#dialog-content,.map-panel,.volume-panel,.ds-card,.pw-panel) h2{font-size:18px;line-height:1.3;font-weight:600}
:is(#dialog-content,.map-panel,.volume-panel,.ds-card,.pw-panel) h3{font-size:14px;line-height:1.35;font-weight:600}
.dialog-head strong{font-size:16px;font-weight:600}
:is(.muted,.ds-note,.pw-note,.map-help,.volume-help){font-size:var(--ui-caption-base);line-height:1.4;color:var(--ui-secondary)}
:is(.map-controls,.volume-controls,.ds-filters,.pw-object-tools) label{font-size:var(--ui-label-base);line-height:1.35}
:is(.map-legend,.volume-legend,.ds-readout){font-size:var(--ui-caption-base);line-height:1.4}
:is(.map-legend,.volume-legend) strong{font-size:var(--ui-label-base);font-weight:600}
:is(.ds-card,.pw-panel,.map-panel,.volume-panel,.project-item,.curve-scale,.curve-binding){border-radius:var(--ui-card-radius)}
:is(#dialog-content,.ds-content,.pw-panel,.map-panel,.volume-panel) :is(th,td){font-size:12px;line-height:1.4}
:is(.dialog-actions,.pw-actions,.ds-actions){gap:var(--ui-gap)}
.dialog-head{min-height:52px;gap:var(--ui-gap)}
#dialog-content{padding:16px}
label.field{gap:var(--ui-gap);margin-block:12px;font-size:var(--ui-label-base)}
label.field :is(input,select,textarea){font-size:var(--ui-font-base)}
.search{height:calc(var(--ui-control-base)/var(--ui-zoom));min-height:calc(var(--ui-control-base)/var(--ui-zoom));border-radius:var(--ui-radius)}
.search input{height:100%;min-height:0}
.chooser-item{min-height:52px;border-radius:var(--ui-radius);padding:8px 12px;font-size:var(--ui-font-base)}
.chooser-item small,.chooser-context,.chooser-category,.source-row small{font-size:var(--ui-caption-base);line-height:1.4}
.file-popup button{min-height:calc(var(--ui-action-base)/var(--ui-zoom));font-size:calc(var(--ui-font-base)/var(--ui-zoom));padding:calc(8px/var(--ui-zoom)) calc(12px/var(--ui-zoom));border-radius:var(--ui-radius)}
@media(min-width:651px){
 #workspace-tabs{display:flex;height:calc(40px/var(--ui-zoom));padding:0}
 #workspace-tabs button[data-view]{flex:1 0 calc(104px/var(--ui-zoom));min-width:calc(104px/var(--ui-zoom));height:calc(40px/var(--ui-zoom));min-height:calc(40px/var(--ui-zoom));width:auto;font-size:calc(var(--ui-font-base)/var(--ui-zoom));line-height:1.25;padding-inline:calc(10px/var(--ui-zoom))}
 #views{height:calc(40px/var(--ui-zoom));min-height:calc(40px/var(--ui-zoom))}
}
/* Touch targets and form text use one phone scale, including landscape phones. */
.phone-observer{
 --ui-control-base:44px;--ui-action-base:44px;--ui-tab-base:44px;--ui-compact-base:44px;
 --ui-font-base:14px;--ui-label-base:14px;--ui-caption-base:12px;--ui-radius:12px;
}
.phone-observer :is(button,summary,select,input,textarea){--ui-zoom:1}
.phone-observer :is(header,#sidebar,#views,#properties,footer){zoom:1;--ui-zoom:1}
.phone-observer :is(header button,header summary,header select,#mobile-workspace-select,#mobile-section-toggle,.phone-track-fit,.phone-volume-fit){height:44px;min-height:44px;border-radius:var(--ui-radius)}
.phone-observer header :is(#project-menu.brand,#choose-well,#properties-toggle,#layout-menu,#about),.phone-observer #mobile-header-menu>summary{width:44px;min-width:44px;height:44px;min-height:44px}
.phone-observer :is(#mobile-workspace-select,select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea){font-size:16px}
.phone-observer header :is(#project,#well,#bore){font-size:16px;height:44px;padding-inline:8px}
.phone-observer :is(.ds-phone-views,.ds-phone-chart-picker,.phone-map-tools,.phone-volume-content,.ds-phone-tools) :is(button,select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])){
 min-height:44px;height:44px;border-radius:var(--ui-radius);font-size:14px;
}
.phone-observer :is(.ds-phone-views,.ds-phone-chart-picker,.phone-map-tools,.phone-volume-content,.ds-phone-tools) :is(select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])){font-size:16px}
.phone-observer :is(.phone-fold-panel,.phone-volume-tools,.ds-phone-tools)>summary{min-height:44px;font-size:14px;line-height:1.35;padding:10px 12px}
.phone-observer :is(#rms-native-controls,.map-controls,.volume-controls,.volume-workspace-bar,.pw-object-tools,.pw-plot-tools,.ds-tools,.ds-filters) :is(button,select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])){min-height:44px;height:44px;font-size:14px}
.phone-observer :is(#rms-native-controls,.map-controls,.volume-controls,.volume-workspace-bar,.pw-object-tools,.pw-plot-tools,.ds-tools,.ds-filters) :is(select,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color])){font-size:16px}
.phone-observer :is(#mobile-header-actions>button,#mobile-header-actions .file-popup button,#toolbar-more-actions button){min-height:44px;height:auto;line-height:1.35;padding:11px 12px;font-size:14px}
.phone-observer #mobile-header-actions>button .mobile-action-label{font-size:14px}
.phone-observer header #mobile-header-actions>button:is(#save-view,#follow,#save,#properties-toggle,#show-graphs,#layout-menu,#about){width:100%;max-width:none;min-width:0;min-height:44px;height:auto;font-size:0;padding:11px 12px}
.phone-observer #mobile-header-actions #about .mobile-action-label{font-size:14px}
.phone-observer header #mobile-header-actions #file-actions>summary{font-size:14px}
.phone-observer :is(#sidebar .panel-head button,#sidebar .disclosure,.dialog-head button){width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
.phone-observer #sidebar .panel-head{min-height:48px;height:48px;font-size:14px}
.phone-observer #sidebar .row{min-height:44px;font-size:14px}
.phone-observer #sidebar :is(.sidebar-detail,.sidebar-scope,.group-label,.offsets){font-size:12px}
.phone-observer #sidebar :is(.search,.search input){min-height:44px;font-size:16px}
.phone-observer .search{height:44px;min-height:44px}
.phone-observer .chooser-item{min-height:56px;font-size:14px}
.phone-observer dialog{background:#fff}
.phone-observer #sidebar .sidebar-collection>summary{font-size:14px;min-height:44px;padding:12px}
.phone-observer :is(dialog .apply,dialog .secondary,.dialog-actions button){min-height:44px;min-width:96px;font-size:14px}
.phone-observer :is(.map-panel,.volume-panel,.ds-phone-tools-content,#dialog-content) :is(th,td){font-size:14px}
.phone-observer .dialog-head strong{font-size:16px}
.phone-observer :is(#mobile-section-title,.map-panel h3,.volume-panel h3){font-size:16px}
.phone-observer #mobile-section-close{min-width:88px;justify-content:center;text-align:center}
.phone-observer #rms-native-controls :is(button,select){padding-inline:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.phone-observer footer :is(#cursor-label,#save-status){font-size:11px;line-height:1.3}
.phone-observer footer #md{height:36px;min-height:36px;width:84px;font-size:16px}
.phone-observer footer #expand-sidebar{height:44px;width:44px;min-width:44px;padding:0}
/* Planning settings open above the plot instead of pushing it off the phone. */
.phone-observer #planning-workspace{font-family:var(--ui-font);padding-bottom:0;bottom:0}
.phone-observer #planning-workspace .pw-content{overflow:hidden}
.phone-observer #planning-workspace .pw-work{flex:1;min-height:0;overflow:auto}
.phone-observer #planning-workspace #pw-properties{display:none}
.phone-observer #planning-workspace :is(.phone-planning-head,.phone-planning-properties,.phone-planning-tools){position:relative;flex:none;border:1px solid var(--ui-border);border-radius:var(--ui-radius);background:#fff}
.phone-observer #planning-workspace .phone-planning-head{margin:5px 10px 8px}
.phone-observer #planning-workspace .phone-planning-tools{margin:8px}
.phone-observer #planning-workspace :is(.phone-planning-head,.phone-planning-properties,.phone-planning-tools)>summary{font-family:var(--ui-font);min-height:44px;padding:10px 12px}
.phone-observer #planning-workspace :is(.phone-planning-head,.phone-planning-properties,.phone-planning-tools)[open]{z-index:15}
.phone-observer #planning-workspace :is(.phone-planning-head,.phone-planning-properties,.phone-planning-tools)>.phone-fold-content{position:absolute;top:100%;left:0;right:0;max-height:50dvh;overflow:auto;overscroll-behavior:contain;background:#fff;border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-shadow:0 8px 24px #21344c24}
.phone-observer #planning-workspace .phone-planning-properties #pw-properties-panel{display:block!important;max-height:none;position:static;width:auto}
.phone-observer #planning-workspace .phone-planning-tools .pw-plot-tools{margin:0;max-width:100%;background:#fff;box-shadow:none;border:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.phone-observer #planning-workspace :is(.pw-tabs,.pw-object-tools,.pw-actions,.pw-legend-panel){backdrop-filter:none;-webkit-backdrop-filter:none;background:#fff}
.phone-observer #planning-workspace #pw-readout-toggle{height:44px;min-height:44px;font-size:14px}
.phone-observer #planning-workspace .pw-legend-details>summary{width:44px;height:44px;font-family:var(--ui-font)}
.phone-observer #planning-workspace #pw-properties-panel label{font-size:14px}
@media(max-height:500px){
 .phone-observer #planning-workspace .phone-planning-properties{position:absolute;top:8px;left:18px;width:calc(50% - 26px);z-index:10}
 .phone-observer #planning-workspace .phone-planning-properties[open]{z-index:16}
 .phone-observer #planning-workspace .phone-planning-tools{margin-left:calc(50% + 4px)}
 .phone-observer #planning-workspace .pw-bottom:not(:has(#pw-status[data-type=error])){display:none}
}
