/* RetroBoot public portal in authentic Mac OS 9 "Platinum".
 * Uses RetroBoot's MIT-clean rbplatinum builtin control sprites (platinum-theme.css)
 * and authentic Mac OS 9 PNG icons served from assets/icons/.
 */

@font-face {
  font-family: "RetroBoot System";
  src: url("./RetroBoot-System-12.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "RetroBoot Small";
  src: url("./RetroBoot-Small-10.ttf") format("truetype");
  font-display: swap;
}

:root {
  --face: #dddddd;
  --pane: #eeeeee;
  --ink: #000000;
  --ink-2: #4a4a4a;
  --ink-disabled: #777777;
  --desk: #63639c;
  --sys: "RetroBoot System", Charcoal, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --body: Geneva, Verdana, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: Monaco, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--desk);
}

body {
  margin: 0;
  min-height: 100vh;
  font: 14px/1.45 var(--body);
  color: var(--ink);
  background-color: var(--desk);
  background-image: conic-gradient(#66669d 25%, #606099 0 50%, #66669d 0 75%, #606099 0);
  background-size: 4px 4px;
  font-synthesis: none;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

h1, h2, h3, h4 {
  font: inherit;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: #102070;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--pt-ramp-5);
}

code, kbd, samp, pre {
  font: 12px/1.4 var(--mono);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

img.pt-icon {
  display: block;
  flex: none;
  image-rendering: pixelated;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--ink-2);
}

.small, .muted.small {
  font: 13px/18px var(--body);
}

:focus-visible {
  outline: 2px solid var(--pt-ramp-3);
  outline-offset: 1px;
}

/* ---- Mac OS 9 Menu Bar ----------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
}

.menubar {
  position: relative;
  display: flex;
  align-items: center;
  height: 26px;
  border-style: solid;
  border-width: 0 14px 0 9px;
  border-color: var(--face);
  border-image: var(--pt-menubar) 0 14 0 9 fill;
  background: var(--face);
  white-space: nowrap;
  font: 14px/22px var(--sys);
}

.mb-menu {
  position: relative;
  height: 25px;
  display: flex;
  align-items: center;
}

.mb-title {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font: 14px/22px var(--sys);
  color: #000;
  text-decoration: none;
  cursor: default;
}

.mb-menu:first-child .mb-title {
  padding: 0 9px;
}

.mb-title:hover {
  color: #000;
}

.mb-title:focus-visible {
  outline: none;
}

.mb-title[aria-expanded="true"],
.mb-title.is-open,
.mb-title.is-current,
.mb-title:focus-visible {
  background: var(--pt-ramp-4);
  box-shadow: inset 0 1px 0 var(--pt-ramp-3), inset 0 -1px 0 var(--pt-ramp-5);
  color: #fefefe;
}

.mb-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.mb-status {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px;
  color: #000;
  text-decoration: none;
  font: 13px/22px var(--sys);
}

.mb-clock {
  padding-left: 8px;
  border-left: 1px solid #999;
}

.menu {
  position: absolute;
  top: 25px;
  left: 0;
  z-index: 60;
  min-width: 196px;
  border-style: solid;
  border-width: 1px 3px 3px 2px;
  border-color: #fff #000 #000 #000;
  border-image: var(--pt-menu) 1 3 3 2 fill;
  background: #ddd;
}

.mb-right .menu {
  left: auto;
  right: 0;
}

.menu [role="menuitem"] {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  width: calc(100% + 2px);
  height: 24px;
  margin: 0 -1px;
  padding: 0 22px 0 22px;
  border: 0;
  background: transparent;
  font: 13px/22px var(--sys);
  text-align: left;
  color: #000;
  text-decoration: none;
  cursor: default;
  white-space: nowrap;
}

.menu > :first-child {
  margin-top: -1px;
}

.menu > :last-child {
  margin-bottom: -1px;
}

.menu [role="menuitem"]:focus,
.menu [role="menuitem"]:hover {
  outline: none;
  background: var(--pt-ramp-4);
  box-shadow: inset 1px 0 0 var(--pt-ramp-3), inset -1px 0 0 var(--pt-ramp-5);
  color: #fefefe;
}

.menu .mi-check::before {
  content: "\2713";
  position: absolute;
  left: 7px;
}

.menu hr {
  display: block;
  width: calc(100% + 2px);
  height: 6px;
  margin: 0 -1px;
  border: 0;
  background: linear-gradient(transparent 2px, #888 2px 3px, #fff 3px 4px, transparent 4px);
}

/* ---- Desktop Workspace & Document Window ----------------------------------------- */

.desktop-stage {
  padding: 16px 14px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.doc-wrap {
  width: min(1080px, 100%);
  min-width: 0;
  transition: width 0.08s steps(2);
}

.doc-wrap.is-zoomed {
  width: min(1340px, 100%);
}

.doc-wrap.is-narrow {
  width: min(500px, 100%);
}

.doc {
  position: relative;
  min-width: 0;
  border-style: solid;
  border-width: 24px 7px 7px 6px;
  border-color: #ccc #000 #000 #ccc;
  border-image: var(--pt-window) 22 7 7 6;
  background: var(--face);
  background-clip: padding-box;
}

.doc-title {
  position: absolute;
  top: -24px;
  left: -6px;
  right: -7px;
  height: 24px;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.doc-stripes {
  position: absolute;
  top: 5px;
  left: 22px;
  right: 22px;
  height: 12px;
  border-style: solid;
  border-width: 0 1px;
  border-image: var(--pt-pinstripes) 0 1 fill / 0 1px;
}

.doc.has-zoom .doc-stripes {
  right: 39px;
}

.doc:not(.has-close) .doc-stripes {
  left: 5px;
}

.doc-title-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 92px);
  margin: 3px auto 0;
  padding: 0 5px;
  height: 18px;
  white-space: nowrap;
  background: #ccc;
  font: 14px/18px var(--sys);
}

.doc-title-text::before,
.doc-title-text::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 1px;
  height: 12px;
}

.doc-title-text::before {
  left: -1px;
  background: repeating-linear-gradient(#ccc 0 1px, transparent 1px 2px);
}

.doc-title-text::after {
  right: -1px;
  background: repeating-linear-gradient(transparent 0 1px, #ccc 1px 2px);
}

.doc-title-text h1,
.doc-title-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-box {
  position: absolute;
  top: 5px;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 0;
  background: var(--pt-box-close) no-repeat;
  pointer-events: auto;
  cursor: default;
}

.title-box.close { left: 4px; }
.title-box.collapse { right: 5px; background-image: var(--pt-box-collapse); }
.title-box.zoom { right: 21px; background-image: var(--pt-box-zoom); }

.doc.is-collapsed {
  border-bottom-width: 0;
}

.doc.is-collapsed > .doc-body {
  display: none;
}

.doc-body {
  border: 1px solid;
  border-color: #fff #aaa #aaa #fff;
  border-image: var(--pt-content-bevel) 1;
  padding: 10px 14px 14px;
}

/* Unified Finder Header & Footer */
.page-head {
  margin: -10px -14px 12px;
  padding: 5px 14px;
  border-bottom: 1px solid #999;
  box-shadow: 0 1px 0 #fff;
  font: 12.5px/18px var(--body);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 14px;
  background: #e5e5e5;
}

.page-head-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-foot {
  margin: 14px -14px -14px;
  padding: 7px 14px;
  border-top: 1px solid #999;
  box-shadow: inset 0 1px 0 #fff;
  background: #e5e5e5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 16px;
  font: 12.5px/18px var(--body);
}

/* Unified Hero Banner across all 3 pages */
.hero-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding: 11px 14px;
  background: var(--pane);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #aaa;
  margin-bottom: 12px;
}

.hero-lead {
  flex: 1 1 300px;
  display: grid;
  gap: 3px;
}

.hero-lead h2 {
  font: 18px/23px var(--sys);
}

.hero-lead p {
  font: 14px/20px var(--body);
  color: #222;
}

.hero-actions {
  margin-left: auto;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ---- Etched Group Boxes & Cards -------------------------------------------------- */

.win {
  position: relative;
  min-width: 0;
  margin-top: 18px;
  padding: 16px 12px 12px;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-group) 2;
}

.win-title {
  position: absolute;
  top: -13px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.win-title-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 6px;
  background: var(--face);
  font: 14px/18px var(--sys);
  pointer-events: auto;
}

.win-body {
  min-width: 0;
}

.win-body > * + * {
  margin-top: 10px;
}

.banner-strip {
  padding: 7px 10px;
  background: var(--pt-highlight);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff;
  font: 14px/20px var(--sys);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.step-box {
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  padding: 9px 10px;
  font: 13.5px/19px var(--body);
}

.step-box > strong:first-child {
  display: block;
  margin-bottom: 3px;
  font: 15px/20px var(--sys);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.hw-card {
  background: var(--pane);
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-group) 2;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hw-card h3 {
  font: 15px/20px var(--sys);
}

.hw-card p {
  font: 13.5px/19px var(--body);
}

.code-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.codebox {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  padding: 5px 7px;
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  font: 12px/16px var(--mono);
  word-break: break-all;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  align-items: center;
}

/* ---- Platinum Push Buttons, Inputs, Selects, Checkboxes -------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  min-height: 26px;
  padding: 2px 14px;
  border-style: solid;
  border-width: 4px;
  border-color: #fff #777 #777 #fff;
  border-image: var(--pt-button-normal) 4 fill;
  background: transparent;
  color: #000;
  font: 13px/18px var(--sys);
  text-decoration: none;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover {
  color: #000;
}

.btn:active:not(:disabled),
.btn.is-pressed {
  border-image-source: var(--pt-button-pressed);
  color: #fff;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  border-image: var(--pt-button-disabled) 2 fill;
  border-width: 2px;
  padding: 4px 16px;
  color: #777;
}

.btn-default {
  border-width: 4px;
  border-image: var(--pt-button-default) 7 8 fill / 7px 8px / 3px;
  border-image-width: 7px 8px;
}

.btn-default:active:not(:disabled),
.btn-default.is-pressed {
  border-image-source: var(--pt-button-default-pressed);
  color: #fff;
}

.btn-small {
  min-width: 0;
  min-height: 24px;
  padding: 1px 10px;
  font: 12px/16px var(--sys);
}

.btn.is-active-filter {
  background: var(--pt-highlight);
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 14px;
  height: 12px;
  margin: 3px 4px 2px 0;
  border: 0;
  background: var(--pt-checkbox-off) no-repeat;
  vertical-align: top;
}

input[type="checkbox"]:checked {
  background-image: var(--pt-checkbox-on);
}

input[type="checkbox"]:active:not(:disabled),
label:active > input[type="checkbox"]:not(:disabled) {
  background-image: var(--pt-checkbox-off-pressed);
}

input[type="checkbox"]:checked:active:not(:disabled),
label:active > input[type="checkbox"]:checked:not(:disabled) {
  background-image: var(--pt-checkbox-on-pressed);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 13px/18px var(--sys);
  user-select: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  max-width: 100%;
  min-width: 104px;
  height: 24px;
  padding: 0 6px;
  border-style: solid;
  border-width: 2px 22px 2px 4px;
  border-color: #000;
  border-image: var(--pt-popup) 9 22 9 4 fill / 9px 22px 9px 4px;
  background: transparent;
  font: 13px/20px var(--sys);
  cursor: default;
}

select:focus:not(:focus-visible) {
  outline: none;
}

input[type="text"],
input[type="password"],
input[type="search"] {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 3px 7px;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  border-radius: 0;
  background: #fff;
  background-clip: padding-box;
  font: 13.5px/18px var(--body);
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus {
  border-image: var(--pt-field-focus) 3 / 3px / 1px;
}

/* ---- Notices, List Wells, Disclosures, Badges ------------------------------------ */

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--pane);
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-group) 2;
}

.notice-warn {
  background: #fff9db;
}

.notice-text {
  display: grid;
  gap: 5px;
  min-width: 0;
  font: 13.5px/19px var(--body);
}

.notice-text > strong:first-child {
  font: 14px/19px var(--sys);
}

.notice-list {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  list-style: disc;
}

details.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  cursor: default;
  font: 14px/19px var(--sys);
  padding: 2px 0;
}

