:root {
  --portal-pine: #06140e;
  --portal-pine-soft: #0d2117;
  --portal-cream: #f7efe1;
  --portal-surface: #fffef9;
  --portal-ink: #173429;
  --portal-soft: #345044;
  --portal-muted: #607268;
  --portal-line: #d5ddd4;
  --portal-gold: #c99335;
  --portal-gold-hover: #d7a84c;
  --portal-leaf: #2f7b4e;
  --portal-leaf-soft: #e6f2e8;
  --portal-danger: #8b3e35;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ag-portal-page {
  min-height: 100vh;
  margin: 0;
  color: var(--portal-ink);
  background: var(--portal-cream);
  font-family: Onest, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.portal-main {
  width: min(100%, 1384px);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 40px 40px 72px;
}

.portal-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 36px;
  border: 1px solid rgba(23, 52, 41, 0.1);
  border-radius: 20px;
  color: var(--portal-ink);
  background:
    radial-gradient(circle at 88% 18%, rgba(201, 147, 53, 0.15), transparent 30%),
    linear-gradient(135deg, #f5f8ef 0%, #eef5ec 52%, #fff9ec 100%);
  box-shadow: 0 22px 60px rgba(23, 52, 41, 0.08);
}

.portal-hero::after {
  position: absolute;
  top: -75px;
  right: -40px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(47, 123, 78, 0.1);
  border-radius: 50%;
  content: "";
}

.portal-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.portal-kicker {
  margin: 0;
  color: var(--portal-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 16px;
  text-transform: uppercase;
}

.portal-title {
  max-width: 850px;
  margin: 10px 0 0;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.portal-lead {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--portal-soft);
  font-size: 15px;
  line-height: 1.75;
}

.support-direct-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  color: var(--portal-ink);
  background: rgba(255, 254, 249, .78);
  text-decoration: none;
}
.support-direct-contact:hover { border-color: var(--portal-gold); }
.support-direct-contact b, .support-direct-contact small { display: block; }
.support-direct-contact small { margin-top: 2px; color: var(--portal-muted); font-size: 12px; }

/* Catalog rhythm shared by the public catalog, portfolio and support. */
.portal-catalog-header { padding-top: 1px; }

.portal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--portal-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.portal-back-link:hover { color: var(--portal-ink); }
.portal-back-link svg { width: 16px; height: 16px; color: var(--portal-gold); }

.portal-catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.portal-catalog-title {
  margin: 8px 0 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 40px;
}

.portal-catalog-lead {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--portal-soft);
  font-size: 16px;
  line-height: 24px;
}

.portfolio-summary-line {
  display: flex;
  flex-wrap: wrap;
  margin: 22px 0 0;
  padding: 14px 18px;
  gap: 8px 28px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: rgba(255, 254, 249, .72);
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 20px;
}

.portfolio-summary-line span { display: inline-flex; align-items: baseline; gap: 5px; }
.portfolio-summary-line strong { color: var(--portal-ink); font-size: 14px; font-weight: 700; }

.portal-catalog-content { margin-top: 28px; }

.portal-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.portal-catalog-toolbar[hidden], .portal-catalog-count[hidden] { display: none !important; }

.portfolio-toolbar-clean {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.portfolio-filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.portfolio-filter-label {
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 600;
}

.portal-search--wide { width: 100%; max-width: none; flex-basis: auto; }

.portal-catalog-count {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 20px;
}

.portal-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  gap: 9px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  color: var(--portal-ink);
  background: var(--portal-surface);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.portal-button:hover {
  border-color: rgba(201, 147, 53, 0.72);
  transform: translateY(-1px);
}

.portal-button--primary {
  border-color: var(--portal-gold);
  color: #13271e;
  background: var(--portal-gold);
}

.portal-button--primary:hover {
  border-color: var(--portal-gold-hover);
  background: var(--portal-gold-hover);
}

.portal-button--gold {
  border-color: var(--portal-gold);
  color: #13271e;
  background: var(--portal-gold);
}

.portal-button--gold:hover {
  border-color: var(--portal-gold-hover);
  background: var(--portal-gold-hover);
}

.portal-button--primary:active,
.portal-button--gold:active {
  border-color: #bd8527;
  background: #bd8527;
  transform: translateY(0);
}

.portal-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.portal-button svg,
.portal-icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.portal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  gap: 14px;
}

.portal-stat {
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: var(--portal-surface);
  box-shadow: 0 12px 35px rgba(23, 52, 41, 0.045);
}

