* {box-sizing:border-box}
body {margin:0;font:15px/1.45 var(--mc-sans);color:var(--mc-ink);background:var(--mc-page);-webkit-font-smoothing:antialiased}
a {color:inherit;text-decoration:none}
:where(a,summary,input,textarea,select,button):focus-visible {outline:3px solid var(--mc-focus);outline-offset:3px}
h1,h2,h3,p,figure,dl,dd {margin:0}
h1,h2,h3 {font-family:var(--mc-display);line-height:1.15;letter-spacing:-.035em}
h2 {font-size:var(--mc-section);font-weight:630}
h3 {font-size:1.12rem;font-weight:620}
.erp-shell {--rail:202px;--rail-bg:#1c332e;--rule:#d9dfd8;display:grid;grid-template-columns:var(--rail) minmax(0,1fr);grid-template-rows:1fr auto;min-height:100vh}
.frame {width:min(100%,1530px);min-width:0;margin:0 auto;padding-inline:clamp(22px,2.8vw,48px);grid-column:2}
main.frame {padding-top:12px}
.skip {position:fixed;top:4px;left:8px;z-index:15;transform:translateY(-160%);padding:10px;background:white}
.skip:focus {transform:none}
.site-header {grid-row:1/3;background:var(--rail-bg);color:white;z-index:5}
.mast {position:sticky;top:0;max-height:100dvh;overflow-y:auto;padding:30px 14px}
.brand {display:flex;align-items:center;gap:7px;padding:2px 10px 24px}
.brand img {width:124px;height:auto;filter:brightness(0) invert(1)}
.brand span {color:#bad0c1;font:600 .6rem var(--mc-sans);letter-spacing:.12em}
.icon {width:19px;height:19px;flex:none}
.wide-nav,.compact-nav nav {display:grid;gap:3px}
.wide-nav a,.compact-nav nav a {display:flex;align-items:center;gap:11px;color:#d7e2d9;padding:10px 12px;border-radius:4px;font-weight:510;font-size:.88rem}
.wide-nav a:hover,.compact-nav nav a:hover {background:#29463c;color:white}
.wide-nav a[aria-current],.compact-nav nav a[aria-current] {background:#355449;color:white;box-shadow:inset 3px 0 #b9d999}
.nav-catas {margin-top:12px;border-top:1px solid #496056;padding-top:17px!important}
.nav-catas span:last-child {margin-left:auto}
.compact-nav {display:none}
.site-header :focus-visible {outline-color:#c9e6ad;outline-offset:-2px}
.footer,.section-head,.files a,.user-identity,.user-role {display:flex;align-items:center;gap:12px}
.footer,.section-head {justify-content:space-between}
.footer {color:var(--mc-muted);font-size:.76rem;padding-block:24px}
.section-head {margin:16px 0}
.section-head a,.pilot-link,.footer a {color:var(--mc-forest);font-size:.84rem;font-weight:600}
:is(.section-head,.footer,.crumb) a:hover,.pilot-link:hover,.files a:hover .file-name {text-decoration:underline;text-underline-offset:3px}
.action,.settings button {display:inline-flex;align-items:center;gap:12px;min-height:42px;margin-top:12px;padding:9px 16px;border:0;border-radius:var(--mc-control);background:var(--mc-forest);color:white;font:600 .875rem var(--mc-sans);cursor:pointer}
.action:hover,.settings button:hover {background:#163a30}
.module-list {display:grid;border-block:1px solid var(--rule);background:white}
.module {display:grid;grid-template-columns:34px minmax(160px,.85fr) minmax(150px,1.4fr) minmax(105px,.5fr) 14px;align-items:center;gap:10px;padding:17px 19px;border-bottom:1px solid var(--rule)}
.module:last-child {border:0}
.module:hover {background:#f2f6ef}
.module .icon {color:var(--mc-forest);width:22px;height:22px}
.module p,.workflow dd {color:var(--mc-muted);font-size:.88rem}
.section-status {justify-self:start;display:inline-flex;gap:5px;align-items:center;font-size:.76rem;font-weight:600;color:var(--mc-forest)}
.section-status-construction {color:#806022}
.split,.library,.guide-grid {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:start;gap:24px}
.library,.guide-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.library section,.split>section,.materials,.reader,.account-panel,.guide-grid section {min-width:0;padding:18px 20px;background:white;border:1px solid var(--rule);border-radius:var(--mc-card)}
.workflow>div,.files li {padding-block:12px;border-bottom:1px solid var(--rule)}
.workflow>div:last-child,.files li:last-child {border:0;padding-bottom:0}
.workflow dt {font-weight:600}.workflow dd {margin-top:3px}
.files,.user-list {padding:0;list-style:none;margin:10px 0 0}
.files a {align-items:baseline}.files small {margin-left:auto;color:var(--mc-muted)}
.pilot-link {display:inline-flex;margin-top:15px}
.crumb,.reader {margin-block:16px}
.crumb {font-size:.83rem;color:var(--mc-muted)}
.reader {max-width:95ch;line-height:1.65}
.reader h1 {font-size:var(--mc-title)}.reader h2 {margin:1.4em 0 .4em}
.reader p,.reader ul {margin:.8em 0}.reader a {text-decoration:underline}
.table-scroll {overflow:auto}.reader table {min-width:680px;border-collapse:collapse}.reader th,.reader td {padding:10px;border:1px solid var(--mc-line);text-align:left;vertical-align:top}
.count {font:550 .84rem var(--mc-sans);color:var(--mc-muted);margin-left:6px}
.user-entry {padding:13px 0;border-bottom:1px solid var(--rule);display:grid;gap:6px;min-width:0}
.user-entry:last-child {border:0}.user-identity>div {min-width:0;overflow-wrap:anywhere}
.user-identity small,.user-entry>small {display:block;color:var(--mc-muted);font-size:.76rem}
.avatar {display:grid;place-items:center;width:36px;height:36px;border-radius:4px;background:var(--mc-linen);color:var(--mc-forest);font-weight:600}
.user-role {gap:8px;font-size:.78rem}.state {color:var(--mc-forest)}.state.paused {color:#884c2b}
.edit-user summary,.settings label {font-size:.83rem;font-weight:600}
.edit-user summary {width:fit-content;color:var(--mc-forest);cursor:pointer;padding-block:6px}
.user-form,.invite-form,.settings label {display:grid;gap:6px}.user-form,.invite-form {gap:12px;margin-top:10px}
.settings :is(input,select) {width:100%;min-width:0;min-height:44px;padding:8px 12px;border-radius:var(--mc-control);background:white;border:1px solid var(--mc-line);color:var(--mc-ink);font:inherit}
.settings button {width:fit-content;margin:0}
.settings-feedback {padding:11px 14px;background:var(--mc-pistachio);margin:0 0 15px}.settings-feedback.error {background:#f6ded4;color:#813b24}
.account-panel {max-width:620px}.guide-grid section {break-inside:avoid}.guide-grid p {margin-top:9px;color:var(--mc-muted)}
.swatches {display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.swatches div {padding:8px 10px;border:1px solid var(--rule);border-radius:3px}.swatches dt {font-weight:600}.swatches dd {font:12px monospace}
.swatch-page {background:var(--mc-page)}.swatch-ink {background:var(--mc-ink);color:white}.swatch-forest {background:var(--mc-forest);color:white}
.swatch-pistachio {background:var(--mc-pistachio)}.swatch-honey {background:var(--mc-honey)}.swatch-clay {background:var(--mc-clay)}.swatch-linen {background:var(--mc-linen)}
.swatch-parchment {background:var(--mc-parchment)}.swatch-mist {background:var(--mc-mist)}
.guide-shell {display:flex;flex-direction:column}
.guide-shell .mast {max-width:1530px;padding:15px clamp(16px,2.8vw,48px);margin:auto}
.guide-shell .brand {padding:0;width:fit-content}.guide-shell main {flex:1}
@media(max-width:1040px) {
  .erp-shell {display:flex;flex-direction:column}
  .mast {position:relative;display:flex;justify-content:space-between;align-items:center;padding:8px 18px;overflow:visible;max-height:none}
  .brand {padding:8px 0}.wide-nav {display:none}.compact-nav {display:block}
  .compact-nav summary {min-height:44px;display:flex;align-items:center;gap:8px;padding-inline:8px;cursor:pointer;font-size:.85rem}
  .compact-nav summary::-webkit-details-marker {display:none}
  .compact-nav nav {position:absolute;z-index:6;right:12px;top:100%;width:min(260px,94vw);padding:9px;background:var(--rail-bg);box-shadow:0 5px 15px #152d2b38}
  .compact-nav nav a {min-height:44px}
  main.frame {flex:1}
}
@media(max-width:700px) {
  .frame {padding-inline:16px}main.frame {padding-top:0}
  .split,.library,.guide-grid {grid-template-columns:1fr;gap:14px}
  .module {grid-template-columns:24px minmax(0,1fr) 16px;gap:4px 10px;padding:14px 10px}
  .module p,.module .section-status {grid-column:2}
  .module .arrow {grid-area:1/3}
  .footer {font-size:.7rem}
}
@media(prefers-reduced-motion:no-preference) {a,button,summary {transition:background-color .16s ease,color .16s ease}}
@media print {
  @page {size:A4;margin:12mm}
  .erp-shell {display:block;background:white}
  .frame {width:100%;padding:0}
  .site-header,.footer,.skip {display:none}
  .guide-grid {grid-template-columns:1fr 1fr;gap:9px}
  .swatches div {print-color-adjust:exact}
}
.site-header .section-status {display:flex;font-size:.65rem;color:#c3dbc3;font-weight:450;gap:3px}
.site-header .section-status-construction {color:#e8cda0}

.rail-toggle {display:none}
.staging-label {font-size:.78rem;color:#70551e;background:#f4edda;border-left:3px solid #b89955;padding:4px 10px;margin-bottom:5px}
@media screen and (min-width:1041px) {
  .erp-shell:not(.guide-shell) .site-header {
    position:sticky;top:0;align-self:start;height:100vh;height:100dvh;min-width:0;
  }
  .erp-shell:not(.guide-shell) .mast {overflow-x:hidden}
  .rail-toggle:not([hidden]) {
    display:grid;place-items:center;position:absolute;z-index:1;right:0;top:50%;
    transform:translate(50%,-50%);width:34px;height:34px;padding:0;
    border:1px solid #617f70;border-radius:50%;background:#29483c;color:#edf4e5;
    box-shadow:0 2px 6px #152d2b30;cursor:pointer;
  }
  .rail-toggle svg {display:block}
  .rail-toggle:hover,.rail-toggle:focus-visible {background:#365e49;border-color:#9fb997}
  .rail-toggle:focus-visible {outline-offset:2px}
  .rail-toggle[aria-expanded="false"] svg {transform:rotate(180deg)}
  .wide-nav {grid-template-columns:minmax(0,1fr)}
  .wide-nav a {overflow:hidden;white-space:nowrap}
  .wide-nav a > span,.brand img {flex:none}
  .erp-shell:not(.guide-shell) .brand {height:42px;overflow:hidden;white-space:nowrap}
  .erp-shell.rail-collapsed {--rail:62px}
  .rail-collapsed .mast {padding-inline:6px}
  .rail-collapsed .brand {padding-inline:2px}
  .rail-collapsed .brand img {width:46px}
  .rail-collapsed .wide-nav a {padding-inline:15.5px}
  .rail-collapsed .brand span,.rail-collapsed .wide-nav a > span {opacity:0;transform:translateX(-5px)}
}
@media screen and (min-width:1041px) and (prefers-reduced-motion:no-preference) {
  .rail-toggle {transition:background-color 140ms ease,border-color 140ms ease,box-shadow 140ms ease}
  .rail-toggle:hover {box-shadow:0 0 0 3px #91af8b33,0 2px 6px #152d2b30}
  .rail-toggle:active {box-shadow:0 0 0 1px #91af8b33}
  /* Animate interactions. Restoring a saved width on navigation should be immediate. */
  .rail-interactive {
    --rail-motion:240ms cubic-bezier(.22,.68,.18,1);
    transition:grid-template-columns var(--rail-motion);
  }
  .rail-interactive :is(.mast,.brand) {transition:padding-inline var(--rail-motion)}
  .rail-interactive .wide-nav a {
    transition:padding-inline var(--rail-motion),background-color 140ms ease,color 140ms ease;
  }
  .rail-interactive .brand img {transition:width var(--rail-motion)}
  .rail-interactive .rail-toggle svg {transition:transform var(--rail-motion)}
  .rail-interactive :is(.brand span,.wide-nav a > span) {transition:opacity 160ms ease,transform var(--rail-motion)}
}
.stage-welcome main {max-width:640px;margin:10vh auto;padding:28px;background:var(--mc-paper);border:1px solid var(--mc-line);border-radius:var(--mc-card)}
.stage-wordmark {display:block;width:115px;height:auto;margin-bottom:34px}
.stage-pose {float:right;object-fit:contain;margin-left:14px}
.stage-welcome h1 {font-size:2.1rem;margin:2px 0 14px}
.stage-kicker,.stage-note {font-size:.82rem;color:var(--mc-muted)}
.stage-welcome .action {margin-top:18px}
.stage-note {margin-top:22px}
