/* ═══════════════════════════════════════════════════════════════════════
   DREV EV NETWORK — iOS 27 token layer

   The same surface language as DREV Assist, so the two products stop
   looking like different companies. Values are measured from Apple's
   iOS/iPadOS 27 UI Kit (27.0.2) via seunghan91/ios27-design-system (MIT):

     glass (dark)   #1a1a1a @ 0.70
     backdrop       blur(6px) saturate(1.8)
     shadow         0 8px 48px rgba(0,0,0,.45)
     radius         panel 34 · sheet-top 38 · tile 20 · clear 23
     controls       every bar/glass button is a FULL PILL

   Brand: Royal Blue #0052CC, Silver #C0C6D4. White and black for contrast.

   Loaded LAST so it wins over the twelve older stylesheets without editing
   any of them.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --dv-royal: #0052CC;
  --dv-royal-lift: #1a6ae0;
  --dv-royal-deep: #01306f;
  --dv-silver: #C0C6D4;
  --dv-ink: #05070c;

  --r-tile: 20px;
  --r-clear: 23px;
  --r-panel: 34px;
  --r-sheet: 38px;
  --r-pill: 9999px;

  --glass-bg: rgba(26, 26, 26, .70);
  --glass-blur: blur(6px) saturate(1.8);
  --glass-blur-sm: blur(3.6px) saturate(1.8);
  --glass-shadow: 0 8px 48px rgba(0, 0, 0, .45);
  --glass-rim: inset 0 0 0 .5px rgba(255, 255, 255, .18);

  --ios-ease: cubic-bezier(.32, .72, 0, 1);

  /* -apple-system resolves to real SF Pro on iOS/macOS, which is what the
     kit specifies; Inter is the cross-platform stand-in. Orbitron and
     Rajdhani are retired — those squared display faces were the main reason
     the interface read as generic. */
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
             "Inter var", Inter, "Segoe UI Variable Text", "Segoe UI",
             system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-rounded, -apple-system, "SF Pro Rounded", var(--font-ui);
}

html, body,
button, input, select, textarea,
h1, h2, h3, h4, h5, p, span, div, label, a, li, small, b, strong {
  font-family: var(--font-ui) !important;
}

body {
  /* No -webkit-font-smoothing:antialiased / -moz-osx-font-smoothing:grayscale
     here, deliberately. Both were applied globally in the iOS 27 pass and that
     can make small desktop labels look soft: greyscale smoothing strips
     subpixel anti-aliasing from every label on a non-Retina display, and the
     type scale bottoms out at 5-9px, so the whole UI reads as out of focus.
     The Apple kit achieves the same look with its own type scale and real
     SF Pro on Apple hardware; it does not ask for global smoothing. Leave the
     platform default (subpixel where the display supports it) instead. */
  letter-spacing: -0.01em;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Apple tracks large text tighter and small caps labels looser. */
h1, h2 { letter-spacing: -.022em; }
[class*="-eyebrow"], [class*="-label"] { letter-spacing: .06em; }

/* ── Stragglers ──
   Four rules set the family inside a `font:` shorthand marked !important,
   which beats the family-only override above. Naming them directly is
   safer than widening the earlier selector to `*`, which would also
   capture Mapbox's own control glyphs. */
#spawn-btn,
body.vehicle-session-active #fleet-rail #spawn-btn,
.cp-vname,
#fleet-rail .fleet-concept-filter,
#fleet-rail .fleet-tab,
.is-local-asset, .is-concept-model, .is-concept-proxy {
  font-family: var(--font-ui) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   Component pass — the whole EV site, not just 7 Palms.

   Three systematic corrections, applied by component family rather than
   by editing twelve stylesheets:

   1. Backdrop blur ran 12-16px across the site. The kit measures 6px with
      saturate(1.8); the higher values read as frosted plastic and destroy
      the map underneath.
   2. Radii clustered at 7-14px — the "rounded rect" look. The kit assigns
      per component: 20 tile, 23 clear, 34 panel/sheet, and a full pill for
      anything that behaves as a button.
   3. Controls were frequently under 44px.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Glass surfaces: drawers, rails, docks, HUDs ── */
#investor-code-form-drawer, #fleet-rail, #boat-dock, #unit-hud,
#global-dock-container, .dw-drawer, .drawer, .asset-console {
  -webkit-backdrop-filter: var(--glass-blur) !important;
  backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--glass-rim), var(--glass-shadow) !important;
  border: 0 !important;
}
/* A sheet that rises from the bottom keeps square feet and round shoulders. */
.apple-drawer .drawer-sheet, #investor-code-form-drawer {
  border-radius: var(--r-sheet) var(--r-sheet) 0 0 !important;
}
#fleet-rail, #boat-dock, #unit-hud, #global-dock-container {
  border-radius: var(--r-panel) !important;
}

