/* Portal v4, stage B4 (18 Nov 2026): Holly smarts (holly4.js). Apple finish per
   ~/holly/design/portal-desk/10-80-10-plan-v4.md: system type, one container level, no
   borders on cards, no rails, no uppercase labels, no pill rows, one prominent button,
   grouped inset lists, a switch like iOS. Nothing here applies until holly4.js adds its
   classes (the owner as himself, PORTAL_V4 on). Desktop (macOS 13 px) first, phone (iOS 17 px) below. */
.h4-room, .h4-settings, .h4-sheet {
  --h4-ink: #111; --h4-mute: #6E6E68; --h4-bg: #F4F4EF; --h4-card: #fff; --h4-fill: #E8E8E2; --h4-sep: #E2E2DB;
  --h4-y: #F5C500; --h4-link: #8A6D00; --h4-red: #D6362B; --h4-shadow: 0 1px 2px rgba(0,0,0,.06);
  --h4-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
.h4-i { width: 14px; height: 14px; flex: none; }

/* ---- a team chat or client room: Catch me up, the card, the private tray ---- */
.h4-room .h4-top { flex: none; font-family: var(--h4-font); font-size: 13px; color: var(--h4-ink); padding: 6px 14px 0; }
.h4-room .h4-top:empty { display: none; }
.h4-room .h4-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.h4-room .h4-catch { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--h4-fill);
  color: var(--h4-ink); font: 13px/1 var(--h4-font); cursor: pointer; white-space: nowrap; flex: none; }
.h4-room .h4-catch:hover { background: #DEDED7; }
.h4-room .h4-catch[disabled] { opacity: .55; cursor: default; }
.h4-room .h4-new { color: var(--h4-mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h4-room .h4-err { margin: 4px 0 0; color: var(--h4-red); font-size: 12px; }
.h4-room .h4-cc { margin: 8px 0 4px; padding: 10px 14px 12px; background: var(--h4-bg); border-radius: 10px; max-height: 30vh; overflow: auto; }
.h4-room .h4-cc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.h4-room .h4-cc-h b { font-weight: 600; font-size: 13px; }
.h4-room .h4-pts { margin: 0; padding: 0 0 0 20px; display: grid; gap: 4px; line-height: 1.45; }
.h4-room .h4-pts li::marker { color: var(--h4-mute); }
.h4-room .ck-src, .h4-sheet .ck-src { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--h4-mute); }
.h4-room .ck-src a { color: var(--h4-link); text-decoration: none; }
.h4-room .ck-src a:hover { text-decoration: underline; }
.h4-room .h4-x { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--h4-mute); cursor: pointer; margin-left: auto; }
.h4-room .h4-x:hover { background: var(--h4-fill); }
.h4-room .h4-wait { display: flex; align-items: center; gap: 8px; margin: 2px 0; color: var(--h4-mute); }
.h4-room .h4-dots { display: inline-flex; gap: 3px; }
.h4-room .h4-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--h4-mute); animation: h4-dot 1.2s infinite ease-in-out; }
.h4-room .h4-dots i:nth-child(2) { animation-delay: .15s; } .h4-room .h4-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes h4-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .h4-room .h4-dots i { animation: none; opacity: .6; } }
.h4-room .h4-foot { display: flex; align-items: center; gap: 5px; margin: 6px 0 0; color: var(--h4-mute); font-size: 12px; }
.h4-room .h4-foot.is-red { color: var(--h4-red); }
.h4-room .h4-link { border: 0; background: none; padding: 0; color: var(--h4-link); font: inherit; cursor: pointer; }

