/* Design tokens and document defaults */
:root {
  color-scheme: light;
  --bg: #f3eee2;
  --bg-soft: #fcfaf4;
  --surface: #fffdf8;
  --surface-soft: #f8f4ea;
  --surface-strong: #eef2f6;
  --ink: #22303e;
  --muted: #5d6c7b;
  --line: #cdd7e1;
  --line-strong: #7f95ab;
  --primary: #183487;
  --primary-deep: #102968;
  --primary-hover: #0b2158;
  --cream-accent: #f3e8c8;
  --danger: #9f3934;
  --danger-soft: #fff2ef;
  --focus: #183487;
  --shadow: 0 20px 40px rgba(24, 52, 135, 0.13);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  overflow-x: clip;
  background:
    radial-gradient(
      circle at top left,
      rgba(243, 232, 200, 0.62),
      transparent 34%
    ),
    linear-gradient(180deg, #f7f2e6 0%, var(--bg) 100%);
  color: var(--ink);
}

button,
input,
textarea,
select {
  min-width: 0;
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: wait;
  opacity: 0.72;
}

img,
svg,
canvas {
  max-width: 100%;
}

main,
form,
fieldset,
section,
.view,
.protocol-page,
.water-page {
  min-width: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.boot-error {
  position: relative;
  z-index: 1000;
  display: grid;
  gap: 0.5rem;
  margin: 1rem auto;
  width: min(92vw, 760px);
  padding: 1rem;
  border: 1px solid #c87b72;
  border-radius: 12px;
  background: #fff3f0;
  color: #6f211d;
}
.boot-error[hidden] {
  display: none !important;
}
.boot-error a {
  color: inherit;
  font-weight: 800;
}
.boot-error code {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}
