/* Scoped styles reuse the existing campus-flow shell; no course-page changes. */
.storyplus-page .story-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start;margin-top:18px}
.storyplus-page .story-layout>*{min-width:0}
.storyplus-page .story-layout .flow-card{margin-top:0}
.storyplus-page .story-results{display:grid;gap:18px;min-width:0}
.storyplus-page .flow-main h2{font-size:18px;line-height:1.45;color:var(--flow-navy);margin:0 0 14px}
.storyplus-page .flow-main label{display:block;margin:12px 0 6px;font-size:14px;font-weight:600}
.storyplus-page .flow-main input:not([type=checkbox]){box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--flow-line);border-radius:9px;font:inherit;background:#fff;color:#263d50}
.storyplus-page .flow-main button,.storyplus-page .story-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;box-sizing:border-box;max-width:100%;padding:9px 14px;border:1px solid var(--flow-line);border-radius:9px;font:inherit;font-weight:600;line-height:1.4;white-space:normal;overflow-wrap:anywhere;background:#fff;color:#263d50;cursor:pointer}
.storyplus-page .flow-main button:disabled{opacity:.55;cursor:default}
.storyplus-page .flow-main button.story-primary{background:var(--orange);border-color:var(--orange);color:var(--navy)}
.storyplus-page .flow-main button:not(:disabled):hover,.storyplus-page .story-link:hover{background:var(--flow-bg);border-color:#b8cbd9}
.storyplus-page .flow-main button.story-primary:not(:disabled):hover{background:#ef8b61;border-color:#ef8b61}
.storyplus-page .story-link{text-decoration:none}
.storyplus-page :is(button,input,select,summary,a):focus-visible{outline:3px solid #2a71ad;outline-offset:3px}
.storyplus-page .flow-main fieldset{margin:16px 0;padding:8px 0 0;border:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;min-width:0}
.storyplus-page .flow-main legend{font-size:14px;font-weight:600;padding:0;margin-bottom:4px}
.storyplus-page .flow-main fieldset label{display:flex;align-items:flex-start;gap:8px;min-height:40px;margin:0;padding:8px 0;font-weight:400;line-height:1.5;overflow-wrap:anywhere}
.storyplus-page .flow-main fieldset label span{min-width:0}
.storyplus-page .flow-main input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:1.5px 0 0;accent-color:var(--flow-blue)}
.storyplus-page .flow-main .flow-supporting{font-size:13px;line-height:1.65}
.storyplus-page .story-quiet{margin-top:16px;padding-top:14px;border-top:1px solid var(--flow-line);min-width:0}
.storyplus-page .story-quiet h3{font-size:14px;line-height:1.5;color:var(--flow-navy);margin:0 0 8px}
.storyplus-page .flow-main .story-quiet-toggle{display:flex;align-items:flex-start;gap:8px;min-height:36px;margin:0;padding:8px 0;font-weight:400;line-height:1.5;overflow-wrap:anywhere}
.storyplus-page .story-quiet-times{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:10px;min-width:0}
.storyplus-page .story-quiet-times label{min-width:0;margin:4px 0 0;overflow-wrap:anywhere}
.storyplus-page .story-quiet-times input{margin-top:6px}
.storyplus-page .story-quiet-times input:disabled{background:#f3f7fa;color:var(--flow-muted)}
.storyplus-page .story-saved-keywords{margin-top:18px;padding-top:16px;border-top:1px solid var(--flow-line);min-width:0}
.storyplus-page .story-saved-keywords h3{margin:0 0 12px;color:var(--flow-navy);font-size:14px;line-height:1.5}
.storyplus-page .story-saved-keywords dl{display:grid;gap:6px;margin:0;min-width:0}
.storyplus-page .story-saved-keywords dt{margin-top:6px;color:var(--flow-muted);font-size:12px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.storyplus-page .story-saved-keywords dd{display:flex;flex-wrap:wrap;gap:6px;margin:0;min-width:0}
.storyplus-page .story-keyword{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0;box-sizing:border-box;padding:2px 2px 2px 8px;border:1px solid var(--flow-line);border-radius:7px;background:#f3f7fa;color:var(--flow-navy);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.storyplus-page .story-keyword bdi{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.storyplus-page .flow-main button.story-keyword-remove{flex:0 0 36px;min-height:36px;width:36px;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font-size:20px;font-weight:400;line-height:1}
.storyplus-page #storySavedExclude .story-keyword{background:#f8f9fa;color:var(--flow-muted)}
.storyplus-page .story-keyword-empty{color:var(--flow-muted);font-size:13px;line-height:1.5}
.storyplus-page .story-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}
.storyplus-page .story-actions h2{margin:0;flex:1}
/* Let the inbox action wrap as a unit before squeezing the heading into letters. */
.storyplus-page #storyInboxTitle{flex:1 1 14rem;min-width:min(100%,14rem);word-break:normal;overflow-wrap:break-word}
.storyplus-page #storyInbox>.story-actions>#storyReadAll{flex:0 1 auto}
.storyplus-page .story-privacy{margin-top:18px;border-top:1px solid var(--flow-line);padding-top:8px;font-size:13px;overflow-wrap:anywhere;line-height:1.65}
.storyplus-page .story-privacy summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;min-height:44px;list-style:none;color:var(--flow-navy);font-weight:600}
.storyplus-page .story-privacy summary::-webkit-details-marker{display:none}
.storyplus-page .story-privacy summary::after{content:'';width:8px;height:8px;flex:none;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-inline-end:3px}
.storyplus-page .story-privacy[open] summary::after{transform:rotate(225deg)}
.storyplus-page .story-privacy p{margin:6px 0 10px}
.storyplus-page .story-privacy a{display:inline-block;max-width:100%;color:var(--flow-blue)}
.storyplus-page .story-actions>button{flex:1 1 120px}
.storyplus-page .story-program{border:1px solid var(--flow-line);border-radius:11px;padding:15px;margin:12px 0;min-width:0;overflow-wrap:anywhere}
.storyplus-page .story-program h3{font-size:16px;line-height:1.5;margin:0 0 8px}
.storyplus-page .story-program dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:6px 10px;margin:10px 0;font-size:14px;line-height:1.5}
.storyplus-page .story-program :is(dt,dd){min-width:0;margin:0;overflow-wrap:anywhere}
.storyplus-page .story-program dt,.storyplus-page .story-time{color:#62798c}
.storyplus-page .story-empty{margin:12px 0 0;padding:24px 16px;border:1px dashed #c6d2db;border-radius:10px;background:#f9fbfc;color:var(--flow-muted);font-size:14px;line-height:1.7;text-align:center;overflow-wrap:anywhere}
.storyplus-page #storyStatus{margin:14px 0 0;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.storyplus-page #storyStatus:empty{display:none}
.storyplus-page #storyStatus:not(:empty){padding:10px 12px;border:1px solid var(--flow-line);border-radius:9px;background:#f3f7fa;color:var(--flow-navy)}
.storyplus-page #storyStatus:is([data-state=error],[data-state=notReady],[data-state=denied],[data-state=unsupported]){background:#fff5ef;border-color:#edc5b5;color:#914322}
.storyplus-page #storyDelete{color:#a63832}
.storyplus-page [hidden]{display:none!important}
/* STORY+ only: calmer surfaces and compact, fully readable program rows. */
.storyplus-page .story-layout{gap:24px}
.storyplus-page .story-settings-card{border-color:#dce5eb;box-shadow:none}
.storyplus-page .story-programs-card{padding:0;border:0;background:transparent;box-shadow:none}
.storyplus-page .story-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.storyplus-page .story-list-heading h2{margin:0;font-size:21px;letter-spacing:-.02em}
.storyplus-page .story-list-heading button{background:transparent;font-size:13px;padding:8px 12px}
.storyplus-page .story-list-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
.storyplus-page .story-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:10px;padding:14px;background:#eaf0f5;border:1px solid #d9e3eb;border-radius:12px}
.storyplus-page .story-search{grid-column:1/-1}
.storyplus-page .story-toolbar label{min-width:0;margin:0;font-size:12px;color:var(--flow-muted)}
.storyplus-page .story-toolbar input,.storyplus-page .story-toolbar select{display:block;min-width:0;width:100%;margin-top:6px;min-height:44px;padding:9px 10px;border:1px solid var(--flow-line);border-radius:9px;background:#fff;color:var(--flow-navy);font:inherit;font-size:14px}
.storyplus-page .story-list-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 14px;padding:8px 1px}
.storyplus-page .story-list-meta p{margin:0;color:var(--flow-muted);font-size:13px;line-height:1.5}
.storyplus-page .flow-main .story-saved-toggle{display:flex;align-items:center;gap:8px;margin:0;min-height:44px;font-size:13px;font-weight:500;line-height:1.5}
.storyplus-page #storyPrograms{display:grid;gap:10px;margin-top:12px}
.storyplus-page .story-program{margin:0;padding:15px 16px;border-radius:12px;border:1px solid #dae4ed;background:#eef3f7;box-shadow:none}
.storyplus-page .story-program-heading{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
.storyplus-page .story-program h3{flex:1;min-width:0;margin:0;color:var(--flow-navy);font-size:16px;font-weight:700;line-height:1.55;letter-spacing:-.015em}
.storyplus-page .flow-main .story-bookmark{flex:0 0 auto;padding:6px 9px;min-height:36px;font-size:12px;background:transparent;color:var(--flow-blue);border-color:#cbd9e5}
.storyplus-page .flow-main .story-bookmark[aria-pressed=true]{background:#dce9f3;border-color:#b6cddd;color:var(--flow-navy)}
.storyplus-page .story-program-state{display:inline-flex;align-items:center;max-width:100%;margin-top:6px;padding:3px 7px;border-radius:5px;background:#dbe8f3;color:#254e70;font-size:11px;font-weight:650;line-height:1.5}
.storyplus-page .story-program[data-state=closed] .story-program-state{background:#e2e7ec;color:#536371}
.storyplus-page .story-program[data-state=upcoming] .story-program-state{background:#e6e3f2;color:#584976}
.storyplus-page .story-program[data-state=unknown] .story-program-state{background:#f6e7d9;color:#855025}
.storyplus-page .story-program dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 16px;margin:10px 0;font-size:13px;line-height:1.55}
.storyplus-page .story-fact{display:flex;gap:8px;min-width:0;align-items:baseline}
.storyplus-page .story-fact dt{flex:0 1 auto;color:#647586;font-size:12px}
.storyplus-page .story-fact dd{flex:1;color:#31495d;font-weight:500}
.storyplus-page .story-fact[data-fact=end] dd{color:var(--flow-navy);font-weight:750;font-variant-numeric:tabular-nums}
.storyplus-page .story-link{padding:6px 10px;min-height:36px;background:#dce8f1;color:#244e70;border-color:#c6d9e8;font-size:12px}
.storyplus-page .story-settings-shortcut{background:transparent}
.storyplus-page .story-link-hint{margin:12px 0 0;color:var(--flow-muted);font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.storyplus-page .story-pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;margin-top:16px}
.storyplus-page .story-pagination button{min-width:40px;min-height:44px;padding:7px 10px;background:transparent;font-size:13px}
.storyplus-page .story-pagination button[aria-current=page]{background:var(--flow-navy);border-color:var(--flow-navy);color:#fff}
.storyplus-page #storyProgramsTitle{scroll-margin-top:90px}
.storyplus-page #storyNotifications{display:grid;gap:10px;margin-top:12px}
/* Keep card titles unobstructed; group related actions without new surfaces. */
.storyplus-page .story-program-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.storyplus-page .story-program-actions .story-bookmark{margin-inline-start:auto}
.storyplus-page .story-program-actions :is(.story-link,.story-bookmark){min-height:44px;padding:9px 12px;line-height:1.5}
.storyplus-page .story-list-tools :is(button,.story-link){min-height:44px;padding:9px 12px;font-size:13px;line-height:1.5}
.storyplus-page .story-actions{gap:10px}
.storyplus-page .story-actions>button{min-height:44px}
.storyplus-page .story-list-meta input[type=checkbox]{margin:0}
.storyplus-page .story-list-filters{display:flex;flex-wrap:wrap;gap:4px 16px;min-width:0}
.storyplus-page .story-online-state{margin-inline-start:6px}
@media(max-width:1023px){.storyplus-page .story-fact{display:block}.storyplus-page .story-fact dd{margin-top:2px}}
@media(max-width:767px){
 .storyplus-page .story-layout{grid-template-columns:minmax(0,1fr);gap:20px}
 .storyplus-page .story-results{grid-row:auto}
 .storyplus-page .story-toolbar{padding:12px;gap:10px}
 .storyplus-page .story-program{padding:12px}
 .storyplus-page .story-program-heading{gap:8px}
 .storyplus-page .story-program h3{font-size:15px}
 .storyplus-page .flow-main .story-bookmark,.storyplus-page .story-link{min-height:44px}
 .storyplus-page .story-program dl{gap:6px 12px}
 .storyplus-page .story-pagination{gap:4px}
 .storyplus-page .story-pagination button{min-width:34px;padding:7px 8px}
 .storyplus-page .story-list-heading h2{font-size:19px}
 .storyplus-page .story-list-heading{flex-wrap:wrap}
 .storyplus-page .story-list-tools{gap:6px}
 .storyplus-page .story-program-actions{margin-top:10px}
 .storyplus-page #storySettingsTitle{scroll-margin-top:20px}
}
@media(max-width:767px){.storyplus-page .story-layout{grid-template-columns:minmax(0,1fr);gap:14px}.storyplus-page fieldset{grid-template-columns:repeat(2,minmax(0,1fr))}.storyplus-page .story-program{padding:12px}.storyplus-page .story-results{gap:14px}}
/* Reuse the established campus-flow / campus-utility header and content frame.
   Only STORY+ controls are scoped here; shared Campus styles are unchanged. */
.storyplus-page .story-layout{grid-template-columns:minmax(0,1fr);gap:18px;align-items:start;margin-top:18px}
.storyplus-page .story-settings-card{padding:20px;border:1px solid var(--flow-line);background:#fff;box-shadow:none;border-radius:15px}
.storyplus-page .story-settings-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:18px}
.storyplus-page .story-settings-heading h2{margin:0;font-size:19px;letter-spacing:-.025em}
.storyplus-page .story-settings-heading .flow-supporting{margin:8px 0 0;font-size:13px}
.storyplus-page .story-settings-heading>.story-link{padding:0;min-height:44px;border:0;background:transparent;color:var(--flow-blue);font-size:13px}
.storyplus-page .story-setup-grid{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:20px}
.storyplus-page .story-setup-grid>*{min-width:0;grid-column:auto;grid-row:auto}
.storyplus-page .story-connection{padding:16px;background:var(--flow-bg);border:1px solid var(--flow-line);border-radius:12px;overflow-wrap:break-word}
.storyplus-page .story-channel{color:var(--flow-muted);font-size:12px;font-weight:600;line-height:1.6}
.storyplus-page .story-connection h3{margin:6px 0 14px;color:var(--flow-navy);font-size:18px;line-height:1.4}
.storyplus-page .story-connection-state{display:flex;align-items:baseline;gap:8px;margin:0;color:var(--flow-navy);font-size:17px;font-weight:700;line-height:1.6}
.storyplus-page .story-connection-state::before{content:'';flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#71818d}
.storyplus-page .story-connection-state[data-state=connected]::before{background:#39745f}
.storyplus-page .story-connection-state:is([data-state=unavailable],[data-state=denied],[data-state=unsupported])::before{background:#b64e2a}
.storyplus-page .story-connection .story-actions{min-height:44px;margin-top:16px}
.storyplus-page .story-connection .story-actions>button{flex:1 1 100%}
.storyplus-page .story-official-link{width:100%;margin-top:10px;background:#fff}
.storyplus-page .story-channel-note{padding-top:14px;border-top:1px solid var(--flow-line)}
.storyplus-page .story-connection #storyDelete{margin-top:16px;width:100%;background:transparent;font-size:13px}
.storyplus-page .story-setup-section h3,.storyplus-page #storyKinds legend{margin:0 0 14px;padding:0;color:var(--flow-navy);font-size:16px;font-weight:700;line-height:1.6}
.storyplus-page .story-step{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin-inline-end:8px;border-radius:50%;background:#edf3f8;color:var(--flow-blue);font-size:12px;font-weight:700;vertical-align:middle;flex:none}
.storyplus-page .story-keyword-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.storyplus-page .story-keyword-fields>div{min-width:0}
.storyplus-page .story-keyword-fields label{margin-top:0}
.storyplus-page .story-keyword-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px}
.storyplus-page .story-keyword-entry input{min-width:0;width:100%;box-sizing:border-box}
.storyplus-page .story-keyword-entry button{min-inline-size:58px;min-height:44px;padding-inline:12px;border:1px solid #c7d7e5;background:#edf4f9;color:#173b5e;white-space:nowrap}
.storyplus-page #storyKeywordScope{margin-top:3px}
.storyplus-page .story-saved-keywords{margin-top:16px;padding:0;border:0;border-top:1px solid var(--flow-line);border-radius:0;background:transparent}
.storyplus-page .story-saved-keywords dl{grid-template-columns:minmax(70px,auto) minmax(0,1fr);gap:8px 12px;margin-top:10px;align-items:start}
.storyplus-page .story-saved-keywords dt{margin:0;line-height:1.8}
.storyplus-page .story-saved-keywords dd{align-self:center}
.storyplus-page .flow-main #storyKinds{margin:24px 0 0;padding:0;gap:6px 10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.storyplus-page #storyKinds label{padding:10px;border:1px solid var(--flow-line);border-radius:9px;background:#fff;min-height:44px;word-break:normal;overflow-wrap:break-word}
.storyplus-page #storyKinds label:has(input:checked){background:#f3f7fa;border-color:#c5d6e3}
.storyplus-page #storyKinds label:focus-within{border-color:var(--flow-blue)}
.storyplus-page .story-quiet{margin-top:24px;padding-top:0}
.storyplus-page .story-quiet-times{max-width:none}
.storyplus-page .story-quiet-times input[type=time]{min-height:48px;padding-inline:8px;text-align:start;direction:ltr}
.storyplus-page .story-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;min-height:48px;color:var(--flow-navy);font-size:14px;font-weight:650;line-height:1.6}
.storyplus-page .story-disclosure>summary::-webkit-details-marker{display:none}
.storyplus-page .story-disclosure>summary::after{content:'';width:7px;height:7px;flex:0 0 7px;border-inline-end:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-inline:8px}
.storyplus-page .story-disclosure[open]>summary::after{transform:rotate(225deg)}
.storyplus-page .story-quiet>summary{justify-content:flex-start}
.storyplus-page .story-quiet>summary::after{margin-inline-start:auto}
.storyplus-page .story-save-row{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-top:24px;padding-top:20px;border-top:1px solid var(--flow-line)}
.storyplus-page .story-save-row .flow-supporting{margin:0}
.storyplus-page .story-save-row button{width:100%;min-height:48px;background:var(--flow-navy);border-color:var(--flow-navy);color:#fff}
.storyplus-page .story-save-row button:not(:disabled):hover{background:#245a7e;border-color:#245a7e}
.storyplus-page .story-results{grid-column:auto;grid-row:auto;gap:18px}
.storyplus-page .story-programs-card{padding:20px;border:1px solid var(--flow-line);border-radius:15px;background:#fff}
.storyplus-page .story-toolbar{padding:12px;background:#eaf0f5;border:1px solid #d9e3eb;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.storyplus-page .story-toolbar label{font-size:13px}
.storyplus-page .story-toolbar input:disabled,.storyplus-page .story-toolbar select:disabled{color:var(--flow-muted);background:#f5f7f8;cursor:default}
.storyplus-page .story-online-options{padding:12px;background:#f4f7fa;border:1px solid var(--flow-line);border-radius:9px}
.storyplus-page .story-online-options label{margin:0}
.storyplus-page .story-online-options select{display:block;width:min(100%,22rem);min-height:44px;margin-top:6px;padding:8px;border:1px solid var(--flow-line);border-radius:9px;background:#fff;color:var(--flow-navy);font:inherit}
.storyplus-page .story-online-options .flow-supporting{margin-bottom:0}
.storyplus-page .story-program{background:#fff;border-color:var(--flow-line);padding:18px}
.storyplus-page .story-empty{padding:24px 16px;border:1px dashed #c6d2db;background:#f9fbfc;text-align:start;font-size:14px;line-height:1.8}
.storyplus-page .story-catalog-help{margin-top:24px;border-top:1px solid var(--flow-line);padding-top:6px}
.storyplus-page :is(#storySettingsTitle,#storyProgramsTitle,#storyInboxTitle){scroll-margin-top:96px}
@media(max-width:1023px){
 .storyplus-page .story-layout{grid-template-columns:minmax(0,1fr)}
 .storyplus-page .story-setup-grid{grid-template-columns:minmax(0,1fr)}
 .storyplus-page .story-results{grid-column:auto;grid-row:auto}
 .storyplus-page .story-keyword-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:767px){
 .storyplus-page .flow-main{margin-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
 .storyplus-page .story-layout{gap:20px}
 .storyplus-page .story-settings-card,.storyplus-page .story-programs-card{padding:16px 14px;border-radius:14px}
 .storyplus-page .flow-main :is(input:not([type=checkbox]),select){min-height:46px;font-size:16px}
 .storyplus-page .story-keyword-fields{grid-template-columns:minmax(0,1fr)}
 .storyplus-page .story-connection{padding:16px}
 .storyplus-page .story-toolbar{padding:10px;gap:8px}
 .storyplus-page .story-saved-keywords dl{grid-template-columns:minmax(0,1fr);gap:5px}
 .storyplus-page .story-saved-keywords dt:not(:first-child){margin-top:8px}
 .storyplus-page .story-quiet-times{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}
 .storyplus-page :is(#storySettingsTitle,#storyProgramsTitle,#storyInboxTitle){scroll-margin-top:20px}
}

@media(min-width:1024px){
 .storyplus-page .story-layout{grid-template-columns:minmax(0,1fr) minmax(310px,.55fr)}
 .storyplus-page .story-setup-grid{grid-template-columns:minmax(0,1fr)}
 .storyplus-page .story-toolbar{grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,1fr))}
 .storyplus-page .story-search{grid-column:auto}
}

/* Keep keyword removal and the quiet-hours label easy to touch on small screens. */
@media(max-width:767px){
 .storyplus-page .flow-main button.story-keyword-remove{flex-basis:44px;min-height:44px;width:44px}
 .storyplus-page .flow-main .story-quiet-toggle{min-height:44px}
}
/* Compact program list. Source status and opening date stay in the disclosure. */
.storyplus-page #storyPrograms .story-program {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 7px 16px;
    padding: 12px 14px;
}

.storyplus-page #storyPrograms .story-program-heading {
    grid-column: 1 / -1;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.storyplus-page #storyPrograms .story-program h3 {
    flex: 1 1 260px;
    line-height: 1.4;
}

.storyplus-page .story-program-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.storyplus-page .story-program-badges > span { margin: 0; }
.storyplus-page #storyInbox[data-focused="true"] {
    border-color: #c6d6e2;
    border-block-start: 2px solid #1b4266;
}
.storyplus-page .story-notice-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-block-end: 7px;
}
.storyplus-page .story-notice-meta .story-time { margin: 0; }
.storyplus-page .story-unread-badge {
    background: #e4f0fa;
    border-radius: 5px;
    color: #163d60;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 7px;
    overflow-wrap: anywhere;
}
.storyplus-page .story-program[data-state="open"] .story-program-badges > span:first-child {
    background: #e7f3ed;
    color: #216348;
}

.storyplus-page .story-program-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    min-width: 0;
}

.storyplus-page .story-program dl.story-program-deadline { display: block; margin: 0; }
.storyplus-page .story-program-meta .story-fact { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.storyplus-page .story-program-meta .story-fact dd { flex: 0 1 auto; margin: 0; }

.storyplus-page .story-program-details { min-width: 0; }
.storyplus-page .story-program-details[open] { flex-basis: 100%; }

.storyplus-page .story-program-details > summary {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding-inline: 9px;
    border-radius: 8px;
    list-style: none;
    color: #315773;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.storyplus-page .story-program-details > summary::-webkit-details-marker { display: none; }
.storyplus-page .story-program-details > summary::after {
    content: '';
    flex: 0 0 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.storyplus-page .story-program-details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.storyplus-page .story-program-details > summary:hover,
.storyplus-page .story-program-details[open] > summary { background: #edf4f8; color: #173b5e; }

.storyplus-page .story-program dl.story-program-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 4px 0 0;
    padding: 8px 10px;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    background: #f6f9fb;
}

.storyplus-page #storyPrograms .story-program-actions { gap: 6px; margin: 0; }
.storyplus-page #storyPrograms .story-program-actions :is(.story-link, .story-bookmark) {
    min-height: 44px;
    max-width: 100%;
    margin: 0;
    padding: 7px 10px;
    border-radius: 8px;
}

@media (max-width: 767px) {
    .storyplus-page #storyPrograms .story-program { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 10px 12px; }
    .storyplus-page #storyPrograms .story-program-heading { display: grid; }
    .storyplus-page #storyPrograms .story-program-actions { justify-content: flex-start; }
}