.h4-room .h4-tray { flex: none; max-height: 34vh; overflow: auto; padding: 6px 14px 4px; display: grid; gap: 8px; font-family: var(--h4-font); font-size: 13px; color: var(--h4-ink); }
.h4-room .h4-tray[hidden] { display: none; }
.h4-room .h4-ask { display: grid; gap: 6px; }
.h4-room .h4-me { display: flex; justify-content: flex-end; }
.h4-room .h4-qb { max-width: 80%; padding: 7px 12px; border-radius: 16px 16px 5px 16px; background: #111; color: #fff; line-height: 1.4; overflow-wrap: anywhere; }
.h4-room .h4-priv { max-width: min(88%, 560px); padding: 9px 12px 10px; background: var(--h4-card); border-radius: 16px 16px 16px 5px; box-shadow: var(--h4-shadow); }
.h4-room .h4-lock { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; color: var(--h4-link); font-size: 12px; }
.h4-room .h4-lock .h4-i { width: 13px; height: 13px; }
.h4-room .h4-ans { line-height: 1.45; overflow-wrap: anywhere; }
.h4-room .h4-post { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 28px; padding: 0 10px; border: 0; border-radius: 7px;
  background: var(--h4-fill); color: var(--h4-ink); font: 13px/1 var(--h4-font); cursor: pointer; }
.h4-room .h4-post:hover { background: #DEDED7; }

/* the phone: iOS sizes, and the bar on the nav material */
html.p4-on .h4-room .h4-top { padding: 4px 16px 0; font-size: 17px; }
html.p4-on .h4-room .h4-catch { height: 44px; padding: 0 2px; background: none; color: var(--h4-link); font-size: 17px; gap: 8px; }
html.p4-on .h4-room .h4-catch .h4-i { width: 22px; height: 22px; }
html.p4-on .h4-room .h4-new { font-size: 15px; }
html.p4-on .h4-room .h4-cc { background: var(--h4-card); border-radius: 14px; box-shadow: var(--h4-shadow); padding: 14px 16px; max-height: 30vh; }
html.p4-on .h4-room .h4-cc-h b { font-size: 17px; }
html.p4-on .h4-room .h4-pts { gap: 8px; font-size: 17px; padding-left: 22px; }
html.p4-on .h4-room .ck-src { font-size: 15px; }
html.p4-on .h4-room .h4-tray { padding: 6px 16px 4px; font-size: 17px; max-height: 32vh; }
html.p4-on .h4-room .h4-qb { padding: 9px 14px; }
html.p4-on .h4-room .h4-priv { padding: 12px 14px; border-radius: 18px 18px 18px 6px; }
html.p4-on .h4-room .h4-lock { font-size: 15px; color: var(--h4-mute); }
html.p4-on .h4-room .h4-post { height: 44px; padding: 0; background: none; color: var(--h4-link); font-size: 17px; font-weight: 600; gap: 8px; }
html.p4-on .h4-room .h4-post .h4-i { width: 20px; height: 20px; }
html.p4-on .h4-room .h4-x { width: 32px; height: 32px; }

/* ---- the email sheet ---- */
.h4-sheet { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; background: rgba(0,0,0,.28); font-family: var(--h4-font); }
.h4-sheet-in { width: min(420px, calc(100vw - 32px)); padding: 16px 18px 18px; background: var(--h4-card); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.18); color: var(--h4-ink); }
.h4-sheet-h { display: flex; align-items: center; gap: 8px; color: var(--h4-mute); font-size: 13px; }
.h4-sheet-h b { font-weight: 400; }
.h4-sheet .h4-x { margin-left: auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--h4-fill); color: var(--h4-mute); cursor: pointer; }
.h4-sheet-t { margin: 10px 0 2px; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.h4-sheet-s { margin: 0; color: var(--h4-mute); font-size: 13px; }
.h4-sheet-n { margin: 12px 0 14px; font-size: 13px; color: var(--h4-mute); line-height: 1.45; }
.h4-sheet .h4-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 7px; background: #111; color: #fff; text-decoration: none; font-size: 13px; }
.h4-sheet.is-phone { place-items: end center; }
.h4-sheet.is-phone .h4-sheet-in { width: 100%; border-radius: 14px 14px 0 0; padding: 18px 20px max(20px, env(safe-area-inset-bottom)); }
.h4-sheet.is-phone .h4-sheet-t { font-size: 20px; }
.h4-sheet.is-phone .h4-sheet-s, .h4-sheet.is-phone .h4-sheet-n { font-size: 15px; }
.h4-sheet.is-phone .h4-btn { height: 50px; width: 100%; justify-content: center; border-radius: 12px; font-size: 17px; }

/* ---- Settings › Holly (desktop pane) ---- */
.h4-settings { font-family: var(--h4-font); color: var(--h4-ink); font-size: 13px; max-width: 840px; }
.h4-settings .h4-title { margin: 0 0 2px; font-size: 22px; font-weight: 600; }
.h4-settings .h4-intro { margin: 0 0 18px; color: var(--h4-mute); }
.h4-settings .h4-sec { margin: 0 0 20px; }
.h4-settings h2.h4-sh, .on-narrow.h4-settings h2.h4-sh { margin: 0 0 6px 2px; font-size: 13px; font-weight: 400; color: var(--h4-mute); letter-spacing: 0; text-transform: none; }
.h4-settings .h4-group { background: var(--h4-card); border-radius: 10px; box-shadow: var(--h4-shadow); overflow: hidden; }
.h4-settings .h4-group + .h4-table, .h4-settings .h4-group + .h4-group { margin-top: 10px; }
.h4-settings .h4-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 9px 16px; box-sizing: border-box; background: none; border: 0;
  font: inherit; color: inherit; text-align: left; position: relative; }
