/**
 * CHANGE LOG
 * -----------------------------------------------------------------------------
 * SEQ                 | AUTHOR                      | DESCRIPTION
 * -----------------------------------------------------------------------------
 * 1 | maintainer@emeraldcoastsystemsgroup.com | Align source recovery notices with existing themed surfaces and responsive gutters, preserving main and dialog placement.
 * 2 | maintainer@emeraldcoastsystemsgroup.com | Let standalone application shells fill the viewport after removing preview chrome, with display choices in native settings.
 * 3 | maintainer@emeraldcoastsystemsgroup.com | A link written inside answer text (a classless <a> in a paragraph or list item, as the Jarvis answer renderer emits "Open ticket") reads as a link: the theme's accent colour and an underline. The base reset (a{color:inherit;text-decoration:none}) made it look like body text.
 */
/* Additions the live shells need beyond the prototype stylesheets: embedded application
   frames, status tones, loading and sign-in states, and anchor variants of prototype buttons. */
.loading-shell{max-width:720px;margin:12vh auto;padding:32px;text-align:center}
.loading-shell h1{font-size:28px;margin:12px 0 18px}
.embed-frame{display:block;width:100%;min-height:520px;height:70vh;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin:12px 0}
.embed-frame.compact{min-height:360px;height:48vh}
.tone-good{color:var(--status-success,#2f8f5b)}
.tone-warn{color:var(--status-warning,#b45309)}
.run-strip .tone-good strong{color:var(--status-success,#2f8f5b)}
.run-strip .tone-warn strong{color:var(--status-warning,#b45309)}
.badge.tone-warn{border-color:currentColor}
.context-summary{margin:12px 0}
.context-summary .run-strip{flex-wrap:wrap;gap:8px;margin:10px 0}
.context-summary .run-strip span{padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);font-size:12px}
.context-summary .artifact-steps{margin:8px 0 0;padding-left:18px;font-size:13px}
a.mini-app,a.rail-button,a.nav-button,a.action,a.quiet-link{text-decoration:none;color:inherit}
a.mini-app{display:flex;align-items:center;gap:10px}
a.action.primary,a.action{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.study-caption select.layout-picker{max-width:190px}
.study-caption a{color:inherit;text-decoration:none;opacity:.8}
.study-caption a:hover{opacity:1;text-decoration:underline}
.running-row{width:100%;text-align:left;background:none;border:0;color:inherit;font:inherit;cursor:pointer}
.provenance-facts code{font-size:12px}
.person-row .avatar.active{box-shadow:0 0 0 2px var(--accent)}
.experience-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:16px;margin-top:22px}
.experience-card{display:flex;flex-direction:column;gap:12px;padding:0 0 16px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:inherit;text-decoration:none;overflow:hidden;transition:transform .15s,border-color .15s}
.experience-card:hover{transform:translateY(-3px);border-color:var(--accent)}
.experience-card .swatch{height:120px;display:grid;grid-template-columns:1fr 2fr 1fr;gap:6px;padding:12px;background:var(--swatch-bg,#eee)}
.experience-card .swatch span{border-radius:8px;background:var(--swatch-surface,#fff);border:1px solid var(--swatch-line,#ddd)}
.experience-card .swatch span:nth-child(2){background:var(--swatch-surface,#fff);position:relative}
.experience-card .swatch span:nth-child(2)::after{content:"";position:absolute;left:10%;right:10%;bottom:14px;height:10px;border-radius:6px;background:var(--swatch-accent,#888)}
.experience-card .swatch span:nth-child(3){background:var(--swatch-accent,#888);opacity:.55}
.experience-card h3{margin:0 16px;font-size:20px}
.experience-card p{margin:0 16px;color:var(--muted);font-size:13px;line-height:1.5}
.experience-card .card-meta{margin:auto 16px 0;display:flex;justify-content:space-between;font-size:11px;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
.experience-card.current{outline:2px solid var(--accent)}
.portal-status{display:flex;flex-wrap:wrap;gap:12px 22px;margin:8px 0 26px;font-size:13px;color:var(--muted)}
.portal-status strong{color:var(--ink)}
@media (max-width:760px){.embed-frame{min-height:380px;height:60vh}.study-caption select.layout-picker{max-width:130px}}
.finance-table{width:100%;border-collapse:collapse;margin:14px 0;font-size:13px}
.finance-table th{text-align:left;font-weight:600;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:6px 0;border-bottom:1px solid var(--line)}
.finance-table td{padding:7px 0;border-bottom:1px solid var(--line)}
.finance-table td:last-child,.finance-table th:last-child{text-align:right}
.preview-bar .preview-selects label select{max-width:210px}
.home-sidebar .nav-link{display:flex;align-items:center;gap:10px;width:100%;text-align:left}
.embed-switch{margin:12px 0 0}
.embed-switch .note-line{margin-top:8px}
.detail-slot .person-row,.roster-slot .person-row{margin-top:10px}
.detail-slot .dependency-list{margin:10px 0 18px}
.live-agenda .agenda-row{margin-top:14px}
.live-agenda .agenda-row .agenda-detail{border-left-color:var(--accent)}
.live-agenda .agenda-sources{margin-top:14px}
/* Full-swarm work panels: an indeterminate bar for Working items (no percentage is recorded), recorded workflow
   progress and the stage list of a ticket's workflow. Motion stops under reduced motion. */
.mini-progress.live-indeterminate{position:relative;align-self:center}
.mini-progress.live-indeterminate i,.live-indeterminate-track i{width:40%;animation:live-slide 1.4s ease-in-out infinite}
.live-indeterminate-track{position:relative;overflow:hidden}
.live-indeterminate-track i{display:block;height:100%;background:var(--accent)}
@keyframes live-slide{0%{transform:translateX(-110%)}100%{transform:translateX(260%)}}
@media (prefers-reduced-motion:reduce){.mini-progress.live-indeterminate i,.live-indeterminate-track i{animation:none;width:100%;opacity:.45}}
.running-row .mini-progress{margin-left:8px}
.work-item .mini-progress{margin-left:10px}
.live-progress>span strong{margin-left:auto;padding-left:10px}
.live-stages{list-style:none;margin:12px 0;padding:0;display:grid;gap:8px}
.live-stages li{display:flex;gap:12px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-radius:8px}
.live-stages li small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.live-stages .stage-mark{flex:0 0 12px;height:12px;margin-top:3px;border-radius:50%;border:2px solid var(--line)}
.live-stages .stage-done .stage-mark,.live-stages .stage-skipped .stage-mark{background:var(--accent);border-color:var(--accent)}
.live-stages .stage-waiting .stage-mark,.live-stages .stage-running .stage-mark{border-color:var(--accent);box-shadow:0 0 0 3px var(--soft,transparent)}
.live-stages .stage-failed .stage-mark{border-color:var(--status-warning,#b45309);background:var(--status-warning,#b45309)}
.live-stages .stage-pending{opacity:.72}
.work-flow,.work-state{margin-top:14px}
.work-actions{margin-top:10px}
/* Routines panel: one row per schedule with the caller's own switch. */
.routine-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.routine-copy{min-width:0}
.routine-copy strong{display:block;font-size:13px}
.routine-copy small{display:block;color:var(--muted);font-size:11px;margin-top:3px;overflow-wrap:anywhere}
.routine-toggle{display:inline-flex;align-items:center;gap:8px;font-size:12px;white-space:nowrap}
.routine-toggle input{accent-color:var(--accent);width:18px;height:18px}
.routine-note:empty{display:none}
/* Day focus: the picker sits with the skin picker; Orbit rings the focus's suites. */
.study-caption select.scene-picker{max-width:170px}
.suite-node.in-focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--soft,transparent),0 10px 24px #0000000f}
@media (max-width:760px){.study-caption select.scene-picker{max-width:120px}}
/* Portal sections: the demo gallery's central feature, homebase and concept cards as experience cards, with drawn
   previews in each experience's palette instead of screenshots of fixture data. */
.experience-card.central-feature{display:grid;grid-template-columns:.8fr 1.2fr;gap:0;padding:0;margin:26px 0 12px;background:#0c1c24;color:#dceceb;border-color:#36545d}
.experience-card.central-feature h2{margin:17px 0;font-size:34px}
.experience-card.central-feature p{margin:0;color:#a9c1c8}
.central-stage{position:relative;min-height:320px;background:radial-gradient(circle at 50% 50%,#12313a 0,#07131a 70%);border-left:1px solid #36545d;overflow:hidden}
.central-orb{position:absolute;left:50%;top:50%;width:170px;height:170px;margin:-85px 0 0 -85px;border-radius:50%;background:radial-gradient(circle at 38% 34%,#e9fffa 0,#9bdfd0 26%,#2f7d74 58%,transparent 72%);box-shadow:0 0 80px #9bdfd055,0 0 160px #9bdfd022;animation:live-orb 6s ease-in-out infinite}
.central-orb::before,.central-orb::after{content:"";position:absolute;inset:-34px;border-radius:50%;border:1px solid #9bdfd033}
.central-orb::after{inset:-70px;border-color:#9bdfd01a}
@keyframes live-orb{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
@media (prefers-reduced-motion:reduce){.central-orb{animation:none}}
@media (max-width:900px){.experience-card.central-feature{grid-template-columns:1fr}.central-stage{min-height:220px;border-left:0;border-top:1px solid #36545d}}
.live-homebases{border-bottom-color:var(--line)}
.live-homebases .homebase-heading p{color:var(--muted)}
.experience-card.homebase-card{display:block;padding:0;gap:0;background:var(--surface);border-color:var(--line)}
.experience-card.homebase-card>div:last-child{padding:22px}
.experience-card.homebase-card h3{margin:10px 0}
.experience-card.homebase-card p{color:var(--muted);margin:0}
.experience-card.homebase-card .card-meta{margin:14px 0 0}
.concept-grid.experience-cards{grid-template-columns:1fr 1fr;gap:24px}
@media (max-width:760px){.concept-grid.experience-cards{grid-template-columns:1fr}}
.experience-card.concept-card{display:block;padding:0;gap:0}
.experience-card.concept-card p{margin:0}
.concept-tags .live-fact{color:var(--accent);border-color:var(--accent)}
.live-mock{position:relative;height:100%;min-height:170px;border-radius:10px 10px 0 0;background:var(--swatch-bg);border:1px solid var(--swatch-line);border-bottom:0;display:grid;gap:8px;padding:12px;box-sizing:border-box;overflow:hidden}
.live-mock i,.live-mock b{display:block;border-radius:6px;background:var(--swatch-surface);border:1px solid var(--swatch-line)}
.live-mock b{border:0;height:12px;background:var(--swatch-line)}
.live-mock .m-accent{background:var(--swatch-accent);width:40%}
.mock-studio{grid-template-columns:1fr 2.2fr 1fr}
.mock-studio .m-main,.mock-jarvis .m-main,.mock-commons .m-main,.mock-home .m-main{display:flex;flex-direction:column;gap:8px;padding:10px;justify-content:flex-end}
.mock-jarvis{grid-template-columns:26px 2.4fr 1fr}
.mock-jarvis .m-orb{width:44px;height:44px;border-radius:50%;background:var(--swatch-accent);align-self:flex-end;margin-bottom:auto;opacity:.8}
.mock-orbit{display:block}
.mock-orbit .m-hub{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:var(--swatch-accent);opacity:.85;border:0}
.mock-orbit .m-node{position:absolute;width:64px;height:28px;margin:-14px 0 0 -32px;border-radius:7px;background:var(--swatch-surface);border:1px solid var(--swatch-line)}
.mock-orbit .n1{left:22%;top:18%}.mock-orbit .n2{left:78%;top:18%}.mock-orbit .n3{left:87%;top:50%}.mock-orbit .n4{left:78%;top:82%}.mock-orbit .n5{left:22%;top:82%}.mock-orbit .n6{left:13%;top:50%}
.mock-commons{grid-template-columns:22px 2.4fr 1fr;grid-template-rows:22px 1fr}
.mock-commons .m-top{grid-column:1/-1;background:var(--swatch-accent);opacity:.85;border:0}
.mock-home{grid-template-columns:2fr 1fr;grid-template-rows:22px 1fr}
.mock-home .m-top{grid-column:1/-1}
.mock-home .m-grid{height:auto;flex:1;border:1px solid var(--swatch-line);background:repeating-linear-gradient(90deg,var(--swatch-line) 0 1px,transparent 1px 14.28%),repeating-linear-gradient(0deg,var(--swatch-line) 0 1px,transparent 1px 25%),var(--swatch-surface)}
.homebase-card .live-mock{height:190px;border-radius:0;border:0;border-bottom:1px solid var(--line)}
/* With the day focus and skin pickers side by side the study caption wraps on a phone instead of pushing past the edge. */
@media (max-width:560px){.full-swarm .study-caption{flex-wrap:wrap;row-gap:6px;justify-content:flex-start}.full-swarm .study-caption select.layout-picker{min-width:0}}

/* Recovery stays in the active theme; in-page and dialog notices retain their existing container gutter. */
.work-source-status{margin:16px clamp(12px,2vw,28px);padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface,var(--paper));color:var(--ink);font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.work-source-status p{margin:0 0 10px}
.work-source-status p:last-child{margin-bottom:0}
.home-main .work-source-status,dialog .work-source-status{margin-left:0;margin-right:0}

/* These shared rules follow the package styles; application headers keep their own height. */
.experience .home-shell,.full-swarm .app-shell{min-height:100vh}
.experience a.wordmark{color:inherit;text-decoration:none}
.experience .main-top{flex-wrap:wrap}
.experience .top-controls{min-width:0;max-width:100%;flex-wrap:wrap}
.full-studio .studio-workspace{min-height:calc(100vh - 70px)}
.full-orbit .orbit-content{min-height:calc(100vh - 78px)}
.full-commons .commons-shell{min-height:calc(100vh - 65px)}
.full-commons .commons-room{min-height:calc(100vh - 189px)}
.application-settings{display:grid;gap:18px}
.application-settings label{display:grid;gap:8px;font-size:13px}
.application-settings select{width:100%;max-width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface,var(--paper));color:var(--ink)}
@media(max-width:720px){.full-studio .studio-workspace{min-height:calc(100vh - 60px)}}
/* In-text links (answer renderer output: classless anchors in paragraphs and list items). */
:is(p,li)>a[href]:not([class]){color:var(--accent);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
:is(p,li)>a[href]:not([class]):hover{text-decoration-thickness:2px}
