/* PRE-QA R193: client-facing GDPR request workspace. */
body.portal-page .portal-privacy-workspace {
  display: grid;
  gap: 16px;
}

/* R315 visual foundation: current code-driven public hero and wider service shell. */
body.site-page {
  --site-shell: min(1380px, calc(100% - 48px));
}

body.site-page :where(.top-strip .container,.site-header .container,.site-hero,.quick-row,#track-section,.site-main-grid,.category-strip,.process,.portal-action-split,.portal-trust-app-grid,#reservation-section,#full-prices-section,#faq-section,#contacts-section,.site-footer > .container) {
  width: var(--site-shell);
  max-width: 1380px;
}

body.site-page .site-hero:not(.is-image-only) {
  min-height: 520px;
  margin: 20px auto 24px;
  border: 1px solid color-mix(in srgb, var(--pink) 15%, var(--line));
  border-radius: 30px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, var(--pink)), var(--surface-soft));
  box-shadow: 0 1px 2px rgba(20, 28, 48, .04);
}

body.site-page .portal-banner-slide.is-code-hero {
  background-image:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--pink) 15%, transparent), transparent 36%),
    linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface-soft) 86%, var(--pink)));
}

body.site-page .portal-banner-slide.is-code-hero > .container {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  gap: 44px;
  align-items: center;
  padding: 42px 54px;
}

body.site-page .portal-banner-slide.is-code-hero .hero-content {
  width: auto;
  max-width: 650px;
  padding: 0;
}

body.site-page .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--pink) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--pink) 7%, var(--surface));
  color: var(--pink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.site-page .hero-kicker svg {
  width: 17px;
  height: 17px;
}

body.site-page .portal-banner-slide.is-code-hero h1 {
  max-width: 12ch;
  font-size: clamp(46px, 4.6vw, 72px);
  letter-spacing: -.045em;
  text-transform: none;
}

body.site-page .hero-product-visual {
  position: relative;
  min-width: 0;
  margin: 0;
}

body.site-page .hero-product-visual > img {
  display: block;
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  border: 1px solid color-mix(in srgb, var(--pink) 12%, var(--line));
  border-radius: 24px;
  background: var(--surface-soft);
}

body.site-page .hero-product-visual figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.site-page .hero-product-visual figcaption span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--pink) 18%, var(--line));
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
  font-size: 11px;
  font-weight: 750;
  backdrop-filter: none;
}

body.site-page .hero-product-visual figcaption b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 19px;
}

@media (max-width: 980px) {
  body.site-page { --site-shell: min(100% - 24px, 760px); }
  body.site-page .portal-banner-slide.is-code-hero > .container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px;
  }
  body.site-page .site-hero:not(.is-image-only) { min-height: 760px; }
  body.site-page .portal-banner-slide.is-code-hero h1 { max-width: 15ch; }
  body.site-page .hero-product-visual > img { max-height: 300px; }
}

@media (max-width: 560px) {
  body.site-page { --site-shell: calc(100% - 16px); }
  body.site-page .site-hero:not(.is-image-only) { min-height: 690px; border-radius: 20px; }
  body.site-page .portal-banner-slide.is-code-hero > .container { padding: 26px 20px; }
  body.site-page .portal-banner-slide.is-code-hero h1 { font-size: clamp(38px, 12vw, 54px); }
  body.site-page .hero-content p { font-size: 16px; }
  body.site-page .hero-product-visual figcaption { position: static; grid-template-columns: 1fr; margin-top: 10px; }
  body.site-page .hero-product-visual figcaption span { display: grid; grid-template-columns: 42px 1fr; align-items: center; }
  body.site-page .hero-product-visual figcaption b { margin: 0; }
}

/* R314: the location stays useful even when a third-party map tile is blocked. */
body.site-page #contacts-section .portal-map-panel .portal-map-embed {
  position: relative;
  isolation: isolate;
  min-height: 360px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg) 76%, var(--surface));
}

body.site-page #contacts-section .portal-map-panel .portal-map-embed > iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: color-mix(in srgb, var(--bg) 76%, var(--surface));
}

body.site-page #contacts-section .portal-map-marker-card {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  width: min(360px, calc(100% - 32px));
  min-height: 68px;
  gap: 2px 10px;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--pink) 28%, var(--line));
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(20, 24, 40, .08);
  backdrop-filter: none;
}

