/* Hallmark · pre-emit critique: P4 H4 E4 S5 R5 V4
 * genre: modern-minimal · macrostructure: Workbench (functional application) · theme: Cobalt
 * audience: app developers · use: inspect submitted evidence · tone: technical · nav: N1 · footer: Ft2 */
@import url("/demo/tokens.css");
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  overflow-x: clip;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-body);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  padding: 9px 13px;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-standard);
}
button:hover {
  background: var(--color-tint);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--color-accent);
  color: var(--color-surface);
  border-color: var(--color-accent);
}
.primary:hover {
  background: var(--color-ink);
}
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  padding: 11px;
}
label {
  display: grid;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.04em;
  margin: 10px 0;
}
h2 {
  font-size: 23px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-muted);
}
p {
  line-height: 1.8;
}
.muted {
  color: var(--color-muted);
  font-size: 12px;
}
code,
pre {
  font-family: var(--font-mono);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-paper);
  padding: 16px;
  border: 1px solid var(--color-line);
  font-size: 12px;
}
header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}
.brand {
  font-size: 16px;
  text-decoration: none;
  color: var(--color-ink);
  white-space: nowrap;
}
.brand span {
  font-size: 12px;
  color: var(--color-muted);
  margin-left: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}
.sidebar {
  padding: 26px 18px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.labelrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.labelrow button {
  padding: 3px 8px;
}
nav {
  display: grid;
  gap: 6px;
}
nav button {
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: var(--color-surface);
}
nav .selected {
  background: var(--color-tint);
  color: var(--color-accent);
  border-color: var(--color-tint);
}
footer {
  margin-top: auto;
  border-top: 1px solid var(--color-line);
  padding-top: 20px;
  color: var(--color-muted);
  font: 10px/1.8 var(--font-mono);
}
main {
  padding: var(--space-page);
  min-width: 0;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.heading p {
  margin: 0;
  color: var(--color-muted);
}
.filters {
  display: flex;
  gap: 14px;
  align-items: end;
  margin: 30px 0 18px;
}
.search {
  flex: 1;
}
.filters select {
  min-width: 140px;
}
.report {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 100px 110px;
  align-items: center;
  gap: 16px;
  border-radius: 0;
  border-bottom: 0;
  text-align: left;
  padding: 21px 20px;
  white-space: normal;
}
.report:last-child {
  border-bottom: 1px solid var(--color-line);
}
.report h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.report small {
  color: var(--color-muted);
  font-size: 11px;
}
.dot {
  color: var(--color-accent);
  font-size: 20px;
}
.status {
  font-size: 11px;
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  padding: 5px 9px;
  border-radius: var(--radius-control);
  white-space: nowrap;
  text-align: center;
}
.empty {
  min-height: 320px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed var(--color-line);
  background: var(--color-surface);
  padding: 30px;
}
.empty h2 {
  font-size: 20px;
}
.empty p {
  max-width: 430px;
  color: var(--color-muted);
}
.login {
  max-width: 630px;
  margin: 14vh auto;
  padding: 35px;
}
.login h1 {
  font-size: 38px;
  line-height: 1.3;
}
.login form {
  max-width: 400px;
  display: grid;
  gap: 15px;
  margin: 35px 0;
}
.login p {
  color: var(--color-muted);
}
dialog {
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  max-height: 94vh;
  padding: 24px;
  width: min(1120px, 95vw);
}
dialog::backdrop {
  background: var(--color-overlay);
}
#setup,
#createDialog {
  width: min(620px, 95vw);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.dialoghead h2 {
  margin: 0;
}
.evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.stage {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--color-stage);
  min-height: 350px;
  border: 1px solid var(--color-line);
  overflow: hidden;
}
.stage img {
  max-width: 100%;
  max-height: 470px;
  display: block;
  object-fit: contain;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.actions select {
  width: auto;
}
.replayControls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.replayControls input {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.replayControls output {
  white-space: nowrap;
  font: 11px var(--font-mono);
}
.metadata {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
  margin-top: 18px;
}
.metadata div {
  background: var(--color-surface);
  padding: 12px;
  overflow-wrap: anywhere;
}
.metadata small {
  display: block;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.timeline {
  max-height: 360px;
  overflow: auto;
}
.event {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}
.event code {
  color: var(--color-accent);
  font-size: 11px;
}
.event strong {
  font-size: 12px;
}
.event small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--color-muted);
  margin-top: 5px;
}
.note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.keyrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-line);
  gap: 12px;
  padding: 12px 0;
}
.keyrow span {
  overflow-wrap: anywhere;
}
.danger {
  color: var(--color-danger);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-ink);
  color: var(--color-surface);
  padding: 14px 20px;
  border-radius: var(--radius-control);
  max-width: 90vw;
  z-index: 100;
  overflow-wrap: anywhere;
}
#more {
  margin-top: 20px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 768px) {
  header {
    padding: 0 18px;
  }
  .brand span {
    display: none;
  }
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
    padding: 14px 20px;
    gap: 10px;
  }
  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  footer {
    display: none;
  }
  main {
    padding: 24px 20px;
  }
  .evidence {
    grid-template-columns: minmax(0, 1fr);
  }
  .heading {
    align-items: start;
  }
  .report {
    grid-template-columns: 16px minmax(0, 1fr) 100px;
    padding: 16px 12px;
    gap: 8px;
  }
  .report time {
    display: none;
  }
  .login {
    margin: 8vh auto;
    padding: 24px;
  }
  .login h1 {
    font-size: 31px;
  }
  dialog {
    padding: 16px;
  }
  .filters {
    align-items: stretch;
  }
  .filters select {
    min-width: 100px;
  }
  .stage {
    min-height: 260px;
  }
  .metadata {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
button:active {
  background: var(--color-tint);
}
@media (max-width: 768px) {
  .shell {
    grid-template-rows: auto minmax(0, 1fr);
  }
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.event-select {
  text-align: left;
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#eventEvidence {
  min-width: 0;
}
#eventEvidence pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
#eventCount {
  overflow-wrap: anywhere;
}

.diagnostic-releases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.diagnostic-releases article,
.diagnostic-group {
  padding: 14px;
  border: 1px solid var(--color-border, #ddd);
  margin-bottom: 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
#analysisFacts button {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
#analysisFacts details {
  margin: 12px 0;
}
/* Hallmark · workspace console · existing type/blue accent · scoped sidebar + dense lists */
.sidebar {
  background: var(--color-sidebar);
  color: var(--color-sidebar-text);
}
.sidebar .eyebrow,
.sidebar footer {
  color: var(--color-sidebar-muted);
}
.sidebar button {
  color: var(--color-sidebar-text);
  background: transparent;
  border-color: var(--color-sidebar-active);
  text-align: left;
}
.sidebar button:hover,
.sidebar button.selected {
  background: var(--color-sidebar-active);
}
.sidebar .workspace-picker {
  display: block;
  color: var(--color-sidebar-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.workspace-picker select {
  margin-top: 10px;
  width: 100%;
  background: var(--color-sidebar-active);
  color: var(--color-sidebar-text);
  border-color: var(--color-sidebar-active);
  letter-spacing: normal;
}
#newWorkspace {
  margin: 10px 0 var(--space-panel);
  font-size: 12px;
}
.app-sections {
  display: grid;
  gap: 6px;
  margin-top: var(--space-panel);
  border-top: 1px solid var(--color-sidebar-active);
  padding-top: var(--space-panel);
}
.device-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0;
}
.device-heading p {
  color: var(--color-muted);
}
.device-table {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-surface);
}
.device-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.4fr) 0.7fr 0.7fr 1fr 1.1fr;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--color-line);
  overflow-wrap: anywhere;
}
.device-row:last-child {
  border-bottom: 0;
}
.device-row small {
  display: block;
  color: var(--color-muted);
  margin-top: 5px;
  font-family: var(--font-mono);
}
.device-table-head {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  background: var(--color-paper);
}
.device-status {
  font-size: 12px;
  font-weight: 600;
}
.device-status.approved {
  color: var(--color-approved);
}
.device-status.pending {
  color: var(--color-pending);
}
.device-status.revoked,
#deviceError {
  color: var(--color-danger);
}
#deviceDialog,
#workspaceDialog {
  width: min(460px, calc(100vw - 32px));
}
#deviceForm label,
#workspaceForm label,
#appWorkspaceForm label {
  margin: 18px 0;
  display: grid;
  gap: 8px;
}
#deviceForm input[name="code"] {
  font-family: var(--font-mono);
  text-transform: uppercase;
}
@media (max-width: 850px) {
  .device-row {
    grid-template-columns: minmax(100px, 1fr) 1fr;
  }
  .device-table-head {
    display: none;
  }
  .device-row .actions {
    grid-column: 1 / -1;
  }
  .device-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
html,
body {
  overflow-x: clip;
}
@media (max-width: 768px) {
  .sidebar {
    padding: 12px 16px;
  }
  .sidebar #newWorkspace {
    width: auto;
    margin: 8px 0 14px;
    padding: 7px 10px;
  }
  .app-sections {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
  }
  .app-sections button {
    flex: 1;
    padding: 9px 7px;
    font-size: 12px;
    text-align: center;
  }
}
.sidebar :focus-visible {
  outline-color: var(--color-sidebar-text);
}
.sidebar button {
  min-width: 0;
  overflow-wrap: anywhere;
}