.portal-stat-label {
  margin: 0;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.portal-stat-value {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.portal-panel {
  margin-top: 18px;
  padding: 26px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: var(--portal-surface);
  box-shadow: 0 16px 45px rgba(23, 52, 41, 0.05);
}

.portal-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.portal-panel-title {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.portal-panel-copy {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.625;
}

.portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  gap: 14px;
}

.portal-tabs {
  display: inline-flex;
  height: 46px;
  max-width: 100%;
  padding: 4px;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: var(--portal-surface);
  scrollbar-width: none;
}

.portal-tabs::-webkit-scrollbar {
  display: none;
}

.portal-tab {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: var(--portal-soft);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}

.portal-tab[aria-selected="true"] {
  color: #f3f1e8;
  background: var(--portal-pine);
  box-shadow: none;
}

.portal-search {
  position: relative;
  flex: 0 1 320px;
}

.portal-search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--portal-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.portal-input,
.portal-select,
.portal-textarea {
  width: 100%;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  color: var(--portal-ink);
  background: #fff;
  font: inherit;
  font-size: 14px;
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.portal-input,
.portal-select {
  min-height: 46px;
  padding: 0 16px;
  line-height: 20px;
}

.portal-search .portal-input {
  padding-left: 48px;
  background: var(--portal-surface);
}

.portal-textarea {
  min-height: 132px;
  padding: 13px 14px;
  line-height: 1.55;
  resize: vertical;
}

.portal-input:focus,
.portal-select:focus,
.portal-textarea:focus {
  border-color: var(--portal-gold);
  box-shadow: 0 0 0 3px rgba(201, 147, 53, 0.14);
}

.portal-field {
  display: block;
}

.portal-field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--portal-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.portal-field--full {
  grid-column: 1 / -1;
}

.portal-form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.portal-form-message[data-tone="error"] {
  color: var(--portal-danger);
}

.portal-form-message[data-tone="success"] {
  color: var(--portal-leaf);
}

.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  gap: 15px;
}

.portal-project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  gap: 24px;
}

.portfolio-project-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  color: var(--portal-ink);
  background: var(--portal-surface);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.portfolio-project-card:hover,
.portfolio-project-card:focus-visible {
  border-color: var(--portal-gold);
  box-shadow: 0 18px 44px rgba(6, 20, 14, 0.12);
  transform: translateY(-3px);
}

.portfolio-project-media {
  position: relative;
  display: block;
  height: 176px;
  overflow: hidden;
  background: #dfe6dd;
}

.portfolio-project-media::after {
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent);
  content: "";
}

.portfolio-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.portfolio-project-card:hover .portfolio-project-media img { transform: scale(1.025); }

.portfolio-project-badge,
.portfolio-project-number {
  position: absolute;
  z-index: 1;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.portfolio-project-badge { left: 12px; gap: 5px; background: var(--portal-leaf); }
.portfolio-project-badge svg { width: 13px; height: 13px; }
.portfolio-project-number { right: 12px; background: rgba(6, 20, 14, .72); backdrop-filter: blur(6px); }

.portfolio-project-region {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 13px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portfolio-project-region svg { width: 16px; height: 16px; flex: 0 0 auto; color: #efbc55; }

.portfolio-project-body {
  display: flex;
  padding: 20px;
  flex: 1;
  flex-direction: column;
}

.portfolio-project-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portfolio-project-meta > span:last-child {
  max-width: 48%;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 16px;
  text-align: right;
}

.portfolio-project-meta b { display: block; color: var(--portal-ink); }

.portfolio-project-title {
  display: -webkit-box;
  min-height: 56px;
  margin-top: 12px;
  overflow: hidden;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.portfolio-project-summary {
  display: -webkit-box;
  min-height: 72px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--portal-soft);
  font-size: 14px;
  line-height: 1.625;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.portfolio-project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
}

.portfolio-project-metrics > span {
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
}

.portfolio-project-metrics > span + span { border-left: 1px solid var(--portal-line); }
.portfolio-project-metrics small { display: block; color: var(--portal-muted); font-size: 12px; line-height: 16px; }
.portfolio-project-metrics b { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: 16px; font-weight: 700; line-height: 24px; }

.portfolio-project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  gap: 12px;
  border-top: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 16px;
}

.portfolio-project-action {
  display: inline-flex;
  min-height: 46px;
  padding: 0 20px;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  color: #13271e;
  background: var(--portal-gold);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.portfolio-project-action svg { width: 15px; height: 15px; }

.portfolio-card {
  display: flex;
  min-width: 0;
  min-height: 220px;
  padding: 22px;
  flex-direction: column;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
  border-color: rgba(201, 147, 53, 0.72);
  box-shadow: 0 18px 42px rgba(23, 52, 41, 0.09);
  transform: translateY(-2px);
}

.portfolio-card-top,
.portfolio-card-footer,
.document-row-main,
.ticket-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.portfolio-card-title {
  display: block;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.portfolio-card-meta {
  display: block;
  margin: 6px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.5;
}

.portal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  flex: 0 0 auto;
  gap: 6px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-soft);
  background: #f8faf6;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.portal-chip::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #83958b;
  content: "";
}

.portal-chip[data-tone="active"] {
  border-color: rgba(47, 123, 78, 0.2);
  color: #276842;
  background: var(--portal-leaf-soft);
}

.portal-chip[data-tone="active"]::before {
  background: var(--portal-leaf);
}

.portal-chip[data-tone="pending"] {
  border-color: rgba(201, 147, 53, 0.25);
  color: #76551e;
  background: #fff7e7;
}

.portal-chip[data-tone="pending"]::before {
  background: var(--portal-gold);
}

.portfolio-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  gap: 10px;
}

.portfolio-metric {
  padding: 12px 13px;
  border-radius: 11px;
  background: #f6f7f2;
}

.portfolio-metric span {
  display: block;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio-metric strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.portfolio-card-footer {
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  color: var(--portal-soft);
  font-size: 12px;
  font-weight: 700;
}

.portfolio-card-footer svg {
  width: 17px;
  height: 17px;
  color: var(--portal-gold);
  transition: transform 160ms ease;
}

.portfolio-card:hover .portfolio-card-footer svg {
  transform: translateX(3px);
}

.portal-state {
  display: flex;
  min-height: 220px;
  padding: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--portal-line);
  border-radius: 15px;
  background: rgba(247, 239, 225, 0.34);
  text-align: center;
}

.portal-state[hidden] {
  display: none;
}

.portal-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--portal-leaf);
  background: var(--portal-leaf-soft);
}