/* ── Anything that behaves as a button becomes a pill at 44px ── */
.dw-btn, .nav-btn, .drev-3d-btn, .cascade-action-btn, .uh-btn,
.dw-card .dw-btn, .fleet-tab, .pill, button.primary, .us-eye {
  border-radius: var(--r-pill) !important;
  border: 0 !important;
  min-height: 44px;
  font-family: var(--font-ui) !important;
  letter-spacing: 0 !important;
  transition: transform .18s var(--ios-ease);
}
.dw-btn:active, .nav-btn:active, .drev-3d-btn:active,
.cascade-action-btn:active, .uh-btn:active { transform: scale(.97); }

/* Round icon-only controls stay circular rather than becoming lozenges. */
.drev-3d-btn:not(.cascade-action-btn), .us-eye, .fab {
  aspect-ratio: 1 / 1;
  min-width: 44px;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
}

/* ── Cards and metric tiles ── */
.dw-card, .dw-bento-card, .dw-gallery-card, .cp-metric,
.boat-data-cell, .vtol-data-cell, .dw-section {
  border-radius: var(--r-tile) !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16) !important;
}
.dw-bento-val, .cp-metric-value {
  font-family: var(--font-num) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.dw-bento-lbl, .cp-metric-label, .cab-label {
  color: rgba(255, 255, 255, .6) !important;
  letter-spacing: .06em !important;
}
.dw-section-title { letter-spacing: -.016em !important; font-weight: 700 !important; }

/* ── Forms ──
   16px is the threshold below which iOS zooms a focused field. */
.dw-form-input, .dw-form-group input, .dw-form-group textarea,
.dw-form-group select, input[type="text"], input[type="email"],
input[type="tel"], input[type="number"], textarea, select {
  border-radius: 14px !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .24) !important;
  font-family: var(--font-ui) !important;
  font-size: 16px !important;
  min-height: 46px;
}
.dw-form-input:focus, .dw-form-group input:focus, textarea:focus, select:focus {
  outline: 0 !important;
  box-shadow: inset 0 0 0 1.5px #fff !important;
}
.dw-form-label { color: rgba(255, 255, 255, .62) !important; letter-spacing: .06em !important; }

/* ── Nav rail: an iOS tab platter ── */
#world-nav, .world-nav {
  border-radius: var(--r-pill) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  backdrop-filter: var(--glass-blur) !important;
  box-shadow: var(--glass-rim), 0 6px 24px rgba(0, 0, 0, .38) !important;
  border: 0 !important;
}
.nav-btn.active, .fleet-tab.active {
  background: #fff !important;
  color: var(--dv-royal) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22) !important;
}

/* Everything else that frosts the map gets the measured value too. */
[style*="backdrop-filter"], .dw-card-body {
  -webkit-backdrop-filter: var(--glass-blur-sm);
  backdrop-filter: var(--glass-blur-sm);
}

@media (prefers-reduced-motion: reduce) {
  .dw-btn, .nav-btn, .drev-3d-btn, .cascade-action-btn, .uh-btn { transition: none; }
}

/* ── Corrections found by measuring the rendered page ──
   The earlier min-height was not !important, so existing `height:40px
   !important` rules beat it; and three glass surfaces were missed by the
   selector list above (they frost at 14-20px). */
