/* The pages of yoke.buzzleco.com: connecting an assistant, the connections a lifter has, and the guide.
   Yoke's colours (lib/design/yoke_colors.dart), light and dark, on the system's own typeface. */

:root {
  color-scheme: light dark;
  --background: #f3f3f3;
  --card: #fefefe;
  --raised: #e7eaee;
  --field: #ebedf0;
  --line: #d9dde2;
  --text: #14191e;
  --text-secondary: #586673;
  --accent: #0369a1;
  --on-accent: #ffffff;
  --danger: #c62828;
  --warning-text: #b45309;
  --warning-fill: rgba(217, 119, 6, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #14191e;
    --card: #1f2836;
    --raised: #2a3646;
    --field: #14191e;
    --line: #2f3c4c;
    --text: #fefefe;
    --text-secondary: #9daebe;
    --accent: #37daff;
    --on-accent: #14191e;
    --danger: #ff5c5c;
    --warning-text: #ffa824;
    --warning-fill: rgba(255, 168, 36, 0.2);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px 48px;
  background: var(--background);
  color: var(--text);
  font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
  max-width: 440px;
  margin: 0 auto;
}

main.wide {
  max-width: 640px;
}

.brand {
  margin: 8px 4px 20px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 24px 20px;
}

.card ~ .card {
  margin-top: 12px;
}

.card > :first-child {
  margin-top: 0;
}

/* What closes a card under its buttons: another way out. */
p.end {
  margin-top: 16px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

.secondary {
  color: var(--text-secondary);
  font-size: 14px;
}

ul.plain,
ol.steps {
  margin: 0 0 12px;
  padding-left: 20px;
}

ul.plain li,
ol.steps li {
  margin-bottom: 6px;
}

.note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--raised);
  font-size: 14px;
}

.note.caution {
  background: var(--warning-fill);
  color: var(--warning-text);
}

.error {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  background: var(--card);
  color: var(--danger);
  font-size: 14px;
}

.status {
  margin: 12px 4px 0;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

button,
a.button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: var(--on-accent);
}

button.danger {
  width: auto;
  min-height: 40px;
  padding: 8px 14px;
  background: transparent;
  color: var(--danger);
}

button.link {
  width: auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 400;
  text-decoration: underline;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--accent);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
}

.account {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--raised);
}

.account strong {
  display: block;
  overflow-wrap: anywhere;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.row:first-of-type {
  border-top: 0;
}

.row .secondary {
  display: block;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--raised);
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

footer {
  max-width: 440px;
  margin: 20px auto 0;
  padding: 0 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

main.wide + footer {
  max-width: 640px;
}

[hidden] {
  display: none !important;
}
