/* ds/home.css — the role home, one component set for every role (28 Nov 2026, portal pass).
   The pattern is the headmaster rebuild (director.css «Headmaster home»): ONE header (who + mic), a few plain facts in
   one grey card, ONE primary action, chevron rows, a bottom bar for the main sections, nothing parachuted.
   Use: <body class="rh app-actions" data-view="today"> and the classes below. Light only. Solid text colours only.
   Views: an element with data-views="today more" shows only in those views (body[data-view]). */

.rh{ --f-text:var(--font); font-family:var(--font); font-size:var(--t-body); background:var(--bg); color:var(--fg-1);
  --rh-nav-h:calc(64px + env(safe-area-inset-bottom)); }
.rh.rh-has-nav{ padding-bottom:calc(var(--rh-nav-h) + 24px); }
.rh-main{ width:100%; max-width:calc(1080px + 2*var(--gutter)); margin-inline:auto; padding:var(--s-4) var(--gutter) var(--s-9); }
.rh-main > *{ min-width:0; }

/* views */
body.rh[data-view="today"] [data-views]:not([data-views~="today"]),
body.rh[data-view="week"] [data-views]:not([data-views~="week"]),
body.rh[data-view="list"] [data-views]:not([data-views~="list"]),
body.rh[data-view="messages"] [data-views]:not([data-views~="messages"]),
body.rh[data-view="more"] [data-views]:not([data-views~="more"]){ display:none !important; }

