.home { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.home h2 { margin: 28px 0 10px; font-size: 18px; }
.h-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.h-tag { display: inline-block; font-size: 11px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); text-transform: capitalize; margin: 1px 0; }
.h-tag.on { color: var(--accent); border-color: var(--accent); }
.h-path summary { cursor: pointer; display: grid; gap: 6px; list-style: none; }
.h-path summary::-webkit-details-marker { display: none; }
.h-path summary:focus-visible, .h-link:focus-visible, .home .btn:focus-visible, .home a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.h-pname { font-weight: 600; font-size: 16px; }
.h-why { color: var(--muted); font-size: 13px; line-height: 1.5; }
.h-bar { display: block; height: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.h-bar i { display: block; height: 100%; background: var(--accent); }
.h-path small { color: var(--muted); }
.h-items { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.h-items li { display: flex; align-items: center; gap: 8px; min-width: 0; position: relative; }
.h-link { background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--text); text-align: left; text-decoration: none; font-size: 14px; }
.h-link:hover { color: var(--accent); text-decoration: underline; }
.h-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.h-dot, .h-sw { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); box-sizing: border-box; }
.h-dot.s0, .h-sw.s0 { background: transparent; }
.h-dot.s1, .h-sw.s1 { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.h-dot.s2, .h-sw.s2 { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.h-dot.s3, .h-sw.s3 { background: color-mix(in srgb, var(--accent) 75%, transparent); }
.h-sw.s4 { background: var(--accent); }
.h-lv { flex: none; min-width: 26px; text-align: center; font: 600 11px/18px var(--sans); border: 1.5px solid var(--accent); border-radius: 6px; color: var(--text); box-sizing: border-box; }
.h-lv.l0 { color: var(--muted); border-color: var(--line-2); }
.h-lv.l1 { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.h-lv.l2 { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.h-lv.l3 { background: color-mix(in srgb, var(--accent) 75%, transparent); }
.h-lv.l4 { background: var(--accent); color: var(--on-accent); }
.h-ph { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.h-due { color: var(--accent); }
.h-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.h-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.h-legend span { display: inline-flex; align-items: center; gap: 6px; }
.h-sub { font-size: 13px; margin: 0 0 8px; }
.h-hint { display: none; color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.h-mapwrap { container-type: inline-size; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.h-map { display: block; max-width: none; }
.h-gl { font: 600 12px var(--sans); }
.h-edge { fill: none; stroke-width: 1.2; opacity: .35; }
.h-node { cursor: pointer; }
.h-node rect { fill: transparent; stroke: var(--c); stroke-width: 1.5; }
.h-node text { font: 12px var(--sans); fill: var(--text); pointer-events: none; }
.h-node.s1 rect { fill: color-mix(in srgb, var(--c) 18%, transparent); }
.h-node.s2 rect { fill: color-mix(in srgb, var(--c) 45%, transparent); }
.h-node.s3 rect { fill: color-mix(in srgb, var(--c) 75%, transparent); }
.h-node.s4 rect { fill: var(--c); }
.h-node.s4 text { fill: var(--code-bg); }
.h-node:focus { outline: none; }
.h-node:focus-visible rect { stroke: var(--text); stroke-width: 3; }
.h-map.dim .h-node, .h-map.dim .h-edge, .h-map.dim .h-gl { opacity: .15; }
.h-map.dim .h-node.hl, .h-map.dim .h-edge.hl { opacity: 1; }
.h-map.dim .h-edge.hl { stroke-width: 2; }
.h-side { min-height: 2.4em; margin-top: 10px; font-size: 13px; }
.h-foot { margin-top: 28px; }
@media (max-width: 818px) { .h-hint { display: block; } }
@media (max-width: 700px) { .h-mapwrap { padding: 8px; } }
@container (min-width: 760px) { .h-map { width: 100%; height: auto; } }
@media (max-width: 520px) { .h-ph { display: none; } }

/* ---------- one-screen Home ---------- */
.home .btn { min-height: 44px; }
.home a.btn { display: inline-flex; align-items: center; }
.h-link { min-height: 44px; }
.h-next { padding: 20px; }
.h-kick { margin: 0; font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-was { margin: 4px 0 10px; font-size: 14px; color: var(--muted); }
.h-step { margin: 8px 0 0; font-size: 14px; }
.h-kind { font-weight: 600; color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.h-title { font: 700 24px/1.25 var(--sans); margin: 4px 0 14px; overflow-wrap: anywhere; }
.h-start { min-width: 160px; font-size: 16px; }
.h-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.h-pl { font-size: 14px; color: var(--muted); margin-right: 4px; }
.h-week { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 10px 0 4px; }
.h-dots { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.h-dots li { display: grid; justify-items: center; font-size: 11px; color: var(--muted); min-width: 22px; }
.h-wdot { font-size: 18px; line-height: 1; color: var(--muted); }
.h-dots li.on .h-wdot { color: var(--accent); }
.h-dots li.today .h-wl { color: var(--text); font-weight: 700; text-decoration: underline; }
.h-wtext { margin: 0; font-size: 14px; }
.h-goal { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.h-goal .btn { min-width: 44px; padding: 4px 10px; }
.h-goal b { min-width: 1.4em; text-align: center; color: var(--text); font-size: 16px; }
.h-browse { margin-top: 18px; }
.h-browse > summary { cursor: pointer; font: 600 16px var(--sans); min-height: 44px; display: flex; align-items: center; padding: 0 4px; }
.h-browse > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.h-fs { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0 0 10px; background: var(--panel); min-width: 0; }
.h-fs legend { font-weight: 600; padding: 0 4px; }
.h-opt { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 14px; }
.h-set { display: grid; gap: 2px; margin: 6px 0; font-size: 14px; max-width: 420px; }
.h-set input[type="range"] { width: 100%; min-height: 32px; }
.h-set input[type="time"] { min-height: 44px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: inherit; max-width: 160px; }
.h-sample { font-size: var(--read-size, 16px); line-height: var(--read-lh, 1.6); max-width: var(--read-width, 68ch); margin: 8px 0 0; }
.h-days { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.h-day { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; }
.h-file { position: relative; display: inline-flex; align-items: center; }
.h-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.h-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- the sitting (views/sitting.js) ---------- */
.sit { max-width: 860px; margin: 0 auto; padding-bottom: 24px; }
.sit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.sit-meta { margin: 0; font-size: 14px; color: var(--muted); }
.sit-kind { font-weight: 600; color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.sit .btn { min-height: 44px; }
.sit-title { font: 700 24px/1.25 var(--sans); margin: 6px 0 6px; overflow-wrap: anywhere; }
.sit-title:focus, .sit h1:focus { outline: none; }
.sit-line { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin: 4px 0 16px; max-width: 480px; }
.sit-line .p-bar { display: block; }
.sit-body { min-height: 120px; }
.sit-body .p-card, .sit-body .p-summary { margin: 8px 0; }
.sit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.sit-status { margin: 0; font-size: 14px; min-height: 1.4em; flex: 1 1 200px; }
.sit-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.tick { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-right: 4px; }
.sit-can { margin: 14px 0 0; padding: 14px 16px; border: 2px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.sit-can h2 { margin: 0 0 4px; font-size: 16px; }
.sit-can p { margin: 4px 0; }
.sit-card { max-width: 720px; margin: 20px auto; padding: 22px clamp(16px, 4vw, 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.sit-card h1 { margin-top: 0; }
.sit-done { list-style: none; padding: 0; display: grid; gap: 6px; }
.sit-q { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; min-width: 0; }
.sit-q legend { font-weight: 600; padding: 0 4px; }
.sit-q label { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.sit-ask { font-size: 18px; font-weight: 600; line-height: 1.45; }
.sit textarea { width: 100%; padding: 10px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--panel); color: inherit; font: inherit; resize: vertical; }
.sit-ans { padding: 12px 14px; background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 8px; }
.sit-read .sit-prose p, .sit-read .sit-prose li, .sit-ans p, .sit-ans li { font-size: var(--read-size, 16px); line-height: var(--read-lh, 1.6); max-width: var(--read-width, 68ch); }
.sit-read .sec h3 { font-size: 16px; margin: 18px 0 4px; }
.sit-sayback { margin-top: 18px; }
.sit-sayback h2 { font-size: 16px; margin: 0 0 4px; }
.sit-note { font-size: 14px; color: var(--muted); }
.sit-task { margin-bottom: 12px; }
.sit-task h2 { font-size: 16px; margin: 0 0 4px; }
.sit .ar-focus .ar-fnav { position: sticky; bottom: 76px; background: var(--bg); padding: 6px 0; margin: 10px 0 0; }
.sit .ar-sec h3 { font-size: 18px; margin: 8px 0; }
.sit .ar-prose p, .sit .ar-prose li { font-size: var(--read-size, 16px); line-height: var(--read-lh, 1.6); max-width: var(--read-width, 68ch); }
.sit-cert { max-width: 760px; margin: 12px auto; padding: 24px clamp(16px, 4vw, 36px); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.sit-cert h1 { margin: 4px 0 6px; }
.sit-cert .bul li { margin: 4px 0; }
@media (max-width: 600px) {
  .h-title, .sit-title { font-size: 20px; }
  .sit-bar { margin-left: -8px; margin-right: -8px; border-radius: 14px 14px 0 0; }
  .sit-acts { width: 100%; margin-left: 0; }
  .sit-acts .btn { flex: 1 1 auto; }
}
@media print {
  .top, #sitbar, .no-print, .sit-bar, dialog { display: none !important; }
  body, .view { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .sit-cert { border: 0; box-shadow: none; margin: 0; padding: 0; max-width: none; font-size: 11pt; line-height: 1.4; }
  .sit-cert h1 { font-size: 20pt; }
  .sit-cert h2 { font-size: 13pt; margin: 10pt 0 4pt; }
}