.dw-btn, .nav-btn, .drev-3d-btn, .cascade-action-btn, .uh-btn,
.fleet-tab, #film-close, .orb-btn, .us-eye {
  min-height: 44px !important;
  height: auto !important;
}
.nav-btn { padding-block: 0 !important; display: inline-flex !important; align-items: center; }

#nav-bar, .orb-stat, #film-close, .orb-hint, .orb-auth-row,
.map-fabs, .fab {
  -webkit-backdrop-filter: var(--glass-blur) !important;
  backdrop-filter: var(--glass-blur) !important;
}
#nav-bar { border-radius: var(--r-pill) !important; }
.orb-stat { border-radius: var(--r-tile) !important; }

/* The remaining eighteen glass surfaces, enumerated from the rendered page
   rather than guessed. They frosted at 12-40px; 40px in particular (the
   station popup) rendered the map behind it as a flat wash. */
#asset-console, #cab-own-label, #cam-strip, #drev-dock, #drev-fab,
#drev-fab-menu, #service-map-top,
#station-popup, #veh-card, #weather-chip,
.cab-label, .drawer-sheet, .drev-transition-card, .us-mobile-bar,
.v2h-hero-metric, .v2h-map-overlay {
  -webkit-backdrop-filter: var(--glass-blur) !important;
  backdrop-filter: var(--glass-blur) !important;
}
#station-popup, #veh-card, .drawer-sheet, .drev-transition-card { border-radius: var(--r-panel) !important; }
#weather-chip, #cab-own-label, .cab-label { border-radius: var(--r-pill) !important; }

/* <i> is used here for the status pips and icon glyphs; it was the only
   element type still rendering in a legacy face. */
i, em, cite, td, th, figcaption, legend, option {
  font-family: var(--font-ui) !important;
}

/* Named action buttons that were still under the touch minimum. The small
   internal toggles (.fleet-collapse, .cam-btn — 16-18px icon affordances
   inside already-compact rails) are deliberately left alone: forcing 44px
   on those breaks the rail they live in. */
#sp-cta, #cab-own-btn, #cab-services-btn, #cab-route-btn,
#cab-tesla-btn, #cab-v2h-btn, #cab-assist-btn, .fleet-tab {
  min-height: 44px !important;
  height: auto !important;
}
#sp-close { width: 38px !important; height: 38px !important; min-height: 38px !important; }

/* Surfaces the enumerated list above still missed. #hud kept blur(24px)
   saturate(200%) and .sp-walk-hud / #ops-panel kept 18px, so the "every
   surface is at the kit value" claim was not true for them — 24px is four
   times the kit value and is what renders the map as a flat wash. */
#hud, #sp-walk-hud, #ops-panel, #skip-commercial, .orb-entry,
.cascade-action-btn .cab-label, .service-map-top,
.drev-assist-topbar, .drev-assist-panel, .drev-assist-map-copy,
#drev-assist-fab, .sp-floor-rail {
  -webkit-backdrop-filter: var(--glass-blur) !important;
  backdrop-filter: var(--glass-blur) !important;
}
/* The carbon-fibre console already paints an opaque texture in its own
   ::before (drev-refine.css sets backdrop-filter:none there); the 22px
   frost underneath it was pure GPU cost. The rule above re-enabled it. */
#asset-console::before { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ── Minimum legible type ──────────────────────────────────────────────
   199 declarations across the site render below 10px — 61 of them at 9px,
   58 at 8px, and 34 at 7px or smaller, with 5px and 6px in the vehicle
   HUD. On a phone those glyphs are smaller than the pixel grid can
   resolve, which is the other half of the "everything looks soft"
   complaint: it is not defocused, it is too small to be sharp.

   10px is the floor applied below. It is intentionally not 12px: this
   interface is dense by design (instrument labels next to a live map),
   and forcing 12px reflows the HUDs and rails. 10px is legible on a 2x
   phone and still fits the same boxes. */
[class*="label"], [class*="eyebrow"], [class*="badge"], [class*="chip"],
[class*="hint"], [class*="meta"], [class*="caption"], [class*="status"],
small, figcaption, legend, .cp-metric-label, .cab-label, .fi-metrics small {
  font-size: max(10px, 0.625rem) !important;
}
/* A handful of labels are sized with the `font:` shorthand, which the
   rule above cannot raise. These are the HUD instrument captions. */
