/* Butterfield design system, as this repo uses it (spec §9.1): butterfield-systems docs/design-system.md, the §8
   style block, with its DECIDED and PROPOSED values. Shared by the designer page and the viewer. */

:root {
  --page: #fbfaf9;
  --card: #ffffff;
  --border: #e5e1dc;
  --text: #21242c;
  --muted: #5c706c;
  --sage: #3a6e65;
  --sage-tint: rgb(58 110 101 / 0.1);
  --hover: #378173;
  --recessed: #edf2f1;
  --input-border: #9d8f7b;
  --danger: #dc2828;
  --danger-text: #dc2626;
  --warning-text: #b45309;
  --warning-badge: #fef9c3;
  --warning-badge-text: #854d0e;
  --radius-card: 12px;
  --radius-control: 10px;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.05);
  --font: ui-sans-serif, system-ui, sans-serif;
  --touch: 44px;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
}

/* Outline button, large: 44px for touch. */
.button-outline {
  min-height: var(--touch);
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--page);
  font-weight: 500;
  cursor: pointer;
}

.button-outline:hover:enabled {
  background: var(--hover);
  border-color: var(--hover);
  color: #ffffff;
}

/* Primary button: sage fill, white text, 40px high; hover at 90%. */
.button-primary {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--sage);
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
}

.button-primary:hover:enabled {
  background: rgb(58 110 101 / 0.9);
}

/* Destructive button: danger fill, white text. */
.button-danger {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--danger);
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
}

/* Input: 40px high, page background, the accessible input border; 16px text on phones stops iOS zooming in. */
.input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-control);
  background: var(--page);
  font-size: 16px;
}

@media (min-width: 768px) {
  .input {
    font-size: 14px;
  }
}

/* The one option-button style: unselected has the standard border; selected, a sage border over the sage tint. */
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--card);
  font-weight: 500;
  cursor: pointer;
}

.option.is-on {
  border-color: var(--sage);
  background: var(--sage-tint);
}

.option-input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--sage);
}
