/* Pages behind the sign-in: header band, tester tiles, empty state, Pro strip. */

.band { position: relative; background: linear-gradient(to bottom, var(--sky), var(--bg)); overflow: hidden; }
.band-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 3.5rem); position: relative; z-index: 1; }
.band h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: .95; letter-spacing: -.035em; font-weight: 900; margin: 0 0 .6rem; }
.band-lead { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 36rem; }
.band-ridge { position: absolute; inset-inline: 0; inset-block-end: 0; width: 100%; height: clamp(2.5rem, 6vw, 5rem); }
.band-ridge .ridge-far { fill: var(--ridge-far); }
.band-ridge .ridge { fill: var(--bg); }
[dir="rtl"] .band-ridge { transform: scaleX(-1); }

.plan-chip { font-weight: 900; font-size: 1.05rem; letter-spacing: -.01em; padding: .35rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--fg); margin-block-end: .3rem; }
.plan-chip.is-pro { background: var(--accent); color: var(--accent-fg); box-shadow: none; }

main.wrap:has(.testers) { padding-block-start: .5rem; }
.testers h2, .pro-strip h2, main section > h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; font-weight: 900; margin: 1.5rem 0 1rem; }

/* Empty state: the way from sign-up to the first signal */
.trailhead { background: var(--surface); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2rem); }
.waiting { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.25rem; color: var(--muted); }
.beacon { position: relative; flex: none; width: .8rem; height: .8rem; border-radius: 50%; background: var(--fair); }
.beacon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--fair); animation: beacon 2.4s ease-out infinite; }
@keyframes beacon { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .beacon::after { animation: none; opacity: 0; } }
.trailhead h3 { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; margin: 0 0 1.25rem; }

.waypoints { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: wp; position: relative; }
/* The dashed trail runs through the centre of the markers */
.waypoints::before { content: ""; position: absolute; inset-inline: 1.2rem; inset-block-start: 1.2rem; border-block-start: 3px dashed var(--line); }
.waypoints li { counter-increment: wp; position: relative; padding-inline-end: 1rem; font-weight: 700; }
.waypoints li::before { content: counter(wp); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--fg); color: var(--bg); font-weight: 900; margin-block-end: .6rem; position: relative; box-shadow: 0 0 0 5px var(--surface); }
.waypoints li:last-child::before { background: var(--accent); color: var(--accent-fg); }

