:root.portal-document {
  --portal-rail: #111113;
  --portal-rail-ink: #fff;
  --portal-rail-muted: #c8c8d0;
  --portal-rail-active: #ffffff1c;
  --portal-highlight: #b7ccf5;
  --library-surface: #17171b;
  --font-ui: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --heading-weight: 800;
  --heading-tracking: -.04em;
  --subheading-tracking: -.025em;
  --radius-control: 9px;
  --radius-card: 15px;
  --radius-dialog: 17px;
  --radius-brand: 9px;
  --avatar-ink: var(--violet-dark);
  --delegated-line: var(--line);
  --delegated-text: var(--violet-dark);
  --list-hover: var(--hover);
  --search-line: var(--control-line);
  accent-color: var(--violet);
}

:root.portal-document[data-color-mode="dark"] {
  --portal-rail-active: #292a34;
  --library-surface: #222229;
}

.portal-document input { caret-color: var(--violet); }
.portal-document input::placeholder { color: var(--muted); opacity: 1; }
.portal-document :is(.primary, .secondary, .row-link) { transition: background-color 150ms, color 150ms, border-color 150ms; }
.portal-document :is(.primary, .secondary):disabled { cursor: default; opacity: .55; }
.portal-document :is(.primary, .secondary):active:not(:disabled) { filter: brightness(.94); }

.portal .portal-frame {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  align-items: start;
  min-height: 100svh;
}

