/* ============================================================
   Intentional Dad — design tokens
   Concept: a father's daily logbook. Aged-paper surface, deep
   ink-navy for structure, a worn brass/gold for the things that
   matter (answered prayers, streak marks). Ruled hairlines stand
   in for card borders — this is a book you keep, not a dashboard.
   ============================================================ */

:root {
  --paper: #eae3d3;
  --paper-light: #f4efe3;
  --ink: #232a2e;
  --ink-soft: #5c6469;
  --navy: #1f3a4d;
  --navy-soft: #2e5069;
  --gold: #b8863b;
  --gold-soft: #d9b273;
  --rule: #cfc3a4;
  --rule-soft: #ddd3ba;
  --brick: #9c4a34;
  --paper-rgb: 234, 227, 211;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 6px;
  --max-width: 560px;
  --nav-height: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--navy);
}

h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

p { line-height: 1.55; margin: 0 0 0.75rem; max-width: 62ch; }

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

button {
  font-family: var(--font-body);
  cursor: pointer;
}

/* focus visibility, kept everywhere */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* -------------------- app shell -------------------- */

#app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

.view {
  flex: 1;
  padding: 1.35rem 1.25rem 2rem;
}

.view-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 1.1rem;
  gap: 0.75rem;
}

.view-header .eyebrow {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* -------------------- sections (no card-kit; ruled dividers) -------------------- */

.section {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.section:last-child { border-bottom: none; }

.section-title {
  margin-bottom: 0.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.field .hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  resize: vertical;
}

textarea { min-height: 4.5rem; line-height: 1.45; }

input::placeholder, textarea::placeholder { color: #9a9384; }

/* -------------------- buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  padding: 0.65rem 1.1rem;
  font-size: 0.98rem;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn-primary {
  background: var(--navy);
  color: var(--paper-light);
}
.btn-primary:hover { background: var(--navy-soft); }

.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-soft);
  padding: 0.5rem 0.6rem;
}

.btn-block { width: 100%; }

/* -------------------- prayer checklist -------------------- */

.prayer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.prayer-item:last-child { border-bottom: none; }

.prayer-check {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
  background: transparent;
}
.prayer-check.answered {
  background: var(--gold);
}
.prayer-item.answered .prayer-title {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--gold-soft);
}

.prayer-title { font-weight: 600; }
.prayer-details { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.15rem; }

/* -------------------- teen / kid answer blocks -------------------- */

.kid-block {
  border-left: 2px solid var(--rule);
  padding-left: 0.85rem;
  margin-bottom: 0.9rem;
}
.kid-name {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

/* -------------------- history list -------------------- */

.history-entry {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.history-entry:last-child { border-bottom: none; }
.history-date {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}

/* -------------------- study plan / day list -------------------- */

.plan-day {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.plan-day .num {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 600;
  width: 2.1rem;
  flex: none;
}
.plan-day .weekend { color: var(--ink-soft); font-style: italic; }

/* -------------------- empty states -------------------- */

.empty-state {
  padding: 1.5rem 0;
  color: var(--ink-soft);
}
.empty-state strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }

/* -------------------- banners -------------------- */

.banner {
  background: var(--paper-light);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}
.banner strong { color: var(--ink); }

/* -------------------- bottom navigation -------------------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper-light);
  border-top: 1px solid var(--rule);
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.4rem 0;
}

.tab-btn svg {
  width: 21px;
  height: 21px;
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 1.7;
}

.tab-btn.active { color: var(--navy); }
.tab-btn.active svg { stroke: var(--navy); }
.tab-btn.active::after {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  background: var(--gold);
  margin-top: 3px;
  border-radius: 2px;
}

/* -------------------- auth screen -------------------- */

.auth-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem 1.5rem;
}

.auth-mark {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.auth-sub {
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

/* -------------------- misc -------------------- */

.row { display: flex; gap: 0.6rem; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.spacer { height: 0.5rem; }
.link-btn {
  background: none; border: none; color: var(--brick);
  font-size: 0.85rem; padding: 0.2rem 0;
}