.portal-state-icon svg {
  width: 23px;
  height: 23px;
}

.portal-state h2,
.portal-state h3 {
  margin: 16px 0 0;
  font-size: 19px;
}

.portal-state p {
  max-width: 520px;
  margin: 7px 0 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.65;
}

.portal-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--portal-line);
  border-top-color: var(--portal-gold);
  border-radius: 50%;
  animation: portal-spin 800ms linear infinite;
}

@keyframes portal-spin {
  to { transform: rotate(360deg); }
}

.documents-layout,
.support-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.55fr);
  margin-top: 24px;
  gap: 18px;
  align-items: start;
}

.portal-side-card,
.portal-content-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: var(--portal-surface);
  box-shadow: none;
}

.portal-side-card {
  position: sticky;
  top: 94px;
}

.portal-side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--portal-leaf);
  background: var(--portal-leaf-soft);
}

.portal-side-icon svg {
  width: 22px;
  height: 22px;
}

.portal-side-card h2,
.portal-content-card h2 {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 28px;
}

.portal-side-card p {
  margin: 8px 0 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.625;
}

.portal-side-links {
  display: grid;
  margin-top: 18px;
  gap: 6px;
}

.portal-side-link {
  display: flex;
  min-height: 44px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  color: var(--portal-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.portal-side-link:hover {
  color: #8b6218;
  background: #fff7e7;
}

.portal-section + .portal-section {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--portal-line);
}

.portal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.portal-section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.portal-section-count {
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 16px;
}

.document-list,
.ticket-list,
.ticket-messages {
  display: grid;
  margin-top: 16px;
  gap: 9px;
}

.document-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--portal-line);
}

.document-filter-label {
  margin-right: 4px;
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 600;
}

.document-filter-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--portal-soft);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.document-filter-tab:hover {
  color: var(--portal-ink);
  background: #fffaf0;
}

.document-filter-tab.is-active {
  border-color: var(--portal-pine);
  color: #fff;
  background: var(--portal-pine);
}

.document-filter-tab[hidden] {
  display: none;
}

.document-row,
.ticket-row {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--portal-line);
  border-radius: 13px;
  color: var(--portal-ink);
  background: #fff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.document-row:hover,
.ticket-row:hover,
.ticket-row[aria-current="true"] {
  border-color: rgba(201, 147, 53, 0.58);
  background: #fffaf0;
}

.document-row:hover {
  transform: translateY(-1px);
}

.document-row-main {
  align-items: center;
}

.document-row-copy,
.ticket-row-copy {
  min-width: 0;
}

.document-row-title,
.ticket-row-title {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-row-meta,
.ticket-row-meta {
  display: block;
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 16px;
}

.document-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--portal-leaf);
  background: var(--portal-leaf-soft);
}

.document-row-action svg {
  width: 17px;
  height: 17px;
}

.document-offer {
  padding: 20px;
  border: 1px solid rgba(201, 147, 53, 0.25);
  border-radius: 15px;
  background: #fffaf0;
}

.document-offer h3 {
  margin: 0;
  font-size: 17px;
}

.document-offer p {
  margin: 7px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.6;
}

.document-offer-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 16px;
  gap: 9px;
}

.document-offer-content {
  max-height: 280px;
  margin-top: 16px;
  padding: 17px;
  overflow-y: auto;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  color: var(--portal-soft);
  background: #fff;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.support-layout {
  grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.45fr);
}

.support-layout--catalog {
  margin-top: 32px;
  gap: 24px;
  align-items: start;
}

.support-layout--catalog .portal-side-card { position: static; }

.support-layout--catalog .portal-side-card,
.support-layout--catalog .portal-content-card {
  border-radius: 18px;
  box-shadow: none;
}

.support-guide {
  padding: 22px;
  background: var(--portal-surface);
}

.support-guide .portal-side-icon {
  border: 1px solid rgba(201, 147, 53, .34);
  color: var(--portal-gold);
  background: transparent;
}

.support-guide-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--portal-soft);
  font-size: 12px;
  font-weight: 600;
}

