/*
 * Rituals-adjacent palette, sampled directly from rituals.com and the
 * Rituals wordmark/knot logo Peter provided (25 Aug 2026):
 *   - near-black charcoal (header/nav bars on rituals.com): #242222
 *   - warm taupe/greige (the logo's background colour): #827568
 *   - warm off-white (rituals.com's page background): #faf9f7
 * This is a deliberately restrained, internal-tool interpretation of that
 * look, not a reproduction of the consumer site - no product photography,
 * just the tone/colour/type language carried across.
 */
:root {
  --bg: #faf9f7;
  --card-bg: #ffffff;
  --border: #e7e2d9;
  --ink: #221f1c;         /* near-black, used for headings + primary buttons */
  --text: #29241f;
  --muted: #756a5d;       /* warm grey for secondary text */
  --accent: #7d6c58;      /* the logo's taupe/greige, used for secondary actions + focus */
  --accent-light: #efe9e0;
  --success: #4b6b52;     /* muted sage */
  --error: #963c2e;       /* muted brick red */
  --warning: #8a6a1f;     /* muted gold */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #242222;
  color: #f5f2ec;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand-mark { height: 30px; width: 30px; border-radius: 4px; display: block; }
.topbar .brand-text {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.topbar-right .user { color: #cfc6ba; }
.topbar-right .link-button { color: #f5f2ec; }

.container { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }
.centered { max-width: 360px; margin: 80px auto; padding: 0 20px; text-align: center; }

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
  font-weight: 600;
}
h1 { font-size: 30px; margin-bottom: 4px; }
h2 { font-size: 20px; margin: 20px 0 8px; }
h3 { font-size: 18px; margin: 4px 0; }
.subtitle { color: var(--muted); margin-top: 0; margin-bottom: 20px; }
.hint { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--ink); }
input[type=text], input[type=password], input[type=number], select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
label.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  color: var(--text);
}
label.checkbox-label input[type=checkbox] { margin-top: 3px; }

button {
  background: var(--ink);
  color: #fdfcfa;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}
button:hover { background: #050403; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.secondary:hover { background: var(--accent-light); }
button.link-button { background: none; color: var(--muted); padding: 0; font-weight: 400; text-decoration: underline; text-transform: none; letter-spacing: normal; cursor: pointer; }

.station-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.station-row legend { font-weight: 700; padding: 0 6px; color: var(--ink); }

.env-banner {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}
.env-acceptance { background: #eef1ea; color: var(--success); }
/* Production stays a deliberately loud red/black warning - this is the one
   place in the app that should NOT follow the muted palette, since it's a
   safety signal (real EVA records get created from here). */
.env-production { background: #2a1210; color: #ffdcd4; border: 1px solid #963c2e; }

.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fbeae6; color: var(--error); }
.alert-warning { background: #faf3e2; color: var(--warning); }
.alert-success { background: #eef1ea; color: var(--success); }

.station-preview { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.station-preview:last-child { border-bottom: none; }
.station-preview ul { margin: 4px 0 0; padding-left: 18px; }

.ok { color: var(--success); }
.fail { color: var(--error); }

.button-link {
  display: inline-block;
  background: var(--ink);
  color: #fdfcfa;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "Inter", sans-serif;
}
.button-link:hover { background: #050403; }
