/* User-supplied HDR 2026 report palette adapted for the interface.
   No logo, external fonts or corporate endorsement. Plot/engineering semantic
   colors are intentionally unchanged. Dark-mode tints are accessibility variants. */
:root,body.desktop-mode {
  --brand-blue:#377f99; --brand-navy:#01426a; --brand-gray:#54585a;
  --bg:#171b1e; --panel:#22282c; --panel2:#2c343a; --panel3:#374149;
  --text:#f7f8f9; --muted:#bbc6ce; --line:#586873;
  --accent:#95c9df; --accent-dark:#132b38; --blue:#a8d8ed;
  --control-bg:#1c2328; --control-border:#7b909e;
  --studio-ink:#26343e; --studio-paper:#fff; --studio-teal:#95c9df; --studio-rust:#95c9df;
  --radius:8px; --shadow:0 3px 14px #00000014;
}
html[data-theme="light"],html[data-theme="light"] body.desktop-mode {
  --bg:#f1f3f4; --panel:#fff; --panel2:#e9eef1; --panel3:#dce5eb;
  --text:#292e32; --muted:#54585a; --line:#b9c4cc;
  --accent:#01426a; --accent-dark:#fff; --blue:#01426a;
  --control-bg:#fff; --control-border:#748895;
  --studio-teal:#01426a; --studio-rust:#01426a;
}
body,body.desktop-mode { font-family:Arial,Helvetica,sans-serif; }
body .app-brand h1 { letter-spacing:-.025em; font-weight:700; }
.app-header { border-top:4px solid var(--brand-blue); }
.app-mark,body.desktop-mode .app-mark { color:var(--accent); border-radius:4px; }
.eyebrow { color:var(--accent); letter-spacing:.08em; }
.card,.context-card { background:var(--panel); border-radius:8px; }
.context-bar,.tabbar { background:var(--panel); }
.tabbar button.active { color:var(--accent); }
body :is(input,select,textarea) { border-radius:5px; }
body :is(button,.file-button) { border-radius:5px; }
.data-primary>button { color:var(--accent-dark); }
body :is(button,input,select,textarea):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
body :is(input,select,textarea):focus { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 20%,transparent); }
.ss-dialog { --ss-accent:var(--accent); }
/* The dark navigation rail and white work surface follow the source kit's
   blue/gray hierarchy while retaining every existing responsive breakpoint. */
