/* Kitely Connect: the kitely.dev palette, the system's fonts, nothing to download. */

:root {
  --ink: #0b0b0e;
  --paper: #f4f4f6;
  --kite: #c6f03b;
  --ember: #d9480f;
  --muted: #55555e;
  --line: #767680;
  --font: Manrope, 'Segoe UI', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--paper);
  -webkit-text-size-adjust: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mark {
  width: 0.9rem;
  height: 0.9rem;
  background: var(--kite);
  border-radius: 0.15rem;
  transform: rotate(45deg);
}

.card {
  width: 100%;
  max-width: 26rem;
  padding: 1.75rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 1rem;
}

/* The account page lists devices and needs the room. */
.card.wide {
  max-width: 40rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
}

/* A device's name can be a hundred characters with no space in them. */
.card p,
.card h1,
.card h2 {
  overflow-wrap: anywhere;
}

.lead {
  color: var(--muted);
}

form {
  margin: 0 0 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
}

input[type='text'] {
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 0.6rem;
}

.button {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 0.6rem;
  cursor: pointer;
}

.button + .button {
  margin-top: 0.6rem;
}

.button.primary {
  background: var(--kite);
}

.button:hover {
  filter: brightness(0.94);
}

.button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

a {
  color: inherit;
}

/* A warning: the ember rule, and plain ink text, which reads better than ember on paper. */
.warn {
  margin: 0;
  padding: 0.25rem 0 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-left: 0.3rem solid var(--ember);
}

/* The account page's devices. */
.devices {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.device {
  margin: 0 0 0.75rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 0.75rem;
}

.device p {
  margin: 0 0 0.25rem;
}

.device form {
  margin: 0.6rem 0 0;
}

.device .button {
  width: auto;
  padding: 0.5rem 1.1rem;
}

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 0.1em;
  background: var(--kite);
  border-radius: 0.4rem;
}

.state {
  font-weight: 700;
}

.state-blocked {
  text-decoration: underline wavy var(--ember);
  text-underline-offset: 0.2em;
}

/* The ember on the border only: white or ink text on it reads worse than ink on paper. */
.button.danger {
  border-color: var(--ember);
}

.who {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.who-text {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.avatar {
  flex: none;
  width: 4rem;
  height: 4rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.muted {
  color: var(--muted);
}

@media (max-width: 30rem) {
  body {
    padding-top: 1.5rem;
  }

  .card {
    padding: 1.25rem;
  }
}