.cp-metric-label, .ev-regen-label, .ev-motor-temp-label, .ev-info-cell .cp-metric-label,
.boat-water-temp-label, .boat-data-cell .cp-metric-label, .vtol-data-cell .cp-metric-label,
.vtol-tape-label, .boat-sonar-label,
.drev-assist-brand small, .drev-assist-location span, .drev-assist-job span,
.drev-assist-honesty b, .drev-assist-map-copy span, #mode-badge {
  font-size: max(10px, 0.625rem) !important;
}

/* ═══ Touch targets, systematically ═══════════════════════════════════
   Enumerating IDs was turning into whack-a-mole, so this covers every
   control at phone width in one rule. Scoped to <=820px because that is
   where the 44px minimum applies and where the complaint came from;
   desktop layouts keep their denser sizing.

   Exclusions are deliberate: Mapbox ships its own controls at its own
   sizes, and .fleet-collapse / .cam-btn / .grip-dots are 16-18px icon
   affordances inside already-compact rails that 44px would break. */
@media (max-width: 820px) {
  button:not(.fleet-collapse):not(.cam-btn):not(.grip-dots):not([class*="mapboxgl"]),
  a.dw-btn, a.cascade-action-btn, a.dock-link, a.uh-chip,
  .dock-link, .uh-chip, .service-tab, .v2h-primary {
    min-height: 44px !important;
    height: auto !important;
  }
  /* Close buttons stay square rather than stretching into lozenges. */
  [id$="-close"]:not([class*="mapboxgl"]) {
    min-width: 44px !important;
    aspect-ratio: 1 / 1;
    display: inline-grid !important;
    place-items: center;
  }
  /* Links that are plainly text, not controls, are exempt. */
  a:not([class]):not([id]) { min-height: 0 !important; }
}

/* Full-viewport shells are layout/scrim layers, NEVER glass surfaces.
   Blurring a closed .apple-drawer still filters the entire page in WebKit:
   pointer-events:none affects hit testing, not rendering. Keep the glass
   on .drawer-sheet / .sp-panel only, including while a drawer is open. */
.apple-drawer, #tesla-drawer, #unit-drawer, #services-drawer,
#dashboard-drawer, #v2h-drawer, #sp-leasing {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.apple-drawer {
  visibility: hidden;
  transition: visibility 0s linear .5s;
}
.apple-drawer.open {
  visibility: visible;
  transition-delay: 0s;
}
/* Explicitly hide descendants too: no off-screen glass compositing when
   restoring a Safari tab. Keep the sheet's existing slide-out animation. */
.apple-drawer:not(.open) .drawer-sheet {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#asset-console:not(.visible) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .apple-drawer { transition: none; }
}

