@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    font-family: 'DM Sans', sans-serif;
    color: #172b40;
    background: #f4f6f8;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --ink: #172b40;
    --muted: #6c7b8a;
    --line: #e3e8ed;
    --navy: #11243a;
    --teal: #087e76;
    --surface: #ffffff;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(221, 238, 235, .56), transparent 34rem),
        #f4f6f8;
}

button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-header {
    min-height: 76px;
    padding: 0 clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: white;
    background: var(--navy);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    color: #a6e0d6;
    font: 800 13px 'Manrope', sans-serif;
    letter-spacing: -.04em;
}

.brand strong, .brand small { display: block; }
.brand strong { font: 700 14px 'Manrope', sans-serif; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: #b7c3ce; font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.company-switcher { display: flex; align-items: center; gap: 8px; color: #d5e2e8; font-size: 10px; }
.company-switcher select { max-width: 240px; min-width: 130px; padding: 7px 9px; color: #e8f0f2; border: 1px solid #506171; border-radius: 7px; background: #253747; }
.company-principal-choice { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10px; }
.company-principal-choice input { accent-color: var(--teal); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-shell {
    width: min(1480px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 56px;
    flex: 1;
}

.auth-layout {
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 440px);
    align-items: center;
    gap: clamp(36px, 9vw, 112px);
}

.intro-panel { max-width: 590px; padding: 20px 0; }
.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; letter-spacing: -.045em; }
.intro-panel h1 { max-width: 560px; margin-bottom: 20px; color: var(--navy); font-size: clamp(38px, 5vw, 58px); line-height: 1.08; }
.intro-panel > p:not(.eyebrow) { max-width: 460px; margin-bottom: 30px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.intro-points { display: grid; gap: 15px; color: #3d5062; font-size: 13px; }
.intro-points span { display: flex; align-items: center; gap: 12px; }
.intro-points i { color: #82a19c; font: 600 10px 'Manrope', sans-serif; font-style: normal; letter-spacing: .06em; }

.auth-card {
    padding: 28px;
    border: 1px solid #e6ebef;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 16px 50px rgba(26, 48, 66, .08);
}

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 28px; border-radius: 10px; background: #f1f4f5; }
.auth-tab { padding: 10px 8px; border: 0; border-radius: 7px; color: #667585; background: transparent; font-size: 12px; font-weight: 600; }
.auth-tab.is-active { color: var(--navy); background: white; box-shadow: 0 1px 4px rgba(20,40,60,.10); }
.login-method-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: -12px 0 22px; }
.login-method-button { min-height: 36px; padding: 6px 8px; border: 1px solid #e2e9ed; border-radius: 7px; color: #657585; background: white; font-size: 10px; font-weight: 600; }
.login-method-button.is-active { border-color: #abd0c9; color: #087e76; background: #f0f8f6; }
.auth-form { display: grid; gap: 10px; }
.auth-form h2 { margin-bottom: 6px; color: var(--navy); font-size: 24px; }
.muted { color: var(--muted); }
.auth-form .muted { margin-bottom: 10px; font-size: 12px; line-height: 1.6; }
.auth-form label { margin-top: 7px; color: #34475a; font-size: 11px; font-weight: 600; }
.auth-form input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #dce3e8;
    border-radius: 8px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 13px;
    transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus { border-color: #4a9b91; box-shadow: 0 0 0 3px rgba(8,126,118,.10); }
.auth-form input::placeholder { color: #a3afb9; }
.field-hint { margin: -4px 0 2px; color: #758493; font-size: 10px; line-height: 1.55; }
.field-hint code { color: #23635e; }

.button {
    min-height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s, border-color .15s, transform .15s;
}
.button:active { transform: translateY(1px); }
.button-primary { margin-top: 14px; color: white; background: var(--teal); }
.button-primary:hover { background: #066c66; }
.button-secondary { color: #294155; border-color: #dbe3e8; background: #fff; }
.button-secondary:hover { border-color: #9fb9b5; background: #f8fbfa; }
.button-quiet { min-height: 34px; padding: 0 12px; color: #e0e9ed; border-color: rgba(255,255,255,.22); background: transparent; font-size: 11px; }
.button-quiet:hover { background: rgba(255,255,255,.08); }
.button-full { width: 100%; }
.button:disabled { opacity: .6; cursor: wait; }
#register-matrix-review-button:disabled { cursor: not-allowed; }
#register-matrix-review-button.is-loading:disabled { cursor: wait; }
.button-inline-spinner { width: 13px; height: 13px; flex: 0 0 auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

.notice-container {
    position: fixed;
    z-index: 1200;
    top: 16px;
    right: 16px;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.notice-container[hidden] { display: none; }
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 12px 15px;
    border: 1px solid #b9ddd6;
    border-radius: 9px;
    color: #175f58;
    background: #eaf7f3;
    box-shadow: 0 8px 24px rgba(28, 48, 67, .16);
    font-size: 12px;
    line-height: 1.5;
}
.notice-item.is-error { color: #943c35; border-color: #f1c7c1; background: #fff0ed; }
.notice-item-content { min-width: 0; flex: 1; margin: 0; overflow-wrap: anywhere; }
.notice-count { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 600; }
.notice-dismiss {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: inherit;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.notice-dismiss:hover { background: rgba(0, 0, 0, .07); }
.notice-dismiss:focus-visible, .notice-overflow-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.notice-overflow-toggle {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #dbe3e8;
    border-radius: 8px;
    color: #294155;
    background: #fff;
    box-shadow: 0 5px 16px rgba(28, 48, 67, .12);
    font-size: 12px;
    cursor: pointer;
}
.notice-overflow-toggle:hover { background: #f8fbfa; }

.workspace-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: start; gap: 24px; }
.sidebar {
    position: sticky;
    top: 24px;
    min-height: 390px;
    padding: 15px 11px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(28, 48, 67, .025);
}
.sidebar-company { padding: 9px 10px 18px; border-bottom: 1px solid #edf0f2; }
.sidebar-label { display: block; margin-bottom: 8px; color: #8b98a2; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.sidebar-company strong { display: block; overflow: hidden; color: #253c50; font: 700 12px 'Manrope', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-company small { display: block; margin-top: 4px; color: #86939d; font-size: 10px; }
.main-navigation { display: grid; gap: 5px; padding-top: 15px; }
.nav-item { min-height: 42px; padding: 0 11px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 8px; color: #657585; background: transparent; text-align: left; font-size: 12px; font-weight: 600; }
.nav-item svg, .section-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.nav-item:hover { color: #284a56; background: #f4f8f7; }
.nav-item.is-active { color: #076e67; background: #eaf5f2; }
.sidebar-footnote { margin-top: auto; padding: 16px 10px 4px; color: #929da6; font-size: 10px; line-height: 1.5; }
.workspace-content { min-width: 0; }
.settings-view { display: grid; gap: 18px; }
.settings-view .dashboard-heading { margin-bottom: 0; }
.settings-navigation { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid #e4eaee; }
.settings-navigation-item { min-height: 38px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; color: #627585; background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.settings-navigation-item:hover { color: #176b65; background: #f2f8f6; }
.settings-navigation-item.is-active { border-color: #cfe4df; color: #076e67; background: #eaf5f2; }
.internal-norms-panel { display: grid; gap: 18px; }
.internal-norms-list, .internal-articles-list, .internal-attachments-list { display: grid; gap: 12px; }
.internal-norm-card, .internal-article-card { display: grid; gap: 12px; padding: 16px; border: 1px solid #dbe5e9; border-radius: 12px; background: #fff; }
.internal-norm-card.is-selected { border-color: #5caaa0; box-shadow: 0 0 0 2px #e2f1ee; }
.internal-norm-card-heading, .internal-norm-actions, .internal-norm-card-meta, .internal-attachment-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.internal-norm-card-heading h3, .internal-article-card h4 { margin: 0; color: #173247; }
.internal-norm-card-heading p, .internal-norm-card-summary, .internal-article-card p { margin: 5px 0 0; color: #607483; font-size: 13px; }
.internal-norm-card-meta { justify-content: flex-start; color: #607483; font-size: 12px; }
.internal-norm-form, .internal-norm-editor { display: grid; gap: 16px; padding: 18px; border: 1px solid #dbe5e9; border-radius: 12px; background: #f9fbfc; }
.internal-norm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.internal-norm-wide-field { grid-column: 1 / -1; }
.internal-norm-actions { justify-content: flex-start; }
.internal-article-form, .internal-norm-attachments, .internal-norm-audit { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid #dbe5e9; }
.internal-article-form h4, .internal-norm-attachments h4 { margin: 0; color: #173247; }
.internal-article-text { max-height: 180px; overflow: auto; margin-top: 8px; white-space: pre-wrap; color: #394f5f; font-size: 13px; line-height: 1.55; }
.internal-attachment-row { justify-content: flex-start; padding: 9px 0; border-bottom: 1px solid #e6ecef; color: #607483; font-size: 12px; }
.internal-attachment-download { padding: 0; border: 0; color: #076e67; background: transparent; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; cursor: pointer; }
.internal-norm-audit-list { display: grid; gap: 12px; margin: 0; padding-left: 22px; }
.internal-norm-audit-list li { color: #394f5f; }
.internal-norm-audit-list pre { overflow: auto; max-height: 240px; padding: 10px; border-radius: 8px; background: #f3f6f7; font-size: 11px; white-space: pre-wrap; }
.role-permissions-table { min-width: 780px; }
.role-permissions-table td:first-child { min-width: 260px; }
.role-permissions-table td:first-child strong, .role-permissions-table td:first-child small { display: block; }
.role-permissions-table td:first-child small { margin-top: 4px; color: #758493; font-size: 10px; line-height: 1.5; }
.role-permission-cell { text-align: center; }
.role-permission-cell input { width: 18px; height: 18px; accent-color: var(--teal); }
.role-permissions-status { margin: 0; color: #647786; font-size: 11px; }
.role-permissions-status.is-error { color: #a13e37; }
.change-history-table { min-width: 760px; }
.change-history-table td:nth-child(3) { min-width: 300px; white-space: normal; overflow-wrap: anywhere; }
.change-history-table td:nth-child(1), .change-history-table td:nth-child(4) { white-space: nowrap; }
.change-history-details { min-width: 0; }
.change-history-entry { display: block; line-height: 1.55; }
.change-history-more { margin-top: 7px; color: #647786; font-size: 10px; }
.change-history-more summary { width: fit-content; color: var(--teal); font-weight: 600; cursor: pointer; }
.change-history-more summary:hover { text-decoration: underline; }
.change-history-more ul { margin: 7px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.company-view .dashboard-heading { margin-bottom: 22px; }
.account-view, .users-view { display: grid; gap: 16px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.profile-grid > div { min-width: 0; padding: 13px; border: 1px solid #e7ecef; border-radius: 8px; background: #fbfcfc; }
.profile-grid dt { margin-bottom: 6px; color: #82909c; font-size: 10px; }
.profile-grid dd { margin: 0; overflow-wrap: anywhere; color: #263c50; font-size: 12px; font-weight: 600; }
.profile-id { grid-column: 1 / -1; }
.profile-name-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.profile-name-form .field-hint { grid-column: 1 / -1; margin: 0; }
.security-methods-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.security-method-card { min-width: 0; display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid #e7ecef; border-radius: 9px; background: #fbfcfc; }
.security-method-card h3 { margin: 0 0 5px; color: #354a5c; font-size: 13px; }
.security-method-card .muted, .security-setup-panel > p { margin: 0; color: #758493; font-size: 10px; line-height: 1.55; }
.security-method-card > label, .security-form label { color: #43586a; font-size: 10px; font-weight: 600; }
.security-method-card > input, .security-form input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid #dce3e8; border-radius: 7px; outline: none; color: var(--ink); background: #fff; font-size: 12px; }
.security-setup-panel { display: grid; justify-items: start; gap: 10px; padding-top: 4px; }
.security-setup-panel code { overflow-wrap: anywhere; color: #23635e; font-size: 11px; }
.totp-qr { width: 176px; height: 176px; padding: 8px; border: 1px solid #e7ecef; border-radius: 8px; background: #fff; }
.security-form { width: 100%; display: grid; gap: 8px; }
.passkey-list { display: grid; gap: 8px; padding: 0; margin: 4px 0 0; list-style: none; }
.passkey-list > li:not(.field-hint) { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid #e7ecef; }
.passkey-list span { min-width: 0; display: grid; gap: 3px; }
.passkey-list strong { overflow-wrap: anywhere; color: #354a5c; font-size: 11px; }
.passkey-list small { color: #82909c; font-size: 9px; }
.passkey-list .button { min-height: 32px; padding: 0 9px; font-size: 10px; }
.session-list { display: grid; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.session-list > li:not(.field-hint) { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid #e7ecef; }
.session-list span { min-width: 0; display: grid; gap: 4px; }
.session-list strong { overflow-wrap: anywhere; color: #354a5c; font-size: 11px; }
.session-list small { color: #82909c; font-size: 9px; line-height: 1.5; }
.session-list .button { min-height: 32px; padding: 0 9px; font-size: 10px; }
.roles-section { display: grid; gap: 17px; }
.roles-section h2 { margin-bottom: 6px; color: #253c50; font-size: 18px; }
.roles-section .muted { margin-bottom: 0; font-size: 11px; }
.role-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-card { padding: 14px; border: 1px solid #e7ecef; border-radius: 9px; background: #fbfcfc; }
.role-card h3 { margin: 0 0 6px; color: #354a5c; font-size: 13px; }
.role-card code { color: #087e76; font-size: 10px; font-weight: 700; }
.role-card p { margin: 8px 0 0; color: #758493; font-size: 10px; line-height: 1.5; }
.new-user-form { display: grid; gap: 14px; }
.new-user-form .form-section-heading { margin-bottom: 2px; }
.new-user-form .form-actions { margin-top: 2px; }
.user-list { display: grid; gap: 10px; }
.user-card { padding: 14px; border: 1px solid #e2e9ed; border-radius: 9px; background: #fbfcfc; }
.user-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.user-platform-permissions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 10px; border: 1px solid #e2e9ed; border-radius: 8px; }
.user-platform-permissions legend { padding: 0 5px; color: #43586a; font-size: 11px; font-weight: 700; }
.user-platform-permissions .field-hint { flex-basis: 100%; margin: 0; }
.user-platform-permission { display: inline-flex; align-items: center; gap: 6px; color: #43586a; font-size: 11px; }
.user-account-metadata { display: flex; flex-wrap: wrap; gap: 7px 24px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e7ecef; }
.user-account-metadata p { margin: 0; color: #647786; font-size: 10px; line-height: 1.5; }
.user-account-metadata strong { color: #43586a; }
.user-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.user-card-actions .field-hint { margin: 0; }
.user-card-buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.user-card-actions .button { flex: 0 0 auto; }
.user-status { flex: 0 0 auto; align-self: flex-start; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.user-status-active { color: #176b54; background: #e5f4ee; }
.user-status-inactive { color: #8b4c35; background: #fbece6; }
.company-onboarding-fields { display: grid; gap: 9px; padding: 14px; border: 1px solid #dfe8eb; border-radius: 9px; }
.company-onboarding-fields legend { padding: 0 6px; color: var(--navy); font-size: 12px; font-weight: 700; }
.company-create-dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow-y: auto; border: 1px solid #dce5e9; border-radius: 14px; color: #3b5063; box-shadow: 0 20px 70px rgba(17, 36, 58, .24); }
.company-create-dialog::backdrop { background: rgba(17, 36, 58, .58); }
.company-create-form > .article-dialog-heading { border: 0; }
.company-create-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 0 24px 18px; }
.company-create-fields .company-principal-choice { grid-column: 1 / -1; color: #526779; }
.company-create-form .article-dialog-actions { justify-content: flex-start; }
.readonly-note { margin: 10px 0 0; color: #94631f; font-size: 11px; line-height: 1.5; }
.company-form { display: grid; gap: 16px; }
.form-section { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(28, 48, 67, .025); }
.form-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-icon { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #49667d; background: #f0f4f7; }
.section-icon-teal { color: #087e76; background: #eaf5f2; }
.form-section-heading h2 { margin: 0 0 4px; color: #253c50; font-size: 15px; }
.form-section-heading p { margin: 0; color: #82909c; font-size: 10px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-field { min-width: 0; display: grid; gap: 7px; color: #43586a; font-size: 11px; font-weight: 600; }
.form-field-wide { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 11px;
    border: 1px solid #dce3e8;
    border-radius: 8px;
    outline: none;
    color: #263c50;
    background: #fff;
    font: 400 12px 'DM Sans', sans-serif;
    transition: border-color .15s, box-shadow .15s;
}
.form-field textarea { min-height: 150px; resize: vertical; font: 400 11px/1.6 Consolas, 'Courier New', monospace; tab-size: 2; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #4a9b91; box-shadow: 0 0 0 3px rgba(8,126,118,.10); }
.form-field input:disabled, .form-field select:disabled, .form-field textarea:disabled { color: #7f8b95; background: #f6f8f9; cursor: not-allowed; }
.attribute-columns, .attribute-row { display: grid; grid-template-columns: minmax(180px, 1fr) 150px minmax(120px, 160px) 34px; align-items: center; gap: 10px; }
.attribute-columns { padding: 0 8px 8px; color: #7e8b96; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.attribute-list { display: grid; gap: 8px; }
.attribute-row { padding: 9px 8px; border: 1px solid #e7ecef; border-radius: 9px; background: #fbfcfc; }
.attribute-row input, .attribute-row select { width: 100%; min-width: 0; min-height: 38px; padding: 0 9px; border: 1px solid #dce3e8; border-radius: 7px; outline: none; color: #334a5c; background: #fff; font: 400 11px 'DM Sans', sans-serif; }
.attribute-row input:focus, .attribute-row select:focus { border-color: #4a9b91; box-shadow: 0 0 0 3px rgba(8,126,118,.08); }
.attribute-row input::placeholder { color: #a3afb9; }
.attribute-row .attribute-advanced { color: #83909a; background: #f1f4f5; font-size: 10px; }
.attribute-row .attribute-remove { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; color: #98706c; background: transparent; font-size: 17px; }
.attribute-row .attribute-remove:hover { color: #a9443c; background: #fff0ed; }
.attribute-row[aria-disabled="true"] .attribute-remove { opacity: .45; }
.attribute-add-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; margin-top: 13px; }
.attribute-add-controls .form-field { gap: 6px; }
.attribute-add-controls select, .attribute-other-fields input, .attribute-other-fields select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #dce3e8; border-radius: 7px; color: #334a5c; background: #fff; font: 400 11px 'DM Sans', sans-serif; }
.attribute-other-fields { display: grid; grid-template-columns: minmax(220px, 1fr) 180px; gap: 10px; margin-top: 10px; }
.attribute-other-fields[hidden] { display: none; }
.attribute-add-controls .button-add { min-height: 38px; margin: 0; white-space: nowrap; }
.attribute-add-controls .button-add:disabled { opacity: .55; cursor: not-allowed; }
.activity-search-results { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; margin-top: 8px; }
.activity-search-results .field-hint, .company-activities-list .field-hint { margin: 2px 0; }
.activity-search-result { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 10px; padding: 10px 12px; border: 1px solid #e2e9ed; border-radius: 8px; color: #334a5c; background: #fbfcfc; text-align: left; cursor: pointer; }
.activity-search-result:hover { border-color: #a8d0c8; background: #f4faf8; }
.activity-search-result strong { grid-row: span 2; color: #087e76; font-size: 11px; }
.activity-search-result span { font-size: 11px; font-weight: 600; line-height: 1.4; }
.activity-search-result small, .company-activity-details small { color: #82909c; font-size: 10px; line-height: 1.4; }
.activity-list-title { margin: 16px 0 8px; color: #43586a; font-size: 11px; }
.company-activities-list { display: grid; gap: 8px; }
.company-activity { display: grid; grid-template-columns: minmax(82px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e2e9ed; border-radius: 8px; background: #fbfcfc; }
.company-activity-details { display: grid; gap: 3px; min-width: 0; }
.company-activity-details strong { color: #087e76; font-size: 10px; }
.company-activity-details span { color: #334a5c; font-size: 11px; line-height: 1.4; }
.activity-primary-control { display: flex; align-items: center; gap: 5px; color: #627584; font-size: 10px; white-space: nowrap; }
.activity-primary-control input { accent-color: #087e76; }
.activity-remove { padding: 5px 8px; border: 1px solid #e5e9ec; border-radius: 6px; color: #8d5e59; background: #fff; font: 500 10px 'DM Sans', sans-serif; }
.activity-remove:hover { border-color: #e8c4bf; color: #a9443c; background: #fff7f5; }
.button-add { min-height: 34px; margin-top: 10px; padding: 0 10px; color: #087e76; border-color: #cfe4df; background: #f4faf8; font-size: 10px; }
.button-add:hover { border-color: #a8d0c8; background: #eaf5f2; }
.button-add span { font-size: 16px; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.form-actions .button-primary { margin-top: 0; }
.company-form .field-hint { margin: 9px 0 0; }

.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 27px; }
.dashboard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.dashboard-actions .button-primary { margin-top: 0; }
.dashboard-heading h1 { margin-bottom: 7px; color: var(--navy); font-size: 32px; }
.dashboard-heading .muted { margin-bottom: 0; font-size: 13px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { min-height: 130px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 3px 12px rgba(28, 48, 67, .025); }
.metric-label, .metric-note { display: block; color: var(--muted); font-size: 11px; }
.metric-value { display: block; margin: 11px 0 4px; color: var(--navy); font: 800 30px 'Manrope', sans-serif; letter-spacing: -.05em; }
.metric-value.metric-warning { color: #b66d21; }
.metric-note { font-size: 10px; }

.matrix-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 3px 12px rgba(28, 48, 67, .025); }
.matrix-requirements-panel { overflow: visible; }
.panel-heading { min-height: 85px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #edf0f2; }
.panel-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 17px; }
.manual-law-panel { padding: 17px 22px; display: grid; gap: 13px; border-bottom: 1px solid #edf0f2; }
.manual-law-panel[hidden] { display: none; }
.manual-law-panel h3 { margin: 0 0 5px; color: #354a5c; font-size: 13px; }
.manual-law-panel p { margin: 0; color: #738391; font-size: 11px; line-height: 1.5; }
.manual-law-form label { display: block; margin-bottom: 6px; color: #526779; font-size: 10px; font-weight: 600; }
.manual-law-input { display: flex; gap: 8px; }
.manual-law-input input { min-width: 0; flex: 1; }
.manual-law-input .button-primary { margin-top: 0; }
.manual-law-results { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.manual-law-result { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e6ecef; border-radius: 8px; }
.manual-law-result strong { display: block; color: #354a5c; font-size: 11px; line-height: 1.5; }
.manual-law-result small { display: block; margin-top: 3px; color: #84919d; font-size: 10px; }
.manual-law-empty { padding: 8px 0; color: #738391; font-size: 11px; }
.count-badge { padding: 6px 10px; border-radius: 20px; color: #43605e; background: #edf5f3; font-size: 10px; font-weight: 600; white-space: nowrap; }
.matrix-summary-tools { padding: 14px 22px; display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(160px, .45fr)); gap: 12px; border-bottom: 1px solid #edf0f2; }
.matrix-summary-tools label { display: grid; gap: 6px; color: #526779; font-size: 10px; font-weight: 600; }
.matrix-summary-tools input, .matrix-summary-tools select { min-width: 0; width: 100%; }
.matrix-law-detail { padding: 16px 22px; border-bottom: 1px solid #edf0f2; }
.matrix-law-detail-heading { margin-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.matrix-law-detail-heading h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; }
.matrix-law-detail-heading .muted { margin: 0; font-size: 11px; line-height: 1.6; }
.matrix-law-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.missing-articles-picker { margin-top: 16px; padding: 16px; border: 1px solid #dce7e8; border-radius: 10px; background: #f8fbfb; }
.missing-articles-picker[hidden] { display: none; }
.missing-articles-heading, .missing-articles-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.missing-articles-heading h4 { margin: 0 0 4px; color: #354a5c; font-size: 13px; }
.missing-articles-heading p { margin: 0; color: #738391; font-size: 11px; line-height: 1.5; }
.missing-articles-controls { margin-top: 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px 10px; }
.missing-articles-controls label { grid-column: 1; grid-row: 1; color: #526779; font-size: 10px; font-weight: 600; }
.missing-articles-controls input { grid-column: 1; grid-row: 2; min-width: 0; width: 100%; }
.missing-articles-controls button { grid-column: 2; grid-row: 2; }
.missing-articles-status { min-height: 16px; margin: 8px 0 0; color: #667987; font-size: 11px; }
.missing-articles-status.is-error { color: #a13e37; }
.missing-articles-list { max-height: 340px; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; overflow-y: auto; list-style: none; }
.missing-article-option { padding: 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 9px; border: 1px solid #e2e9ec; border-radius: 8px; background: white; cursor: pointer; }
.missing-article-option input { margin: 2px 0 0; accent-color: var(--teal); }
.missing-article-content { min-width: 0; display: grid; gap: 4px; color: #647786; font-size: 11px; line-height: 1.5; }
.missing-article-content strong { color: #30485b; font-size: 11px; }
.missing-article-content > span { display: -webkit-box; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.missing-article-empty { padding: 12px; color: #738391; font-size: 11px; text-align: center; }
.missing-articles-footer .muted { font-size: 10px; }
.article-summary-tools { margin-top: 16px; display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(160px, .45fr)); gap: 12px; }
.article-summary-tools[hidden] { display: none; }
.article-summary-tools label { display: grid; gap: 6px; color: #526779; font-size: 10px; font-weight: 600; }
.article-summary-tools input, .article-summary-tools select { min-width: 0; width: 100%; }
.matrix-progress-note { display: block; margin-top: 4px; color: #84919d; font-size: 10px; }
.matrix-organisms { min-width: 190px; display: grid; gap: 4px; font-size: 10px; line-height: 1.45; }
.matrix-organisms span { overflow-wrap: anywhere; }
.bcn-updates-panel { margin-top: 20px; padding-bottom: 18px; }
.bcn-updates-panel > .muted { margin: 16px 22px 8px; font-size: 11px; line-height: 1.6; }
.bcn-update-list { display: grid; gap: 8px; margin: 0; padding: 0 22px 0 40px; color: #3b5063; font-size: 11px; line-height: 1.6; }
.bcn-update-list a { color: var(--teal); text-decoration: none; }
.bcn-update-list a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; }
.matrix-requirements-panel .table-scroll { overflow: visible; }
.matrix-requirements-panel .table-scroll.is-detail { overflow-x: auto; }
.matrix-requirements-panel th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 #e4eaee; }
table { width: 100%; min-width: 800px; border-collapse: collapse; text-align: left; }
.matrix-requirements-panel table { min-width: 1120px; }
.matrix-requirements-panel .table-scroll.is-detail table { table-layout: fixed; }
.matrix-requirements-panel .table-scroll.is-detail th,
.matrix-requirements-panel .table-scroll.is-detail td { padding-right: 10px; padding-left: 10px; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(1) { width: 8%; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(2) { width: 37%; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(3) { width: 13%; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(4) { width: 10%; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(5) { width: 6%; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(6) { width: 9%; }
.matrix-requirements-panel .table-scroll.is-detail :is(th, td):nth-child(7) { width: 17%; }
.matrix-requirements-panel .table-scroll.is-detail .article-text-preview { width: 100%; min-width: 0; }
.matrix-requirements-panel .table-scroll.is-detail .status-pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.matrix-requirements-panel .table-scroll.is-detail .due-date { white-space: normal; overflow-wrap: anywhere; }
.matrix-requirements-panel .table-scroll.is-detail .evidence-actions { width: 100%; min-width: 0; }
.matrix-requirements-panel .table-scroll.is-detail .upload-control { width: 100%; min-width: 0; max-width: 100%; }
.matrix-requirements-panel .table-scroll.is-detail .row-button { width: 100%; min-width: 0; }
th { padding: 12px 16px; color: #778593; background: #f8fafb; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 15px 16px; border-top: 1px solid #edf0f2; color: #3b5063; font-size: 11px; vertical-align: top; }
td strong { display: block; max-width: 280px; color: #233b50; font-size: 11px; line-height: 1.5; }
td small { display: block; margin-top: 4px; color: #84919d; font-size: 10px; }
.law-link { display: inline-block; margin-top: 6px; color: var(--teal); font-size: 10px; text-decoration: none; }
.law-link:hover { text-decoration: underline; }
.requirement-text { max-width: 240px; color: #657585; line-height: 1.6; }
.article-text-preview { width: min(520px, 38vw); min-width: 260px; margin: 0; display: -webkit-box; overflow: hidden; color: #526779; font-size: 11px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 10; }
.article-image-count { color: #1e6e73; font-size: 10px; font-weight: 600; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-CUMPLE { color: #16705b; background: #e5f5ed; }
.status-INCUMPLE { color: #a8443d; background: #fff0ed; }
.status-POR_VENCER { color: #9b651c; background: #fff5df; }
.status-EN_ADECUACION { color: #3e69a0; background: #edf4ff; }
.status-NO_APLICA { color: #586776; background: #eef1f4; }
.status-OBSOLETO { color: #707a84; background: #eef0f2; }
.article-open { display: block; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.article-open:hover strong { color: var(--teal); text-decoration: underline; }
.due-date { color: #526779; white-space: nowrap; }
.evidence-actions { min-width: 160px; display: grid; gap: 7px; }
.upload-control { max-width: 190px; color: #6f7f8d; font-size: 9px; }
.upload-control::file-selector-button { max-width: 110px; margin-right: 6px; padding: 6px 8px; border: 1px solid #dbe3e8; border-radius: 6px; color: #3f596b; background: #fff; font: 500 9px 'DM Sans', sans-serif; cursor: pointer; }
.row-button { min-height: 30px; padding: 0 9px; font-size: 10px; }
.download-button { justify-self: start; color: var(--teal); border: 0; background: none; font-size: 10px; font-weight: 600; }
.download-button:hover { text-decoration: underline; }
.ai-summary { max-width: 220px; margin-top: 5px; color: #667987; font-size: 10px; line-height: 1.45; }
.empty-state { min-height: 180px; padding: 35px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h3 { margin: 10px 0 5px; color: #354a5c; font-size: 14px; }
.empty-state p { margin: 0; color: #8996a1; font-size: 11px; }
.empty-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #dce7e4; border-radius: 10px; color: var(--teal); font-size: 20px; }
.article-dialog { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow-y: auto; border: 1px solid #dce5e9; border-radius: 14px; color: #3b5063; box-shadow: 0 20px 70px rgba(17, 36, 58, .24); }
.article-dialog::backdrop { background: rgba(17, 36, 58, .58); }
.article-dialog-heading { position: sticky; top: 0; z-index: 5; padding: 22px 24px 15px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f2; background: white; }
.article-dialog-heading h2 { margin: 0 0 5px; color: var(--navy); font-size: 21px; }
.article-dialog-heading .eyebrow { margin: 0 0 6px; }
.article-dialog-heading .muted { margin: 0; font-size: 12px; }
.article-tabs { position: sticky; top: 86px; z-index: 4; padding: 8px 24px; display: flex; gap: 6px; border-bottom: 1px solid #edf0f2; background: white; }
.article-tab { min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; color: #627484; background: transparent; font-size: 11px; font-weight: 600; }
.article-tab:hover { color: var(--teal); background: #f4f8f7; }
.article-tab.is-active { border-color: #c7e1dc; color: #086f68; background: #edf7f5; }
#article-details-panel[hidden], #article-evidence-panel[hidden] { display: none; }
.dialog-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #dbe3e8; border-radius: 50%; color: #506577; background: white; font-size: 22px; cursor: pointer; }
#article-details-panel > .law-link { margin: 12px 24px 0; }
.article-law-text { max-height: 32vh; margin: 16px 24px; padding: 15px; overflow-y: auto; border: 1px solid #e6ecef; border-radius: 9px; background: #f8fafb; }
.article-law-text h3 { margin: 0 0 7px; color: #354a5c; font-size: 12px; }
.article-suggestion, .article-history { margin: 14px 24px; padding: 13px 15px; border: 1px solid #e6ecef; border-radius: 9px; background: #fbfcfd; }
.article-comment-section { margin: 14px 24px; padding: 13px 15px; border: 1px solid #e6ecef; border-radius: 9px; background: #fbfcfd; }
.article-comment-section h3 { margin: 0 0 8px; color: #354a5c; font-size: 12px; }
.article-comment-section form { display: grid; gap: 8px; }
.article-comment-section form[hidden] { display: none; }
.article-comment-section label { color: #526779; font-size: 11px; font-weight: 600; }
.article-comment-section textarea { width: 100%; min-height: 72px; padding: 9px; border: 1px solid #dce4e8; border-radius: 7px; color: #293e50; background: white; font: inherit; font-size: 11px; resize: vertical; }
.article-comment-section .button { justify-self: start; }
.article-suggestion h3, .article-history h3 { margin: 0 0 7px; color: #354a5c; font-size: 12px; }
.article-suggestion p { margin: 0; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.article-history ul, .article-comment-section ul { margin: 0; padding-left: 18px; color: #647786; font-size: 10px; line-height: 1.7; }
.article-comment-section ul { margin-bottom: 8px; overflow-wrap: anywhere; }
.article-history-more { margin-top: 7px; color: #647786; font-size: 10px; }
.article-history-more summary { color: var(--teal); font-weight: 600; cursor: pointer; }
.article-history-more ul { margin-top: 6px; }
.article-evidence-panel { padding: 14px 24px 24px; }
.article-evidence-panel > .field-hint { margin: 0 0 12px; }
.article-evidence-limit { margin: 0 0 12px; color: #647786; font-size: 11px; }
.article-evidence-write-controls { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; border: 1px solid #e6ecef; border-radius: 9px; background: #fbfcfd; }
.article-evidence-write-controls .form-field { min-width: 0; }
.article-evidence-write-controls input { width: 100%; min-height: 38px; margin-top: 6px; }
.article-evidence-link-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.article-evidence-analyze-button { grid-column: 1 / -1; justify-self: start; }
.article-evidence-list { margin: 14px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.article-evidence-item { min-width: 0; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e6ecef; border-radius: 8px; background: white; }
.article-evidence-item-name { min-width: 0; overflow-wrap: anywhere; color: #354a5c; font-size: 11px; font-weight: 600; }
.article-evidence-item-meta { display: block; margin-top: 4px; color: #7b8994; font-size: 10px; font-weight: 400; }
.article-evidence-item-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; }
.article-evidence-item-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.article-evidence-item-actions .button-danger { color: #9b3934; border-color: #e8bcb8; background: #fff4f2; }
.article-evidence-analysis { margin-top: 20px; }
.article-evidence-analysis h3 { margin: 0 0 9px; color: #354a5c; font-size: 12px; }
.article-evidence-run { margin-top: 8px; padding: 12px; border: 1px solid #e6ecef; border-radius: 8px; background: #fbfcfd; }
.article-evidence-run h4 { margin: 0 0 6px; color: #354a5c; font-size: 11px; }
.article-evidence-run p { margin: 5px 0 0; color: #647786; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.article-evidence-run ul { margin: 6px 0 0; padding-left: 18px; color: #647786; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.article-evidence-status-error { color: #9a3934 !important; }
.article-images { margin: 14px 24px; padding: 13px 15px; border: 1px solid #e6ecef; border-radius: 9px; background: #fbfcfd; }
.article-images h3 { margin: 0 0 10px; color: #354a5c; font-size: 12px; }
.article-image-list { display: grid; gap: 12px; }
.article-image-list figure { margin: 0; display: grid; justify-items: start; gap: 6px; }
.article-image-list img { max-width: 100%; max-height: 48vh; object-fit: contain; border: 1px solid #e2e9ed; border-radius: 6px; background: white; }
.article-image-list figcaption, .article-image-list a { color: #647786; font-size: 10px; overflow-wrap: anywhere; }
.article-image-list a { color: var(--teal); font-weight: 600; }
.article-image-error { color: #a13e37; font-size: 11px; }
.article-law-text p { margin: 0; color: #526779; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-edit-form { padding: 0 24px 18px; display: grid; gap: 8px; }
.article-edit-form label { margin-top: 5px; color: #526779; font-size: 11px; font-weight: 600; }
.article-edit-form .field-hint { margin: 2px 0 4px; }
.article-edit-form .button { justify-self: start; }
.article-edit-form select, .article-edit-form input { max-width: 340px; }
.article-dialog-error { margin: 0 24px 14px; padding: 10px 12px; border-radius: 7px; color: #9a3934; background: #fff0ed; font-size: 11px; line-height: 1.5; }
.article-dialog-actions { position: sticky; bottom: 0; z-index: 5; padding: 15px 24px 22px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid #edf0f2; background: white; box-shadow: 0 -8px 18px rgba(17, 36, 58, .06); }
.article-dialog-actions[hidden] { display: none; }
.article-dialog-actions .button { box-sizing: border-box; min-width: 180px; min-height: 46px; flex: 0 1 180px; white-space: normal; }
.article-dialog-actions .button-primary { margin-top: 0; }
.article-dialog-actions .button-not-applicable { color: #176b64; border-color: #b9ddd6; background: #eaf7f3; }
.article-dialog-actions .button-not-applicable:hover { border-color: #8fc9be; background: #def1eb; }
.button-danger { color: #9b3934; border-color: #efd4d1; background: #fff; }
.button-danger:hover { border-color: #d8a39e; background: #fff5f3; }
.article-dialog-actions .button-danger { color: #9b3934; border-color: #e8bcb8; background: #fff4f2; }
.article-dialog-actions .button-danger:hover { border-color: #d8a39e; background: #ffebe8; }
.spinner { width: 22px; height: 22px; margin-bottom: 12px; border: 2px solid #dce8e5; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.privacy-note { margin: 16px 0 0; color: #8996a1; font-size: 10px; line-height: 1.5; }
.site-footer { padding: 18px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #e5eaee; color: #8995a0; background: rgba(255,255,255,.62); font-size: 10px; }

@media (max-width: 800px) {
    .auth-layout { min-height: auto; grid-template-columns: 1fr; gap: 26px; }
    .intro-panel { padding: 4px 0; }
    .intro-panel h1 { max-width: 520px; font-size: 42px; }
    .intro-points { grid-template-columns: 1fr 1fr; gap: 10px; font-size: 11px; }
    .auth-card { width: min(100%, 500px); }
    .page-shell { padding-top: 35px; }
    .workspace-layout { grid-template-columns: 1fr; gap: 16px; }
    .sidebar { position: static; min-height: 0; padding: 12px; }
    .sidebar-company { display: none; }
    .main-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0; }
    .user-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar-footnote { display: none; }
}

@media (max-width: 560px) {
    .site-header { min-height: 66px; padding: 0 16px; }
    .header-actions { gap: 6px; }
    .company-switcher { max-width: 120px; }
    .company-switcher select { min-width: 0; max-width: 120px; }
    .company-switcher .company-principal-choice { display: none; }
    .company-create-fields { grid-template-columns: 1fr; padding: 0 17px 16px; }
    .page-shell { width: calc(100% - 28px); padding: 30px 0 38px; }
    .intro-panel h1 { font-size: 36px; }
    .intro-panel > p:not(.eyebrow) { font-size: 14px; }
    .intro-points { grid-template-columns: 1fr; }
    .auth-card { padding: 20px; }
    .dashboard-heading { align-items: start; flex-direction: column; }
    .dashboard-heading h1 { font-size: 27px; }
    .metrics-grid { grid-template-columns: 1fr; gap: 10px; }
    .profile-grid, .profile-name-form, .role-cards, .user-fields, .security-methods-grid { grid-template-columns: 1fr; }
    .profile-id { grid-column: auto; }
    .user-card-actions { align-items: stretch; flex-direction: column; }
    .metric-card { min-height: auto; padding: 15px 17px; }
    .metric-value { margin: 7px 0 2px; font-size: 25px; }
    .panel-heading { padding: 16px; }
    .article-dialog-heading { padding: 18px 17px 13px; }
    .article-tabs { top: 80px; padding-right: 17px; padding-left: 17px; }
    #article-details-panel > .law-link { margin-left: 17px; }
    .article-evidence-panel { padding-right: 17px; padding-left: 17px; }
    .article-evidence-write-controls, .article-evidence-link-form { grid-template-columns: 1fr; }
    .article-evidence-link-form, .article-evidence-analyze-button { grid-column: 1; }
    .article-evidence-item { align-items: flex-start; flex-direction: column; }
    .article-evidence-item-actions { width: 100%; }
    .article-law-text { margin: 14px 17px; }
    .article-edit-form { padding: 0 17px 16px; }
    .article-dialog-error { margin-right: 17px; margin-left: 17px; }
    .article-dialog-actions { padding: 14px 17px 18px; }
    .article-dialog-actions .button { min-width: 180px; flex: 0 1 180px; }
    .manual-law-panel { padding: 15px 16px; }
    .manual-law-input, .manual-law-result { align-items: stretch; flex-direction: column; }
    .matrix-summary-tools { padding: 14px 16px; grid-template-columns: 1fr; }
    .matrix-law-detail { padding: 15px 16px; }
    .matrix-law-detail-heading { align-items: flex-start; flex-direction: column; }
    .matrix-law-actions { width: 100%; }
    .matrix-law-actions .button { flex: 1; }
    .missing-articles-picker { padding: 13px; }
    .missing-articles-controls { grid-template-columns: 1fr; }
    .missing-articles-controls label, .missing-articles-controls input, .missing-articles-controls button { grid-column: 1; }
    .missing-articles-controls label { grid-row: 1; }
    .missing-articles-controls input { grid-row: 2; }
    .missing-articles-controls button { grid-row: 3; }
    .missing-articles-footer { align-items: stretch; flex-direction: column; }
    .article-summary-tools { grid-template-columns: 1fr; }
    .article-suggestion, .article-history, .article-comment-section { margin-right: 17px; margin-left: 17px; }
    .form-section { padding: 17px; }
    .form-grid { grid-template-columns: 1fr; gap: 12px; }
    .form-field-wide { grid-column: auto; }
    .attribute-columns { display: none; }
    .attribute-row { grid-template-columns: minmax(0, 1fr) 34px; }
    .attribute-name-field { grid-column: 1 / -1; }
    .attribute-type-field, .attribute-value-field { min-width: 0; }
    .attribute-add-controls, .attribute-other-fields { grid-template-columns: 1fr; }
    .attribute-add-controls .button-add { width: 100%; }
    .company-activity { grid-template-columns: minmax(82px, max-content) minmax(0, 1fr); }
    .activity-remove { grid-column: 2; justify-self: start; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .site-footer { flex-direction: column; gap: 5px; padding: 15px 16px; }
}

@media (max-width: 1000px) {
    .matrix-requirements-panel .table-scroll { overflow-x: auto; }
}

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

.bcn-admin-panel { padding-bottom: 22px; }
.company-plan-notice { margin: 0 0 18px; padding: 13px 16px; border: 1px solid #cfe4df; border-radius: 9px; color: #315d57; background: #f1f8f6; font-size: 12px; line-height: 1.55; }
.company-plan-notice.is-restricted { border-color: #e8c4bf; color: #963f38; background: #fff7f5; }
.company-plan-notice[hidden] { display: none; }
.company-plans-panel { margin-bottom: 18px; padding-bottom: 20px; }
.company-plans-panel > .muted { margin: 0; padding: 14px 22px; font-size: 12px; line-height: 1.55; }
.company-plans-list { display: grid; gap: 12px; padding: 0 22px; }
.company-plans-table { min-width: 900px; }
.company-plans-table td { vertical-align: middle; }
.company-plans-table tr.is-selected { background: #f2f8f6; }
.company-plan-select { padding: 0; border: 0; color: #176b65; background: transparent; font: inherit; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.company-plan-select:hover { text-decoration: underline; }
.company-plan-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #315d57; background: #eaf5f2; font-size: 10px; font-weight: 700; }
.company-plan-editor { display: grid; gap: 14px; padding: 17px; border: 1px solid #dce7e8; border-radius: 10px; background: #fbfcfc; }
.company-plan-editor-heading h3 { margin: 0 0 4px; color: #17384b; font-size: 15px; }
.company-plan-editor-heading p:last-child { margin: 0; color: #738391; font-size: 11px; }
.admin-company-plan-form { display: grid; grid-template-columns: minmax(150px, .5fr) minmax(180px, 1fr); align-items: end; gap: 12px; }
.admin-company-plan-form .form-field { gap: 6px; }
.company-plan-premium-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.company-plan-premium-fields[hidden] { display: none; }
.company-plan-card-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.company-plan-card-actions .button { margin-top: 0; }
.company-plan-empty { margin: 0; padding: 14px; color: #738391; font-size: 11px; }
.bcn-admin-panel > .muted { margin: 0; padding: 0 22px 18px; line-height: 1.6; }
.bcn-sync-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; margin: 0 22px; padding: 18px; border: 1px solid #e4ebef; border-radius: 10px; background: #f8fafb; }
.bcn-sync-controls h3 { margin: 0 0 5px; color: #17384b; font-size: 14px; }
.bcn-sync-controls .muted { margin: 0; font-size: 12px; line-height: 1.5; }
.bcn-sync-status { grid-column: 1 / -1; margin: 0; color: #456174; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.bcn-sync-status.is-error { color: #a13e37; }
.bcn-crawler-controls { display: grid; gap: 10px; margin: 14px 22px 0; padding: 18px; border: 1px solid #e4ebef; border-radius: 10px; background: #f8fafb; }
.bcn-crawler-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bcn-crawler-status { margin: 0; color: #456174; font-size: 13px; line-height: 1.5; }
.bcn-crawler-status.is-error { color: #a13e37; }
.bcn-crawler-help { margin: 0; color: #6c7b8a; font-size: 12px; line-height: 1.55; }
.bcn-csv-controls { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.2fr) minmax(230px, 1.2fr) auto; align-items: end; gap: 12px; margin: 18px 22px 0; padding-top: 18px; border-top: 1px solid #e4ebef; }
.bcn-csv-controls h3 { margin: 0 0 4px; color: #17384b; font-size: 14px; }
.bcn-csv-controls .muted { margin: 0; font-size: 12px; line-height: 1.5; }
.bcn-csv-controls .form-field { gap: 7px; }
.bcn-csv-controls input[type="file"] { max-width: 100%; color: #586e7d; font: 12px 'DM Sans', sans-serif; }
.bcn-derogadas-option { display: flex; align-items: center; gap: 8px; min-height: 40px; color: #586e7d; font-size: 12px; line-height: 1.4; }
.bcn-derogadas-option input { accent-color: #1e6e73; }
.bcn-url-import { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr); align-items: end; gap: 16px; margin: 0 22px 16px; padding: 18px; border: 1px solid #e4ebef; border-radius: 10px; background: #f8fafb; }
.bcn-url-import h3, .catalog-law-tools h3 { margin: 0 0 5px; color: #17384b; font-size: 14px; }
.bcn-url-import .muted, .catalog-law-tools > div > .muted { margin: 0; font-size: 11px; line-height: 1.55; }
.bcn-url-import form { display: grid; gap: 8px; }
.bcn-url-import .form-field { gap: 6px; }
.catalog-law-tools { display: grid; gap: 13px; margin: 18px 22px 0; padding: 18px; border: 1px solid #e4ebef; border-radius: 10px; background: #f8fafb; }
.catalog-law-search { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto; align-items: end; gap: 10px; }
.catalog-law-search .form-field { gap: 6px; }
.catalog-law-list-status { margin: 0; color: #627585; font-size: 11px; line-height: 1.5; }
.catalog-law-result { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 8px; padding: 13px 14px; background: white; }
.catalog-law-result.is-selected { border-color: #7eb8ad; box-shadow: 0 0 0 2px rgba(8, 126, 118, .08); }
.catalog-law-result-heading { width: 100%; min-width: 0; }
.catalog-law-result-heading strong { display: block; max-width: calc(100% - 282px); min-width: 0; color: #354a5c; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.catalog-law-result-heading .button { min-height: 34px; flex: 0 0 auto; }
.catalog-law-result-actions { position: absolute; top: 13px; right: 14px; width: 270px; display: grid; grid-template-columns: 135px 127px; align-items: center; gap: 8px; }
.catalog-law-result-actions .button { width: 100%; padding-right: 8px; padding-left: 8px; white-space: nowrap; }
.catalog-law-result-actions .catalog-law-result-new-tab { text-align: center; white-space: nowrap; }
.catalog-law-result-meta { margin: 0; color: #84919d; font-size: 10px; line-height: 1.55; }
.catalog-law-result-organisms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; color: #526779; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-law-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.catalog-law-badge { width: fit-content; padding: 3px 7px; border: 1px solid #dce5e9; border-radius: 999px; color: #526779; background: #f7f9fa; font-size: 9px; font-weight: 600; line-height: 1.4; }
.catalog-law-badge.catalog-law-state-VIGENTE { color: #176b5d; border-color: #c0dfd6; background: #edf8f4; }
.catalog-law-badge.catalog-law-state-MODIFICADA { color: #7e5b19; border-color: #ead9ae; background: #fff9e9; }
.catalog-law-badge.catalog-law-state-DEROGADA, .catalog-law-badge.catalog-law-state-REEMPLAZADA { color: #8c4943; border-color: #ead0cc; background: #fff4f2; }
.catalog-law-badge.is-pending { color: #825b17; border-color: #ead9ae; background: #fff8e7; }
.catalog-law-badge.is-missing { color: #8c4943; border-color: #ead0cc; background: #fff4f2; }
.catalog-law-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; }
.catalog-law-pagination[hidden] { display: none; }
.catalog-law-pagination span { min-width: 105px; color: #627585; font-size: 11px; text-align: center; }
.catalog-law-pagination .button { min-height: 35px; }
.catalog-organism-pending-tools, .catalog-organism-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.catalog-organism-pending-tools .muted { margin: 0; font-size: 11px; }
.catalog-law-editor { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid #e4ebef; }
.catalog-law-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-law-editor-heading h4 { margin: 0 0 4px; color: var(--navy); font-size: 14px; }
.catalog-law-editor-heading .muted { margin: 0; font-size: 11px; }
.catalog-organism-editor { display: grid; gap: 10px; padding: 14px; border: 1px solid #e2e9ed; border-radius: 8px; background: white; }
.catalog-organism-editor h4 { margin: 0 0 4px; color: var(--navy); font-size: 13px; }
.catalog-organism-editor .muted { margin: 0; font-size: 11px; line-height: 1.5; }
.catalog-organism-review-status.is-pending { color: #8a5a12; }
.catalog-organism-editor .form-field { gap: 6px; }
.catalog-organism-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-left: 10px; border-left: 2px solid #dbe8e5; }
.catalog-organism-suggestion p { flex: 1 1 300px; margin: 0; color: #657585; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-organism-status { margin: 0; color: #526779; font-size: 11px; line-height: 1.5; }
.catalog-organism-status.is-error { color: #a13e37; }
.catalog-article-suggestions { display: grid; gap: 8px; }
.catalog-article-editor { padding: 11px 13px; border: 1px solid #e2e9ed; border-radius: 8px; background: white; }
.catalog-article-editor summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: #354a5c; font-size: 11px; cursor: pointer; }
.catalog-article-editor summary small { color: #738391; font-size: 10px; font-weight: 400; }
.catalog-article-editor .article-text-preview { width: 100%; max-width: none; min-width: 0; margin: 10px 0; -webkit-line-clamp: 4; }
.catalog-article-editor textarea { width: 100%; min-height: 90px; resize: vertical; }
.catalog-suggestion-actions { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.catalog-suggestion-status { color: #647786; font-size: 10px; }
.applicability-rules-content { display: grid; gap: 14px; }
.applicability-rule-form { display: grid; gap: 12px; }
.applicability-rule-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; }
.applicability-rule-fields .form-field, .applicability-law-picker .form-field { gap: 6px; }
.applicability-law-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.applicability-law-search-controls { display: contents; }
.applicability-law-search-controls[hidden] { display: none; }
.applicability-law-picker .manual-law-results, .applicability-selection, .applicability-law-picker > .form-field:last-child { grid-column: 1 / -1; }
.applicability-selection { margin: 0; color: #31546a; font-size: 12px; line-height: 1.5; }
.applicability-rule-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.applicability-rule-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.applicability-rules-list { display: grid; gap: 9px; }
.applicability-rule-card { display: grid; gap: 8px; padding: 13px; border: 1px solid #e2e9ed; border-radius: 8px; background: #fff; }
.applicability-rule-card h4 { margin: 0; color: #294155; font-size: 12px; line-height: 1.5; }
.applicability-rule-card p { margin: 0; color: #586e7d; font-size: 12px; line-height: 1.5; }
.applicability-rule-card small { color: #738391; font-size: 10px; }
.applicability-rule-card > a { width: fit-content; color: #1e6e73; font-size: 11px; }

@media (max-width: 760px) {
    .settings-navigation { gap: 5px; }
    .settings-navigation-item { padding: 0 9px; font-size: 10px; }
    .internal-norm-fields { grid-template-columns: 1fr; }
    .internal-norm-wide-field { grid-column: auto; }
    .internal-norm-actions .button { width: 100%; }
    .internal-attachment-row { align-items: flex-start; flex-direction: column; }
    .company-plans-panel > .muted { padding-right: 16px; padding-left: 16px; }
    .company-plans-list { padding-right: 16px; padding-left: 16px; }
    .admin-company-plan-form, .company-plan-premium-fields { grid-template-columns: 1fr; }
    .company-plan-premium-fields { grid-column: auto; }
    .company-plan-card-actions { grid-column: auto; }
    .company-plan-editor > .button { width: 100%; }
    .bcn-admin-panel > .muted { padding: 0 16px 16px; }
    .bcn-sync-controls { grid-template-columns: 1fr; margin-right: 16px; margin-left: 16px; padding: 15px; }
    .bcn-sync-controls .button { width: 100%; }
    .bcn-sync-status { grid-column: auto; }
    .bcn-crawler-controls { margin-right: 16px; margin-left: 16px; padding: 15px; }
    .bcn-csv-controls { grid-template-columns: 1fr; align-items: stretch; margin-right: 16px; margin-left: 16px; }
    .bcn-csv-controls .button { width: 100%; }
    .bcn-url-import { grid-template-columns: 1fr; margin-right: 16px; margin-left: 16px; padding: 15px; }
    .bcn-url-import .button, .catalog-law-search .button, .catalog-law-editor-heading .button { width: 100%; }
    .catalog-law-tools { margin-right: 16px; margin-left: 16px; padding: 15px; }
    .catalog-law-search { grid-template-columns: 1fr; }
    .catalog-law-result-heading { display: grid; grid-template-columns: minmax(0, 1fr); }
    .catalog-law-result-heading strong { max-width: none; }
    .catalog-law-result-actions { position: static; width: min(270px, 100%); margin: 8px 0 0 auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .catalog-law-result-actions .button { min-width: 0; font-size: 10px; }
    .catalog-law-result-organisms { grid-template-columns: 1fr; }
    .catalog-law-pagination { justify-content: space-between; gap: 6px; }
    .catalog-law-pagination .button { padding: 0 10px; }
    .catalog-law-editor-heading { align-items: stretch; flex-direction: column; }
    .applicability-rule-fields, .applicability-rule-dates, .applicability-law-picker { grid-template-columns: 1fr; }
    .applicability-law-picker .manual-law-results, .applicability-selection, .applicability-law-picker > .form-field:last-child { grid-column: auto; }
    .applicability-rule-actions .button { width: 100%; }
    .article-images { margin-right: 17px; margin-left: 17px; }
    .article-text-preview { width: 290px; min-width: 220px; }
}

.catalog-law-detail-view { display: grid; gap: 16px; }
.catalog-law-detail-view[hidden] { display: none; }
.catalog-law-detail-toolbar { display: flex; justify-content: space-between; gap: 10px; }
.catalog-law-detail-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid #dfe8ec; border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 8px 22px rgba(25,51,67,.06); }
.catalog-law-detail-header .eyebrow, .catalog-law-detail-section-heading .eyebrow { margin: 0 0 5px; }
.catalog-law-detail-header h1 { max-width: 1000px; margin: 0 0 7px; color: var(--navy); font: 700 clamp(20px, 2vw, 28px) 'Manrope', sans-serif; line-height: 1.3; overflow-wrap: anywhere; }
.catalog-law-detail-header .muted { margin: 0 0 10px; font-size: 12px; }
.catalog-law-detail-status { margin: 0; color: #627585; font-size: 12px; }
.catalog-law-detail-navigation { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid #e1e9ed; border-radius: 9px; background: #f7fafb; }
.catalog-law-detail-navigation a { padding: 8px 12px; border-radius: 6px; color: #31546a; font-size: 11px; font-weight: 600; text-decoration: none; }
.catalog-law-detail-navigation a:hover { color: #145d61; background: #e8f4f1; }
.catalog-law-detail-section { display: grid; gap: 14px; padding: 20px; border: 1px solid #e1e9ed; border-radius: 11px; background: #fff; scroll-margin-top: 210px; }
.catalog-law-detail-section h2 { margin: 0; color: var(--navy); font: 700 17px 'Manrope', sans-serif; }
.catalog-law-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.catalog-law-detail-section-heading .muted { margin: 6px 0 0; font-size: 11px; line-height: 1.5; }
.catalog-law-summary-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.catalog-law-summary-fields > div { min-width: 0; padding: 12px; border: 1px solid #e7edef; border-radius: 8px; background: #f8fafb; }
.catalog-law-summary-fields dt { margin-bottom: 5px; color: #7c8a96; font-size: 10px; font-weight: 600; }
.catalog-law-summary-fields dd { margin: 0; color: #354a5c; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-law-source-link, .catalog-law-result-new-tab { color: #1e6e73; font-size: 11px; font-weight: 600; }
.catalog-law-detail-content { gap: 16px; padding: 0; border: 0; }
.catalog-law-detail-content[hidden] { display: none; }
.catalog-law-detail-content > .bcn-sync-status { margin: 0; }
.catalog-law-detail-content .catalog-organism-editor { gap: 12px; padding: 18px; background: #f8fafb; }
.catalog-law-detail-content .catalog-organism-editor > .muted { margin: 0; }
.catalog-law-article-search { max-width: 560px; margin: 0; gap: 6px; }
.catalog-law-article-count { margin: -5px 0 0; font-size: 11px; }
.catalog-law-detail-view .catalog-article-editor { padding: 14px 16px; }
.catalog-law-detail-view .catalog-article-editor summary { font-size: 12px; }

@media (max-width: 760px) {
    .catalog-law-detail-toolbar { flex-direction: column; }
    .catalog-law-detail-toolbar .button { width: 100%; }
    .catalog-law-detail-header { padding: 15px; }
    .catalog-law-detail-navigation a { flex: 1 1 auto; text-align: center; }
    .catalog-law-detail-section { padding: 15px; scroll-margin-top: 185px; }
    .catalog-law-detail-section-heading { align-items: stretch; flex-direction: column; }
    .catalog-law-detail-section-heading .button { width: 100%; }
    .catalog-law-summary-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
    .catalog-law-summary-fields { grid-template-columns: 1fr; }
}
