/* Southport pilot workspace: one visual language across the working pages. */
html[data-theme="default"] {
  --page: #fff;
  --card: #fff;
  --surface: #fff;
  --surface-2: #f1f6fc;
  --surf2: #f7faff;
  --line: #dbe6f2;
  --line2: #eaf0f7;
  --ink: #203852;
  --ink2: #405b73;
  --mute: #627b92;
  --blue: #1767b7;
  --bluetint: #eaf4ff;
}
html[data-theme="default"] body { background: #fff; }
.app { max-width: none; width: 100%; min-height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.side { border-radius: 0; border-bottom: 1px solid var(--line); }
.side nav.sw-primary-nav a { font-weight: 650; letter-spacing: -.01em; color: var(--ink2); }
.side nav.sw-primary-nav a:hover,
.side nav.sw-primary-nav a:focus-visible,
.side nav.sw-primary-nav a.on { color: var(--blue); }
.side nav.sw-primary-nav a:focus-visible,
.sw-nav-more summary:focus-visible,
.tabbar a:focus-visible,
.tabbar button:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.side .sw-nav-more { display: none; }
.side .sw-nav-more summary { font-size: 12px; font-weight: 700; color: var(--ink2); padding: 0 7px; }
.side .sw-nav-more summary.on { color: var(--blue); }
.side .sw-nav-more nav { display: grid; gap: 2px; padding: 7px; }
.side .sw-nav-more nav a { display: flex; align-items: center; min-height: 40px; height: auto; padding: 0 10px; border-radius: 7px; color: var(--ink2); font-size: 13px; }
.side .sw-nav-more nav a svg { display: block; width: 16px; height: 16px; }
.side .sw-nav-more nav a.on { background: var(--bluetint); color: var(--blue); }
.side .sw-nav-more nav a.on:after { display: none; }
.sw-sheet-title { font: 750 11px/1.4 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding: 4px 10px 7px; }
.pilot-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 18px; }
.pilot-kicker { color: var(--blue); font: 750 11px/1.4 var(--ui); letter-spacing: .14em; }
.pilot-list-heading h1 { color: var(--ink); font: 700 clamp(25px, 2.5vw, 34px)/1.15 var(--ui); letter-spacing: -.035em; margin: 5px 0 5px; }
.pilot-list-heading p { color: var(--mute); font-size: 13.5px; line-height: 1.5; margin: 0; max-width: 700px; }
.pilot-primary, .pilot-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--blue); border-radius: 9px; background: var(--blue); color: #fff; font: 700 13px/1.2 var(--ui); cursor: pointer; white-space: nowrap; }
.pilot-secondary { background: var(--card); color: var(--blue); }
.pilot-primary:hover { filter: brightness(.94); }
.pilot-secondary:hover { background: var(--bluetint); }
.pilot-primary:disabled { opacity: .6; cursor: wait; }
.pilot-primary:focus-visible, .pilot-secondary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pilot-create { padding: 20px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.pilot-create[hidden] { display: none; }
.pilot-create-head { margin-bottom: 16px; }
.pilot-create-head h2 { color: var(--ink); font-size: 19px; margin: 0 0 4px; }
.pilot-create-head p { color: var(--mute); font-size: 13px; margin: 0; line-height: 1.5; }
.pilot-create-grid { display: grid; grid-template-columns: 2fr 1fr 90px 1fr 1fr; gap: 12px; }
.pilot-create-grid label { display: grid; gap: 6px; color: var(--ink2); font-size: 12px; font-weight: 700; }
.pilot-create-grid input { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surf2); color: var(--ink); font: 500 14px var(--ui); }
.pilot-create-grid input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pilot-create-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 17px; }
.pilot-create-error { color: #a3342f; font-size: 13px; margin: 12px 0 0; }
.pilot-duplicate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px; margin-top: 12px; border-radius: 9px; background: var(--surface-2); font-size: 13px; }
.pilot-duplicate b { color: var(--ink); }
.pilot-duplicate p { margin: 0; color: var(--ink2); }
.pilot-duplicate a { font-weight: 700; }
.w7cwrap { max-width: 1360px; margin: 0 auto; }
.w7csearch { max-width: 720px; }
.w7csech { margin-top: 3px; }
.w7crow { min-height: 68px; }
.w7c-main, .w7c-actions { min-width: 0; }
.w7c-meta { line-height: 1.4; margin-top: 2px; }
.w7clist { border-radius: 12px; }
.w7f-hd .w7h1 { font-size: clamp(25px, 2.4vw, 35px); letter-spacing: -.035em; }
.w7f-def { line-height: 1.5; font-size: 13.5px; }

