/* Home A, "the desk" (js/home.js). Tokens from the Daily Word design system; phone first (390 px).
   Everything here is under body[data-view="home"] or .hm-*, so the day page is untouched. */
:root {
  --touch: 44px;
}

/* the top bar and menu are site.css (.top, .nav-*) */
body[data-view="home"] .wrap { max-width: 430px; padding: 12px 20px 0; }

.hm { display: flex; flex-direction: column; gap: 14px; font: 400 15px/1.5 var(--ui); color: var(--text); }
.hm a { color: inherit; text-decoration: none; }
.hm-xs { font-size: 12px; line-height: 1.4; }
.hm-sm { font-size: 13px; }
.hm-muted { color: var(--muted); }
.hm-gold { color: var(--gold); }

.hm-h1 { font: 400 32px/1.15 var(--read); letter-spacing: -.005em; margin: 4px 0 0; }
.hm-sub { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.hm-label {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1.4 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--gold);
}
.hm-label-muted { color: var(--muted); }
.hm-label-i { width: 16px; height: 16px; }
.hm-label-i-sm { width: 15px; height: 15px; }

.hm-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hm-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hm-ref { font: 500 12px/1.3 var(--ui); color: var(--gold); }
.hm-new { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex: none; }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
/* Today's focus on the walk card */
.hm-focus { display: flex; gap: 10px; align-items: stretch; }
.hm-focus-line { width: 3px; border-radius: 2px; background: var(--note-focus); flex: none; }
.hm-focus-body { display: flex; flex-direction: column; gap: 2px; }
.hm-focus-label { font: 600 11px/1.4 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--note-focus); }
.hm-focus-title { font: italic 400 17px/1.3 var(--read); }

/* cards: the whole card is one link; a button inside is drawn, not a second target */
.hm-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
a.hm-card:focus-visible, .hm-li:focus-visible, .hm-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hm-pad { padding: 20px; }
.hm-lead { background: var(--keywash); border-color: var(--line-strong); padding: 20px; gap: 12px; }
.hm-title-lead { font: 400 27px/1.18 var(--read); letter-spacing: -.005em; margin: 0; }
.hm-title { font: 400 23px/1.2 var(--read); letter-spacing: -.005em; margin: 0; }
.hm-title-sm { font: 400 21px/1.25 var(--read); margin: 0; }
.hm-sections { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--muted); }
/* A study's point on its card: serif, the walk card's section-list color, three lines at most. */
.hm-point {
  margin: 0; font: 400 15px/1.45 var(--read); color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch); padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text); font: 500 14px/1 var(--ui);
}
.hm-btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ground); }
.hm-btn-full { width: 100%; }
.hm-btn-start { align-self: flex-start; }

.hm-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.hm-bar-fill { height: 4px; background: var(--gold); border-radius: 2px; }

/* a request waiting or being written (Runs A: the dashed card) */
.hm-writing { background: transparent; border: 1px dashed var(--line-strong); padding: 16px 20px; gap: 12px; }
.hm-request { font: 400 19px/1.3 var(--read); }
.hm-steps { display: flex; gap: 8px; }
.hm-step { flex: 1; display: flex; flex-direction: column; gap: 6px; font: 500 11px var(--ui); color: var(--muted); }
.hm-step.current { color: var(--text); }

.hm-verse { font: italic 400 21px/1.35 var(--read); margin: 0; }
.hm-link { font-size: 12px; color: var(--gold) !important; min-height: var(--touch); display: inline-flex; align-items: center; }

/* Lately */
.hm-lately { margin-top: 10px; }
.hm-li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hm-tag { width: 64px; flex: none; font: 500 12px/1.3 var(--ui); padding-top: 3px; }
.hm-tag-walk { color: var(--gold); }
.hm-tag-study { color: var(--text); }
.hm-tag-custom { color: var(--muted); }

/* a request that didn't finish (Runs A, failed): plain text, never red */
.hm-failed { border-color: var(--line-strong); padding: 16px 18px; gap: 12px; }
.hm-row-start { display: flex; align-items: center; gap: 8px; }
.hm-failed-i { width: 18px; height: 18px; color: var(--text); }
.hm-asked-box { background: var(--ground); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.hm-block { display: block; }
.hm-asked-text { font: 400 17px/1.4 var(--read); }
.hm-btn-grow { flex: 1; }
button.hm-btn { cursor: pointer; }
button.hm-btn:disabled { opacity: .6; cursor: default; }
.hm-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Home A's Ask card */
.hm-ask { padding: 16px 16px 14px; gap: 12px; }
.hm-ask-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ground);
}
.hm-ask-box:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hm-li-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-li-title { font: 400 17px/1.3 var(--read); }

.hm-progress { padding: 8px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.hm-pd { font: italic 12px/1.4 var(--read); color: var(--muted); margin: 0 0 32px; }
.hm > :last-child:not(.hm-pd), .hm-aside > :last-child:not(.hm-pd) { margin-bottom: 32px; }
/* The main column and the aside (js/home.js desk) are only groups for the wide layout: on a phone they add no box. */
.hm-main, .hm-aside { display: contents; }

/* first morning */
.hm-first { gap: 22px; padding-top: 12px; }
.hm-h1-first { font-size: 34px; line-height: 1.12; }
.hm-how { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.hm-how-row { display: flex; gap: 14px; align-items: flex-start; }
.hm-how-row b { font: 600 12px var(--ui); color: var(--gold); width: 20px; flex: none; padding-top: 2px; }
.hm-first-foot { border-top: 1px solid var(--line); padding: 16px 0 32px; }