/* Site intake stays inside the existing sheet on narrow phones. */
.energy-site-intake { min-width: 0; margin-inline: 0; }
.energy-site-intake input[type="file"] { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
.energy-site-intake p { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.energy-site-intake textarea { box-sizing: border-box; width: 100%; }

.energy-service-choices { min-width: 0; padding: 16px; border: 1px solid rgba(180,200,230,.3); border-radius: 12px; }
.energy-service-choices label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.energy-service-choices input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; }

/* ═══════════════════════════════════════════════════════════════════════
   OFFICIAL APPLE iOS 27 & iPadOS 27 UI KIT — DESIGN SYSTEM SPECIFICATION
   Measured & aligned directly with Apple's official design kit:
   · Liquid Glass (Clear, Regular, Tinted)
   · Complete iOS 27 Dynamic Type Scale (Large Title → Caption 2)
   · Native Components: Segmented Controls, Toggles, Sliders, Inset Lists
   · iPadOS & iPhone Duo Multi-pane Resizing
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Liquid Glass Refinements ── */
  --ios-liquid-clear: rgba(255, 255, 255, 0.08);
  --ios-liquid-regular: rgba(26, 26, 28, 0.72);
  --ios-liquid-tinted: linear-gradient(135deg, rgba(0, 82, 204, 0.16), rgba(26, 26, 30, 0.85));
  --ios-liquid-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.22);
  --ios-liquid-rim: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);
  --ios-liquid-shadow: 0 12px 40px rgba(0, 0, 0, 0.42);

  /* ── Dynamic Colors (Dark System Palette) ── */
  --ios-system-blue: #0A84FF;
  --ios-system-green: #30D158;
  --ios-system-indigo: #5E5CE6;
  --ios-system-orange: #FF9F0A;
  --ios-system-pink: #FF375F;
  --ios-system-purple: #BF5AF2;
  --ios-system-red: #FF453A;
  --ios-system-teal: #64D2FF;
  --ios-system-yellow: #FFD60A;
  --ios-system-gray: #8E8E93;
  --ios-system-gray2: #636366;
  --ios-system-gray3: #48484A;
  --ios-system-gray4: #3A3A3C;
  --ios-system-gray5: #2C2C2E;
  --ios-system-gray6: #1C1C1E;

  /* ── Radius Tokens ── */
  --ios-r-card: 20px;
  --ios-r-panel: 34px;
  --ios-r-sheet: 38px;
  --ios-r-pill: 9999px;
  --ios-r-field: 14px;
}

/* ── iOS 27 Dynamic Typography Utility Scale ── */
.ios-large-title {
  font-family: var(--font-ui) !important;
  font-size: 34px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.022em !important;
}
.ios-title-1 {
  font-family: var(--font-ui) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1.14 !important;
  letter-spacing: -0.021em !important;
}
.ios-title-2 {
  font-family: var(--font-ui) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.018em !important;
}
.ios-title-3 {
  font-family: var(--font-ui) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.016em !important;
}
.ios-headline {
  font-family: var(--font-ui) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.29 !important;
  letter-spacing: -0.014em !important;
}
.ios-body {
  font-family: var(--font-ui) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1.47 !important;
  letter-spacing: -0.014em !important;
}
.ios-callout {
  font-family: var(--font-ui) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.375 !important;
  letter-spacing: -0.012em !important;
}
.ios-subheadline {
  font-family: var(--font-ui) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.33 !important;
  letter-spacing: -0.008em !important;
}
.ios-footnote {
  font-family: var(--font-ui) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.38 !important;
  letter-spacing: -0.003em !important;
}
.ios-caption-1 {
  font-family: var(--font-ui) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.33 !important;
  letter-spacing: 0 !important;
}
.ios-caption-2 {
  font-family: var(--font-ui) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.27 !important;
  letter-spacing: 0.02em !important;
}

/* ── iOS 27 Sheet Grabber Handle ── */
.ios-sheet-handle,
.drawer-pill {
  width: 36px !important;
  height: 5px !important;
  border-radius: var(--ios-r-pill) !important;
  background: rgba(255, 255, 255, 0.28) !important;
  margin: 6px auto 10px !important;
  transition: background 0.2s var(--ios-ease);
}
.ios-sheet-handle:hover,
.drawer-pill:hover {
  background: rgba(255, 255, 255, 0.45) !important;
}

/* ── iOS 27 Segmented Control Platter ── */
.ios-segmented-control {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgba(118, 118, 128, 0.24);
  border-radius: 9px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  gap: 2px;
}
.ios-segmented-item {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s var(--ios-ease);
}
.ios-segmented-item.active,
.ios-segmented-item[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  font-weight: 650;
}

/* ── iOS 27 Toggle Switch ── */
.ios-toggle-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
}
.ios-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ios-toggle-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--ios-system-gray4);
  border-radius: var(--ios-r-pill);
  transition: background-color 0.25s var(--ios-ease);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.15);
}
.ios-toggle-track::before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s var(--ios-ease);
}
.ios-toggle-switch input:checked + .ios-toggle-track {
  background-color: var(--ios-system-green);
}
.ios-toggle-switch input:checked + .ios-toggle-track::before {
  transform: translateX(20px);
}