.portal-content { min-width: 0; }
.portal-content:focus { outline: none; }
.downloads-content { max-width: 900px; }
.downloads-list { border-block: 1px solid var(--line); }
.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding-block: clamp(20px, 4vw, 30px);
}
.download-row + .download-row { border-top: 1px solid var(--line); }
.download-row h2 { margin: 0 0 6px; }
.download-row p { margin: 0 0 8px; color: var(--muted); }
.download-row small { color: var(--muted); font-weight: 650; }
.download-actions { display: grid; flex: none; gap: 8px; }
.download-actions a { text-align: center; }
@media (max-width: 820px) {
  .download-row { flex-direction: column; align-items: flex-start; }
  .download-actions { max-width: 100%; }
}
.portal-nav a > svg { order: -1; width: 18px; height: 18px; flex: none; }
.tag-page .portal-page-heading { margin-bottom: 24px; }
.tag-form-page { max-width: 860px; }
.tag-form, .tag-directory { padding: clamp(16px, 3vw, 24px); }
.tag-identity { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.tag-color-field input[type="color"] { width: 100%; min-width: 4.5rem; padding: 4px 5px; cursor: pointer; }
[data-tag-color] {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  background-color: var(--tag-color, var(--soft));
  color: var(--tag-text-color, var(--violet-dark));
  overflow-wrap: anywhere;
}
.tag-directory .section-head { margin-bottom: 8px; }
.tag-entries { list-style: none; margin: 8px 0 0; padding: 0; }
.tag-entries li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.tag-entries li[hidden], .tag-choices [hidden], .meet-comment-form[hidden] { display: none; }
.tag-entries small, .tag-choices small { display: block; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.tag-choices [data-tag-color] small { color: inherit; }
.tag-entries .actions { flex-wrap: wrap; margin: 0; }
.tag-choices { max-height: 270px; overflow-y: auto; padding: 2px 6px; }
.tag-picker .check, .tag-grants .check { align-items: start; min-height: 37px; padding-block: 6px; }
.tag-grant { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, 36%); align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tag-grant span { min-width: 0; overflow-wrap: anywhere; }
.tag-grant select { min-height: 36px; padding: 6px 8px; font-size: .875rem; }
.tag-delete { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.tag-delete summary { cursor: pointer; font-weight: 650; }
.tag-delete p { margin: 8px 0; }
.tag-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.tag-filter-bar label { min-width: min(220px, 100%); }
@media (max-width: 560px) {
  .tag-entries li { flex-wrap: wrap; }
  .tag-entries li > div:first-child { flex-basis: 100%; }
}

.portal-skip { position: fixed; z-index: 10; top: 8px; left: 8px; transform: translateY(-160%); padding: 12px 16px; background: var(--surface); color: var(--text); border-radius: var(--radius-control); }
.portal-skip:focus { transform: translateY(0); }

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 5;
  height: 100svh;
  padding: 26px 15px 18px;
  background: var(--portal-rail);
  color: var(--portal-rail-ink);
}

.portal-sidebar.cheke-sidebar {
  background:
    radial-gradient(ellipse at 100% 72%, #472823 0, transparent 52%),
    linear-gradient(165deg, var(--portal-rail) 34%, #201619);
  box-shadow: inset -1px 0 #ffab8829;
}

.cheke-sidebar-waves {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (forced-colors: active) {
  .cheke-sidebar-waves { display: none; }
}

.portal-sidebar .brand-link { display: inline-flex; align-self: start; margin: 0 8px; border-radius: var(--radius-control); }
.portal-sidebar .brand { font-size: 1.125rem; gap: 9px; }
.company-brand {
  display: block;
  width: auto;
  max-width: min(176px, 100%);
  height: 46px;
  padding: 6px 9px;
  border-radius: var(--radius-control);
  background: #fff;
  object-fit: contain;
}
.portal-branded .portal-content { display: flex; flex-direction: column; min-height: 100svh; }
.fluxy-credit {
  display: flex;
  justify-content: end;
  margin-top: auto;
  padding: 0 max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) 16px;
  color: var(--muted);
}
.fluxy-credit .brand { gap: 6px; font-size: .875rem; letter-spacing: -.02em; }
.fluxy-credit .brand-mark { width: 20px; height: 20px; }
.workspace-settings-content { max-width: 720px; }
.workspace-settings-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.workspace-settings-section {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 4vw, 24px);
  overflow-wrap: anywhere;
  scroll-margin-top: 16px;
}
.workspace-settings-section + .workspace-settings-section { border-top: 1px solid var(--line); }
.workspace-settings-section > p { max-width: 65ch; margin: 0; }
.workspace-settings-section .field { min-width: 0; max-width: 440px; }
.workspace-settings-section input[type="file"] { width: 100%; min-width: 0; }
.workspace-settings-section .actions { flex-wrap: wrap; }
.workspace-logo-preview {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: #111113;
  background: #fff;
}
.workspace-logo-preview img { max-width: 100%; max-height: 96px; object-fit: contain; }
.workspace-brand-colors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 12px;
  max-width: 440px;
}
.workspace-brand-color { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
.workspace-brand-color input[type="color"] { width: 100%; height: 100%; min-height: 40px; padding: 4px; cursor: pointer; }
.workspace-brand-color input[type="text"] { min-width: 0; font-variant-numeric: tabular-nums; }
.workspace-brand-colors + .hint { margin: -4px 0 0; }
.portal-sidebar :focus-visible { outline-color: var(--portal-highlight); }
.portal-nav { display: grid; gap: 4px; margin-top: 44px; }
.portal-nav a, .portal-sidebar :is(.appearance-trigger, .studio-cheke-return) {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--portal-rail-muted);
  font-size: .875rem;
  font-weight: 650;
  text-align: left;
}
.portal-nav a .icon { order: -1; }
.icon.meet-recordings::before, .icon.meet-recordings::after { content: ""; position: absolute; border-radius: 50%; }
.icon.meet-recordings::before { inset: 1px; border: 1.5px solid currentColor; }
.icon.meet-recordings::after { inset: 5px; background: currentColor; }
.icon.meet-extension::before, .icon.meet-extension::after { content: ""; position: absolute; border: 1.5px solid currentColor; }
.icon.meet-extension::before { inset: 3px 5px 3px 0; border-radius: 3px; }
.icon.meet-extension::after { inset: 5px 0 5px 10px; border-radius: 0 2px 2px 0; }
.portal-nav a:is(:hover, [aria-current]), .portal-sidebar :is(.appearance-trigger, .studio-cheke-return):hover,
.portal-sidebar .appearance-trigger[aria-pressed="true"] { background: var(--portal-rail-active); color: var(--portal-rail-ink); }
.portal-nav a[aria-current] .icon, .portal-sidebar .appearance-trigger[aria-pressed="true"] .appearance-icon { color: var(--portal-highlight); }
.portal-nav .studio-entry { border-color: #b8b0ff48; color: #e5dfff; }
.portal-nav .studio-entry:is(:hover, :focus-visible) { background: #36254f; border-color: #b8a1ef; color: #fff; }
.studio-entry-arrow { display: flex; margin-inline-start: auto; }
.studio-entry-arrow svg { width: 16px; height: 16px; stroke-width: 2; }

@media (prefers-reduced-motion: no-preference) {
  .portal-nav .studio-entry { transition: background-color 180ms, border-color 180ms, color 180ms; }
  .studio-entry-arrow { transition: transform 180ms ease-out; }
  .studio-entry:is(:hover, :focus-visible) .studio-entry-arrow { transform: translateX(3px); }
}

.appearance-trigger { white-space: nowrap; }
.appearance-icon, .appearance-icon svg, .studio-cheke-return svg { display: block; flex: none; width: 16px; height: 16px; }
.portal-sidebar-tools { display: grid; gap: 8px; margin-top: auto; min-width: 0; }

@media (min-width: 851px) {
  .portal-sidebar.studio-sidebar { overflow-y: auto; }
}
.portal-sidebar .account { margin: 0; padding-top: 11px; border-top: 1px solid #ffffff28; }
.portal-sidebar .account summary { border-radius: 9px; min-height: 50px; padding: 7px; }
.portal-sidebar .account summary:hover, .portal-sidebar .account[open] summary { background: var(--portal-rail-active); }
.portal-sidebar .account summary .avatar { width: 34px; height: 34px; background: #e9ecf5; color: #222838; }
.portal-sidebar .account summary strong { max-width: 106px; }
.portal-sidebar .account small { color: var(--portal-rail-muted); font-size: .75rem; }
.portal-sidebar .account summary .account-reference { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-sidebar .account .chevron { margin-left: auto; border-color: var(--portal-rail-muted); }
.portal-sidebar .account-menu { inset: auto 0 calc(100% - 5px) auto; min-width: 100%; margin: 0; }
.portal-sidebar .account-menu:has(.account-switcher) { right: auto; left: 0; width: min(256px, calc(100vw - 32px)); }
.portal-sidebar .account-menu a[aria-current] { color: var(--violet-dark); font-weight: 700; }
.portal-sidebar .account-menu :focus-visible { outline-color: var(--focus); }
.account-switcher { margin-block: 4px; padding-block: 4px; border-block: 1px solid var(--line); }
.account-switcher > p { padding: 6px 11px 2px; color: var(--muted); font-size: .75rem; font-weight: 650; }
.account-switcher-current { display: none; overflow-wrap: anywhere; }
.account-switcher-list { max-height: min(260px, 38vh); overflow-y: auto; padding: 3px; }
.account-switcher-list button { display: grid; gap: 2px; overflow-wrap: anywhere; }
.portal-sidebar .account-switcher small { color: var(--muted); }
.portal-public .portal-sidebar { position: static; height: auto; padding: 16px max(20px, calc((100% - 1200px) / 2)); flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.portal-public .portal-sidebar-tools { margin: 0; }

.portal-document .shell {
  width: min(1200px, calc(100% - 88px));
  margin: 50px auto 0;
  padding-bottom: 66px;
}
.portal-document .shell h1 { font-size: 2.375rem; line-height: 1.13; }
.portal-document .shell h2, .portal-document dialog h2 { font-size: 1.375rem; }
.portal-document .lead { margin-top: 9px; }
.portal .delegated-access > div { width: min(1200px, calc(100% - 88px)); }
.portal-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 29px; }
.portal-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.portal-document .section-head { align-items: center; min-height: 44px; margin-bottom: 13px; }
.portal-document .section-head p { font-size: .875rem; }
.portal-document .section-actions { gap: 8px; }
.portal-document .search { width: min(256px, 100%); }
.portal-document .back { margin: 0 0 18px; }

.portal-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 36px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); overflow: hidden; }
.portal-summary > div { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; column-gap: 12px; row-gap: 6px; min-width: 0; padding: 20px 24px; }
.portal-summary > div + div { border-left: 1px solid var(--line); }
.portal-summary > div:first-child { background: var(--soft); color: var(--violet-dark); }
.portal-summary dt { color: var(--muted); font-size: .875rem; font-weight: 650; }
.portal-summary dd { margin: 0; font-size: 1.75rem; line-height: 1; letter-spacing: -.035em; font-weight: 800; font-variant-numeric: tabular-nums; }

.portal .portal-table td, .portal .portal-table th { padding: 15px 19px; }
.portal .portal-table th { padding-block: 11px; font-size: .8125rem; }
.portal .portal-table td { font-size: .875rem; font-variant-numeric: tabular-nums; }
.portal .portal-table :is(td, th).end { width: 62px; }
.portal .portal-table .identity { min-width: 0; overflow-wrap: anywhere; }
.portal .portal-table .identity small { margin-top: 3px; }
.portal .portal-table tbody tr:hover { background: var(--hover); }
.portal .portal-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-card); }
.portal .portal-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-card); }

.meet-comment-form[hidden] { display: none; }

.account-types-list { list-style: none; margin: 0; padding: 0 19px; }
.account-types-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.account-types-list li > div { min-width: 0; overflow-wrap: anywhere; }
.account-types-list small { display: block; color: var(--muted); margin-top: 2px; }
.account-types-list .secondary { flex-shrink: 0; }
.account-type-form { display: grid; gap: 22px; }
.account-type-form > .field { max-width: 440px; }
.account-type-help { display: grid; gap: 5px; max-width: 72ch; margin-bottom: 16px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.account-type-help:not(:has(p)) { display: none; }
.account-type-help p { margin: 0; }
.permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px 24px;
  align-items: start;
}
.permission-group {
  display: grid;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 5px 12px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.permission-group legend { padding-inline: 6px; }
.permission-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px;
  font-size: .875rem;
  line-height: 1.4;
}
.permission-choice + .permission-choice { border-top: 1px solid var(--line); }
.permission-choice input { flex: none; margin: 2px 0 0; width: 16px; height: 16px; }
.permission-choice:focus-within { outline: 2px solid var(--violet); outline-offset: -2px; }
.permission-choice-access {
  padding: 12px 10px;
  border: 1px solid color-mix(in srgb, var(--violet) 72%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--violet) 17%, var(--surface));
  font-weight: 700;
}
.permission-choice-access input { accent-color: var(--violet); }
.permission-group-footer { display: flex; justify-content: end; margin-top: 12px; }
.permission-area-list { display: grid; list-style: none; padding: 0; margin: 0; }
.permission-choice-access + .permission-area-list { margin-top: 6px; }
.permission-area-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }
.permission-area-row + .permission-area-row { border-top: 1px solid var(--line); }
.permission-area-row > div { min-width: 0; }
.permission-area-row strong, .permission-area-row small { display: block; }
.permission-area-row small { color: var(--muted); }
.permission-detail-trigger { flex: none; }
.permission-detail { display: grid; gap: 12px; }
.permission-detail-actions:empty { display: none; }
.permission-detail .actions { margin-top: 8px; }
@media (min-width: 1200px) {
  .account-type-form .permission-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .permission-group-studio { grid-column: 3; grid-row: 1 / span 2; }
}
.permission-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.permission-description { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.permission-required { color: var(--muted); font-weight: 650; }
.user-row-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.user-edit-trigger { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.user-edit-trigger svg { width: 16px; height: 16px; }
.profile-avatar { object-fit: cover; }
.user-edit-profile { display: flex; align-items: center; gap: 14px; }
.user-edit-profile .avatar { flex: none; width: 56px; height: 56px; font-size: 1rem; }
.user-edit-profile > div { min-width: 0; overflow-wrap: anywhere; }
.user-edit-profile small { display: block; margin-top: 3px; color: var(--muted); }
.user-edit-facts { display: grid; gap: 8px; margin: 16px 0; }
.user-edit-facts div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.user-edit-facts dt { color: var(--muted); }
.user-edit-facts dd { margin: 0; font-weight: 650; }
.user-edit-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.user-edit-section h3 { margin: 0; font-size: 1rem; }
.user-password-reset summary { cursor: pointer; font-weight: 700; }
.user-password-reset form { margin-top: 14px; }
.profile-photo-controls { display: grid; gap: 6px; margin-top: 16px; }
.profile-photo-controls input { max-width: 100%; }
.account-type-removal { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.portal .directory > .empty { padding: 38px 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.portal .user-menu { min-width: 224px; }

.registration-requests {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.registration-requests h3 { margin: 0; padding: 10px 16px; color: var(--violet-dark); background: var(--soft); border-radius: var(--radius-card) var(--radius-card) 0 0; font-size: .875rem; }
.registration-requests ul { margin: 0; padding: 0; list-style: none; }
.registration-requests li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.registration-requests li + li { border-top: 1px solid var(--line); }
.registration-requests .identity { min-width: 0; overflow-wrap: anywhere; }
.registration-actions { flex-wrap: wrap; }
#registration-url { min-width: 0; font-size: .875rem; }
[data-copy-status]:empty { margin: 0; }

.portal-content:has(> .member-home) {
  --library-particle: #606b80;
  position: relative;
  isolation: isolate;
  align-self: stretch;
}

[data-color-mode="dark"] .portal-content:has(> .member-home) {
  --library-particle: #b6c0d1;
}

.library-particles {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: min(100%, 100svh);
  overflow: clip;
  pointer-events: none;
  mask-image: linear-gradient(transparent, #000 14% 86%, transparent);
}

.library-particles > span {
  position: absolute;
  width: var(--particle-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--library-particle);
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: no-preference) {
  .library-particles > span { transition: translate 420ms cubic-bezier(.2, .65, .3, 1); }
}

.library-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .77fr);
  align-items: center;
  min-height: 253px;
  padding: 34px 44px;
  border-radius: 18px;
  background: var(--library-surface);
  color: var(--portal-rail-ink);
}
.library-intro::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--sky-gradient); pointer-events: none; }
.library-intro h1 { max-width: 16ch; text-wrap: balance; }
.library-lead { max-width: 39ch; margin-top: 11px; color: var(--portal-rail-muted); line-height: 1.6; }
.library-intro .primary { margin-top: 20px; background: #fff; color: #111113; }
.library-intro .primary:hover { background: #e9ecf5; }
.library-intro .primary:focus-visible { outline-color: var(--portal-highlight); }
.library-diagram-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.library-create-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.library-intro .library-create-actions .primary { margin-top: 0; }
.library-create-actions svg, .portal .map-icon > svg { width: 18px; height: 18px; flex: none; }
.library-diagram-actions .secondary {
  color: #fff; border-color: #ffffff75; background: #ffffff14;
}
.library-diagram-actions .secondary:hover { background: #ffffff2e; }
.map-illustration { position: relative; justify-self: end; width: min(100%, 330px); height: 170px; }
.map-illustration::before { content: ''; position: absolute; inset: -45px -75px; z-index: -1; background: radial-gradient(circle, #b7ccf545 1px, transparent 1.25px) 0 0 / 16px 16px; mask-image: radial-gradient(ellipse, #000 25%, transparent 72%); }
.idea-root, .idea-branch { position: absolute; z-index: 1; display: grid; place-items: center; height: 34px; border-radius: 6px; padding-inline: 10px; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.idea-root { width: 38%; height: 46px; top: calc(50% - 23px); left: 0; background: #f6f6f7; color: #17171b; }
.idea-branch { width: 34%; left: 66%; color: #17171b; background: var(--sky-blue); }
.idea-top { top: 11px; }
.idea-middle { top: calc(50% - 17px); background: var(--sky-lilac); }
.idea-bottom { bottom: 11px; background: var(--sky-peach); }
.idea-wire { position: absolute; left: 38%; width: 28%; border: 1px solid #b7ccf590; border-right: 0; }
.wire-middle { top: 50%; border-width: 1px 0 0; }
.wire-top { top: 28px; height: 58px; border-bottom: 0; border-radius: 23px 0 0; }
.wire-bottom { bottom: 28px; height: 57px; border-top: 0; border-radius: 0 0 0 23px; }

.portal .map-library { width: 100%; margin: 32px 0 0; }
.portal .map-library h2 { margin: 0; }
.library-count { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.library-views { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.library-views a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius-control); color: var(--muted); font-size: .875rem; font-weight: 700;
}
.library-views a:hover { background: var(--hover); }
.library-views a[aria-current="page"] { background: var(--soft); color: var(--violet-dark); }
.portal .map-list { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.map-list-item:has(.map-archive-action) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.map-archive-action { padding-inline: 8px 18px; }
.map-archive-action .secondary { min-height: 44px; padding-inline: 12px; font-size: .875rem; }
.portal .map-list li:first-child .map-row { border-start-start-radius: var(--radius-card); border-start-end-radius: var(--radius-card); }
.portal .map-list li:last-child .map-row { border-end-start-radius: var(--radius-card); border-end-end-radius: var(--radius-card); }
.portal .map-row { min-height: 77px; padding-inline: 18px; }
.portal .map-row > .icon { margin-left: 4px; }
.portal .maps-empty { background: var(--surface); padding: 40px 16px; }
.portal .map-icon .icon { transform: scale(1.12); }
@media (max-width: 520px) {
  .library-intro .map-illustration { display: none; }
  .library-diagram-actions { margin-top: 0; }
  .library-create-actions { display: grid; width: 100%; }
  .library-create-actions .primary { justify-content: flex-start; }
}

.account-content { max-width: 900px; container: account / inline-size; }
.portal-document .account-heading { align-items: center; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 20px; }
.portal-document .account-search { width: min(370px, 100%); padding-inline-end: 5px; }
.account-search button { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); }
.account-search button:hover { background: var(--soft); color: var(--text); }
.account-search button svg { width: 18px; stroke-width: 1.8; }
.account-search-empty { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); color: var(--muted); }
.account-settings { display: flex; flex-wrap: wrap; gap: 16px; }
.account-settings > [data-account-card] { flex: 1 1 325px; min-width: 0; scroll-margin-top: 16px; }
.account-content [hidden] { display: none; }
@container account (width >= 660px) {
  .account-settings:has(> .pipese-account):not(:has(> [hidden])) {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: max-content auto auto;
    grid-template-areas: "profile password" "pipese password" "linked linked";
  }
  .account-profile { grid-area: profile; }
  .account-password { grid-area: password; }
  .pipese-account { grid-area: pipese; }
  .linked-accounts { grid-area: linked; }
}
@container account (width < 660px) {
  .portal-document .account-heading { align-items: flex-start; flex-direction: column; }
  .portal-document .account-search { width: 100%; }
}
.account-profile, .account-security { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.account-profile { display: flex; align-items: start; gap: 12px; }
.account-profile > div { min-width: 0; overflow-wrap: anywhere; }
.account-profile p, .account-security > p { margin-top: 6px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.account-profile small { display: block; margin-top: 13px; color: var(--muted); font-weight: 650; }
.account-security h2 { margin-bottom: 16px; }
.account-security .primary { justify-self: start; }
.linked-accounts h2 { margin-bottom: 6px; }
.linked-accounts > .notice { margin-top: 12px; }
.linked-account-list { list-style: none; margin: 16px 0 0; padding: 0; border-block: 1px solid var(--line); }
.linked-account-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; }
.linked-account-row + .linked-account-row { border-top: 1px solid var(--line); }
.linked-account-row .avatar { flex: none; }
.linked-account-identity { flex: 1 1 175px; min-width: 0; overflow-wrap: anywhere; }
.linked-account-identity small, .linked-account-choice small { display: block; margin-top: 2px; color: var(--muted); }
.linked-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.linked-account-add, .linked-account-form { margin-top: 14px; }
.linked-account-add > summary { width: fit-content; cursor: pointer; }
.linked-account-form { max-width: 420px; }
.linked-account-choice { display: grid; justify-content: start; padding-block: 8px; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.linked-account-form > a { justify-self: start; text-decoration: underline; }
.pipese-account > p { overflow-wrap: anywhere; }
.pipese-account > .actions { flex-wrap: wrap; justify-content: start; }
.pipese-account > form, .pipese-account > .actions, .pipese-binding > .secondary { margin-top: 14px; }
.pipese-binding { max-width: 660px; }
.portal-error .secondary { margin-top: 20px; }

.auth-page { background: var(--surface); }
.auth-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, min(48%, 760px)) minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
}
.auth-cover {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 560px;
  overflow: hidden;
  border-radius: 16px;
  isolation: isolate;
  color: #fff;
  background: var(--portal-rail);
}
.auth-cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 74%;
  background:
    linear-gradient(180deg, transparent 60%, var(--portal-rail) 100%),
    radial-gradient(ellipse at 91% 69%, #ffd0a2b0, transparent 36%),
    radial-gradient(ellipse at 12% 72%, #ffd0a2cf, transparent 48%),
    linear-gradient(126deg, transparent 55%, #e8bac76b 68%, transparent 77%),
    linear-gradient(180deg, var(--sky-blue), var(--sky-lilac) 46%, var(--sky-rose) 72%, var(--sky-peach));
}
.auth-cover-copy { padding: 36px 40px; }
.auth-cover-copy p { max-width: 15ch; font-size: 2.625rem; line-height: 1.08; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.auth-main { display: grid; grid-template-rows: auto 1fr; align-items: center; min-width: 0; padding: 12px 20px 55px 4px; }
.auth-header { display: flex; justify-content: space-between; align-items: center; min-width: 0; gap: 12px; }
.auth-header .brand { letter-spacing: -.035em; }
.auth-header .appearance-trigger { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; border: 1px solid var(--control-line); border-radius: var(--radius-control); padding: 0 10px; background: var(--surface); color: var(--muted); font-size: .8125rem; font-weight: 700; }
.auth-header .appearance-trigger:hover { background: var(--hover); color: var(--violet-dark); }
.auth-header .appearance-trigger[aria-pressed="true"] { background: var(--soft); color: var(--violet-dark); }
.auth-content { width: min(100%, 388px); justify-self: center; padding: 32px 0; }
.auth-content h1 { font-size: 2.375rem; line-height: 1.12; }
.auth-content > .lead { margin-bottom: 27px; }
.auth-form { gap: 15px; }
.auth-form .field { gap: 7px; }
.auth-form .field input, .auth-password input { min-height: 48px; }
.auth-password { position: relative; margin-top: -8px; }
.auth-password input { width: 100%; border: 1px solid var(--control-line); border-radius: var(--radius-compact); padding: 8px 48px 8px 10px; background: var(--surface); color: var(--text); }
.password-toggle { position: absolute; inset: 4px 4px 4px auto; width: 40px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.password-toggle[hidden], .auth-password input[type="password"] ~ button .eye-slash { display: none; }
.password-toggle:hover { background: var(--hover); color: var(--violet-dark); }
.auth-form .primary { min-height: 48px; margin-top: 5px; }
.auth-pipese { margin-top: 12px; }
.auth-pipese .secondary { min-height: 48px; }
.account-choices { display: grid; gap: 8px; }
.account-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--text); text-align: start; overflow-wrap: anywhere; }
.account-choice:hover { background: var(--hover); border-color: var(--control-line); }
.account-choice small { display: block; margin-top: 3px; color: var(--muted); }
.auth-return { display: inline-block; margin-top: 18px; color: var(--violet-dark); font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1080px) {
  .portal-document .shell, .portal .delegated-access > div { width: calc(100% - 56px); }
  .library-intro { padding-inline: 30px; }
  .portal-summary > div { padding-inline: 16px; }
}

@media (max-width: 850px) {
  .portal .portal-frame { display: block; }
  .portal-branded .portal-frame { display: flex; flex-direction: column; }
  .portal-branded .portal-content { flex: 1; min-height: 0; }
  .portal-sidebar {
    position: relative;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px 7px;
  }
  .portal-sidebar .brand-link { margin: 0; align-self: center; }
  .portal-nav { grid-row: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; margin: 0; }
  .portal-nav a { min-height: 40px; padding: 0 9px; gap: 7px; }
  .portal-sidebar-tools { display: flex; align-items: center; gap: 6px; margin: 0; }
  .portal-sidebar :is(.appearance-trigger, .studio-cheke-return) { gap: 5px; padding: 0 7px; }
  .portal-sidebar .appearance-trigger { min-height: 40px; }
  .portal-sidebar .account { border: 0; padding: 0; }
  .portal-sidebar .account summary { min-height: 40px; padding: 3px; }
  .portal-sidebar .account-menu { inset: calc(100% + 4px) 0 auto auto; min-width: 176px; }
  .portal-sidebar .account-menu:has(.account-switcher) { right: 0; left: auto; }
  .account-switcher-current { display: block; }
  .portal-sidebar .account summary > span:nth-child(2), .portal-sidebar .account .chevron { display: none; }
  .portal-document .shell { margin-top: 32px; }
  .auth-cover-copy { padding: 24px; }
  .auth-cover-copy p { font-size: 2.125rem; }
  .auth-main { padding-right: 6px; }
}

@media (max-width: 500px) {
  .studio-sidebar .portal-sidebar-tools { flex-direction: column; align-items: stretch; }
}

@media (max-width: 650px) {
  .portal-document .shell, .portal .delegated-access > div { width: calc(100% - 32px); }
  .portal-document .shell { padding-bottom: 42px; }
  .portal-document .shell h1, .auth-content h1 { font-size: 1.875rem; }
  .portal-page-heading { align-items: start; flex-direction: column; gap: 14px; margin-bottom: 23px; }
  .portal-summary { margin-bottom: 25px; }
  .portal-summary > div { flex-direction: column-reverse; align-items: start; padding: 13px 9px; }
  .portal-summary dt { font-size: .6875rem; overflow-wrap: anywhere; }
  .portal-summary dd { font-size: 1.5rem; }
  .portal-document .section-head { flex-direction: row; flex-wrap: wrap; }
  .portal-document .section-actions { width: 100%; justify-content: start; }
  .portal-document .section-actions .search { width: auto; max-width: 256px; }
  .portal .table-wrap { overflow: visible; }
  .portal .table-wrap:has(.user-actions[open]) { padding-bottom: 0; }
  .portal .portal-table, .portal .portal-table tbody { display: block; min-width: 0; }
  .portal .portal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .portal .portal-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 9px 5px; padding: 12px; }
  .portal .portal-table tbody tr + tr { border-top: 1px solid var(--line); }
  .portal .portal-table td { width: auto; padding: 0; border: 0; }
  .portal .portal-table td:first-child { grid-column: 1 / -2; }
  .portal .portal-table td.end { grid-column: -2; grid-row: 1; align-self: center; width: auto; }
  .portal .portal-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-weight: 650; font-size: .6875rem; }
  .portal .portal-table tbody tr:hover { background: var(--surface); }
  .portal .workspace-directory .portal-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  .library-intro { grid-template-columns: 1fr; min-height: 0; gap: 20px; padding: 24px; }
  .library-intro .map-illustration { justify-self: start; width: min(100%, 285px); height: 128px; }
  .map-illustration .idea-wire:is(.wire-top, .wire-bottom) { height: 37px; }
  .portal .map-library { margin-top: 25px; }
  .portal .map-row { padding-inline: 12px; }
  .map-archive-action { padding-inline-end: 12px; }
  .account-settings { gap: 12px; }
  .account-settings > [data-account-card] { padding: 18px; }

  .auth-layout { grid-template-columns: 1fr; gap: 0; padding: 0; align-content: start; }
  .auth-main { grid-row: 1; padding: 18px 20px 23px; }
  .auth-content { padding: 40px 0 16px; }
  .auth-content > .lead { margin-bottom: 20px; }
  .auth-cover { min-height: 190px; margin: 0 12px 12px; }
  .auth-cover-copy { padding: 16px; }
  .auth-cover-copy p { font-size: 1.5rem; }
}

@media (max-width: 520px) {
  .map-list-item:has(.map-archive-action) { grid-template-columns: minmax(0, 1fr); }
  .map-archive-action { justify-self: end; padding-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-document :is(.primary, .secondary, .row-link) { transition: none; }
}