body.site-page #contacts-section .portal-map-marker-card > span {
  grid-row: 1 / span 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

body.site-page #contacts-section .portal-map-marker-card :where(b,small) {
  min-width: 0;
  overflow-wrap: break-word;
}

body.site-page #contacts-section .portal-map-marker-card small {
  color: var(--muted);
}

/* R314: client case rows keep readable columns instead of wrapping words letter by letter. */
body.portal-page #portal-profile-dashboard .recent-card {
  container-type: inline-size;
}

@media (max-width: 520px) {
  body.site-page #contacts-section .portal-map-panel .portal-map-embed { min-height: 300px; }
  body.site-page #contacts-section .portal-map-marker-card { left: 10px; bottom: 10px; width: calc(100% - 20px); }
}

body.portal-page.portal-profile-authenticated > .cookie-banner {
  left: 50%;
  right: auto;
  width: min(980px, calc(100vw - 32px));
  transform: translateX(-50%);
  border-radius: 16px;
}

body.portal-page.portal-profile-authenticated > .cookie-banner .cookie-banner__body p {
  max-width: 68ch;
}

@media (max-width: 760px) {
  body.portal-page.portal-profile-authenticated > .cookie-banner {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    width: auto;
    transform: none;
  }
}

body.portal-page .portal-native-progress,
body.portal-page .profile-case-native-progress,
body.portal-page .portal-progress-meter {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
}

body.portal-page :where(.portal-native-progress,.profile-case-native-progress,.portal-progress-meter)::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
body.portal-page :where(.portal-native-progress,.profile-case-native-progress,.portal-progress-meter)::-webkit-progress-value { background: var(--pink); border-radius: 999px; }
body.portal-page :where(.portal-native-progress,.profile-case-native-progress,.portal-progress-meter)::-moz-progress-bar { background: var(--pink); border-radius: 999px; }

body.portal-page .portal-case-progress-line > .portal-progress-case {
  height: 100%;
  border-radius: inherit;
}

body.portal-page .portal-profile-contract-failure {
  width: min(920px, calc(100% - 32px));
  margin: 24px auto 40px;
  padding: 20px;
  border: 2px solid var(--danger, #d92f55);
  border-radius: 16px;
  background: #fff4f7;
  color: #6f1024;
  box-shadow: 0 14px 40px rgba(80, 8, 30, .14);
}

body.portal-page .portal-profile-contract-failure strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

body.portal-page .portal-profile-contract-failure p {
  margin: 0 0 14px;
  line-height: 1.55;
}

/* R300: one portal owner for the profile shell across every breakpoint. */
body.portal-page #portal-profile-dashboard.portal-shell:not([hidden]) {
  display: grid;
  width: min(1580px, calc(100% - 48px));
  min-height: 0;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  margin: 24px auto 56px;
  align-items: start;
}

@media (max-width: 1180px) {
  body.portal-page #portal-profile-dashboard.portal-shell:not([hidden]) {
    width: calc(100% - 28px);
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  body.portal-page #portal-profile-dashboard.portal-shell:not([hidden]) {
    width: min(100% - 16px, 900px);
    max-width: 900px;
    min-width: 0;
    display: block;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 6px auto calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  body.portal-page #portal-profile-dashboard.portal-shell:not([hidden]) {
    width: calc(100% - 8px);
    margin-top: 4px;
  }
}

/* R302: one proportional owner for profile content, overview statistics and profile-card typography. */
body.portal-page #portal-profile-dashboard .portal-content {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  margin: 0;
  padding: 24px 28px 32px;
  background: var(--surface);
}

body.portal-page #portal-profile-dashboard .portal-content-main,
body.portal-page #portal-profile-dashboard .portal-dashboard-aside {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 16px;
  margin: 0;
}

body.portal-page #portal-profile-dashboard .portal-content-main {
  container-name: portal-main;
  container-type: inline-size;
}

body.portal-page #portal-profile-dashboard .stat-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
  margin: 0;
}

body.portal-page #portal-profile-dashboard .stat-card {
  display: grid;
  min-width: 0;
  min-height: 142px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 16px;
  border-color: color-mix(in srgb, var(--line) 88%, var(--pink));
  border-radius: 14px;
  background: var(--surface);
}