/* Testers that have reported in */
.tester-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.tester-tile { background: var(--surface); border-radius: 22px; padding: 1.4rem; }
.tester-tile h3 { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; margin: .9rem 0 .1rem; overflow-wrap: anywhere; }
.tester-tile .tile-line { color: var(--muted); margin: 0 0 .9rem; font-size: .95rem; overflow-wrap: anywhere; }
.tester-tile .tile-seen { margin: 0; font-size: .95rem; }
.tester-tile .tile-status { display: inline-block; font-weight: 800; font-size: .9rem; padding: .2rem .7rem; border-radius: 999px; }
.tile-status.is-on { background: var(--good); color: #fff; }
.tile-status.is-starting { background: var(--fair); color: #1c2b30; }

/* Survey list */
table.data th { font-size: .85rem; color: var(--muted); font-weight: 700; }
table.data td { padding-block: .7rem; }
.format { font-weight: 700; font-size: .9rem; }

/* Pro, in the same granite as on the start page */
.pro-strip { margin-top: 3rem; background: var(--granite); color: var(--on-granite); border-radius: 22px; padding: clamp(1.4rem, 3vw, 2rem); position: relative; overflow: hidden; }
.pro-strip::after { content: ""; position: absolute; inset-inline-end: -4rem; inset-block-start: -4rem; width: 9rem; height: 9rem; border-radius: 50%; border: 14px solid var(--accent); }
.pro-strip h2 { color: var(--accent); margin: 0 0 .5rem; position: relative; z-index: 1; }
.pro-strip p { max-width: 38rem; margin: 0 0 1.25rem; position: relative; z-index: 1; }
.pro-strip .button { position: relative; z-index: 1; }

@media (max-width: 40rem) {
  .waypoints { grid-template-columns: 1fr; gap: 1rem; }
  .waypoints::before { inset-inline: auto; inset-inline-start: 1.2rem; inset-block: 1.2rem; border-block-start: 0; border-inline-start: 3px dashed var(--line); width: 0; }
  .waypoints li { display: flex; align-items: center; gap: .9rem; }
  .waypoints li::before { margin: 0; flex: none; }
}

/* Account and Pro */
.panel { background: var(--surface); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2rem); margin-block: 0 1.25rem; }
.panel > h2 { margin-top: 0; }
.panel h3 { font-size: 1.15rem; font-weight: 900; letter-spacing: -.01em; margin: 1.75rem 0 1rem; }
.panel-key { box-shadow: inset 0 0 0 3px var(--accent); }
.copy-large .copy-field { font-size: 1rem; padding: .8rem 1rem; border-radius: 12px; }
.copy-large button { border-radius: 12px; }

/* Setup steps: numbered markers on a dashed trail running down the side */
.trail-steps { list-style: none; padding: 0; margin: 0; counter-reset: ts; position: relative; }
.trail-steps::before { content: ""; position: absolute; inset-block: 1.2rem; inset-inline-start: 1.15rem; border-inline-start: 3px dashed var(--line); }
.trail-steps > li { counter-increment: ts; position: relative; padding-inline-start: 3.4rem; margin-block-end: 1.25rem; min-height: 2.4rem; }
.trail-steps > li::before { content: counter(ts); position: absolute; inset-inline-start: 0; inset-block-start: -.2rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--fg); color: var(--bg); font-weight: 900; box-shadow: 0 0 0 5px var(--surface); }
.trail-steps > li:last-child::before { background: var(--accent); color: var(--accent-fg); }
.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1.25rem; margin: .9rem 0 0; padding: 1rem 1.1rem; background: var(--bg); border-radius: 12px; }
.fields dt { font-weight: 700; }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.rotate { margin-top: 1.75rem; padding-top: 1.25rem; border-block-start: 2px solid var(--line); }
.rotate .hint { margin: 0 0 .75rem; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem 1.5rem; }
.form-end { grid-column: 1 / -1; }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.form-inline > div { flex: 1 1 15rem; max-width: 22rem; }
.panel-danger { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.panel-danger > h2 { color: var(--danger); }

.gains { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem 1.5rem; }
.gains li { position: relative; padding-inline-start: 2rem; font-weight: 700; }
.gains li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .3rem; width: 1.1rem; height: .6rem; border-inline-start: 4px solid var(--good); border-block-end: 4px solid var(--good); transform: rotate(-45deg); }
[dir="rtl"] .gains li::before { transform: rotate(45deg); }
.soon { font-weight: 700; }
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-block-end: 1rem; }
.price-card { padding: 1.75rem; border-radius: 22px; box-shadow: inset 0 0 0 2px var(--fg); }
.price-card h2 { margin: 0 0 .5rem; font-size: 1.4rem; }
.price-card .price { font-size: 2.2rem; font-weight: 900; letter-spacing: -.03em; margin: 0 0 1.25rem; }
.price-card.is-featured { background: var(--granite); color: var(--on-granite); box-shadow: none; }
.price-card.is-featured h2 { color: var(--accent); }
.pro-alert { background: var(--warn-bg); color: var(--warn); padding: .6rem .9rem; border-radius: 10px; position: relative; z-index: 1; }
.pro-strip .actions { position: relative; z-index: 1; margin: 0; }
.button.ghost { background: transparent; color: var(--on-granite); box-shadow: inset 0 0 0 2px var(--on-granite); }

