:root {
  color-scheme: dark;
  --bg: #0e0f12;
  --card: #1c1f26;
  --line: #343842;
  --text: #f6f3ec;
  --muted: #c9c2b6;
  --gold: #e2b657;
  --kosher: #0f7a45;
  --down: #a61d24;
  font-family: "Segoe UI", Outfit, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

body, button, input, textarea, select { font: inherit; }

.top, .panel, .banner, .back { width: min(860px, calc(100% - 1.25rem)); margin-inline: auto; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1.2rem 0 0.4rem;
}

.top-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.top-actions form { margin: 0; }
.top-actions button { margin-top: 0; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; margin-bottom: 0.35rem; }
h3 { font-size: 1.05rem; margin: 0.2rem 0 0.3rem; }

.eyebrow {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hint, .toast { color: var(--muted); }
.error { color: #ffb4b4; min-height: 1.2em; }

.panel, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.panel { padding: 1rem; margin-top: 0.8rem; }

label, .field {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--muted);
}

input, textarea, select {
  width: 100%;
  background: #12141a;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  min-height: 44px;
}

textarea { min-height: 7rem; }

button, .ghost-link {
  appearance: none;
  border: 0;
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 1rem;
  margin-top: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ghost-link { margin-top: 0; background: transparent; color: var(--text); border: 1px solid var(--line); }

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.back { margin-top: 0.7rem; font-weight: 700; }
.back a { color: var(--gold); }

.banner {
  margin-top: 0.8rem;
  background: #143526;
  border: 1px solid var(--kosher);
  color: white;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.banner.is-bad {
  background: #3a1c1e;
  border-color: var(--down);
}

.dash-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.dash-card {
  display: grid;
  align-content: center;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 1.1rem 1rem;
  background: #14161c;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
}

.dash-card:hover,
.dash-card:focus-visible { border-color: var(--gold); }

.dash-title { font-size: 1.25rem; font-weight: 750; color: var(--text); }
.dash-text { color: var(--muted); }

.logo-box { display: grid; justify-items: start; }
.logo-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-top: 0.8rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.eruv-hero { text-align: center; }
.eruv-hero > .hint { max-width: 36rem; margin-inline: auto; }
.eruv-hero details,
.eruv-hero details .hint { text-align: left; }

.choices { display: grid; gap: 0.45rem; margin-top: 0.55rem; }

.choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.75rem 0.8rem;
  color: var(--text);
  font-size: 1rem;
  background: #12141a;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.choice input { width: 1.15rem; min-height: 0; }

.split { display: grid; gap: 0.2rem; }

details.more {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}

summary {
  cursor: pointer;
  font-weight: 750;
  min-height: 44px;
  display: flex;
  align-items: center;
}

fieldset.rule {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0.9rem 0 0;
  padding: 0.35rem 0.8rem 0.9rem;
}

legend { font-weight: 750; padding: 0 0.25rem; }

@media (min-width: 720px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
}

.toggle {
  display: block;
  width: 100%;
  margin: 0.8rem 0 0.2rem;
  min-height: 4.5rem;
  font-size: 1.6rem;
  border-radius: 16px;
  justify-content: center;
}

.toggle.is-kosher { background: var(--kosher); color: white; }
.toggle.is-down { background: var(--down); color: white; }

.card {
  padding: 0.8rem;
  margin-top: 0.8rem;
  background: #14161c;
}

.rule { display: grid; gap: 0.2rem; }

.week {
  margin-top: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.4rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.check input { width: auto; min-height: 0; }

.toast:empty { display: none; }
.toast { margin-top: 0.6rem; }

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