:root { color-scheme: light dark; --border: color-mix(in srgb, currentColor 20%, transparent); }

body {
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  max-width: 52rem;
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, sans-serif;
}

h1 { font-size: 1.5rem; margin-bottom: .25rem; }
h2 { font-size: 1.05rem; margin-top: 2.5rem; }
h3 { font-size: .8rem; margin: 0; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.lede { margin-top: 0; opacity: .8; }
.hint { opacity: .7; font-size: .9rem; }
.empty { opacity: .6; font-style: italic; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--border); border-left-width: 4px; border-radius: .4rem; padding: 1rem; }
.card.primary { border-left-color: #d97706; }
.card.standby { border-left-color: #16a34a; }
.card.error { border-left-color: #dc2626; }
.card .value { font: 600 1.1rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; margin: .5rem 0 1rem; }
.card .detail { font-size: .85rem; opacity: .7; }

dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; margin: 0; font-size: .875rem; }
dt { opacity: .6; }
dd { margin: 0; }

table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; opacity: .6; font-size: .8rem; }

form { display: flex; gap: .5rem; margin: 1rem 0; }
input[type=text] { flex: 1; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: .3rem; background: none; color: inherit; font: inherit; }
input[type=submit] { padding: .5rem 1rem; border: 1px solid var(--border); border-radius: .3rem; background: none; color: inherit; font: inherit; cursor: pointer; }

.flash { padding: .75rem 1rem; border: 1px solid var(--border); border-radius: .4rem; margin-bottom: 1.5rem; font-size: .9rem; }
.flash.alert { border-color: #dc2626; }

/* The polled panel: a timestamp in the heading so you can see it is alive, and the
   selected role coloured the same way as the card it came from. */
.tick { float: right; font: 400 .75rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .45; }
.role-reading { color: #16a34a; }
.role-writing { color: #d97706; }

turbo-frame { display: block; }