body.portal-page #portal-profile-dashboard .stat-card > .icon-bubble {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  margin: 0;
}

body.portal-page #portal-profile-dashboard .stat-card > span:not(.icon-bubble) {
  grid-column: 2 / -1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

body.portal-page #portal-profile-dashboard .stat-card > b {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

/* R343: the profile main column can be narrow while the viewport is still
   desktop-wide. Container queries keep its cards and case rows contained. */
@container portal-main (max-width: 700px) {
  body.portal-page #portal-profile-dashboard .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.portal-page #portal-profile-dashboard #portal-profile-case-preview .profile-case-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.portal-page #portal-profile-dashboard .portal-content-main .portal-case-mini-row {
    grid-template-columns: 42px minmax(0, 1fr) minmax(88px, auto);
    grid-template-areas:
      "thumb main status"
      "thumb main code"
      ". money detail"
      ". . chat";
  }
}

@container portal-main (max-width: 430px) {
  body.portal-page #portal-profile-dashboard .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.portal-page #portal-profile-dashboard .portal-content-main .portal-case-mini-row {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      ". status"
      ". code"
      ". money"
      ". detail"
      ". chat";
  }
}

body.portal-page #portal-profile-dashboard .stat-card > a {
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

body.portal-page:not([data-portal-panel="overview"]) #portal-profile-dashboard .portal-content {
  grid-template-columns: minmax(0, 1fr);
}

body.portal-page:not([data-portal-panel="overview"]) #portal-profile-dashboard .portal-dashboard-aside {
  display: none;
}

@media (max-width: 1180px) {
  body.portal-page #portal-profile-dashboard .portal-content {
    grid-template-columns: minmax(0, 1fr);
  }

  body.portal-page #portal-profile-dashboard .portal-dashboard-aside {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  body.portal-page #portal-profile-dashboard .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  body.portal-page #portal-profile-dashboard .portal-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  body.portal-page #portal-profile-dashboard .portal-content-main,
  body.portal-page #portal-profile-dashboard .portal-dashboard-aside {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

}

@media (max-width: 520px) {
  body.portal-page #portal-profile-dashboard .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* R303: one portal owner for the client document list and preview workspace. */
body.portal-page #portal-profile-dashboard .portal-documents-split,
body.portal-page #portal-profile-dashboard .portal-documents-split.is-active {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: 14px;
  align-items: start;
}

body.portal-page #portal-profile-dashboard .portal-doc-row {
  display: grid;
  min-width: 0;
  max-width: 100%;
  min-height: 72px;
  grid-template-columns: 48px minmax(0, 1fr) minmax(104px, auto) 38px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}

body.portal-page #portal-profile-dashboard .portal-doc-row.is-active {
  border-color: color-mix(in srgb, var(--pink) 48%, var(--line));
  outline: 2px solid color-mix(in srgb, var(--pink) 24%, transparent);
  outline-offset: 1px;
  box-shadow: none;
}

body.portal-page #portal-profile-dashboard .portal-doc-row > span {
  display: inline-grid;
  width: 46px;
  height: 38px;
  place-items: center;
  padding: 0 6px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--pink);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-page #portal-profile-dashboard .portal-doc-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  overflow: visible;
}

body.portal-page #portal-profile-dashboard .portal-doc-row > div :where(b,small) {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

/* R311: technical evidence belongs to every locked document surface. */
body.portal-page .profile-preview-doc > a {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body.portal-page #portal-profile-dashboard :where(.portal-doc-row,.portal-protocol-row,.portal-document-preview) .portal-hash-evidence,
body:is(.site-page,.portal-page) .portal-case-doc-row .portal-hash-evidence,
body.portal-page .profile-preview-doc .portal-hash-evidence {
  justify-self: start;
  margin-left: 0;
}

body.portal-page #portal-profile-dashboard .portal-doc-row .portal-hash-evidence-pop,
body.portal-page #portal-profile-dashboard .portal-protocol-row .portal-hash-evidence-pop {
  z-index: 80;
}

body.portal-page #portal-profile-dashboard .portal-doc-row > div small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

