/* Presentation-only finish: warm paper, forest green and a static grain tile.
   Kept separate from the operational styles and the ZenitCMS backoffice. */
.portal-page,
.login-page,
.public-page {
  --canvas: #f4f2ec;
  --surface: #fffefa;
  --surface-muted: #f7f6f1;
  --line: #e1e3d9;
  --line-strong: #cad3c7;
  --ink-950: #173c34;
  --ink-800: #2d4941;
  --ink-600: #5d7068;
  --ink-500: #6c7e76;
  --brand-teal: #185547;
  --brand-teal-deep: #103d33;
  --brand-mint: #dceade;
  --shadow-sm: 0 2px 5px rgb(37 58 44 / 3%), 0 9px 25px rgb(37 58 44 / 4%);
  --shadow-md: 0 12px 28px rgb(37 58 44 / 9%);
  --header-height: 66px;
  --sidebar-width: 244px;
  color: var(--ink-800);
}

.portal-page .portal-content {
  background-color: var(--canvas);
  background-image: linear-gradient(rgb(244 242 236 / 95%), rgb(244 242 236 / 95%)), url('../images/textures/grain.svg');
}
.portal-page .content-body { width: min(100%, 1380px); padding: 0 34px 48px; }
.portal-header { background: rgb(255 254 250 / 96%); box-shadow: none; border-bottom-color: var(--line); }
.portal-header__context-kicker { font-size: .59rem; letter-spacing: .12em; }
.portal-header__context strong { font-size: .79rem; }
.portal-user__copy strong { font-size: .72rem; }
.portal-user__copy small { font-size: .56rem; }
.portal-user__avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: .72rem; }
.topbar-action { min-height: 38px; border-radius: 8px; font-size: .71rem; }
.topbar-action--supplier { text-transform: none; letter-spacing: 0; }
.logout-link { min-height: 38px; font-size: .71rem; }
.portal-user { max-width: 240px; }
.breadcrumb-bar { min-height: 54px; margin-bottom: 26px; font-size: .72rem; background: transparent; border-bottom-color: var(--line); }
.portal-page--internal .breadcrumb-bar::after { background-image: url('../images/generated/italy-landmarks.webp'); opacity: .2; }

