/* Tsunami Tech policy watch: concise change, impact and action feed. */

.policy-screen > * {
    max-width: 1120px;
    margin-right: auto;
    margin-left: auto;
}

.policy-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.policy-heading h1 {
    margin: 0;
    color: #172027;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: 0;
}

.policy-heading p:last-child {
    margin: 6px 0 0;
    color: #68757B;
    font-size: 13px;
}

.policy-count-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #748087;
    white-space: nowrap;
    font-size: 11px;
}

.policy-count-wrap strong {
    color: #0D7377;
    font-size: 30px;
    font-weight: 750;
    line-height: 1;
}

.policy-priority-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 13px;
    border: 1px solid #DCE3E6;
    background: #FFFFFF;
}

.policy-priority-legend p {
    margin: 0 0 0 auto;
    color: #748087;
    font-size: 11px;
}

.policy-priority,
.policy-status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
}

.policy-priority.immediate {
    color: #922F2A;
    background: #FBEDEC;
}

.policy-priority.review {
    color: #775514;
    background: #FFF2D3;
}

.policy-priority.monitor {
    color: #496169;
    background: #EDF2F3;
}

.policy-status.effective {
    color: #176447;
    background: #EAF6F0;
}

.policy-status.implementation {
    color: #145A7A;
    background: #EAF4F8;
}

.policy-status.policy_direction {
    color: #6A4B82;
    background: #F3EDF7;
}

.policy-status.market_signal {
    color: #5D6268;
    background: #F0F1F2;
}

.policy-status.consultation {
    color: #82551A;
    background: #FFF2DC;
}

.policy-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 14px;
}

.policy-searchbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
}

.policy-searchbar input {
    min-width: 0;
    height: 42px;
    padding: 0 13px;
    border: 1px solid #C8D2D6;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    color: #26343A;
    background: #FFFFFF;
    font: inherit;
    font-size: 13px;
}

.policy-searchbar input:focus {
    z-index: 1;
    border-color: #0D7377;
    outline: 2px solid rgba(13, 115, 119, 0.12);
}

.policy-searchbar button {
    border: 0;
    border-radius: 0 6px 6px 0;
    color: #FFFFFF;
    background: #0D7377;
    font-size: 12px;
    font-weight: 700;
}

.policy-year-control {
    display: grid;
    grid-template-columns: repeat(2, 66px);
    height: 42px;
    border: 1px solid #C8D2D6;
    border-radius: 6px;
    background: #FFFFFF;
    overflow: hidden;
}

.policy-year-control button {
    border: 0;
    border-left: 1px solid #E0E5E7;
    color: #68757B;
    background: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
}

.policy-year-control button:first-child {
    border-left: 0;
}

.policy-year-control button.active {
    color: #FFFFFF;
    background: #0D7377;
}

.policy-category-strip {
    display: flex;
    gap: 7px;
    margin-top: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.policy-category-strip button {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid #CFD8DB;
    border-radius: 5px;
    color: #536168;
    background: #FFFFFF;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 650;
}

.policy-category-strip button.active {
    border-color: #0D7377;
    color: #0D7377;
    background: #EAF7F7;
}

.policy-results {
    margin-top: 14px;
    border-top: 1px solid #D8E0E3;
    border-bottom: 1px solid #D8E0E3;
    background: #FFFFFF;
}

.policy-list-row + .policy-list-row {
    border-top: 1px solid #E5E9EB;
}

.policy-open {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 116px;
    gap: 18px;
    width: 100%;
    padding: 18px 16px;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
}

.policy-open:hover,
.policy-open:focus-visible {
    background: #F7FAFA;
}

.policy-date {
    display: flex;
    flex-direction: column;
    padding-top: 2px;
    color: #738087;
    font-size: 10px;
    line-height: 1.3;
}

.policy-date b {
    color: #26343A;
    font-size: 17px;
    font-weight: 700;
}

.policy-row-main {
    min-width: 0;
}

.policy-row-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.policy-category-label {
    color: #718087;
    font-size: 10px;
    font-weight: 700;
}

.policy-row-main h2 {
    margin: 7px 0 5px;
    color: #202C32;
    font-size: 15px;
    line-height: 1.42;
    letter-spacing: 0;
}

.policy-row-main p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #58666D;
    font-size: 12px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.policy-audience {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
}

.policy-audience span {
    padding: 2px 6px;
    border: 1px solid #DCE3E5;
    border-radius: 3px;
    color: #66747A;
    background: #FAFBFB;
    font-size: 9px;
}

.policy-row-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #0D7377;
    font-size: 11px;
    font-weight: 700;
}

