:root{
  --bg:#f5f5f1;
  --surface:#ffffff;
  --surface-2:#f9f9f6;
  --text:#191b18;
  --muted:#62675f;
  --line:#e3e5de;
  --line-strong:#d2d6cd;
  --accent:#1f5b45;
  --accent-soft:#e8f1ec;
  --danger:#a6453b;
  --danger-soft:#f9ebe8;
  --shadow:0 18px 45px rgba(26,30,25,.10);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.muted{color:var(--muted)}
.app-shell{display:grid;grid-template-columns:250px 1fr;min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;padding:24px 18px;display:flex;flex-direction:column;background:#20231f;color:#fff}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px 26px}
.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#edf3ef;color:var(--accent);font-weight:800}
.large-mark{width:48px;height:48px;margin-bottom:18px}
.brand-name{font-weight:780}.brand-sub{font-size:12px;color:#aeb4ab;margin-top:2px}
.nav{display:flex;flex-direction:column;gap:6px}
.nav-item{border:0;background:transparent;color:#c8cbc4;display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:11px;text-align:left}
.nav-item:hover{background:rgba(255,255,255,.06);color:#fff}
.nav-item.active{background:#f4f5f1;color:#1d201c}
.nav-icon{width:24px;text-align:center;font-size:17px}
.sidebar-bottom{margin-top:auto}
.principle-card{border:1px solid rgba(255,255,255,.11);background:rgba(255,255,255,.04);padding:14px;border-radius:14px;margin-bottom:10px}
.principle-card p{font-size:12px;line-height:1.5;color:#d7d9d3;margin:7px 0 0}
.eyebrow{font-size:10px;letter-spacing:.11em;font-weight:800;color:#939a90}
.eyebrow.dark{color:var(--muted);margin:0 0 7px}
.text-button{width:100%;border:0;background:transparent;color:#b8bcb4;text-align:left;padding:8px;font-size:12px}
.text-button:hover{color:#fff}
.main{min-width:0}
.topbar{height:74px;padding:0 30px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);background:rgba(245,245,241,.94);backdrop-filter:blur(12px);position:sticky;top:0;z-index:30}
.mobile-view-label{display:none;font-weight:760}
.mobile-menu-btn{display:none}
.topbar-search{position:relative;flex:1;max-width:660px;margin-right:auto}
.topbar-search input,.people-toolbar input{width:100%;border:1px solid var(--line-strong);background:#fff;border-radius:12px;padding:10px 13px;outline:none}
.topbar-search input:focus,.people-toolbar input:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:#90ad9f;box-shadow:0 0 0 3px rgba(31,91,69,.08)}
.search-results{position:absolute;top:48px;left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);overflow:hidden;z-index:90}
.search-results button{display:flex;flex-direction:column;gap:3px;width:100%;padding:11px 13px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left}
.search-results button:last-child{border-bottom:0}
.search-results button:hover{background:var(--surface-2)}
.search-results span,.search-empty{font-size:11px;color:var(--muted)}
.search-empty{padding:14px}
.button{border:1px solid transparent;border-radius:11px;padding:10px 14px;font-weight:680;font-size:13px}
.button.primary{background:var(--accent);color:#fff}
.button.secondary{background:#fff;color:var(--text);border-color:var(--line-strong)}
.button.small{padding:7px 10px;font-size:12px}
.view{display:none;max-width:1320px;margin:0 auto;padding:36px 32px 90px}
.view.active{display:block}
.page-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;margin-bottom:26px}
.page-title{font-size:34px;letter-spacing:-.045em;margin:0;font-weight:810}
.page-subtitle{margin:7px 0 0;color:var(--muted);font-size:14px;line-height:1.5}
.date-chip,.count-badge{font-size:11px;color:var(--muted);border:1px solid var(--line);background:#fff;padding:6px 9px;border-radius:999px}
.grid.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.stat-card,.card,.roadmap-card,.review-preview{background:#fff;border:1px solid var(--line);border-radius:var(--radius)}
.stat-card{padding:17px}
.stat-label{font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.stat-value{font-size:30px;font-weight:800;letter-spacing:-.04em;margin-top:7px}
.stat-foot{font-size:11px;color:var(--muted);margin-top:5px}
.today-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.card{overflow:hidden}
.card-head{padding:17px 19px 13px;display:flex;justify-content:space-between;gap:12px}
.card-title{font-weight:760}
.card-sub{font-size:11px;color:var(--muted);margin-top:3px}
.card-body{padding:0 19px 19px}
.action-list{border-top:1px solid var(--line)}
.action-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:11px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}
.action-row:last-child{border-bottom:0}
.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:800;flex:0 0 auto}
.avatar.large{width:52px;height:52px;font-size:16px}
.avatar.danger{background:var(--danger-soft);color:var(--danger)}
.row-title{font-size:13px;font-weight:720}
.row-meta{font-size:11px;color:var(--muted);margin-top:3px}
.row-actions{display:flex;gap:6px}
.possibility-grid{display:flex;flex-direction:column;gap:10px}
.possibility-card{border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--surface-2)}
.person-line{display:flex;align-items:center;gap:9px}
.person-line strong{display:block;font-size:13px}
.person-line span{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.possibility-action{font-size:14px;font-weight:720;line-height:1.4;margin-top:13px}
.why{font-size:11px;color:var(--muted);line-height:1.45;margin-top:7px}
.card-actions{display:flex;gap:8px;margin-top:9px}
.link-btn{border:0;background:transparent;color:var(--accent);font-weight:720;font-size:11px;padding:5px 0}
.empty{border:1px dashed var(--line-strong);background:var(--surface-2);border-radius:14px;padding:22px;text-align:center}
.empty-title{font-weight:740}
.empty p{font-size:12px;line-height:1.5;color:var(--muted);margin:6px auto 0;max-width:430px}
.people-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.people-toolbar input{max-width:620px}
.people-list{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.person-card{display:grid;grid-template-columns:52px minmax(180px,1fr) auto minmax(220px,.8fr);gap:14px;align-items:center;padding:14px 16px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left;color:inherit}
.person-card:last-child{border-bottom:0}
.person-card:hover{background:#fbfbf8}
.person-name{font-size:13px;font-weight:760}
.person-context{font-size:11px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.person-meta{display:flex;gap:6px;flex-wrap:wrap}
.stage-pill,.focus-pill{font-size:10px;padding:5px 7px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);color:#555a53}
.focus-pill{background:var(--accent-soft);color:var(--accent);border-color:#d5e4dc}
.person-next{font-size:11px;color:#4b5049;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.roadmap-card,.review-preview{padding:24px;max-width:820px}
.roadmap-card p,.review-preview li{color:var(--muted);font-size:13px;line-height:1.6}
.review-preview ol{margin:0;padding-left:20px;display:grid;gap:9px}
.modal-backdrop{position:fixed;inset:0;background:rgba(12,14,12,.44);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:100}
.modal{width:min(720px,100%);max-height:92vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}
.modal.wide{width:min(920px,100%)}
.modal-head{display:flex;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:rgba(255,255,255,.97);backdrop-filter:blur(10px);z-index:2}
.modal-title{font-size:19px;font-weight:790;letter-spacing:-.025em}
.modal-sub{font-size:11px;color:var(--muted);margin-top:4px}
.close-btn{border:0;background:var(--surface-2);width:32px;height:32px;border-radius:9px;font-size:18px;color:var(--muted)}
.modal-body{padding:21px 22px}
.modal-footer{display:flex;justify-content:flex-end;gap:8px;padding:15px 22px;border-top:1px solid var(--line);background:var(--surface-2);position:sticky;bottom:0;z-index:3}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.form-grid.nested{margin-top:0}
.field{display:flex;flex-direction:column;gap:6px}
.field.full{grid-column:1/-1}
.field label{font-size:11px;font-weight:720;color:#555a53}
.field input,.field select,.field textarea{width:100%;border:1px solid var(--line-strong);background:#fff;border-radius:10px;padding:10px 11px;outline:none;color:var(--text)}
.field textarea{resize:vertical}
.checkbox-line label{display:flex;align-items:center;gap:7px;font-weight:600}
.checkbox-line input{width:auto}
.capture-structured{border-top:1px solid var(--line);padding-top:13px}
.structure-title{font-size:11px;font-weight:760;margin-bottom:8px}
.structure-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.structure-card{display:flex!important;align-items:flex-start!important;gap:8px!important;border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:11px}
.structure-card input{width:auto;margin-top:2px}
.structure-card strong{display:block;font-size:11px}
.structure-card small{display:block;font-size:10px;color:var(--muted);margin-top:3px;line-height:1.35}
.conditional{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:12px}
.profile-hero{display:flex;align-items:flex-start;gap:14px;margin-bottom:18px}
.profile-name{font-size:24px;font-weight:810;letter-spacing:-.04em}
.profile-meta{font-size:11px;color:var(--muted);margin-top:4px}
.profile-actions{margin-left:auto;display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;min-width:0}
.profile-more{position:relative}
.profile-more>summary{list-style:none;display:inline-flex;align-items:center;cursor:pointer}
.profile-more>summary::-webkit-details-marker{display:none}
.profile-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:12;display:grid;gap:6px;min-width:180px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.profile-more-menu .button{width:100%;text-align:left}
.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.profile-panel{border:1px solid var(--line);border-radius:14px;padding:14px}
.profile-panel.full{grid-column:1/-1}
.profile-label{font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:9px}
.profile-value{font-size:13px;line-height:1.5}
.memory-item{display:flex;flex-direction:column;gap:2px;padding:9px 0;border-bottom:1px solid var(--line)}
.memory-item span{font-size:9px;text-transform:uppercase;color:var(--muted);font-weight:780}
.memory-item strong{font-size:12px;line-height:1.45}
.thread-item{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.thread-item strong{font-size:12px}
.thread-item p{font-size:11px;color:var(--muted);margin:3px 0 0}
.timeline{display:flex;flex-direction:column}
.timeline-item{display:grid;grid-template-columns:10px 1fr;gap:9px;padding:0 0 14px}
.timeline-dot{width:7px;height:7px;border-radius:50%;background:var(--accent);margin-top:6px}
.timeline-meta{font-size:10px;color:var(--muted)}
.timeline-note{font-size:12px;line-height:1.5;margin-top:3px}
.toast-root{position:fixed;right:18px;bottom:18px;z-index:200;display:flex;flex-direction:column;gap:8px}
.toast{background:#20231f;color:#fff;border-radius:11px;padding:11px 13px;font-size:12px;box-shadow:var(--shadow)}
.login-screen{min-height:100vh;display:grid;place-items:center;padding:22px}
.login-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:22px;padding:28px;box-shadow:var(--shadow)}
.login-card h1{font-size:29px;line-height:1.05;letter-spacing:-.04em;margin:8px 0 10px}
.login-card p{font-size:13px;line-height:1.5}
.login-form{display:grid;gap:8px;margin-top:20px}
.login-form label{font-size:11px;font-weight:720}
.login-form input{border:1px solid var(--line-strong);border-radius:10px;padding:11px}
.form-error{min-height:18px;font-size:11px;color:var(--danger)}
@media(max-width:980px){
  .today-grid{grid-template-columns:1fr}
  .person-card{grid-template-columns:52px 1fr auto}
  .person-next{display:none}
}
@media(max-width:840px){
  .app-shell{display:block}
  .sidebar{position:fixed;left:0;right:0;bottom:0;top:auto;height:calc(68px + env(safe-area-inset-bottom));padding:7px 8px calc(7px + env(safe-area-inset-bottom));z-index:60}
  .brand,.sidebar-bottom{display:none}
  .nav{height:68px;flex-direction:row;justify-content:space-around}
  .nav-item{flex:1;justify-content:center;flex-direction:column;gap:2px;padding:4px;min-height:44px;font-size:10px}
  .topbar{height:auto;min-height:64px;padding:10px 14px;flex-wrap:wrap;padding-top:max(10px,env(safe-area-inset-top))}
  .mobile-view-label{display:block;flex:1;min-width:0}
  .mobile-menu-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px}
  .topbar-search{display:block;order:3;flex:0 0 100%;max-width:none;margin:0}
  .topbar-search input{min-height:44px}
  .search-results{top:50px;max-height:min(56vh,420px);overflow:auto}
  .topbar .button{min-height:44px}
  .view{padding:20px 14px calc(100px + env(safe-area-inset-bottom))}
  .page-head{align-items:flex-start}
  .page-title{font-size:29px}
  .date-chip{display:none}
  .grid.stats{grid-template-columns:1fr 1fr}
  .form-grid,.profile-grid{grid-template-columns:1fr}
  .field.full,.profile-panel.full{grid-column:auto}
  .structure-grid{grid-template-columns:1fr}
  .person-card{grid-template-columns:44px 1fr;padding:13px}
  .person-card .avatar.large{width:44px;height:44px}
  .person-meta{display:none}
  .modal-backdrop{align-items:flex-end;padding:8px}
  .modal{max-height:95vh;border-radius:18px 18px 10px 10px}
  .profile-hero{flex-wrap:wrap}
  .profile-actions{margin-left:0;width:100%;justify-content:flex-start;overflow:visible}
  .profile-actions>.button,.profile-more>summary{min-height:44px}
  .profile-more-menu{left:0;right:auto;max-width:calc(100vw - 44px)}
  .link-btn{min-height:40px;display:inline-flex;align-items:center}
  .profile-meta,.timeline-meta,.context-item span,.conversation-state span,.conversation-state small,.field-hint{font-size:11px}
}

.boundary-conflicts{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.section-kicker{font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}
.conflict-row{display:grid;gap:3px;border:1px solid #efd8d3;background:#fcf1ef;border-radius:12px;padding:11px}
.conflict-row strong{font-size:12px;color:#8c3c34}
.conflict-row span{font-size:12px}
.conflict-row small{font-size:10px;color:var(--muted);line-height:1.45}
.grid.stats.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.card-head-actions{display:flex;align-items:center;gap:8px}
.completed-card{opacity:.64}
.done-badge{margin-left:auto;font-size:9px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--accent);background:var(--accent-soft);border:1px solid #d4e3da;border-radius:999px;padding:4px 7px}
.muted-action{color:var(--muted)}
.person-card-shell{position:relative;display:flex;align-items:center;border-bottom:1px solid var(--line);background:#fff}
.person-card-shell:last-child{border-bottom:0}
.person-card-shell .person-card{flex:1;border-bottom:0}
.restore-inline{margin-right:14px}
.memory-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.memory-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.sensitive-details{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.sensitive-details summary{cursor:pointer;font-size:11px;font-weight:720;color:var(--muted)}
.thread-item small{display:block;font-size:9px;color:var(--muted);margin-top:3px}
.conversation-state{display:grid;gap:4px;border:1px solid var(--line);background:var(--surface-2);border-radius:11px;padding:11px}
.conversation-state.waiting{background:#fff8ea;border-color:#eeddbd}
.conversation-state strong{font-size:12px}
.conversation-state span,.conversation-state small{font-size:10px;line-height:1.4;color:var(--muted)}
.danger-zone{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.danger-zone span{font-size:10px;color:var(--muted)}
.danger-link{color:var(--danger)}
.warning-box{padding:11px 12px;background:#fff5e8;border:1px solid #efdfc2;border-radius:11px;color:#755225;font-size:11px;line-height:1.5;margin-bottom:12px}
.import-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.import-counts>div{border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:12px}
.import-counts strong{display:block;font-size:21px}
.import-counts span{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.import-warning{font-size:11px;line-height:1.5;margin-top:12px}
@media(max-width:840px){
  .grid.stats.four{grid-template-columns:1fr 1fr}
  .person-card-shell{align-items:stretch}
  .restore-inline{margin:auto 10px auto 0}
  .import-counts{grid-template-columns:1fr 1fr}
}
.may-see-card{margin-bottom:16px}
.may-see-strip{display:flex;gap:9px;overflow-x:auto;padding-bottom:2px}
.may-see-person{display:flex;align-items:center;gap:9px;min-width:220px;border:1px solid var(--line);background:var(--surface-2);border-radius:13px;padding:11px;text-align:left;color:inherit}
.may-see-person:hover{background:#fff;border-color:var(--line-strong)}
.may-see-person strong{display:block;font-size:12px}
.may-see-person span{display:block;font-size:10px;color:var(--muted);margin-top:3px;line-height:1.35}
.context-item{padding:8px 0;border-bottom:1px solid var(--line)}
.context-item:last-of-type{border-bottom:0}
.context-item strong{display:block;font-size:12px}
.context-item span{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.day-chips{display:flex;gap:6px;flex-wrap:wrap}
.day-chip{display:flex!important;align-items:center!important;gap:5px!important;border:1px solid var(--line);background:var(--surface-2);border-radius:999px;padding:6px 8px;font-size:10px!important;font-weight:700!important}
.day-chip input{width:auto}
.waiting-resolution{background:#fff8ea;border:1px solid #eeddbd;border-radius:11px;padding:10px}
.page-head-actions{display:flex;align-items:center;gap:8px}
.field-hint{font-size:10px;color:var(--muted);line-height:1.4}
.plans-section{margin-bottom:26px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:12px}
.section-head h2{font-size:18px;letter-spacing:-.025em;margin:0}
.section-head p{font-size:11px;color:var(--muted);margin:4px 0 0}
.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.plan-card{border:1px solid var(--line);background:#fff;border-radius:16px;padding:16px;text-align:left;color:inherit}
.plan-card:hover{border-color:var(--line-strong);box-shadow:0 8px 24px rgba(25,28,24,.05)}
.plan-top{display:flex;align-items:flex-start;justify-content:space-between;gap:9px}
.plan-type{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.plan-title{font-size:16px;font-weight:770;letter-spacing:-.02em;margin-top:5px}
.plan-date{font-size:11px;color:var(--muted);margin-top:7px}
.plan-note{font-size:11px;line-height:1.45;color:#50544e;margin-top:11px;min-height:32px}
.plan-footer{display:flex;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding-top:11px;margin-top:12px;font-size:9px;color:var(--muted)}
.circle-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.circle-card{border:1px solid var(--line);background:#fff;border-radius:14px;padding:14px}
.circle-card strong{display:block;font-size:13px}
.circle-card span{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.circle-card p{font-size:11px;line-height:1.45;color:#555a53;margin:9px 0 0}
.person-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:240px;overflow:auto}
.person-check{display:flex!important;align-items:flex-start!important;gap:8px!important;border:1px solid var(--line);background:var(--surface-2);border-radius:11px;padding:9px}
.person-check input{width:auto;margin-top:2px}
.person-check strong{display:block;font-size:11px}
.person-check small{display:block;font-size:9px;color:var(--muted);margin-top:2px;line-height:1.3}
.plan-detail-meta{display:flex;gap:6px;flex-wrap:wrap}
.plan-detail-meta span{font-size:10px;border:1px solid var(--line);background:var(--surface-2);border-radius:999px;padding:5px 7px;color:#555a53}
.plan-detail-note{font-size:12px;line-height:1.5;color:var(--muted)}
.occurrence-card{border:1px solid var(--line);border-radius:13px;margin-top:9px;overflow:hidden}
.occurrence-card summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 12px;background:var(--surface-2);cursor:pointer;font-size:11px;font-weight:720}
.occurrence-body{padding:11px 12px}
.occurrence-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.participant-row{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:12px;align-items:center;border-top:1px solid var(--line);padding:10px 0}
.person-line.compact .avatar{width:31px;height:31px;font-size:10px}
.participant-controls{display:flex;gap:6px}
.participant-controls select{border:1px solid var(--line-strong);background:#fff;border-radius:8px;padding:7px;font-size:10px}
.section-title{font-size:12px;font-weight:770;margin:16px 0 8px}
@media(max-width:980px){
  .plan-grid,.circle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .page-head-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .plan-grid,.circle-grid,.person-check-grid{grid-template-columns:1fr}
  .participant-row{grid-template-columns:1fr}
  .participant-controls{flex-direction:column}
  .participant-controls select{width:100%}
}
.today-opportunity-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.today-opportunity-grid .may-see-card{margin-bottom:0}
.today-plan-list{display:flex;flex-direction:column;gap:7px}
.today-plan-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:1px solid var(--line);background:var(--surface-2);border-radius:11px;padding:10px 11px;text-align:left;color:inherit}
.today-plan-row:hover{background:#fff;border-color:var(--line-strong)}
.today-plan-row strong{display:block;font-size:11px}
.today-plan-row span{display:block;font-size:9px;color:var(--muted);margin-top:3px}
.today-plan-row small{font-size:9px;color:var(--muted);max-width:42%;text-align:right}
.review-form{max-width:900px;display:grid;gap:10px}
.review-question-card{display:grid;grid-template-columns:34px 1fr;gap:12px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px}
.review-question-card>span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:800}
.review-question-card label{display:block;font-size:13px;font-weight:730;margin-bottom:7px}
.review-question-card textarea{width:100%;border:1px solid var(--line-strong);border-radius:10px;padding:10px;resize:vertical;outline:none}
.review-question-card textarea:focus{border-color:#90ad9f;box-shadow:0 0 0 3px rgba(31,91,69,.08)}
.review-question-card select{width:100%;min-width:0;border:1px solid var(--line-strong);border-radius:10px;padding:10px;background:#fff;color:var(--text);outline:none}
.review-question-card select:focus{border-color:#90ad9f;box-shadow:0 0 0 3px rgba(31,91,69,.08)}
.review-question-card small{display:block;color:var(--muted);font-size:9px;line-height:1.4;margin-top:6px}
.actions-card{border-color:#cfded6;background:#fbfdfb}
.review-submit{display:flex;justify-content:flex-end;margin-top:4px}
.last-review{max-width:900px;margin-top:26px}
.last-review-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.last-review-grid>div{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px}
.last-review-grid strong{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.last-review-grid p{font-size:11px;line-height:1.5;margin:7px 0 0}
.tag-row{display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:860px){
  .today-opportunity-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .today-plan-row{align-items:flex-start;flex-direction:column}
  .today-plan-row small{max-width:none;text-align:left}
  .last-review-grid{grid-template-columns:1fr}
}
.button.danger-button,.danger-button{background:var(--danger-soft);color:var(--danger);border:1px solid #efcbc5}
.merge-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.merge-summary>div{border:1px solid var(--line);background:var(--surface-2);border-radius:11px;padding:11px}
.merge-summary strong{display:block;font-size:19px}
.merge-summary span{display:block;font-size:9px;color:var(--muted);margin-top:2px}
.warning-box ul{margin:7px 0 0;padding-left:18px}
.warning-box li{margin:3px 0}
.captured-badge{font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--accent);background:var(--accent-soft);border:1px solid #d5e4dc;border-radius:999px;padding:4px 6px}
.occurrence-summary-state{display:flex;align-items:center;gap:6px}
.person-line.compact small{display:block;font-size:9px;color:var(--muted);margin-top:3px}
.post-person-list{display:grid;gap:8px;margin-top:14px}
.post-person-row{border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:11px}
.post-person-controls{display:grid;grid-template-columns:150px auto minmax(160px,1fr);gap:8px;align-items:center;margin-top:9px}
.post-person-controls select,.post-person-controls input[data-person-note]{border:1px solid var(--line-strong);background:#fff;border-radius:8px;padding:8px;font-size:10px}
.post-person-controls label{display:flex;align-items:center;gap:6px;font-size:10px!important}
.post-person-controls label input{width:auto}
@media(max-width:760px){
  .merge-summary{grid-template-columns:1fr 1fr}
  .post-person-controls{grid-template-columns:1fr}
}
.plan-conflict{margin-top:9px;padding:8px 9px;border-radius:9px;background:#fff5e8;border:1px solid #efdfc2;color:#755225;font-size:9px;line-height:1.4}
.availability-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.availability-card{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px}
.availability-card strong{display:block;font-size:12px;margin-top:3px}
.availability-card small{display:block;font-size:9px;color:var(--muted);margin-top:3px}
.availability-kind{font-size:8px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--accent)}
.exception-badge{font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#775a22;background:#fff5df;border:1px solid #ead7a7;border-radius:999px;padding:4px 6px}
@media(max-width:760px){
  .availability-grid{grid-template-columns:1fr}
}
.field-warning{color:var(--danger)!important;font-weight:700}
.warning-box small{display:block;margin-top:5px;color:inherit;opacity:.8}
.may-see-person.rich-brief{align-items:flex-start;min-width:310px}
.may-see-copy{min-width:0}
.may-see-copy small{display:block;font-size:9px;line-height:1.35;color:#555a53;margin-top:4px}
.may-see-copy em{display:block;font-size:9px;line-height:1.35;color:var(--accent);font-style:normal;font-weight:700;margin-top:6px}
.pickup-options{display:grid;gap:9px}
.pickup-option{border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:12px}
.pickup-option span{display:block;font-size:8px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--accent)}
.pickup-option strong{display:block;font-size:12px;line-height:1.5;margin-top:4px}
.pickup-option small{display:block;font-size:9px;line-height:1.4;color:var(--muted);margin-top:5px}
.pickup-reminder{margin-top:12px}
.contact-item,.moment-item{padding:8px 0;border-bottom:1px solid var(--line)}
.contact-item:last-of-type,.moment-item:last-of-type{border-bottom:0}
.contact-item span,.moment-item span{display:block;font-size:8px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.contact-item strong,.moment-item strong{display:block;font-size:11px;line-height:1.4;margin-top:2px}
.contact-item small,.moment-item small{display:block;font-size:9px;line-height:1.4;color:var(--muted);margin-top:2px}
.connection-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.connection-item:last-of-type{border-bottom:0}
.connection-item span{display:block;font-size:8px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.connection-item strong{display:block;font-size:11px;line-height:1.4;margin-top:2px}
.connection-item small{display:block;font-size:9px;line-height:1.4;color:var(--muted);margin-top:2px}
.mini-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.pairing-warning{margin-top:8px}
.suggestion-block{border:1px solid var(--line);background:var(--surface-2);border-radius:13px;padding:11px}
.suggestion-empty{font-size:9px;color:var(--muted);padding:4px 0}
.plan-suggestion{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--line)}
.plan-suggestion:first-of-type{border-top:0}
.plan-suggestion strong{display:block;font-size:11px}
.plan-suggestion span{display:block;font-size:9px;color:var(--muted);line-height:1.4;margin-top:2px}
@supports (height:100dvh){
  .modal{max-height:calc(100dvh - 16px)}
}
@media(max-width:760px){
  .modal-backdrop{padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  .modal{max-height:calc(100dvh - 8px)}
  .modal-footer{padding-bottom:calc(15px + env(safe-area-inset-bottom));flex-wrap:wrap}
  .modal-footer .button{min-height:44px}
  .close-btn{min-width:44px;min-height:44px}
  button,.person-check,.day-chip{touch-action:manipulation}
  .may-see-person.rich-brief{min-width:min(310px,86vw)}
}

/* Audit fixes: keep the existing visual identity while making daily scanning and touch use more comfortable. */
.today-action-first{margin-bottom:16px}
.today-stats{margin-top:16px}
.saved-memory-library{max-width:900px;margin-top:26px}
.saved-memory-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.saved-memory-grid>div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}
.saved-memory-grid h3{font-size:13px;margin:0 0 9px}
.review-history-item{border-top:1px solid var(--line);padding:9px 0}
.review-history-item:first-of-type{border-top:0}
.review-history-item summary{cursor:pointer;font-size:12px;font-weight:720;color:var(--text);min-height:36px;display:flex;align-items:center}
.review-history-item .last-review-grid{margin-top:9px}
.saved-memory-copy{font-size:13px;line-height:1.55;color:#444941;margin:8px 0 0}
.private-memory-item{padding:9px 0;border-bottom:1px solid var(--line)}
.private-memory-item:last-child{border-bottom:0}
.private-memory-item span{display:block;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.private-memory-item strong{display:block;font-size:13px;line-height:1.45;margin-top:2px}
.private-memory-item small{display:block;font-size:12px;line-height:1.45;color:var(--muted);margin-top:3px}

/* Everyday metadata stays secondary, but not microscopically small. */
.search-results span,.search-empty,.date-chip,.count-badge,.stat-foot,.card-sub,.row-meta,.person-line span,.why,
.person-context,.modal-sub,.profile-meta,.profile-label,.thread-item p,.timeline-meta,.section-kicker,.conflict-row small,
.sensitive-details summary,.thread-item small,.conversation-state span,.conversation-state small,.danger-zone span,
.import-counts span,.may-see-person span,.context-item span,.field-hint,.section-head p,.plan-date,.plan-footer,
.circle-card span,.person-check small,.today-plan-row span,.today-plan-row small,.review-question-card small,
.last-review-grid strong,.merge-summary span,.person-line.compact small,.availability-card small,.plan-conflict,
.may-see-copy small,.may-see-copy em,.pickup-option small,.contact-item small,.moment-item small,.connection-item small,
.suggestion-empty,.plan-suggestion span{font-size:12px;line-height:1.4}
.memory-item span,.plan-type,.captured-badge,.availability-kind,.exception-badge,.pickup-option span,
.contact-item span,.moment-item span,.connection-item span{font-size:11px;line-height:1.35}
.field label,.structure-title,.structure-card strong{font-size:12px}
.memory-item strong,.thread-item strong,.may-see-person strong,.person-check strong,.today-plan-row strong,
.contact-item strong,.moment-item strong,.connection-item strong,.plan-suggestion strong{font-size:13px}
.link-btn{font-size:12px;min-height:36px;display:inline-flex;align-items:center}

@media(max-width:840px){
  .nav-item{font-size:12px}
  .link-btn{min-height:44px}
  .field input:not([type="checkbox"]):not([type="radio"]),.field select,.people-toolbar input{min-height:44px}
  .saved-memory-grid{grid-template-columns:1fr}
  .today-stats{grid-template-columns:1fr 1fr}
  .profile-more-menu .button{min-height:44px}
}
@media(max-width:520px){
  .grid.stats.four.today-stats{grid-template-columns:1fr 1fr}
  .stat-card{padding:14px}
  .stat-value{font-size:25px}
}

.mobile-action-menu{display:grid;gap:10px}
.mobile-action-menu .button{width:100%;justify-content:center;min-height:46px}

/* Keep saved content readable within the existing responsive cards and dialogs. */
.modal-open,.modal-open body{overflow:hidden}
.modal{overscroll-behavior:contain;scroll-padding-block:130px 90px}
.modal-head>div,.profile-hero>div,.profile-panel,.thread-item>div,.timeline-item>div,
.person-card,.person-card>div,.action-row>div,.review-question-card>div{min-width:0}
.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.profile-panel,.modal-title,.modal-sub,.profile-name,.profile-meta,.person-name,.row-title,
.timeline-note,.contact-item,.thread-item,.saved-memory-copy,.last-review-grid,.plan-card{overflow-wrap:anywhere}
.thread-item>.link-btn,.close-btn{flex-shrink:0}
.timeline-note,.saved-memory-copy,.profile-value,.last-review-grid p{white-space:pre-wrap}
.search-results{max-height:min(60vh,480px);overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
:where(button,input,select,textarea,summary,a):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.sidebar :focus-visible{outline-color:#b8dfc9}
.toast-root{pointer-events:none;max-width:calc(100vw - 36px)}
.login-card .eyebrow{color:var(--muted)}
@media(max-width:840px){
  .profile-grid{grid-template-columns:minmax(0,1fr)}
  .profile-actions{position:relative}
  .profile-more{position:static}
  .profile-more-menu{left:0;right:0;max-width:100%;min-width:0}
  .checkbox-line label{min-height:44px}
  .close-btn{min-width:44px;min-height:44px}
  .topbar .button{min-height:44px}
}

@media(min-width:841px) and (max-width:920px){
  .page-head{flex-direction:column;align-items:flex-start}
  .page-head-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
}

/* Infrastructure redesign — 2026-09-23 */
:root{
  --bg:#f7f7f4;
  --surface:#ffffff;
  --surface-2:#f6f7f4;
  --surface-3:#eef2ed;
  --text:#181b18;
  --muted:#686d67;
  --muted-2:#858a84;
  --line:#e7e9e4;
  --line-strong:#d9ddd6;
  --accent:#1d5b43;
  --accent-hover:#174b38;
  --accent-soft:#edf4f0;
  --danger:#a1483e;
  --danger-soft:#fbefed;
  --shadow:0 18px 50px rgba(23,28,24,.09);
  --shadow-soft:0 8px 24px rgba(23,28,24,.05);
  --radius:14px;
  --radius-sm:9px;
}
html{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{background:var(--bg)}
.app-shell{grid-template-columns:224px 1fr}
.sidebar{padding:22px 14px;background:#1f231f;border-right:1px solid rgba(255,255,255,.04)}
.brand{padding:0 8px 24px;gap:11px}
.brand-mark{width:34px;height:34px;border-radius:9px;font-size:14px}
.brand-name{font-size:14px;font-weight:700;letter-spacing:-.01em}
.brand-sub{font-size:11px;color:#9ea59c}
.nav{gap:3px}
.nav-item{border-radius:8px;padding:10px 10px;color:#bfc4bd;font-size:13px;font-weight:560}
.nav-item.active{background:#f3f4f0;color:#1c201c;box-shadow:0 1px 0 rgba(255,255,255,.5) inset}
.nav-icon{width:20px;height:20px;display:grid;place-items:center}
.nav-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-item[data-view="people"] .nav-icon svg path:nth-child(1),
.nav-item[data-view="people"] .nav-icon svg path:nth-child(2),
.nav-item[data-view="people"] .nav-icon svg path:nth-child(3){fill:none}
.sidebar-bottom .principle-card{border:0;background:rgba(255,255,255,.045);border-radius:10px;padding:12px}
.principle-card p{font-size:11px;line-height:1.45;color:#c9cec7}
.topbar{height:68px;padding:0 28px;gap:10px;background:rgba(247,247,244,.9);border-color:var(--line);backdrop-filter:blur(18px)}
.topbar-search{max-width:560px}
.topbar-search input,.people-toolbar input{border-color:transparent;background:#eeefeb;border-radius:9px;padding:10px 12px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.025)}
.topbar-search input:focus,.people-toolbar input:focus{background:#fff;border-color:#a5b9ad;box-shadow:0 0 0 3px rgba(29,91,67,.08)}
.button{border-radius:9px;padding:9px 13px;font-weight:650;font-size:13px;transition:background .15s ease,border-color .15s ease,transform .08s ease}
.button:active{transform:translateY(1px)}
.button.primary{background:var(--accent)}
.button.primary:hover{background:var(--accent-hover)}
.button.secondary{background:#fff;border-color:var(--line-strong)}
.button.tertiary{background:transparent;border-color:transparent;color:#4f554e}
.button.tertiary:hover{background:#eceee9;color:var(--text)}
.button.small{padding:7px 9px;font-size:12px}
.view{max-width:1180px;padding:32px 34px 90px}
.page-head{margin-bottom:24px}
.compact-page-head{align-items:center;margin-bottom:22px}
.page-title{font-size:28px;line-height:1.08;letter-spacing:-.035em;font-weight:720}
.page-subtitle{margin-top:6px;font-size:13px;line-height:1.45;color:var(--muted)}
.eyebrow{font-size:10px;letter-spacing:.13em;font-weight:750}
.date-chip,.count-badge{background:transparent;border-color:var(--line);font-size:11px;padding:5px 8px}
.section-kicker{font-size:10px;letter-spacing:.11em;color:var(--muted-2);margin-bottom:5px}
.section-head h2,.workspace-section-head h2,.record-section-head h2,.review-guide-head h2{font-size:17px;line-height:1.2;font-weight:680;letter-spacing:-.015em}
.link-btn{font-weight:650;color:var(--accent)}
.quiet-empty{padding:28px 4px;color:var(--muted);display:grid;gap:4px}
.quiet-empty strong{font-size:14px;color:#4d534d;font-weight:620}
.quiet-empty span{font-size:12px}

/* Today: command centre rather than card feed */
.today-page-head{margin-bottom:18px}
.workspace-section{padding:20px 0;border-top:1px solid var(--line)}
.workspace-section:first-of-type{border-top:0}
.workspace-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:13px}
.workspace-section-head h2{margin:0}
.workspace-section-head p{font-size:12px;color:var(--muted);margin:4px 0 0}
.section-tools{display:flex;align-items:center;gap:8px}
.needs-you-section{padding-top:0}
.refined-action-list{border-top:0}
.refined-action-list .action-row{padding:12px 0}
.refined-possibilities{gap:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.refined-possibilities .possibility-card{border:0;border-radius:0;background:#fff;padding:14px 16px;border-top:1px solid var(--line)}
.refined-possibilities .possibility-card:first-child{border-top:0}
.refined-possibilities .possibility-action{margin-top:8px;font-size:14px}
.refined-possibilities .why{margin-top:4px}
.refined-possibilities .card-actions{margin-top:7px}
.today-context-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:22px}
.context-column{min-width:0}
.context-column-head{display:flex;flex-direction:column;gap:3px;margin-bottom:9px}
.context-column-head strong{font-size:13px;font-weight:680}
.context-column-head span{font-size:12px;color:var(--muted);line-height:1.35}
.may-see-strip{gap:7px;padding-bottom:4px}
.may-see-person.rich-brief{min-width:280px;border-radius:10px;background:#fff;padding:11px;border-color:var(--line)}
.today-plan-list{gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.today-plan-row{border:0;border-radius:0;background:#fff;border-top:1px solid var(--line);padding:11px 12px}
.today-plan-row:first-child{border-top:0}
.today-plan-row:hover{background:var(--surface-2)}
.momentum-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.momentum-block{min-width:0}
.subsection-title{font-size:12px;font-weight:700;color:#4b514b;margin-bottom:8px}
.momentum-block .possibility-card{border-radius:10px;padding:12px}
.operational-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);margin-top:8px;padding-top:18px}
.operational-summary>div{display:flex;align-items:baseline;gap:7px;border-left:1px solid var(--line);padding:0 16px}
.operational-summary>div:first-child{border-left:0;padding-left:0}
.operational-summary strong{font-size:18px;font-weight:700;letter-spacing:-.025em}
.operational-summary span{font-size:11px;color:var(--muted)}
.empty{border:0;background:transparent;border-radius:0;padding:18px 4px}
.empty-title{font-size:13px;font-weight:630}
.empty p{font-size:12px;margin-top:4px}

/* People: information-dense relationship browser */
.infrastructure-toolbar{margin-bottom:10px}
.people-search-wrap{flex:1;max-width:620px}
.infrastructure-list{border-radius:12px;border-color:var(--line);box-shadow:0 1px 0 rgba(0,0,0,.015)}
.person-card-shell{border-color:var(--line)}
.person-card{grid-template-columns:44px minmax(190px,1fr) auto minmax(180px,.72fr);gap:12px;padding:12px 14px}
.person-card .avatar.large{width:40px;height:40px;font-size:13px}
.person-name{font-size:14px;font-weight:670}
.person-context{font-size:12px;margin-top:2px}
.person-next{font-size:12px;color:#5d635d}
.stage-pill,.focus-pill,.status-badge{display:inline-flex;align-items:center;width:max-content;font-size:10px;line-height:1;padding:5px 7px;border-radius:999px;border:1px solid var(--line);background:#f7f8f5;color:#565c56;font-weight:610}
.status-confirmed,.status-accepted,.status-attended{background:var(--accent-soft);border-color:#d8e7df;color:var(--accent)}
.status-cancelled,.status-declined{background:var(--danger-soft);border-color:#efd9d5;color:var(--danger)}
.status-tentative,.status-draft,.status-unknown{background:#f4f4f1;color:#676c66}

/* Plans: primary workspace + tucked-away planning infrastructure */
.plans-command-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.segmented-control{display:inline-flex;gap:2px;padding:3px;background:#eceee9;border-radius:9px}
.segmented-control button{border:0;background:transparent;border-radius:7px;padding:7px 10px;color:#666c65;font-size:12px;font-weight:620}
.segmented-control button.active{background:#fff;color:var(--text);box-shadow:0 1px 3px rgba(20,24,20,.08)}
.segmented-control span{color:var(--muted-2);margin-left:3px;font-size:10px}
.planning-tools-bar{display:flex;align-items:center;gap:3px;flex-wrap:wrap;justify-content:flex-end}
.primary-plans-section{margin-bottom:16px}
.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.infrastructure-plan-card{border-radius:12px;padding:15px;background:#fff;border-color:var(--line);box-shadow:none}
.infrastructure-plan-card:hover{box-shadow:var(--shadow-soft);transform:translateY(-1px)}
.plan-title{font-size:15px;font-weight:690}
.plan-type{font-size:10px}
.plan-date{font-size:12px;margin-top:6px}
.plan-note{font-size:12px;min-height:0;margin-top:9px;color:#555b54}
.plan-footer{font-size:11px;margin-top:11px;padding-top:9px}
.planning-library{border-top:1px solid var(--line);margin-top:24px;padding-top:4px}
.planning-library>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:14px 0;font-size:13px;font-weight:660;color:#555b54}
.planning-library>summary::-webkit-details-marker{display:none}
.planning-library>summary span{font-size:11px;color:var(--muted)}
.planning-library-body{padding:3px 0 0}
.planning-library .plans-section{padding:18px 0;border-top:1px solid var(--line);margin:0}
.circle-card,.availability-card{border-radius:10px;border-color:var(--line);box-shadow:none}

/* Modal and form architecture */
.modal-backdrop{background:rgba(15,18,15,.38);backdrop-filter:blur(2px);padding:22px}
.modal{border-radius:14px;border-color:#dfe2dc;box-shadow:0 24px 80px rgba(17,21,18,.16)}
.modal.wide{width:min(860px,100%)}
.modal-head{padding:18px 20px;background:rgba(255,255,255,.98)}
.modal-title{font-size:20px;font-weight:700;letter-spacing:-.025em}
.modal-sub{font-size:12px;margin-top:3px}
.close-btn{border-radius:8px;background:#f3f4f1}
.modal-body{padding:20px}
.modal-footer{padding:13px 20px;background:#fbfbf9}
.field{gap:5px}
.field label{font-size:12px;color:#535953;font-weight:620}
.field input,.field select,.field textarea{border-radius:8px;border-color:#d9ddd6;padding:10px 11px;background:#fff}
.field input:hover,.field select:hover,.field textarea:hover{border-color:#c7ccc4}
.field-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.form-advanced{grid-column:1/-1;border-top:1px solid var(--line);margin-top:18px;padding-top:6px}
.form-advanced>summary{cursor:pointer;list-style:none;padding:10px 2px;font-size:12px;font-weight:670;color:#525851}
.form-advanced>summary::-webkit-details-marker{display:none}
.form-advanced>summary::after{content:"+";float:right;color:var(--muted)}
.form-advanced[open]>summary::after{content:"–"}
.advanced-grid{padding-top:8px}
.plan-form-body{padding-bottom:10px}
.people-picker-field{margin-top:2px}
.person-check-grid{max-height:220px;gap:5px}
.person-check{border-radius:9px;padding:9px;background:#fafbf8}
.person-check:has(input:checked){background:var(--accent-soft);border-color:#cfe0d7}

/* Full-height record inspectors on desktop */
.record-back-label{font-size:10px;line-height:1;text-transform:uppercase;letter-spacing:.11em;color:var(--muted-2);font-weight:750;margin-bottom:5px}
@media(min-width:841px){
  .modal-backdrop:has(.record-detail){justify-content:flex-end;align-items:stretch;padding:0}
  .modal:has(.record-detail){width:min(760px,52vw);height:100vh;max-height:100vh;border-radius:0;border-top:0;border-right:0;border-bottom:0;box-shadow:-20px 0 60px rgba(18,22,19,.12)}
  .record-detail{min-height:100%;display:flex;flex-direction:column}
  .record-detail .record-body{flex:1}
  .record-detail .modal-head{padding:22px 24px}
  .record-detail .modal-body{padding:22px 24px 34px}
  .record-detail .modal-footer{padding:13px 24px}
}

/* Person detail: identity, relationship summary, then the record */
.profile-hero{gap:12px;margin-bottom:20px;align-items:center}
.profile-identity{min-width:0}
.profile-name{font-size:22px;font-weight:720}
.profile-meta{font-size:12px}
.profile-actions{gap:4px}
.relationship-summary{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 0 24px}
.relationship-next{padding:17px 0}
.relationship-next .profile-value strong{font-size:15px;line-height:1.45;font-weight:670}
.relationship-next .why{display:block;margin-top:5px}
.relationship-facts{display:grid;grid-template-columns:1fr 1fr}
.relationship-row{padding:13px 0;border-top:1px solid var(--line)}
.relationship-row:nth-child(odd){padding-right:16px}
.relationship-row:nth-child(even){padding-left:16px;border-left:1px solid var(--line)}
.relationship-row:last-child:nth-child(odd){grid-column:1/-1;padding-right:0}
.profile-label{font-size:10px;letter-spacing:.09em;margin-bottom:6px;color:#7b817a}
.profile-value{font-size:13px;line-height:1.45}
.record-section-head{display:flex;justify-content:space-between;align-items:end;margin:0 0 8px;padding-top:2px}
.record-section-head h2{margin:0}
.administrative-profile-grid{gap:0;border-top:1px solid var(--line)}
.administrative-profile-grid .profile-panel{border:0;border-radius:0;padding:16px 0;border-bottom:1px solid var(--line)}
.administrative-profile-grid .profile-panel:nth-child(odd):not(.full){padding-right:18px}
.administrative-profile-grid .profile-panel:nth-child(even):not(.full){padding-left:18px;border-left:1px solid var(--line)}
.administrative-profile-grid .profile-panel.full{padding-left:0;padding-right:0}
.history-panel{margin-top:4px}
.memory-item,.thread-item,.contact-item,.moment-item,.connection-item{padding:8px 0}
.timeline-item{padding-bottom:13px}
.conversation-state{border-radius:8px;background:#fafbf8}
.profile-more-menu{border-radius:10px;padding:6px;gap:2px}

/* Plan detail: readable status rows rather than database controls */
.record-status-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-bottom:14px}
.record-status-line>span:not(.status-badge){padding-left:7px;border-left:1px solid var(--line)}
.record-status-line>span:nth-child(2){border-left:0;padding-left:0}
.plan-detail-note{font-size:13px;color:#505650;margin:0 0 22px}
.infrastructure-occurrence{border:0;border-top:1px solid var(--line);border-radius:0;margin-top:0}
.infrastructure-occurrence:last-child{border-bottom:1px solid var(--line)}
.infrastructure-occurrence summary{background:transparent;padding:13px 0;font-size:12px}
.infrastructure-occurrence summary>span:first-child{display:flex;align-items:baseline;gap:7px}
.infrastructure-occurrence summary small{font-size:11px;color:var(--muted);font-weight:500}
.infrastructure-occurrence .occurrence-body{padding:0 0 15px}
.occurrence-actions{margin:0 0 8px;gap:4px}
.row-overflow{position:relative;margin-left:auto}
.row-overflow>summary{list-style:none;display:grid;place-items:center;width:32px;height:32px;border-radius:7px;cursor:pointer;color:var(--muted);padding:0}
.row-overflow>summary::-webkit-details-marker{display:none}
.row-overflow>summary:hover{background:#f1f2ef}
.row-overflow>div{position:absolute;right:0;top:36px;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:var(--shadow-soft);padding:7px;z-index:4;min-width:150px}
.participants-section{margin-top:10px}
.participants-section .subsection-title{display:flex;gap:6px}
.participants-section .subsection-title span{color:var(--muted);font-weight:500}
.compact-participant-row{grid-template-columns:minmax(160px,1fr) auto;padding:10px 0;gap:14px}
.compact-participant-row:first-of-type{border-top:0}
.state-controls{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.state-controls label{display:grid;gap:3px}
.state-controls label>span{font-size:9px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted-2);font-weight:680}
.state-controls select{min-width:122px;border-radius:7px;font-size:11px;padding:7px 8px;background:#fafbf8}
.record-footer{justify-content:space-between}

/* Review: one guided flow, not a survey-card wall */
.review-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:28px;align-items:start}
.guided-review{max-width:none;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.review-guide-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:20px 20px 15px}
.review-guide-head h2{margin:0}
.review-time{font-size:11px;color:var(--muted);white-space:nowrap}
.review-prompt-list{border-top:1px solid var(--line)}
.review-question-card{grid-template-columns:30px 1fr;gap:12px;border:0;border-radius:0;padding:15px 20px;background:#fff;border-top:1px solid var(--line)}
.review-question-card:first-child{border-top:0}
.review-question-card>span{width:24px;height:24px;background:transparent;border:1px solid var(--line);font-size:10px;color:#6c726b}
.review-question-card label{font-size:13px;font-weight:650;margin-bottom:7px}
.review-question-card textarea{border-radius:8px;background:#fafbf9;min-height:54px}
.review-decision-block{display:grid;grid-template-columns:30px 1fr;gap:12px;padding:17px 20px;border-top:1px solid #d8e5dd;background:#f8fbf9}
.review-decision-icon{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:800}
.review-decision-block label{display:block;font-size:13px;font-weight:660;margin-bottom:7px}
.review-decision-block textarea{width:100%;border:1px solid var(--line-strong);border-radius:8px;padding:10px;background:#fff}
.review-decision-block small{display:block;font-size:11px;color:var(--muted);margin-top:6px;line-height:1.4}
.review-settings{border-top:1px solid var(--line);padding:0 20px}
.review-settings>summary{cursor:pointer;list-style:none;padding:14px 0;font-size:12px;font-weight:650;color:#555b54}
.review-settings>summary::-webkit-details-marker{display:none}
.review-settings>summary::after{content:"+";float:right;color:var(--muted)}
.review-settings[open]>summary::after{content:"–"}
.review-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 0 16px}
.review-submit{padding:14px 20px;border-top:1px solid var(--line);margin:0;background:#fbfbf9}
.last-review{margin:0;max-width:none}
.last-review .last-review-grid{grid-template-columns:1fr;gap:0;border-top:1px solid var(--line)}
.last-review-grid>div{border:0;border-radius:0;border-bottom:1px solid var(--line);padding:11px 0;background:transparent}
.last-review-grid strong{font-size:10px}
.saved-memory-library{max-width:none;margin-top:34px}
.saved-memory-grid>div{border-radius:10px}

/* Make destructive controls quiet until deliberately opened */
.danger-zone{margin-top:22px;padding-top:14px}
.danger-zone .danger-link{font-weight:600}

/* Responsive infrastructure */
@media(max-width:980px){
  .momentum-grid{grid-template-columns:1fr 1fr}
  .today-context-grid{grid-template-columns:1fr}
  .review-layout{grid-template-columns:1fr}
  .last-review{margin-top:4px}
}
@media(max-width:840px){
  .app-shell{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  .sidebar{height:calc(66px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#1f231f}
  .nav{height:54px}
  .nav-item{font-size:10px;gap:3px;border-radius:9px}
  .nav-icon{width:18px;height:18px}
  .nav-icon svg{width:16px;height:16px}
  .topbar{min-height:58px;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));gap:8px}
  .mobile-view-label{font-size:15px;font-weight:680}
  .topbar-search input{min-height:42px}
  .view{padding:18px 14px calc(84px + env(safe-area-inset-bottom))}
  .compact-page-head{align-items:flex-start;gap:12px;margin-bottom:18px}
  .page-title{font-size:25px}
  .page-subtitle{font-size:12px}
  .page-head-actions{width:auto}
  .today-page-head .page-head-actions{margin-left:auto}
  .workspace-section{padding:17px 0}
  .workspace-section-head{margin-bottom:10px}
  .refined-possibilities{border-left:0;border-right:0;border-radius:0;margin-left:-14px;margin-right:-14px}
  .refined-possibilities .possibility-card{padding:13px 14px}
  .today-context-grid{gap:20px}
  .momentum-grid{grid-template-columns:1fr}
  .operational-summary{grid-template-columns:1fr 1fr;row-gap:14px}
  .operational-summary>div{border-left:0;padding:0}
  .person-card{grid-template-columns:40px 1fr;padding:11px 10px}
  .person-card .avatar.large{width:36px;height:36px}
  .people-toolbar{gap:6px}
  .people-search-wrap{min-width:0}
  .plans-command-bar{align-items:flex-start;flex-direction:column;gap:10px}
  .planning-tools-bar{width:100%;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
  .planning-tools-bar .button{white-space:nowrap}
  .plan-grid{grid-template-columns:1fr}
  .modal-backdrop{align-items:stretch;padding:0}
  .modal,.modal.wide,.modal:has(.record-detail){width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;box-shadow:none}
  .modal-head{padding:calc(14px + env(safe-area-inset-top)) 16px 14px}
  .modal-body{padding:16px}
  .modal-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:#fff}
  .record-detail{min-height:100%;display:flex;flex-direction:column}
  .record-detail .record-body{flex:1}
  .record-footer{position:sticky;bottom:0}
  .profile-hero{align-items:flex-start}
  .profile-actions{width:100%;display:flex;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
  .profile-actions>.button,.profile-more>summary{white-space:nowrap}
  .relationship-facts{grid-template-columns:1fr}
  .relationship-row,.relationship-row:nth-child(odd),.relationship-row:nth-child(even),.relationship-row:last-child:nth-child(odd){grid-column:auto;padding:12px 0;border-left:0}
  .administrative-profile-grid .profile-panel,.administrative-profile-grid .profile-panel:nth-child(odd):not(.full),.administrative-profile-grid .profile-panel:nth-child(even):not(.full){padding:14px 0;border-left:0}
  .compact-participant-row{grid-template-columns:1fr;gap:8px}
  .state-controls{grid-template-columns:1fr 1fr;width:100%}
  .state-controls select{width:100%;min-width:0}
  .form-grid{grid-template-columns:1fr}
  .field.full{grid-column:auto}
  .review-layout{gap:22px}
  .guided-review{border-left:0;border-right:0;border-radius:0;margin-left:-14px;margin-right:-14px}
  .review-guide-head,.review-question-card,.review-decision-block{padding-left:14px;padding-right:14px}
  .review-settings{padding-left:14px;padding-right:14px}
  .review-settings-grid{grid-template-columns:1fr}
  .review-submit{padding-left:14px;padding-right:14px}
}
@media(max-width:520px){
  .page-head-actions .button:not(.primary):not(.tertiary){display:none}
  .segmented-control{width:100%}
  .segmented-control button{flex:1}
  .operational-summary strong{font-size:17px}
  .state-controls{grid-template-columns:1fr}
}
/* Long-content containment for record inspectors */
.relationship-summary,.relationship-facts,.relationship-row,.administrative-profile-grid,.administrative-profile-grid .profile-panel{min-width:0;max-width:100%}
.relationship-row{overflow:hidden}
.relationship-row .profile-value,.relationship-row .profile-label{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.record-detail,.record-body{min-width:0;max-width:100%}
/* Accessibility polish from browser QA */
:root{--muted-2:#666c66}
#mergePeopleBtn{min-height:36px;min-width:120px}
@media(max-width:840px){
  .compact-page-head .page-head-actions{width:100%;justify-content:flex-start;gap:8px}
  .today-page-head .page-head-actions{width:auto;margin-left:auto}
  #mergePeopleBtn{min-height:44px}
}
#addPlanBtn,#addPersonFromPeople{min-height:44px}
.profile-label{color:#666c66}
/* Capture: fast note first, structure second */
.capture-note textarea{min-height:118px;font-size:14px;line-height:1.5}
.capture-flags{display:flex;gap:8px;flex-wrap:wrap}
.compact-check{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fafbf8;border-radius:8px;padding:8px 10px;font-size:11px;color:#555b54;font-weight:600}
.compact-check:has(input:checked){border-color:#cfe0d7;background:var(--accent-soft);color:var(--accent)}
.compact-check input{margin:0}
.capture-structured{margin-top:2px}
.capture-structured .structure-title{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#666c66;margin-bottom:8px}
.capture-structured .structure-grid{gap:6px}
.capture-structured .structure-card{border-radius:9px;padding:9px 10px;background:#fafbf8;border-color:var(--line)}
.capture-structured .structure-card:has(input:checked){background:var(--accent-soft);border-color:#cfe0d7}
.capture-memory{margin-top:4px}
@media(max-width:840px){
  .capture-flags{display:grid;grid-template-columns:1fr}
  .compact-check{min-height:42px}
  .capture-note textarea{min-height:132px}
}
/* Mobile header must size to both its action row and search row.
   The redesign's desktop height:68px was overriding the earlier mobile height:auto,
   causing the wrapped search row to paint over page content. */
@media(max-width:840px){
  .topbar{
    height:auto;
    min-height:0;
    align-content:center;
    padding:8px 12px 10px;
    padding-top:max(8px,env(safe-area-inset-top));
  }
}
