/* North — utilitarian editorial, after sasha.miami
   White ground, small technical text, gray labels,
   high-contrast serif for statements, electric blue accent. */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --gray: #9a9a9a;
  --gray-light: #e6e6e6;
  --blue: #0080ff;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Inter", -apple-system, sans-serif;
  --serif: "Inter", -apple-system, sans-serif;
  /* display text follows the body family */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--blue);
  color: #fff;
}

a {
  color: inherit;
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 0.9rem;
  letter-spacing: 0.02em;
}

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-light);
  font-family: var(--mono);
  font-size: 11px;
}

.wordmark {
  text-decoration: none;
}

.wordmark:hover {
  color: var(--blue);
}

.topbar-nav {
  display: flex;
  gap: 22px;
}

.topbar-nav a {
  text-decoration: none;
  color: var(--gray);
  transition: color 0.15s;
}

.topbar-nav a:hover {
  color: var(--ink);
}

.topbar-nav a.active {
  color: var(--ink);
}

.topbar-nav a.active::before {
  content: "\2192 ";
  color: var(--blue);
}

.topbar-profiles {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.profile-chip {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.profile-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.profile-chip.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-chip:hover {
  color: var(--ink);
}

/* ---------------- landing: content left, images right ---------------- */

body {
  overflow-x: hidden;
}

.split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: calc(100vh - 46px);
}

.split-left {
  padding: 28px 48px 70px 24px;
  border-right: 1px solid var(--gray-light);
}

.field-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
}

.hero-block {
  padding: 60px 0 70px;
}

.hero-mantra {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 22ch;
  min-height: 2.2em; /* two lines reserved so shorter mantras don't shift the page */
  transition: opacity 0.38s ease;
}

.hero-next {
  margin-top: 20px;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
  cursor: pointer;
  padding: 0;
}

.hero-next:hover {
  color: var(--blue);
}

.split-right {
  padding: 28px 0 70px 32px;
  overflow: hidden;
}

.split-right-inner {
  position: sticky;
  top: 70px;
}

/* image grid; bigger tiles, columns bleed past the screen edge */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 14px;
}

.hero-cell {
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
}

.hero-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.35s, opacity 0.45s ease;
}

.hero-cell:hover img {
  filter: none;
}

.hero-cell.swap img {
  opacity: 0;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split-left {
    border-right: none;
    border-bottom: 1px solid var(--gray-light);
    padding: 24px 20px 50px;
  }

  .split-right {
    padding: 24px 20px 50px;
  }
}

/* ---------------- index grid (home) ---------------- */

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 44px;
}

@media (max-width: 640px) {
  .index-grid {
    grid-template-columns: 1fr;
  }
}

.mantra-list {
  list-style: none;
}

.mantra-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
}

.mantra-item:hover {
  border-bottom-color: var(--gray-light);
}

.mantra-no {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  min-width: 18px;
}

.mantra-text {
  flex: 1;
}

.mantra-item.pinned .mantra-text::after {
  content: " *";
  color: var(--blue);
}

.mantra-owner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  align-self: center;
}

.mantra-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
}

.mantra-item:hover .mantra-actions {
  opacity: 1;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--gray);
  padding: 1px 4px;
}

.icon-btn:hover {
  color: var(--blue);
}

.line-add {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.line-add input[type="text"] {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--gray-light);
  font-family: var(--sans);
  font-size: 13px;
  padding: 4px 1px;
  outline: none;
  background: transparent;
}

.line-add input[type="text"]:focus {
  border-bottom-color: var(--blue);
}

.line-add input[type="text"]::placeholder {
  color: var(--gray);
}

.line-add input[type="date"] {
  border: none;
  border-bottom: 1px solid var(--gray-light);
  font-family: var(--mono);
  font-size: 11px;
  color: #555;
  padding: 4px 1px;
  outline: none;
  background: transparent;
}

.line-add button {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  cursor: pointer;
}

.line-add button:hover {
  text-decoration: underline;
}

/* today streaks / goal index (home columns) */

.today-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-light);
}

.today-row .name {
  flex: 1;
}

.today-row .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
}

.check-btn {
  font-family: var(--mono);
  font-size: 11px;
  background: none;
  border: 1px solid var(--ink);
  padding: 2px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.check-btn:hover {
  background: var(--ink);
  color: #fff;
}

.check-btn.checked {
  border-color: var(--gray-light);
  color: var(--gray);
  cursor: default;
}

.check-btn.checked:hover {
  background: none;
  color: var(--gray);
}

.goal-index-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-light);
  text-decoration: none;
}

