@font-face {
  font-family: "Sanomat Web";
  src: url("/assets/Sanomat-LightItalic-Web-d26057c7.woff2") format("woff2");
  font-style: italic;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Gotham";
  src: url("/assets/Gotham-Medium-eb7ad548.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --brand-primary: #0971b7;
  --brand-hover: #25669e;
  --brand-heading-font: Helvetica, Arial, sans-serif;
  --brand-heading-style: normal;
  --brand-heading-weight: 600;
  --brand-navigation-font: "Gotham", Helvetica, Arial, sans-serif;
  --canvas: #ffffff;
  --surface: #f7f9fb;
  --text: #222222;
  --text-muted: #586475;
  --border: #d7dce3;
  --focus: #c69c6c;
  --link: #24659a;
  --success-surface: #f0f8f3;
  --success-border: #c0dccb;
  --error: #a52c2c;
  --error-surface: #fff4f3;
  --error-border: #edc5c0;
  --radius: 0.5rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --content-width: 68rem;
}

[data-brand="derose"] {
  --brand-primary: #040e85;
  --brand-hover: #030a62;
  --brand-heading-font: "Sanomat Web", Georgia, serif;
  --brand-heading-style: italic;
  --brand-heading-weight: 300;
  --brand-navigation-font: Helvetica, Arial, sans-serif;
  --link: #040e85;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 20rem;
  color: var(--text);
  background: var(--canvas);
  font: 1rem/1.6 Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: var(--brand-heading-font);
  font-style: var(--brand-heading-style);
  font-weight: var(--brand-heading-weight);
  color: var(--brand-primary);
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: var(--space-4); }
h2 { font-size: 1.5rem; margin-bottom: var(--space-4); }
h3 { font-size: 1rem; line-height: 1.4; }
p:last-child { margin-bottom: 0; }
a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.container { width: min(var(--content-width), 100% - var(--space-8)); margin-inline: auto; }
.site-header { background: var(--brand-primary); color: white; }
.header-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  padding-block: var(--space-4);
}
.brand-link { display: inline-flex; align-items: center; gap: var(--space-6); color: white; text-decoration: none; }
.brand-logo { display: block; width: auto; max-width: 7.75rem; height: 2.75rem; object-fit: contain; object-position: left center; }
.brand-label {
  padding-left: var(--space-6);
  border-left: 1px solid rgb(255 255 255 / 35%);
  font: 500 0.75rem/1.4 var(--brand-navigation-font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.header-actions a { color: white; }
.header-actions form { margin: 0; }
.locale-list { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.locale-list a { display: flex; align-items: center; min-height: 2.75rem; padding: var(--space-2); font-size: 0.875rem; }
.locale-list [aria-current="page"] { font-weight: 700; text-decoration-thickness: 2px; }
.user-name { max-width: 16rem; overflow-wrap: anywhere; font-size: 0.875rem; }

.skip-link { position: absolute; z-index: 2; left: var(--space-4); top: -5rem; padding: var(--space-3) var(--space-4); background: white; }
.skip-link:focus { top: var(--space-3); }
.page-content { padding-block: var(--space-12); min-height: calc(100vh - 11rem); }
.page-header { max-width: 46rem; margin-bottom: var(--space-8); }
.page-header p { color: var(--text-muted); font-size: 1.125rem; }
.section-header { margin-bottom: var(--space-6); }
.section-header p { color: var(--text-muted); }
.products { margin: 0 0 var(--space-8); padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.product { padding: var(--space-6); border-right: 1px solid var(--border); }
.product:first-child { padding-left: 0; }
.product:last-child { border-right: 0; }
.product h3 { color: var(--brand-primary); margin-bottom: var(--space-2); letter-spacing: 0.04em; }
.product p { color: var(--text-muted); font-size: 0.9375rem; }
.panel { padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas); }
.empty-state { padding: var(--space-8); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.empty-state h2 { margin-bottom: var(--space-3); }
.empty-state p { color: var(--text-muted); max-width: 46rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 0.125rem);
  background: var(--brand-primary);
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--brand-hover); text-decoration: none; }
.button-secondary { border-color: var(--border); background: white; color: var(--text); }
.button-secondary:hover { background: var(--surface); }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button.header-button { border-color: rgb(255 255 255 / 70%); background: transparent; }
.button.header-button:hover { background: var(--brand-hover); }
.with-support-widget { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
.support-widget {
  position: fixed;
  z-index: 1;
  right: max(var(--space-4), env(safe-area-inset-right, 0px));
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  min-height: 3rem;
  max-width: calc(100% - var(--space-8));
  border-radius: var(--space-8);
  box-shadow: 0 0.25rem 1rem rgb(0 0 0 / 18%);
}
.support-widget svg { flex-shrink: 0; }
.notice { margin-bottom: var(--space-6); padding: var(--space-4); border: 1px solid var(--success-border); border-radius: var(--radius); background: var(--success-surface); }
.notice-alert { color: var(--error); border-color: var(--error-border); background: var(--error-surface); }
.muted { color: var(--text-muted); }
.site-footer { border-top: 1px solid var(--border); padding-block: var(--space-6); color: var(--text-muted); font-size: 0.875rem; }
.site-footer p { margin: 0; }

.ui-gallery { display: grid; gap: var(--space-8); }
.ui-gallery .examples { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.field-error { margin-block: var(--space-2) 0; color: var(--error); font-size: 0.875rem; }

@media (max-width: 48rem) {
  .header-inner { align-items: flex-start; }
  .header-actions { width: 100%; justify-content: space-between; gap: var(--space-3); }
  .brand-label { padding-left: var(--space-4); }
  .brand-link { gap: var(--space-4); }
  .page-content { padding-block: var(--space-8); }
  .products { grid-template-columns: 1fr; }
  .product { padding: var(--space-4) 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .product:last-child { border-bottom: 0; }
  .empty-state { padding: var(--space-6); }
  .user-name { max-width: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* Help modules and source articles share the portal's brand tokens. */
.module-count { margin-top: var(--space-3); font-size: 0.875rem !important; }
.product h3 a { display: inline-block; padding-block: var(--space-2); }
.service-modules { margin-bottom: var(--space-8); }
.breadcrumbs { margin-bottom: var(--space-6); font-size: 0.875rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { overflow-wrap: anywhere; }
.breadcrumbs li + li::before { content: "/"; color: var(--text-muted); margin-right: var(--space-2); }
.help-main { min-width: 0; }
.help-main .page-header { margin-bottom: var(--space-6); }
.help-article-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.help-article-list li { border-bottom: 1px solid var(--border); }
.help-article-list a { display: block; padding: var(--space-4) 0; overflow-wrap: anywhere; }
.help-search-form { display: flex; align-items: end; flex-wrap: wrap; gap: var(--space-3); margin-block: 0 var(--space-6); }
.help-search-form .field { flex: 1 1 16rem; min-width: 0; margin: 0; }
.help-search-results small { display: block; margin-top: var(--space-2); }
.article-header { margin-bottom: var(--space-8); }
.article-header h1 { overflow-wrap: anywhere; }
.source-language-note { color: var(--text-muted); font-size: 0.875rem; }
.article-back { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border); }
.help-content, .article-preview { overflow-wrap: anywhere; }
.section-introduction { margin-bottom: var(--space-8); }
.help-content h1, .help-content h2, .help-content h3,
.article-preview h1, .article-preview h2, .article-preview h3 { margin-top: var(--space-8); scroll-margin-top: var(--space-6); }
.help-content > :first-child, .article-preview > :first-child { margin-top: 0; }
.help-content p, .help-content ul, .help-content ol,
.article-preview p, .article-preview ul, .article-preview ol { margin-bottom: var(--space-4); }
.help-content li + li, .article-preview li + li { margin-top: var(--space-2); }
.help-content img, .article-preview img { display: block; max-width: 100%; height: auto; margin-block: var(--space-6); }
.help-content pre, .article-preview pre { max-width: 100%; overflow-x: auto; padding: var(--space-4); background: var(--surface); border-radius: var(--radius); }
.help-content code, .article-preview code { font-size: 0.875em; }
.help-content blockquote, .article-preview blockquote { margin-inline: 0; padding-left: var(--space-4); border-left: 3px solid var(--focus); color: var(--text-muted); }
.help-content table, .article-preview table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: var(--space-6); }
.help-content th, .help-content td, .article-preview th, .article-preview td { min-width: 8rem; padding: var(--space-3); border: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: normal; }
.help-content th, .article-preview th { background: var(--surface); }
.help-content details, .article-preview details { margin-block: var(--space-4); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); }
.help-content summary, .article-preview summary { min-height: 2.75rem; color: var(--brand-primary); font-weight: 600; cursor: pointer; }
.help-content hr, .article-preview hr { margin-block: var(--space-8); border: 0; border-top: 1px solid var(--border); }

/* Native article editor controls; no additional component framework. */
.field { margin-bottom: var(--space-6); }
.field > label, .field > legend { display: block; margin-bottom: var(--space-2); font-weight: 600; }
.field input:not([type="checkbox"]), .field select, .field textarea { display: block; width: 100%; min-height: 2.75rem; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas); color: var(--text); }
/* Keep the caret inside the border and reserve space for long option labels. */
.field select:not([multiple]):is(:not([size]), [size="1"]) {
  appearance: none;
  padding-inline-end: var(--space-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23222222' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 0.75rem 0.5rem;
}
@media (forced-colors: active) {
  .field select:not([multiple]):is(:not([size]), [size="1"]) { appearance: auto; background-image: none; }
}
.field textarea { min-height: 22rem; resize: vertical; font-family: ui-monospace, monospace; font-size: 0.9375rem; line-height: 1.6; }
.field input[type="checkbox"] { width: 1.125rem; height: 1.125rem; margin-right: var(--space-2); accent-color: var(--brand-primary); vertical-align: middle; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .field-error { margin-top: var(--space-2); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block: var(--space-6); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); }
.editor-layout > * { min-width: 0; }
.article-preview { padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius); }

@media (max-width: 48rem) {
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .article-header { margin-bottom: var(--space-6); }
  .field textarea { min-height: 18rem; }
}

/* Support conversations share the portal's controls, tokens and brand identity. */
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--space-8); align-items: start; }
.support-main, .support-sidebar { min-width: 0; }
.support-main > * + *, .support-sidebar > * + * { margin-top: var(--space-8); }
.support-filter-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: end; margin-bottom: var(--space-6); }
.support-filter-form .field, .support-filter-form .form-actions { margin: 0; }
.support-list, .support-conversation-list, .support-thread, .support-delivery-list, .support-event-list { list-style: none; padding: 0; margin: 0; }
.support-list-item { padding-block: var(--space-6); border-block-start: 1px solid var(--border); }
.support-list-item:last-child { border-block-end: 1px solid var(--border); }
.support-list-heading { display: flex; justify-content: space-between; align-items: start; gap: var(--space-4); }
.support-list-heading h2 { min-width: 0; font-family: inherit; font-style: normal; font-size: 1.125rem; font-weight: 600; line-height: 1.4; margin-bottom: var(--space-2); overflow-wrap: anywhere; }
.support-heading { overflow-wrap: anywhere; }
.support-list-preview { overflow-wrap: anywhere; }
.support-message-meta { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: var(--space-2); overflow-wrap: anywhere; }
.support-message-meta > * + * { margin-inline-start: var(--space-2); }
.support-message { padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--space-4); background: var(--canvas); }
.support-message-note, .support-note-form { background: var(--surface); border-inline-start: 3px solid var(--focus); }
.support-message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message-body:empty { display: none; }
.support-state, .support-badge { display: inline-block; flex-shrink: 0; padding: var(--space-1) var(--space-3); font-size: 0.8125rem; line-height: 1.5; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface); }
.support-state-open { color: var(--brand-primary); border-color: var(--brand-primary); background: var(--canvas); }
.support-state-resolved { background: var(--success-surface); border-color: var(--success-border); }
.support-metadata { margin: 0 0 var(--space-6); overflow-wrap: anywhere; }
.support-metadata dt { color: var(--text-muted); font-size: 0.875rem; }
.support-metadata dd { margin: 0 0 var(--space-4); }
.support-form textarea { min-height: 10rem; font-family: inherit; }
.support-form .field:last-child { margin-bottom: 0; }
.support-whatsapp { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border); }
.support-whatsapp > div { flex: 1 1 14rem; }
.support-whatsapp p { margin: 0; }

