@import url("https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700;800&display=swap");
/* Firm Manager: Corporate Light shell with Eye-Saving Dark review surfaces.
   Only presentation changes; existing grids, pane sizes and spacing are retained. */
:root{
  --brand:#142D4E; --on-brand:#FFFFFF;
  --nav:#FFFFFF; --nav-text:#526176; --nav-active:#EDF2F8; --nav-line:#DFE5ED;
  --ground:#FFFFFF; --surface:#FFFFFF; --surface-2:#F5F7FA;
  --ink:#142D4E; --muted:#526176; --line:#DFE5ED;
  --brass:#A86B0A; --brass-soft:#FFF3DA; --brass-ink:#78500D;
  --warn-bg:#FFF3DA; --warn-ink:#78500D; --soft:#EAF0F8;
  --brand-ink:#142D4E; --danger:#B13D35;
  --danger-soft:#FCE9E7; --danger-ink:#9C3029;
  --radius:14px; --radius-s:9px; --shadow:none;
  --mono:"Schibsted Grotesk",system-ui,sans-serif;
  font-family:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-feature-settings:"tnum" 1;
  color:var(--ink); background:var(--ground); color-scheme:light;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{margin:0;background:var(--ground)}
a{color:var(--brand-ink)}
::selection{background:var(--soft)}

/* ---- Shell: fixed rail + content ---- */
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}
.nav{position:sticky;top:0;z-index:30;height:100vh;overflow-y:auto;background:var(--nav);color:#E8EEEB;padding:18px 12px;display:flex;flex-direction:column;gap:2px}
.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 18px;margin-bottom:6px;border-bottom:1px solid var(--nav-line)}
.brand span[data-firm-name]{font-weight:700;font-size:15px;line-height:1.2}
.logo{width:34px;height:34px;border-radius:10px;background:var(--brand);color:var(--on-brand);display:flex;align-items:center;justify-content:center;font-weight:800;overflow:hidden;flex:none}
.brand small{display:block;font-size:12px;color:var(--nav-text);opacity:.8}
.nav a{display:flex;align-items:center;gap:11px;color:var(--nav-text);text-decoration:none;padding:9px 10px;border-radius:9px;font-size:14px;font-weight:500;line-height:1.2}
.nav a svg{width:18px;height:18px;flex:none;opacity:.85}
.nav a:hover{background:var(--nav-active);color:#fff}
.nav a[aria-current="page"]{background:var(--brand);color:var(--on-brand)}
.nav a[aria-current="page"] svg{opacity:1}
.nav .badge{margin-left:auto}
.nav .who{margin-top:auto;padding:14px 8px 4px;border-top:1px solid var(--nav-line);font-size:13px;color:var(--nav-text)}
.nav-toggle{display:none}
/* Settings wheel: name + wheel at the bottom of the rail; the menu opens beside the rail. */
.who .me{display:flex;align-items:center;gap:10px}
.who .me [data-user-name]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#E8EEEB;font-weight:600}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--nav-active);color:#E8EEEB;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex:none}
.gear{width:36px;height:36px;border-radius:9px;border:1px solid var(--nav-line);background:transparent;color:var(--nav-text);display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.gear svg{width:19px;height:19px;transition:transform .25s}
.gear:hover{color:#fff;background:var(--nav-active)}
.gear[aria-expanded="true"]{color:#fff;background:var(--nav-active)}
.gear[aria-expanded="true"] svg{transform:rotate(60deg)}
.gear-menu{position:fixed;left:256px;bottom:14px;z-index:40;width:300px;max-height:calc(100vh - 28px);overflow-y:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px -12px rgba(0,0,0,.35);padding:8px;display:flex;flex-direction:column;gap:2px}
.nav .gear-menu .gm-group{display:flex;flex-direction:column;padding:6px 0;border-top:1px solid var(--line)}
.nav .gear-menu .gm-group:first-child{border-top:0}
.nav .gear-menu .gm-head{display:block;font-weight:700;font-size:14px;color:var(--ink) !important;text-decoration:none;padding:6px 10px;border-radius:7px}
.nav .gear-menu .gm-link{display:block;font:inherit;font-size:13.5px;text-align:left;background:none;border:0;color:var(--muted) !important;text-decoration:none;padding:6px 10px 6px 20px;border-radius:7px;cursor:pointer}
.nav .gear-menu .gm-head:hover,.nav .gear-menu .gm-link:hover{background:var(--surface-2);color:var(--ink) !important}
.nav .gear-menu button.gm-link{padding-left:10px}
.nav .gear-menu .gm-danger{color:var(--danger-ink) !important}
.nav .gear-menu .gm-row{flex-direction:row;align-items:center;justify-content:space-between;padding:8px 10px}
.nav .gear-menu .gm-label{font-size:13.5px;font-weight:600}
.seg{display:flex;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:2px}
.seg button{font:inherit;font-size:12.5px;font-weight:600;border:0;background:none;color:var(--muted);padding:5px 10px;border-radius:6px;cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.om-dialog{border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);padding:24px;max-width:460px;width:calc(100% - 32px);display:flex;flex-direction:column;gap:12px}
.om-dialog:not([open]){display:none}
.om-dialog::backdrop{background:rgba(8,17,15,.55)}
.om-erase{border-left:3px solid var(--danger);padding:4px 0 4px 12px;display:flex;flex-direction:column;gap:8px;font-size:14px;line-height:1.5}
.om-erase p{margin:0}
.om-dialog h2{margin:0;font-size:19px}
.om-dialog p{margin:0;line-height:1.5;color:var(--muted);font-size:14px}
.om-ask{max-width:520px}
.om-ask h2{font-size:20px;line-height:1.35}
.om-ask .om-ask-ctx{font-size:13px}
.om-ask .om-ask-opts{flex-wrap:wrap;gap:8px;justify-content:flex-start}
.om-ask .om-ask-opts .btn{min-width:90px}
.om-ask .om-ask-note{font:inherit;font-size:15px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);width:100%;box-sizing:border-box}
.om-ask .om-ask-link{font-size:13px;margin-left:auto;align-self:center}
.om-check{display:flex;gap:8px;align-items:flex-start;font-weight:500;line-height:1.45}
.om-actions{display:flex;justify-content:flex-end;gap:8px}
.om-dialog .btn.danger,.btn.danger{background:var(--danger);color:#fff;border:0}
.nav a.in-wheel{display:none}
.lang-switch{margin:4px 0 0;text-align:center}
.link-lang{font:inherit;font-size:13px;background:none;border:0;color:var(--muted);text-decoration:underline;cursor:pointer;padding:6px}

.main{min-width:0;width:100%;max-width:1240px;padding:28px 36px 56px;display:flex;flex-direction:column;gap:18px}
h1{margin:0;font-size:28px;font-weight:800;letter-spacing:-.025em;line-height:1.15}
h2,h3{letter-spacing:-.015em}
.lead{margin:0;color:var(--muted);line-height:1.5;max-width:72ch;font-size:15px}

/* Sections: one surface level; list items are lighter so the hierarchy reads. */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;display:flex;flex-direction:column;gap:14px;box-shadow:var(--shadow)}
.card h2{margin:0;font-size:17px;font-weight:700}
label{font-size:13px;font-weight:600;color:var(--muted)}
input[type=text],input[type=password],input[type=search],input[type=email],select,textarea{font:inherit;font-size:15px;color:var(--ink);background:var(--surface);border:1px solid #C9D3CE;border-radius:var(--radius-s);padding:10px 12px;min-height:42px;width:100%}
textarea{line-height:1.5}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 18%,transparent)}
.field{display:flex;flex-direction:column;gap:6px}
.btn{font:inherit;font-size:14px;border:0;background:var(--brand);color:var(--on-brand);border-radius:var(--radius-s);padding:10px 18px;min-height:42px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;transition:filter .12s,transform .12s}
.btn:hover{filter:brightness(1.08)}
.btn:active{transform:translateY(1px)}
.btn.ghost{background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover{border-color:var(--brand);filter:none}
.btn:disabled{opacity:.5;cursor:not-allowed}
.row{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.grow{flex:999 1 460px;min-width:0;display:flex;flex-direction:column;gap:16px}
.side{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:12px}
.status{font-size:14px;min-height:20px;color:var(--muted)}
.status.error{color:var(--danger)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{font:inherit;font-size:13px;font-weight:600;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:999px;padding:7px 14px;min-height:36px;cursor:pointer}
.chip[aria-pressed="true"]{background:var(--ink);color:var(--surface);border-color:var(--ink)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
details>summary{cursor:pointer;font-weight:600}

/* ---- Tabs built from a long page's sections ---- */
.tabs{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:color-mix(in srgb,var(--ground) 88%,transparent);backdrop-filter:blur(8px);border:1px solid var(--line);border-radius:12px;scrollbar-width:none}
.tabs button{font:inherit;font-size:14px;font-weight:600;white-space:nowrap;min-height:36px;border:0;background:none;color:var(--muted);padding:8px 14px;border-radius:8px;cursor:pointer}
.tabs button:hover{color:var(--ink);background:var(--surface)}
.tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}

/* ---- Small screens: the rail becomes a top bar with a menu ---- */
@media (max-width:860px){
  .shell{grid-template-columns:1fr}
  .nav{position:sticky;top:0;height:auto;z-index:20;flex-direction:row;flex-wrap:wrap;align-items:center;padding:10px 12px;gap:6px}
  .brand{border:0;padding:0;margin:0;flex:1}
  .nav-toggle{display:inline-flex;font:inherit;background:var(--nav-active);color:#fff;border:0;border-radius:8px;padding:8px 12px;min-height:40px;cursor:pointer}
  .nav a,.nav .who{display:none;width:100%}
  .nav.open a:not([hidden]),.nav.open .who{display:flex}
  .nav.open .who{display:block}
  .gear-menu{position:static;width:100%;margin-top:8px;box-shadow:none}
  .main{padding:18px 16px 40px}
  h1{font-size:24px}
  .tabs{position:static}
  .tabs button{font-size:13px;padding:7px 10px}
}
@media (prefers-reduced-motion:reduce){*{transition:none !important;scroll-behavior:auto !important}}
/* Visible notification centre, shared by every work screen. */
.notification-tools{position:sticky;top:0;z-index:35;display:flex;justify-content:flex-end;padding:10px 0;margin-bottom:12px;background:var(--ground)}
.notification-tools .bell{position:relative;display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--radius-s);background:var(--surface);color:var(--ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.notification-tools .bell:hover,.notification-tools .bell[aria-expanded="true"]{background:var(--soft);border-color:var(--brand)}
.notification-tools .bell svg{width:20px;height:20px}
.notification-tools .bell-badge{position:static;display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--danger);color:var(--on-brand);font-size:12px;font-weight:700}
.bell-panel{position:fixed;top:72px;right:16px;left:auto;bottom:auto;z-index:60;width:min(430px,calc(100vw - 32px));max-height:calc(100dvh - 90px);overflow:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 18px 50px rgba(0,0,0,.25);padding:16px}
.bell-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 0 12px}
.bell-head h2{margin:0;font-size:20px}
.bell-close{min-width:40px;min-height:40px;border:0;border-radius:8px;background:var(--surface-2);color:var(--ink);font:inherit;font-size:26px;cursor:pointer}
.bell-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.bell-filter{min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:22px;background:var(--surface-2);color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.bell-filter[aria-pressed="true"]{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
.bell-status{font-size:12px;color:var(--muted);margin:0 0 10px}
.bell-item{display:flex;flex-direction:column;gap:6px;padding:14px 0;border-bottom:1px solid var(--line)}
.bell-item.read .bell-title{font-weight:500}
.bell-item-label{display:flex;align-items:center;justify-content:space-between;gap:12px}
.bell-type{font-size:12px;font-weight:600;color:var(--brand-ink)}
.bell-title{font-size:14px;line-height:1.45}
.bell-meta,.bell-time{font-size:12px;line-height:1.4;color:var(--muted)}
.bell-unread{width:8px;height:8px;flex:none;border-radius:50%;background:var(--danger)}
.bell-item-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px}
.bell-open,.bell-retry{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--brand-ink);font:inherit;font-size:13px;text-decoration:none;cursor:pointer}
.bell-panel .linkish{min-height:40px;border:0;background:none;color:var(--brand-ink);font:inherit;font-size:12px;text-decoration:underline;cursor:pointer}
.bell-panel .linkish:disabled{color:var(--muted);cursor:default;text-decoration:none}
.bell-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;padding-top:12px}
.bell-empty{padding:16px 0;color:var(--muted);margin:0;font-size:14px}
.bell-panel button:focus-visible,.bell-panel a:focus-visible,.notification-tools .bell:focus-visible{outline:3px solid var(--brand-ink);outline-offset:3px}
@media(max-width:900px){.notification-tools{top:54px}.bell-panel{right:12px;left:12px;width:auto}.bell-item-actions{flex-wrap:wrap}}

/* Keep the corporate palette local to the shell, including after firm branding loads. */
.shell{
  --brand:#142D4E; --on-brand:#FFFFFF; --brand-ink:#142D4E;
}
.nav{color:var(--ink);border-right:1px solid var(--nav-line)}
.nav a:hover,.nav .who .me [data-user-name],
.nav .avatar,.nav .gear:hover,.nav .gear[aria-expanded="true"],
.nav .nav-toggle{color:var(--ink)}
.nav a[aria-current="page"]{color:var(--on-brand)}
.page-head h1,.card h2,.workspace-heading{color:var(--ink)}

/* Task-based dark islands. Scope tokens at the surface so nested content,
   dynamic tables, both testing panes and controls share the same palette. */
:is(.main:has(#items-card) > .card:not(#login),.ea-panel > .card,
    .table-box,.rich-table,table,.ask){
  --brand:#FFC35C; --on-brand:#1C2026; --brand-ink:#FFD080;
  --surface:#20242B; --surface-2:#272C34; --ground:#1C2026;
  --ink:#E8ECF2; --muted:#B5BFCD; --line:#414A58;
  --soft:#3B3020; --brass:#FFC35C; --brass-soft:#3B3020;
  --brass-ink:#FFD080; --warn-bg:#3B3020; --warn-ink:#FFD080;
  --danger:#FFAAA0; --danger-soft:#402B2C; --danger-ink:#FFB6AD;
  --shadow:none;
  color:var(--ink);background:var(--surface);color-scheme:dark;
  box-shadow:none;
}
:is(.main:has(#items-card) > .card:not(#login),.ea-panel > .card,
    .table-box,.rich-table,table,.ask) :is(input,select,textarea){
  color:var(--ink);background:var(--surface-2);border-color:var(--line);
  accent-color:var(--brand);box-shadow:none;
}
:is(.main:has(#items-card) > .card:not(#login),.ea-panel > .card,
    .table-box,.rich-table,table,.ask) :is(input,textarea)::placeholder{
  color:var(--muted);opacity:1;
}
:is(.main:has(#items-card) > .card:not(#login),.ea-panel > .card,
    .table-box,.rich-table,table,.ask) :is(input,select,textarea):focus{
  outline:2px solid var(--brand);outline-offset:2px;
  border-color:var(--brand);box-shadow:none;
}
:is(.main:has(#items-card) > .card:not(#login),.ea-panel > .card,
    .table-box,.rich-table,table,.ask) :focus-visible{
  outline:2px solid var(--brand);outline-offset:2px;box-shadow:none;
}
:is(.main:has(#items-card) > .card:not(#login),.ea-panel > .card,
    .table-box,.rich-table,table,.ask) ::selection{
  background:#FFC35C;color:#1C2026;
}
:is(.table-box,.rich-table,table) :is(th,td){
  color:var(--ink);border-color:var(--line);box-shadow:none;
}
:is(.table-box,.rich-table,table) th{
  background:var(--surface-2);color:var(--muted);
}
table :is(a,.linkish){color:var(--brand-ink)}
table tbody tr:nth-child(even){background:var(--surface-2)}
table tbody tr:is(:hover,:focus-within,:has(input:checked),[aria-selected="true"]){
  background:var(--soft);
}
table tbody tr:is(:focus-within,:has(input:checked),[aria-selected="true"]) > :first-child{
  background-image:linear-gradient(to right,var(--brand) 3px,transparent 3px);
}
.main:has(#items-card) :is(#items,#rev-points) > .it:focus-within{
  border-color:var(--brand);background:var(--surface-2);
}
.main:has(#items-card) :is(#items a,#pop-result strong,#sample-result strong){
  color:var(--brand-ink);
}
.main:has(#items-card) .ok{color:#9CDEB4}
.main:has(#items-card) .bad{color:var(--danger-ink)}
.main:has(#items-card) .gaps{border-color:var(--danger)}
.ask :is(label,.form-grid label,.note){color:var(--muted)}
.ask .answer{background:var(--surface-2);color:var(--ink)}
@media(max-width:860px){.nav{border-right:0;border-bottom:1px solid var(--nav-line)}}

