:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172f37;
  background: #f0f4f4;
  line-height: 1.5;
  --surface: #fff;
  --border: #d0dcde;
  --muted: #4c6169;
  --accent: #096657;
  --accent-hover: #064d41;
  --danger: #9e3033;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
h2 { font-size: 1.125rem; line-height: 1.3; }

.site-header {
  background: #16353d;
  color: #fff;
  border-bottom: 3px solid #5dbdaf;
}

.site-bar, main {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  min-height: 4.5rem;
  padding-block: .625rem;
}

h1 { font-size: 1.2rem; font-weight: 400; }
strong { font-weight: 700; }
main { padding-block: clamp(1.25rem, 4vw, 3rem); }

.account {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--surface);
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.sign-in { max-width: 25rem; margin-inline: auto; }
.desk { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 1.25rem; }
.connection { align-self: start; }
form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.field { display: grid; gap: .375rem; min-width: 0; }
label { font-size: .925rem; font-weight: 600; }
.hint { color: var(--muted); font-size: .85rem; }

input, button { font: inherit; }
input {
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .625rem;
  border: 1px solid #849ba1;
  border-radius: .375rem;
  background: var(--surface);
  color: inherit;
}

button {
  min-height: 2.75rem;
  padding: .5rem .875rem;
  border: 1px solid transparent;
  border-radius: .375rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled, input:disabled { opacity: .62; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #227cb6; outline-offset: 3px; }
.button-secondary { background: transparent; border-color: #a1b7bb; }
.button-secondary:hover:not(:disabled) { background: #264e56; }
.button-secondary:focus-visible { outline-color: #8edacb; }
.button-danger { width: 100%; margin-top: .75rem; background: var(--danger); }
.button-danger:hover:not(:disabled) { background: #7f2226; }

.shared-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}

.status { color: var(--muted); font-size: .875rem; font-weight: 600; }
.status[data-state="active"] { color: var(--accent); }
.status[data-state="disconnected"] { color: var(--danger); }
.client-version { margin: -.5rem 0 1rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }

.preview {
  display: grid;
  place-items: center;
  min-height: clamp(11rem, 45vw, 29rem);
  border: 1px solid #b8c8cc;
  border-radius: .5rem;
  background: #e7eded;
  overflow: hidden;
}

.preview p { max-width: 26rem; padding: 1rem; color: var(--muted); text-align: center; }
.preview img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }

.notice {
  margin: 0 auto 1rem;
  padding: .75rem 1rem;
  border: 1px solid #d5a6a8;
  border-radius: .5rem;
  background: #fff4f3;
  color: #82272a;
  overflow-wrap: anywhere;
}

@media (max-width: 45rem) {
  .desk { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .site-bar, main { width: calc(100% - 1.5rem); }
}