.support-summary { overflow-wrap: anywhere; }
.support-delivery-list li + li, .support-event-list li + li { border-top: 1px solid var(--border); margin-top: var(--space-4); padding-top: var(--space-4); }
.support-delivery-list .button { margin-top: var(--space-2); }
.support-pagination { margin-top: var(--space-8); }
@media (max-width: 56rem) {
  .support-layout { grid-template-columns: minmax(0, 1fr); }
  .support-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36rem) {
  .support-filter-form { grid-template-columns: minmax(0, 1fr); }
  .support-list-heading { flex-direction: column; gap: var(--space-2); }
  .support-message { padding: var(--space-4); }
}

/* Optional email corrections share each portal brand's existing link color. */
.email-typo-hint:not([hidden]) { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.email-typo-hint button { min-height: 2.75rem; padding: var(--space-2); border: 0; background: transparent; color: var(--brand-primary); font: inherit; text-align: start; text-decoration: underline; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.email-typo-hint .email-typo-hint__dismiss { color: var(--text-muted); }

.support-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}
.support-attachments li {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.support-attachment-preview {
  display: block;
  width: 10rem;
  max-width: 100%;
  height: 8rem;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.support-lightbox {
  max-width: calc(100vw - var(--space-8));
  max-height: calc(100dvh - var(--space-8));
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}
.support-lightbox[open] { display: flex; flex-direction: column; gap: var(--space-3); }
.support-lightbox::backdrop { background: rgb(0 0 0 / 75%); }
.support-lightbox .button { align-self: flex-end; flex-shrink: 0; }
.support-lightbox img { display: block; min-height: 0; max-width: 100%; max-height: 75dvh; object-fit: contain; }
.support-lightbox p { margin: 0; overflow-wrap: anywhere; }