.support-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--portal-gold);
  box-shadow: 0 0 0 3px rgba(201, 147, 53, .12);
}

.support-guide h2 {
  margin-top: 18px;
  font-size: 24px;
  line-height: 30px;
}

.support-guide > p {
  max-width: 360px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.65;
}

.support-guide-links {
  display: grid;
  margin-top: 20px;
  gap: 8px;
}

.support-guide-links a {
  display: flex;
  min-height: 58px;
  padding: 11px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(23, 52, 41, .1);
  border-radius: 12px;
  color: var(--portal-ink);
  background: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.support-guide-links a:hover {
  border-color: rgba(201, 147, 53, .48);
  background: #fff;
  transform: translateY(-1px);
}

.support-guide-links b,
.support-guide-links small {
  display: block;
}

.support-guide-links b {
  font-size: 13px;
  line-height: 18px;
}

.support-guide-links small {
  margin-top: 2px;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 15px;
}

.support-guide-links a > span:last-child {
  color: var(--portal-gold);
  font-size: 18px;
}

.support-faq-heading {
  display: flex;
  margin-top: 26px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.support-faq-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
}

.support-faq-heading span {
  color: var(--portal-muted);
  font-size: 11px;
}

.support-guest-card {
  min-height: 360px;
  padding: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(201, 147, 53, .15), transparent 28%),
    linear-gradient(135deg, #fffef9 0%, #fbf4e8 100%);
}

.support-guest-mark {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: var(--portal-gold);
  background: #fff4d9;
}

.support-guest-mark svg {
  width: 24px;
  height: 24px;
}

.support-card-kicker {
  margin-top: 18px;
  color: var(--portal-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 16px;
  text-transform: uppercase;
}

.support-guest-card h2 {
  margin-top: 6px;
  font-size: 28px;
  line-height: 34px;
}

.support-guest-card .portal-panel-copy {
  max-width: 520px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.65;
}

.support-benefits {
  display: flex;
  flex-wrap: wrap;
  margin-top: 22px;
  gap: 8px;
}

.support-benefits span {
  padding: 7px 10px;
  border: 1px solid rgba(23, 52, 41, .1);
  border-radius: 999px;
  color: var(--portal-soft);
  background: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 600;
}

.support-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 52, 41, .1);
  gap: 12px;
}

.support-steps div {
  display: grid;
  gap: 4px;
}

.support-steps b {
  color: var(--portal-gold);
  font-size: 11px;
  line-height: 15px;
}

.support-steps span {
  color: var(--portal-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
}

.support-guest-actions {
  margin-top: 26px;
}

.support-ticket-form {
  margin-top: 20px;
}

.support-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 5px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: var(--portal-surface);
}

.support-workspace-tabs[hidden] {
  display: none;
}

.support-workspace-tab {
  display: inline-flex;
  min-height: 40px;
  padding: 7px 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  color: var(--portal-soft);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.support-workspace-tab.is-active {
  color: #f7f4ea;
  background: var(--portal-pine);
}

.support-workspace-tab b {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--portal-soft);
  background: var(--portal-cream);
  font-size: 10px;
  line-height: 1;
}

.support-workspace-tab.is-active b {
  color: var(--portal-pine);
  background: var(--portal-gold);
}

.support-choice-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.support-choice-fieldset > .portal-field-label {
  margin-bottom: 10px;
}

.support-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.support-choice-card {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.support-choice-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.support-choice-visual {
  display: grid;
  min-height: 88px;
  padding: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--portal-line);
  border-radius: 13px;
  color: var(--portal-soft);
  background: #fff;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.support-choice-card:hover .support-choice-visual {
  border-color: rgba(201, 147, 53, .54);
  transform: translateY(-1px);
}

.support-choice-card > input:focus-visible + .support-choice-visual {
  outline: 3px solid rgba(201, 147, 53, .22);
  outline-offset: 2px;
}

.support-choice-card > input:checked + .support-choice-visual {
  border-color: var(--portal-gold);
  color: var(--portal-ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(201, 147, 53, .2);
}

.support-choice-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 147, 53, .28);
  border-radius: 9px;
  color: var(--portal-gold);
  background: transparent;
}

.support-choice-card > input:checked + .support-choice-visual .support-choice-icon {
  border-color: var(--portal-gold);
  color: var(--portal-pine);
  background: var(--portal-gold);
}

.support-choice-icon svg {
  width: 18px;
  height: 18px;
}

.support-choice-visual b,
.support-choice-visual small {
  display: block;
}

.support-choice-visual b {
  font-size: 13px;
  line-height: 18px;
}

.support-choice-visual small {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 15px;
}

.support-ticket-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 20px;
  gap: 16px;
}

.support-ticket-details > .portal-field:last-child {
  grid-column: 1 / -1;
}

.support-project-field .portal-field-label small {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 400;
}

.support-topic-suggestions {
  display: flex;
  min-height: 34px;
  margin-bottom: 9px;
  flex-wrap: wrap;
  gap: 6px;
}

.support-topic-chip {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-soft);
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
}

