/* Homming alpha: mobile-first, large text, one primary action per screen. */

:root {
  --bg: #fffdf9;
  --fg: #1f1d1a;
  --muted: #6b655c;
  --line: #e6e0d6;
  --accent: #b5573b;
  --accent-fg: #ffffff;
  --radius: 14px;
  --font: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  padding-bottom: 6.5rem; /* room for the fixed primary action */
}

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

.topbar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--fg);
}

.topbar .lang a {
  margin-left: 0.6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.topbar .lang a[aria-current="true"] {
  color: var(--fg);
  font-weight: 700;
  text-decoration: underline;
}

main {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

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

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fff;
}

.primary-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.primary-action:empty {
  display: none;
}

.btn {
  display: block;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  min-height: 3.4rem;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
}

input,
textarea,
select {
  font: inherit;
  font-size: 1.1rem;
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* A box to tick keeps its own size, large enough to tap (HOMM-465). */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  flex: none;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}

/* The health consent box and its sentence sit in one row. */
.consent-health {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

/* A quiet action that reads like a link but is a real button, tall enough to tap (HOMM-465). */
.link-button {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem;
  font: inherit;
  font-size: 1.05rem;
  color: var(--accent);
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms;
}
