/* Desktop companion shares the mobile state and components. */
.tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 18px;border:1px solid #bfc6bb;border-radius:9px;font-weight:500;text-decoration:none}
.mobile-entry{display:none!important}
.desktop-layout .shell{max-width:1380px;padding:36px 32px 48px}
.desktop-layout .page-head .intro{max-width:620px}
.desktop-layout .mobile-entry{display:inline-flex!important}
.desktop-layout [data-tab="overlay"],.desktop-layout .compare-toggle,.desktop-layout .before-column,.desktop-layout #rules-panel .column-head,.desktop-layout #companion-tip{display:none!important}
.desktop-layout #rules-panel .pair{display:block}
.desktop-layout #rules-panel .preview-width{width:100%;max-width:none}
.desktop-layout .phone{position:relative;display:grid;grid-template-columns:180px minmax(0,1fr);grid-template-rows:1fr auto;min-height:700px;height:auto;padding:0;border-radius:20px;overflow:hidden;font-size:15px;box-shadow:0 24px 70px -45px #10243199}
.desktop-layout .phone .companion-scroll{grid-column:2;grid-row:1;min-width:0;overflow:visible;margin:0;padding:34px 36px 32px}
.desktop-layout .phone .appbrand{display:none}
.desktop-layout .phone .app-title{margin:0 0 28px;min-height:60px}
.desktop-layout .phone .app-title h3{font-size:32px}
.desktop-layout .phone .bottomnav{grid-column:1;grid-row:1 / span 2;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:9px;margin:0;padding:34px 16px;border-top:0;border-right:1px solid var(--rule);box-shadow:none;background:#0c202c}
.desktop-layout .phone .bottomnav:before{content:'◆ TENET';font:500 15px 'IBM Plex Mono',monospace;letter-spacing:.16em;color:var(--gold);padding:8px 10px 36px}
.desktop-layout .phone .bottomnav button{width:100%;flex-direction:row;justify-content:flex-start;gap:13px;min-height:50px;padding:12px;font-size:14px}
.desktop-layout .phone .bottomnav .symbol{width:20px;height:20px}
.desktop-layout .phone .phone-live{grid-column:2;grid-row:2;max-height:none;padding:0 36px 16px;font-size:13px}
.desktop-layout .phone .phone-live:empty{padding:0}
.desktop-layout .phone #companion-content{min-height:0}
.desktop-layout [data-companion="home"] #companion-content{display:grid;grid-template-columns:minmax(240px,.85fr) minmax(280px,1.15fr);gap:20px 28px;align-items:start}
.desktop-layout .phone .week-summary{grid-column:1;grid-row:1 / span 2;padding:20px 22px 5px}
.desktop-layout .phone .attention-card{grid-column:1;grid-row:3;margin-top:0;padding:18px 20px}
.desktop-layout [data-companion="home"] .section-label{grid-column:2;grid-row:1;margin:0;min-height:30px}
.desktop-layout [data-companion="home"] .event-list{grid-column:2;grid-row:2 / span 2}
.desktop-layout .phone .summary-row{min-height:93px;gap:20px}
.desktop-layout .phone .summary-count{font-size:32px;min-width:32px}
.desktop-layout .phone .summary-label strong,.desktop-layout .phone .event-copy strong,.desktop-layout .phone .attention-card strong{font-size:15px}
.desktop-layout .phone .summary-label small,.desktop-layout .phone .event-copy small,.desktop-layout .phone .attention-card small{font-size:13px}
.desktop-layout .phone .event-row{min-height:89px;padding:20px}
.desktop-layout .phone .event-time{font-size:12px;gap:9px}
.desktop-layout .phone .rule-list{display:grid;grid-template-columns:minmax(230px,.9fr) minmax(280px,1.1fr);grid-template-rows:repeat(4,auto);gap:12px 26px;align-items:start}
.desktop-layout .phone .rule{display:contents}
.desktop-layout .phone .rule-trigger{grid-column:1;border:1px solid var(--rule);border-radius:12px;padding:18px 15px;min-height:89px;background:var(--navy)}
.desktop-layout .phone .rule.open .rule-trigger{border-color:var(--gold);background:var(--raised)}
.desktop-layout .phone .rule-content{grid-column:2;grid-row:1 / span 4;border:1px solid var(--rule);border-radius:14px;background:var(--navy);padding:24px}
.desktop-layout .phone .rule-content:before{content:attr(data-rule-label);display:block;font-size:24px;font-weight:500;margin-bottom:22px}
.desktop-layout .phone .rule-divider{display:none}
.desktop-layout .phone .short-detail{font-size:15px;line-height:1.8}
.desktop-layout .phone .cap-value{font-size:38px}
.desktop-layout .phone .stepper{margin:22px 0 16px;grid-template-columns:48px 1fr 48px}
.desktop-layout .phone .stepper button{width:48px;height:48px}
.desktop-layout .phone .control-label,.desktop-layout .phone .equity,.desktop-layout .phone .timing,.desktop-layout .phone .details-actions button{font-size:13px}
.desktop-layout .phone .details-actions{margin-top:25px}
.desktop-layout .phone #manual-rules,.desktop-layout .phone #draft-rule-card{max-width:720px;margin-top:24px}
.desktop-layout .phone #companion-content:has(> .pattern-card){display:grid;grid-template-columns:minmax(280px,1.1fr) minmax(240px,.9fr);gap:24px;align-items:start}
.desktop-layout .phone .pattern-card{padding:24px}
.desktop-layout .phone .pattern-card+.pattern-card{margin-top:0}
.desktop-layout .phone #companion-content:has(> .event-detail){display:grid;grid-template-columns:minmax(300px,1.2fr) minmax(250px,.8fr);gap:20px 28px;align-items:start}
.desktop-layout .phone #companion-content:has(> .event-detail)>.back-action{grid-column:1 / -1;justify-self:start}
.desktop-layout .phone .event-detail{padding:24px}
.desktop-layout .phone #event-note-form{margin:0}
.desktop-layout .phone #event-note-form label{margin-top:0}
.desktop-layout .phone .event-detail dl>div{grid-template-columns:104px 1fr}
.desktop-layout .phone #companion-content:has(#new-rule-form),.desktop-layout .phone #companion-content:has(#pattern-draft-form),.desktop-layout .phone #companion-content:has(.evidence-table){max-width:720px}
.desktop-layout .phone .builder-choices{gap:12px}
.desktop-layout .phone .builder-fields{grid-template-columns:1fr 1fr;gap:22px}
.desktop-layout .phone .builder-fields>.builder-field:first-child{grid-column:1 / -1}
.desktop-layout .phone .cp-primary{max-width:360px;min-height:48px;font-size:14px}
.desktop-layout .phone .builder-review{padding:24px}
.desktop-layout .phone .builder-review dl>div{grid-template-columns:105px 1fr}
.desktop-layout .phone .builder-actions{justify-content:flex-start}
.desktop-layout .phone .pattern-card .cp-primary{max-width:none}
.desktop-layout .annotation{margin-top:24px}
@media(max-width:1050px){
 .desktop-layout .phone{grid-template-columns:154px minmax(0,1fr)}
 .desktop-layout .phone .companion-scroll{padding:26px 24px}
 .desktop-layout [data-companion="home"] #companion-content,.desktop-layout .phone #companion-content:has(> .pattern-card),.desktop-layout .phone #companion-content:has(> .event-detail){display:block}
 .desktop-layout .phone .attention-card{margin-top:18px}
 .desktop-layout [data-companion="home"] .section-label{margin-top:26px}
 .desktop-layout .phone .pattern-card+.pattern-card{margin-top:18px}
 .desktop-layout .phone #event-note-form{margin-top:24px}
 .desktop-layout .phone .rule-list{display:block}
 .desktop-layout .phone .rule{display:block;border:0;background:transparent;margin-bottom:14px}
 .desktop-layout .phone .rule-content{margin-top:12px;padding:22px}
 .desktop-layout .phone .rule-content:before{display:none}
}
@media(max-width:620px){
 .desktop-layout .shell{padding:26px 14px 36px}
 .desktop-layout .phone{display:flex;min-height:0;height:auto;border-radius:16px}
 .desktop-layout .phone .bottomnav{order:-1;flex-direction:row;border-right:0;border-bottom:1px solid var(--rule);padding:12px 8px;gap:0}
 .desktop-layout .phone .bottomnav:before{display:none}
 .desktop-layout .phone .bottomnav button{width:25%;flex-direction:column;padding:7px 4px;gap:6px;font-size:12px}
 .desktop-layout .phone .companion-scroll{padding:24px 18px}
 .desktop-layout .phone .app-title h3{font-size:28px}
 .desktop-layout .phone .builder-fields{grid-template-columns:1fr}
 .desktop-layout .phone .phone-live{padding:0 18px 16px}
}
.desktop-layout .phone #event-note-form .cp-primary{max-width:none}
@media(max-width:1050px){.desktop-layout .phone .builder-fields{grid-template-columns:1fr}}
@media(min-width:621px){
 .desktop-layout .phone{height:760px;min-height:0;grid-template-rows:minmax(0,1fr) auto}
 .desktop-layout .phone .companion-scroll{overflow:auto;min-height:0}
}
