/* tower2's pages in the results app's "Electric Bee" look (results/src/styles.css): Cardo titles and figures,
   Manrope text, IBM Plex Mono for slugs and JSON, ink on white, square corners. Lists sit under 1px ink rules with
   soft rules between their lines; labels in small capitals. Electric blue is for the bee, focus, the chosen item and
   what is live. Hatching is what is unavailable or has no data. */

:root {
  --ink: #121212;
  --muted: #6b6b6b;
  --faint: #8c8c8c;
  --line: #e4e4e4;
  --tint: #f4f4f4;
  --wash: #fafafa;
  --electric: #050cff;
  --electric-tint: #eceeff;
  --bad: #c5321c;
  --bad-tint: #fbebe7;
  --hatch: repeating-linear-gradient(-45deg, rgb(0 0 0 / 0.09) 0 1.5px, transparent 1.5px 8px);
  --tile-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 20px 44px -16px rgb(0 0 0 / 0.3);
  --serif: "Cardo", Georgia, serif;
  --sans: "Manrope", "Avenir Next", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(20px, 3.6vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: #fff; color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; }
::selection { background: var(--electric); color: #fff; }

.small-caps { font: 600 11.5px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font: 500 13px/1.2 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono, .slug { font: 400 12.5px/1.4 var(--mono); }
.slug { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.bad { color: var(--bad); }
.nowrap { white-space: nowrap; }

.bee {
  flex: none; display: block; width: 22px; height: 25px; background: var(--electric);
  -webkit-mask: url("/ui/bee.png") center / contain no-repeat; mask: url("/ui/bee.png") center / contain no-repeat;
}

/* ---- Shell: masthead, page head ---- */

.shell { max-width: 1480px; min-height: 100vh; margin: 0 auto; padding: 0 var(--pad); display: flex; flex-direction: column; }
.masthead { display: flex; align-items: stretch; gap: 44px; height: 72px; border-bottom: 1px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font: 700 24px/1 var(--serif); }
.brand-tower { padding: 4px 7px 3px; border: 1px solid var(--ink); font: 600 10px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; }
.brand-tower.is-dev { border-color: var(--electric); color: var(--electric); }
.tabs { display: flex; gap: 30px; }
.tab { display: flex; align-items: center; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 500 15px/1 var(--sans); color: var(--muted); text-decoration: none; transition: color 120ms ease; }
.tab:hover { color: var(--ink); }
.tab.is-on { border-bottom-color: var(--ink); color: var(--ink); }
.masthead-meta { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--muted); }
.masthead-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker {
  max-width: 280px; padding: 0 18px 2px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; appearance: none; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23121212' stroke-width='1.4'/%3E%3C/svg%3E") right center / 10px 6px no-repeat;
  font: 500 15px/1.3 var(--sans); color: var(--ink);
}
.lang-switch { display: flex; align-items: center; align-self: stretch; padding-left: 22px; border-left: 1px solid var(--line); margin: 18px 0; }
.plain-button { padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; font-weight: 500; }
.masthead-hotel { color: var(--ink); font-weight: 500; }

/* A list's filters, over it: the fields it is filtered by, a quick choice, a way to clear them. */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 22px; padding: 0 0 34px; }
.filters .field { width: 230px; }
.filters .field.is-date { width: 168px; }
.filters .quick { display: grid; gap: 6px; }
.filters .clear { margin-bottom: 9px; }

/* The admin site's masthead: black from edge to edge, everything on it white. */
.masthead.is-admin { background: var(--ink); color: #fff; box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); }
.masthead.is-admin .bee { background: #fff; }
.masthead.is-admin .tab { color: rgb(255 255 255 / 0.6); }
.masthead.is-admin .tab:hover, .masthead.is-admin .tab.is-on { color: #fff; }
.masthead.is-admin .tab.is-on { border-bottom-color: #fff; }
.masthead.is-admin .masthead-meta { color: rgb(255 255 255 / 0.72); }
.masthead.is-admin .plain-button, .masthead.is-admin .link, .masthead.is-admin .masthead-hotel { color: #fff; border-bottom-color: #fff; }
.masthead.is-admin .brand-tower { border-color: #fff; color: #fff; }
.masthead.is-admin .picker {
  border-bottom-color: #fff; color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.4'/%3E%3C/svg%3E");
}
.masthead.is-admin .picker option { color: var(--ink); }

/* The hotel app's masthead, as the Morning Brief design draws it: the hotel over the email, a locked tab greyed. */
.masthead.is-app { height: 80px; gap: 56px; }
.masthead.is-app .brand { gap: 14px; }
.masthead.is-app .brand-name { font-size: 26px; }
.masthead.is-app .tabs { gap: 32px; }
.masthead.is-app .tab { gap: 7px; font-size: 16px; }
.tab.is-locked { color: #b4b4b4; }
.masthead.is-app .masthead-meta { gap: 28px; }
.masthead-who { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 500 15px/1.2 var(--sans); color: var(--ink); }
.masthead-who small { display: flex; gap: 12px; font-size: 13px; font-weight: 400; color: var(--muted); }
.masthead-who .plain-button { font-weight: 400; }
.masthead.is-app .lang-switch { padding-left: 28px; margin: 22px 0; }

.page { flex: 1; padding-bottom: 96px; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; padding: 52px 0 34px; }
.page-head .eyebrow { margin-bottom: 18px; }
.page-title { margin: 0; font: 700 clamp(40px, 4.6vw, 64px) / 1.02 var(--serif); }
.page-sub { max-width: 680px; margin: 16px 0 0; font-size: 17px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.page-message { padding: 80px 0; }
.page-message h1 { margin: 0 0 14px; font: 700 40px/1.1 var(--serif); }

.rise { animation: rise 420ms cubic-bezier(.2, .7, .2, 1) both; }
.rise:nth-child(2) { animation-delay: 60ms; } .rise:nth-child(3) { animation-delay: 120ms; } .rise:nth-child(4) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---- Blocks: a heading on an ink rule, its actions on the right ---- */

.block { padding: 20px 0 8px; border-top: 1px solid var(--ink); margin-bottom: 56px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; margin-bottom: 18px; }
.block-head h2 { margin: 0; font: 700 30px/1.1 var(--serif); }
.block-head .count { font: 500 14px/1 var(--sans); color: var(--muted); }
.block-head .gap { flex: 1; }
.block-note { margin: -8px 0 18px; max-width: 760px; color: var(--muted); font-size: 14px; }

/* ---- Tables ---- */

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 0 12px 12px; border-bottom: 1px solid var(--ink); text-align: left; vertical-align: bottom; white-space: nowrap; font: 600 11px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-click { cursor: pointer; }
.table tr.is-click:hover td { background: var(--wash); }
.table tr.is-on td { background: var(--electric-tint); }
.table tr.is-dim td { color: var(--faint); }
.table .name { font-weight: 600; }
.table .name small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 8px; }
.empty { padding: 30px 0; color: var(--muted); text-align: center; }

/* ---- Controls ---- */

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  font: 600 14px/1 var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color 120ms ease;
}
.btn:hover:not(:disabled) { background: var(--tint); }
.btn.ink { background: var(--ink); color: #fff; }
.btn.ink:hover:not(:disabled) { background: #000; }
.btn.small { padding: 6px 10px; font-size: 12.5px; }
.btn.quiet { border-color: var(--line); }
.btn.danger { border-color: #e9b9b0; color: var(--bad); }
.btn.danger:hover:not(:disabled) { background: var(--bad-tint); }
.btn:disabled { opacity: 0.45; cursor: default; }
.link { display: inline-flex; align-items: center; gap: 0.45em; padding: 0 0 0.25em; border: 0; border-bottom: 1.5px solid var(--ink); background: none; font: 600 14px/1.2 var(--sans); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.link span { transition: transform 160ms ease; }
.link:hover span { transform: translateX(3px); }
.link.is-small { border-bottom-width: 1px; font-size: 13px; }
.link.is-off { border-bottom-style: dashed; color: var(--faint); border-bottom-color: var(--faint); cursor: default; }

.seg { display: inline-flex; flex: none; border: 1px solid var(--ink); background: #fff; vertical-align: middle; }
.seg button { padding: 8px 14px; border: 0; background: none; font: 500 13.5px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button:not(.is-on):not(:disabled):hover { background: var(--tint); }
.seg button.is-on { background: var(--ink); color: #fff; }
.seg.is-small button { padding: 6px 10px; font-size: 12.5px; }
.seg.is-off { border-color: #c8c8c8; background: var(--hatch); }
.seg.is-off button { color: var(--faint); cursor: not-allowed; }
.seg.is-off button + button { border-left-color: #c8c8c8; }
.seg.is-off button.is-on { background: #d6d6d6; color: #fff; }
.seg.is-busy { opacity: 0.6; pointer-events: none; }
.switch { display: grid; gap: 6px; justify-items: start; }
.switch-note { font-size: 12.5px; color: var(--faint); }

.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > span:first-child { font: 600 11px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field small { color: var(--faint); font-size: 12px; line-height: 1.4; }
.input, .field input[type=text], .field input[type=number], .field input[type=email], .field input[type=date], .field input:not([type]), .field select, .field textarea, textarea.input {
  width: 100%; padding: 8px 10px; border: 1px solid #cfcfcf; border-radius: 0; background: #fff; color: var(--ink); font: 400 14px/1.4 var(--sans);
}
.field select { appearance: none; padding-right: 28px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23121212' stroke-width='1.4'/%3E%3C/svg%3E") right 10px center / 10px 6px no-repeat; }
.field textarea, textarea.input { min-height: 74px; resize: vertical; }
textarea.code, .code { font: 400 12.5px/1.5 var(--mono); }
::placeholder { color: #b8b8b8; opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 1px var(--electric); }
.field input:disabled, .field select:disabled { background: var(--tint); color: var(--muted); }
.field.is-bad input, .field.is-bad textarea { border-color: var(--bad); }
.field > .seg { justify-self: start; }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.checks-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; }
.wide { grid-column: 1 / -1; }
.search { width: 240px; padding: 7px 10px; border: 1px solid #cfcfcf; background: #fff; font-size: 14px; }
.search:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 1px var(--electric); }

.tag { display: inline-block; padding: 4px 7px 3px; border: 1px solid var(--ink); font: 600 10px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; }
.tag.ink { background: var(--ink); color: #fff; }
.tag.faint { border-color: #cfcfcf; color: var(--faint); }
.tag.electric { border-color: var(--electric); color: var(--electric); }
.tag.bad { border-color: var(--bad); color: var(--bad); }
.tag.hatch { border-color: #cfcfcf; color: var(--muted); background: var(--hatch); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--faint); vertical-align: 1px; margin-right: 7px; flex: none; }
.dot.on { border-color: var(--electric); background: var(--electric); animation: live 1.8s ease-out infinite; }
.dot.warm { border-color: var(--ink); background: var(--ink); }
.dot.bad { border-color: var(--bad); background: var(--bad); }
.dot.warn { border-color: var(--ink); background: var(--hatch); }

/* A phone's health (health.js): its battery, its Wi-Fi bars, its camera. */
.batt { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.batt > i { position: relative; display: block; width: 22px; height: 11px; border: 1.5px solid currentColor; }
.batt > i::after { content: ""; position: absolute; right: -4px; top: 2px; width: 2px; height: 4px; background: currentColor; }
.batt > i b { display: block; height: 100%; background: currentColor; }
.batt.is-low { color: var(--bad); }
.batt .bolt { width: 8px; height: 12px; fill: currentColor; margin-left: -2px; }
.wifi { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.wifi > i { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.wifi > i b { display: block; width: 3px; background: #d4d4d4; }
.wifi > i b:nth-child(1) { height: 3px; } .wifi > i b:nth-child(2) { height: 6px; } .wifi > i b:nth-child(3) { height: 9px; } .wifi > i b:nth-child(4) { height: 12px; }
.wifi > i b.on { background: var(--ink); }
.cam { display: inline-flex; align-items: baseline; gap: 0; white-space: nowrap; }
.cam small { margin-left: 8px; color: var(--muted); font-size: 12.5px; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgb(5 12 255 / 0.45); } 100% { box-shadow: 0 0 0 7px rgb(5 12 255 / 0); } }

.bar { display: block; height: 6px; background: var(--tint); }
.bar > span { display: block; height: 100%; background: var(--ink); transition: width 400ms cubic-bezier(.2, .7, .2, 1); }
.bar.is-none { background: var(--hatch); }
.bar.disk { position: relative; overflow: visible; }
.bar.disk > i { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--bad); }
.bar.is-bad > span { background: var(--bad); }

/* ---- Figures ---- */

.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; padding: 8px 0 52px; }
.figure { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ink); }
.figure-value { font: 700 52px/1 var(--serif); font-variant-numeric: tabular-nums; }
.figure-note { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.figure.is-bad { border-top-color: var(--bad); }
.figure.is-bad .figure-value { color: var(--bad); }

/* ---- Dialog, drawer, toast ---- */

dialog.box { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 30px 32px 28px; border: 0; border-radius: 0; box-shadow: var(--tile-shadow); color: var(--ink); }
dialog.box::backdrop { background: rgb(18 18 18 / 0.28); }
dialog.box h3 { margin: 0 0 6px; font: 700 30px/1.1 var(--serif); }
dialog.box .lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
dialog.box .body { display: grid; gap: 16px; }
dialog.box .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
dialog.box .problem { min-height: 1.4em; margin: 12px 0 0; color: var(--bad); font-size: 13.5px; font-weight: 600; }

.drawer { position: fixed; inset: 0 0 0 auto; z-index: 40; width: min(760px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -24px 0 60px -20px rgb(0 0 0 / 0.35); transform: translateX(102%); transition: transform 260ms cubic-bezier(.2, .7, .2, 1); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 16px; padding: 26px 32px 18px; border-bottom: 1px solid var(--ink); }
.drawer-head h3 { margin: 6px 0 0; font: 700 32px/1.08 var(--serif); }
.drawer-head .gap { flex: 1; }
.drawer-body { flex: 1; overflow: auto; padding: 24px 32px 40px; display: grid; gap: 26px; align-content: start; }
.drawer-foot { display: flex; align-items: center; gap: 10px; padding: 16px 32px; border-top: 1px solid var(--line); background: var(--wash); }
.drawer-foot .gap { flex: 1; }
.drawer-foot .problem { color: var(--bad); font-size: 13.5px; font-weight: 600; }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgb(18 18 18 / 0.18); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.fieldset { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fieldset > legend, .fieldset > .legend { display: flex; align-items: baseline; gap: 12px; font: 700 20px/1.2 var(--serif); }
.fieldset > .legend small { font: 400 13px/1.3 var(--sans); color: var(--muted); }

.toast { position: fixed; left: var(--pad); bottom: 24px; z-index: 60; max-width: 520px; padding: 13px 16px; background: var(--ink); color: #fff; font: 500 14px/1.4 var(--sans); box-shadow: var(--tile-shadow); transform: translateY(20px); opacity: 0; transition: transform 200ms ease, opacity 200ms ease; pointer-events: none; }
.toast.is-on { transform: none; opacity: 1; }
.toast.is-bad { background: var(--bad); }

.notice { max-width: 760px; padding: 28px 32px 30px; background: var(--tint); border-left: 3px solid var(--ink); }
.notice h3 { margin: 10px 0 0; font: 700 28px/1.15 var(--serif); }
.notice p { margin: 10px 0 0; color: var(--muted); }
.notice.is-bad { margin-bottom: 40px; background: var(--bad-tint); border-left-color: var(--bad); }
.notice.is-bad .eyebrow { color: var(--bad); font-weight: 600; }
.notice.is-bad p { color: var(--ink); }

pre.json { margin: 0; padding: 14px 16px; max-height: 420px; overflow: auto; background: var(--wash); border: 1px solid var(--line); font: 400 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }

/* ---- Date stepper (housekeeping, testing) ---- */

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color 120ms ease; }
.stepper button:not(:disabled):hover { border-color: var(--ink); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.stepper-label { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 230px; text-align: center; cursor: pointer; }
.stepper-label span { font: 600 16px/1.2 var(--sans); }
.stepper-label small { font-size: 13px; color: var(--muted); }
.stepper-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

@media (max-width: 1100px) {
  .masthead, .masthead.is-app { flex-wrap: wrap; gap: 0 26px; height: auto; padding-top: 16px; }
  .masthead-meta { margin-left: auto; }
  .tabs { order: 3; flex-basis: 100%; height: 50px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .field, .filters .field.is-date { width: calc(50% - 11px); }
}
@media (max-width: 760px) {
  .page-head { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 40px 0 28px; }
  .masthead-email { display: none; }
  .tabs { gap: 18px; }
  .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); }
  .figure-value { font-size: 40px; }
  .filters .field, .filters .field.is-date { width: 100%; }
}
