/* Mind Reset Protocols — Level 1
   Palette locked by Map v4, section 17. Do not add colours. */

:root {
  --bg:        #F4F1EA;
  --surface:   #FAF9F5;
  --text:      #1F1E1D;
  --text2:     #6B6862;
  --border:    #E5E1D8;
  --accent:    #D97757;

  /* Marking buttons only. Nowhere else. */
  --yes:       #3F7D51;
  --no:        #C0392B;

  --measure: 34rem;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  padding: 2rem 1.25rem 4rem;
  display: flex;
  justify-content: center;
}

#root {
  width: 100%;
  max-width: var(--measure);
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 .6rem;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--text2); }
.small { font-size: .9rem; }

/* ---------- layout ---------- */

.screen { animation: none; }

.head {
  margin-bottom: 1.5rem;
}

.progress-line {
  color: var(--text2);
  font-size: .92rem;
  margin: .3rem 0 0;
}

.bar {
  display: flex;
  gap: 3px;
  margin: 1.1rem 0 2rem;
}
.bar span {
  flex: 1 1 auto;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}
.bar span.done   { background: var(--text2); }
.bar span.today  { background: var(--accent); height: 5px; margin-top: -1px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.15rem;
  margin-bottom: 1rem;
}

.label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text2);
  margin: 0 0 .35rem;
}

.how-line {
  margin: 0 0 .55rem;
  padding-left: .9rem;
  text-indent: -.9rem;
}
.how-line:last-child { margin-bottom: 0; }

.closing {
  color: var(--text2);
  margin-top: 1.75rem;
  font-size: .95rem;
}

/* ---------- controls ---------- */

button {
  font: inherit;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: .7rem 1.1rem;
  transition: background .12s ease;
}
button:hover { background: var(--bg); }

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

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  width: 100%;
  padding: .85rem 1.1rem;
}
.primary:hover { background: #cf6a49; }

.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--text2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkish:hover { background: none; color: var(--text); }

label {
  display: block;
  font-size: .9rem;
  color: var(--text2);
  margin: 0 0 .3rem;
}

input[type="text"],
input[type="time"],
select {
  font: inherit;
  width: 100%;
  padding: .7rem .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  margin-bottom: 1rem;
}

.field-error {
  color: var(--no);
  font-size: .9rem;
  margin: -.6rem 0 1rem;
}

/* ---------- marking ---------- */

.mark-row {
  display: flex;
  gap: .9rem;
  margin-top: 1.5rem;
}

.mark-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.4rem .6rem;
  font-size: .95rem;
  background: var(--surface);
}
.mark-btn svg { width: 34px; height: 34px; }
.mark-yes { color: var(--yes); border-color: var(--yes); }
.mark-no  { color: var(--no);  border-color: var(--no); }
.mark-yes:hover { background: rgba(63,125,81,.06); }
.mark-no:hover  { background: rgba(192,57,43,.06); }

.mark-block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.mark-question {
  font-weight: 600;
  margin: 0 0 .25rem;
}

.after-mark-text {
  margin: 0 0 .75rem;
}

.after-mark-count {
  color: var(--text2);
  font-size: .92rem;
  margin: 0;
}

/* ---------- day 30 ---------- */

.day-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  margin-bottom: .5rem;
}
.day-option.selected {
  border-color: var(--accent);
}

.stack > * + * { margin-top: .75rem; }

.footer-nav {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 420px) {
  body { padding: 1.5rem 1rem 3rem; }
  html, body { font-size: 16px; }
}

/* ---------- earlier days ---------- */

.browse-link {
  margin-top: 1.5rem;
}

.browse-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

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

.nav-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.nav-btn {
  background: none;
  border: none;
  padding: .2rem 0;
  color: var(--text2);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .92rem;
}
.nav-btn:hover { background: none; color: var(--text); }

/* ---------- the screen after a mark ---------- */

.after-screen { padding-top: 2rem; }

.after-big {
  font-size: 1.35rem;
  line-height: 1.45;
  font-weight: 600;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}
.after-count {
  font-size: 1.05rem;
  color: var(--text2);
  margin: 0 0 1.5rem;
}

.preview-note {
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--text2);
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

/* settings sections need air between them */
.screen h3 { margin-top: 2rem; }
.screen h3:first-of-type { margin-top: 1.75rem; }
