/* Workspace, navigation and shared controls */
body { -webkit-font-smoothing: antialiased; }
:where(button,a,select,input,textarea,summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.studio-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.studio-workarea { grid-column: 2; min-width: 0; }
.studio-rail {
  position: sticky; top: 0; height: 100dvh; min-height: 0;
  display: flex; flex-direction: column; padding: 25px 14px 14px;
  background: var(--rail); color: var(--rail-ink); overflow-y: auto; scrollbar-width: thin;
}
.studio-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 750; letter-spacing: -1.3px; white-space: nowrap; }
.studio-brand img { display: block; flex: none; }
.studio-brand img {border-radius: 8px;}
.sd-app-name {display:none;}
@media(max-width:1100px){.top-context .sd-app-name {display:inline;font-size:13px;white-space:nowrap;}}
.sd-org-logo {width: 84px;height: auto;flex: none;}
.entry-org-logo {display:block;width: 124px;height:auto;margin-bottom:22px;}
@media(max-width:600px){.sd-org-logo{width:57px;}}
.brand-light { font-weight: 500; }
.brand-link { color: var(--rail-ink); text-decoration: none; padding: 0 10px; display: flex; min-height: 42px; align-items: center; }
.studio-rail :focus-visible,.studio-drawer :focus-visible { outline-color: var(--mint); outline-offset: 1px; }
.studio-nav { margin-top: 29px; display: grid; gap: 24px; }
.studio-nav-group { display: grid; gap: 3px; }
.studio-nav-group h2 { padding: 0 11px 5px; margin: 0; color: var(--rail-muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.35px; }
.studio-nav-link {
  color: var(--rail-text); padding: 9px 11px; min-height: 40px; border-radius: 7px;
  display: flex; align-items: center; gap: 11px; font-size: 13px; line-height: 1.3; font-weight: 510;
  text-decoration: none; transition: background-color 150ms, color 150ms;
}
.studio-nav-link .icon { width: 18px; height: 18px; stroke-width: 1.65; flex: none; }
.studio-nav-link:hover { color: var(--rail-ink); background: #21436f; }
.studio-nav-link.is-current { color: #163c30; background: var(--mint); font-weight: 720; }
.nav-count { margin-left: auto; background: #ebc995; color: #493319; padding: 2px 7px; border-radius: 5px; font-weight: 700; font-size: 11px; line-height: 1.25; }
.nav-count--error { min-width: 20px; min-height: 20px; display: grid; place-items: center; padding: 2px 5px; border-radius: 999px; background: var(--danger); color: #fff; }
.nav-count--error[hidden] { display: none; }
.rail-footer { margin-top: auto; padding-top: 24px; }
.connection-link { display: flex; align-items: center; gap: 9px; padding: 12px 8px; text-decoration: none; color: var(--rail-ink); margin-bottom: 11px; border: 1px solid var(--rail-line); background: #193934; border-radius: 9px; }
.connection-link:hover { background: #24433e; }
.connection-glyph { width: 27px; height: 31px; display: grid; place-items: center; color: #b3d8c7; }
.connection-glyph .icon { width: 20px; height: 20px; }
.connection-link>svg:last-child { width: 13px; margin-left: auto; color: var(--rail-muted); }
.connection-link strong,.connection-link small,.account-copy strong,.account-copy small { display: block; }
.connection-link strong { font-size: 11.5px; font-weight: 650; }
.connection-link small { color: #b9cdc6; font-size: 10.5px; }
.connection-link i,.mode-pill i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #f0c28a; vertical-align: 1px; margin-right: 5px; }
.studio-account { display: flex; align-items: center; padding: 13px 4px 0; border-top: 1px solid var(--rail-line); gap: 2px; }
.account-link { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--rail-ink); min-width: 0; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-size: 12px; font-weight: 750; background: #edd8bc; color: #55422f; }
.account-copy { min-width: 0; }
.account-copy strong { font-size: 12px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.account-copy small { font-size: 10.5px; color: var(--rail-muted); }
.studio-icon { border: none; background: transparent; color: inherit; width: 40px; height: 42px; flex: none; border-radius: 8px; display: inline-grid; place-items: center; }
.studio-icon:hover { background: #ffffff15; }
.studio-icon.logout { margin-left: auto; color: var(--rail-muted); width: 32px; }
.studio-icon .icon { width: 18px; height: 18px; }
.studio-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 61px; padding: 0 clamp(16px,2.2vw,35px); background: var(--surface); border-bottom: 1px solid var(--border); }
.top-context,.top-tools,.timezone,.mode-pill { display: flex; align-items: center; }
.top-context { min-width: 0; gap: 10px; font-size: 12px; }
.top-context strong { font-weight: 700; white-space: nowrap; }
.top-context>.icon { width: 12px; height: 12px; color: #798a82; }
.route-name { color: var(--muted); }
.workspace-glyph { display: grid; place-items: center; width: 29px; height: 29px; color: var(--primary); background: #e7efe9; border-radius: 8px; }
.workspace-glyph .icon { width: 16px; height: 16px; }
.top-tools { gap: 17px; }
.timezone { gap: 6px; color: var(--muted); font-size: 12px; }
.timezone .icon { width: 14px; height: 14px; }
.mode-pill { gap: 5px; min-height: 28px; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 650; text-decoration: none; background: #faefdc; color: #73501d; }
.mode-pill i { background: #a36a22; margin: 0; }
.menu-toggle,.studio-drawer:not([open]) { display: none; }
.studio-content { padding: clamp(20px,2.1vw,36px) clamp(16px,2.2vw,35px) 40px; width: 100%; max-width: 1920px; }
.page-title { gap: 16px; margin-bottom: 22px; align-items: center; }
h1,.page-title h1 { font-size: clamp(28px,2.45vw,40px); font-weight: 700; line-height: 1.12; letter-spacing: -.048em; }
.page-title p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 6px; max-width: 65ch; }
h2,h3 { color: var(--ink); }
.button,.icon-button,.segmented button,select,summary { transition: background-color 150ms, color 150ms, border-color 150ms, box-shadow 150ms; }
.button { font-weight: 640; border-radius: 8px; min-height: 40px; }
.button.primary { color: white; background: var(--primary); border: 1px solid var(--primary); box-shadow: 0 1px 3px #164e421a; }
.button.primary:hover { background: var(--primary-hover); }
.button:active,.icon-button:active,.studio-icon:active { filter: brightness(.93); }
.panel,.table-wrap { border-radius: 13px; box-shadow: var(--shadow-panel); }
.network .network-symbol { fill: currentColor; stroke: none; }
.notice { background: #eff4f1; padding: 10px 14px; border-radius: 8px; color: #415d51; }
dialog { color: var(--ink); padding: clamp(20px,3vw,32px); border-radius: 17px; box-shadow: var(--shadow-overlay); }
dialog::backdrop { background: #0e2a2690; }
dialog .dialog-close { min-height: 40px; min-width: 40px; }
.skip { z-index: 100; border-radius: 6px; }
.studio-drawer[open] { margin: 0; padding: 18px 16px; inset: 0 auto 0 0; width: min(308px,calc(100vw - 40px)); height: 100dvh; max-height: none; border-radius: 0 16px 16px 0; border: 0; background: var(--rail); color: var(--rail-ink); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.studio-drawer .studio-nav { margin: 23px 0; gap: 18px; }
.studio-drawer .studio-nav-link { min-height: 44px; }
.studio-drawer .connection-link { margin-top: 14px; }
body:has(.studio-drawer[open]) { overflow: hidden; }

#save-progress:empty,.expand-menu-label,.day-goals:empty,.cal-goal-feedback:empty {display:none}
.calendar-goal-scope {display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.45rem 1rem;color:var(--muted)}
.calendar-goal-scope label {display:flex;align-items:center;gap:.5rem;font-size:.85rem;flex-wrap:wrap}
.calendar-goal-scope select {font:inherit;color:var(--ink);width:auto;max-width:100%;min-width:0;padding:.48rem .65rem;background:white;border:1px solid var(--border);border-radius:8px}
.day-goals {display:flex;align-items:baseline;flex-wrap:wrap;gap:0 .4rem;padding:3px 8px;background:var(--primary-soft);border-bottom:1px solid var(--border);font-size:.75rem;color:var(--primary);overflow-wrap:anywhere}
.day-goals a,.day-goals summary {display:block;cursor:pointer;padding:.3rem 0;color:inherit;text-decoration:underline;text-underline-offset:2px}
.day-goals details>summary {display:list-item}
.day-goals .more-goals>summary {color:var(--muted);text-decoration:none}
.day-goals details[open] {flex-basis:100%}
@media(max-width:760px){.day-goals a,.day-goals summary{min-height:32px;align-content:center}}
.batch-destination-summary {list-style:none;padding:0 .35rem 0 0;display:grid;gap:.4rem;max-height:min(34dvh,19rem);overflow:auto;overscroll-behavior:contain}
.batch-destination-summary li {border-top:1px solid var(--border);padding:.5rem 0;display:grid;gap:.2rem;overflow-wrap:anywhere}
@media (min-width:761px) and (max-width:1199px) {
  .studio-topbar .menu-toggle {display:inline-flex;width:auto;align-items:center;gap:.35rem;padding:0 .5rem;min-height:44px}
  .expand-menu-label {display:inline;font:inherit;font-size:.8rem}

  :root { --sidebar-width: 70px; }
  .studio-rail { align-items: stretch; padding: 20px 8px 12px; }
  .studio-rail .brand-link,.studio-rail .studio-nav-link { justify-content: center; padding: 0; }
  .studio-rail .studio-brand>span,.studio-rail .nav-text,.studio-rail .nav-count,.studio-rail .studio-nav-group h2,.studio-rail .connection-link,.studio-rail .account-copy,.studio-rail .logout { display: none; }
  .studio-rail .studio-nav-link { min-height: 44px; }
  .studio-rail .studio-nav-link:has(.nav-count--error) { position: relative; }
  .studio-rail .nav-count--error:not([hidden]) { display: grid; position: absolute; inset: 3px 4px auto auto; min-width: 17px; min-height: 17px; font-size: .65rem; padding: 1px 3px; }
  .studio-rail .studio-nav-group+.studio-nav-group { border-top: 1px solid var(--rail-line); padding-top: 12px; }
  .studio-rail .studio-nav { gap: 12px; }
  .studio-rail .studio-account { justify-content: center; }
}
@media (max-width:760px) {
  .studio-shell { display: block; }
  .studio-rail { display: none; }
  .studio-topbar { padding: 5px 14px 5px 8px; min-height: 55px; }
  .top-context { gap: 7px; }
  .top-context>.icon,.route-name,.timezone,.workspace-glyph { display: none; }
  .top-context strong { font-size: 14px; }
  .menu-toggle { display: grid; width: 44px; height: 44px; }
  .menu-toggle:hover { background: var(--primary-soft); }
  .top-tools { gap: 0; }
  .mode-pill { min-height: 32px; }
  .studio-content { padding: 21px 14px max(32px,env(safe-area-inset-bottom)); }
  .page-title { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
  .page-title p { max-width: 65ch; font-size: 13px; }
  .page-title .button,.button:not(.small),.icon-button { min-height: 44px; }
  .page-title .button { font-size: 13px; }
}

.entry-page { min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); background: var(--surface); }
.entry-art { isolation: isolate; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: var(--rail); color: white; padding: clamp(32px,5vw,90px); }
.entry-art::before { content: ""; z-index: -1; position: absolute; inset: 0; background-image: linear-gradient(145deg,#102e58aa,transparent 64%),linear-gradient(to top,#0b254add,transparent 64%),url("/covers/editorial-mobility.jpg"); background-position: center; background-size: cover; }
.entry-wordmark { color: white; }
.entry-art-caption span { color: #e1eee2; font-size: 16px; font-weight: 500; }
.entry-art-caption p { font-size: clamp(46px,5.8vw,92px); font-weight: 650; line-height: .99; letter-spacing: -.059em; margin-top: 12px; }
.entry-form { width: min(435px,100%); align-self: center; justify-self: center; padding: 40px 20px; }
.entry-workspace { color: var(--primary); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; margin-bottom: 23px; }
.entry-workspace .icon { width: 17px; height: 17px; }
.entry-form h1 { font-size: clamp(32px,3vw,46px); line-height: 1.13; margin-bottom: 10px; }
.entry-form>p { font-size: 14px; color: var(--muted); margin-bottom: 25px; }
.entry-roles { display: grid; gap: 10px; }
.entry-role { display: flex; width: 100%; align-items: center; gap: 13px; text-align: left; padding: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; }
.entry-role:hover { border-color: var(--primary); background: var(--primary-soft); }
.entry-role .entry-glyph { border-radius: 9px; height: 39px; width: 39px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.entry-role strong,.entry-role small { display: block; }
.entry-role strong { font-size: 15px; }
.entry-role small { font-size: 12px; margin-top: 2px; color: var(--muted); }
.entry-role>.icon:last-child { margin-left: auto; width: 15px; height: 15px; }
.entry-form .entry-note { display: flex; gap: 7px; font-size: 12px; margin-top: 20px; }
.entry-note .icon { width: 15px; height: 15px; }
.entry-form form>.button { width: 100%; }
@media (max-width:760px) {
  .entry-page { display: flex; flex-direction: column; }
  .entry-art { min-height: 220px; padding: 22px; }
  .entry-art::before { background-position: center 38%; }
  .entry-art-caption p { font-size: 33px; }
  .entry-art-caption p br { display: none; }
  .entry-art-caption span { font-size: 12px; }
  .entry-form { padding: 28px 22px; }
}

.error-shortcut { display:inline-flex; align-items:center; gap:5px; min-height:44px; padding:0 8px; color:var(--ink); text-decoration:none; border-radius:7px; font-size:13px; font-weight:650; }
.error-shortcut:hover {background:var(--primary-soft)}
.error-shortcut .icon {width:16px;height:16px}
.error-shortcut:has(.nav-count--error:not([hidden])) {color:var(--danger)}
@media(max-width:410px){.compose-workspace .editor-actions {flex-wrap:wrap}.error-shortcut {padding:0 5px}}
.adjustments {display:grid;gap:16px;max-width:850px}
.adjustments fieldset {display:flex;gap:18px;border:0;padding:0}
.adjustments legend {font-weight:650}
.adjustments fieldset label {display:inline-flex;gap:7px;align-items:center;min-height:44px}
.adjustments button {justify-self:start}
.adjustments section,.adjustments article,.adjustments details form {display:grid;gap:12px}
.adjustments .record-card {padding:18px}
.adjustments article p {white-space:pre-wrap;overflow-wrap:anywhere}
.adjustments summary {cursor:pointer;padding:10px 0;color:var(--primary)}