.support-topic-chip:hover,
.support-topic-chip.is-selected {
  border-color: var(--portal-gold);
  color: var(--portal-ink);
  background: #fff;
}

.support-combobox {
  position: relative;
}

.support-combobox-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  padding: 8px 12px 8px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  color: var(--portal-ink);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.support-combobox-button:hover,
.support-combobox-button[aria-expanded="true"] {
  border-color: var(--portal-gold);
}

.support-combobox-button:focus-visible {
  outline: 3px solid rgba(201, 147, 53, .18);
  outline-offset: 1px;
}

.support-combobox-button b,
.support-combobox-button small,
.support-combobox-option b,
.support-combobox-option small {
  display: block;
}

.support-combobox-button b,
.support-combobox-option b {
  font-size: 13px;
  line-height: 18px;
}

.support-combobox-button small,
.support-combobox-option small {
  margin-top: 1px;
  color: var(--portal-muted);
  font-size: 10px;
  line-height: 14px;
}

.support-combobox-button > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--portal-gold);
  transition: transform 150ms ease;
}

.support-combobox-button[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.support-combobox-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: 270px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(23, 52, 41, .13);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(6, 20, 14, .16);
}

.support-combobox-menu[hidden] {
  display: none;
}

.support-combobox-option {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  color: var(--portal-ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.support-combobox-option:hover,
.support-combobox-option:focus-visible,
.support-combobox-option.is-selected {
  outline: 0;
  background: var(--portal-cream);
}

.support-option-check {
  color: var(--portal-gold);
  font-size: 15px;
  font-weight: 700;
  opacity: 0;
}

.support-combobox-option.is-selected .support-option-check {
  opacity: 1;
}

.support-ticket-column > .portal-content-card {
  padding: 24px;
}

.support-ticket-column {
  display: grid;
  min-height: 0;
  gap: 14px;
}

.support-ticket-column > .support-guest-card {
  height: auto;
  box-sizing: border-box;
}

.ticket-detail-back {
  margin-bottom: 18px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.ticket-status {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border-radius: 999px;
  color: var(--portal-soft);
  background: #edf1ec;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ticket-status[data-tone="active"] {
  color: var(--portal-ink);
  background: var(--portal-cream);
}

.ticket-status[data-tone="pending"] {
  color: var(--portal-ink);
  background: rgba(201, 147, 53, .14);
}

.ticket-detail[hidden],
.portal-auth-only[hidden],
.portal-guest-only[hidden],
.portal-content-card[hidden] {
  display: none;
}

.ticket-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-detail-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.ticket-message {
  max-width: 84%;
  padding: 13px 15px;
  justify-self: start;
  border: 1px solid var(--portal-line);
  border-radius: 14px 14px 14px 4px;
  color: var(--portal-soft);
  background: #f7f9f5;
  font-size: 14px;
  line-height: 1.625;
}

.ticket-message[data-own="true"] {
  justify-self: end;
  border-color: rgba(47, 123, 78, 0.16);
  border-radius: 14px 14px 4px 14px;
  color: var(--portal-ink);
  background: var(--portal-leaf-soft);
}

.ticket-message-meta {
  display: block;
  margin-top: 6px;
  color: var(--portal-muted);
  font-size: 10px;
}

.support-faq {
  display: grid;
  margin-top: 18px;
  gap: 8px;
}

.support-faq-item {
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 13px;
  background: #fff;
}

.support-faq-trigger {
  display: flex;
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  color: var(--portal-ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}

.support-faq-trigger span:last-child {
  color: var(--portal-gold);
  font-size: 20px;
  font-weight: 400;
  transition: transform 150ms ease;
}

.support-faq-trigger[aria-expanded="true"] span:last-child {
  transform: rotate(45deg);
}

.support-faq-answer {
  margin: 0;
  padding: 0 15px 15px;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.625;
}

.portal-toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(23, 52, 41, 0.12);
  border-radius: 12px;
  color: #fff;
  background: var(--portal-pine);
  box-shadow: 0 18px 50px rgba(6, 20, 14, 0.24);
  font-size: 12px;
  line-height: 1.55;
}

.portal-toast[hidden] {
  display: none;
}

.portal-footer {
  border-top: 1px solid rgba(23, 52, 41, 0.1);
}

.portal-footer-inner {
  display: flex;
  width: min(100%, 1384px);
  min-height: 72px;
  margin: 0 auto;
  padding: 18px 40px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-footer a {
  color: var(--portal-soft);
  font-weight: 700;
  text-decoration: none;
}

/* Dashboard capital block: one baseline, stable legend columns and equal visual height. */
.capital-dashboard-head {
  align-items: flex-start !important;
}

.capital-dashboard-note {
  max-width: 280px;
  padding-top: 4px;
  text-align: right;
}

.capital-dashboard-grid {
  grid-template-columns: minmax(420px, 0.95fr) minmax(0, 1.35fr) !important;
  align-items: stretch !important;
  gap: 32px !important;
}

.capital-dashboard-summary {
  display: grid !important;
  grid-template-columns: 176px minmax(190px, 1fr);
  min-height: 176px;
  align-items: center !important;
  gap: 28px !important;
}

.capital-dashboard-legend {
  display: grid;
  width: 100%;
  margin: 0;
  gap: 15px;
}

.capital-dashboard-legend > div {
  display: grid !important;
  grid-template-columns: minmax(92px, 1fr) max-content;
  min-height: 28px;
  align-items: center;
  gap: 20px !important;
}

.capital-dashboard-legend dt {
  min-width: 0;
  white-space: nowrap;
}

.capital-dashboard-legend dd {
  min-width: max-content;
  text-align: right;
  white-space: nowrap;
}

.capital-dashboard-breakdown {
  display: flex;
  min-height: 176px;
  justify-content: flex-start;
  flex-direction: column;
}

@media (max-width: 1180px) {
  .portal-main {
    padding-right: 24px;
    padding-left: 24px;
  }

  .portal-footer-inner {
    padding-right: 24px;
    padding-left: 24px;
  }

  .capital-dashboard-grid {
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.25fr) !important;
    gap: 26px !important;
  }

  .capital-dashboard-summary {
    grid-template-columns: 156px minmax(176px, 1fr);
    min-height: 156px;
    gap: 22px !important;
  }

  .capital-dashboard-summary #capitalDonut {
    width: 156px;
    height: 156px;
  }

  .capital-dashboard-breakdown {
    min-height: 156px;
  }
}

@media (max-width: 960px) {
  .portal-main {
    min-height: calc(100vh - 68px);
    padding-top: 28px;
  }

  .portal-hero {
    padding: 28px;
  }

  .portal-hero-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .documents-layout,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .portal-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .portal-side-card {
    position: static;
  }

  .capital-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .capital-dashboard-summary {
    grid-template-columns: 176px minmax(160px, 1fr);
    min-height: auto;
  }

  .capital-dashboard-summary #capitalDonut {
    width: 176px;
    height: 176px;
  }

  .capital-dashboard-breakdown {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .portal-main {
    padding: 20px 16px 52px;
  }

  .portal-hero {
    padding: 24px 20px;
    border-radius: 17px;
  }

  .portal-title {
    font-size: 34px;
  }

  .portal-catalog-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .portal-catalog-title { font-size: 36px; }

  .portal-catalog-heading > .portal-button,
  .portal-catalog-heading > .portal-actions,
  .portal-catalog-heading > .portal-actions .portal-button { width: 100%; }

  .portal-catalog-toolbar { grid-template-columns: 1fr; }
  .portfolio-filter-row { justify-content: space-between; }
  .portfolio-filter-row .portal-tabs { width: auto; }
  .portal-project-grid { grid-template-columns: 1fr; gap: 18px; }

  .portal-actions,
  .portal-actions .portal-button {
    width: 100%;
  }

  .portal-summary,
  .portal-card-grid,
  .portal-form-grid {
    grid-template-columns: 1fr;
  }

  .portal-panel,
  .portal-side-card,
  .portal-content-card {
    padding: 20px;
    border-radius: 16px;
  }

  .portal-panel-head,
  .portal-toolbar,
  .portal-footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-search {
    width: 100%;
    flex-basis: auto;
  }

  .portal-tabs {
    display: flex;
    width: 100%;
  }

  .portal-tab {
    flex: 1 0 auto;
  }

  .portal-field--full {
    grid-column: auto;
  }

  .ticket-message {
    max-width: 94%;
  }

  .support-layout--catalog {
    margin-top: 24px;
    gap: 14px;
  }

  .support-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-choice-card:last-child {
    grid-column: 1 / -1;
  }

  .support-choice-card:last-child .support-choice-visual {
    min-height: 74px;
  }

  .support-choice-visual {
    min-height: 92px;
    padding: 11px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .support-choice-icon {
    width: 30px;
    height: 30px;
  }

  .support-ticket-details {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .support-ticket-details > .portal-field:last-child {
    grid-column: auto;
  }

  .support-guide,
  .support-ticket-column > .portal-content-card {
    padding: 18px;
  }

  .support-guide h2 {
    font-size: 22px;
    line-height: 28px;
  }

  .support-guest-card {
    min-height: 0;
    height: auto;
    padding: 22px 18px;
  }

  .support-guest-card h2 {
    font-size: 24px;
    line-height: 30px;
  }

  .support-benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .support-benefits span {
    border-radius: 10px;
  }

  .support-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .portal-footer-inner {
    padding: 20px 16px;
  }

  .capital-dashboard-head {
    align-items: flex-start !important;
  }

  .capital-dashboard-note {
    max-width: none;
    padding-top: 0;
    text-align: left;
  }

  .capital-dashboard-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 20px !important;
  }

  .capital-dashboard-legend {
    width: min(100%, 330px);
  }

  .capital-dashboard-breakdown {
    padding-top: 24px;
    border-top: 1px solid var(--portal-line);
  }
}

@media (max-width: 420px) {
  .portfolio-card-top,
  .ticket-detail-head {
    flex-direction: column;
  }

  .portfolio-card-metrics {
    grid-template-columns: 1fr;
  }

  .document-row-title {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-portal-page *,
  .ag-portal-page *::before,
  .ag-portal-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Documents follow the same content rhythm as the public project catalog. */
.documents-main { padding-top: 40px; }

.documents-catalog {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: var(--portal-surface);
}

.documents-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--portal-line);
}

.documents-toolbar .document-filter {
  display: flex;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 4px;
  flex-wrap: nowrap;
  gap: 2px;
  overflow-x: auto;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: var(--portal-surface);
  scrollbar-width: none;
}

.documents-toolbar .document-filter::-webkit-scrollbar { display: none; }

.documents-toolbar .document-filter-tab {
  min-height: 36px;
  padding: 0 15px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.documents-toolbar .document-filter-tab.is-active {
  color: #f3f1e8;
  background: var(--portal-pine);
}

.documents-toolbar-note {
  color: var(--portal-muted);
  font-size: 12px;
  white-space: nowrap;
}

.documents-guest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: rgba(247, 239, 225, .46);
}

.documents-guest-bar[hidden] { display: none; }
.documents-guest-bar div { min-width: 0; }
.documents-guest-bar strong { display: block; font-size: 14px; line-height: 20px; }
.documents-guest-bar span { display: block; margin-top: 2px; color: var(--portal-muted); font-size: 12px; line-height: 18px; }
.documents-guest-bar .portal-button { flex: 0 0 auto; }
.documents-catalog > .portal-section { margin-top: 26px; }
.documents-catalog > .portal-section + .portal-section { margin-top: 28px; padding-top: 26px; }
.documents-catalog .portal-section-head { align-items: center; }
.documents-catalog .portal-section-title { font-size: 20px; line-height: 28px; }

.documents-catalog .document-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 16px;
  padding: 18px;
  gap: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: #fff;
}

.document-offer-head { display: flex; align-items: center; min-width: 0; gap: 14px; }
.document-offer-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 11px; color: var(--portal-leaf); background: var(--portal-leaf-soft); }
.document-offer-icon svg { width: 20px; height: 20px; }
.documents-catalog .document-offer h3 { font-size: 16px; font-weight: 700; line-height: 22px; }
.documents-catalog .document-offer p { margin-top: 3px; line-height: 18px; }
.documents-catalog .document-offer-actions { margin: 0; flex-wrap: nowrap; }
.documents-catalog .document-offer-content { grid-column: 1 / -1; }
.documents-catalog .document-row { border-radius: 12px; background: #fff; }

@media (max-width: 700px) {
  .documents-main { padding-top: 24px; }
  .documents-main .portal-back-link { margin-bottom: 16px; }
  .documents-main .portal-catalog-title { font-size: 36px; line-height: 40px; }
  .documents-main .portal-catalog-heading { gap: 18px; }
  .documents-main .portal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .documents-main .portal-actions .portal-button { width: auto; padding-inline: 12px; }
  .documents-catalog { margin-top: 24px; padding: 16px; border-radius: 16px; }
  .documents-toolbar { align-items: stretch; flex-direction: column; gap: 9px; padding-bottom: 15px; }
  .documents-toolbar .document-filter { width: 100%; }
  .documents-toolbar-note { padding-left: 2px; }
  .documents-guest-bar { align-items: stretch; flex-direction: column; gap: 12px; }
  .documents-guest-bar .portal-button { width: 100%; }
  .documents-catalog .document-offer { grid-template-columns: 1fr; gap: 15px; padding: 16px; }
  .documents-catalog .document-offer-actions { margin: 0; }
  .documents-catalog .document-offer-actions .portal-button { flex: 1; padding-inline: 10px; }
  .documents-catalog .portal-section-head { align-items: flex-start; }
  .documents-catalog .portal-section-count { max-width: 128px; overflow-wrap: anywhere; text-align: right; }
}

/* Canonical investor dashboard: shared /app and /app1 presentation. */
.dashboard-page {
  color: var(--portal-ink);
  background: var(--portal-cream);
  font-family: Onest, system-ui, sans-serif;
}

.dashboard-main { padding-top: 40px; }

.dashboard-hero {
  min-height: 260px;
  border-color: var(--portal-line);
  border-radius: 18px;
  background: var(--portal-surface);
  box-shadow: none;
}

.dashboard-hero-media {
  filter: saturate(.88) contrast(.96);
  transition: opacity 180ms ease;
}

.dashboard-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
}

.dashboard-section-title {
  font-size: 28px;
  line-height: 36px;
}

.dashboard-kpi-card,
.dashboard-panel {
  border-color: var(--portal-line);
  border-radius: 18px;
  box-shadow: none;
}

.dashboard-kpi-card:hover {
  border-color: rgba(201, 147, 53, .62);
  transform: translateY(-2px);
}

.media-dashboard-grid { display: block; }

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 252px));
  gap: 16px;
}

