/* DMX Document Centre
   Brand colours and typeface from the DMX logo guide:
   Maroon #990000 · Charcoal #333333 · Light grey #E6E6E6 · Montserrat.
   Deeper and lighter maroons below are mixed from the brand maroon. */
:root {
  --maroon: #990000;
  --charcoal: #333333;
  --grey: #e6e6e6;
  --white: #ffffff;

  --maroon-deep: color-mix(in srgb, var(--maroon) 45%, black);
  --maroon-ink: color-mix(in srgb, var(--maroon) 62%, black);
  --maroon-bright: color-mix(in srgb, var(--maroon) 85%, white);
  --maroon-soft: color-mix(in srgb, var(--maroon) 7%, white);
  --maroon-tint: color-mix(in srgb, var(--maroon) 14%, white);
  --maroon-line: color-mix(in srgb, var(--maroon) 24%, white);
  --page: color-mix(in srgb, var(--grey) 30%, white);
  --surface: var(--white);
  --line: color-mix(in srgb, var(--grey) 85%, var(--charcoal));
  --line-soft: var(--grey);
  --text: var(--charcoal);
  --muted: color-mix(in srgb, var(--charcoal) 64%, white);
  --faint: color-mix(in srgb, var(--charcoal) 42%, white);
  --on-dark: rgba(255,255,255,.92);
  --on-dark-muted: rgba(255,255,255,.66);
  --note-bg: #fff7e0;
  --note-line: #eed38a;

  --gutter: clamp(16px, 3.2vw, 56px);
  --rail: 288px;
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
  --shadow-1: 0 1px 2px rgba(51,0,0,.06), 0 2px 8px rgba(51,0,0,.04);
  --shadow-2: 0 2px 6px rgba(51,0,0,.06), 0 18px 40px -12px rgba(80,0,0,.22);
  --shadow-3: 0 30px 80px -20px rgba(40,0,0,.45);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text);
  background: var(--page); min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--maroon); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--maroon) 55%, white); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--maroon); color: #fff; }
.ico { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ================================================================ top bar */
.topbar {
  position: sticky; top: 0; z-index: 40; color: #fff;
  background: var(--maroon-deep);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), backdrop-filter .35s;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--maroon-deep) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 10px 30px -10px rgba(0,0,0,.4);
}
.topbar-inner { padding: 12px var(--gutter); display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { height: 36px; width: auto; display: block; transition: transform .4s var(--ease); }
.brand:hover img { transform: scale(1.03); }
.brand-divider { width: 1px; height: 24px; background: rgba(255,255,255,.25); }
.brand-title { font-weight: 600; white-space: nowrap; font-size: 15px; letter-spacing: .01em; color: var(--on-dark); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.accent-bar { height: 3px; background: linear-gradient(90deg, var(--maroon), var(--maroon-bright) 50%, var(--maroon)); background-size: 200% 100%; animation: sheen 6s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }
.role-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px;
  font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.12); color: #fff;
}
.role-pill .ico { width: 14px; height: 14px; }
.role-pill.admin { background: var(--maroon); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.topbar .btn-ghost { color: var(--on-dark); }
.topbar .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ================================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 99px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .25s var(--ease);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--maroon); color: #fff; box-shadow: 0 6px 16px -8px rgba(153,0,0,.8); }
.btn-primary:hover:not(:disabled) { background: var(--maroon-ink); box-shadow: 0 10px 24px -10px rgba(153,0,0,.9); }
.btn-dark { background: var(--charcoal); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-light { background: #fff; color: var(--maroon); }
.btn-light:hover { background: var(--maroon-soft); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-soft); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--maroon-soft); color: var(--maroon); }
.btn-danger { background: var(--surface); border-color: var(--line); color: var(--maroon); }
.btn-danger:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-icon { padding: 8px; }
.btn .ico { width: 16px; height: 16px; }