.goal-index-row:hover .name {
  color: var(--blue);
}

.goal-index-row .name {
  flex: 1;
}

.goal-index-row .meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
}

/* notifiers */

.notifier-list {
  display: flex;
  flex-direction: column;
}

.notifier-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-light);
}

.notifier-row.done {
  color: var(--gray);
}

.notifier-row.done .notifier-title {
  text-decoration: line-through;
}

.notifier-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  min-width: 52px;
}

.notifier-title {
  flex: 1;
}

.notifier-note {
  display: block;
  font-size: 11px;
  color: var(--gray);
}

.days-left {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  white-space: nowrap;
}

.days-left.urgent {
  color: var(--blue);
}

.notifier-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
}

.notifier-row:hover .notifier-actions {
  opacity: 1;
}

/* landing digest helpers */

.label-link {
  text-decoration: none;
  color: inherit;
}

.label-link:hover {
  color: var(--blue);
}

.sub-label {
  font-family: var(--mono);
  font-size: 10px;
  color: #bbb;
  margin-bottom: 0.5rem;
}

.quiet-link {
  text-decoration: none;
  color: inherit;
}

.quiet-link:hover {
  color: var(--blue);
}

.more-link {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
}

.more-link a {
  color: var(--gray);
}

.more-link a:hover {
  color: var(--blue);
}

/* gallery strip on landing */

.strip-section {
  padding: 0 20px 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.gallery-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.strip-card {
  flex: none;
}

.strip-card img {
  height: 130px;
  display: block;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.35s;
}

.strip-card:hover img {
  filter: none;
}

/* mantras page */

.mantra-page-list {
  max-width: 720px;
}

.mantra-list-lg .mantra-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
}

.mantra-list-lg .mantra-text {
  font-size: 14px;
}

.mantra-list-lg+.line-add {
  margin-top: 24px;
}

.mantra-list-lg+.line-add input[type="text"] {
  font-size: 14px;
}

/* ---------------- inner pages ---------------- */

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}

.page-head {
  margin-bottom: 56px;
  position: relative;
}

.display {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.display em {
  font-style: normal;
  color: var(--gray);
}

.page-sub {
  margin-top: 14px;
  color: var(--gray);
  max-width: 44ch;
}

.page-head .btn {
  position: absolute;
  right: 0;
  top: 8px;
}

.btn {
  font-family: var(--mono);
  font-size: 11px;
  background: none;
  border: 1px solid var(--ink);
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover {
  background: var(--ink);
  color: #fff;
}

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn-solid:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.group {
  margin-bottom: 56px;
}

.group[hidden] {
  display: none;
}

.group>.label {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
}

/* goal cards */

.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0 40px;
}

.goal-card {
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-card.done {
  color: var(--gray);
}

.goal-card.done .goal-title {
  text-decoration: line-through;
}

.goal-meta {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  align-items: center;
}

.goal-owner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
}

.goal-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
}

.goal-desc {
  color: var(--gray);
  font-size: 12px;
  max-width: 40ch;
}

.goal-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 1px;
  background: var(--gray-light);
  position: relative;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.4s;
}

.progress-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
}

.goal-items {
  list-style: none;
}

.goal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.goal-item input[type="checkbox"] {
  accent-color: var(--ink);
  cursor: pointer;
  width: 12px;
  height: 12px;
}

.goal-item.done span {
  text-decoration: line-through;
  color: var(--gray);
}

.goal-item .icon-btn {
  opacity: 0;
  margin-left: auto;
}

.goal-item:hover .icon-btn {
  opacity: 1;
}

.item-add {
  display: flex;
  margin-top: 4px;
}

.item-add input {
  flex: 1;
  border: none;
  border-bottom: 1px dashed var(--gray-light);
  font-size: 12px;
  padding: 3px 1px;
  outline: none;
  background: transparent;
}

.item-add input:focus {
  border-bottom-color: var(--blue);
}

/* streaks */

.streak-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.streak-who {
  font-family: var(--mono);
  font-size: 10px;
}

.streak-count {
  font-family: var(--mono);
  font-size: 1.5rem;
  line-height: 1;
}

.streak-label,
.streak-best {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
}

.streak-best {
  margin-left: auto;
}