.policy-row-action b {
    font-size: 22px;
    font-weight: 400;
}

.policy-empty {
    padding: 52px 20px;
    color: #718087;
    text-align: center;
    font-size: 13px;
}

body.policy-reader-open {
    overflow: hidden;
}

.policy-reader[hidden] {
    display: none;
}

.policy-reader {
    position: fixed;
    z-index: 1250;
    inset: 0;
}

.policy-reader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 32, 38, 0.48);
}

.policy-reader-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(720px, 92vw);
    height: 100%;
    background: #FFFFFF;
    box-shadow: -12px 0 36px rgba(20, 35, 42, 0.18);
}

.policy-reader-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 28px 21px;
    border-bottom: 1px solid #E2E7E9;
}

.policy-reader-header > div {
    min-width: 0;
}

.policy-reader-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.policy-reader-header h2 {
    margin: 0;
    color: #1B272D;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: 0;
}

.policy-reader-header p {
    margin: 7px 0 0;
    color: #7A878D;
    font-size: 10px;
    line-height: 1.45;
}

.policy-reader-body {
    flex: 1;
    min-height: 0;
    padding: 24px 28px 40px;
    overflow-y: auto;
}

.policy-reader-lead {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-left: 4px solid #0D7377;
    color: #263940;
    background: #F0F8F8;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.65;
}

.policy-detail-section {
    padding: 19px 0;
    border-top: 1px solid #E6EAEC;
}

.policy-detail-section h3 {
    margin: 0 0 8px;
    color: #26343A;
    font-size: 13px;
    letter-spacing: 0;
}

.policy-detail-section p,
.policy-detail-section li {
    color: #4F5E65;
    font-size: 12px;
    line-height: 1.7;
}

.policy-detail-section ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.policy-detail-audience {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.policy-detail-audience span {
    padding: 5px 8px;
    border: 1px solid #D9E1E4;
    border-radius: 4px;
    color: #4E5D64;
    background: #FAFBFB;
    font-size: 11px;
}

.policy-reader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 20px;
    border-top: 1px solid #E6EAEC;
}

.policy-reader-actions button,
.policy-reader-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #BFCBCD;
    border-radius: 5px;
    color: #3E5158;
    background: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.policy-reader-actions .policy-evaluate {
    border-color: #0D7377;
    color: #FFFFFF;
    background: #0D7377;
}

.policy-source-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 18px;
    padding: 1px;
    background: #E1E6E8;
}

.policy-source-meta div {
    min-width: 0;
    padding: 9px;
    background: #F8FAFA;
}

.policy-source-meta dt {
    color: #7A878D;
    font-size: 9px;
    font-weight: 700;
}

.policy-source-meta dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: #344249;
    font-size: 10px;
    line-height: 1.45;
}

.policy-legal-note {
    margin: 16px 0 0;
    color: #7A878D;
    font-size: 10px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .policy-heading {
        align-items: flex-start;
    }

    .policy-heading h1 {
        font-size: 21px;
    }

    .policy-priority-legend p {
        width: 100%;
        margin-left: 0;
    }

    .policy-toolbar {
        grid-template-columns: 1fr;
    }

    .policy-year-control {
        width: 132px;
    }

    .policy-open {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
        padding: 15px 12px;
    }

    .policy-date b {
        white-space: nowrap;
        font-size: 15px;
    }

    .policy-date span {
        display: none;
    }

    .policy-row-action {
        display: none;
    }

    .policy-reader-panel {
        width: 100%;
    }

    .policy-reader-header,
    .policy-reader-body {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 480px) {
    .policy-heading p:last-child,
    .policy-count-wrap span {
        display: none;
    }

    .policy-count-wrap strong {
        font-size: 24px;
    }

    .policy-open {
        grid-template-columns: 1fr;
    }

    .policy-date {
        flex-direction: row;
        align-items: baseline;
        gap: 5px;
    }

    .policy-date b {
        font-size: 13px;
    }

    .policy-source-meta {
        grid-template-columns: 1fr;
    }
}
