/* Orli Studio — admin-only skin for the pinned Decap 3.16.3 UI.
   Follow shared design tokens and stable Emotion component labels, not hashes.
   Keep all existing controls, links and publishing behavior intact. */
:root {
  --studio-navy:#19336f; --studio-sky:#74d8f5; --studio-ice:#ecfafc;
  --studio-paper:#fcf9f5; --studio-ink:#202b40; --studio-line:#e7e0d8;
  --studio-muted:#5b616b; --studio-gold:#d9a441; --studio-focus:#244fbf;
  --studio-select:#e7eeff; --studio-inverse:#e3edff; --studio-inverse-line:#7897c8;
  --studio-pattern:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='112' viewBox='0 0 64 112'%3E%3Cpath d='M62 28 17 54 17 2Z M2 28 47 2 47 54Z M30 84 -15 110 -15 58Z M-30 84 15 58 15 110Z M94 84 49 110 49 58Z M34 84 79 58 79 110Z' fill='none' stroke='%2374D8F5' stroke-width='4.1' stroke-linecap='round' stroke-dasharray='.1 7.3' opacity='.22'/%3E%3C/svg%3E");
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body { margin:0; background:var(--studio-paper); color:var(--studio-ink); }
body:has(.studio-welcome) { min-height:100vh; display:grid; place-items:center; background-color:var(--studio-navy); background-image:var(--studio-pattern); }
body:has(.studio-welcome) #nc-root { width:100%; min-height:100vh; display:grid; place-items:center; background:transparent; }
.studio-welcome {
  box-sizing:border-box; width:min(480px,calc(100% - 32px)); margin:32px auto; padding:40px;
  background:white; border:1px solid var(--studio-line); border-radius:32px;
  box-shadow:0 24px 80px #0d214b55; color:var(--studio-ink); font:16px/1.6 system-ui,sans-serif;
}
.studio-welcome::before { content:""; display:block; width:160px; height:48px; margin-bottom:32px; background:url("./studio-logo-dark.svg") left center / contain no-repeat; }
.studio-welcome h1 { color:var(--studio-navy); font-size:32px; letter-spacing:-.045em; line-height:1.1; margin:0 0 16px; font-weight:700; }
.studio-welcome p { color:var(--studio-muted); margin:0 0 24px; }
.studio-welcome small { display:block; color:var(--studio-muted); font-size:12px; letter-spacing:.08em; font-weight:650; margin:0 0 12px; }
.studio-login-button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 20px; box-sizing:border-box; border-radius:999px; background:var(--studio-sky); color:var(--studio-navy); font-weight:700; text-decoration:none; }
.studio-login-button:hover { background:var(--studio-ice); }
.studio-welcome .studio-login-note { font-size:13px; margin:24px 0 0; }
.studio-welcome a:not(.studio-login-button) { color:var(--studio-navy); }
/* Collection shell. */
#nc-root { font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--studio-ink); background:var(--studio-paper); }
#nc-root header[class*="-AppHeader"] { background-color:var(--studio-navy); background-image:var(--studio-pattern); color:white; box-shadow:0 1px 0 #19336f12; }
#nc-root [class*="-AppHeaderContent"] { max-width:1520px; }
#nc-root [class*="-AppHeaderLogo"] img { width:160px; max-height:64px; padding:8px 18px 8px 8px; }
#nc-root [class*="-AppHeaderNavLink"], #nc-root [class*="-AppHeaderButton"], #nc-root [class*="-AppHeaderSiteLink"] { color:var(--studio-inverse); font-weight:600; }
#nc-root [class*="-AppHeaderNavLink"] svg, #nc-root [class*="-AppHeaderButton"] svg { color:inherit; }
#nc-root [class*="-AppHeaderNavLink"].header-link-active, #nc-root [class*="-AppHeaderNavLink"]:hover, #nc-root [class*="-AppHeaderButton"]:hover { color:var(--studio-sky); }
#nc-root [class*="-AppHeaderQuickNewButton"] { background:var(--studio-sky); color:var(--studio-navy); border-radius:999px; border:0; font-weight:700; }
#nc-root [class*="-AppHeaderQuickNewButton"] svg { color:var(--studio-navy); }
#nc-root [class*="-AppHeaderSiteLink"]:hover { color:white; }
#nc-root [class*="-CollectionContainer"] { max-width:1480px; margin-inline:auto; padding-inline:24px; }
#nc-root [class*="-SidebarContainer"] { background:white; border:1px solid var(--studio-line); border-radius:24px; padding:16px 0; box-shadow:none; }
#nc-root [class*="-SidebarHeading"] { color:var(--studio-navy); font-size:20px; letter-spacing:-.035em; font-weight:700; }
#nc-root [class*="-SidebarNavList"] { padding:0 8px; }
#nc-root [class*="-SidebarNavLink"] { color:var(--studio-ink); border:0; border-radius:12px; margin:2px 0; padding:12px; min-height:44px; font-size:14px; font-weight:550; gap:4px; }
#nc-root [class*="-SidebarNavLink"]:hover { background:var(--studio-paper); color:var(--studio-navy); }
#nc-root [class*="-SidebarNavLink"].sidebar-active { color:var(--studio-navy); background:var(--studio-select); font-weight:700; }
#nc-root [class*="-SidebarNavList"] li:has(> a[data-testid="articles"])::before,
#nc-root [class*="-SidebarNavList"] li:has(> a[data-testid="website_home"])::before { display:block; padding:12px 12px 5px; color:var(--studio-muted); font-size:11px; letter-spacing:.09em; font-weight:700; }
#nc-root [class*="-SidebarNavList"] li:has(> a[data-testid="articles"])::before { content:"ORLI APP"; }
#nc-root [class*="-SidebarNavList"] li:has(> a[data-testid="website_home"])::before { content:"ORLI.DAY"; margin-top:12px; border-top:1px solid var(--studio-line); }
#nc-root [class*="-SearchInput"] { border-radius:12px; border-color:var(--studio-line); background:var(--studio-paper); }
#nc-root [class*="-CollectionTopContainer"] { margin-bottom:24px; border:0; border-radius:24px; padding:28px; color:white; background:var(--studio-navy); background-image:var(--studio-pattern); box-shadow:none; }
#nc-root [class*="-CollectionTopHeading"] { color:white; font-size:clamp(24px,3vw,34px); letter-spacing:-.045em; font-weight:700; }
#nc-root [class*="-CollectionTopDescription"] { color:var(--studio-inverse); max-width:66ch; }
#nc-root [class*="-CollectionTopNewButton"] { color:var(--studio-navy); background:var(--studio-sky); border:0; border-radius:999px; font-weight:700; }
#nc-root li[class*="-ListCard"], #nc-root li[class*="-GridCard"], #nc-root [class*="-WorkflowCardContainer"] { background:white; border:1px solid var(--studio-line); border-radius:16px; box-shadow:none; }
#nc-root [class*="-ListCardLink"]:hover, #nc-root [class*="-GridCardLink"]:hover { background:var(--studio-ice); }
#nc-root [class*="-ListCardTitle"], #nc-root [class*="-CardHeading"] { color:var(--studio-navy); font-weight:650; }
/* Editor: calm paper, clear authoring and review. */
#nc-root [class*="-EditorContainer"] { background:var(--studio-paper); }
#nc-root [class*="-ToolbarContainer"] { background:white; box-shadow:0 1px 0 var(--studio-line); }
#nc-root [class*="-ToolbarSectionBackLink"] { color:var(--studio-navy); border-color:var(--studio-line); }
#nc-root [class*="-ToolbarButton"], #nc-root [class*="-ToolbarDropdown"], #nc-root [class*="-SaveButton"], #nc-root [class*="-PublishButton"] { border-radius:999px; font-family:inherit; font-weight:650; }
#nc-root [class*="-SaveButton"]:not(:disabled) { color:var(--studio-navy); background:var(--studio-sky); }
#nc-root [class*="-PublishButton"]:not(:disabled) { color:white; background:var(--studio-navy); }
#nc-root [class*="-ControlPaneContainer"] { background:var(--studio-paper); }
#nc-root [class*="-ControlContainer"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), #nc-root [class*="-ControlContainer"] textarea { border-radius:12px; }
#nc-root [class*="-ControlHint"] { color:var(--studio-muted); }
#nc-root [class*="-PreviewPaneContainer"] { background:var(--studio-paper); }
.orli-editor { background:var(--studio-paper); border:1px solid var(--studio-line); border-radius:16px; padding:16px; }
.orli-editor textarea { display:block; width:100%; min-height:340px; resize:vertical; background:white; color:var(--studio-ink); border:1px solid var(--studio-line); border-radius:12px; padding:16px; font:16px/1.7 system-ui; box-sizing:border-box; }
.orli-editor small { display:block; color:var(--studio-muted); margin-top:8px; }
#nc-root :focus-visible, .studio-welcome :focus-visible, .orli-editor textarea:focus-visible { outline:3px solid var(--studio-focus); outline-offset:3px; }
#nc-root header[class*="-AppHeader"] :focus-visible { outline-color:var(--studio-sky); }
@media (max-width:799px) {
  #nc-root [class*="-CollectionContainer"] { padding-inline:12px; }
  #nc-root [class*="-CollectionTopContainer"] { padding:20px; }
  #nc-root [class*="-AppHeaderLogo"] img { width:122px; padding:8px; }
  .studio-welcome { padding:28px; }
}
@media (prefers-reduced-motion:reduce) {
  #nc-root *, .studio-welcome * { scroll-behavior:auto!important; transition-duration:0s!important; }
}

