:root {
  color-scheme: dark;
  --bg: #10141C;
  --panel: #192330;
  --raised: #202B38;
  --line: #344252;
  --control-line: #68788C;
  --ink: #F5F7FA;
  --soft: #AAB7C6;
  --accent: #FFB020;
  --blue: #009FE3;
  --success: #39C98A;
  --error: #F05252;
  --warning: #F2D35E;
  --dark: #10141C;
  font: 100%/1.55 "Segoe UI",system-ui,sans-serif
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink)
}

[hidden] {
  display: none!important
}

.wrap {
  width: min(1120px, calc(100% - 2 * clamp(.75rem, 3vw, 1.25rem)));
  margin-inline: auto
}

a {
  color: var(--accent);
  text-underline-offset: .22em
}

button,input,select,textarea {
  font: inherit
}

button,.button {
  display: inline-block;
  max-width: 100%;
  min-height: 44px;
  padding: .56rem 1rem;
  border: 1px solid var(--control-line);
  border-radius: .55rem;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  font-weight: 650
}

button:disabled {
  cursor: default;
  opacity: .57
}

.primary {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent)
}

.quiet {
  background: transparent
}

.actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  align-items: center
}

.skip {
  position: fixed;
  top: .75rem;
  left: .75rem;
  transform: translateY(-200%);
  background: var(--panel);
  padding: .55rem;
  z-index: 1
}

.skip:focus {
  transform: none
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  gap: 1rem
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.25rem;
  font-weight: 750;
  white-space: nowrap;
  min-width: 0
}

.brand img {
  display: block;
  max-width: 100%;
  object-fit: contain
}

.brand .brand-wide { width: 12.5rem; height: auto; border-radius: 0; }
.brand .brand-compact { display: none; }

.top nav,.top nav a {
  display: flex;
  align-items: center
}

.top nav {
  gap: 1.15rem
}

.top nav a {
  color: var(--soft);
  text-decoration: none;
  font-size: .95rem
}

.hero {
  padding: clamp(2.75rem,8vw,6rem) 0;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(1.5rem,5vw,4.5rem);
  align-items: center
}

.platform {
  font-size: .95rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 1rem
}

.hero h1 {
  font-size: clamp(2.45rem,5.6vw,4.5rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  margin: 0;
  max-width: 12ch
}

.lede {
  color: var(--soft);
  max-width: 54ch;
  font-size: 1.1rem
}

.workflow {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1.25rem 2.5rem #080f16a0
}

.window-title,.workflow-row {
  padding: .9rem 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: .8rem
}

.window-title {
  background: var(--raised)
}

.window-title span:last-child,.workflow-row span {
  color: var(--soft);
  text-align: right;
  font-size: .9rem
}

.workflow-row {
  border-top: 1px solid var(--line)
}

.timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 7.5rem;
  background: var(--bg)
}

.timeline i {
  display: block;
  height: 28%;
  width: 4px;
  border-radius: 4px;
  background: var(--control-line)
}

.timeline i:nth-child(3n) {
  height: 52%
}

.timeline i:nth-child(5n) {
  height: 67%
}

.timeline i:nth-child(n+8):nth-child(-n+16) {
  background: var(--accent)
}

.split {
  padding: clamp(1.6rem,4vw,3.3rem) 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 1.7rem
}

.split h2,.split h1 {
  margin: 0;
  font-size: clamp(1.6rem,3vw,2.2rem);
  line-height: 1.15
}

.split p:first-child {
  margin-top: 0
}

details {
  border-bottom: 1px solid var(--line);
  padding: .7rem 0
}

summary {
  cursor: pointer;
  font-weight: 650
}

footer {
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--soft)
}

#portal,.legal {
  min-height: 52vh;
  margin: 2rem auto
}

#portal {
  overflow-wrap: anywhere
}

.portal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem
}