@media (max-width: 40rem) {
  .fields { grid-template-columns: 1fr; gap: .1rem; }
  .fields dd { margin-block-end: .5rem; }
}
.form-inline button.danger { padding-block: .55rem; border-radius: 8px; }
.tile-status.is-over { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.tile-remove { margin-top: .9rem; }
.tile-remove button { font-size: .9rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tile-remove button:hover { color: var(--danger); text-decoration-color: var(--danger); }
.testers .warning { margin-bottom: 1rem; }

/* Tester models: a picture per model, so the owner recognises the device in their hand */
.tracker-picture { display: block; width: 100%; height: 100%; }
.tp-body { fill: #26292c; stroke: var(--line); stroke-width: 1.5; }
.tp-antenna { fill: #3a3e42; }
.tp-screen { fill: #12324a; }
.tp-line { fill: #d7f26a; }
.tp-line.is-dim { fill: #7fb8d8; }
.tp-button { fill: #3a3e42; }
.tile-model { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; padding-top: .9rem; border-block-start: 2px solid var(--line); }
.tile-model > .tracker-picture { width: 2.2rem; height: 3.3rem; flex: none; }
.tile-model p { margin: 0; font-weight: 800; }
.model-change summary { cursor: pointer; color: var(--muted); font-size: .9rem; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.model-change[open] summary { margin-block-end: .7rem; }
.model-ask { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: var(--bg); }
.model-ask h4 { margin: 0 0 .2rem; font-size: 1.1rem; font-weight: 900; }
.model-ask .hint { margin: 0 0 .8rem; }
.model-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; max-width: 28rem; }
.model-tile { display: grid; justify-items: center; gap: .5rem; padding: .8rem .5rem .7rem; border-radius: 14px; background: var(--surface); color: var(--fg); font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); }
.model-tile .tracker-picture { width: 3rem; height: 4.5rem; }
.model-tile span { white-space: nowrap; }
.model-change summary::-webkit-details-marker { display: none; }
.model-change summary { list-style: none; }
.model-tile:hover { box-shadow: inset 0 0 0 2px var(--fg); }
.model-tile[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--accent); }
.model-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile-problem { margin: .9rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .9rem; }
.tile-problem { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: flex-start; justify-content: space-between; }
.tile-problem p { margin: 0; flex: 1 1 14rem; }
.tile-problem code { overflow-wrap: anywhere; }
.tile-problem button.link { color: inherit; white-space: nowrap; }

/* Guide: the steps run down a dashed trail, each with its screenshots */
.guide { list-style: none; padding: 0; margin: 1rem 0 2rem; counter-reset: gs; position: relative; }
.guide::before { content: ""; position: absolute; inset-block: 1.4rem; inset-inline-start: 1.35rem; border-inline-start: 3px dashed var(--line); }
.guide > li { counter-increment: gs; position: relative; padding-inline-start: 4rem; margin-block-end: 2.75rem; max-width: 52rem; }
.guide > li::before { content: counter(gs); position: absolute; inset-inline-start: 0; inset-block-start: 0; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--fg); color: var(--bg); font-weight: 900; font-size: 1.1rem; box-shadow: 0 0 0 6px var(--bg); }
.guide > li:last-child::before { background: var(--accent); color: var(--accent-fg); }
.guide h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); letter-spacing: -.025em; font-weight: 900; margin: .35rem 0 .75rem; }
.guide p { max-width: 42rem; }
.guide .fields { max-width: 42rem; }
.shot { margin: 1.25rem 0 1.5rem; }
.shot img { display: block; width: 100%; max-width: 40rem; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 10px 30px -18px rgba(0, 0, 0, .35); background: #fff; }
.guide-help { max-width: 56rem; }
@media (max-width: 40rem) {
  .guide::before { inset-inline-start: 1rem; }
  .guide > li { padding-inline-start: 2.9rem; }
  .guide > li::before { width: 2.1rem; height: 2.1rem; font-size: .95rem; }
}

/* Survey map: points coloured by signal, gateways as rings */
.survey-map { margin-block-start: 1.5rem; }
.map-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-block-end: 1rem; }
.map-head h2 { margin: 0; }
.map-switch { display: inline-flex; border: 2px solid var(--fg); border-radius: 999px; overflow: hidden; }
.map-switch button { background: none; border: 0; padding: .35rem .95rem; font: inherit; font-weight: 700; color: var(--fg); cursor: pointer; }
.map-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.map-switch button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.map { height: clamp(320px, 60vh, 560px); border-radius: 14px; overflow: hidden; background: var(--sky); z-index: 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; list-style: none; padding: 0; margin: .9rem 0 .25rem; font-size: .9rem; }
.map-legend[hidden] { display: none; }
.map-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: .85rem; height: .85rem; border-radius: 50%; display: inline-block; }
.dot.is-good { background: var(--good); } .dot.is-fair { background: var(--fair); } .dot.is-weak { background: var(--weak); }
.dot.is-gateway { background: var(--surface); box-shadow: inset 0 0 0 3px var(--fg); }
.leaflet-popup-content { font: inherit; font-size: .9rem; }
.map-gateways { margin-top: .5rem; border-collapse: collapse; }
.map-gateways caption { text-align: start; font-weight: 700; padding-block-end: .2rem; }
.map-gateways td { padding: .15rem .6rem .15rem 0; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); } }
:root[data-theme="dark"] .map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); }
.survey-bar { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; }
.survey-bar > * { margin: 0; }
.survey-bar form { flex: 1 1 22rem; flex-wrap: nowrap; }
.survey-bar form input { flex: 0 1 18rem; min-width: 0; }
.beacon.is-live { background: var(--good); }
.beacon.is-live::after { border-color: var(--good); }
.live { display: flex; align-items: center; gap: .65rem; font-weight: 700; }
.survey-when { display: inline-flex; align-items: center; gap: .55rem; }
.live[hidden] { display: none; }
button.link.danger-link { color: var(--danger); text-decoration: underline; text-underline-offset: 3px; }