body.portal-page #portal-profile-dashboard .portal-doc-row > .portal-doc-status {
  max-width: 128px;
  justify-self: start;
  overflow-wrap: anywhere;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

body.portal-page #portal-profile-dashboard .portal-doc-row > .portal-doc-download {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
}

@media (max-width: 980px) {
  body.portal-page #portal-profile-dashboard .portal-documents-split,
  body.portal-page #portal-profile-dashboard .portal-documents-split.is-active {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body.portal-page #portal-profile-dashboard .portal-doc-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
    padding: 10px;
  }

  body.portal-page #portal-profile-dashboard .portal-doc-row > span {
    width: 38px;
    height: 38px;
    padding: 0 4px;
    font-size: 10px;
  }

  body.portal-page #portal-profile-dashboard .portal-doc-row > div,
  body.portal-page #portal-profile-dashboard .portal-doc-row > :where(em,a) {
    grid-column: 2;
    min-width: 0;
    justify-self: start;
  }

  body.portal-page #portal-profile-dashboard .portal-doc-row > .portal-doc-download {
    width: 34px;
    min-width: 34px;
    height: 34px;
    justify-self: end;
  }
}

/* R304: one portal owner for recent notifications and the notification journal. */
body.portal-page #portal-profile-dashboard .portal-notification-list,
body.portal-page #portal-profile-dashboard .portal-notification-workspace.is-active {
  display: grid;
  min-width: 0;
  gap: 12px;
}

body.portal-page #portal-profile-dashboard .portal-notification-workspace.is-active {
  margin-top: 0;
}

body.portal-page #portal-profile-dashboard .portal-notification-item {
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: 44px minmax(0, 1fr) minmax(82px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

body.portal-page #portal-profile-dashboard .portal-notification-item > i {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portal-page #portal-profile-dashboard .portal-notification-item > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.portal-page #portal-profile-dashboard .portal-notification-item :where(b, span) {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
  word-break: normal;
}

body.portal-page #portal-profile-dashboard .portal-notification-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

body.portal-page #portal-profile-dashboard .portal-notification-open,
body.portal-page #portal-profile-dashboard .portal-case-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

body.portal-page #portal-profile-dashboard .portal-notification-open:hover,
body.portal-page #portal-profile-dashboard .portal-case-link:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  color: var(--primary);
}

body.portal-page #portal-profile-dashboard .portal-notification-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

body.portal-page #portal-profile-dashboard .portal-notification-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

body.portal-page #portal-profile-dashboard .portal-notification-table th {
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
}

body.portal-page #portal-profile-dashboard .portal-notification-table td {
  min-width: 0;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.portal-page #portal-profile-dashboard .portal-notification-table tr:last-child td {
  border-bottom: 0;
}

body.portal-page #portal-profile-dashboard .portal-notification-table :is(th, td):nth-child(1) {
  width: 104px;
}

body.portal-page #portal-profile-dashboard .portal-notification-table :is(th, td):nth-child(3) {
  width: 138px;
}

body.portal-page #portal-profile-dashboard .portal-notification-table :is(th, td):nth-child(4) {
  width: 154px;
}

body.portal-page #portal-profile-dashboard .portal-notification-table :is(th, td):nth-child(5) {
  width: 132px;
}

