:root {
    --navy: #0b1746;
    --blue: #245fc2;
    --electric-blue: #315ef4;
    --back-office-title-blue: #335ae4;
    --periwinkle: #82a2e7;
    --pale-blue: #eff4ff;
    --line: #d9dce4;
    --ink: #111a35;
    --muted: #6e7482;
    --danger: #e31b23;
    --amber: #ffb800;
    --green: #39b54a;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #fff;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

button, input { font: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

.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;
}

.login-view {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #fff;
}

.login-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 0;
    background: #fff url("/imagenes/fondologin_csplus_new.jpg") center / 100% 100% no-repeat;
}

.login-card::before,
.login-card::after {
    content: "";
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.login-card::before {
    left: 4.2%;
    top: 13%;
    width: 16%;
    height: 19%;
    background: #fff;
}

.login-card::after {
    right: 3%;
    bottom: 4%;
    width: 7%;
    height: 11%;
    background: #85a5ee;
}

.login-responsive-brand {
    position: absolute;
    z-index: 2;
    left: 11.5%;
    top: 24.5%;
    display: flex;
    width: clamp(135px, 11.5vw, 230px);
    flex-direction: column;
    align-items: center;
    color: var(--navy);
    line-height: 1;
}

.login-responsive-brand img {
    width: 37%;
    height: auto;
    margin-bottom: 6%;
}

.login-responsive-brand strong {
    font-size: clamp(17px, 2.65vw, 42px);
    letter-spacing: -.07em;
}

.login-responsive-brand span {
    margin-top: 2%;
    font-size: clamp(7px, .8vw, 12px);
    letter-spacing: .01em;
}

.login-responsive-mark {
    position: absolute;
    z-index: 2;
    right: 4.2%;
    bottom: 5%;
    display: block;
    width: clamp(34px, 3.8vw, 76px);
    height: auto;
    filter: brightness(0) invert(1);
}

.login-form {
    position: absolute;
    z-index: 3;
    left: 11.5%;
    top: 51.5%;
    width: clamp(135px, 11.5vw, 230px);
    display: grid;
    gap: 8px;
    transform: translateY(-30%);
    text-align: center;
}

.login-form label {
    order: 2;
    color: #747781;
    font-size: clamp(12px, 1vw, 16px);
}

.login-form input {
    order: 1;
    width: 100%;
    height: 38px;
    padding: 4px 8px;
    border: 0;
    border-bottom: 1px solid #777b85;
    outline: 0;
    text-align: center;
    color: var(--ink);
    background: transparent;
}

.login-form input:focus { border-bottom: 2px solid var(--electric-blue); }

.code-group {
    order: 3;
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.code-group label { order: 2; }
.code-group input { order: 1; }

.primary-button {
    order: 4;
    justify-self: center;
    min-height: 30px;
    margin-top: 18px;
    padding: 5px 10px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    background: var(--electric-blue);
    font-size: clamp(11px, .95vw, 14px);
    box-shadow: 0 2px 5px rgb(24 60 145 / 22%);
}

.primary-button:hover { background: #244bd5; }
.primary-button:focus-visible, .menu-button:focus-visible, .search-button:focus-visible,
.matrix-button:focus-visible, .user-menu button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.primary-button:disabled { cursor: wait; opacity: .7; }

.login-image-button {
    order: 4;
    justify-self: center;
    width: min(100%, 146px);
    margin-top: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 0;
}

.login-image-button img {
    display: block;
    width: 100%;
    height: auto;
}

.login-image-button:hover { filter: brightness(.96); }
.login-image-button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

.login-actions {
    order: 4;
    display: grid;
    justify-items: center;
    gap: 7px;
    margin-top: 8px;
}

.login-actions .login-image-button { margin-top: 0; }

.form-message {
    order: 5;
    min-height: 34px;
    margin: 4px -30px 0;
    color: #555d70;
    font-size: 12px;
    line-height: 1.35;
}
.form-message.error { color: #a30e0e; }

.code-form {
    top: 47.5%;
    gap: 12px;
    transform: none;
}

.code-instruction {
    margin: 0;
    color: #747781;
    font-size: clamp(11px, .8vw, 14px);
    line-height: 1.2;
    text-align: left;
}

.code-instruction span {
    display: block;
    margin-top: 4px;
    font-size: .85em;
}

.code-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
}

.code-inputs .code-digit {
    width: 100%;
    height: clamp(30px, 2.5vw, 48px);
    padding: 0;
    border: 0;
    border-radius: 0;
    text-align: center;
    color: var(--navy);
    background: #edf2ff;
    caret-color: var(--electric-blue);
}

.code-inputs .code-digit:focus {
    outline: 2px solid var(--electric-blue);
    outline-offset: 1px;
}

.change-user {
    order: 6;
    color: #656d7e;
    font-size: 11px;
    text-decoration: none;
}

.change-user:hover { text-decoration: underline; }

.app-view { position: relative; min-height: 100vh; padding-bottom: 70px; background: #fff; }

.site-header {
    position: relative;
    width: 100%;
    aspect-ratio: 7.5 / 1;
    min-height: 92px;
    max-height: 230px;
    background: url("/imagenes/bannersuperior_csplus_new.jpg") center / 100% 100% no-repeat;
}

.header-home-link {
    position: absolute;
    z-index: 1;
    top: 25%;
    left: 3.5%;
    width: 14.5%;
    height: 36%;
    border-radius: 4px;
}
.header-home-link:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.selected-country {
    position: absolute;
    top: calc(26% + 21px);
    right: calc(clamp(18px, 3vw, 52px) + 56px);
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: min(220px, 36vw);
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid rgb(255 255 255 / 42%);
    border-radius: 18px;
    color: #fff;
    background: rgb(11 23 70 / 48%);
    box-shadow: 0 2px 8px rgb(6 19 61 / 14%);
    font-size: 13px;
    line-height: 1;
    transform: translateY(-50%);
}
.selected-country svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}
.selected-country strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.selected-country-label { opacity: .8; }

.menu-button {
    position: absolute;
    top: 26%;
    right: clamp(18px, 3vw, 52px);
    display: grid;
    gap: 6px;
    width: 44px;
    height: 42px;
    place-content: center;
    border: 0;
    background: transparent;
}
.menu-button span:not(.sr-only) { display: block; width: 27px; height: 2px; background: #fff; }
.menu-button span:not(.sr-only) { transition: transform .18s ease, opacity .18s ease; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.home-view .menu-button { right: clamp(72px, 6.5vw, 108px); }
.home-view .selected-country { right: calc(clamp(72px, 6.5vw, 108px) + 56px); }
.home-header-logout {
    position: absolute;
    top: 26%;
    right: clamp(18px, 3vw, 52px);
    margin: 0;
}
.home-header-logout button {
    display: grid;
    width: 44px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    color: #fff;
    background: transparent;
}
.home-header-logout svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-header-logout button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

.home-section {
    width: min(82%, 1120px);
    margin: 4px auto 90px;
}
.home-section > h1 {
    margin: 0 0 12px 46px;
    color: #3770e8;
    font-size: clamp(22px, 2vw, 29px);
    font-weight: 700;
    line-height: 1.2;
}
.home-panel {
    padding: clamp(34px, 4vw, 54px) clamp(32px, 5vw, 64px);
    border-radius: 11px;
    background: #fafafa;
    box-shadow: 0 8px 24px rgb(11 23 70 / 7%);
}
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 250px));
    justify-content: space-between;
    gap: 42px;
}
.home-card {
    display: flex;
    min-height: 250px;
    padding: 18px 18px 15px;
    flex-direction: column;
    border-radius: 0 34px 0 34px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 5px 15px rgb(11 23 70 / 4%);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgb(11 23 70 / 11%);
}
.home-card:focus-visible { outline: 3px solid #ffbf47; outline-offset: 4px; }
.home-card-icon {
    display: grid;
    width: 51px;
    height: 51px;
    margin-bottom: 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #4675ec;
}
.home-card-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-card-consultations .home-card-icon { background: var(--navy); }
.home-card-matrix .home-card-icon { background: #35a4e1; }
.home-card > strong {
    margin-bottom: 12px;
    color: #4675ec;
    font-size: 17px;
    line-height: 1.2;
}
.home-card-consultations > strong { color: var(--navy); }
.home-card-matrix > strong { color: #35a4e1; }
.home-card-description {
    color: #545a68;
    font-size: 15px;
    line-height: 1.25;
}
.home-card-action {
    margin-top: auto;
    align-self: flex-end;
    color: #c45bd5;
    font-size: 13px;
    font-weight: 700;
}
.home-card-action span { font-size: 24px; font-weight: 400; vertical-align: -2px; }
.home-view .brand-mark { position: absolute; }

.user-menu {
    position: absolute;
    z-index: 5;
    top: 55%;
    right: clamp(18px, 3vw, 52px);
    display: grid;
    min-width: 210px;
    padding: 18px 14px;
    background: var(--navy);
    box-shadow: 0 8px 22px rgb(6 19 61 / 24%);
}
.user-menu form { margin: 0; }
.user-menu .portal-country-form {
    display: grid;
    gap: 6px;
    margin: 0 0 8px;
    padding: 2px 13px 12px;
    border-bottom: 1px solid rgb(255 255 255 / 20%);
}
.portal-country-form label { color: var(--periwinkle); font-size: 11px; }
.portal-country-form select {
    width: 100%;
    min-height: 34px;
    padding: 6px 28px 6px 9px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 3px;
    color: var(--navy);
    background: #fff;
    font-size: 12px;
}
.portal-country-form select:focus-visible { outline: 2px solid var(--periwinkle); outline-offset: 2px; }
.user-menu a, .user-menu button {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
}
.user-menu a::before, .user-menu button::before { content: "›"; margin-right: 9px; color: var(--periwinkle); }
.user-menu a:hover, .user-menu button:hover { background: rgb(255 255 255 / 9%); }

.search-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px clamp(18px, 4vw, 70px);
    background: var(--pale-blue);
}

.search-form { display: flex; width: min(46vw, 540px); height: 36px; }
.search-form input {
    flex: 1;
    min-width: 0;
    padding: 7px 14px;
    border: 1px solid #d8ddeb;
    border-right: 0;
    color: var(--ink);
    background: #fff;
    outline: 0;
}
.search-form input:focus { border-color: var(--electric-blue); }
.search-form input::placeholder { color: #a2a8b4; }

.search-button {
    width: 38px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--electric-blue);
}
.search-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.matrix-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 24px;
    margin-right: clamp(4px, 1vw, 12px);
    border: 0;
    border-radius: 0 20px 20px 0;
    color: #fff;
    background: var(--electric-blue);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.projects-section { width: min(92%, 690px); margin: clamp(25px, 4vw, 60px) auto; }
.list-status { margin: 40px 0; text-align: center; color: var(--muted); }
.list-status.error { color: #a30e0e; }
.project-list { margin: 0; padding: 0; list-style: none; }

.project-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 13px;
    min-height: 108px;
    padding: 20px 8px 22px;
    border-bottom: 1px solid var(--line);
}
.project-item:first-child { border-top: 1px solid transparent; }
.project-item > a, .project-static {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    color: inherit;
    text-align: left;
    text-decoration: none;
}
.project-item > a:focus-visible .project-copy { outline: 3px solid #ffbf47; outline-offset: 4px; }
.importance-marker {
    width: 0;
    height: 0;
    margin-top: 25px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 11px solid var(--amber);
}
.importance-marker.red { border-left-color: var(--danger); }
.importance-marker.green { border-left-color: var(--green); }
.project-copy { min-width: 0; }
.new-label {
    display: inline-block;
    margin-bottom: 3px;
    padding: 1px 5px;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(90deg, #823fff, #506ae7);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}
.new-label[hidden] { display: none; }
.project-number { display: block; color: #080e22; font-size: 18px; font-weight: 700; }
.project-title { display: block; margin: 3px 0 0; color: #111522; font-size: 15px; line-height: 1.35; }

.update-back-bar {
    width: min(92%, 980px);
    margin: 20px auto 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.update-detail-page {
    width: min(92%, 900px);
    margin: 34px auto 90px;
}

.update-detail-heading {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.update-importance {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    margin-top: 6px;
    border-top: 23px solid transparent;
    border-bottom: 23px solid transparent;
    border-left: 31px solid var(--amber);
}
.update-importance.red { border-left-color: var(--danger); }
.update-importance.green { border-left-color: var(--green); }
.update-detail-heading strong { display: block; color: var(--navy); font-size: 23px; }
.update-detail-heading h1 { margin: 5px 0 0; color: #111; font-size: 27px; line-height: 1.25; font-weight: 500; }
.update-date { margin: 25px 0 0 49px; color: var(--muted); font-size: 13px; }
.update-detail-text {
    margin-top: 28px;
    color: #111;
    font-size: 17px;
    line-height: 1.55;
    text-align: justify;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.update-structured-details {
    margin: 30px 0 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
}
.update-structured-details > div {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 26px;
    padding: 9px 0;
}
.update-structured-details dt {
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}
.update-structured-details dd {
    min-width: 0;
    margin: 0;
    color: #111;
    font-size: 16px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.update-project-action {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(100%, 732px);
    margin-top: 34px;
}
.update-project-link {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 11px 18px;
    border-radius: 22px;
    color: #fff;
    background: var(--periwinkle);
    text-align: center;
    text-decoration: none;
}
.update-project-link:hover { filter: brightness(.94); }
.update-project-link:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }

.brand-mark {
    position: fixed;
    right: 28px;
    bottom: 20px;
    display: flex;
    width: 75px;
    height: 102px;
    align-items: center;
    justify-content: center;
}
.brand-mark img { display: block; width: 139px; max-width: none; height: auto; }

.matrix-dialog { width: min(92vw, 760px); max-height: 80vh; padding: 0; border: 0; border-radius: 10px; box-shadow: 0 20px 60px rgb(4 14 48 / 30%); }
.matrix-dialog::backdrop { background: rgb(4 14 48 / 55%); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; color: #fff; background: var(--navy); }
.dialog-heading h2 { margin: 0; font-size: 20px; }
.dialog-heading button { border: 0; color: #fff; background: transparent; font-size: 26px; }
.matrix-content { max-height: 65vh; overflow: auto; padding: 20px; }
.matrix-category { margin: 0 0 14px; padding: 12px; border-left: 4px solid var(--electric-blue); background: var(--pale-blue); }

.policy-dialog {
    width: min(92vw, 480px);
    height: min(92vh, 900px);
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgb(4 14 48 / 30%);
}
.policy-dialog::backdrop { background: rgb(4 14 48 / 60%); }
.policy-dialog iframe { display: block; width: 100%; height: calc(100% - 58px); border: 0; background: #fff; }
.policy-dialog-actions { display: flex; box-sizing: border-box; height: 58px; align-items: center; justify-content: flex-end; padding: 10px 16px; background: #fff; }
.policy-dialog .dialog-close { padding: 9px 6px; border: 0; color: #005aea; background: transparent; font-weight: 700; cursor: pointer; }
.policy-dialog .dialog-close:hover { color: #004bc4; text-decoration: underline; }
.policy-dialog .dialog-close:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

.matrix-toolbar { justify-content: space-between; }
.back-link { color: var(--electric-blue); font-weight: 700; text-decoration: none; }
.matrix-toolbar-actions {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.matrix-download-button {
    display: inline-flex;
    min-height: 36px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    border-radius: 18px;
    color: #fff;
    background: var(--electric-blue);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.matrix-download-button:hover { background: #244bd5; }
.matrix-download-button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.matrix-page { width: min(92%, 1050px); margin: 35px auto 70px; }
.matrix-page > h1,
.projects-section > h1,
.consultation-list-page > h1,
.reports-page > h1,
.consultation-detail-toolbar h1 {
    color: var(--back-office-title-blue);
    font-size: clamp(30px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}
.matrix-page > h1 { margin: 0 0 24px; }
.matrix-page h2 { margin: 30px 0 0; padding: 10px 12px; color: #fff; background: #005aea; font-size: 17px; text-align: center; }
.matrix-row { display: block; padding: 18px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.matrix-row:hover { background: var(--pale-blue); }
.matrix-row strong { color: #005aea; }
.matrix-row p { margin: 5px 0 0; color: var(--ink); line-height: 1.35; }

.matrix-detail-page { width: min(92%, 1050px); margin: 28px auto 70px; }
.matrix-detail-back { display: inline-block; margin-bottom: 22px; }
.matrix-detail-heading { padding: 24px 28px; background: #dee7fb; }
.matrix-detail-heading strong { color: #005aea; font-size: 22px; }
.matrix-detail-heading h1 { margin: 12px 0 0; color: var(--ink); font-size: clamp(22px, 3vw, 34px); line-height: 1.2; }
.matrix-detail-facts { margin: 0; }
.matrix-detail-facts div { display: grid; grid-template-columns: minmax(180px, 28%) 1fr; gap: 22px; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.matrix-detail-facts dt { color: #005aea; font-weight: 700; text-transform: uppercase; }
.matrix-detail-facts dd { margin: 0; white-space: pre-wrap; }
.matrix-detail-sections article { margin-top: 18px; }
.matrix-detail-sections h2 { margin: 0; padding: 13px 20px; color: #005aea; background: #dee7fb; font-size: 20px; text-align: center; text-transform: uppercase; }
.matrix-detail-sections p { margin: 0; padding: 22px 28px; color: var(--ink); line-height: 1.55; white-space: pre-wrap; }

.consultation-toolbar { justify-content: center; }
.consultation-section-title { font-size: 17px; }
.consultation-list-page, .consultation-detail-page { width: min(92%, 1180px); margin: 30px auto 80px; }
.projects-section > h1, .consultation-list-page > h1 { margin: 0 0 24px; }
.consultation-table-wrap { max-height: 62vh; overflow: auto; }
.consultation-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.consultation-table th { padding: 10px 14px; border-bottom: 1px solid #aeb4c2; font-weight: 500; text-align: center; }
.consultation-table th:first-child { width: 43%; }
.consultation-table th:nth-child(2) { width: 16%; }
.consultation-table th:nth-child(3) { width: 31%; }
.consultation-table th:last-child { width: 10%; }
.consultation-table td { padding: 15px 16px; color: var(--ink); text-align: center; overflow-wrap: anywhere; }
.consultation-table td:first-child { text-align: left; }
.consultation-table td:first-child strong, .consultation-table td:first-child span { display: block; }
.consultation-table tbody tr:nth-child(even) { background: var(--pale-blue); }
.consultation-open { display: grid; width: 34px; height: 34px; margin: auto; place-items: center; border-radius: 50%; color: #fff; background: var(--electric-blue); font-size: 10px; text-decoration: none; }

.consultation-detail-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; border-bottom: 1px solid #aeb4c2; }
.consultation-detail-toolbar h1 { margin: 0; }
.consultation-download { justify-self: end; padding: 0; border: 0; background: transparent; }
.consultation-download img { display: block; width: 140px; height: auto; }
.consultation-detail-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(190px, .95fr); gap: 20px; align-items: start; }
.consultation-main-column { min-width: 0; }
.consultation-summary { padding: 18px 0; }
.consultation-identity { display: flex; gap: 12px; }
.consultation-document { position: relative; flex: 0 0 27px; width: 27px; height: 35px; border: 3px solid #7659db; }
.consultation-document::after { content: ""; position: absolute; right: -3px; top: -3px; border: 7px solid #fff; border-left-color: #7659db; border-bottom-color: #7659db; }
.consultation-identity strong { color: var(--electric-blue); font-size: 15px; }
.consultation-identity h2 { margin: 3px 0 7px; font-size: 27px; line-height: 1.25; font-weight: 500; }
.consultation-project-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #c4c6cc; }
.consultation-project-meta > div { display: flex; min-width: 0; flex-direction: column; gap: 5px; font-size: 11px; line-height: 1.4; }
.consultation-project-meta b { color: var(--electric-blue); }
.consultation-project-meta span { overflow-wrap: anywhere; }
.consultation-meta-state { color: var(--electric-blue); font-weight: 500; text-transform: uppercase; }
.consultation-history { width: auto; margin-top: 18px; box-sizing: border-box; padding: 2px 14px 16px; background: var(--pale-blue); }
.consultation-history h3, .consultation-panels h3, .consultation-movement h3, .consultation-updates > h3 { margin: 8px 0 12px; text-align: center; font-size: 12px; font-weight: 500; }
.consultation-history > p { font-size: 11px; text-align: center; color: var(--muted); }
.consultation-files { margin: 0 -8px 16px; padding: 8px 8px 14px; border-bottom: 1px solid #cbd4eb; }
.consultation-file-list { display: grid; gap: 8px; }
.consultation-file, .consultation-other-files summary {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 34px;
    box-sizing: border-box;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    text-decoration: none;
}
.consultation-file-base { background: #85a5ef; }
.consultation-file-updated { background: #ae9fe9; }
.consultation-file span:first-child, .consultation-other-files summary span:first-child { font-size: 18px; text-align: center; }
.consultation-file span:last-child, .consultation-other-files summary span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consultation-file:hover { filter: brightness(.94); }
.consultation-file:focus-visible, .consultation-other-files summary:focus-visible, .consultation-other-files a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.consultation-other-files summary { background: #b2b5c1; cursor: pointer; list-style: none; }
.consultation-other-files summary::-webkit-details-marker { display: none; }
.consultation-other-files > div { display: grid; gap: 5px; max-height: 150px; overflow-y: auto; padding: 7px 4px 0; }
.consultation-other-files a { overflow: hidden; padding: 5px 7px; color: var(--electric-blue); background: #fff; font-size: 10px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.consultation-other-files a:hover { text-decoration: underline; }
.consultation-timeline-item { position: relative; display: flex; min-height: 56px; padding-left: 24px; flex-direction: column; font-size: 10px; }
.consultation-timeline-item::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 2px dashed var(--navy);
    border-radius: 50%;
    background: var(--pale-blue);
}
.consultation-timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 11px;
    bottom: -11px;
    width: 2px;
    background: repeating-linear-gradient(to bottom, var(--electric-blue) 0 5px, transparent 5px 10px);
}
.consultation-timeline-item.is-current::before {
    background:
            radial-gradient(
                    circle,
                    var(--navy) 0 4px,
                    transparent 4px
            ),
            var(--pale-blue);
}
.consultation-timeline-item strong { color: var(--electric-blue); font-weight: 500; text-transform: uppercase; }
.consultation-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; padding: 10px; border-radius: 5px; background: var(--pale-blue); }
.consultation-panels > div { min-height: 150px; padding: 9px 12px; background: #fff; }
.consultation-panels p, .consultation-movement p, .consultation-updates article p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; text-align: justify; }
.consultation-panels .consultation-content { grid-column: 1 / -1; min-height: 115px; }
.consultation-movement, .consultation-updates { width: 100%; margin-top: 24px; }
.consultation-movement { padding-top: 8px; border-top: 1px solid #c4c6cc; }
.consultation-movement span, .consultation-updates article span { color: var(--electric-blue); font-size: 10px; }
.consultation-updates > h3 { padding-bottom: 8px; border-bottom: 1px solid #aeb4c2; color: var(--electric-blue); }
.consultation-updates article { padding: 13px 0; border-bottom: 1px solid #e2e3e6; }

.reports-page { width: min(92%, 820px); margin: 38px auto 90px; }
.reports-page > h1 {
    margin: 0 0 28px;
}
.reports-form {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--pale-blue);
    box-shadow: 0 8px 24px rgb(11 23 70 / 8%);
    text-align: center;
}
.reports-form h2 { margin: 0 0 24px; color: var(--navy); font-size: 21px; }
.reports-date-fields { display: flex; justify-content: center; gap: 18px; }
.reports-date-fields label {
    display: grid;
    min-width: 210px;
    gap: 7px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}
.reports-date-fields input {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #bcc7df;
    border-radius: 4px;
    color: var(--ink);
    background: #fff;
}
.reports-date-fields input:focus { outline: 3px solid rgb(49 94 244 / 22%); border-color: var(--electric-blue); }
.reports-download-button {
    margin-top: 25px;
    padding: 11px 24px;
    border: 0;
    border-radius: 22px;
    color: #fff;
    background: var(--electric-blue);
    font-weight: 700;
}
.reports-download-button:hover { background: #244bd5; }
.reports-download-button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

@media (max-width: 900px) {
    .home-section { width: min(90%, 760px); }
    .home-cards { justify-content: center; }
    .consultation-detail-body { grid-template-columns: 1fr; }
    .consultation-project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .consultation-history { position: static; width: auto; margin-top: 0; grid-column: 1 / -1; }
    .consultation-panels, .consultation-movement, .consultation-updates { width: 100%; }
}

@media (max-width: 680px) {
    .login-responsive-brand { left: 8%; width: 38%; }
    .login-form { left: 8%; top: 48%; width: 38%; transform: none; }
    .code-form { top: 43%; width: 48%; }
    .form-message { margin-inline: -8px; }
    .site-header {
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: 7.5 / 1;
        background-size: 100% 100%;
        background-position: center;
    }
    .menu-button { top: 50%; right: 10px; transform: translateY(-50%); }
    .home-view .menu-button { right: 55px; }
    .selected-country {
        top: 50%;
        right: 56px;
        max-width: 34vw;
        min-height: 28px;
        padding: 4px 9px;
        transform: translateY(-50%);
        border-radius: 15px;
        font-size: 11px;
    }
    .selected-country svg { width: 15px; height: 15px; }
    .selected-country-label { display: none; }
    .home-view .selected-country { right: 101px; }
    .home-header-logout { top: 50%; right: 9px; transform: translateY(-50%); }
    .home-header-logout button { width: 38px; height: 36px; }
    .home-header-logout svg { width: 26px; height: 26px; }
    .home-section { width: calc(100% - 32px); margin-top: 20px; }
    .home-section > h1 { margin-left: 8px; font-size: 23px; }
    .home-panel { padding: 26px 20px; }
    .home-cards { grid-template-columns: minmax(0, 320px); gap: 20px; }
    .home-card { min-height: 220px; }
    .search-strip { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; }
    .search-form { width: auto; flex: 1; }
    .search-strip.matrix-toolbar { flex-wrap: wrap; }
    .matrix-toolbar-actions { flex: 1 0 100%; order: 2; gap: 8px; }
    .matrix-toolbar .search-form { flex: 1; }
    .matrix-download-button { padding-inline: 13px; font-size: 12px; }
    .matrix-button { padding-inline: 12px; margin-right: 2px; font-size: 12px; }
    .matrix-detail-page { width: 100%; margin-top: 16px; }
    .matrix-detail-back { margin-left: 16px; }
    .matrix-detail-heading { padding: 20px 16px; }
    .matrix-detail-heading strong { font-size: 19px; }
    .matrix-detail-facts div { grid-template-columns: 1fr; gap: 6px; padding-inline: 16px; }
    .matrix-detail-sections h2 { font-size: 17px; }
    .matrix-detail-sections p { padding: 18px 16px; }
    .projects-section { width: calc(100% - 34px); margin-top: 18px; }
    .project-item { min-height: 96px; padding-block: 17px; }
    .project-number { font-size: 16px; }
    .project-title { font-size: 14px; }
    .update-back-bar { width: calc(100% - 28px); margin-top: 14px; }
    .update-detail-page { width: calc(100% - 34px); margin-top: 26px; }
    .update-detail-heading { gap: 13px; }
    .update-importance { margin-top: 5px; border-top-width: 18px; border-bottom-width: 18px; border-left-width: 24px; }
    .update-detail-heading strong { font-size: 20px; }
    .update-detail-heading h1, .consultation-identity h2 { font-size: 23px; }
    .update-date { margin-left: 37px; }
    .update-detail-text { font-size: 16px; line-height: 1.48; text-align: left; }
    .update-structured-details { margin-top: 24px; padding-top: 18px; }
    .update-structured-details > div { grid-template-columns: 1fr; gap: 4px; padding: 9px 0; }
    .update-structured-details dt, .update-structured-details dd { font-size: 15px; }
    .update-project-link { width: 100%; }
    .brand-mark {
        position: fixed;
        z-index: 4;
        right: max(14px, env(safe-area-inset-right));
        bottom: max(13px, env(safe-area-inset-bottom));
        width: 55px;
        height: 75px;
        pointer-events: none;
        filter: drop-shadow(0 2px 4px rgb(11 23 70 / 18%));
    }
    .brand-mark img { width: 102px; }
    .user-menu { top: 54px; right: 10px; min-width: 190px; }
    .consultation-toolbar { align-items: stretch; flex-direction: column; }
    .consultation-toolbar .search-form { width: 100%; }
    .consultation-table { min-width: 690px; }
    .consultation-list-page, .consultation-detail-page { width: calc(100% - 28px); margin-top: 18px; }
    .consultation-project-meta { grid-template-columns: 1fr; gap: 10px; }
    .consultation-panels { grid-template-columns: 1fr; }
    .consultation-panels .consultation-content { grid-column: auto; }
    .consultation-download img { width: 108px; }
    .reports-page { width: calc(100% - 28px); margin-top: 22px; }
    .reports-form { padding: 24px 18px; }
    .reports-date-fields { flex-direction: column; gap: 14px; }
    .reports-date-fields label { min-width: 0; }
}

@media (max-width: 360px) {
    .menu-button { width: 36px; height: 34px; }
    .menu-button span:not(.sr-only) { width: 23px; }
}

@page { size: A4; margin: 7mm; }

.consultation-print-banner { display: none; }

@media print {
    .site-header, .search-strip, .brand-mark, .consultation-detail-toolbar .back-link,
    .consultation-download { display: none !important; }
    .consultation-print-banner {
        display: block !important;
        width: 100%;
        height: auto;
        margin: 0 0 3mm;
    }
    .app-view { min-height: 0; padding: 0; }
    .consultation-detail-page { width: 100%; margin: 0; }
    .consultation-detail-toolbar { display: block; min-height: 0; padding-bottom: 7px; text-align: center; }
    .consultation-detail-body { position: relative; display: block; }
    .consultation-main-column { width: calc(76% - 6px); }
    .consultation-project-meta { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
    .consultation-history { position: absolute; top: 18px; right: 0; width: 23%; margin-top: 0; }
    .consultation-panels { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; background: transparent; }
    .consultation-panels > div { min-height: 0; border: 1px solid #dfe5f5; }
    .consultation-other-files > div { display: grid !important; max-height: none; overflow: visible; }
    .consultation-movement, .consultation-updates { width: 100%; }
    .consultation-summary, .consultation-timeline-item, .consultation-movement, .consultation-updates article { break-inside: avoid; }
}

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