.h4-settings .h4-row + .h4-row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--h4-sep); }
.h4-settings .h4-row.is-ask + .h4-row.is-ask::before { left: 46px; }
.h4-settings .h4-rm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.h4-settings .h4-r1 { font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
.h4-settings .h4-row.is-switch .h4-r1, .h4-settings .h4-row.is-ask .h4-r1, .h4-settings .h4-row.is-job .h4-r1 { font-weight: 600; }
.h4-settings .h4-r2, .h4-settings .h4-mute { color: var(--h4-mute); }
.h4-settings .h4-ric { color: var(--h4-mute); display: grid; place-items: center; width: 18px; }
.h4-settings .h4-row.is-job { cursor: pointer; }
.h4-settings .h4-row.is-job:hover { background: #FAFAF7; }
.h4-settings .h4-chev { width: 14px; height: 14px; color: var(--h4-mute); }
.h4-settings .h4-gf { margin: 6px 2px 0; color: var(--h4-mute); font-size: 12px; line-height: 1.45; }
.h4-settings .h4-foot.is-solo { margin: 4px 2px; color: var(--h4-mute); }
.h4-settings .h4-link { border: 0; background: none; padding: 0; color: var(--h4-link); font: inherit; cursor: pointer; }
.h4-settings .h4-table { background: var(--h4-card); border-radius: 10px; box-shadow: var(--h4-shadow); overflow: hidden; margin-top: 10px; }
.h4-settings .h4-tr { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) 80px 90px; gap: 12px; align-items: center; padding: 9px 16px; position: relative; }
.h4-settings .h4-tr + .h4-tr::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--h4-sep); }
.h4-settings .h4-tr.is-h { color: var(--h4-mute); padding-top: 8px; padding-bottom: 6px; }
.h4-settings .h4-tr.is-going { opacity: .55; }
.h4-settings .h4-tc-act { text-align: right; }
.h4-settings .h4-del { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: var(--h4-red); font: inherit; cursor: pointer; padding: 4px; border-radius: 6px; }
.h4-settings .h4-del:hover { background: #FBEDEC; }
.h4-settings .h4-del[disabled] { opacity: .4; cursor: default; }
.h4-settings .h4-sw-t { margin-right: -4px; }
.h4-settings .h4-sw { flex: none; position: relative; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 11px; background: #E3E3DC; cursor: pointer; transition: background .15s; }
.h4-settings .h4-sw i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.h4-settings .h4-sw.is-on { background: #34C759; }
.h4-settings .h4-sw.is-on i { transform: translateX(16px); }
.h4-settings .h4-sw[disabled] { opacity: .5; cursor: default; }
.h4-settings .h4-log { padding: 0 16px 12px; }
.h4-settings .h4-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.h4-settings .h4-log li { display: flex; justify-content: space-between; gap: 12px; }
.h4-settings .h4-lt { display: inline-flex; align-items: flex-start; gap: 8px; min-width: 0; }
.h4-settings .h4-lt .h4-i { margin-top: 2px; color: var(--h4-mute); }
.h4-settings .h4-log p { margin: 0 0 6px; }
#settings-pane-holly { padding-top: 4px; }

/* ---- Settings › Holly on the phone (phone4's layer): iOS Settings look ---- */
html.p4-on .h4-settings.is-phone { max-width: none; font-size: 17px; background: var(--h4-bg); min-height: 100%; }
html.p4-on .h4-settings.is-phone .h4-sec { margin: 0 16px 22px; }
html.p4-on .h4-settings.is-phone .h4-sh { margin: 0 0 7px 16px; font-size: 15px; }
html.p4-on .h4-settings.is-phone .h4-group { border-radius: 12px; box-shadow: none; }
html.p4-on .h4-settings.is-phone > .p4-body > .h4-group { margin: 0 16px; }
html.p4-on .h4-settings.is-phone > .p4-body > .h4-gf { margin: 7px 32px 24px; }
html.p4-on .h4-settings.is-phone .h4-row { min-height: 52px; padding: 11px 16px; }
html.p4-on .h4-settings.is-phone .h4-row + .h4-row::before { left: 16px; }
html.p4-on .h4-settings.is-phone .h4-row.is-ask + .h4-row.is-ask::before { left: 56px; }
html.p4-on .h4-settings.is-phone .h4-r1 { font-weight: 400 !important; }
html.p4-on .h4-settings.is-phone .h4-r2 { font-size: 15px; }
html.p4-on .h4-settings.is-phone .h4-ric { width: 26px; }
html.p4-on .h4-settings.is-phone .h4-ric .h4-i { width: 22px; height: 22px; }
html.p4-on .h4-settings.is-phone .h4-gf { font-size: 15px; margin: 7px 16px 0; }
html.p4-on .h4-settings.is-phone .h4-del { width: 44px; height: 44px; margin-right: -10px; }
html.p4-on .h4-settings.is-phone .h4-del .h4-i { width: 22px; height: 22px; }
html.p4-on .h4-settings.is-phone .h4-sw { width: 51px; height: 31px; border-radius: 16px; }
html.p4-on .h4-settings.is-phone .h4-sw i { width: 27px; height: 27px; }
html.p4-on .h4-settings.is-phone .h4-sw.is-on i { transform: translateX(20px); }
html.p4-on .h4-settings.is-phone .h4-mute { font-size: 17px; }
html.p4-on .h4-settings.is-phone .h4-chev { width: 18px; height: 18px; }
html.p4-on .h4-settings.is-phone .h4-foot.is-solo { margin: 4px 16px; font-size: 15px; }

/* Settings › Holly inside the owner's Settings page (ownernew.js) */
.on-narrow.h4-settings { max-width: none; }
