:root { color-scheme: light; --canvas:#f4f6f0; --ink:#192c23; --muted:#4d6256; --line:#dce4d9; --green:#214638; --acid:#e8f68c; --white:#fff; font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif; }
* { box-sizing:border-box; }
body { margin:0; background:var(--canvas); color:var(--ink); }
button, textarea, select { font:inherit; color:inherit; }
button { cursor:pointer; }
button:disabled { cursor:default; }
a { color:inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible { outline:3px solid #537357; outline-offset:3px; }
h1,h2,h3,p { margin:0; }
.wrap { max-width:1440px; margin:0 auto; padding-inline:clamp(16px, 4vw, 60px); }
.skip { position:absolute; top:-100px; padding:12px; background:white; z-index:4; }
.skip:focus { top:8px; left:8px; }
.top { background:#fff; border-bottom:1px solid var(--line); }
.top-inner { display:flex; align-items:center; justify-content:space-between; min-height:74px; gap:18px; }
.brand { border:0; background:none; display:flex; align-items:center; gap:11px; padding:0; font-weight:650; font-size:1.12rem; white-space:nowrap; }
.brand-mark { background:var(--acid); color:var(--green); border-radius:11px; display:grid; place-items:center; width:40px; height:40px; }
.brand-sub { font-weight:600; }
.top nav { display:flex; gap:9px; align-items:center; }
.top nav button,.sign-out { background:transparent; border:0; border-radius:8px; padding:9px 12px; font-weight:650; font-size:.9rem; text-decoration:none; color:var(--muted); white-space:nowrap; }
.top nav [aria-current],.top nav button:hover,.sign-out:hover { background:#edf2eb; color:var(--ink); }
.layout { display:grid; grid-template-columns:223px minmax(0,1fr); gap:32px; padding-top:24px; padding-bottom:52px; }
.sidebar { min-width:0; }
.book { display:flex; gap:12px; align-items:flex-start; padding:14px 12px 24px; border-bottom:1px solid var(--line); }
.book svg { color:#426451; margin-top:3px; flex-shrink:0; }
.book > div { display:grid; gap:3px; }
.book strong { font-size:1.25rem; font-weight:600; }
.book div > span:last-child,.aside-foot { color:var(--muted); font-size:.875rem; }
.eyebrow { text-transform:uppercase; font-size:.875rem; letter-spacing:.07em; font-weight:550; }
.book .eyebrow { font-size:.75rem; color:var(--muted); }
.chapter-nav { display:grid; gap:4px; margin-top:16px; }
.chapter-nav button { display:flex; align-items:center; text-align:left; gap:11px; color:var(--muted); font-size:.95rem; padding:10px 12px; min-height:44px; background:none; border:0; border-radius:8px; }
.chapter-nav svg { flex-shrink:0; }
.chapter-nav [aria-current],.chapter-nav button:hover { background:#e4eddf; color:var(--ink); }
.chapter-nav [aria-current] { font-weight:600; }
.chapter-picker { display:none; }
.aside-foot { display:flex; gap:10px; margin:20px 12px 0; line-height:1.45; }
.aside-foot svg { flex-shrink:0; margin-top:2px; }
.hero { position:relative; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:clamp(22px,3vw,34px); background:#183a2d; color:#f6f8ec; border-radius:21px; overflow:hidden; }
.hero .eyebrow { color:#deed9f; }
.hero h1 { font-size:clamp(2rem,4vw,3rem); font-weight:500; letter-spacing:-.035em; line-height:1.12; margin:9px 0 10px; }
.hero p:not(.eyebrow) { line-height:1.5; color:#e3ece0; max-width:56ch; }
.reading { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:14px; font-size:.94rem; }
.reading svg,.dot { color:var(--acid); }
.hero-icon { width:104px; height:104px; flex:0 0 104px; display:grid; place-items:center; border-radius:50%; background:#254c3d; border:1px solid #436351; color:var(--acid); }
.hero-icon svg { width:52px; height:52px; }
.meeting-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin:14px 0 24px; background:var(--line); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.meeting-strip > div { background:#fff; padding:11px 15px; }
.meeting-strip span,.schedule-dates span { display:block; color:var(--muted); font-size:.875rem; }
.meeting-strip time,.schedule-dates time { display:block; font-weight:600; margin-bottom:3px; }
.workspace { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(235px,1fr); align-items:start; gap:18px; }
.card { border:1px solid var(--line); background:var(--white); border-radius:15px; min-width:0; }
.panel-heading { padding:19px 21px 16px; display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.section-icon { display:grid; place-items:center; flex:0 0 37px; height:37px; background:#e9f0e7; border-radius:9px; color:var(--green); }
.panel-heading h2 { font-size:1.12rem; font-weight:600; letter-spacing:-.015em; }
.board-jump { display:none; font-size:.875rem; text-underline-offset:3px; }
.panel-heading p,.hint,.share p,.empty p,.schedule-card p { color:var(--muted); line-height:1.45; margin-top:4px; }
.panel-heading p,.share p,.schedule-card p { font-size:.875rem; }
.phases { display:flex; flex-wrap:wrap; gap:5px; padding:0 18px 12px; border-bottom:1px solid var(--line); }
.phases button { display:inline-flex; gap:5px; align-items:center; min-height:44px; padding:6px 9px; border-radius:7px; font-size:.875rem; font-weight:550; background:none; border:0; color:var(--muted); }
.phases button:hover,.phases [aria-current] { background:#e9f0e7; color:var(--ink); }
.entry,.board,.loading { padding:20px; }
.entry h3 { font-size:1.25rem; font-weight:600; letter-spacing:-.015em; }
fieldset { margin:17px 0 0; padding:0; border:0; min-width:0; }
.field { display:grid; gap:7px; margin-bottom:16px; font-size:1rem; font-weight:500; line-height:1.4; }
textarea, select { display:block; width:100%; min-height:43px; border:1px solid #c9d6ca; border-radius:8px; padding:9px 11px; background:#fbfcfa; font-size:1rem; font-weight:400; line-height:1.45; }
textarea { resize:vertical; }
textarea::placeholder { color:#586d60; }
select { padding-right:30px; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23214638' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; }
.privacy { display:flex; align-items:center; gap:8px; margin-top:10px; color:var(--muted); font-size:.875rem; }
.privacy svg { flex-shrink:0; }
.share,.baseline { background:#f1f5ef; padding:13px; border-radius:9px; margin-top:17px; }
.baseline { line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.share .field { margin-bottom:5px; }
.share small { font-size:.875rem; font-weight:500; margin-left:5px; color:var(--muted); }
.form-footer { margin-top:17px; display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.form-footer span { color:var(--muted); font-size:.875rem; }
.primary { padding:11px 17px; border:0; border-radius:8px; background:var(--green); color:#fff; font-weight:700; }
.primary:hover { background:#15362a; }
.primary:disabled { background:#e6ede5; color:#425b4a; }
.board { border-top:1px solid var(--line); }
.board ul { padding:0; margin:0; list-style:none; }
.board li { padding:13px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.board li div { display:flex; flex-wrap:wrap; gap:5px 10px; align-items:baseline; justify-content:space-between; }
.board li span,.board time { color:var(--muted); font-size:.875rem; }
.board li p { margin:6px 0; white-space:pre-wrap; line-height:1.5; }
.empty { border:1px dashed #c9d6ca; border-radius:10px; padding:18px 12px; text-align:center; }
.empty p { font-size:.9375rem; margin:0; }
.text-button { background:none; border:0; padding:0; color:var(--green); font-weight:600; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.copy { display:inline-flex; gap:7px; align-items:center; margin-top:10px; font-size:.875rem; }
.schedule-layout { display:block; max-width:1090px; }
.schedule-heading { margin-bottom:22px; }
.schedule-heading h1 { font-size:clamp(2rem,4vw,3rem); font-weight:500; letter-spacing:-.035em; margin:5px 0 8px; }
.schedule-heading p { color:var(--muted); line-height:1.5; }
.next-meeting { display:flex; align-items:center; gap:16px; padding:18px 20px; background:#e4eddf; border:1px solid #cedccd; border-radius:14px; }
.next-meeting > svg { flex:none; color:var(--green); }
.next-meeting .eyebrow { color:var(--muted); }
.next-meeting h2 { font-size:1.18rem; font-weight:600; margin:3px 0 4px; }
.secondary,.calendar-link { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; border:1px solid #b4c8b7; border-radius:8px; background:#fff; color:var(--green); padding:8px 13px; font-size:.9rem; font-weight:600; text-decoration:none; }
.secondary:hover,.calendar-link:hover { background:#f0f5ef; }
.next-meeting .secondary { margin-left:auto; }
.calendar-link { margin-top:14px; }
.schedule-section-title { margin:26px 0 10px; font-size:1.14rem; font-weight:600; }
.schedule-list { display:grid; gap:10px; }
.schedule-card { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:center; gap:10px; padding:17px; }
.schedule-card .text-button { font-size:1.05rem; }
.schedule-dates { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0; padding:0; list-style:none; }
.schedule-dates li { padding:7px 9px; border-radius:7px; }
.schedule-dates .next-date { background:#edf3e9; }
@media (max-width:1050px) {
  .layout { grid-template-columns:180px minmax(0,1fr); gap:18px; }
  .workspace { grid-template-columns:minmax(0,1.55fr) minmax(210px,1fr); gap:12px; }
  .panel-heading,.entry,.board { padding-inline:14px; }
}
@media (max-width:850px) {
  .workspace { grid-template-columns:1fr; }
  .board-jump { display:inline-flex; margin-left:auto; align-items:center; min-height:44px; }
}
@media (max-width:650px) {
  .top-inner { min-height:64px; flex-wrap:wrap; gap:6px; padding-block:9px; }
  .top nav { gap:3px; }
  .top nav button,.sign-out { padding-inline:7px; }
  .layout { display:block; padding-top:10px; }
  .book,.aside-foot,.chapter-nav { display:none; }
  .chapter-picker { display:flex; align-items:center; gap:12px; color:var(--muted); margin-bottom:12px; }
  .chapter-picker select { color:var(--ink); min-width:0; }
  .hero { gap:10px; }
  .hero-icon { width:64px; height:64px; flex-basis:64px; }
  .hero-icon svg { width:36px; height:36px; }
  .meeting-strip > div { padding:10px 8px; }
  .meeting-strip span { line-height:1.25; }
  .schedule-card { grid-template-columns:1fr; gap:12px; }
  .next-meeting { flex-wrap:wrap; gap:10px; }
  .next-meeting > div { flex:1 1 75%; }
  .next-meeting .secondary { margin-left:34px; }
  .schedule-layout { padding-top:22px; }
}

.sleep-views { display:flex; gap:6px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.sleep-views button { background:transparent; border:0; border-bottom:2px solid transparent; min-height:46px; padding:10px 14px; color:var(--muted); font-weight:500; }
.sleep-views [aria-current] { border-bottom-color:var(--green); color:var(--ink); font-weight:600; }
.protocol-intro { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.protocol-intro h2 { font-size:1.35rem; font-weight:600; }
.protocol-intro p { color:var(--muted); line-height:1.5; margin-top:5px; }
.protocol-intro > span { white-space:nowrap; color:var(--muted); font-size:.875rem; }
.protocol-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:22px; align-items:start; }
.protocol-list { display:grid; gap:3px; }
.protocol-list button { display:flex; align-items:center; gap:9px; border:0; border-radius:8px; text-align:left; font-size:.9rem; min-height:48px; line-height:1.4; background:transparent; padding:10px; }
.protocol-list button > span:nth-child(2) { flex:1; }
.protocol-list button small { display:block; color:var(--muted); font-size:.8rem; }
.protocol-list button:hover,.protocol-list [aria-current] { background:#e4eddf; }
.protocol-list [aria-current] { font-weight:600; }
.protocol-number { color:var(--muted); font-size:.85rem; min-width:1.2em; font-variant-numeric:tabular-nums; }
.protocol-list svg { flex:none; color:var(--green); }
.protocol-picker { display:none; }
.protocol-heading { margin-bottom:17px; }
.protocol-heading .eyebrow { color:var(--muted); font-size:.8rem; }
.protocol-heading h3 { font-size:1.6rem; font-weight:500; letter-spacing:-.025em; margin:6px 0; }
.protocol-heading > p:last-child { line-height:1.5; color:var(--muted); }
.protocol-form,.protocol-community { padding:22px; }
.protocol-form-heading,.community-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.protocol-detail h4 { font-size:1.08rem; font-weight:600; line-height:1.4; }
.protocol-form-heading > span { font-size:.875rem; color:var(--muted); }
.share-checkin,.compare-members label { display:flex; align-items:flex-start; gap:10px; font-size:.9375rem; line-height:1.5; cursor:pointer; }
.share-checkin input,.compare-members input { flex:none; width:19px; height:19px; accent-color:var(--green); margin:2px 0; }
.sharing-hint { font-size:.875rem; margin-left:29px; }
.protocol-community { margin-top:18px; scroll-margin-top:20px; }
.protocol-community h4 { display:flex; align-items:center; gap:8px; }
.community-heading .text-button { min-height:44px; font-size:.875rem; }
.compare-members { display:flex; flex-wrap:wrap; gap:8px 18px; margin:12px 0; }
.compare-members label { align-items:center; min-height:44px; }
.comparison-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:8px; margin-top:16px; }
.comparison { width:100%; border-collapse:collapse; font-size:.9375rem; line-height:1.5; }
.comparison caption { text-align:left; padding:12px; color:var(--muted); font-size:.875rem; }
.comparison th,.comparison td { padding:12px; border-top:1px solid var(--line); border-right:1px solid var(--line); text-align:left; vertical-align:top; min-width:190px; max-width:320px; white-space:pre-wrap; overflow-wrap:anywhere; }
.comparison th { font-weight:600; background:#f2f6ef; }
.comparison th:first-child { min-width:130px; }
.shared-checkins { margin-top:15px; }
.shared-checkins details { border-top:1px solid var(--line); }
.shared-checkins summary { cursor:pointer; padding:13px 0; font-size:.875rem; line-height:1.5; }
.shared-checkins dl { margin:0 0 12px; }
.shared-checkins dt { color:var(--muted); font-size:.875rem; }
.shared-checkins dd { margin:4px 0 14px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; }
.protocol-comments { padding:0; list-style:none; margin:16px 0; }
.protocol-comments li { padding:15px 0; border-top:1px solid var(--line); }
.protocol-comments li > div { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px; font-size:.875rem; }
.protocol-comments strong { font-weight:600; }
.protocol-comments time { color:var(--muted); }
.protocol-comments li > p { white-space:pre-wrap; overflow-wrap:anywhere; margin-top:8px; line-height:1.5; }
.protocol-comments .text-button { font-size:.875rem; min-height:44px; }
.comment-form { margin-top:18px; }
.reload-entry { display:block; margin-top:15px; min-height:44px; }
@media (max-width:1150px) {
  .protocol-layout { grid-template-columns:1fr; }
  .protocol-list { display:none; }
  .protocol-picker { display:grid; }
}
@media (max-width:650px) {
  .protocol-intro { align-items:flex-start; flex-direction:column; gap:8px; }
  .protocol-form,.protocol-community { padding:17px; }
  .protocol-form .form-footer { position:sticky; bottom:0; padding-block:12px; margin-bottom:-10px; background:#fff; }
  .protocol-detail h4 { font-size:1rem; }
  .sharing-hint { margin-left:0; }
}

.auth-page { min-height:100dvh; display:grid; place-items:center; padding:clamp(18px,5vw,54px); background:#edf2e9; }
.auth-card { width:min(100%,480px); background:#fff; padding:clamp(25px,5vw,42px); border:1px solid var(--line); border-radius:22px; box-shadow:0 20px 65px #1933260d; }
.auth-brand { display:flex; align-items:center; gap:12px; font-weight:600; margin-bottom:35px; }
.auth-card .eyebrow { color:var(--muted); }
.auth-card h1 { font-size:clamp(2rem,5vw,2.65rem); line-height:1.12; letter-spacing:-.035em; font-weight:500; margin:11px 0 14px; }
.auth-intro { line-height:1.6; color:var(--muted); margin-bottom:26px; overflow-wrap:anywhere; }
.auth-input { font:inherit; font-size:1rem; line-height:1.5; color:var(--ink); width:100%; min-height:47px; padding:10px 12px; background:#fbfcfa; border:1px solid #c9d6ca; border-radius:8px; }
.auth-input:focus-visible { outline:3px solid #537357; outline-offset:3px; }
.auth-submit { min-height:48px; width:100%; font-weight:600; }
.code-input { font-size:1.4rem; letter-spacing:.2em; }
.auth-notice { font-size:.9rem; color:var(--muted); line-height:1.5; margin-top:13px; }
.auth-notice:empty { display:none; }
.auth-help { font-size:.875rem; line-height:1.5; color:var(--muted); margin-top:22px; }
.auth-actions { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-top:14px; }
.auth-actions button { min-height:44px; font-size:.875rem; }
.auth-actions button:disabled { color:var(--muted); text-decoration:none; }
.auth-actions + .auth-help { margin-top:8px; }
.session-error { padding:12px 20px; background:#fff4e7; color:#5c3e1c; }
.member-dialog { width:min(580px,calc(100% - 30px)); max-height:85dvh; border:1px solid var(--line); border-radius:17px; padding:25px; color:var(--ink); }
.member-dialog::backdrop { background:#132c2477; }
.member-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.member-dialog h2 { font-size:1.5rem; font-weight:500; }
.icon-button { border:0; background:transparent; min-width:44px; min-height:44px; display:grid; place-items:center; border-radius:8px; }
.icon-button:hover { background:#edf2eb; }
.member-add { margin-top:20px; }
.member-list { padding:0; list-style:none; margin:20px 0 0; }
.member-list li { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; border-top:1px solid var(--line); padding:14px 0; font-size:.9rem; }
.member-list li > div:first-child { min-width:0; }
.member-list strong { font-weight:600; display:block; }
.member-list span { color:var(--muted); overflow-wrap:anywhere; }
.member-list .text-button { min-height:44px; }
.member-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
.member-reset { display:flex; flex-wrap:wrap; align-items:center; gap:8px; width:100%; }
.member-reset .auth-input { flex:1 1 220px; width:auto; min-height:44px; }
.member-reset .primary { min-height:44px; }
