.merchant-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(190px,260px);
    align-items: start;
    gap: clamp(20px,4vw,56px);
    padding-block: clamp(26px,5vw,68px);
}

.merchant-document {
    padding: clamp(17px,3.7vw,47px);
    border: 1px solid #e7e1f0;
    border-radius: 13px;
    background: #fff;
    overflow-wrap: anywhere;
}

.merchant-document h1 {
    margin: 0 0 clamp(18px,3vw,30px);
    font-size: clamp(1.85rem,4vw,3rem);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.merchant-document section + section { margin-top: 22px; }
.merchant-document h2 { margin: 0 0 8px; font-size: clamp(1.12rem,2vw,1.45rem); line-height: 1.22; }
.merchant-document p { margin: 0 0 9px; color: var(--muted); line-height: 1.65; }
.merchant-contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.merchant-contact-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 64px;
    padding: 10px 13px;
    border: 1px solid #e3d9f7;
    border-radius: 12px;
    background: #f8f4ff;
    color: #442788;
    font-size: .86rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.merchant-contact-link--chat { border-color: #c8e8de; background: #effaf6; color: #176054; }
.merchant-contact-link:hover { border-color: currentColor; }
.merchant-contact-link strong { display: block; color: var(--ink); font-size: .95rem; }
.merchant-contact-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; background: #e8dbfb; }
.merchant-contact-link--chat .merchant-contact-icon { background: #d3f1e7; }
.merchant-contact-icon .ui-icon { width: 21px; height: 21px; }
.merchant-contact-arrow.ui-icon { width: 15px; height: 15px; }

.merchant-document .merchant-draft {
    margin-bottom: 20px;
    padding: 9px 12px;
    border: 1px solid #e6cf9c;
    border-radius: 7px;
    background: #fff8e9;
    color: #533600;
    font-size: .89rem;
}

.merchant-identity {
    padding: clamp(14px,2.6vw,26px);
    border: 1px solid #e7e1f0;
    border-radius: 9px;
    background: #faf9fd;
}

.merchant-identity dl { display: grid; gap: 9px; margin: 13px 0 0; }
.merchant-identity dl > div { display: grid; grid-template-columns: minmax(105px,9rem) minmax(0,1fr); gap: 6px 14px; }
.merchant-identity dt { color: var(--muted); }
.merchant-identity dd { margin: 0; }
.merchant-identity a { color: var(--accent-strong); text-underline-offset: .18em; }
.merchant-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }

.merchant-nav { padding: 9px; border: 1px solid #e7e1f0; border-radius: 12px; background: #fff; }
.merchant-nav ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.merchant-nav a { display: flex; align-items: center; min-height: 41px; padding: 8px 10px; border-radius: 7px; font-size: .91rem; text-decoration: none; }
.merchant-nav a:is(:hover,[aria-current]) { color: var(--accent-strong); background: var(--tint); }
.merchant-nav a[aria-current] { font-weight: 700; }

@media (max-width: 760px) {
    .merchant-layout { grid-template-columns: minmax(0,1fr); }
    .merchant-nav ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 450px) {
    .merchant-identity dl > div { grid-template-columns: minmax(0,1fr); gap: 0; }
}

@media print {
    .page-merchant :is(.merchant-nav,.site-header,.site-floor,.merchant-actions) { display: none; }
    .merchant-layout { display: block; width: 100%; padding: 0; }
    .merchant-document { padding: 0; border: 0; }
}