.portal-heading h1 { flex: 1; min-width: 0; }
#portal:has(#account-area[hidden]) .portal-heading h1 { flex: initial; }
body:has(#portal.authenticated:not([hidden])) .top { display: none; }
body:has(#portal.authenticated:not([hidden])) main.wrap { width: min(1540px, calc(100% - 2 * clamp(.75rem, 3vw, 1.75rem))); }
#portal.authenticated { margin-top: 1rem; }
#portal.authenticated .portal-heading { margin-bottom: 1rem; }
#portal.authenticated .portal-heading h1 { font-size: clamp(1.3rem, 3vw, 2rem); }
.portal-heading :is(button, a) { flex: 0 0 auto; }
.portal-shell { display: flex; align-items: flex-start; gap: clamp(1rem, 2vw, 1.6rem); }
.portal-content { flex: 1; min-width: 0; }
#portal-sidebar-slot { position: sticky; top: 1rem; flex: 0 0 auto; }
#portal-sidebar-slot:has(#portal-sidebar[hidden]) { display: none; }
#portal-sidebar { width: 16.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: .8rem; padding: .55rem; }
.sidebar-brand { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-bottom: .55rem; }
.sidebar-brand .brand-wide { display: block; min-width: 0; width: 12.5rem; max-width: 100%; height: auto; }
.sidebar-brand .brand-compact { display: none; }
#portal-sidebar-toggle { flex-shrink: 0; padding-inline: .7rem; }
#portal-navigation { display: grid; gap: .25rem; }
#portal-navigation a { display: flex; align-items: center; gap: .55rem; min-height: 44px; color: var(--ink); border: 1px solid transparent; border-radius: .5rem; padding: .4rem .48rem; text-decoration: none; font-size: .9rem; line-height: 1.25; }
#portal-navigation a:hover { background: var(--raised); }
#portal-navigation a[aria-current="page"] { border-color: var(--blue); color: var(--ink); background: color-mix(in srgb, var(--blue) 15%, var(--panel)); font-weight: 750; }
.nav-icon { flex: 0 0 1.35rem; text-align: center; color: var(--soft); font-size: 1.12rem; }
#portal-navigation a[aria-current="page"] .nav-icon { color: var(--blue); }
#portal-sidebar[data-collapsed="true"] { width: 3.8rem; }
#portal-sidebar[data-collapsed="true"] .sidebar-brand { flex-wrap: wrap; }
#portal-sidebar[data-collapsed="true"] .brand-wide { display: none; }
#portal-sidebar[data-collapsed="true"] .brand-compact { display: block; }
#portal-sidebar[data-collapsed="true"] .nav-label { display: none; }
#portal-sidebar[data-collapsed="true"] #portal-navigation a { justify-content: center; }
#portal-menu-open, #portal-menu { display: none; }
.portal-compact-icon, .portal-header-brand { display: none; }
#current-project-title { margin-block: 0 .75rem; }
#job-form details { margin-bottom: .9rem; }
.project-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.overview-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .75rem; }
.overview-totals > div { padding: .75rem; border-radius: .55rem; background: var(--raised); }
.overview-totals dd { margin: .15rem 0 0; font-size: 1.6rem; font-weight: 700; }
.overview-activity li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) 2.4rem; align-items: center; gap: .6rem; }
#admin-area.section { margin-block: 0; }

.portal-heading h1 {
  font-size: clamp(2rem,5vw,3rem);
  margin: .25rem 0
}

.card {
  background: var(--panel);
  border: 1px solid var(--control-line);
  min-width: 0;
  padding: clamp(.875rem, 2.5vw, 1.2rem);
  border-radius: .75rem
}

.card h2 {
  margin-top: 0
}

.narrow {
  width: min(100%, 28.75rem);
  margin-inline: auto
}

.narrow .actions {
  margin-top: 1rem
}

#portal:has(#account-area[hidden]) .portal-heading,
#portal:has(#account-area[hidden]) #notice {
  width: min(100%, 28.75rem);
  margin-inline: auto
}

#portal:has(#account-area[hidden]) .portal-heading {
  justify-content: center;
  text-align: center
}

#credentials #auth-submit,
#credentials #social button {
  width: 100%
}

label {
  display: block;
  margin: .7rem 0;
  color: var(--soft)
}

input,select,textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .43rem .6rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: .4rem;
  margin-top: .25rem
}

.check {
  display: flex;
  align-items: center;
  gap: .55rem
}

.check input {
  width: 1.2rem;
  flex-shrink: 0;
  min-height: auto
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0
}

.plain li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--line)
}

.plain li button {
  margin-left: .7rem
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem
}

.section {
  margin: 1.5rem 0
}

.job {
  margin-block: .8rem
}

.job p {
  margin: .45rem 0
}

.job ul {
  padding-left: 1.2rem
}

.job li {
  margin: .7rem 0
}

.library-tools {
  margin: .75rem 0
}

.library-tools input {
  width: min(100%, 18rem);
  margin: 0
}

.library-tools select {
  width: auto;
  max-width: 100%;
  min-width: min(12rem, 100%);
  margin: 0
}

