/* Hallmark · shape: app screen · genre: modern-minimal · theme: custom (守望 Mini) · v2.0.0 */
/* Critique: give the device roster and the signal timeline separate reading columns. */
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
h1, h2, h3 { overflow-wrap: break-word; min-width: 0; line-height: 1.3; }
h1, h2 { text-wrap: balance; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.27rem; }
h3 { font-size: 1rem; }
small { font-size: .875rem; color: var(--muted); }
button, input { font: inherit; border-radius: var(--radius); }
button {
  cursor: pointer; min-height: 44px; color: var(--forest); background: var(--surface);
  border: 1px solid var(--input-line); font-size: .925rem; font-weight: 650; padding: 0 1rem;
}
button:hover { background: var(--pale); }
button:active { color: var(--ink); background: var(--line); }
button:disabled { color: var(--muted); background: var(--slate-bg); border-color: var(--input-line); cursor: wait; }
.primary { color: var(--on-forest); background: var(--forest); border-color: var(--forest); }
.primary:hover, .primary:active { color: var(--on-forest); background: var(--forest-dark); }
input { display: block; width: 100%; margin-top: .35rem; min-height: 44px; padding: .45rem .7rem; border: 1px solid var(--input-line); background: var(--surface); color: var(--ink); }
label { display: block; font-weight: 600; font-size: .94rem; }
label small { font-weight: 400; padding-left: .35rem; }
.wrap { width: min(var(--wrapper), calc(100% - 3rem)); margin-inline: auto; }
.top { background: var(--forest-dark); color: var(--on-forest); }
.top-inner { min-height: 64px; display: flex; align-items: center; gap: 1.2rem; }
.brand { font-weight: 740; font-size: 1.16rem; white-space: nowrap; }
.section-name { color: var(--forest-muted); font-size: .9rem; }
.on-dark { margin-left: auto; color: var(--on-forest); background: var(--forest); border-color: var(--forest-muted); }
.on-dark:hover, .on-dark:active { background: var(--forest-dark); color: var(--on-forest); }
.on-dark:focus-visible { outline-color: var(--focus-dark); }
main { padding-block: 2.6rem 4rem; }
.login { max-width: 31rem; padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.login p, .heading p { color: var(--muted); margin-top: .45rem; }
.form-stack { display: grid; gap: .9rem; margin-top: 1.4rem; }
.form-stack button { justify-self: start; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.5rem; }
.heading button { flex: none; }
.heading.compact { padding-bottom: .65rem; }
.inline-form, .keys { margin-bottom: 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.inline-form { display: flex; align-items: end; gap: .6rem; flex-wrap: wrap; }
.inline-form label { flex: 1 1 12rem; }
.inline-form .error { flex-basis: 100%; }
.keys .key-fields { display: grid; gap: .65rem; }
.key-fields input { font-family: var(--mono); font-size: .925rem; }
.keys .key-message { font-size: .875rem; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.45fr); gap: 1.6rem; align-items: start; }
.workspace-grid.family { grid-template-columns: minmax(0, 1fr); max-width: 56rem; }
#roster { border-top: 1px solid var(--line); padding-top: 1.1rem; }
#roster-state { margin-top: .75rem; color: var(--muted); }
.devices, .changes ul { padding: 0; list-style: none; }
.devices li { border-bottom: 1px solid var(--line); }
.devices button {
  display: grid; grid-template-columns: minmax(0,1fr) auto; width: 100%; align-items: center; gap: .3rem .5rem;
  border: 0; padding: .72rem .65rem; text-align: left; background: var(--paper); font-weight: 600;
}
.devices button:hover, .devices button[aria-current="true"] { background: var(--pale); }
.devices .device-name, .mono { overflow-wrap: anywhere; }
.mono { font-family: var(--mono); color: var(--muted); font-size: .875rem; font-weight: 400; }
.devices .mono { grid-column: 1; }
.status { display: inline-block; padding: .2rem .53rem; font-size: .875rem; font-weight: 600; color: var(--ink); background: var(--slate-bg); border-radius: var(--radius); white-space: nowrap; font-variant-numeric: tabular-nums; }
.status[data-kind="online"] { color: var(--forest); background: var(--pale); }
.status[data-kind="stale"], .status[data-kind="offline"] { color: var(--amber); background: var(--amber-bg); }
#detail { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.detail-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.detail-header p { margin-top: .3rem; }
.activity-overview { margin-top: 1.2rem; padding: 1.1rem; background: var(--signal-board); border: 1px solid var(--line); border-radius: var(--radius); }
.activity-headline { font-size: 1.4rem; font-weight: 700; line-height: 1.35; margin-top: .4rem; }
#activity-description { color: var(--muted); margin-top: .35rem; }
.activity-overview .activity-values { margin: .9rem 0 0; border-bottom: 0; }
.activity-values div { padding-bottom: 0; }
.activity-log { padding-bottom: 1rem; }
.detail-panel { margin-top: .55rem; padding-block: .15rem; border-top: 1px solid var(--line); }
.detail-panel summary { cursor: pointer; width: fit-content; min-height: 44px; align-content: center; color: var(--forest); font-weight: 650; }
.panel-copy { margin: .3rem 0 .7rem; }
.calibration-actions { margin: .55rem 0 .7rem; }
#audio-player { display: block; max-width: 100%; margin-top: .55rem; }
.measurements { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); margin-block: 1.3rem; border-block: 1px solid var(--line); }
.measurements div { padding: .8rem .8rem .85rem; border-left: 1px solid var(--line); }
.measurements div:first-child { border-left: 0; padding-left: 0; }
.measurements dt { color: var(--muted); font-size: .875rem; }
.measurements dd { margin-top: .23rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.analysis { margin-bottom: 1.25rem; padding: .9rem 1rem; background: var(--signal-board); border: 1px solid var(--line); border-radius: var(--radius); }
.analysis-result { margin-top: .35rem; font-weight: 650; }
.analysis-context, .analysis details { color: var(--muted); font-size: .9rem; }
.analysis-context { margin-top: .25rem; }
.analysis details { margin-top: .35rem; }
.analysis summary { cursor: pointer; width: fit-content; min-height: 44px; align-content: center; }
.analysis ul { margin-top: .15rem; padding-left: 1.2rem; font-variant-numeric: tabular-nums; }
.telemetry { margin-bottom: 1.2rem; }
.telemetry-values { margin-block: .45rem 0; }
.telemetry-note { margin-top: .45rem; color: var(--muted); font-size: .875rem; }
.wave { padding: 1rem; background: var(--signal-board); border-radius: var(--radius); }
.wave figcaption { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.wave figcaption span, .wave p { font-size: .875rem; color: var(--muted); }
.plot { height: 12rem; margin-block: .75rem; position: relative; }
#activity { width: 100%; height: 100%; display: block; }
.plot-empty { position: absolute; inset: 42% 0 auto; text-align: center; pointer-events: none; }
.changes { margin-top: 1.25rem; }
.changes > p { margin-top: .4rem; color: var(--muted); }
.changes li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .55rem; border-bottom: 1px solid var(--line); font-size: .94rem; }
.changes time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.changes .event-stat { color: var(--ink); }
.device-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1.25rem; }
#rename-form { margin-top: .8rem; margin-bottom: 0; }
.error, .login .error { color: var(--error); }
#workspace-error { margin-bottom: .7rem; }
@media (max-width: 46rem) {
  .wrap { width: calc(100% - 1.6rem); }
  main { padding-block: 1.4rem 2.4rem; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .login, #detail { padding: 1rem; }
  .measurements div { padding-inline: .45rem; }
}
@media (max-width: 28rem) {
  h1 { font-size: 1.55rem; }
  .measurements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .measurements div:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .activity-values { row-gap: .55rem; }
  .activity-overview { padding: .85rem; }
  .changes li { gap: .35rem .8rem; flex-wrap: wrap; }
  .wave { padding-inline: .65rem; }
}