.project-media-card {
  min-height: 0;
  border: 1px solid rgba(213, 221, 212, .72);
  border-radius: 18px;
  box-shadow: none;
}

.project-media-card--lead { grid-column: 1 / span 6; grid-row: 1 / span 2; }
.project-media-card--video { grid-column: 7 / span 3; grid-row: 1 / span 2; }
.project-media-card--compact:nth-child(3) { grid-column: 10 / span 3; grid-row: 1; }
.project-media-card--compact:nth-child(4) { grid-column: 10 / span 3; grid-row: 2; }
.project-media-card--compact .project-media-card__content { padding: 18px; }
.project-media-card--compact .project-media-card__description,
.project-media-card--compact .project-media-card__footer-label { display: none; }
.project-media-card--compact .project-media-card__title { font-size: 21px; line-height: 1.12; }
.project-media-card--compact .project-media-card__footer { margin-top: 12px; padding-top: 10px; }

.project-media-grid[data-count="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(380px, 460px);
}

.project-media-grid[data-count="1"] .project-media-card { grid-column: 1; grid-row: 1; }

.project-media-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(400px, 470px);
}

.project-media-grid[data-count="2"] .project-media-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.project-media-grid[data-count="2"] .project-media-card:nth-child(2) { grid-column: 2; grid-row: 1; }