.portal-sidebar {
  background: linear-gradient(165deg, #1e493d, #103d33 60%, #10352f);
  box-shadow: 3px 0 20px rgb(20 49 38 / 4%);
}
.portal-sidebar::before {
  background: url('../images/textures/grain.svg') repeat;
  opacity: .13;
}
.portal-sidebar::after { opacity: .28; }
.sidebar-brand { min-height: 118px; flex-direction: column; justify-content: center; gap: 8px; padding: 19px 22px; }
.sidebar-brand__mark { width: 164px; height: 62px; flex: 0 0 62px; padding: 4px 13px; border-radius: 10px; background: #fffdf5; box-shadow: 0 2px 12px rgb(6 28 20 / 8%); }
.sidebar-brand__mark img { width: 138px; height: 54px; object-fit: contain; filter: none; }
.sidebar-brand__caption { color: #bbd2c4; font-size: .61rem; font-weight: 550; letter-spacing: .15em; text-transform: uppercase; }
.sidebar-intro { padding: 21px 21px 12px; }
.sidebar-intro__eyebrow { color: #a0bdad; font-size: .58rem; }
.sidebar-intro strong { font-size: .87rem; }
.portal-sidebar nav { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding-inline: 12px; scrollbar-width: thin; scrollbar-color: #638575 transparent; }
.sidebar-brand, .sidebar-intro, .sidebar-meta { flex-shrink: 0; }
.portal-sidebar summary { min-height: 40px; color: #bad0c3; font-size: .65rem; letter-spacing: .07em; }
.portal-sidebar li a, .sidebar-logout { min-height: 38px; padding-block: 9px; color: #b5cdbf; font-size: .76rem; }
.portal-sidebar li a .ui-icon { color: #a3beae; font-size: .82rem; }
.portal-sidebar li a.is-active { background: rgb(208 230 199 / 12%); box-shadow: inset 3px 0 #d4ba88; }
.portal-sidebar li a:hover { background: rgb(208 230 199 / 9%); }
.sidebar-meta { border-color: rgb(228 238 216 / 13%); background: rgb(228 238 216 / 5%); }
.sidebar-meta span { font-size: .68rem; }
.sidebar-meta small { color: #adc5b7; font-size: .61rem; }
.portal-footer { background: #efeee7; border-color: var(--line); box-shadow: none; font-size: .66rem; }
.portal-footer strong { font-size: .7rem; }

/* The grain sits above the photograph and below all hero copy/actions. */
.legacy-content--home { isolation: isolate; min-height: 410px; padding: 44px; border: 0; border-radius: 18px; box-shadow: 0 10px 26px rgb(27 61 46 / 10%); }
.legacy-content--home::before { content: ''; position: absolute; inset: 0; z-index: 1; background: url('../images/textures/grain.svg'); opacity: .1; pointer-events: none; }
.legacy-content--home::after { display: none; }
.legacy-content--home .home-hero__content { max-width: 62%; }
.legacy-content--home header h1, .legacy-content--home header .page-header { font-size: clamp(2.2rem, 3.6vw, 3.5rem); font-weight: 680; line-height: 1.07; letter-spacing: -.045em; text-wrap: balance; }
.legacy-content--home .hero-eyebrow { color: #d5e5c9; font-size: .67rem; letter-spacing: .14em; }
.legacy-content--home .hero-eyebrow i { background: #d4ba88; }
.legacy-content--home .legacy-content__body { max-width: 480px; color: #e1e8dd; font-size: .85rem; line-height: 1.7; }
.legacy-content--home .home-hero__visual picture { display: block; height: 100%; }
.legacy-content--home .home-hero__visual img { object-position: 60% center; }
.legacy-content--home .hero-visual__veil { background: linear-gradient(90deg, #113d32 0%, rgb(17 61 50 / 96%) 25%, rgb(17 61 50 / 62%) 53%, rgb(17 61 50 / 5%) 100%); }
.legacy-content--home .action-button--primary { background: #f5f3df; color: #1c4538; }
.legacy-content--home .action-button--secondary { background: rgb(255 254 245 / 5%); border-color: rgb(255 254 245 / 45%); }
.legacy-content--home .hero-actions { gap: 10px; }
.local-tools { margin-top: 30px; }
.local-tools__heading { margin-bottom: 19px; }
.local-tools__heading h2 { font-size: 1.4rem; font-weight: 650; }
.local-tools__heading p { margin-top: 6px; font-size: .81rem; }
.section-kicker { color: #5b7863; font-size: .64rem; }
.local-tools__links { gap: 16px; }
.local-tools__links a { min-height: 148px; grid-template-columns: 42px minmax(0, 1fr) 16px; padding: 21px; background: #fffefa; border-color: var(--line); border-radius: 13px; }
.local-tools__links .tool-icon { width: 42px; height: 42px; background: #e8efdf; color: #42603f; border-radius: 11px; }
.local-tools__links a:nth-child(2) .tool-icon { background: #f2e7d5; color: #85603e; }
.local-tools__links a:nth-child(3) .tool-icon { background: #efe1da; color: #95604f; }
.local-tools__links strong { font-size: .9rem; }
.local-tools__links small { font-size: .75rem; line-height: 1.55; }
.local-tools__links a:hover { border-color: #b6c7ad; box-shadow: var(--shadow-md); }
.environment-summary { background: transparent; border-color: var(--line); color: #5a6d61; }

/* More legible operational pages, keeping status colours and editor contrast. */
.page-heading { font-size: clamp(1.75rem, 2.6vw, 2.4rem); letter-spacing: -.035em; font-weight: 650; }
.page-heading small { font-size: .88rem; color: var(--ink-600); }
.workspace-panel, .supplier-card { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-panel__heading { padding: 20px 22px; border-color: var(--line); background: var(--surface); }
.workspace-panel__heading h2 { font-size: .97rem; }
.workspace-panel__heading p { font-size: .77rem; }
.panel-heading-icon { width: 30px; height: 30px; background: #e6eddf; color: #416744; }
.portal-form { padding: 22px; }
.form-field label { color: #425d50; font-size: .78rem; }
.form-field input, .form-field select { min-height: 45px; font-size: .85rem; background: #fafbf6; border-color: #d9e0d4; }
.form-field input::placeholder { color: #78887e; }
.form-field input:focus, .form-field select:focus { border-color: #6e9279; box-shadow: 0 0 0 3px rgb(73 116 81 / 12%); }
.action-button { min-height: 43px; font-size: .78rem; border-radius: 8px; }
.clear-filters, .text-action { font-size: .76rem; }
.empty-state { border-color: var(--line); background: var(--surface); }
.empty-state h2 { font-size: .96rem; }
.empty-state p { font-size: .8rem; }
.booking-result > summary { background: var(--surface); }
.booking-result strong { font-size: .8rem; }
.booking-result small { font-size: .62rem; }
.booking-result em { font-size: .67rem; }
.booking-result__body { background: var(--surface-muted); }
.booking-card__footer > strong { font-size: .9rem; }
.supplier-card { background: var(--surface); }
.supplier-card__identity h2 { font-size: 1rem; white-space: normal; line-height: 1.4; }
.supplier-card__identity p { font-size: .75rem; }
.supplier-card__details dt { font-size: .65rem; }
.supplier-card__details dd { font-size: .82rem; }
.supplier-card__details dd, .supplier-card__details dd code { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.supplier-card__link { font-size: .76rem; }
.legacy-content:not(.legacy-content--home) { background: var(--surface); border-color: var(--line); }

.login-page .page-shell { background: linear-gradient(120deg, #f4f2ec, #e7ede3, #f2e9dc); background-size: 220% 220%; }
.login-intro { background: linear-gradient(145deg, #214d3f, #123e33 65%, #42614a); background-size: 180% 180%; }
.login-intro::after { content: ''; position: absolute; inset: 0; z-index: -1; background: url('../images/textures/grain.svg'); opacity: .12; pointer-events: none; }
.login-brand { flex-direction: column; align-items: flex-start; gap: 8px; }
.login-brand__mark { width: 164px; height: 62px; padding: 4px 13px; background: #fffdf5; border-radius: 10px; }
.login-brand__mark img { width: 138px; height: 54px; object-fit: contain; filter: none; }
.login-brand__caption { color: #bbd2c4; font-size: .61rem; letter-spacing: .15em; text-transform: uppercase; }
.login-intro__copy { padding-block: 25px; }
.login-intro__copy p { color: #c6d7c8; font-size: .87rem; }
.login-card { background: var(--surface); }
.login-card__header { gap: 14px; }
.login-card__header small { font-size: .78rem; }
.login-card__icon { color: #46684d; background: #e8efdf; }
.login-form label { font-size: .8rem; }
.field-control input { min-height: 47px; font-size: .9rem; }
.login-note { font-size: .73rem; line-height: 1.6; }
.login-preview strong { font-size: .72rem; }
.login-preview span { font-size: .68rem; }
.login-preview__button { min-height: 40px; font-size: .7rem; }
.login-help { font-size: .78rem; }
.login-form { padding-bottom: 35px; }

@media (max-width: 1100px) {
  .portal-header__right { gap: 8px; }
  .portal-page .content-body { padding-inline: 24px; }
  .legacy-content--home { padding: 34px; }
  .legacy-content--home .home-hero__content { max-width: 76%; }
  .local-tools__links { grid-template-columns: 1fr; gap: 10px; }
  .local-tools__links a { min-height: 94px; }
}
@media (max-width: 820px) {
  .portal-page { --header-height: 62px; }
  .portal-page .content-body { padding-inline: 20px; }
  .portal-user__copy strong { font-size: .65rem; }
  .topbar-action--supplier { display: inline-flex; max-width: 110px; font-size: .65rem; }
  .portal-sidebar { width: min(290px, 85vw); }
  .portal-page .portal-content, .portal-footer { margin-left: 0; }
  .legacy-content--home { min-height: 370px; }
  .legacy-content--home .home-hero__content { max-width: 78%; }
  .legacy-content--home .hero-visual__veil { background: linear-gradient(90deg, #113d32 0%, rgb(17 61 50 / 85%) 52%, rgb(17 61 50 / 20%) 100%); }
  .local-tools__links { grid-template-columns: 1fr; }
  .login-preview { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .portal-header { padding-inline: 12px; }
  .portal-user { flex-basis: 155px; max-width: 155px; }
  .portal-user__copy { max-width: 112px; }
  .portal-page .content-body { padding-inline: 16px; }
  .breadcrumb-bar { margin-bottom: 18px; }
  .legacy-content--home { padding: 28px 24px; min-height: 0; }
  .legacy-content--home .home-hero__content { max-width: none; }
  .legacy-content--home header h1, .legacy-content--home header .page-header { font-size: clamp(1.95rem, 8vw, 2.7rem); }
  .legacy-content--home .hero-visual__veil { background: rgb(17 61 50 / 83%); }
  .legacy-content--home .home-hero__visual img { opacity: .7; }
  .legacy-content--home .hero-actions { flex-direction: column; align-items: stretch; }
  .local-tools__heading { align-items: flex-start; }
  .local-tools__heading h2 { font-size: 1.25rem; }
  .environment-summary { display: none; }
  .local-tools__links a { padding: 18px; }
  .portal-form, .workspace-panel__heading { padding: 18px; }
  .form-field input, .form-field select, .field-control input { font-size: 1rem; }
  .supplier-grid { padding: 14px; }
  .portal-footer { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-page *, .login-page * { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .legacy-content--home::before, .portal-sidebar::before, .portal-sidebar::after, .login-intro::after { display: none; }
}
@media print {
  .portal-page .portal-content { background: white; }
  .legacy-content--home::before { display: none; }
}

/* One continuous, CMS-backed guide. Sections remain usable without script. */
[data-content-section] { scroll-margin-top: calc(var(--header-height) + 24px); }
[data-content-section]:focus { outline: none; }
.editorial-guide { margin-top: 72px; }
.editorial-guide__intro { max-width: 640px; margin-bottom: 40px; }
.editorial-guide__intro h2 { margin: 6px 0 10px; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 650; letter-spacing: -.04em; }
.editorial-guide__intro p { color: var(--ink-600); font-size: .9rem; }
.editorial-section { position: relative; margin-top: 36px; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.editorial-section__heading { display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px; align-items: start; gap: 16px; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.editorial-section__heading h2 { margin: 2px 0 0; max-width: 900px; font-size: clamp(1.3rem, 2.2vw, 1.9rem); font-weight: 640; letter-spacing: -.035em; line-height: 1.3; text-wrap: balance; }
.editorial-section__number { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d8e0cc; border-radius: 50%; color: #58744e; background: #f1f4e9; font: 500 .8rem Consolas, monospace; }
.editorial-section__permalink { display: grid; place-items: center; min-height: 32px; border-radius: 6px; color: #708374; text-decoration: none; }
.editorial-section__permalink:hover { background: #edf2e5; }
.editorial-section__body { max-width: none; color: var(--ink-800); font-size: .92rem; line-height: 1.85; overflow-wrap: anywhere; }
.editorial-section__body h1 { font-size: 1.5rem; }
.editorial-section__body img { max-width: 100%; height: auto; }
.editorial-section__body table { display: block; max-width: 100%; overflow-x: auto; }
.editorial-section__body pre { max-width: 100%; overflow-x: auto; }
.editorial-section--octo { background: linear-gradient(145deg, #fffef8, #f3f5ea); border-color: #d5deca; }
.editorial-section--octo .editorial-copy { white-space: pre-line; line-height: 2; }
.editorial-section--octo .editorial-copy::after { content: ''; display: table; clear: both; }
.editorial-section--octo a:has(img[src*="supplier-badge"]) { float: right; margin: 0 0 18px 26px; }
.editorial-section--octo img[src*="supplier-badge"] { width: 150px; max-width: 100%; margin: 0; border: none; background: transparent; }
.editorial-section--octo .editorial-copy a:not(:has(img)) { display: inline; padding: 3px 6px; border-radius: 4px; background: #edf2e5; color: #315f43; font-size: .86rem; box-decoration-break: clone; }
.readprofile-example { margin: 30px 0; overflow: hidden; border: 1px solid #ccd8bd; border-radius: 14px; background: #fffef8; box-shadow: 0 12px 32px rgb(35 69 46 / 9%); white-space: normal; }
.readprofile-example__heading { display: flex; align-items: center; gap: 13px; padding: 20px 24px; }
.readprofile-example__heading > .ui-icon { width: 36px; height: 36px; border-radius: 9px; background: #e6eddc; color: #536e46; }
.readprofile-example__heading strong { display: block; font-size: .96rem; font-weight: 650; }
.readprofile-example__heading small { display: block; color: var(--ink-600); font-size: .75rem; }
.readprofile-example > a { display: block; margin-inline: 12px; }
.readprofile-example img { display: block; width: 100%; border: none; border-radius: 9px; }
.readprofile-example__hint { display: none; }
.readprofile-example figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 18px 24px; color: #6e806b; font-size: .72rem; }
.readprofile-example figcaption code { color: #3f6245; background: #edf2e5; border-radius: 4px; padding: 3px 6px; }
[data-reveal] { opacity: 1; transform: none; transition: opacity .7s ease, transform .85s cubic-bezier(.22, 1, .36, 1); }
[data-reveal].reveal-pending { opacity: 0; transform: translateY(20px); }
[data-reveal-depth].reveal-pending { transform: perspective(1100px) translateY(24px) rotateX(5deg); transform-origin: center bottom; }
@media (max-width: 600px) {
  .editorial-guide { margin-top: 48px; }
  .editorial-section { padding: 22px 18px; margin-top: 22px; }
  .editorial-section__heading { grid-template-columns: 34px minmax(0, 1fr) 24px; gap: 10px; margin-bottom: 20px; padding-bottom: 20px; }
  .editorial-section__number { width: 32px; height: 32px; font-size: .7rem; }
  .editorial-section__heading h2 { font-size: 1.28rem; }
  .editorial-section__body { font-size: .88rem; }
  .editorial-section--octo a:has(img[src*="supplier-badge"]) { float: none; display: inline-block; margin: 12px 0; }
  .readprofile-example > a { margin-inline: 6px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .readprofile-example img { min-width: 650px; }
  .readprofile-example__hint { display: block; padding: 10px 14px 0; color: var(--ink-600); font-size: .7rem; }
  .readprofile-example__heading, .readprofile-example figcaption { padding: 14px; }
  .readprofile-example__heading strong { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].reveal-pending { opacity: 1; transform: none; transition: none; }
}
@media print {
  [data-reveal], [data-reveal].reveal-pending { opacity: 1; transform: none; }
  .editorial-section { break-inside: auto; box-shadow: none; }
}

/* Public entry page: crawlable brand and service information, with partner tools gated. */
.portal-page--public { min-height: 100vh; background: var(--canvas); }
.public-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px clamp(20px, 6vw, 88px); border-bottom: 1px solid var(--line); background: var(--surface); }
.public-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-800); text-decoration: none; }
.public-brand img { width: 132px; height: 44px; object-fit: contain; }
.public-brand span { border-left: 1px solid var(--line-strong); padding-left: 12px; color: var(--ink-600); font-size: .78rem; }
.public-header__actions { display: flex; align-items: center; gap: 12px; }
.public-header__actions a { min-height: 42px; display: inline-flex; align-items: center; gap: 10px; padding: 0 17px; border-radius: 9px; font-size: .79rem; font-weight: 650; text-decoration: none; }
.public-header__supplier { color: var(--ink-800); }
.public-header__login { background: var(--brand-teal-deep); color: #fff; box-shadow: 0 5px 14px rgb(16 61 51 / 16%); }
.public-header__login:hover, .public-button--primary:hover { background: #0a3028; color: #fff; }
.public-main { width: min(100% - 36px, 1320px); margin: 34px auto 84px; }
.public-hero { min-height: 400px; display: grid; grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fbfaf5; box-shadow: var(--shadow-md); }
.public-hero__copy { align-self: center; padding: clamp(30px, 5vw, 68px); }
.public-eyebrow { display: inline-block; margin-bottom: 18px; color: #176b53; font-size: .68rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.public-hero__heading h1, .public-hero__heading h2 { max-width: 14ch; margin: 0 0 17px; color: var(--ink-950); font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 760; letter-spacing: -.045em; line-height: 1.08; }
.public-hero__description { max-width: 48ch; color: var(--ink-600); font-size: 1rem; line-height: 1.75; }
.public-hero__description p { margin: 0; }
.public-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.public-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font-size: .82rem; font-weight: 680; text-decoration: none; transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.public-button:hover { transform: translateY(-1px); }
.public-button--primary { background: var(--brand-teal-deep); color: #fff; }
.public-button--secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink-800); }
.public-button--secondary:hover { border-color: var(--brand-teal); color: var(--brand-teal-deep); }
.public-hero__image { min-height: 400px; position: relative; overflow: hidden; }
.public-hero__image::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgb(16 61 51 / 8%), transparent 38%), linear-gradient(0deg, rgb(16 61 51 / 13%), transparent 42%); pointer-events: none; }
.public-hero__image picture, .public-hero__image img { width: 100%; height: 100%; display: block; }
.public-hero__image img { position: absolute; inset: 0; object-fit: cover; }
.public-overview { margin-top: 58px; }
.public-overview__intro { max-width: 720px; margin-bottom: 22px; }
.public-overview__intro h2 { margin: 8px 0 10px; color: var(--ink-950); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 730; letter-spacing: -.035em; }
.public-overview__intro p { margin: 0; color: var(--ink-600); line-height: 1.7; }
.public-overview__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.public-overview__card { min-height: 172px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.public-overview__card > span { color: #49866d; font-size: .69rem; font-weight: 750; letter-spacing: .1em; }
.public-overview__card h3 { margin: 16px 0 8px; color: var(--ink-950); font-size: 1.03rem; font-weight: 700; }
.public-overview__card p { margin: 0; color: var(--ink-600); font-size: .88rem; line-height: 1.65; }
.public-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(20px, 6vw, 88px); border-top: 1px solid var(--line); color: var(--ink-600); font-size: .73rem; }
.public-footer a { color: var(--brand-teal-deep); font-weight: 650; text-decoration: none; }

@media (max-width: 900px) {
  .public-hero { grid-template-columns: 1fr; }
  .public-hero__copy { padding: 34px; }
  .public-hero__image { min-height: 270px; }
}
@media (max-width: 600px) {
  .public-header { min-height: 66px; padding-inline: 16px; }
  .public-brand { gap: 8px; }
  .public-brand img { width: 110px; height: 38px; }
  .public-brand span { display: none; }
  .public-header__actions { gap: 4px; }
  .public-header__actions a { min-height: 40px; padding-inline: 11px; font-size: .7rem; }
  .public-header__supplier { display: none !important; }
  .public-main { width: min(100% - 24px, 1320px); margin: 16px auto 48px; }
  .public-hero { border-radius: 14px; }
  .public-hero__copy { padding: 26px 22px 28px; }
  .public-hero__heading h1, .public-hero__heading h2 { font-size: clamp(1.85rem, 10vw, 2.8rem); }
  .public-hero__description { font-size: .92rem; }
  .public-hero__image { min-height: 210px; }
  .public-overview { margin-top: 40px; }
  .public-overview__cards { grid-template-columns: 1fr; gap: 10px; }
  .public-overview__card { min-height: 0; padding: 20px; }
  .public-overview__card h3 { margin-top: 10px; }
  .public-footer { flex-wrap: wrap; gap: 8px 16px; padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .public-button { transition: none; }
  .public-button:hover { transform: none; }
}

/* Refined workspace branding and account picker. */
.portal-page .sidebar-brand {
  min-height: 118px;
  padding: 15px 20px 12px;
  gap: 4px;
  background: #f3f0e5;
  border-bottom: 1px solid #e4dfcf;
}
.portal-page .sidebar-brand:hover { background: #eeebdf; }
.portal-page .sidebar-brand__mark {
  width: 176px;
  height: 72px;
  flex-basis: 72px;
  padding: 2px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.portal-page .sidebar-brand__mark img { width: 164px; height: 68px; }
.portal-page .sidebar-brand__caption { color: #526c5e; font-size: .57rem; letter-spacing: .16em; }
.sidebar-meta {
  border-color: rgb(228 238 216 / 9%);
  background: rgb(228 238 216 / 2%);
  box-shadow: none;
}
.sidebar-meta a { align-items: center; color: #a8c9bb; }

.topbar-action--supplier { gap: 7px; }
.topbar-action--supplier img,
.public-header__supplier img { display: block; width: 112px; height: 34px; object-fit: contain; }
.topbar-external { position: static; width: 15px; height: 15px; flex: 0 0 15px; border: 0; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.public-header__supplier { display: inline-flex; align-items: center; gap: 7px; }
.public-button--secondary .topbar-external { width: 13px; height: 13px; }

.impersonate-search__input { isolation: isolate; }
.impersonate-search .form-field .impersonate-search__input input { position: relative; z-index: 1; padding-right: 12px; }
.impersonate-search__input > .impersonate-search__ghost {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 42px;
  overflow: hidden;
  max-width: calc(100% - 56px);
  padding-right: 1px;
  color: #86958b;
  font-size: .74rem;
  text-overflow: clip;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}
.impersonate-search__caret {
  position: relative;
  width: 1px;
  height: 15px;
  display: inline-block;
  margin-left: 2px;
  background: #398c59;
  animation: impersonate-caret .82s steps(1, end) infinite;
  pointer-events: none;
  vertical-align: middle;
}
.impersonate-search__ghost[hidden] { display: none; }
.account-option__arrow,
.account-chip__arrow { position: relative; width: 15px; height: 15px; color: #789083; }
.account-option__arrow::before,
.account-chip__arrow::before { position: absolute; top: 4px; left: 3px; width: 7px; height: 7px; content: ""; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.account-option__arrow::after,
.account-chip__arrow::after { position: absolute; top: 7px; left: 3px; width: 9px; height: 1px; content: ""; background: currentColor; }
.impersonate-panel .form-actions .text-action {
  padding: 7px 2px;
  border: 0;
  border-radius: 0;
  color: #8a3438;
  background: transparent;
  text-decoration: none;
}
.impersonate-panel .form-actions .text-action:hover { border: 0; color: #6f252a; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.topbar-external::after { display: none; content: none; }

@media (max-width: 820px) {
  .topbar-action--supplier { max-width: 130px; }
  .topbar-action--supplier img { width: 90px; height: 28px; }
  .portal-page .sidebar-brand__mark { width: 176px; }
}
@media (max-width: 1080px) {
  .topbar-action--supplier img { width: 82px; height: 25px; }
  .topbar-action--supplier .topbar-external { width: 13px; height: 13px; flex-basis: 13px; }
}
@media (max-width: 920px) {
  .topbar-action--supplier img { width: 76px; height: 23px; }
  .topbar-action--supplier .topbar-external { width: 12px; height: 12px; flex-basis: 12px; }
}
@media (max-width: 820px) {
  .topbar-action--supplier img { width: 90px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .impersonate-search__caret,
  .account-option__arrow,
  .account-chip__arrow { animation: none; transition: none; }
}

/* Login: quiet controls, compact legal footer and a slow ambient paper-light motion. */
.login-page .page-shell { min-height: calc(100svh - 40px); animation-duration: 38s; }
.login-main { min-height: calc(100svh - 40px); padding-block: 26px 18px; }
.login-intro { animation-duration: 34s; }
.login-intro::before { animation-duration: 26s; }
.login-intro::after { opacity: .15; }
.login-card__header { padding-top: 50px; padding-bottom: 19px; }
.login-card__icon { display: none; }
.field-control { grid-template-columns: minmax(0, 1fr); }
.field-control span { display: none; }
.field-control input { padding-inline: 14px; }
.login-note { display: none; }
.login-button { margin-top: 20px; }
.login-page .site-footer {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 18px;
  padding: 5px 14px;
  font-size: .52rem;
  line-height: 1.35;
}
.login-page .site-footer p { margin: 0; }
.login-page .site-footer .app-version { display: inline; margin: 0; }
@media (max-width: 700px) {
  .login-page .page-shell, .login-main { min-height: calc(100svh - 58px); }
  .login-main { padding-block: 16px 12px; }
  .login-page .site-footer { min-height: 58px; gap: 3px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-page .page-shell,
  .login-intro,
  .login-intro::before { animation: none; }
}