.heat-strip {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.heat-cell {
  width: 9px;
  height: 9px;
  background: #f0f0f0;
}

.heat-cell.hit {
  background: var(--ink); /* walking / manual check-ins */
}

.heat-cell.src-strava {
  background: #fc4c02; /* strava orange */
}

.checkin-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* backdating: log a forgotten day */
.backfill-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.backfill-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  cursor: pointer;
}
.backfill-toggle::before { content: "+ "; color: var(--blue); }
.backfill-toggle:hover { color: var(--ink); }

.backfill-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.backfill-controls[hidden] { display: none; }
.backfill-date {
  border: none;
  border-bottom: 1px solid var(--gray-light);
  font-family: var(--mono);
  font-size: 11px;
  color: #555;
  padding: 3px 1px;
  outline: none;
  background: transparent;
}
.backfill-date:focus { border-bottom-color: var(--blue); }

.log-entry .log-date { cursor: pointer; }
.log-entry .log-date:hover { color: var(--blue); }
.log-date-input {
  border: none;
  border-bottom: 1px solid var(--blue);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
  outline: none;
  background: transparent;
  width: 110px;
}

.check-btn.src-btn { border-color: var(--src); }
.check-btn.src-btn:hover { background: var(--src); color: #fff; }
.check-btn.src-btn.checked {
  background: none;
  color: var(--src);
  border-color: var(--src);
  opacity: 0.75;
}

/* checked buttons stay pressable — pressing again undoes today */
.check-btn.checked { cursor: pointer; }
.check-btn.checked:hover {
  background: none;
  color: var(--blue);
  border-color: var(--blue);
  opacity: 1;
}

.heat-cell.src-both {
  /* strava + walking on the same day: half orange, half black */
  background: linear-gradient(135deg, #fc4c02 50%, var(--ink) 50%);
}

.heat-cell.today {
  outline: 1px solid var(--blue);
  outline-offset: 1px;
}

.goal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  margin-top: 2px;
}

.goal-foot .due-soon {
  color: var(--blue);
}

.goal-foot .spacer {
  flex: 1;
}

.goal-foot .icon-btn {
  opacity: 0;
}

.goal-card:hover .goal-foot .icon-btn {
  opacity: 1;
}

/* goal detail page */

.goal-title-link { text-decoration: none; color: inherit; }
.goal-title-link:hover { color: var(--blue); }

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  margin-top: 40px;
}
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-grid > section > .label {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  color: var(--ink);
}

.heat-strip-lg { max-width: 460px; margin: 10px 0 14px; }
.detail-grid .log-add { margin-bottom: 12px; }
.detail-grid .streak-row { margin-top: 10px; }

/* notes & history under a goal */

.goal-log { margin-top: 4px; }

.goal-log summary {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  cursor: pointer;
  list-style: none;
}

.goal-log summary::before { content: "+ "; color: var(--blue); }
.goal-log[open] summary::before { content: "\2212 "; }
.goal-log summary:hover { color: var(--ink); }

.log-list { list-style: none; margin-top: 8px; }

.log-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: 12px;
}

.log-date { font-family: var(--mono); font-size: 10px; color: var(--gray); min-width: 66px; }
.log-text { flex: 1; }
.log-event .log-text { color: var(--gray); }
.log-event .log-date::after { content: " \2192"; color: var(--blue); }
.log-entry .icon-btn { opacity: 0; }
.log-entry:hover .icon-btn { opacity: 1; }

.log-add { display: flex; margin-top: 6px; }
.log-add input {
  flex: 1;
  border: none;
  border-bottom: 1px dashed var(--gray-light);
  font-size: 12px;
  padding: 3px 1px;
  outline: none;
  background: transparent;
}
.log-add input:focus { border-bottom-color: var(--blue); }

.strava-tag { color: #fc4c02; } /* strava orange */

.page-head-actions {
  position: absolute;
  right: 0;
  top: 8px;
  display: flex;
  gap: 10px;
}
.page-head-actions .btn { position: static; }

.check-inline {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.check-inline input { width: auto !important; margin: 0 !important; accent-color: var(--ink); }

/* ---------------- lists page ---------------- */

.list-columns {
  columns: 3;
  column-gap: 40px;
}

@media (max-width: 1000px) {
  .list-columns {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .list-columns {
    columns: 1;
  }
}

.list-block {
  break-inside: avoid;
  margin-bottom: 44px;
}

.list-block>.label {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--ink);
}

.list-block>.label .pct {
  margin-left: auto;
  color: var(--gray);
}

.list-block .goal-desc {
  margin: 8px 0 4px;
}

/* ---------------- gallery ---------------- */

.gallery-grid {
  columns: 3;
  column-gap: 20px;
}

@media (max-width: 900px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    columns: 1;
  }
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
}

.gallery-card img {
  width: 100%;
  display: block;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.35s;
}

.gallery-card:hover img {
  filter: none;
}

.gallery-caption {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  margin-top: 6px;
}

.gallery-card .icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
}