.project-media-grid[data-count="3"] {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 214px));
}

.project-media-grid[data-count="3"] .project-media-card:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.project-media-grid[data-count="3"] .project-media-card:nth-child(2) { grid-column: 8 / span 5; grid-row: 1; }
.project-media-grid[data-count="3"] .project-media-card:nth-child(3) { grid-column: 8 / span 5; grid-row: 2; }

.priority-notifications-card {
  min-height: 0;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: var(--portal-surface);
  box-shadow: none;
}

.priority-notifications-card[hidden] { display: none; }

.priority-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.priority-notifications-meta {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 18px;
}

.priority-notifications-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  flex: 0 0 auto;
  border: 1px solid var(--portal-line);
  border-radius: 11px;
  color: var(--portal-ink);
  background: var(--portal-surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  transition: border-color 150ms ease, background 150ms ease;
}

.priority-notifications-toggle[hidden] { display: none; }

.priority-notifications-toggle:hover {
  border-color: var(--portal-gold);
  background: #fffaf0;
}

.priority-notifications-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.priority-notifications-card[data-expanded="true"] .priority-notifications-list {
  max-height: 430px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--portal-line) transparent;
  scrollbar-width: thin;
}

.priority-notification-item {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.priority-notification-item:hover {
  border-color: rgba(201, 147, 53, .58);
  background: #fffaf0;
  transform: translateY(-1px);
}

.priority-notification-item--unread {
  border-color: rgba(201, 147, 53, .38);
  background: #fffaf0;
}

.priority-notification-item__body {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1180px) {
  .project-media-grid,
  .project-media-grid[data-count="1"],
  .project-media-grid[data-count="2"],
  .project-media-grid[data-count="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .project-media-grid .project-media-card,
  .project-media-grid[data-count] .project-media-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    min-height: 320px;
  }

  .project-media-grid[data-count="1"] .project-media-card,
  .project-media-grid[data-count="3"] .project-media-card:first-child {
    grid-column: 1 / -1;
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .dashboard-main { padding-top: 24px; }
  .dashboard-hero { min-height: 300px; padding: 22px; }
  .dashboard-hero-media { width: 100%; opacity: .76; }
  .dashboard-title { font-size: 30px; line-height: 34px; }
  .dashboard-section-title { font-size: 24px; line-height: 30px; }

  .project-media-grid,
  .project-media-grid[data-count="1"],
  .project-media-grid[data-count="2"],
  .project-media-grid[data-count="3"] {
    display: flex;
    gap: 12px;
    margin-inline: -16px;
    padding-inline: 16px;
    padding-bottom: 5px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .project-media-grid::-webkit-scrollbar,
  .priority-notifications-list::-webkit-scrollbar { display: none; }

  .project-media-grid .project-media-card,
  .project-media-grid[data-count] .project-media-card:nth-child(n) {
    flex: 0 0 min(84vw, 380px);
    min-height: 410px;
    scroll-snap-align: start;
  }

  .project-media-card--compact .project-media-card__content { padding: 20px; }
  .project-media-card--compact .project-media-card__description { display: -webkit-box; }
  .project-media-card--compact .project-media-card__footer-label { display: block; }
  .project-media-card--compact .project-media-card__title { font-size: 27px; }

  .priority-notifications-head { align-items: flex-start; }
  .priority-notifications-toggle { min-height: 38px; padding-inline: 12px; }
  .priority-notifications-list {
    display: flex;
    gap: 10px;
    margin-inline: -18px;
    padding-inline: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .priority-notification-item { flex: 0 0 82vw; scroll-snap-align: start; }

  .priority-notifications-card[data-expanded="true"] .priority-notifications-list {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 420px;
    margin: 14px 0 0;
    padding: 0 4px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
  }

  .priority-notifications-card[data-expanded="true"] .priority-notification-item {
    width: auto;
    scroll-snap-align: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-hero-media,
  .dashboard-kpi-card,
  .priority-notification-item { transition: none; }
}