body.portal-page #portal-profile-dashboard .portal-service-event-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 980px) {
  body.portal-page #portal-profile-dashboard .portal-notification-table {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table :is(table, tbody, tr, td) {
    display: block;
    width: 100%;
    min-width: 0;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table thead {
    display: none;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table tr {
    margin: 0 0 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table tr:last-child {
    margin-bottom: 0;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table td {
    display: grid;
    width: 100%;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table td[colspan] {
    display: block;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table td[colspan]::before {
    display: none;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table .portal-status-pill {
    max-width: 100%;
    min-width: 0;
    justify-self: start;
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  body.portal-page #portal-profile-dashboard .portal-notification-item {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
    padding: 11px;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-item > i {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-item > :where(.portal-status-pill, .portal-notification-open) {
    grid-column: 2;
    justify-self: start;
  }

  body.portal-page #portal-profile-dashboard .portal-notification-table td {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

body.portal-page .portal-privacy-workspace .section-head {
  align-items: flex-start;
  gap: 12px;
}

body.portal-page .portal-privacy-workspace .section-head p,
body.portal-page .portal-privacy-workspace .form-note,
body.portal-page .portal-privacy-request-meta,
body.portal-page .portal-privacy-request-row small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

body.portal-page .portal-privacy-workspace .section-head p,
body.portal-page .portal-privacy-workspace .form-note {
  margin: 4px 0 0;
}

body.portal-page .portal-privacy-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

body.portal-page .portal-privacy-request-form {
  display: grid;
  gap: 12px;
}

body.portal-page .portal-privacy-request-form .form-group {
  display: grid;
  gap: 6px;
  margin: 0;
}

body.portal-page .portal-privacy-request-form label,
body.portal-page .portal-privacy-history h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

body.portal-page .portal-privacy-request-form .form-optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

body.portal-page .portal-privacy-request-form .field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

body.portal-page .portal-privacy-history {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 100%;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

body.portal-page .portal-privacy-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.portal-page .portal-privacy-request-row {
  display: grid;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

body.portal-page .portal-privacy-request-row:first-child {
  padding-top: 0;
}

body.portal-page .portal-privacy-request-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

body.portal-page .portal-privacy-request-head,
body.portal-page .portal-privacy-request-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body.portal-page .portal-privacy-request-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.portal-page .portal-privacy-request-row p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.portal-page .portal-privacy-request-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px 14px;
}

body.portal-page .portal-privacy-request-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.portal-page :where(.portal-privacy-context-link, .portal-privacy-context-document) {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

body.portal-page .portal-privacy-context-link {
  cursor: pointer;
}

body.portal-page .portal-privacy-context-link:hover {
  border-color: var(--pink);
  color: var(--pink);
}

body.portal-page .portal-privacy-response {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  body.portal-page .portal-privacy-grid {
    grid-template-columns: 1fr;
  }

  body.portal-page .portal-privacy-history {
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

/* Portal-owned components. Keep public/profile additions out of styles.css. */
.portal-page :where(.btn, .submit-btn, .search-btn) {
  min-height: var(--control-height-touch);
}

.portal-page :where(.request-form, .portal-profile-edit-form, .portal-privacy-request-form) :where(input, select, textarea) {
  min-height: var(--control-height-default);
}

.portal-page .portal-privacy-request-form :where(textarea) {
  min-height: 150px;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.portal-page .portal-privacy-request-form :where(select) {
  font-size: 15px;
}

.portal-page .portal-privacy-request-form > .btn {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.portal-page .portal-case-chat-compose :where(textarea) {
  resize: vertical;
}

.portal-page .portal-document-preview,
.portal-page .portal-privacy-workspace,
.portal-page .portal-case-chat-dialog {
  border-radius: var(--radius-card);
}

.portal-page .portal-document-preview {
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
}

.portal-page .portal-privacy-request-form :where(button[type="submit"])[aria-busy="true"]::after {
  content: ' Записва се…';
}

/* R315 mobile code-hero recovery: keep the absolute slide inside its owner. */
@media (max-width: 560px) {
  body.site-page .site-hero:not(.is-image-only) {
    min-height: 610px;
  }

  body.site-page .portal-banner-slide.is-code-hero {
    align-items: flex-start;
    overflow: hidden;
  }

  body.site-page .portal-banner-slide.is-code-hero > .container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-content: start;
    padding: 18px 16px 20px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-kicker {
    margin-bottom: 10px;
    padding: 6px 9px;
    font-size: 10px;
  }

  body.site-page .portal-banner-slide.is-code-hero h1 {
    max-width: none;
    color: var(--ink);
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.02;
    letter-spacing: -.025em;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-content p {
    margin: 12px 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-bullets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 10px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-bullets li {
    min-width: 0;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-bullets svg {
    width: 15px;
    height: 15px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-buttons {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-buttons .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-product-visual {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-product-visual > img {
    width: 100%;
    max-height: 155px;
    border-radius: 14px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-product-visual figcaption {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-product-visual figcaption span {
    display: block;
    min-width: 0;
    padding: 7px 5px;
    font-size: 9px;
    line-height: 1.2;
    text-align: center;
  }

  body.site-page .portal-banner-slide.is-code-hero .hero-product-visual figcaption b {
    margin: 0 0 2px;
    font-size: 16px;
  }
}