/* Territory keeps the map and route planner, with the task controls first. */
.tv-page { font-family: var(--ui); }
.tv-hero { min-height: 0; padding: 20px 24px; gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); }
.tv-hero .tv-eyebrow { color: var(--blue); font-size: 11px; }
.tv-hero h1 { font-size: clamp(24px, 2.5vw, 34px); line-height: 1.16; margin: 5px 0 4px; letter-spacing: -.035em; }
.tv-hero h1 em { color: var(--ink); }
.tv-hero p { font-size: 13px; line-height: 1.5; color: var(--ink2); max-width: 580px; }
.tv-metrics { border-color: var(--line); background: var(--card); }
.tv-metrics>div { padding: 14px; }
.tv-metrics>div+div { border-left-color: var(--line); }
.tv-metrics b { color: var(--ink); font-family: var(--ui); font-size: 24px; }
.tv-metrics span { color: var(--mute); font-size: 11px; }
.tv-toolbar { align-items: center; }
.tv-toolbar label { font-size: 12px; }
.tv-toolbar input { height: 42px; font-size: 14px; }
.tv-scopes button { font-size: 13px; min-height: 38px; }
.tv-list-head, .tv-plan-head { padding: 17px; }
.tv-list-head h2, .tv-plan-head h2, .tv-map-title h2 { font-size: 19px; }
.tv-list-head p, .tv-plan-head p, .tv-map-title p { font-size: 12.5px; }
.tv-account { padding: 13px 15px; }
.tv-account-name { color: var(--blue); font-size: 14px; }
.tv-account-meta, .tv-contact, .tv-account-foot span { font-size: 12px; line-height: 1.4; }
.tv-account-foot button, .tv-more { min-height: 34px; font-size: 12px; }
.tv-segments button { font-size: 12px; min-height: 32px; }
.tv-plan-note, .tv-footer, .tv-townrail button, .tv-stop-actions button { font-size: 11px; }
.tv-stops b { font-size: 13px; }
.tv-stops small { font-size: 11px; }
.tv-directions { min-height: 43px; font-size: 13px; }
.tv-maplegend { font-size: 10px; }
.tv-attribution { font-size: 9px; }

@media (max-width: 1300px) and (min-width: 821px) {
  .side { padding-left: 18px; padding-right: 18px; gap: 9px; }
  .side .brand, .side .s7lockup { width: 135px; }
  .side .brand { margin-right: 2px; }
  .side nav.sw-primary-nav a { padding: 0 8px; font-size: 12px; }
  .side .sw-navdt { display: none; }
  .side .sw-today-view select { width: 174px; max-width: 174px; }
}
@media (max-width: 1199px) and (min-width: 821px) {
  .side nav.sw-primary-nav a:nth-child(n+5) { display: none; }
  .side .sw-nav-more { display: block; }
  .side .sw-nav-more nav a { display: flex; }
}
@media (max-width: 1050px) {
  .pilot-create-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .pilot-create-grid label:first-child { grid-column: span 2; }
  .tv-grid-layout { grid-template-columns: minmax(270px,330px) minmax(0,1fr); }
}
@media (max-width: 820px) {
  .pilot-list-heading { align-items: start; }
  .pilot-create-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pilot-create-grid label:first-child { grid-column: 1 / -1; }
  .msheet .mbox { max-height: min(90dvh, 720px); overflow-y: auto; }
  .msheet .sw-sheet-nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 3px; }
  .msheet .sw-sheet-nav a { min-height: 44px; font-size: 14px; }
  .tabbar .tabmore[aria-expanded="true"] { color: var(--blue); }
  .tv-grid-layout { display: flex; flex-direction: column; }
  .tv-list { order: 0; height: auto; min-height: 0; }
  .tv-list-scroll { overflow: visible; max-height: none; }
  .tv-mapcol { order: 1; }
  .tv-plan { order: 2; }
  .tv-hero { grid-template-columns: 1fr; gap: 15px; }
  .tv-metrics { max-width: 100%; }
}
@media (max-width: 560px) {
  .pilot-list-heading { flex-wrap: wrap; gap: 12px; }
  .pilot-list-heading p { font-size: 13px; }
  .pilot-create { padding: 15px; }
  .pilot-create-grid { grid-template-columns: 1fr 1fr; }
  .pilot-create-grid label:first-child { grid-column: 1 / -1; }
  .pilot-create-grid label:nth-child(4), .pilot-create-grid label:nth-child(5) { grid-column: 1 / -1; }
  .pilot-primary, .pilot-secondary { min-height: 44px; }
  .tv-hero { padding: 17px; }
  .tv-hero h1 { font-size: 27px; }
  .tv-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tv-metrics>div { padding: 9px; }
  .tv-metrics b { font-size: 18px; }
  .tv-metrics span { font-size: 10px; }
  .tv-maptools button { min-width: 44px; min-height: 44px; }
}