/* Orli Studio block ordering control: same semantic brand tokens as the reader. */
.orli-layout-editor{background:white;border:1px solid #E7E0D8;border-radius:22px;padding:17px}
.orli-layout-help{font-size:13px;color:#5B616B;margin:0 0 13px;line-height:1.6}
.orli-layout-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.orli-layout-row{display:flex;align-items:center;gap:12px;min-height:53px;padding:9px 12px;border:1px solid #E7E0D8;border-radius:14px;background:#FCF9F5;cursor:grab}
.orli-layout-row:focus-within{border-color:#244FBF}
.orli-layout-handle{color:#62718c;font-weight:700;cursor:grab}
.orli-layout-label{font-size:13px;color:#19336F;font-weight:650;flex:1}
.orli-layout-buttons{display:flex;gap:5px}
.orli-layout-buttons button{min-width:36px;min-height:36px;border-radius:9px;border:1px solid #d5dde5;background:white;color:#19336F;font-size:16px;cursor:pointer}
.orli-layout-buttons button:disabled{opacity:.35;cursor:default}
.orli-layout-buttons button:focus-visible,.orli-layout-add button:focus-visible{outline:3px solid #244FBF;outline-offset:2px}
.orli-layout-add{margin-top:15px;display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.orli-layout-add label{font-size:13px;font-weight:650;color:#19336F;flex:1}
.orli-layout-add select{display:block;margin-top:5px;width:100%;min-height:44px;padding:9px 11px;border:1px solid #E7E0D8;border-radius:12px;background:white;color:#202B40;font:inherit}
.orli-layout-add button{min-height:44px;border:0;border-radius:999px;background:#19336F;color:white;padding:10px 18px;font:650 13px system-ui;cursor:pointer}
.orli-layout-editor small{display:block;font-size:12px;color:#5B616B;margin-top:14px;line-height:1.6}
