/* ==========================================================================
   goRIDEwx — Shared Styles for Dashboard (index.html) + About (wxabout.html)
   Version: V4.0
   Notes:
   - Mobile-first: compact table, no wrapping in cells, headers tidy
   - iOS anti-zoom; Location + GO stay on one line
   - Summary dots are links with no underline
   - Date label splits nicely on phones (dl-left / dl-right)
   ========================================================================== */

/* ===== Base / Tokens ===================================================== */
:root{
  /* Core palette */
  --ink:#1e293b;
  --muted:#64748b;
  --line:#e2e8f0;
  --chip:#f1f5f9;
  --green:#00796B;
  --yellow:#fdd835;
  --red:#E65100;

  /* Time-orientation (CoreMX + daily tables) */
  --time-past-bg:    #f1f3f5;
  --time-past-text:  #9aa0a6;
  --time-now-bg:     #c7d2fe;
  --time-now-text:   #1e293b;
  --time-future-bg:  #e8edff;
  --time-future-text:#334155;
}

html{ -webkit-text-size-adjust:100%; }
html,body{ margin:0; padding:0; }
/* body{ margin:16px; color:var(--ink); font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; } */
body{ margin:8px; color:var(--ink); font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; }
h1{ margin:0 0 6px; font-size:20px; text-align:left; }
h2{ margin:22px 0 8px; } h3{ margin:18px 0 6px; } h4{ margin:10px 0 2px; }
a{ color:#0b57d0; text-decoration:underline; }
.muted{ color:var(--muted); }

/* Disabled buttons — global */
button:disabled,
button[disabled]{
  opacity: 0.45;              /* primary signal */
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(30%);
}

/* Prevent hover/active effects when disabled */
button:disabled:hover,
button:disabled:active{
  transform: none;
  box-shadow: none;
}


/* ===== Topbar (hamburger + title + action icon) ========================== */
/* .topbar{ display:flex; align-items:center; gap:10px; margin-bottom:8px; } */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between; /* needed for left menu + centered logo + right icon */
  gap:10px;
  width:100%;
  max-width:460px;     /* constrain on desktop */
  margin:0 auto 8px;   /* center + keep your bottom spacing */
  padding:0 10px;      /* optional but helps on narrow screens */
  box-sizing:border-box;
}

/* Keep ipad aligned */
@media (min-width: 600px){
  .topbar{
    margin-left:14px;
    margin-right:auto;
  }
}