details.disclosure > summary::-webkit-details-marker {
  display: none;
}

details.disclosure > summary::before {
  content: "";
  flex: none;
  width: 12px;
  height: 14px;
  background: var(--pt-disclosure-right) no-repeat;
}

details.disclosure[open] > summary::before {
  background-image: var(--pt-disclosure-down);
}

.disclosure-body {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.well-list {
  display: block;
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
}

.well-list > li {
  padding: 9px 11px;
  border-bottom: 1px solid #ddd;
  font: 13px/18px var(--body);
}

.well-list > li:last-child {
  border-bottom: 0;
}

.links-row {
  display: flex;
  gap: 5px 10px;
  flex-wrap: wrap;
  align-items: baseline;
  font: 14px/19px var(--sys);
}

.well-list > li p {
  margin-top: 4px;
  color: #333;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border: 1px solid #888;
  background: #eee;
  font: 12px/16px var(--body);
  white-space: nowrap;
  color: #000;
}

.badge-ok { background: #ccffcc; border-color: #2f7d2f; }
.badge-warn { background: #ffffcc; border-color: #8a7300; }
.badge-lav { background: var(--pt-highlight); border-color: var(--pt-ramp-4); }
.badge-muted { background: #e8e8e8; color: #444; }

/* ---- Platinum Scrollbars --------------------------------------------------------- */

body *::-webkit-scrollbar {
  width: 15px;
  height: 15px;
  background: #ddd;
}

body *::-webkit-scrollbar-track-piece:vertical {
  border-style: solid;
  border-width: 2px 0 0;
  border-image: var(--pt-scroll-track-v) 2 0 0 0 fill / 2px 0 0 0;
}

body *::-webkit-scrollbar-track-piece:horizontal {
  border-style: solid;
  border-width: 0 0 0 2px;
  border-image: var(--pt-scroll-track-h) 0 0 0 2 fill / 0 0 0 2px;
}

body *::-webkit-scrollbar-thumb:vertical {
  min-height: 19px;
  border-style: solid;
  border-width: 2px 0 4px;
  border-image: var(--pt-scroll-thumb-v) 2 0 4 0 / 2px 0 4px;
  background: var(--pt-scroll-grip-v) 0 50% / 15px 8px no-repeat, var(--pt-scroll-thumb-mid-v) 0 0 / 15px 1px repeat-y;
  background-clip: padding-box;
}

body *::-webkit-scrollbar-thumb:horizontal {
  min-width: 19px;
  border-style: solid;
  border-width: 0 4px 0 2px;
  border-image: var(--pt-scroll-thumb-h) 0 4 0 2 / 0 4px 0 2px;
  background: var(--pt-scroll-grip-h) 50% 0 / 8px 15px no-repeat, var(--pt-scroll-thumb-mid-h) 0 0 / 1px 15px repeat-x;
  background-clip: padding-box;
}

body *::-webkit-scrollbar-corner {
  background: #ddd;
}

/* ---- Login Dialog ---------------------------------------------------------------- */

.login-stage {
  min-height: calc(100vh - 26px);
  display: grid;
  place-items: center;
  padding: 24px 12px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  font: 14px/19px var(--sys);
}

/* ---- Stats & Map Dashboard ------------------------------------------------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 10px;
  background: var(--pane);
  border: 1px solid #888;
  box-shadow: inset 1px 1px 0 #fff;
}

.filter-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 13px/18px var(--sys);
}

.filter-spacer {
  flex: 1 1 auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.stat-card {
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 13px/18px var(--sys);
  color: var(--ink-2);
}

.stat-val {
  font: 26px/30px var(--sys);
  color: #000;
}

.stat-sub {
  font: 12.5px/17px var(--body);
  color: #333;
}

/* Geo Breadcrumbs & 2-Column Map + Drill Explorer */
.geo-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  margin-bottom: 8px;
  background: var(--pane);
  border: 1px solid #888;
  box-shadow: inset 1px 1px 0 #fff;
  font: 13px/18px var(--sys);
}

.geo-crumb-sep {
  color: #666;
  padding: 0 2px;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.map-regions,
.map-zoom-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.map-well {
  position: relative;
  background: #b8cde6;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  overflow: hidden;
}

.map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.map-graticule {
  stroke: #9ab4d2;
  stroke-width: 0.4;
  stroke-dasharray: 2 2;
  fill: none;
}

.map-country,
.map-state {
  fill: #dce4c6;
  stroke: #6f7c5c;
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill 0.1s;
}

.map-state {
  stroke: #5b6a4e;
  stroke-width: 0.65;
}

.map-country:hover,
.map-state:hover {
  fill: #eee7a8;
  stroke: #222;
}

.map-country.tier-1, .map-state.tier-1 { fill: #ccccff; stroke: #4c5399; }
.map-country.tier-2, .map-state.tier-2 { fill: #9999ff; stroke: #333399; }
.map-country.tier-3, .map-state.tier-3 { fill: #6666cc; stroke: #1d1d6b; }
.map-country.tier-4, .map-state.tier-4 { fill: #333399; stroke: #000055; }

.map-country.is-context {
  fill: #e7ecd8;
  stroke: #8c987d;
}

.map-country.is-selected,
.map-state.is-selected {
  stroke: #000;
  stroke-width: 1.4;
  fill: #ffe680;
}

.map-pin {
  fill: #dd0806;
  stroke: #000;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}

.map-pin:hover,
.map-pin.is-selected {
  fill: #ffcc00;
  stroke: #000;
  stroke-width: 1.5;
}

.map-reticle {
  pointer-events: none;
}

.map-reticle circle,
.map-reticle line {
  stroke: #000;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  fill: none;
  pointer-events: none;
}

.map-city-label {
  fill: #111;
  font-family: var(--body);
  font-weight: 600;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 2.2px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.geo-drill-panel {
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  display: flex;
  flex-direction: column;
  max-height: 360px;
  overflow: hidden;
}

.geo-drill-head {
  padding: 6px 9px;
  background: #ddd;
  border-bottom: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff;
  font: 13px/17px var(--sys);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.geo-drill-list {
  overflow-y: auto;
  flex: 1 1 auto;
}

.geo-drill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  width: 100%;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid #e6e6e6;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: 13px/17px var(--body);
}

.geo-drill-row:hover {
  background: #f2f2ff;
}

.geo-drill-row.is-selected {
  background: var(--pt-highlight);
}

.geo-drill-row-bar {
  grid-column: 1 / -1;
}

/* Mac OS 9 Balloon Help */
.balloon-tip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  max-width: 280px;
  padding: 6px 9px;
  background: #ffffcc;
  color: #000;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
  font: 12.5px/17px var(--body);
}

.balloon-tip strong {
  display: block;
  font: 13.5px/18px var(--sys);
  margin-bottom: 2px;
}

.country-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

/* Charts row */
.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
}

.chart-well {
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  padding: 10px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  font: 12.5px/17px var(--body);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1px solid #000;
}

.swatch-inst { background: #333399; }
.swatch-img { background: #6666cc; }
.swatch-upd { background: #9999ff; }

.breakdown-group {
  display: grid;
  gap: 7px;
}

.breakdown-group + .breakdown-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #ccc;
}

.breakdown-title {
  font: 13.5px/18px var(--sys);
}

.bar-item {
  display: grid;
  grid-template-columns: minmax(105px, 42%) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font: 12.5px/17px var(--body);
}

.progress {
  position: relative;
  display: block;
  height: 14px;
  border-style: solid;
  border-width: 2px 3px 2px 3px;
  border-color: #aaa #fff #fff #aaa;
  border-image: var(--pt-progress) 2 3 2 3 fill;
  background: #bbb;
}

.progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: calc((100% + 1px) * var(--pct, 0) / 100);
  max-width: calc(100% + 1px);
  border-style: solid;
  border-width: 0 6px 0 2px;
  border-image: var(--pt-progress-fill) 0 6 0 2 fill;
  background: transparent;
}

/* Finder List View Tables */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.search-box,
input[type="search"].search-box {
  width: min(320px, 100%);
}

.pt-table-wrap {
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  overflow-x: auto;
  max-height: 480px;
  overflow-y: auto;
}

.pt-table {
  width: 100%;
  border-collapse: collapse;
  font: 13px/18px var(--body);
}

.pt-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ddd;
  border-bottom: 1px solid #000;
  border-right: 1px solid #999;
  box-shadow: inset 1px 1px 0 #fff, inset 0 -1px 0 #aaa;
  padding: 5px 8px;
  text-align: left;
  font: 12.5px/17px var(--sys);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.pt-table thead th.is-sorted {
  background: var(--pt-highlight);
}

.pt-table thead th.num,
.pt-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pt-table tbody tr {
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
}

.pt-table tbody tr:hover {
  background: #f2f2ff;
}

.pt-table tbody tr.is-selected {
  background: var(--pt-highlight);
}

.pt-table tbody td {
  padding: 6px 8px;
  vertical-align: top;
}

.pt-table tbody tr.detail-row {
  background: #f6f6fb;
  cursor: default;
}

.pt-table tbody tr.detail-row:hover {
  background: #f6f6fb;
}

.detail-list {
  display: grid;
  gap: 4px;
  padding: 4px 2px;
}

.detail-entry {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 3px;
}

.detail-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.file-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mono-cell {
  font: 12px/16px var(--mono);
  overflow-wrap: anywhere;
}

.ip-nowrap {
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .geo-drill-panel {
    max-height: 240px;
  }
  .charts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .desktop-stage {
    padding: 8px 4px 18px;
  }
  .menubar {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .menubar::-webkit-scrollbar {
    display: none;
  }
  .mb-clock,
  .mb-right {
    display: none;
  }
  .mb-title {
    font-size: 12px;
    padding: 0 5px;
    gap: 3px;
  }
  .mb-title .mb-icon-slot img {
    width: 14px;
    height: 14px;
  }
  .doc-body {
    padding: 8px 9px 10px;
  }
  .page-head {
    margin: -8px -9px 10px;
    padding: 5px 9px;
  }
  .page-foot {
    margin: 12px -9px -10px;
    padding: 6px 9px;
  }
  .hw-select {
    width: 100%;
    min-width: 0;
  }
  .hw-panel {
    padding: 11px 12px;
  }
}

/* ---- Simplified Hardware Picker & Ctrl+Alt+Del Tip ------------------------------- */

.hw-picker-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--pane);
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-group) 2;
}

.hw-picker-label {
  font: 14px/20px var(--sys);
  white-space: nowrap;
}

.hw-select {
  min-width: 280px;
  height: 24px;
  font: 14px/20px var(--sys);
}

.hw-panels {
  margin-top: 10px;
}

.hw-panel {
  background: #fff;
  border-style: solid;
  border-width: 2px;
  border-color: #888 #fff #fff #888;
  border-image: var(--pt-field) 2;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hw-panel[hidden] {
  display: none;
}

.hw-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hw-panel-head > .pt-icon {
  flex: none;
  margin-top: 1px;
}

.hw-panel-head h3 {
  font: 16px/21px var(--sys);
  margin-bottom: 3px;
}

.hw-panel-head p {
  font: 14px/20px var(--body);
  color: #222;
}

.hw-panel-note {
  font: 13px/18px var(--body);
  color: #333;
}

.hw-quickstart-strip {
  padding: 7px 10px;
  background: var(--pane);
  border: 1px solid #999;
  font: 13px/18px var(--body);
}

.notice-tip {
  margin-top: 14px;
  background: #eef0fb;
  border-color: #63639c;
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: inset -1px -1px 0 #bbb, inset 1px 1px 0 #fff, 0 1px 0 #000;
  font: 12.5px/16px var(--sys);
  color: #000;
}

.disclosure-stack {
  display: grid;
  gap: 10px;
}

.disclosure-stack > details + details {
  padding-top: 10px;
  border-top: 1px solid #bbb;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