.storage-alert {
  color: var(--accent);
  font-weight: 700
}

.cloud-project {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--bg)
}

.cloud-project h3,.cloud-project p {
  margin: .2rem 0 .65rem
}

.cloud-clip {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap
}

.cloud-clip input {
  width: 1.2rem;
  min-height: auto;
  margin: 0
}

.cloud-clip span {
  flex: 1 1 15rem
}

.cloud-clip video {
  flex-basis: 100%;
  max-width: 100%
}

.library-outcomes {
  flex-basis: 100%;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--soft)
}

.job video {
  display: block;
  width: min(100%,300px);
  max-height: 360px;
  margin: .7rem 0
}

progress,meter {
  accent-color: var(--blue);
  width: min(100%,22rem)
}

meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { background: var(--blue); }
meter::-moz-meter-bar { background: var(--blue); }

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  text-align: left
}

th,td {
  border-bottom: 1px solid var(--line);
  padding: .55rem .7rem;
  vertical-align: top
}

td {
  font-size: .9rem
}

#notice:not(:empty) {
  color: var(--accent);
  min-height: 1.55rem
}

#notice:empty {
  display: none
}

.muted {
  color: var(--soft)
}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
summary:focus-visible,.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px
}

@media (max-width: 850px) {
  #portal-sidebar-slot { display: none; }
  #portal-menu-open { display: inline-block; }
  #portal.authenticated .portal-compact-icon { display: block; }
  #portal-menu[open] { display: block; position: fixed; inset: 0 auto 0 0; width: min(21rem, 93vw); height: 100dvh; max-width: 100%; max-height: 100%; margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 0 .8rem .8rem 0; background: var(--panel); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
  #portal-menu::backdrop { background: rgb(0 0 0 / 55%); }
  #portal-menu-close { margin-bottom: .65rem; }
  #portal-menu #portal-sidebar { width: 100%; }
  #portal-menu #portal-sidebar .brand-wide { display: block; width: 10rem; }
  #portal-menu #portal-sidebar .brand-compact { display: none; }
  #portal-menu .nav-label { display: inline !important; }
  #portal-menu #portal-navigation a { justify-content: flex-start; }
  #portal-sidebar-toggle { display: none; }
  .portal-heading { flex-wrap: wrap; }
  #portal.authenticated .portal-heading :is(a, #logout) { font-size: .9rem; }
}

@media (min-width: 640px) and (max-width: 850px) {
  #portal.authenticated .portal-compact-icon { display: none; }
  #portal.authenticated .portal-header-brand { display: block; width: 9.375rem; height: auto; }
}

@media(max-width:700px) {
  .hero,.split,.portal-grid {
    grid-template-columns: 1fr
  }

  .hero h1 {
    max-width: 16ch
  }

  .top {
    flex-wrap: wrap;
    gap: .65rem;
    padding-block: .75rem
  }

  .top nav {
    flex-wrap: wrap;
    column-gap: clamp(.65rem, 3vw, 1.15rem);
    row-gap: .35rem
  }

  .brand .brand-wide { display: block; width: clamp(9.375rem, 42vw, 12.5rem); }
  .brand .brand-compact { display: none; }

  .window-title,.workflow-row {
    padding-inline: .85rem
  }

  .timeline {
    height: 5.3rem
  }
}

@media (max-width: 359px) {
  .brand .brand-wide { display: none; }
  .brand .brand-compact { display: inline-block; }
}

.phase06-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.phase06-form textarea, #job-editorial textarea { width: 100%; resize: vertical; font: inherit; }
.managed-editorial-profile-json { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.phase06-fieldset { display: flex; flex-wrap: wrap; min-inline-size: 0; gap: .5rem 1rem; border: 1px solid var(--line); }
.phase06-fieldset .check { margin: 0; }
#job-confirmation, #publication-dialog {
  width: min(38rem, calc(100% - 1.5rem));
  max-height: 90vh;
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(.875rem, 4vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: .75rem
}
#job-confirmation::backdrop, #publication-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.phase06-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .9rem; }
.phase06-metrics dd { margin: 0; overflow-wrap: anywhere; }
.phase06-trend { max-height: 16rem; overflow: auto; }
.phase06-trend li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 4rem); align-items: center; gap: .5rem; }
.phase06-trend li:has(progress + progress) { grid-template-columns: 4rem repeat(2, minmax(0, 1fr)); }
.phase06-trend li:has(progress + progress) span:last-child { grid-column: 1 / -1; font-size: .875rem; }
.phase06-trend progress { width: 100%; }

