:root {
  color-scheme: light dark;
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #1b1b18;
  --muted: #62625b;
  --line: #dcdad2;
  --accent: #1f4fd8;
  --accent-ink: #ffffff;
  --warn-bg: #fff4d6;
  --warn-ink: #5c4300;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --card: #1e1e1b;
    --ink: #f1f0ea;
    --muted: #a3a299;
    --line: #34342f;
    --accent: #8fb0ff;
    --accent-ink: #10131c;
    --warn-bg: #3a2f10;
    --warn-ink: #ffe7a3;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", "Arimo", "Noto Sans Hebrew", sans-serif;
}

#app {
  width: min(100%, 30rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.5rem 1.5rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

h1 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 0.95rem;
  margin: 1.1rem 0 0.25rem;
}

p {
  margin: 0.4rem 0;
}

ul {
  margin: 0.25rem 0;
  padding-inline-start: 1.2rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.host {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notice {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

input {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

button {
  font: inherit;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

button.link {
  border: 0;
  padding: 0.25rem 0;
  color: var(--accent);
  text-decoration: underline;
}

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

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

.actions {
  display: flex;
  gap: 0.6rem;
  margin: 1.1rem 0 0.6rem;
}

.actions button {
  flex: 1;
}
