.connected-routines { margin-bottom:32px; padding:24px; border:1px solid var(--edge); border-radius:16px; background:var(--panel); min-width:0; }
.routine-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:24px; max-width:960px; }
.routine-heading h2 { margin:0 0 8px; font-size:22px; font-weight:700; letter-spacing:-.025em; }
.routine-heading p,.routine-note { max-width:72ch; color:var(--bone-dim); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.routine-heading p { margin:0; }
.routine-form h3 { margin:0 0 16px; font-size:16px; }
.routine-form { padding-top:16px; max-width:960px; }
.routine-setup { max-width:960px; border-top:1px solid var(--edge); margin-top:24px; padding-top:12px; }
.routine-setup>summary { font-weight:600; font-size:16px; min-height:44px; padding:12px 0; box-sizing:border-box; cursor:pointer; }
.routine-list { max-width:960px; }
.routine-library-title { font-size:16px; margin:0 0 16px; }
.routine-fields { display:grid; grid-template-columns:minmax(0, 2fr) minmax(100px, 1fr); gap:16px; }
.routine-fields>.routine-note { grid-column:1/-1; margin:0; }
.routine-form label { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:13px; }
.routine-form input:not([type=checkbox]),.routine-form select { width:100%; min-width:0; min-height:44px; box-sizing:border-box; border:1px solid var(--edge); border-radius:8px; background:var(--panel); color:var(--bone); padding:10px 12px; font:inherit; font-size:16px; }
.routine-form select { height:44px; }
.routine-sources { padding:0; margin:24px 0; border:0; min-width:0; }
.routine-sources legend { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.routine-form .routine-check { display:flex; flex-direction:row; align-items:center; gap:10px; min-height:44px; font-size:14px; font-weight:600; }
.routine-check input { width:20px; height:20px; accent-color:var(--bone); flex:none; }
.routine-timing { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,1fr) minmax(0,2fr); gap:16px; }
.routine-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.connected-routines button,.connected-routines a.btn-outline,.routine-row summary { min-height:44px; box-sizing:border-box; }
.connected-routines button,.connected-routines a.btn-outline { white-space:normal; overflow-wrap:anywhere; }
.routine-status { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.routine-status.is-error { color:var(--ember); }
.routine-task-status { min-height:3.2em; margin:12px 0 0; }
.routine-recovery { margin-top:24px; padding:16px; border:1px solid var(--edge); border-radius:8px; font-size:14px; }
.routine-row { border-top:1px solid var(--edge); padding:24px 0 0; margin-top:24px; min-width:0; }
.routine-library-title+.routine-row { border-top:0; margin-top:0; padding-top:0; }
.routine-row-heading { display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.routine-row h3 { margin:0; font-size:16px; overflow-wrap:anywhere; }
.routine-state { font-size:12px; flex:none; }
.routine-query { font-size:14px; overflow-wrap:anywhere; }
.routine-row details { margin-top:12px; }
.routine-row summary { cursor:pointer; padding:12px 0; font-size:14px; }
.routine-fire { border-top:1px solid var(--edge); padding:20px 0; font-size:14px; }
.routine-fire p { margin:0 0 8px; }
.routine-fire-heading { display:flex; justify-content:space-between; align-items:baseline; gap:16px; margin-bottom:12px; }
.routine-fire-heading h4 { font-size:14px; margin:0; font-weight:600; font-variant-numeric:tabular-nums; }
.routine-inspector { padding-top:8px; }
.routine-inspector summary { padding:12px 0; }
.routine-inspector-content { margin-top:4px; }
.routine-diagram { height:312px; margin:16px 0 24px; min-width:0; overflow:hidden; }
.routine-diagram[data-sources="3"] { height:452px; }
.routine-stage-list { list-style:none; margin:20px 0 12px; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 32px; }
.routine-stage-list li { min-width:0; border-top:1px solid var(--edge); padding-top:12px; }
.routine-stage-list h4 { font-size:14px; margin:0 0 8px; font-weight:600; }
.routine-stage-list p { overflow-wrap:anywhere; max-width:72ch; line-height:1.6; }
.routine-fires { padding-bottom:8px; }
.routine-fires[aria-busy=true] { min-height:84px; }
.connected-routines .btn-outline { text-underline-offset:3px; }
.connected-routines :focus-visible { outline:2px solid var(--bone); outline-offset:3px; }
.connected-routines button:disabled { opacity:.55; cursor:default; }
.connected-routines [hidden] { display:none!important; }
@media(max-width:1099px) { .routine-diagram { display:none; } }
@media(max-width:600px) { .connected-routines { padding:16px; } .routine-heading { flex-direction:column; gap:12px; } .routine-fields,.routine-timing,.routine-stage-list { grid-template-columns:minmax(0,1fr); } .routine-row-heading,.routine-fire-heading { align-items:flex-start; } .routine-stage-list { gap:16px; } }