/* ================================================================ hero (overview) */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background:
    radial-gradient(120% 140% at 85% 10%, var(--maroon-bright) 0%, transparent 45%),
    radial-gradient(90% 120% at 0% 100%, var(--maroon-deep) 0%, transparent 60%),
    var(--maroon);
  padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(36px, 5vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 72px); align-items: center;
}
.hero-copy { position: relative; z-index: 2; max-width: 820px; }
.hero h1 {
  margin: 0; font-weight: 800; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(38px, 5.4vw, 92px);
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .08s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .16s; }
@keyframes rise { to { transform: none; } }
.hero-sub { margin: 22px 0 28px; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.6; color: var(--on-dark); max-width: 600px; opacity: 0; animation: fadein .9s .35s var(--ease) forwards; }
@keyframes fadein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.search { position: relative; max-width: 640px; opacity: 0; animation: fadein .9s .45s var(--ease) forwards; }
.search input {
  width: 100%; padding: 18px 20px 18px 56px; border-radius: 99px; border: 0; background: #fff; color: var(--text);
  font-size: 16px; outline: none; box-shadow: 0 20px 50px -18px rgba(30,0,0,.7);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.search input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 24px 60px -18px rgba(30,0,0,.8); transform: translateY(-1px); }
.search input::placeholder { color: var(--faint); }
.search > .ico { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--maroon); width: 22px; height: 22px; z-index: 1; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; color: var(--on-dark-muted); font-size: 14px; font-weight: 500; opacity: 0; animation: fadein .9s .55s var(--ease) forwards; }
.hero-facts strong { color: #fff; font-weight: 700; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .ico { width: 16px; height: 16px; color: #fff; opacity: .8; }

.hero.still h1 .line > span, .hero.still .hero-sub, .hero.still .search, .hero.still .hero-facts, .hero.still .stamp { animation: none; opacity: 1; }
.hero.still h1 .line > span { transform: none; }
.hero.still .stamp { transform: scale(1) rotate(-12deg); }

/* speed streaks — the "delivery in motion" signature from the DMX mood board */
.streaks { position: absolute; inset: -20% -10%; z-index: 0; pointer-events: none; transform: rotate(-24deg); }
.streaks i {
  position: absolute; left: -40%; height: 2px; width: 38%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: streak linear infinite; opacity: .55;
}
.streaks i.thick { height: 5px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--maroon-deep) 70%, transparent), transparent); opacity: .9; }
@keyframes streak { from { transform: translateX(0); } to { transform: translateX(380%); } }