/* header: who + mic, nothing else */
.rh-bar{ border-bottom:1px solid var(--hairline); background:var(--bg); }
.rh-bar-in{ display:flex; align-items:center; gap:var(--s-5); min-height:64px; width:100%; max-width:calc(1080px + 2*var(--gutter)); margin-inline:auto; padding-inline:var(--gutter); }
.rh-who{ display:grid; min-width:0; flex:1; margin:0; line-height:1.35; }
.rh-who b{ font-size:var(--t-body); font-weight:var(--w-medium); color:var(--fg-1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rh-who span{ font-size:var(--t-small); color:var(--fg-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rh-brand{ flex:none; display:inline-flex; align-items:center; min-height:48px; }
.rh-brand .logo-mask{ width:96px; }
.rh-mic{ flex:none; display:grid; place-items:center; width:48px; height:48px; min-width:48px; min-height:48px; padding:0; border:0; border-radius:var(--r-full); background:var(--bg-panel); color:var(--fg-1); cursor:pointer; text-decoration:none; font:var(--w-medium) 17px/1 var(--font); }
.rh-mic svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; }
.rh-mic[aria-pressed="true"]{ background:var(--info-bg); color:var(--action); box-shadow:inset 0 0 0 2px var(--action); }
.rh-mic:focus-visible{ outline:2px solid var(--action); outline-offset:2px; }

/* title row */
.rh-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:0 var(--s-4); margin-block:var(--s-2) var(--s-5); }
.rh-h1{ font-size:var(--t-title); line-height:var(--lh-title); font-weight:var(--w-medium); margin:0; color:var(--fg-1); }
.rh-date{ font-size:var(--t-small); color:var(--fg-3); margin:0; }
.rh-lede{ font-size:var(--t-body); line-height:1.6; color:var(--fg-2); margin:0 0 var(--s-5); max-width:46ch; }
.rh-h2{ font-size:var(--t-subtitle); line-height:var(--lh-subtitle); font-weight:var(--w-medium); color:var(--fg-1); margin:var(--s-8) 0 var(--s-4); }
.rh-sec:first-child .rh-h2{ margin-top:0; }

/* facts: one grey card, a dot, a line, a meta, a chevron */
.rh-card, .rh-facts, .rh-list{ background:var(--bg-panel); border-radius:var(--r-2xl); }
.rh-card{ padding:var(--s-6); }
.rh-facts, .rh-list{ list-style:none; margin:0; padding:0 var(--s-6); }
.rh-facts > li + li{ border-top:1px solid var(--bg-sunken); }
.rh-fact{ display:flex; align-items:center; gap:var(--s-5); min-height:56px; padding-block:var(--s-4); color:var(--fg-1); text-decoration:none; }
.rh-fact-main{ flex:1; min-width:0; display:grid; }
.rh-fact b, .rh-fact-main > b{ font-size:var(--t-body); line-height:1.5; font-weight:var(--w-medium); }
.rh-fact small{ font-size:var(--t-small); line-height:1.5; color:var(--fg-3); }
.rh-dot{ flex:none; width:10px; height:10px; border-radius:50%; background:var(--ok); }
.rh-dot[data-tone="warn"]{ background:#B06A00; }
.rh-dot[data-tone="info"]{ background:var(--action); }
.rh-dot[data-tone="idle"]{ background:#8A8A85; }
.rh-num{ font-variant-numeric:tabular-nums; unicode-bidi:isolate; }

/* chevron rows */
.rh-row, a.rh-row, button.rh-row{ display:flex; align-items:center; gap:var(--s-5); min-height:56px; padding:var(--s-4) 0; border:0; border-bottom:1px solid var(--bg-sunken); background:none; color:var(--fg-1); text-decoration:none; text-align:start; font:inherit; width:100%; cursor:pointer; }
.rh-list > li:last-child > .rh-row, .rh-list > .rh-row:last-child{ border-bottom:0; }
.rh-row-main{ flex:1; min-width:0; display:grid; }
.rh-row-title{ font-size:var(--t-body); line-height:1.5; color:var(--fg-1); }
.rh-row-meta{ font-size:var(--t-small); line-height:1.5; color:var(--fg-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rh-row-trail{ flex:none; font-size:var(--t-small); color:var(--fg-3); }
.rh-row-all .rh-row-title{ color:var(--action); }
.rh-chev{ flex:none; width:20px; height:20px; fill:none; stroke:var(--fg-3); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.rh-row:focus-visible, .rh-fact:focus-visible{ outline:2px solid var(--action); outline-offset:2px; border-radius:var(--r-md); }
.rh-row:active{ background:var(--bg-sunken); }

/* the one decision: the only card with a button */
.rh-top{ background:var(--bg-panel); border-radius:var(--r-2xl); padding:var(--s-6); display:grid; gap:var(--s-2); margin-bottom:var(--s-4); }
.rh-top > b{ font-size:var(--t-body-lg); line-height:1.5; font-weight:var(--w-medium); }
.rh-top > small{ font-size:var(--t-small); line-height:1.5; color:var(--fg-3); }
.rh-top .ui-btn, .rh-top .btn{ margin-top:var(--s-4); width:100%; justify-content:center; text-decoration:none; }
.rh-none{ background:var(--bg-panel); border-radius:var(--r-2xl); padding:var(--s-6); color:var(--fg-2); margin:0; }

/* bottom bar */
.rh-nav{ position:fixed; inset:auto 0 0; z-index:45; padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background:var(--bg); border-top:1px solid var(--hairline); }
.rh-nav-in{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); max-width:760px; margin-inline:auto; }
.rh-nav a, .rh-nav button{ display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; min-height:63px; border:0; background:none; color:var(--fg-2); font:var(--w-medium) clamp(14px,4vw,16px)/1.25 var(--font); text-decoration:none; cursor:pointer; }
.rh-nav svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.rh-nav [aria-current="page"]{ color:var(--action); box-shadow:inset 0 2px var(--action); }
.rh-nav a:focus-visible, .rh-nav button:focus-visible{ outline:2px solid var(--action); outline-offset:-4px; }

/* two columns from 760 px: the main block and its neighbours share the edges */
@media (min-width:760px){
  .rh-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:var(--s-11); align-items:start; }
  .rh-grid > .rh-wide{ grid-column:1 / -1; }
  .rh-grid > .rh-sec .rh-h2{ margin-top:var(--s-8); }
}

html.big-text .rh-row-title, html.big-text .rh-fact b{ font-size:calc(var(--t-body) + 2px); }
@media print{ .rh-nav, .rh-bar{ display:none !important; } .rh.rh-has-nav{ padding-bottom:0; } }