@media (max-width: 480px) {
  .top {
    gap: .5rem;
    padding-block: .65rem
  }

  .portal-heading h1 {
    font-size: clamp(1.65rem, 7vw, 2rem)
  }

  .phase06-metrics {
    grid-template-columns: minmax(0, 1fr);
    row-gap: .15rem
  }

  .phase06-metrics dd:not(:last-child) {
    margin-bottom: .75rem
  }
}

/* Shared shell and component system */
:root {
  --sidebar: #141c27;
  --surface-hover: #253243;
  --focus: #ffd071;
  --success-surface: #12382e;
  --warning-surface: #3a311b;
  --error-surface: #3a2227;
  --radius-card: .9rem;
  --radius-control: .58rem;
  --shadow-panel: 0 1rem 2.5rem rgb(0 0 0 / 18%);
}

html { scroll-behavior: smooth; }
body { min-height: 100vh; min-height: 100dvh; line-height: 1.5; }
img,video,canvas,svg { max-width: 100%; }
::selection { color: var(--dark); background: var(--accent); }

a { text-decoration-thickness: .08em; }
a:hover { color: var(--focus); }

button,.button {
  min-height: 2.75rem;
  padding: .6rem .95rem;
  border-color: var(--line);
  border-radius: var(--radius-control);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
button:hover,.button:hover { background: var(--surface-hover); border-color: var(--control-line); }
button:active,.button:active { transform: translateY(1px); }
button.primary,.button.primary { background: var(--accent); color: var(--dark); border-color: var(--accent); }
button.primary:hover,.button.primary:hover { background: #ffc34f; border-color: #ffc34f; color: #10141c; }
button.quiet,.button.quiet { color: var(--ink); }
button.quiet:hover,.button.quiet:hover { color: var(--ink); background: var(--surface-hover); }
button:disabled,.button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

input,select,textarea {
  min-height: 2.75rem;
  padding: .58rem .72rem;
  border-color: var(--control-line);
  border-radius: var(--radius-control);
  background: #101720;
  accent-color: var(--blue);
}
textarea { min-height: 6rem; }
input::placeholder,textarea::placeholder { color: #8696a9; opacity: 1; }
label { color: var(--ink); font-size: .94rem; font-weight: 600; }
label :is(input,select,textarea) { font-weight: 400; }

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
summary:focus-visible,.table-wrap:focus-visible,[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell { min-width: 0; }
.app-sidebar { min-width: 0; }
.app-topbar { min-width: 0; }
.app-main,.app-content { min-width: 0; }

.card {
  border-color: var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}
.card :is(h2,h3) { line-height: 1.25; letter-spacing: -.015em; }
.card .card { background: var(--raised); box-shadow: none; }
.section { margin-block: 1.25rem; }
.muted { color: var(--soft); }

.actions { gap: .65rem; }
.actions > :is(a,button) { flex: 0 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .15rem 1rem; }
.field { min-width: 0; }
.form-help { margin: .3rem 0 0; color: var(--soft); font-size: .86rem; }
.form-error { color: #ff9b9b; }

.empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .45rem;
  min-height: 12rem;
  padding: clamp(1rem,4vw,2rem);
  border: 1px dashed var(--control-line);
  border-radius: var(--radius-card);
  background: rgb(16 20 28 / 44%);
  color: var(--soft);
  text-align: center;
}
.empty-state > :is(h2,h3,p) { margin: 0; }
.empty-state > :is(h2,h3) { color: var(--ink); }
.empty-state-icon { color: var(--blue); width: 2rem; height: 2rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 1.55rem;
  padding: .14rem .6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}
.status-operational { color: var(--success); background: var(--success-surface); }
.status-degraded { color: var(--warning); background: var(--warning-surface); }
.status-unavailable { color: #ff9393; background: var(--error-surface); }
.status-not-configured,.status-unknown { color: #c2ccd8; background: #25303d; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--panel);
}
table { border-spacing: 0; }
thead { background: var(--raised); }
th { color: #dce5ee; font-size: .8rem; font-weight: 750; letter-spacing: .025em; }
th:first-child { border-top-left-radius: .65rem; }
th:last-child { border-top-right-radius: .65rem; }
tbody tr:hover { background: rgb(37 50 67 / 48%); }

/* Public marketing and authentication */
.top { min-height: 4.25rem; border-color: var(--line); }
.top nav { gap: clamp(.65rem,2vw,1.25rem); }
.top nav a:not(.button) { padding-block: .45rem; color: #d5deea; }
.top nav a:not(.button):hover { color: var(--accent); }
.hero { padding-block: clamp(2.6rem,7vw,5.5rem); }
.hero h1 { max-width: 13ch; letter-spacing: -.045em; }
.workflow { border-radius: var(--radius-card); box-shadow: var(--shadow-panel); }
.window-title { align-items: center; }
.split { gap: clamp(1.25rem,4vw,3rem); }
details { border-color: var(--line); }
details[open] summary { color: var(--accent); }
#portal:not(.authenticated) .narrow { box-shadow: var(--shadow-panel); }
#portal:not(.authenticated) .portal-heading h1 { font-size: clamp(1.7rem,4vw,2.4rem); }
#portal:not(.authenticated) #notice { margin-block: .65rem 1rem; }
#credentials > h2,#verify-email > h2 { margin-top: 0; font-size: 1.35rem; }
#credentials .actions:last-child { gap: .5rem 1rem; }
#billing { margin-top: 1rem; }
#billing-signup { padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--raised); }
#billing-environment { color: var(--warning); font-weight: 700; }

/* Authenticated portal shell */
body:has(#portal.authenticated:not([hidden])) { background: var(--bg); }
body:has(#portal.authenticated:not([hidden])) main.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
body:has(#portal.authenticated:not([hidden])) > footer.wrap { display: none; }
#portal.authenticated {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  overflow: visible;
}
#portal.authenticated .portal-heading.app-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 4.25rem;
  margin: 0;
  padding: .55rem clamp(1rem,2vw,1.6rem);
  border-bottom: 1px solid var(--line);
  background: rgb(25 35 48 / 96%);
  box-shadow: 0 .35rem 1.25rem rgb(0 0 0 / 16%);
  backdrop-filter: blur(12px);
}
#portal.authenticated .portal-heading h1 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem,2vw,1.55rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.025em;
}
#portal.authenticated #notice {
  position: relative;
  z-index: 21;
  width: min(100% - 2rem, 84rem);
  margin: .75rem auto 0;
}
#portal.authenticated #notice:not(:empty) {
  padding: .7rem .9rem;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: .7rem;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}
#portal.authenticated .portal-shell.app-shell {
  display: grid;
  grid-template-columns: 16.25rem minmax(0,1fr);
  align-items: stretch;
  gap: 0;
  min-height: calc(100dvh - 4.25rem);
}
#portal-sidebar-slot {
  position: sticky;
  z-index: 10;
  top: 4.25rem;
  align-self: start;
  width: 100%;
  min-height: calc(100dvh - 4.25rem);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
#portal-sidebar {
  width: 100%;
  min-height: calc(100dvh - 4.25rem);
  padding: .8rem .65rem 1.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sidebar-brand {
  justify-content: space-between;
  min-height: 3.1rem;
  gap: .5rem;
  margin: 0 0 .8rem;
  padding: .05rem .35rem .75rem;
  border-bottom: 1px solid rgb(170 183 198 / 14%);
}
.sidebar-brand .brand-wide { width: min(11.5rem,calc(100% - 2.8rem)); }
.sidebar-brand .brand-compact { width: 2.4rem; height: 2.4rem; object-fit: contain; }
.sidebar-toggle { display: inline-grid; place-items: center; width: 2.5rem; min-width: 2.5rem; min-height: 2.5rem; padding: 0; }
.menu-mark { position: relative; display: block; width: 1.12rem; height: .82rem; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.menu-mark::after { position: absolute; inset: calc(50% - 1px) 0 auto; border-top: 2px solid currentColor; content: ""; }
#portal-navigation { gap: .24rem; }
#portal-navigation a {
  min-height: 2.75rem;
  padding: .48rem .62rem;
  border-radius: .62rem;
  color: #d5deea;
  font-size: .9rem;
  font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
#portal-navigation a:hover { background: var(--surface-hover); color: var(--ink); }
#portal-navigation a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--blue) 68%, transparent);
  background: color-mix(in srgb, var(--blue) 16%, var(--sidebar));
  color: #eaf8ff;
  box-shadow: inset 3px 0 0 var(--blue);
}
.nav-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 1.2rem; color: #9eafc1; }
#portal-navigation a[aria-current="page"] .nav-icon { color: #4cc8ff; }
#portal-sidebar[data-collapsed="true"] { width: 100%; }
#portal-sidebar[data-collapsed="true"] .sidebar-brand { justify-content: center; padding-inline: 0; }
#portal-sidebar[data-collapsed="true"] #portal-navigation a { padding-inline: 0; }
#portal-sidebar[data-collapsed="true"] #portal-navigation .nav-icon { width: 1.35rem; height: 1.35rem; flex-basis: 1.35rem; }
#account-area:has(#portal-sidebar[data-collapsed="true"]) { grid-template-columns: 4.5rem minmax(0,1fr) !important; }
.portal-content.app-main { min-width: 0; padding: clamp(1rem,2.2vw,2rem); }
.portal-content > :first-child { margin-top: 0; }
.portal-content > :last-child { margin-bottom: 0; }
.portal-content > .card { margin-block: 0 1rem; }
.portal-content > [data-customer-page="visao-geral"] { display: block; }
.portal-content :is(.portal-grid,.project-filter) { min-width: 0; }
#portal-menu-open,#portal-menu { display: none; }
.portal-compact-icon,.portal-header-brand { display: none; }
#portal.authenticated .portal-heading :is(a,button) { flex: 0 0 auto; }

@media (max-width: 850px) {
  #portal.authenticated .portal-shell.app-shell { display: block; min-height: calc(100dvh - 4.25rem); }
  #portal-sidebar-slot { display: none; }
  #portal.authenticated #portal-menu-open {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: .65rem;
  }
  #portal.authenticated .portal-compact-icon { display: block; width: 2.25rem; height: 2.25rem; object-fit: contain; }
  #portal-menu[open] {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: min(19rem,88vw);
    height: 100dvh;
    max-width: 100%;
    max-height: 100dvh;
    margin: 0;
    padding: .8rem;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 0 .9rem .9rem 0;
    background: var(--sidebar);
    color: var(--ink);
    box-shadow: 1rem 0 3rem rgb(0 0 0 / 35%);
  }
  #portal-menu::backdrop { background: rgb(4 8 14 / 64%); backdrop-filter: blur(3px); }
  #portal-menu-close { align-self: flex-end; margin-bottom: .65rem; }
  #portal-menu #portal-sidebar { display: block; width: 100%; min-height: auto; padding: 0; }
  #portal-menu #portal-sidebar .brand-wide { display: block; width: min(11rem,calc(100% - 2.8rem)); }
  #portal-menu #portal-sidebar .brand-compact { display: none; }
  #portal-menu .nav-label { display: inline !important; }
  #portal-menu #portal-navigation a { justify-content: flex-start; }
  #portal-sidebar-toggle { display: none; }
  .portal-content.app-main { padding: 1rem; }
}

@media (min-width: 640px) and (max-width: 850px) {
  #portal.authenticated .portal-compact-icon { display: none; }
  #portal.authenticated .portal-header-brand { display: block; width: 9.5rem; height: auto; }
}

@media (max-width: 700px) {
  .top { padding-block: .65rem; }
  .top nav { column-gap: .65rem; }
  .hero { padding-block: 2.5rem; }
  .portal-grid,.form-grid { grid-template-columns: minmax(0,1fr); }
  .project-filter { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 1.5rem); }
  .top nav { width: 100%; justify-content: space-between; }
  .top nav a { font-size: .875rem; }
  .top nav a.button { min-height: 2.5rem; padding: .45rem .65rem; }
  .hero h1 { font-size: clamp(2.25rem,11vw,3.1rem); }
  .actions > :is(a,button) { max-width: 100%; }
  .portal-content.app-main { padding: .75rem; }
  #portal.authenticated .portal-heading.app-topbar { gap: .5rem; padding-inline: .75rem; }
  #portal.authenticated .portal-heading h1 { font-size: 1.08rem; }
  #portal.authenticated .portal-heading :is(#logout,#portal-switch) { min-height: 2.5rem; padding: .45rem .6rem; font-size: .85rem; }
  .table-wrap { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.publication-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, auto);
  gap: .8rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
}
.publication-preview {
  display: grid;
  place-items: center;
  width: 5rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: .5rem;
  background: var(--raised);
  color: var(--blue);
}
.publication-preview video { width: 100%; height: 100%; object-fit: contain; }
.publication-details { min-width: 0; overflow-wrap: anywhere; }
.publication-details p { margin: .25rem 0; }
.publication-actions { justify-content: end; }
@media (max-width: 680px) {
  .publication-row { grid-template-columns: 5rem minmax(0, 1fr); }
  .publication-actions { grid-column: 1 / -1; justify-content: start; margin: 0; }
}