/* the service deck: cards deal through every DMX service */
.hero-art { position: relative; z-index: 1; height: clamp(320px, 31vw, 480px); perspective: 1400px; }
.sheet {
  --w: clamp(220px, 18vw, 290px);
  position: absolute; left: 50%; top: 50%; width: var(--w); min-height: calc(var(--w) * 1.18);
  margin: calc(var(--w) * -0.62) 0 0 calc(var(--w) * -0.5);
  background: #fff; color: var(--charcoal); border-radius: 18px; padding: 20px 20px 18px;
  box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 10px;
  transform-origin: 50% 120%; opacity: 0;
  animation: fly 1.3s var(--ease) forwards;
  transition: transform .75s var(--ease), opacity .6s var(--ease), filter .6s;
}
.sheet.s1 { --r: -13deg; --x: -46%; --y: 7%; animation-delay: .25s; z-index: 1; filter: saturate(.85); }
.sheet.s2 { --r: 9deg; --x: 40%; --y: 3%; animation-delay: .4s; z-index: 1; filter: saturate(.85); }
.sheet.s3 { --r: -2deg; --x: -2%; --y: -6%; animation-delay: .55s; z-index: 3; }
@keyframes fly {
  0% { opacity: 0; transform: translate(140%, -60%) rotate(30deg) scale(.7); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}
.hero.still .sheet { animation: none; opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
.hero.still .sheet.out { transform: translate(-190%, 18%) rotate(-32deg) scale(.92); opacity: 0; z-index: 4; }
.hero.still .sheet.incoming { opacity: 0; transform: translate(var(--x), calc(var(--y) + 8%)) rotate(var(--r)) scale(.92); }
.sheet.notrans { transition: none !important; }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.svc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--maroon); color: #fff; box-shadow: 0 8px 18px -8px rgba(153,0,0,.7); }
.svc-ico .ico { width: 22px; height: 22px; }
.svc-tag { font-size: 11.5px; font-weight: 700; color: var(--maroon); background: var(--maroon-soft); padding: 4px 9px; border-radius: 99px; }
.svc-name { margin: 6px 0 0; font-size: clamp(17px, 1.35vw, 21px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--charcoal); }
.svc-line { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.svc-facts { margin: auto 0 0; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.svc-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; }
.svc-facts dt { color: var(--muted); font-weight: 600; }
.svc-facts dd { margin: 0; font-weight: 800; color: var(--maroon); text-align: right; }
.hero-art .stamp {
  position: absolute; right: 4%; bottom: 2%; z-index: 5; width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 12.5px; line-height: 1.15;
  color: #fff; background: var(--maroon-deep); border: 2px solid rgba(255,255,255,.35);
  box-shadow: 0 16px 40px -10px rgba(0,0,0,.5); opacity: 0; transform: scale(1.6) rotate(-20deg);
  animation: stamp .55s 1.25s var(--ease-spring) forwards;
}
.stamp .ico { width: 22px; height: 22px; margin: 0 auto 4px; display: block; }
@keyframes stamp { to { opacity: 1; transform: scale(1) rotate(-12deg); } }

/* ================================================================ section band */
.band {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: linear-gradient(115deg, var(--maroon-deep), var(--maroon) 55%, var(--maroon-bright));
  padding: clamp(26px, 3.4vw, 52px) var(--gutter);
}
.band .streaks { opacity: .6; }
.band-inner { position: relative; z-index: 1; display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; }
.band-icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px);
  animation: pop .6s var(--ease-spring) both;
}
.band-icon .ico { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.band .grow { flex: 1; min-width: 260px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-dark-muted); margin-bottom: 8px; }
.crumbs button { background: none; border: 0; padding: 0; color: var(--on-dark-muted); cursor: pointer; font-weight: 600; }
.crumbs button:hover { color: #fff; }
.crumbs .ico { width: 14px; height: 14px; }
.band h1 { margin: 0; font-size: clamp(28px, 3.6vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; animation: fadein .7s var(--ease) both; }
.band p { margin: 10px 0 0; color: var(--on-dark); max-width: 680px; font-size: clamp(14px, 1.1vw, 17px); animation: fadein .7s .08s var(--ease) both; }
.band .tools { display: flex; gap: 8px; flex-wrap: wrap; animation: fadein .7s .14s var(--ease) both; }
.band .btn-outline { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.band .btn-outline:hover:not(:disabled) { background: #fff; color: var(--maroon); border-color: #fff; }
.band .btn-primary { background: #fff; color: var(--maroon); box-shadow: none; }
.band .btn-primary:hover:not(:disabled) { background: var(--maroon-soft); }
.band .btn-danger { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.band .btn-danger:hover { background: #fff; color: var(--maroon); }
.band .audience { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.14); }
.band .audience .ico { width: 14px; height: 14px; }

/* ================================================================ layout */
.app { flex: 1; width: 100%; }
.layout { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); align-items: start; }
.rail {
  position: sticky; top: 63px; height: calc(100vh - 63px); overflow: auto; overscroll-behavior: contain;
  background: var(--maroon-deep); color: var(--on-dark); padding: 22px 14px 40px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
.side-group { margin-top: 22px; }
.side-label { font-size: 12.5px; font-weight: 700; color: var(--on-dark-muted); display: flex; align-items: center; gap: 7px; padding: 0 12px 8px; }
.side-label .ico { width: 14px; height: 14px; }
.side-link {
  position: relative; width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  background: none; border: 0; text-align: left; cursor: pointer; color: var(--on-dark); font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s, transform .25s var(--ease);
}
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.side-link.active { background: #fff; color: var(--maroon); font-weight: 700; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.side-link .ico { opacity: .8; }
.side-link.active .ico { opacity: 1; color: var(--maroon); }
.side-link .count { margin-left: auto; font-size: 12px; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.12); }
.side-link.active .count { background: var(--maroon-soft); }
.side-link .count:empty { display: none; }
.side-link .name { flex: 1; min-width: 0; line-height: 1.3; }
.rail-foot { margin: 28px 12px 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: var(--on-dark-muted); line-height: 1.6; }
.rail-foot a { color: #fff; font-weight: 600; text-decoration: none; }

.content { min-width: 0; padding: clamp(22px, 2.6vw, 44px) var(--gutter) 72px; }
.chips { display: none; }

.block-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 16px; flex-wrap: wrap; }
.block-title:first-child { margin-top: 0; }
.block-title h2 { margin: 0; font-size: clamp(20px, 1.7vw, 26px); font-weight: 800; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 10px; }
.block-title h2 .ico { width: 20px; height: 20px; color: var(--maroon); }
.block-title .hint { font-size: 14px; color: var(--muted); }
.block-title .spacer { flex: 1; }

/* ================================================================ section cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 19vw, 320px), 1fr)); gap: 16px; }
.sec-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 12px; padding: 22px; min-height: 200px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer; text-align: left; color: var(--text);
  box-shadow: var(--shadow-1);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s, color .3s;
}
.sec-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  clip-path: circle(0% at var(--mx, 90%) var(--my, 10%)); transition: clip-path .6s var(--ease);
}
.sec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); color: #fff; border-color: transparent; }
.sec-card:hover::before { clip-path: circle(150% at var(--mx, 90%) var(--my, 10%)); }
.sec-card:hover p, .sec-card:hover .meta { color: var(--on-dark); }
.sec-card:hover .sec-icon { background: rgba(255,255,255,.16); color: #fff; }
.sec-card:hover .go { opacity: 1; transform: none; color: #fff; }
.sec-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--maroon-soft); color: var(--maroon); transition: background .3s, color .3s;
}
.sec-icon .ico { width: 23px; height: 23px; }
.sec-card.staff .sec-icon { background: color-mix(in srgb, var(--charcoal) 8%, white); color: var(--charcoal); }
.sec-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sec-card .go { opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .4s var(--ease); color: var(--maroon); }
.sec-card .go .ico { width: 22px; height: 22px; }
.sec-card h3 { margin: 4px 0 0; font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.sec-card p { margin: 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .3s; }
.sec-card .meta { margin-top: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); font-weight: 600; transition: color .3s; }
.sec-card .meta strong { font-weight: 800; }

/* reveal once, staggered (respects reduced motion below) */
.reveal { opacity: 0; transform: translateY(18px) scale(.985); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease) calc(var(--i, 0) * 45ms), transform .8s var(--ease) calc(var(--i, 0) * 45ms); }

/* ================================================================ documents */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 780px), 1fr)); gap: 14px; }
.doc {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.doc:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--maroon-line); }
.doc:hover .ftype { transform: rotate(-6deg) translateY(-2px); }
.doc.flash { animation: flash 2.4s var(--ease); }
@keyframes flash { 0%, 35% { box-shadow: 0 0 0 4px var(--maroon), var(--shadow-2); } 100% { box-shadow: var(--shadow-1); } }
.doc.unpublished { background: repeating-linear-gradient(135deg, #fff, #fff 14px, #fbf8f8 14px, #fbf8f8 28px); border-style: dashed; }
.doc.dragover { border-color: var(--maroon); box-shadow: 0 0 0 4px var(--maroon-tint); }
.ftype {
  width: 52px; height: 64px; border-radius: 9px; position: relative; display: grid; place-items: end center; padding-bottom: 9px;
  background: var(--grey); color: var(--charcoal); font-size: 11px; font-weight: 800; letter-spacing: .04em;
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%); transition: transform .45s var(--ease-spring);
}
.ftype::before { content: ""; position: absolute; top: 0; right: 0; width: 30%; height: 22%; background: color-mix(in srgb, var(--charcoal) 22%, var(--grey)); border-bottom-left-radius: 5px; }
.ftype::after { content: ""; position: absolute; left: 10px; right: 14px; top: 16px; height: 18px; background: repeating-linear-gradient(180deg, currentColor 0 2px, transparent 2px 6px); opacity: .25; }
.ftype.pdf { background: var(--maroon); color: #fff; }
.ftype.pdf::before { background: var(--maroon-deep); }
.ftype.img { background: var(--charcoal); color: #fff; }
.ftype.img::before { background: #000; }
.ftype.none { background: transparent; border: 2px dashed var(--line); clip-path: none; color: var(--faint); }
.ftype.none::before, .ftype.none::after { display: none; }
.doc-main { min-width: 0; }
.doc-title { font-weight: 800; font-size: 16px; margin: 0; line-height: 1.3; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-desc { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.doc-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--faint); font-weight: 600; }
.doc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.doc-meta .ico { width: 14px; height: 14px; }
.doc-section-link { background: none; border: 0; padding: 0; color: var(--maroon); font: inherit; cursor: pointer; text-align: left; }
.doc-section-link:hover { text-decoration: underline; }
.doc-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.admin-note {
  grid-column: 1 / -1; display: flex; gap: 9px; align-items: flex-start; font-size: 13px;
  background: var(--note-bg); border: 1px solid var(--note-line); border-radius: var(--radius-sm); padding: 9px 12px; color: #5c4400;
}
.admin-note .ico { width: 16px; height: 16px; margin-top: 2px; }
.admin-bar { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line-soft); }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--grey); color: var(--charcoal); vertical-align: middle; letter-spacing: 0; }
.tag .ico { width: 12px; height: 12px; }
.tag.customer { background: var(--maroon-soft); color: var(--maroon); }
.tag.new { background: var(--maroon); color: #fff; }
.tag.new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.tag.hidden { background: #fde7c4; color: #7a4a00; }
.tag.empty { background: var(--grey); color: var(--muted); }

.empty-state { text-align: center; padding: clamp(40px, 6vw, 80px) 20px; border: 2px dashed var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); color: var(--muted); }
.empty-state > .ico { width: 44px; height: 44px; color: var(--maroon); padding: 10px; border-radius: 50%; background: var(--maroon-soft); box-sizing: content-box; }
.empty-state h3 { margin: 14px 0 6px; color: var(--text); font-size: 18px; font-weight: 800; }
.empty-state p { margin: 0 auto 18px; max-width: 440px; font-size: 14.5px; }

.banner {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--maroon-line); margin-bottom: 14px; box-shadow: var(--shadow-1);
  animation: fadein .6s var(--ease) both;
}
.banner > .ico { color: #fff; background: var(--maroon); width: 22px; height: 22px; padding: 9px; border-radius: 12px; box-sizing: content-box; }
.banner .txt { flex: 1; min-width: 240px; font-size: 14px; color: var(--muted); }
.banner strong { display: block; color: var(--text); font-size: 15px; }

/* ================================================================ login (split screen) */
.login-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: calc(100vh - 63px); }
.login-art {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: clamp(32px, 5vw, 80px) var(--gutter);
  background: radial-gradient(120% 120% at 80% 0%, var(--maroon-bright), transparent 50%), linear-gradient(160deg, var(--maroon), var(--maroon-deep));
  display: flex; flex-direction: column; justify-content: flex-end;
}
.login-art h2 { position: relative; z-index: 1; margin: 0; font-size: clamp(34px, 4.6vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.login-art p { position: relative; z-index: 1; margin: 18px 0 0; max-width: 460px; color: var(--on-dark); font-size: 16px; }
.login-pane { display: grid; place-items: center; padding: 40px var(--gutter); background: var(--surface); }
.login { width: 100%; max-width: 420px; animation: fadein .7s .1s var(--ease) both; }
.login img { height: 52px; width: auto; margin-bottom: 26px; }
.login h1 { font-size: 30px; margin: 0 0 6px; font-weight: 800; letter-spacing: -.02em; }
.login > p { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }
.login form { display: grid; gap: 14px; }
.login .btn { padding: 14px 18px; font-size: 15px; }
.login .error { color: var(--maroon); font-size: 13.5px; font-weight: 600; min-height: 1em; }
.login .error:not(:empty) { animation: shake .4s var(--ease); }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.login .links { display: flex; gap: 18px; margin-top: 22px; font-size: 13.5px; font-weight: 600; }
.login .links a { text-decoration: none; }
.login .links a:hover { text-decoration: underline; }

/* ================================================================ forms */
.field { display: grid; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 700; }
.field .help { font-size: 12.5px; color: var(--muted); }
.help { font-size: 12.5px; color: var(--muted); }
.input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none;
  transition: border-color .2s, box-shadow .25s var(--ease);
}
.input:focus, .field select:focus, .field textarea:focus { border-color: var(--maroon); box-shadow: 0 0 0 4px var(--maroon-soft); }
.field textarea { min-height: 76px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--maroon); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; transition: border-color .2s, background .2s; }
.seg label strong { display: block; font-size: 14px; }
.seg label span { color: var(--muted); }
.seg input { accent-color: var(--maroon); margin-top: 3px; }
.seg label:has(input:checked) { border-color: var(--maroon); background: var(--maroon-soft); }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick label { width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: all .2s; }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick label:hover { color: var(--maroon); }
.icon-pick label:has(input:checked) { border-color: var(--maroon); color: #fff; background: var(--maroon); transform: scale(1.06); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius-lg); padding: 26px 16px; text-align: center; cursor: pointer; background: var(--page); transition: border-color .2s, background .2s, transform .3s var(--ease); }
.drop:hover, .drop.over { border-color: var(--maroon); background: var(--maroon-soft); }
.drop.over { transform: scale(1.01); }
.drop .ico { width: 30px; height: 30px; color: var(--maroon); }
.drop strong { display: block; margin-top: 6px; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop .picked { margin-top: 8px; font-weight: 700; color: var(--text); word-break: break-word; }
.progress { height: 8px; border-radius: 99px; background: var(--grey); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--maroon), var(--maroon-bright)); transition: width .25s var(--ease); }

/* ================================================================ modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--maroon-deep) 55%, rgba(0,0,0,.35));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .25s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3); animation: modalin .45s var(--ease-spring);
}
@keyframes modalin { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.modal.wide { max-width: min(1280px, 96vw); height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: color-mix(in srgb, #fff 92%, transparent); backdrop-filter: blur(10px); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 20px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.viewer { flex: 1; background: color-mix(in srgb, var(--charcoal) 85%, black); display: grid; place-items: center; overflow: auto; }
.viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer { position: relative; }
.viewer img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 20px 20px; animation: fadein .5s var(--ease); }
.viewer .no-preview { color: #fff; text-align: center; padding: 30px; }

/* ================================================================ toasts & loading */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast {
  background: color-mix(in srgb, var(--charcoal) 92%, transparent); backdrop-filter: blur(12px); color: #fff; padding: 13px 16px;
  border-radius: 16px; box-shadow: var(--shadow-3); font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center;
  animation: toastin .45s var(--ease-spring);
}
.toast.error { background: var(--maroon); }
.toast .progress { flex: 1; background: rgba(255,255,255,.2); }
.toast .progress > div { background: #fff; }
@keyframes toastin { from { transform: translateY(24px) scale(.95); opacity: 0; } }
.loading { padding: 100px 0; text-align: center; color: var(--muted); display: flex; gap: 10px; justify-content: center; align-items: center; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--maroon-tint); border-top-color: var(--maroon); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================ footer */
.site-footer { position: relative; overflow: hidden; background: var(--maroon-deep); color: var(--on-dark-muted); font-size: 13.5px; }
.footer-word {
  padding: clamp(36px, 5vw, 80px) var(--gutter) 0; font-weight: 800; letter-spacing: -.045em; line-height: .9;
  font-size: clamp(54px, 10.5vw, 190px); color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.28);
  white-space: nowrap; user-select: none;
}
.footer-word span { color: var(--maroon); -webkit-text-stroke: 0; }
.footer-inner { padding: 36px var(--gutter) 34px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 28px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 12px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); padding: 14px var(--gutter); font-size: 12.5px; color: rgba(255,255,255,.5); display: flex; gap: 18px; flex-wrap: wrap; }
.footer-base a { color: rgba(255,255,255,.75); }