.menu-btn{ display:inline-grid; place-items:center; width:36px; height:36px; padding:0;
  border:1px solid #A9A9A9; border-radius:8px; background:#fff; color:#333; cursor:pointer; }
.menu-btn svg{ width:22px; height:22px; }
.menu-panel{ position:absolute; z-index:9998; margin-top:4px; background:#fff; border:1px solid #A9A9A9;
  border-radius:10px; box-shadow:0 10px 28px rgba(0,0,0,.18); min-width:180px; padding:6px; }
.menu-panel.hidden{ display:none; }
.menu-item{ display:block; padding:10px 12px; border-radius:8px; color:#0b57d0; text-decoration:none; font-weight:600; }
.menu-item:hover,.menu-item:focus{ background:#f3f6fc; outline:none; }

/* Visually hidden but accessible (for the optional <h1>) and for filtering condition codes based on default color */
/* where Green, Yellow and Red are in a hidden span in the condition label */
.sr-only{
  position:absolute!important; 
  width:1px!important; 
  height:1px!important;
  padding:0!important; 
  margin:-1px!important; 
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important; 
  white-space:nowrap!important; 
  border:0!important;
}

/* Nudge logo toward the right to match Location input alignment */
.brand-logo{
  height: 50px;       /* keep your chosen sizes */
  width: auto;
  margin-left: 30px;  /* tweak until it lines up—start around 12–16px */
}

@media (min-width: 600px){ .brand-logo{ height: 60px; } }
@media (min-width: 1024px){ .brand-logo{ height: 80px; } }
@media (min-width: 860px){
  .topbar{
    margin-left:14px;   /* or 16px to match gutters */
    margin-right:auto;  /* stop centering */
  }
}



/* ===== Controls row (form#controls.row) ================================= */
.row{ display:flex; flex-wrap:wrap; align-items:center; column-gap:12px; row-gap:0; margin-bottom:8px; font-size:16px; }
.flex-break{ flex-basis:100%; height:0; margin:0; }
label,.status{ font-size:1em; }
input[type="text"]{ font-size:1em; padding:8px 10px; min-width:220px; }
button{ font-size:1em; padding:8px 12px; cursor:pointer; }
.toggle label{ font-size:1em; }
#dashboardToggle{ transform:scale(1.15); transform-origin:left center; }

/* Keep Location + GO on one line (mobile-first) */
#controls.row{ column-gap:6px; }
#controls label[for="q"]{ flex:0 0 auto; white-space:nowrap; }
/* #q{ flex:1 1 0%; width:0; min-width:0; max-width:100%; padding-inline:8px; } */

#q{ flex:1 1 0%; width:0; min-width:0; max-width:100%; padding-inline:8px; }
/* #q{min-width:0; flex:1 1 auto;} */
#q{min-width:0 !important;}


#go{ flex:0 0 auto; white-space:nowrap; }

/* iOS anti-zoom for real controls; keep .th-help tiny later */
input[type="text"],button:not(.th-help):not(.th-info):not(.actions-info-btn),select,textarea{ font-size:16px; line-height:1.2; }

/* ===== Summary row & dots =============================================== */
#summary{ display:flex; align-items:center; gap:12px; }

.sum-dot{ width:18px; height:18px; border-radius:50%; border:1px solid #999;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; line-height:0; user-select:none; }

/*  Likely unused at this point .sum-neutral{ background:#e0e0e0; color:#555; }
.sum-green{ background:#2e7d32; color:#fff; }
.sum-yellow{ background:#fdd835; color:#000; }
.sum-red{ background:#c62828; color:#fff; }
*/

/* plus/minus drawing (for any legacy uses) */
.sum-dot.sym-plus,.sum-dot.sym-minus{ position:relative; font-size:0; }
.sum-dot.sym-plus::before,.sum-dot.sym-plus::after,.sum-dot.sym-minus::before{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:currentColor; }
.sum-dot.sym-plus::before{ width:12px; height:2px; } .sum-dot.sym-plus::after{ width:2px; height:12px; }
.sum-dot.sym-minus::before{ width:12px; height:2px; }
/* summary dot links: never underline */
#summary a,#summary a:link,#summary a:visited,#summary a:hover,#summary a:active,#summary a:focus,
.sum-dot a,.sum-dot,.sum-dot *{ text-decoration:none !important; }
#summary a{ display:inline-block; line-height:0; }
#summary a:focus-visible{ outline:2px solid #4c9ffe; outline-offset:2px; border-radius:50%; }

/* ===== Date label (split spans) ========================================= */
/* .date-label{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:0; } */
/* .date-label .dl-left{ flex:0 0 100%; } */
/* .date-label .dl-sep{ display:none; } */ /* hide hyphen on mobile */
/* .date-label .dl-right{ flex:0 0 100%; margin-top:2px; } */
/* @media (min-width: 481px){
  .date-label{ flex-wrap:nowrap; }
  .date-label .dl-left{ flex:0 0 auto; }
  .date-label .dl-sep{ display:inline; margin:0 4px; }
  .date-label .dl-right{ flex:0 0 auto; margin-top:0; }
}
*/

.day{ margin-bottom:20px; }

/* ===== Table (mobile-first) ============================================= */
table.day-table{ border-collapse:collapse; margin-top:4px; display:block; width:100%;
  font-size:clamp(12px,3.3vw,14px); }
th,td{ border:1px solid #A9A9A9; padding:6px; text-align:center; }
th{ background:#fff; position:sticky; top:0; font-size:clamp(10px,2.7vw,12px); line-height:1.05; }
/* Cells: never wrap */
.day-table td{ white-space:nowrap; word-break:normal; overflow:hidden; text-overflow:ellipsis; }
/* Time and Icon extra tight */
.day-table th.th-time,.day-table td.td-time{ padding-inline:2px; }

/* Likely no longer used
.day-table th.th-icon{ padding-inline:4px; }
.day-table th.th-icon .go-head svg{ width:16px; height:16px; }
.day-table th.th-icon .go-head svg polygon{ fill:currentColor; opacity:.9; }
*/

/* Header help icon drops to own line under the label on mobile */
.day-table th .th-help{
  display:block; width:14px; height:14px; line-height:14px; font-size:10px;
  margin:2px auto 0; border:1px solid #999; border-radius:50%; background:#fff; color:#444;
}
.day-table th .th-help:focus{ outline:2px solid #4c9ffe; outline-offset:1px; }
/* Wider screens: headers don’t wrap and i-button inline if there’s room */
@media (min-width: 481px){
  table.day-table{ display:inline-block; width:auto; font-size:14px; }
  th,td{ padding:8px; }
  .day-table th{ white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
  .day-table th .th-help{ display:inline-flex; margin:0 0 0 4px; vertical-align:super; }
}

/* START New Day Table Styles for the V4.0 Toggles */

/* Day tools bar: left/right layout */
.day-tools {
  display: flex;
  justify-content: space-between;  /* left/right */
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.5rem;
  /* padding-right: 80px;  bring the pill in more to the left for better visual alignment */
  max-width: 385px;   /* ⬅️ constrain the entire tool row */
  width: 100%;
  margin-left: 2px;
  margin-right: auto;  /* center it under the table */  
}

/* Common label text */
.day-tools .toggle-text {
  margin-right: 0.35rem;
  white-space: nowrap;
}

/* Generic toggle (for Show Details) */
.day-tools .toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* Hide the raw checkbox; we’ll style the switch */
.day-tools .toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* The pill “track” */
.day-tools .toggle-switch {
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #ccc;
  position: relative;
  flex-shrink: 0;
}

/* The thumb */
.day-tools .toggle-switch::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);   /* ⬅️ PERFECT vertical centering */
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

/* Checked state: Show Details ON */
.day-tools .toggle input[type="checkbox"]:checked + .toggle-switch {
  background: #2e7d32; /* your go-green */
}

.day-tools .toggle input[type="checkbox"]:checked + .toggle-switch::before {
  transform: translate(1rem, -50%);  /* ⬅️ keep vertical centering */
}

/* Right-hand group */
.day-tools-right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* “Show #s” toggle button styling */
.day-tools .btn-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 1.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid #2e7d32;
  background: #2e7d32;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

/* Pressed vs not-pressed states */
.day-tools .btn-view-toggle[aria-pressed="true"] {
  background: #fff;
  color: #2e7d32;
}

/* Show All Clicked so disable Show #s */
.day-tools .toggle input:disabled + .toggle-switch {
  background: #ddd !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.day-tools .toggle input:disabled + .toggle-switch::before {
  background: #f5f5f5;
}

/* START of custom marker settings to solve a problem when we added the lightbar */

/* Hide native marker */
details.day-collapse > summary::-webkit-details-marker{ display:none; }
details.day-collapse > summary::marker{ content:""; }
details.day-collapse > summary{ list-style:none; cursor:pointer; }

/* Stack */
.sumstack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

/* .sumstack .lightbar{
  margin-left: 28px;  
} */

.sumstack .lightbar{
  margin: 6px 3px 4px 3px;  /* top right bottom left */
}

/* First row (date + warning) */
.sumhead{
  position: relative;
  padding-left: 28px;        /* was 28 marker lane */
  display:flex;
  align-items: baseline;
  gap: 8px;
}

/* Custom caret aligned to FIRST ROW */
.sumhead::before{
  content:"▸";
  position:absolute;
  /*left: 4px; */            /* was 6px */  
  left: 0px;                 /* was 6px */    
  top: 0.05em;               /* tweak 0.0–0.2em by eye */
  font-size: 22px;           /* bigger than native */
  font-weight: 700;
  line-height: 1;
  color: var(--ink, #1e293b);
  pointer-events:none;
}

details.day-collapse[open] .sumhead::before{
  transform: rotate(90deg);
  transform-origin: center;
}

/* END of custom marker settings to solve a problem when we added the lightbar */

/* START of Mobile Settings for the carot */

/* Mobile: tighten marker lane + center caret on first row */
@media (max-width: 480px){

  /* shrink the marker lane so date isn't pushed so far right */
  .sumhead{
    padding-left: 22px;          /* try 20–24; 22 is a good start */
    align-items: center;         /* baseline is touchy on mobile fonts */
  }

  /* align the lightbar to the SAME lane as the date */
  .sumstack .lightbar{
    margin-left: 0px;           /* match .sumhead padding-left */
    margin-top: 6px;
    margin-bottom: 4px;
    margin-right: 0;
  }

  /* vertically center caret within the first row */
  .sumhead::before{
    top: 50%;
    left: 0px;
    transform: translateY(-50%); /* true center */
    font-size: 22px;             /* bump if you want: 24 */
  }

  /* keep rotation behavior (add translate so it stays centered when open) */
  details.day-collapse[open] .sumhead::before{
    transform: translateY(-50%) rotate(90deg);
  }
}


/* END of Mobile Settings for the Carot */

/* END Day Table Styles for Toggles */

/* Core-hours focus box */
.core-start td{ border-top:2px solid #444; }
.core-end td{ border-bottom:2px solid #444; }
.core td.core-left{ border-left:2px solid #444; }
.core td.core-right{ border-right:2px solid #444; }

/* ===== Icons & wind arrow =============================================== */
.cond-icon{ width:28px; height:28px; object-fit:contain; }
.wind-icon{ display:inline-block; width:18px; height:18px; vertical-align:middle; transform-origin:50% 50%; color:currentColor; margin-left:2px; }
.wind-icon svg{ display:block; width:100%; height:100%; }

/* ===== Color buckets ===================================================== */
.bg-black{ background:#000; }
.bg-darkblue{ background:#0a3d91; } 
.bg-blue{ background:#1e90ff; }
.bg-lightblue{ background:#add8e6; } 
.bg-green{ background:#53d153; } 
.bg-lightgreen{ background:#a8e6a1; }
.bg-yellowgreen{ background:#DFF4B8; }
.bg-greenblue{ background:#80D49C; } 
.bg-greenyellow{ background:#7EDA64; }
.bg-yellow{ background:#fff799; } 
.bg-orange{ background:#fb8c00; } 
.bg-red{ background:#d32f2f; } 
.bg-brown{ background:#795548; }

.text-white{ color:#fff; } 
.text-black{ color:#000; }


/* ===== V4.0 AQI Colors ================== */
.aqi-val {
  padding: 0 4px;
  border-radius: 3px;
}

/* AQI = 3 → Yellow band */
.aqi-yellow {
  background-color: #fdd835;
  color: #000;
  font-weight: 600;
}

/* AQI = 4 → Red band */
.aqi-red {
  background-color: #c62828;
  color: #fff;
  font-weight: 600;
}

/* AQI > 4 → Black band */
.aqi-black {
  background-color: #000;
  color: #fff;
  font-weight: 600;
}


/* ===== GO indicators ===================================================== */
.go-cell{ background:#fff; position:relative; }
.go-dot{ display:grid; place-items:center; width:18px; height:18px; border-radius:50%;
  font-weight:700; font-size:13px; line-height:1; user-select:none; position:relative; cursor:pointer; }
.go-dot svg{ display:block; }
.go-cell:hover::after{ content:"🔎"; position:absolute; right:-9px; top:-9px; font-size:12px; opacity:.9;
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.25)); pointer-events:none; }
.go-dot.sym-plus,.go-dot.sym-minus{ position:relative; font-size:0; }
.go-dot.sym-plus::before,.go-dot.sym-plus::after,.go-dot.sym-minus::before{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:currentColor; }
.go-dot.sym-plus::before{ width:12px; height:2px; } .go-dot.sym-plus::after{ width:2px; height:12px; }
.go-dot.sym-minus::before{ width:12px; height:2px; }
/* .go-green{ background:#2e7d32; color:#fff; }  now teal see below */
.go-green{ background:#00796B; color:#fff; } 
.go-yellow{ background:#fdd835; color:#000; } 
/* .go-red{ background:#c62828; color:#fff; }  now orange see below */
.go-red{ background:#E65100; color:#fff; } 
.go-neutral{ background:#e0e0e0; color:#000; }
.go-head svg{ width:18px; height:18px; display:inline-block; vertical-align:middle; }
.go-head svg polygon{ fill:#000; }

/* ===== Legend modal ====================================================== */
.legend-modal.hidden{ display:none; }
.legend-modal{ position:fixed; inset:0; z-index:9999; }
.legend-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }
.legend-panel{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(520px,92vw); max-height:85vh; overflow:auto; background:#fff; border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.35); padding:14px 16px; }
.legend-title{ font-weight:700; font-size:17px; margin:0 0 6px; }
.legend-close{ position:absolute; top:6px; right:8px; font-size:20px; background:none; border:0; cursor:pointer; }
.legend-hr{ border-top:1px solid #A9A9A9; margin:8px 0; }
.swatch{ display:inline-block; width:10px; height:10px; border-radius:2px; border:1px solid rgba(0,0,0,.25); margin-right:6px; vertical-align:middle; }
.legend-list{ margin:6px 0 0 0; padding:0; list-style:none; }
.legend-list li{ margin:4px 0; font-size:14px; }
.legend-footnote {font-size: 0.8em; color: var(--muted, #888); margin-top: 0.25em; font-style: italic;}
.legend-link {font-size: 0.8em; color: var(--muted, #888); margin-top: 0.25em;}
/* .legend-label2 span {vertical-align: middle;} */
/* .legend-swatch-square {margin-right: 4px; /* tiny space, matches old look */} * */
.legend-range {margin-right: 16px; /* aligns the arrow column like your screenshot */}
.legend-gozone {font-size: 0.9rem;line-height: 1.2;}

/* Condition Codes Info Modal Dots */
.cc-dot {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  margin-right: 0.35em;
  vertical-align: -0.1em; /* perfect optical alignment */
  box-shadow: 0 0 2px rgba(0,0,0,0.2); /* matches your soft 3D look */
}
.cc-dot.legend-green  { background: var(--green);}
.cc-dot.legend-yellow { background: var(--yellow);}
.cc-dot.legend-red    { background: var(--red);}


/* --- Legend: dot outcome column on modals (Green+/Yellow-/Redx) --- */
.legend-dot{
  white-space: nowrap;
  font-weight: 700;
  opacity: 1.0;          /* subtle by default */
  letter-spacing: .1px;
}

/* Use low-saturation ink (don’t fight the swatches) */
.legend-dot-green{
  color: #00796B;         /* muted green */
}
.legend-dot-yellow{
  color: #fdd835;         /* muted amber #8a6a00 #fdd835 */
}
.legend-dot-red{
  color: #E65100;         /* muted red #8b1a1a - #E65100 */
}

/* Optional: make the score key a bit quieter so the dot meaning reads first */
.legend-key{
  opacity: 0.9;
}

/* Optional: tighten arrows slightly for mobile */
.legend-arrow{
  opacity: 0.6;
  margin: 0 6px;
}

/* Empty dot cell: keeps layout, but removes the circle/halo */
.legend-dot-empty{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  width: 0.9em;   /* keep column alignment */
  height: 0.9em;
  margin-right: 0; /* it’s text now, so no extra spacing */
  opacity: 0;      /* invisible but reserves space */
}

/* Condition Code Modal Info Button with styles specific for Hazards */

/* Hazard mini header + note */
.cc-subhead{
  margin: 8px 0 2px;
  font-weight: 700;
}
.cc-subnote{
  margin: 0 0 8px;
  font-size: 12px;
  opacity: 0.75;
}

/* Micro divider (lighter than your section hr) */
.cc-microhr{
  border: 0;
  border-top: 1px solid rgba(0,0,0,0.12);
  margin: 10px 0;
}

/* Hazard dot: red dot with a white lock overlay */
.cc-dot-hazard{
  /* keep same sizing as your other cc-dot dots */
  background-color: var(--legend-red, #d9534f);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70% 70%;
  /* lock icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M17 9h-1V7a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V7Zm7 12H7v-8h10v8Z'/%3E%3C/svg%3E");
}

/* Hazard override attempt marker */
.cc-flag-warn{
  margin-left: 6px;
  font-weight: 800;
  opacity: 0.95;
}


/* ===== Hour modal ======================================================== */
.modal.hidden{ display:none; }
.modal{ position:fixed; inset:0; z-index:9999; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }
.modal-panel{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(560px,92vw); max-height:90vh; overflow:auto; background:#fff; border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.35); padding:16px 16px 12px; }
@media (min-width:481px){ .modal-panel{ width:min(560px,92vw); } }
@media (max-width:480px){ .modal-panel{ width:94vw; border-radius:12px; } }
.modal-close{ position:absolute; top:6px; right:8px; font-size:22px; background:none; border:0; cursor:pointer; }
.modal-title{ font-weight:700; font-size:18px; color:#2b2b2b; margin-bottom:4px; }
.hr{ border-top:1px solid #A9A9A9; margin:8px 0; }
.line{ display:flex; align-items:center; gap:10px; margin:2px 0; }
.indent{ padding-left:22px; }
.dot-big{ display:inline-grid; place-items:center; width:22px; height:22px; line-height:22px; border-radius:50%; font-size:18px; font-weight:800; }
.line .label{ color:#444; font-size:14px; min-width:110px; }
.line .label::after{ content:":"; margin-left:4px; color:#666; }
.line .value{ font-size:19px; font-weight:800; color:#222; padding:2px 6px; border-radius:6px; }
.line .value.text-white{ color:#fff; } .line .value.text-black{ color:#000; }
.icon-lg{ width:44px; height:44px; object-fit:contain; }
.modal-nav{ display:flex; justify-content:space-between; margin-top:12px; }
button.nav-btn{ font-size:20px; padding:4px 10px; border:1px solid #A9A9A9; background:#f7f7f7; border-radius:8px; cursor:pointer; }

/* V4.0 Pressure gets its own explicit set of colors */
.bg-pressureMinus4 {background:#A92B32; color: #fff !important;}
.bg-pressureMinus3 {background:#CE3C3D; color: #fff !important;}
.bg-pressureMinus2 {background:#DD7464; color: #fff !important;}
.bg-pressureMinus1 {background:#F6D1BA; color: #fff !important;}
.bg-pressureZero   {background:#5198B1; color: #000 !important;}
.bg-pressurePlus1  {background:#3677A1; color: #fff !important;}
.bg-pressurePlus2  {background:#2D669A; color: #fff !important;}
.bg-pressurePlus3  {background:#2A4793; color: #fff !important;}
.bg-pressurePlus4  {background:#2A368E; color: #fff !important;}



/* ===== App Notes (wxabout.html) ========================================= */
@media (max-width:900px){
  h1{ font-size:clamp(20px,3.6vw,28px); }
  h2{ font-size:clamp(18px,3.2vw,22px); }
  h3{ font-size:clamp(16px,2.8vw,19px); }
}
.pill{ display:inline-block; border:1px solid var(--line); background:var(--chip); border-radius:999px; padding:2px 8px; font-size:.9em; }
.hr-notes{ border-top:1px solid var(--line); margin:16px 0; }
nav.notes{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; }
nav.notes a{ text-decoration:none; color:#0b57d0; font-weight:600; }
/* Stacked TOC variant */
/*
nav.notes.stacked{ display:block; }
nav.notes.stacked .toc{ list-style:none; margin:10px 0 14px; padding:0; }
nav.notes.stacked .toc li{ margin:6px 0; }
nav.notes.stacked .toc a{
  display:block; padding:8px 10px; border:1px solid var(--line); border-radius:8px;
  background:var(--chip); text-decoration:none; font-weight:600; color:#0b57d0;
}
nav.notes.stacked .toc a:hover,nav.notes.stacked .toc a:focus{ background:#f3f6fc; outline:none; }
*/

/* Chips for color examples */
.chip{ display:flex; align-items:center; gap:6px; }
.sw{ display:inline-block; width:12px; height:12px; border-radius:3px; border:1px solid rgba(0,0,0,.2); }
.sw.black{background:#000}
.sw.darkblue{background:#0a3d91}
.sw.blue{background:#1e90ff}
.sw.lightblue{background:#add8e6}
.sw.green{background:#53d153}
.sw.greenblue{background:#80D49C}
.sw.greenyellow{background:#7EDA64}
.sw.yellow{background:#fff799}
.sw.orange{background:#fb8c00}
.sw.red{background:#d32f2f}
.sw.brown{background:#795548}

/* Likely no longer used
.sw.green2{background:#66C266}
.sw.green3{background:#339933}
.sw.darkgreen{background:#008000}
*/

/* ===== Footer attribution =============================================== */
.credits{ margin-top:18px; padding-top:8px; border-top:1px solid var(--line);
  font-size:12px; color:var(--muted); text-align:left; }
.credits a{ color:inherit; text-decoration:underline; }

/* ===== Desktop refinements ============================================== */
@media (min-width: 1024px){
  body{ margin:24px; }
}

/* === Fix th-help: restore perfect 14×14 circle, no browser padding ====== */
.day-table th .th-help{
  /* reset native button quirks */
  -webkit-appearance: none;
  appearance: none;
  box-sizing: content-box;
  padding: 0;

  /* exact circle + centered "i" */
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #999;
  background: #fff;
  color: #444;
  font: inherit;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

/* Desktop/wide: keep it inline and snug beside the label */
@media (min-width: 481px){
  .day-table th .th-help{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0 4px;
    vertical-align: super;
  }
}

/* Mobile: place on its own line, centered under the label (as before) */
@media (max-width: 480px){
  .day-table th .th-help{
    display: block;
    margin: 2px auto 0;
  }
}

/* Mobile: nudge WRA column (7th col) 2px right for visual balance */
@media (max-width: 480px){
  .day-table th:nth-child(7),
  .day-table td:nth-child(7){
    padding-left: 10px; /* default mobile th/td is ~8px; +2px here */
  }
}

/* Daily table time shading — ONLY today (day-0) */
#day-0 table.day-table td.td-time.is-now{
  background: var(--time-now-bg);
  color: var(--time-now-text);
  font-weight: 600;
  font-style: italic;  
}

/* Phase 1 extras (comment out if too busy) */
#day-0 table.day-table td.td-time.is-past{
  background: var(--time-past-bg);
  color: var(--time-past-text);
}

/* #day-0 table.day-table td.td-time.is-future{background: var(--time-future-bg); color: var(--time-future-text);} */


/* Cap Location input width on screens ≥ 640px (keeps layout steady) */
/* @media (min-width: 640px){
  #q{
    max-width: 290px;   
    width: 100%;
    flex: 0 1 290px;    
    min-width: 0;       
  }
} */

/* Add a bit of space above the Dashboard toggle for better alignment */
#controls .toggle {
  margin-top: 6px;   /* try 4–6px; adjust if you want a bit more */
}

/* hide the menu button border, for now anyway - we might bring it back later */
.menu-btn{
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* keep a clear keyboard focus ring */
.menu-btn:focus-visible{
  outline: 2px solid #4c9ffe;
  outline-offset: 2px;
}

/* for our check radar link */
.radar-wrap{ margin:8px 0 10px; }
.radar-link{
  display:inline-flex; align-items:center; gap:6px;
  background:#f7f7f7; border:1px solid #A9A9A9; border-radius:8px;
  padding:8px 10px; font-weight:700; text-decoration:none; color:#0b57d0;
}
.radar-link:hover,.radar-link:focus-visible{ background:#f3f6fc; outline:none; }

/* GoRideWX v3.5.5 — Advisory width constraint */
.radar-advisory{
  /* responsive, but not full-bleed */
  max-width: 460px;
  width: 100%;
  box-sizing: border-box;

  /* existing visual styles moved from inline */
  margin: 6px 0 8px;
  padding: 8px 10px;
  border: 1px solid #A9A9A9;
  border-radius: 8px;
  background: #fffbea;
}

/* constrain the <hr> line separator */
/* Subtle, left-aligned day separator */
hr.daysep {
  max-width: 460px;
  width: 100%;
  margin: 16px 0;                     /* no auto-centering */
  border: none;                       /* remove default 3D look */
  border-top: 1px solid #dcdcdc;      /* lighter gray than #A9A9A9 */
  opacity: 0.9;                       /* optional, softens it slightly */
}


/* v3.5.12 modal line4: keep icon+condition on first line; precip label+value on same second line */
#hourModal #line4 { display: flex; flex-wrap: wrap; align-items: center; }
#hourModal #line4 .icon-lg { flex: 0 0 auto; margin-right: 6px; }
#hourModal #line4 #line4Cond { 
  flex: 1 1 0;      /* fill remaining space on line 1 so next items wrap */
  min-width: 200px; /* keeps it substantial on line 1 */
}
#hourModal #line4 .label { 
  flex: 0 0 110px;  /* fixed label width */
}
#hourModal #line4 #line4Precip { 
  flex: 1 1 auto;   /* value sits on same line as label */
  min-width: 0;     /* allow shrinking to avoid unintended wrap */
}


/* === FINAL Matrix Tight Styles (lock circles + padding) === */
.coremx table.coremx td > .coremx-dot,
.coremx .coremx-dot {
  display:inline-flex; align-items:center; justify-content:center;
  padding:4px !important; line-height:1;
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
}

.coremx table.coremx td > .go-dot,
.coremx .go-dot {
  width:12px; height:12px; font-size:10px;
  aspect-ratio:1/1; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  box-sizing:content-box;
}

.coremx .go-dot svg { display:block; }
.coremx .go-dot.sym-x svg { transform:none; }

/* CoreMX header hour shading (do NOT touch Day column) */
#coreMatrix table.coremx thead th.coremx-hour.is-past{
  background: var(--time-past-bg);
  color: var(--time-past-text);
}
#coreMatrix table.coremx thead th.coremx-hour.is-now{
  background: var(--time-now-bg);
  color: var(--time-now-text);
  font-weight: 700;            /* anchor */
}
#coreMatrix table.coremx thead th.coremx-hour.is-future{
  background: var(--time-future-bg);
  color: var(--time-future-text);
}

/* Core matrix: night cue (subtle, cell-only) */
.coremx td.coremx-night{
  position: relative;
}

.coremx td.coremx-night::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.04); /* tune 0.18–0.22 */
  pointer-events:none;
}

/* keep the dot clickable/visible above overlay */
.coremx td.coremx-night .coremx-dot{
  position: relative;
  z-index: 1;
}

/* Touch devices (mobile/tablet): slightly stronger */
@media (hover: none) and (pointer: coarse){
  .coremx td.coremx-night::before{
    background: rgba(0,0,0,0.06); /* +0.02 */
  }
}

/* Daily tables: night shading on goTIME cell only (skip day-0 via JS) */
.go-cell.night{
  position: relative;
}

.go-cell.night::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.05); /* baseline; tune as needed */
  pointer-events:none;
  border-radius: inherit;
}

/* keep the dot above the overlay */
.go-cell.night .go-dot{
  position: relative;
  z-index: 1;
}


/* Small helper line under the logo */
.brand-tagline {
  text-align: left;
  font-size: 0.95rem;      /* subtle, readable */
  font-weight: 600;        /* a touch of emphasis */
  letter-spacing: .02em;
  margin: 4px 70px 10px;      /* a little breathing room */
  opacity: 0.9;            /* softer than main headings */
}

/* Tighten slightly on very small screens */
@media (max-width: 380px) {
  .brand-tagline { font-size: 0.9rem; }
}

/* ===== Limits summary (at-a-glance thresholds) ================ */
.limits-summary{
  max-width: 460px;
  margin: -6px 0 1px;          /* tuck closer to Settings block */
  font-size: 12px;
  font-style: italic;  
  line-height: 1.25;
  color: var(--muted, #666);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.limits-summary strong{
  color: #111;
  font-weight: 700;
}

@media (max-width: 380px){
  .limits-summary{ font-size: 11px; }
}


/* Copyright tighten slightly on very small screens */
.site-footer {
  text-align: left;
  font-size: 0.85rem;
  color: #666;
  margin: 20px 0 12px;
}


/* Quick Fix - Keep the dot and title on one line */
#hourTitle { 
  display: inline-flex;         /* or flex */
  align-items: center;
  gap: .4rem;
  flex-wrap: nowrap;            /* prevent wrapping between dot and text */
}

/* Make the dot behave like an inline icon */
.go-dot {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
}
.go-dot svg {
  width: 100%;
  height: 100%;
}

/* handle the reason on line2 */
.brief{ font-size:14px; font-weight:400; color:#222; margin-left:26px; white-space:nowrap; }
.brief:empty{ display:none; } /* hides the span if no reason */

/* Hide the old pressure_mb line - reversable if needed */
#line11 { display: none; }

/* Compact inline unit after Pressure value */
.unit-compact {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 400;   /* keep it lighter than .value */
  color: #222;
  white-space: nowrap;
}

/* one of these ought to kill it */
/* .hidden{ display:none !important; } */
[hidden] { display: none !important; }
#hourModal #line11 { display: none !important; }

/* New Stuff for GoTime Window Radio Buttons */
.gotime-options{
  border:0; margin:2px 0 8px; padding-left:47px; /* indent under summary */
  display:flex; align-items:center; gap:6px;
  flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
  font-size:12px; color:var(--text-secondary, #666);
}
.gotime-options label{display:inline-flex; align-items:center; gap:4px; white-space:nowrap}
.gotime-options input[type="radio"]{margin:0}
.gotime-options select{font-size:12px; margin-left:6px}

/* Vertical bars | between options */
/* .gotime-options label:not(.gt-custom):not(:last-of-type)::after { */
.gotime-options label:not(:last-of-type)::after {
  content: "|";
  opacity: 0.5;
  margin: 0 4px;
}
.sr-only{position:absolute; left:-9999px}


/* Slightly downsize the X on the Modal and Daily Hours Table */
/* 🔸 Baseline — used everywhere by default */
.go-dot.go-red path {
  stroke-width: 3.25;
  transform: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

/* 🔹 Slightly smaller in modal + daily table */
.modal-title .go-dot.go-red path,
.day-table .go-dot.go-red path {
  stroke-width: 2.8;
  transform: scale(0.85);
  transform-origin: 12px 12px;
}


/* New Status Line and Default, Favorites icons */
.loc-status { display:flex; align-items:center; gap:6px; flex-wrap:nowrap; }
.loc-status #locLabel { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.icon-btn {
  width:36px; height:36px; min-width:36px;
  border:0; background:transparent; padding:6px; margin:0; border-radius:10px;
  display:inline-flex; align-items:center; justify-content:center;
  -webkit-tap-highlight-color: transparent; touch-action:manipulation;
}
.icon-btn svg { width:100%; height:100%; }
.icon-btn:hover { background:var(--chip, #f1f5f9); }
.icon-btn:focus-visible { outline:2px solid var(--line, #e2e8f0); outline-offset:2px; }

.hidden { display:none !important; }

/* Confirm modal (lightweight) */
.modal { position:fixed; inset:0; background:rgba(0,0,0,.25); display:flex; align-items:center; justify-content:center; z-index:10050; }
.modal-card {
  width:min(92vw, 360px);
  background:#fff; border-radius:14px; padding:14px; box-shadow:0 10px 30px rgba(0,0,0,.2);
  font:16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
.modal-card h2 { margin:0 0 6px; font-size:18px; }
.modal-card p { margin:0 0 12px; color:var(--muted, #64748b); }
.modal-actions { display:flex; gap:8px; justify-content:flex-end; }
.btn-primary {
  padding:8px 12px; border-radius:10px; border:0; background:#0b57d0; color:#fff; font-weight:600;
}
.btn-ghost {
  padding:8px 12px; border-radius:10px; border:1px solid var(--line, #e2e8f0); background:#fff;
}

/* Hide for now - build out later */
#btnAddFav,
#btnDelFav {
  display: none !important;
}

/* V4.0 Updates with new features */
/* Modal Check Radar Link */
/* --- Modal footer radar link --- */
.modal-footer {
  text-align: center !important;
  margin-top: 8px !important;
}

.modal-footer hr {
  max-width: 120px;
  margin: 6px auto 8px;
  border: none;
  border-top: 1px solid #ccc;
  opacity: 0.8;
}

.modal-footer a {
  color: #0b57d0;
  text-decoration: none;
  font-style: italic;   /* mimics your <em> if you ever remove it */
}

.modal-footer a:hover,
.modal-footer a:focus {
  text-decoration: underline;
}

#line2Reason {
  font-style: italic;
}

/* Put alert icon on Daily Summary if alerts exist */
/*
.alert-icon {
  color: #c62828;
  margin-left: 6px;
  font-size: 1.05em;
  vertical-align: middle;
  line-height: 1;
}
*/

.alert-icon {
  display: inline-block;
  font-size: 1.05em;
  line-height: 1;      /* kill extra emoji padding */
  margin-left: 6px;
  vertical-align: 0.10em;  /* lift it a bit relative to the text baseline */
  color: var(--yellow);
}


/* --- Start Modal Dynamic Threshold Bar --- */
.threshold-wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75em;
  margin-top: 6px;
  max-width: 200px;
}

.threshold-label-left {
  color: var(--blue);
  font-weight: 700;
  font-style: italic;  
}

.threshold-label-right {
  color: var(--red);
  font-weight: 700;
  font-style: italic;
}

.threshold-bar {
  position: relative;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--line);
  display: flex;
}

.threshold-green {
  flex: 0 0 auto;
  height: 100%;
  background: var(--green);
}

.threshold-yellow {
  flex: 0 0 auto;
  height: 100%;
  background: var(--yellow);
}

.threshold-marker {
  position: absolute;
  top: 50%;
  transform: translateY(-46%);
  color: var(--ink);
  font-size: 0.7em;
  line-height: 1;
  pointer-events: none;
}

.threshold-marker.left {
  transform: translate(2px, -46%);
}

.threshold-marker.right {
  left: 100%;
  transform: translate(-13px, -46%);
}

/* only tweak spacing for TWO-SIDED bars */
.threshold-bar.two-sided .threshold-marker.left  {
  transform: translate(calc(-100% - 2px), -46%);
}
.threshold-bar.two-sided .threshold-marker.right {
  transform: translate(2px, -46%);
}


/* --- Footer context blocks --- */
.threshold-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.75em;
  margin-top: 6px;
}

.threshold-foot .title {
  font-weight: 500;
  color: var(--muted);
}

.threshold-foot .note {
  color: var(--muted);
  font-style: italic;
}

/* --- End Modal Dynamic Threshold Bar --- */

.legend-row { display: flex; align-items: center; gap: .5rem; margin: 2px 0; }
.legend-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid #0002; }
.legend-range { min-width: 6.5em; font-variant-numeric: tabular-nums; }
.legend-arrow { opacity: .7; margin: 0 .15rem; }
.legend-key   { font-weight: 600; opacity: .85; }

/* ---- V4.0 Tone down the font for Rain % -------- */
.cor-cell {
  font-size: 0.9em;   /* slightly smaller */
  font-weight: 500;   /* medium */
  text-align: center; /* cleaner alignment if it’s numeric */
}

/* ---- V4.0 Better Range of Colors for Chance of Rain -------- */
.cor0  { background-color:#53D153; color:#000 !important; } /* 0–10% */
.cor1  { background-color:#4BBF9E; color:#000 !important; }
.cor2  { background-color:#42ADB8; color:#000 !important; }
.cor3  { background-color:#3A9BCF; color:#000 !important; }
.cor4  { background-color:#3288E0; color:#fff !important; }
.cor5  { background-color:#2B74E8; color:#fff !important; }
.cor6  { background-color:#2E61E0; color:#fff !important; }
.cor7  { background-color:#3450C6; color:#fff !important; }
.cor8  { background-color:#3B43A5; color:#fff !important; }
.cor9  { background-color:#433986; color:#fff !important; } /* 90–100% */

/* ---- V4.0 Show Numbers or Zones Toggle Button ---- */
.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.8rem;
  border-radius: 50%;   

  border: none;
  padding: 0;
  margin: 0;

  cursor: pointer;
  background: #2e7d32; /* your go-green color - 2e7d32 */
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

.btn-view-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.btn-view-toggle:disabled {
  opacity: 0.4;
  cursor: default;
}

/* --- V4.0 Chance Of Rain Custom Legend --- */
/* Chance of Rain legend layout (one-way range legend) */
.range-legend.one-way {
  border-collapse: collapse;
  margin: 0.25rem 0 0.5rem;
}

.range-legend.one-way td {
  padding: 2px 6px;
  border: none;
  vertical-align: middle;
}

/* narrow swatch column */
.range-legend.one-way .legend-swatch {
  width: 1.5rem;
}

/* text cell */
.range-legend.one-way .legend-label {
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Make each row a flex container for clean alignment */
.range-legend.one-way tr {
  display: flex;
  align-items: center;   /* vertical centering */
  gap: 0.5rem;           /* spacing between swatch + label */
  border: none;
  padding: 5px 0;    /* <-- add vertical breathing room */  
}

/* Remove table-cell behavior */
.range-legend.one-way td {
  border: none;
  padding: 2px 0;
}

/* Color square */
.legend-swatch-square {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

/* Label */
/*
.legend-label {
  font-size: 0.9rem;
  white-space: nowrap;
  line-height: 1;
}
*/

/* Precip Pct Table Spacing */
.range-legend.one-way td.legend-value {
  padding-top: 0px;
  padding-bottom: 0px;
  line-height: .8;
  vertical-align: middle;
}

.range-legend.one-way td.legend-value span {
  vertical-align: middle;
}

/* V4 new feature - goTIME Light Bar (rounded dash style) */
.lightbar{
  display: inline-flex;
  gap: 12px;              /* spacing */
  /* margin: 6px 0px 4px; */
  pointer-events: none;  /* preserve <summary> toggle behavior */
}

.lb-seg{
  width: 12px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.95;
  outline: 1px solid rgba(0,0,0,0.35);
  outline-offset: 0;
}

/* Verdict color mapping */
.lb-seg.go-green{
  background-color: var(--green);
}

.lb-seg.go-yellow{
  background-color: var(--yellow);
}

.lb-seg.go-red{
  background-color: var(--red);
}

.lb-seg.go-neutral{
  background-color: var(--muted, #9aa0a6);
}

/* Duplicate remove after testing - Force vertical stacking inside <summary> even if summary itself is flex */
/*
.sumstack{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
*/

/* Pattern overlay (tiny diagonal stripes) */
background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.55) 0px, rgba(255,255,255,0.55) 1px, rgba(255,255,255,0.00) 1px, rgba(255,255,255,0.00) 3px);}

/* FORCE lightbar + anchors to stay on ONE LINE */
.lightbar-row{
  display: inline-flex;        /* not just flex */
  align-items: center;
  white-space: nowrap;
  gap: 6px;
  max-width: 100%;
}

.lb-hour{
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(-0.5px);
  opacity: 0.85;
}

/* === Actions button + panel for copy and reset URL (v4.x) === */
/* .topbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; } */
.topbar .brand-logo{ display:block; margin:0 auto; }
.topbar-right{ display:flex; align-items:center; gap:8px; }
.icon-btn2{
  border:0; background:transparent; padding:8px; border-radius:10px;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.icon-btn2:focus{ outline:2px solid rgba(0,0,0,.25); outline-offset:2px; }
.icon-btn2 svg{ width:22px; height:22px; }

/* Size up the Share button 20% */
#actionsBtn svg {
  transform: scaleY(1.2);
  transform-origin: 50% 50%;
}


/* Backdrop */
.actions-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  z-index:9998;
}
.actions-backdrop.hidden{ display:none; }

/* Panel */
.actions-panel{
  position:fixed; z-index:9999; background:#fff;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
  border-radius:16px 16px 0 0;
  left:0; right:0; bottom:0;
  max-height:70vh; overflow:hidden;
  transform:translateY(0);
}
.actions-panel.hidden{ display:none; }

.actions-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid rgba(0,0,0,.08);
}
.actions-title{ font-weight:700; }
.actions-close{ font-size:18px; line-height:1; }

.actions-body{ padding:12px 14px 18px; overflow:auto; max-height:calc(70vh - 54px); }
.actions-section{ margin:0 0 14px 0; }
.actions-label{ font-size:12px; opacity:.75; margin:0 0 6px 0; }
.actions-url{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px; line-height:1.25;
  padding:10px; border:1px solid rgba(0,0,0,.12); border-radius:12px;
  white-space:pre-wrap; word-break:break-word; background:#f7f7f7;
  user-select:text;
}
.actions-row{ display:flex; gap:10px; align-items:center; }
.actions-row .btn-primary{ flex:1; }
.actions-divider{ height:1px; background:rgba(0,0,0,.10); margin:14px 0; }
.btn-danger{
  background:#b00020; color:#fff; border:0; padding:10px 12px;
  border-radius:12px; cursor:pointer; width:100%; font-weight:700;
}
.actions-note{ font-size:12px; opacity:.7; margin-top:6px; }

/*.cfg-body{
  white-space:pre-line;
  font:14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:#111;
  margin:10px 0 14px;
}*/

/* Make sure the Are You Sure modal stays on top */
#confirmModal { z-index: 10060; }

/* Desktop: use a left-side panel */
@media (min-width: 860px){
  .actions-panel{
    width:420px; max-width:90vw;

    /* anchor LEFT on desktop */
    left:14px; right:auto;
    bottom:14px;

    border-radius:16px;
    max-height:min(70vh, 640px);
  }
  .actions-body{ max-height:calc(min(70vh, 640px) - 54px); }
}

.settings-label{
  margin-right: 0.35em;
  font-weight: 600;
}

.settings-values{
  white-space: nowrap;
}

/* Hide label on small screens */
@media (max-width: 480px){
  .settings-label{
    display: none;
  }
}

@media (max-width: 480px){
  #limitsSummary{
    margin-top: 6px;
  }
}

.cond-cell.cond-ring-black  { outline: 1px solid #000; outline-offset: -3px; }
/* Hazard Red (stronger, absolute veto) */
.cond-cell.cond-ring-black-hazard {outline: 2px solid #000; outline-offset: -4px; }
.cond-cell.cond-ring-yellow { outline: 1px solid var(--yellow); outline-offset: -3px; }

/* ===== Extracted from v4-x79z.html <style> block #1 ===== */
  #goalSummary{ margin-top:0px; font-style: italic; }  
  #goalSummary .goal-label{ font-weight:500; margin-right:0.35em; }
  #goalSummary{font-size: 12px; color: #3f6fa6;}
  #goalSummary{font-size: 0.8em; color: #3f6fa6;}
  
	.goal-line {
	  margin-top: 4px;
	  font-size: 0.9em;          /* slightly smaller than body */
	  color: #3f6fa6;            /* soft blue (tune if needed) */
	}

	/* External arrow link */
	.goal-extlink {
	  margin-left: 4px;
	  text-decoration: none;     /* no underline */
	  color: inherit;            /* same color as text */
	  font-weight:700;
	  font-size: 0.9em;
	  vertical-align: middle;
	}

	.goal-extlink:hover {
	  text-decoration: none;     /* keep clean on hover */
	  opacity: 0.8;              /* subtle affordance */
	}
	
	#goalSummary a.goal-extlink {
	  margin-left: 4px;
	  text-decoration: none;
	  color: inherit;
	  font-size: 1.05em;        /* KEY: slightly larger than text */
	  font-weight: 600;         /* subtle emphasis */
	  vertical-align: baseline; /* aligns better on mobile */
	}	
	
	/* Mobile-only nudge (optional but recommended) */
	@media (max-width: 480px) {
	  #goalSummary a.goal-extlink {
		font-size: 1.15em;      /* just enough to be tappable */
	  }
	}

	.goal-date{
	  width: 100%;
	  max-width: 320px;        /* desktop cap */
	  height: 44px;            /* mobile tap target */
	  font-size: 16px;         /* prevents iOS zoom */
	  padding: 8px 12px;
	  border-radius: 10px;
	}

	/* Extra breathing room on small screens */
	@media (max-width: 520px){
	  .goal-date{
		max-width: 100%;
		height: 48px;
		font-size: 17px;
	  }
	}
	
  
  /* --- Condition settings --- */
  .cond-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .cond-radio-group{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    font-size: 0.95em;
  }
  .cond-radio-group label{
    display:flex;
    gap:6px;
    align-items:center;
    cursor:pointer;
    user-select:none;
    padding: 2px 6px;
    border-radius: 8px;
  }
  .cond-radio-group input[type="radio"]{
    cursor:pointer;
  }
  .cond-small{
    font-size: 0.9em;
    opacity: 0.85;
  }

  .cond-group-head{
  font-weight: 700;
  margin: 12px 0 6px;
  opacity: 0.95;
}

.cond-group-hr{
  border: 0;
  height: 1px;
  background: rgba(0,0,0,0.12);
  margin: 0 0 10px;
}

@media (max-width: 480px){
  .cond-group-head{ margin-top: 10px; }
  .cond-group-hr{ margin-bottom: 8px; }
}


	/* Share/Copy include rows */
	.chkrow{ display:flex; align-items:center; gap:10px; margin:8px 0; font-size:14px; }
	.chkrow input{ transform: scale(1.1); }

	/* Actions preview pulse (quiet feedback) */
	@keyframes actionsPulse {
	  0% { box-shadow: 0 0 0 0 rgba(0,0,0,0.0); }
	  30% { box-shadow: 0 0 0 3px rgba(0,0,0,0.12); }
	  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0.0); }
	}
	.actions-url.pulse { animation: actionsPulse 220ms ease-out; }
/* ===== End extracted block #1 ===== */


/* ===== Extracted from v4-x79z.html <style> block #2 ===== */
    /* ===== Settings / Thresholds (inline block in index) ===== */
    .settings-wrap{ max-width:420px; }
    .settings-details{ margin:10px 0 8px; }
    .settings-details summary{ cursor:pointer; user-select:none; }
    .settings-panel{
      border:1px solid rgba(0,0,0,.12);
      border-radius:14px;
      padding:10px 12px;
      background:#fff;
      box-shadow:0 1px 10px rgba(0,0,0,.04);
    }
    .settings-hdr{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
    .settings-subtitle{ font-size:12px; opacity:.75; }
    .th-rows{ display:flex; flex-direction:column; gap:10px; margin-top:6px; }
    .th-row{
      display:block;
      padding:8px 8px;
      border-radius:12px;
      background:rgba(0,0,0,.02);
    }
    .th-head{
      position:relative;
      width:100%;
      padding:0 28px 6px 28px; /* reserve space for info button on right; keep label centered */
      box-sizing:border-box;
    }
	
	.th-label{
	  position: relative;          /* anchor for absolute ? */
	  padding-right: 28px;         /* reserve space so text won't overlap ? */
	}

	.th-label > b{
	  display: block;
	  text-align: center;          /* fixes ugly left-justified wrap */
	  line-height: 1.15;
	  overflow-wrap: anywhere;
	}

	.th-info{
	  position:absolute;
	  right:6px;
	  top:6px;
	  transform:none;
	  border:1px solid rgba(0,0,0,.14);
	  background:rgba(255,255,255,.9);
	  width:16px;
	  height:16px;
	  border-radius:999px;
	  display:inline-flex;
	  align-items:center;
	  justify-content:center;
	  cursor:pointer;
	  padding:0;
	  font-size:10px !important;
	  line-height:1;
	}
	
    .th-info:focus{ outline:2px solid rgba(0,0,0,.25); outline-offset:2px; }
    .th-stepper{ display:flex; align-items:center; justify-content:center; gap:8px; width:100%; }
    .th-val{
      min-width:54px;
      text-align:center;
      font-variant-numeric: tabular-nums;
      font-weight:700;
      padding:6px 8px;
      border-radius:10px;
      background:#fff;
      border:1px solid rgba(0,0,0,.10);
    }
	.th-val.is-custom{
	  background: var(--green);
	  color: #fff;
	}

	/* Dashboard rows: highlight customized (consistent with other sections) */
	.dash-row.is-custom-row{
	  background: rgba(0,0,0,.04);
	  border-radius: 12px;
	  padding: 10px;
	}
	
	/* delete after testing
	.settings-subhead{
	  margin-top: 2px;
	  opacity: .85;
	  text-align: center;	  
	}
	*/
	
	.settings-subhead{
	  display:flex;
	  align-items:center;
	  gap:12px;
	  margin:14px 0 8px;
	  font-weight:700;
	  color:#1f2a44;                 /* tweak to match your theme */
	}

	.settings-subhead::before,
	.settings-subhead::after{
	  content:"";
	  flex:1;
	  height:1px;
	  background: rgba(0,0,0,.18);
	}

	.settings-subhead > span{
	  padding:2px 10px;
	  border-radius:999px;
	  background: rgba(0,0,0,.04);
	  white-space: nowrap;
	}
	
	
	
    .th-btn{
      width:34px; height:34px;
      border-radius:10px;
      border:1px solid rgba(0,0,0,.14);
      background:#fff;
      cursor:pointer;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      font-size:18px;
      line-height:1;
    }
    .th-btn:disabled{ opacity:.35; cursor:default; }
    .th-actions{ display:flex; gap:10px; margin-top:12px; }
    .th-actions .btn-primary,
    .th-actions .btn-ghost,
    .th-actions .btn-danger{ flex:1; }
    .th-note{ font-size:12px; opacity:.75; margin-top:8px; line-height:1.25; }

    /* ===== Actions Info (decoded config) ===== */
    .actions-label-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .actions-info-btn{
      border:1px solid rgba(0,0,0,.14);
      background:rgba(255,255,255,.9);
      width:16px; height:16px;
      border-radius:999px;
      display:inline-flex; align-items:center; justify-content:center;
      cursor:pointer;
      padding:0;
      font-size:10px;
      line-height:1;
      flex:0 0 auto;
    }
    .actions-info-btn:focus{ outline:2px solid rgba(0,0,0,.25); outline-offset:2px; }


    /*.cfg-body{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size:13px; line-height:1.35; white-space:pre-wrap; } */
	  
	/* Actions panel layer */
	#actionsBackdrop{ z-index: 2000; }
	#actionsPanel{ z-index: 2100; }

	/* Info modal must be above the Actions panel */
	#actionsInfoModal{
	  position: fixed;
	  inset: 0;
	  z-index: 4100;           /* higher than actionsPanel */
	  display: flex;           /* if your .modal uses flex centering */
	  align-items: center;
	  justify-content: center;
	  padding: 14px;
	  /* optional: backdrop if your .modal doesn’t already provide one */
	  background: rgba(0,0,0,.35);
	}

  
/* ===== End extracted block #2 ===== */



/* Toast (for Copy confirmation) */
.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  max-width:min(92vw, 520px);
  padding:10px 14px;
  border-radius:14px;
  background:rgba(30,41,59,.95);
  color:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  opacity:0;
  pointer-events:none;
  z-index:9999;
}
.toast.toast-show{
  opacity:1;
}

.cfg-body {
  /* Preserve intentional newlines but allow soft wrapping */
  white-space: pre-wrap;

  /* Break long URLs / query strings cleanly */
  overflow-wrap: anywhere;
  word-break: break-word;

  /* Readability */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
               Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #111;

  margin: 10px 0 14px;
  
  /* Allows mobile vertical scrolling */
  overflow-y: auto;
  max-height: 60vh;
}

.th-subtle{
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
  text-align: center;
}

@media (max-width: 480px){
  .th-subtle{
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.6;
  }
}

/* More modern look and feel */

/* ==========================================================================
   Dashboard polish v1 (conservative) — raises the floor to “2000s”
   Paste at END of wx4-3.css so it wins the cascade.
   ========================================================================== */

:root{
  --radius-1: 10px;
  --radius-2: 14px;

  /* softer borders than hard #A9A9A9 */
  --line-soft: rgba(0,0,0,.16);

  /* subtle surfaces (very light — won’t fight your current palette) */
  --surface-1: rgba(0,0,0,.02);
  --surface-2: rgba(0,0,0,.035);

  --shadow-soft: 0 1px 10px rgba(0,0,0,.06);
}

/* 1) Global readability + breathing room */
body{
  line-height: 1.45;
  margin: 6px; /* was 8px; still mobile-first and compact */
}

/* keep your desktop bump, just slightly more intentional */
@media (min-width: 1024px){
  body{ margin: 24px; } /* you already do this; keeping it consistent */
}

/* 2) Softer “instrument panel” borders (big visual win, minimal risk) */
th, td{
  border-color: var(--line-soft);
}

/* optional: keep headers a hair less boxy */
th{
  border-bottom-color: rgba(0,0,0,.20);
}

/* 3) Controls feel more “panel-like” without changing layout */
#controls.row{
  padding: 10px 10px;
  border-radius: var(--radius-2);
  background: var(--surface-1);
  box-shadow: var(--shadow-soft);
}

/* 4) Give the Summary row a tiny surface so it feels “designed” */
#summary{
  padding: 8px 10px;
  border-radius: var(--radius-2);
  background: var(--surface-1);
}

/* 5) Day sections: add gentle separation by spacing + a subtle top divider */
.day{
  padding-top: 10px;
  margin-bottom: 22px; /* was 20px; tiny bump */
}

/* 6) Table container: mild rounding cue (safe even with display:block tables) */
table.day-table{
  border-radius: var(--radius-1);
}

/* 7) Buttons/inputs: unify corner language (doesn’t change sizing) */
button,
input[type="text"],
select,
textarea{
  border-radius: var(--radius-1);
}

/* 8) Topbar: tiny surface bump so it matches the Presets “intent” */
.topbar{
  padding: 6px 10px;
  border-radius: var(--radius-2);
  background: rgba(0,0,0,.015);
}

/* 9) Links: reduce the “web 1.0 underline everywhere” look a bit */
a{
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* 10) fix the controls width */
#controls{
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
}

/* invisible button on top of diamond icon to jump back to the top of the page */
.go-topcell{ position:relative; }

.go-topbtn{
  position:absolute;
  inset:0;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
}
.go-topbtn:focus-visible{
  outline:2px solid rgba(11,87,208,.7);
  outline-offset:2px;
}