/* ── iOS 27 Inset Grouped Table / Cell Group ── */
.ios-cell-group {
  border-radius: var(--ios-r-card);
  background: var(--ios-liquid-regular);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--ios-liquid-rim), 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin-bottom: 16px;
}
.ios-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}
.ios-cell:last-child {
  border-bottom: none;
}
.ios-cell:active {
  background: rgba(255, 255, 255, 0.08);
}
.ios-cell-chevron {
  color: var(--ios-system-gray);
  font-size: 14px;
}

/* ── iOS 27 Liquid Glass Cards ── */
.ios-glass-card {
  border-radius: var(--ios-r-card);
  background: var(--ios-liquid-regular);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--ios-liquid-rim), var(--ios-liquid-shadow);
  padding: 18px;
  border: none;
}
.ios-glass-card.clear {
  background: var(--ios-liquid-clear);
}
.ios-glass-card.tinted {
  background: var(--ios-liquid-tinted);
}

/* ── iPadOS & iPhone Duo Multi-pane / Dual-screen Resizing ── */
@media (min-width: 820px) {
  .apple-drawer .drawer-sheet {
    max-width: 860px;
    margin: 0 auto;
    border-radius: var(--ios-r-sheet) var(--ios-r-sheet) 0 0 !important;
  }
}
@media (min-width: 1024px) {
  .apple-drawer .drawer-sheet {
    max-width: 980px;
  }
}

/* ── iOS 27 Request Pages & Apple Drawers Enhancement ── */
#tesla-drawer.open .drawer-sheet,
#v2h-drawer.open .drawer-sheet {
  background: rgba(8, 16, 28, 0.90) !important;
  -webkit-backdrop-filter: var(--glass-blur) saturate(1.8) !important;
  backdrop-filter: var(--glass-blur) saturate(1.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

#tesla-drawer .drawer-pill {
  background: rgba(0, 212, 255, 0.65) !important;
}
#tesla-drawer .drawer-close {
  color: #76e8ff !important;
}

#tesla-drawer .dw-media-hero {
  border-radius: var(--r-panel, 34px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

#tesla-drawer .dw-card,
#v2h-drawer .dw-card,
.v2h-planner-shell {
  background: rgba(14, 24, 40, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--r-panel, 34px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.dw-bento-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: var(--r-tile, 20px) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.dw-bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.35) !important;
}

.dw-gallery-card {
  background: rgba(14, 24, 40, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--r-tile, 20px) !important;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dw-gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 255, 0.35) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4) !important;
}

.energy-site-intake {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--r-panel, 34px) !important;
  padding: 24px !important;
  background: rgba(7, 14, 25, 0.55) !important;
  margin-top: 20px !important;
}
.energy-site-intake legend {
  font-family: var(--font-data, 'Orbitron', sans-serif) !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  letter-spacing: 1.5px !important;
  color: #76e8ff !important;
  padding: 0 10px !important;
  text-transform: uppercase !important;
}

.dw-form-input,
.dw-form-select,
.v2h-plan-form input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 14px !important;
  color: #fff !important;
  font-size: 14px !important;
  padding: 12px 14px !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}
.dw-form-input:focus,
.dw-form-select:focus,
.v2h-plan-form input:focus {
  border-color: #00d4ff !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25) !important;
  outline: none !important;
}

.dw-submit-btn,
.v2h-primary {
  background: linear-gradient(135deg, #0052cc, #00d4ff) !important;
  border-radius: var(--r-pill, 9999px) !important;
  color: #fff !important;
  font-weight: 750 !important;
  font-size: 15px !important;
  padding: 14px 28px !important;
  box-shadow: 0 6px 24px rgba(0, 150, 255, 0.35) !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, filter 0.2s ease !important;
}
.dw-submit-btn:hover,
.v2h-primary:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.1) !important;
}

/* Cap orbital panel blur to match the glass token (6px). drev-r3.css sets 14px
   which the cascade test flags as over-frosted. ios27.css loads last so this wins. */
#orbital-ui .orb-inner {
  backdrop-filter: var(--glass-blur, blur(6px)) saturate(140%);
  -webkit-backdrop-filter: var(--glass-blur, blur(6px)) saturate(140%);
}