/* ================================================================ staff accounts */
.staff-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.staff-row.off { background: var(--page); }
.staff-row.off strong { color: var(--muted); }
.staff-main { flex: 1; min-width: 180px; }
.modal .docs { grid-template-columns: 1fr; gap: 8px; }
.cred { width: 100%; border-collapse: collapse; font-size: 15px; }
.cred th { text-align: left; width: 110px; color: var(--muted); font-weight: 600; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.cred td { padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-weight: 700; word-break: break-all; }

/* ================================================================ page transitions */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease); }

/* ================================================================ responsive */
@media (max-width: 1100px) {
  :root { --rail: 248px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { height: 300px; max-width: 560px; width: 100%; justify-self: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .chips {
    display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--gutter); margin: calc(-1 * clamp(22px, 2.6vw, 44px)) calc(-1 * var(--gutter)) 20px;
    scrollbar-width: none; background: color-mix(in srgb, #fff 88%, transparent); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft); position: sticky; top: 61px; z-index: 20;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text); transition: all .2s; }
  .chip .ico { width: 14px; height: 14px; }
  .chip.active { background: var(--maroon); border-color: var(--maroon); color: #fff; }
  .login-split { grid-template-columns: 1fr; }
  .login-art { min-height: 220px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .brand img { height: 28px; }
  .brand-divider, .brand-title { display: none; }
  .topbar-actions .btn-label { display: none; }
  .hero-art { height: 300px; }
  .sheet { --w: 190px; padding: 15px; gap: 7px; }
  .svc-line { font-size: 12px; }
  .svc-facts div:nth-child(n+3) { display: none; }
  .svc-facts div { flex-direction: column; align-items: flex-start; gap: 0; }
  .svc-facts dd { text-align: left; }
  .hero-art .stamp { width: 84px; height: 84px; font-size: 10.5px; right: 2%; }
  .sheet.s1 { --x: -34%; } .sheet.s2 { --x: 30%; }
  .doc { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 14px; }
  .doc-actions { grid-column: 1 / -1; justify-content: stretch; }
  .doc-actions .btn { flex: 1; }
  .doc-actions .btn-icon { flex: none; }
  .ftype { width: 42px; height: 52px; font-size: 10px; padding-bottom: 7px; }
  .ftype::after { left: 8px; right: 11px; top: 13px; height: 14px; }
  .seg { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .band-icon { width: 52px; height: 52px; }
}

/* ================================================================ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .streaks { display: none; }
  .reveal { opacity: 1; transform: none; }
  .hero h1 .line > span, .sheet { transform: none; opacity: 1; }
  .sheet.s1 { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
  .sheet.s2 { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
  .sheet.s3 { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}
@media print {
  .topbar, .rail, .chips, .site-footer, .doc-actions, .hero-art, .streaks { display: none !important; }
}