.gallery-card:hover .icon-btn {
  opacity: 1;
}

.upload-tile {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 160px;
  margin-bottom: 20px;
  border: 1px dashed var(--gray-light);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.15s;
}

.upload-tile:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.upload-plus {
  font-size: 20px;
}

/* ---------------- modal ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border: 1px solid var(--ink);
  padding: 28px;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.label-soft { color: #c4c4c4; text-transform: none; letter-spacing: 0; }

.modal .label {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 18px;
}

.modal label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  margin-bottom: 14px;
}

.modal input[type="text"],
.modal input[type="date"],
.modal select,
.modal textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: none;
  border-bottom: 1px solid var(--gray-light);
  padding: 6px 1px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  background: transparent;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  border-bottom-color: var(--blue);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.caption-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  filter: grayscale(1);
  margin-bottom: 16px;
}

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  padding: 28px;
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  margin: 0;
  text-align: center;
}

.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  display: block;
  margin: 0 auto;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.18);
}

.lightbox figcaption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray);
  margin-top: 12px;
}

.hero-cell {
  cursor: zoom-in;
}

.gallery-card img {
  cursor: zoom-in;
}

/* ---------------- footer ---------------- */

.foot {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-top: 1px solid var(--gray-light);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
}

.foot-mantra {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
}

.empty {
  color: var(--gray);
  font-size: 12px;
  padding: 8px 0;
}

/* ---------------- mobile ---------------- */

/* touch devices: hover-revealed actions must always be visible */
@media (hover: none), (pointer: coarse) {
  .mantra-actions,
  .notifier-actions,
  .goal-item .icon-btn,
  .goal-foot .icon-btn,
  .log-entry .icon-btn,
  .gallery-card .icon-btn {
    opacity: 1;
  }
  .icon-btn { padding: 4px 8px; }  /* bigger tap targets */
}

@media (max-width: 720px) {
  /* top bar: wordmark + profiles on one row, nav scrolls beneath */
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand profiles"
      "nav nav";
    gap: 8px 10px;
    padding: 10px 14px;
  }
  .topbar-cell:first-child { grid-area: brand; }
  .topbar-nav {
    grid-area: nav;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .topbar-nav a { white-space: nowrap; }
  .topbar-profiles { grid-area: profiles; }

  /* pages */
  .page { padding: 30px 16px 56px; }
  .page-head { margin-bottom: 36px; }
  .page-head .btn { position: static; }
  .page-head-actions {
    position: static;
    margin-top: 16px;
    flex-wrap: wrap;
  }

  /* landing */
  .split-left { padding: 20px 16px 40px; }
  .split-right { padding: 20px 16px 44px; }
  .hero-block { padding: 40px 0 48px; }
  .index-grid { gap: 32px; grid-template-columns: minmax(0, 1fr); }
  .index-col { min-width: 0; }

  /* forms wrap instead of inflating the column width */
  .line-add { flex-wrap: wrap; }
  .line-add input[type="text"] { flex: 1 1 100%; min-width: 0; }
  .line-add input[type="date"] { flex: 1; min-width: 0; }
  .goal-index-row .meta, .today-row .count { white-space: nowrap; }

  /* iOS zooms into inputs under 16px — keep form text at 16px */
  .line-add input[type="text"],
  .item-add input,
  .log-add input,
  .modal input[type="text"],
  .modal input[type="date"],
  .modal select,
  .modal textarea {
    font-size: 16px;
  }

  /* streak strips: smaller cells so 26 weeks fit */
  .heat-cell { width: 7px; height: 7px; }
  .heat-strip-lg { max-width: 100%; }

  /* rows can wrap instead of crowding */
  .notifier-row, .today-row { flex-wrap: wrap; }

  .detail-grid { gap: 36px; margin-top: 24px; }

  .modal { padding: 22px 16px; }
  .lightbox { padding: 10px; }
  .lightbox img { max-width: 96vw; max-height: 78vh; }

  .foot {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}