:root {
  color: #17201b;
  background: #f4f4ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --border: #d7d9d0;
  --ink-muted: #667068;
  --paper: #fffef9;
  --signal: #176b4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% -10%, rgb(200 225 207 / 55%), transparent 33rem),
    #f4f4ef;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(23 107 77 / 28%);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: inherit;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 0.7rem;
  color: white;
  background: var(--signal);
}

main {
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 6rem;
}

[hidden] {
  display: none !important;
}

.auth-card {
  width: min(34rem, 100%);
  margin: 4vh auto 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: rgb(255 254 249 / 88%);
  box-shadow: 0 1.5rem 4rem rgb(35 49 40 / 8%);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--signal);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.auth-card h1 {
  font-size: clamp(2.25rem, 7vw, 3.7rem);
}

.lede,
.timezone-line,
.status {
  color: var(--ink-muted);
}

.lede {
  max-width: 29rem;
  margin: 1.3rem 0 2.3rem;
  font-size: 1.05rem;
  line-height: 1.65;
}

label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
}

label span {
  color: var(--ink-muted);
  font-weight: 450;
}

input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #bdc3ba;
  border-radius: 0.7rem;
  color: inherit;
  background: white;
}

.auth-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

button {
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.primary-button {
  color: white;
  background: var(--signal);
}

.secondary-button,
.quiet-button {
  border-color: var(--border);
  color: inherit;
  background: var(--paper);
}

.quiet-button {
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.86rem;
}

.error {
  min-height: 1.5rem;
  margin: 0 0 1rem;
  color: #9a2e2e;
  font-weight: 650;
}

.error:empty {
  display: none;
}

.timeline-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.timezone-line {
  margin: 0.9rem 0 0;
}

#timezone {
  color: #37453c;
  font-weight: 700;
}

.device-panel {
  margin-bottom: 3rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 1.25rem 3rem rgb(35 49 40 / 6%);
}

.panel-heading,
.claim-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.device-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}

.device-card {
  padding: 1rem;
  border: 1px solid #e1e3dc;
  border-radius: 0.8rem;
  background: #f8f8f3;
}

.device-card h3 {
  margin: 0 0 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.device-card dl {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.device-card dl div {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.6rem;
}

.device-card dt {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.device-card dd {
  margin: 0;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.claim-form {
  max-width: 34rem;
  padding-top: 1rem;
  border-top: 1px solid #e7e8e2;
}

.claim-row input {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

.day-navigation {
  display: flex;
  gap: 0.55rem;
}

.status {
  min-height: 1.5rem;
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
}

.table-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 1.25rem 3rem rgb(35 49 40 / 6%);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e7e8e2;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink-muted);
  background: #f8f8f3;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

td:first-child {
  width: 15rem;
  color: #4d5851;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

td:nth-child(2) {
  width: 10rem;
  font-weight: 700;
}

td:last-child {
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.labeling-area {
  margin-top: 4.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.labeling-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.labeling-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.labeling-guidance {
  max-width: 44rem;
  margin: 0.9rem 0 0;
  color: var(--ink-muted);
  line-height: 1.55;
}

.utc-date-control {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto;
  gap: 0.45rem 0.65rem;
  min-width: min(22rem, 100%);
}

.utc-date-control label {
  grid-column: 1 / -1;
  margin: 0;
}

.utc-date-control input {
  min-height: 2.35rem;
  padding-block: 0.45rem;
}

.labeling-spans {
  display: grid;
  gap: 1.2rem;
}

.labeling-span {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 1rem 2.5rem rgb(35 49 40 / 5%);
}

.labeling-span > h2 {
  margin: 0 0 1rem;
  color: #4d5851;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 600;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: 0.85rem;
}

.voice-pane {
  padding: 1rem;
  border: 1px solid #e3e5dd;
  border-radius: 0.8rem;
  background: #fafaf5;
}

.voice-pane h3 {
  margin: 0 0 0.8rem;
  color: var(--signal);
  font-size: 1rem;
}

.voice-turns {
  min-height: 5rem;
  max-height: 20rem;
  margin-bottom: 1rem;
  overflow-y: auto;
}

.voice-turns p {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.skip-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.skip-row input {
  width: 1rem;
  min-height: auto;
}

.skip-row label {
  margin: 0;
}

.label-submit {
  margin-top: 1rem;
}

@media (max-width: 46rem) {
  main {
    padding-top: 2rem;
  }

  .timeline-heading {
    align-items: start;
    flex-direction: column;
  }

  .panel-heading {
    align-items: start;
  }

  .labeling-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .table-frame {
    overflow-x: auto;
  }

  table {
    min-width: 44rem;
  }
}