.wm-title,.wm-sidebar { background:#26343e; border-color:#596c79; }
.wm-title { border-top:4px solid #377f99; }
.wm-title-art { background-color:#26343e; border-color:#596c79; }
.wm-title .wm-kicker,.wm-sidebar .wm-kicker,.wm-sidebar .help,.wm-sidebar label,
body.desktop-mode .wm-sidebar label { color:#d4e0e8; }
.wm-sidebar select,body.desktop-mode .wm-sidebar select,html[data-theme="light"] .wm-sidebar select { background:#1d2b35; border-color:#7b909e; color:#fff; }
.wm-section-nav a { color:#fff; border-color:#596c79; }
.wm-section-nav a:hover,.wm-section-nav a:focus-visible { background:#01426a; color:#fff; }
.wm-map-empty { color:#343b40; background:#fffffff2; border-color:#a4b4bf; }
@media(min-width:1000px) {
 body.desktop-mode .ss-studio-rail { background:#26343e; }
 body.desktop-mode .ss-workflow .ss-studio-rail :is(button,summary) { color:#fff; }
 body.desktop-mode .ss-workflow .ss-studio-rail button[aria-current="true"],
 body.desktop-mode .ss-workflow .ss-report-menu>button { background:#01426a; border-color:#7b909e; color:#fff; }
}
/* The analysis canvas is deliberately light in both themes. */
body.desktop-mode .an-dialog.an-desktop-layout {
 --text:#292e32; --muted:#54585a; --panel:#fff; --panel2:#edf1f4;
 --line:#b9c4cc; --control-border:#748895; --studio-teal:#01426a; --studio-accent:#01426a; --accent:#01426a; --accent-dark:#fff;
 color:#292e32; background:#f1f3f4; border-radius:6px;
}
.an-desktop-layout .an-header { border-top:4px solid #377f99; }
.an-desktop-layout .an-desktop-nav button[aria-pressed="true"],
.an-desktop-layout .en-embedded nav button[aria-current="true"] { background:#e8f0f5; border-color:#377f99; color:#01426a; }
.an-desktop-layout .an-persistent-selection button[aria-pressed="true"] { background:#01426a; border-color:#01426a; color:white; }
.an-desktop-layout .en-embedded .en-header,.an-desktop-layout .en-embedded .en-header h2 { color:#292e32; background:#edf1f4; }
.an-desktop-layout #anSlope { background:#01426a; color:#fff; border-color:#01426a; }
.an-desktop-layout .en-embedded { color:#292e32; }
/* Preserve platform high-contrast colors rather than overriding accessibility. */
@media(forced-colors:active) {
 .wm-title,.wm-sidebar,.ss-studio-rail { background:Canvas!important; color:CanvasText!important; }
 body :is(button,input,select,textarea):focus-visible { outline-color:Highlight; }
 .an-desktop-layout .an-persistent-selection button[aria-pressed="true"] { background:Highlight; color:HighlightText; }
}


@media(min-width:1000px) {
 body.desktop-mode .ss-workflow .ss-step-nav>button[aria-current="step"],
 body.desktop-mode .ss-workflow .ss-workflow-tools>button[aria-current="page"] { background:#01426a; border-color:#7b909e; border-left-color:#95c9df; color:#fff; }
 body.desktop-mode .ss-studio-rail progress::-webkit-progress-bar { background:#596c79; }
 body.desktop-mode .ss-studio-rail progress::-webkit-progress-value { background:#95c9df; }
 body.desktop-mode .ss-studio-rail progress::-moz-progress-bar { background:#95c9df; }
}
.sr-controls button,.sr-toolbar button { background:#01426a; border-color:#377f99; color:#fff; border-radius:5px; }
@media(forced-colors:active) {
 body.desktop-mode .ss-workflow .ss-step-nav>button[aria-current="step"] { background:Highlight; color:HighlightText; border-color:Highlight; }
}

/* HDR internal-app accessibility baseline; preserve stronger public UI support. */
html[data-text-size="double"] { font-size:200%; --field-scale:1; }
body :is(input[type="checkbox"],input[type="radio"]) { min-width:24px!important; min-height:24px!important; width:24px!important; height:24px!important; flex-shrink:0; }
body input[type="range"] { min-height:24px!important; }
body :is(button,summary,a[href],[role="button"]) { min-width:24px; min-height:24px; }
body a[href] { display:inline-block; text-underline-offset:.15em; }
.leaflet-control-attribution a { display:inline-block; min-height:24px; line-height:24px; }
body :is([tabindex],a,summary,input,select,textarea,button):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
body .file-button:focus-within { outline:3px solid var(--accent); outline-offset:3px; }
body :is(label,.help,.notice,.field-error,.ss-field-error) { overflow-wrap:anywhere; }
body :is(button,summary) { white-space:normal; height:auto; }
body .an-inline-kinematics input[aria-invalid="true"] { border:2px solid #a12622; }
html:not([data-theme="light"]) body:not(.desktop-mode) .an-inline-kinematics input[aria-invalid="true"] { border-color:#ffb4ae; }
.a11y-hint { display:block; font-size:.875rem; font-weight:400; color:var(--muted); line-height:1.5; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@media(forced-colors:active) { body :is([tabindex],a,summary,input,select,textarea,button):focus-visible { outline-color:Highlight; } }
/* Enlarged text trades fixed-height panes for a continuous, usable document. */
html[data-text-size="double"] .an-dialog.an-desktop-layout { overflow:auto; }
html[data-text-size="double"] body.desktop-mode .an-dialog.an-desktop-layout > .an-header,
html[data-text-size="double"] .an-desktop-context { position:static; }
html[data-text-size="double"] body.desktop-mode .an-dialog.an-desktop-layout .an-desktop-stage { height:auto; max-height:none; align-items:start; }
html[data-text-size="double"] body.desktop-mode .an-dialog.an-desktop-layout :is(.an-main,.an-desktop-right,.an-desktop-panels) { height:auto; max-height:none; overflow:visible; }
html[data-text-size="double"] body.desktop-mode .an-dialog.an-desktop-layout #anPlot { height:auto; min-height:300px; max-height:none; width:100%; max-width:620px; flex:none; }
@media(max-width:1200px) { html[data-text-size="double"] body.desktop-mode .an-desktop-stage { grid-template-columns:minmax(0,1fr)!important; } }
html[data-text-size="double"] body.desktop-mode .an-dialog.an-desktop-layout[open] { display:block; overflow:auto; }
html[data-text-size="double"] .an-desktop-shell { display:block; }
html[data-text-size="double"] .an-desktop-layout :is(.an-persistent-selection,.en-embedded nav) { position:static; }
html[data-text-size="double"] .an-desktop-layout :is(.an-feedback,#anLegend) { max-height:none; }
html[data-text-size="double"] body.desktop-mode .ss-workflow[open] { display:block; overflow:auto; }
html[data-text-size="double"] body.desktop-mode .ss-workflow :is(.ss-studio-frame,.ss-workflow-main) { display:block; overflow:visible; }
html[data-text-size="double"] body.desktop-mode .ss-workflow :is(.ss-studio-rail,.ss-editor,.ss-model-panel) { height:auto; max-height:none; overflow:visible; }
html[data-text-size="double"] body.desktop-mode .ss-workflow .ss-step-nav { flex-direction:row; flex-wrap:wrap; }
html[data-text-size="double"] body.desktop-mode .ss-workflow .ss-step-nav>button { flex:1 1 240px; width:auto; }
html[data-text-size="double"] body.desktop-mode .ss-workflow :is(.en-header,.ss-studio-title) { flex-wrap:wrap; }
html[data-text-size="double"] body.desktop-mode .ss-workflow .ss-workflow-footer { display:flex; flex-wrap:wrap; position:static; }
html[data-text-size="double"] body.desktop-mode .ss-workflow .ss-preview-panel { max-height:none; overflow:visible; }
body .tabbar button span { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.data-tools-dialog>.card { clear:both; }
.data-tools-dialog>button:first-of-type { margin-bottom:1rem; }
html[data-text-size="double"] { --navigation-height:112px; }
html[data-text-size="double"] body:not(.desktop-mode) .context-bar { position:static; }
html[data-text-size="double"] body:not(.desktop-mode) .save-bar { bottom:calc(124px + env(safe-area-inset-bottom)); }
html[data-text-size="double"] body:not(.desktop-mode) main { padding-bottom:160px; }
/* Keep the final control clear of an expanded field section's border. */
#field details[open] { padding-bottom:16px; }
#field details[open] > :last-child { margin-bottom:0; }
#field #geologicalDomainEditor + .actions { margin-block:16px; }
/* Keep all three live angles and Capture together on narrow field screens. */
#contactOrientationCard .orientation-display { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
#contactOrientationCard .orientation-display>div:first-child { grid-column:auto; }
#contactOrientationCard .orientation-display>div { min-width:0; padding:10px 4px; }
#contactOrientationCard .orientation-display span { font-size:.75rem; line-height:1.3; min-height:2.6em; overflow-wrap:anywhere; }
#contactOrientationCard .orientation-display strong { font-size:1.75rem; }
.sensor-capture-panel { display:grid; gap:10px; }
.sensor-capture-panel .orientation-display,.sensor-reference,.sensor-capture-panel .notice { margin:0; }
.sensor-reference { color:var(--muted); font-size:.875rem; line-height:1.4; overflow-wrap:anywhere; }
.sensor-capture-panel #captureSensor { width:100%; min-height:54px; }
.sensor-capture-feedback { margin:0; min-height:2.8em; font-size:.875rem; line-height:1.4; overflow-wrap:anywhere; }
.sensor-poor-review { display:flex; align-items:start; gap:8px; font-size:.875rem; }
.sensor-poor-review[hidden] { display:none; }
.ss-input-reference figure { margin:12px 0; }
.ss-input-reference figure img { display:block; width:100%; height:auto; border-radius:5px; background:#fff; }
.ss-input-reference figcaption { font-size:.8125rem; line-height:1.4; margin-top:6px; color:var(--muted); }
.field-reference-table { width:100%; border-collapse:collapse; font-size:.875rem; line-height:1.45; }
.field-reference-table caption { text-align:left; font-weight:700; padding-block:8px; }
.field-reference-table :is(th,td) { padding:8px; border:1px solid var(--line); vertical-align:top; text-align:left; white-space:normal; overflow-wrap:anywhere; }
.field-reference-table th { width:28%; }
#contactOrientationCard .sensor-meta { font-size:.8125rem; gap:6px; }
#contactOrientationCard .sensor-meta span { padding:3px 6px; border-radius:5px; }
#contactOrientationCard .sensor-guidance { margin:16px 0 0; }
@media(max-width:520px) {
 #contactOrientationCard .section-head { margin-bottom:12px; }
 #contactOrientationCard .section-head h2 { font-size:1.25rem; }
 #contactOrientationCard .sensor-capture-panel .notice { font-size:.875rem; line-height:1.4; padding:8px; }
 html[data-text-size="double"] #contactOrientationCard .orientation-display { grid-template-columns:1fr; }
}

/* Readable field labels and a glove-friendly backup action. */
body:not(.desktop-mode) #fieldContext label{font-size:calc(.8125rem * var(--field-scale,1))}
body:not(.desktop-mode) .version,body:not(.desktop-mode) #appVersion{font-size:calc(.8125rem * var(--field-scale,1))}
body:not(.desktop-mode) #cloudBadge{min-height:44px}
