:root {
  color-scheme: light;
  font: 100%/1.5 system-ui, sans-serif;
  color: #292720;
  background: #f7f4ee;
  --accent: #762739;
  --border: #d8cfc3;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(100% - 2rem, 55rem); margin: 3rem auto; }
header, .form-row { display: flex; gap: 1rem; align-items: end; }
header { justify-content: space-between; }
h1, h2, p { margin: 0; }
h1 { font: 2.75rem/1.1 Georgia, serif; }
h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.brand { color: var(--accent); font-weight: 650; margin-bottom: .35rem; }
.panel { padding: clamp(1rem, 4vw, 1.5rem); border: 1px solid var(--border); border-radius: .75rem; background: #fffdf9; margin: 1rem 0; }
#sign-in { max-width: 28rem; }
#sign-in label { margin-bottom: 1rem; }
#session-status { margin-top: 1rem; }
#session-status:empty { display: none; }
.form-row label:first-child { flex: 1; min-width: 0; }
.form-row label:nth-child(2) { width: 7rem; }
label { display: grid; gap: .3rem; font-weight: 600; }
input, button { min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: .4rem; font: inherit; }
input { width: 100%; background: white; color: inherit; }
button { background: var(--accent); color: white; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { color: var(--accent); background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.muted { color: #5f554b; font-size: .875rem; }
#code-hint { margin-top: .75rem; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .65rem .35rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
th:first-child { width: 36%; }
th:last-child, td:last-child { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 38rem) {
  main { margin-top: 1.5rem; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; }
  .form-row label:first-child { grid-column: 1 / -1; }
  .form-row label:nth-child(2) { width: 100%; }
  table { font-size: .875rem; }
  th, td { padding-inline: .2rem; }
}
