.home-view,
.today-view {
    max-width: 1480px;
    margin: 0 auto;
    container-type: inline-size;
}

body.portal-home .left-rail,
body.portal-home .insight-rail {
    display: none;
}

body.portal-home .app-layout {
    display: block;
}

body.today-workspace .insight-rail {
    display: none;
}

body.today-workspace .app-layout {
    grid-template-columns: 270px minmax(0, 1fr);
}

body.today-workspace .today-view {
    max-width: none;
}

body.portal-home .workspace {
    width: min(100%, 1580px);
    margin: 0 auto;
    padding-top: clamp(22px, 3vw, 48px);
}

.portal-hero {
    position: relative;
    z-index: 20;
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
    align-items: center;
    overflow: visible;
    color: #fff;
    background: #214f53;
    box-shadow: 0 16px 38px rgba(20, 53, 56, .17);
}

.portal-hero::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    content: "";
    background: #e7a948;
}

.portal-hero-copy {
    position: relative;
    z-index: 2;
    padding: clamp(30px, 4vw, 58px);
}

.portal-hero .eyebrow {
    color: #bde1df;
}

.portal-hero h1 {
    max-width: 790px;
    margin: 7px 0 10px;
    font-size: 52px;
    line-height: 1.04;
    letter-spacing: 0;
}

.portal-hero-copy > p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: #d6e8e8;
    font-size: 15px;
}

.portal-search-wrap {
    position: relative;
    z-index: 60;
    margin-top: 25px;
}

.portal-search {
    min-height: 68px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 7px 8px 7px 18px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 12px 30px rgba(7, 24, 26, .24);
}

.portal-search > i {
    color: var(--cadet-dark);
    font-size: 22px;
}

.portal-search input {
    min-width: 0;
    height: 50px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 17px;
}

.portal-search button {
    min-width: 174px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: #397b5d;
    font-weight: 800;
}

.portal-search button:hover {
    background: #2d664c;
}

.portal-autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: min(390px, 48vh);
    margin-top: 6px;
    overflow-y: auto;
    border: 1px solid #9dbdbf;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 20px 44px rgba(7, 24, 26, .28);
}

.portal-suggestion {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 9px 13px;
    border: 0;
    border-bottom: 1px solid #e7eeee;
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.portal-suggestion:last-child { border-bottom: 0; }
.portal-suggestion:hover,
.portal-suggestion.active { background: #edf6f6; }
.portal-suggestion > i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--cadet-deep); background: var(--cadet-soft); font-size: 15px; }
.portal-suggestion > span { min-width: 0; display: grid; gap: 2px; }
.portal-suggestion strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.portal-suggestion small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.portal-suggestion b { padding: 3px 6px; color: var(--cadet-dark); background: #f0f6f6; font-size: 8px; text-transform: uppercase; white-space: nowrap; }
.portal-autocomplete .autocomplete-group { display: flex; align-items: center; padding: 7px 12px 5px; border-bottom: 1px solid #e5eeee; color: #557074; background: #f7fafa; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }

.portal-topics {
    min-height: 27px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.portal-topics button {
    min-height: 27px;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 4px;
    color: #e7f3f3;
    background: rgba(255, 255, 255, .08);
    font-size: 9px;
}

.portal-topics button:hover {
    color: #183c40;
    background: #fff;
}

.portal-rose-wrap {
    position: relative;
    min-height: 330px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #173d41;
}

#nightingaleRose {
    width: min(100%, 410px);
    height: auto;
    opacity: .96;
}

.portal-rose-center {
    position: absolute;
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    background: #173d41;
    box-shadow: 0 0 0 9px rgba(23, 61, 65, .78);
}

.portal-rose-center img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.portal-rose-center strong,
.portal-rose-center span {
    display: block;
    text-align: center;
}

.portal-rose-center strong {
    margin-top: -2px;
    font-size: 12px;
}

.portal-rose-center span {
    color: #b8d4d5;
    font-size: 7px;
}

.portal-trust {
    position: relative;
    z-index: 1;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 8px 14px;
    border: 1px solid #bed1d2;
    border-top: 0;
    color: #526468;
    background: #f5f9f9;
    font-size: 9px;
}

.portal-trust span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.portal-trust i {
    color: var(--cadet-dark);
    font-size: 13px;
}

.portal-trust button {
    margin-left: auto;
}

.portal-tools {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.portal-tools.portal-highlights {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.today-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 0 22px;
    border-bottom: 1px solid var(--line);
}

.today-page-head h1 {
    margin: 2px 0 5px;
    font-size: 32px;
    line-height: 1.1;
}

.today-page-head p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.portal-tools > a,
.portal-tools > button,
.portal-tools > form {
    min-width: 0;
    min-height: 70px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
    text-align: left;
    text-decoration: none;
}

.portal-tools > :is(a,button,form):hover,
.portal-tools > form:focus-within {
    border-color: var(--cadet);
    background: #f7fbfb;
}

.portal-tools > :is(a,button,form) > i:first-child {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--cadet-deep);
    background: var(--cadet-soft);
    font-size: 18px;
}

.portal-tools > :is(a,button,form) span {
    min-width: 0;
    display: block;
}

.portal-tools strong,
.portal-tools small {
    display: block;
}

.portal-tools strong {
    font-size: 11px;
}

.portal-tools small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.portal-tools > button,
.portal-tools > form > button {
    cursor: pointer;
}

.portal-tools > button {
    width: 100%;
}

.portal-tools > form input {
    width: 100%;
    height: 25px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #c5d5d6;
    outline: 0;
    background: transparent;
    font: 9px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.portal-tools > form > button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #bfd2d3;
    border-radius: 4px;
    color: var(--cadet-deep);
    background: #fff;
}

.portal-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
    border: 1px solid var(--line);
    background: #fff;
}

.portal-stats > div {
    min-width: 0;
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-right: 1px solid var(--line);
}

.portal-stats > div:last-child {
    border-right: 0;
}

.portal-stats i {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--blue);
    font-size: 17px;
}

.portal-stats > div:nth-child(2) i { background: var(--cadet-dark); }
.portal-stats > div:nth-child(3) i { background: var(--coral); }
.portal-stats > div:nth-child(4) i { background: var(--green); }

.portal-stats span,
.portal-stats strong {
    display: block;
}

.portal-stats span {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-stats strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.15;
}

.today-dashboard {
    margin-top: 20px;
}

.portal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    gap: 18px;
}

.portal-main,
.portal-side {
    min-width: 0;
}

.portal-side {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.portal-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.portal-section-head h2 {
    margin: 2px 0 0;
    font-size: 19px;
}

.portal-section-head p {
    margin: 0;
}

.portal-feed-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.portal-feed-tabs button {
    min-height: 28px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #536568;
    background: #fff;
    font-size: 8px;
    font-weight: 750;
}

.portal-feed-tabs button.active {
    color: #fff;
    border-color: var(--cadet-deep);
    background: var(--cadet-deep);
}

.portal-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.portal-news-card {
    position: relative;
    min-width: 0;
    min-height: 164px;
    display: flex;
    flex-direction: column;
    padding: 13px 14px 12px 17px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    text-align: left;
}

.portal-news-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: var(--cadet);
}

.portal-news-card[data-kind="policy"]::before { background: var(--coral); }
.portal-news-card[data-kind="public-health"]::before { background: var(--green); }
.portal-news-card[data-kind="research"]::before { background: var(--blue); }

.portal-news-card:hover {
    border-color: #91b8ba;
    box-shadow: 0 8px 20px rgba(31, 72, 75, .08);
    transform: translateY(-1px);
}

.portal-news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 8px;
}

.portal-news-meta time {
    flex: 0 0 auto;
}

.portal-news-source {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--cadet-deep);
    font-weight: 850;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.portal-news-card h3 {
    margin: 9px 0 6px;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.portal-news-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.portal-news-reason {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 9px;
    color: #397b5d;
    font-size: 8px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

@container (max-width: 760px) {
    .portal-hero { grid-template-columns: 1fr; }
    .portal-hero-copy { padding: 34px; }
    .portal-hero h1 { font-size: 40px; }
    .portal-rose-wrap { min-height: 220px; }
    #nightingaleRose { width: 300px; }
    .portal-trust { flex-wrap: wrap; gap: 8px 18px; }
    .portal-tools { grid-template-columns: 1fr 1fr; }
    .portal-tools.portal-highlights { grid-template-columns: 1fr 1fr; }
    .portal-stats { grid-template-columns: 1fr 1fr; }
    .portal-stats > div:nth-child(2) { border-right: 0; }
    .portal-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .portal-layout { grid-template-columns: 1fr; }
    .portal-side { padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@container (max-width: 520px) {
    .portal-hero-copy { padding: 27px 18px; }
    .portal-hero h1 { font-size: 32px; }
    .portal-search { grid-template-columns: 27px minmax(0, 1fr); padding: 7px 10px; }
    .portal-search button { grid-column: 1 / -1; width: 100%; min-width: 0; }
    .portal-tools, .portal-tools.portal-highlights, .portal-stats, .portal-news-grid { grid-template-columns: 1fr; }
    .portal-stats > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .portal-section-head { align-items: flex-start; flex-direction: column; }
}

.portal-publications,
.portal-continue,
.portal-shifts {
    display: grid;
    gap: 5px;
}

.portal-publication,
.portal-continue button,
.portal-shifts button {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    text-align: left;
}

.portal-publication:hover,
.portal-continue button:hover,
.portal-shifts button:hover {
    border-color: var(--cadet);
    background: #f7fbfb;
}

.portal-publication > i,
.portal-continue button > i:first-child,
.portal-shifts button > i:first-child {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    color: var(--cadet-deep);
    background: var(--cadet-soft);
}

.portal-publication span,
.portal-continue button span,
.portal-shifts button span {
    min-width: 0;
    display: grid;
}

.portal-publication strong,
.portal-continue strong,
.portal-shifts strong,
.portal-publication small,
.portal-continue small,
.portal-shifts small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-publication strong,
.portal-continue strong,
.portal-shifts strong { font-size: 10px; }
.portal-publication small,
.portal-continue small,
.portal-shifts small { color: var(--muted); font-size: 8px; }

.portal-side-section {
    padding: 0 0 17px;
    margin-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.portal-side-section:last-child {
    border-bottom: 0;
}

.portal-side-section h2 {
    margin: 0 0 9px;
    font-size: 14px;
}

.portal-source-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.portal-source-status span {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #536568;
    background: #fff;
    font-size: 8px;
}

.portal-source-status i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
}

.portal-empty {
    padding: 14px;
    border: 1px dashed #c6d5d6;
    color: var(--muted);
    background: #f8fafa;
    font-size: 9px;
}

@media (max-width: 1180px) {
    .portal-hero { grid-template-columns: minmax(0, 1fr) 310px; }
    .portal-hero-copy { padding: 34px; }
    .portal-hero h1 { font-size: 40px; }
    .portal-trust { flex-wrap: wrap; gap: 8px 18px; }
}

@media (max-width: 900px) {
    .portal-hero { grid-template-columns: 1fr; }
    .portal-rose-wrap { min-height: 220px; }
    #nightingaleRose { width: 300px; }
    .portal-tools, .portal-tools.portal-highlights { grid-template-columns: 1fr 1fr; }
    .portal-stats { grid-template-columns: 1fr 1fr; }
    .portal-stats > div:nth-child(2) { border-right: 0; }
    .portal-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .portal-layout { grid-template-columns: 1fr; }
    .portal-side { padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

/* Florence 1.23.2: the portal remains airy, but never microscopic. */
.portal-topics button { min-height: 32px; font-size: 12px; }
.portal-rose-center span { font-size: 9px; }
.portal-trust { font-size: 12px; }
.portal-tools strong { font-size: 14px; }
.portal-tools small { font-size: 12px; }
.portal-tools>form input { height: 30px; font-size: 13px; }
.portal-stats span { font-size: 11px; }
.portal-feed-tabs button { min-height: 34px; padding-inline: 11px; font-size: 12px; }
.portal-news-meta,
.portal-news-reason { font-size: 11px; }
.portal-news-card h3 { font-size: 16px; }
.portal-news-card p { font-size: 13px; }
.portal-publication strong,
.portal-continue strong,
.portal-shifts strong { font-size: 13px; }
.portal-publication small,
.portal-continue small,
.portal-shifts small,
.portal-source-status span { font-size: 11px; }
.portal-empty { font-size: 12px; line-height: 1.5; }

@media (max-width: 760px) {
    .portal-news-card h3 { font-size: 15px; }
    .portal-news-card p,
    .portal-publication strong,
    .portal-continue strong,
    .portal-shifts strong { font-size: 12px; }
}

@media (max-width: 600px) {
    .portal-hero-copy { padding: 27px 18px; }
    .portal-hero h1 { font-size: 32px; }
    .portal-hero-copy > p:not(.eyebrow) { font-size: 12px; }
    .portal-search { grid-template-columns: 27px minmax(0, 1fr); padding: 7px 10px; }
    .portal-search input { font-size: 14px; }
    .portal-search button { grid-column: 1 / -1; width: 100%; min-width: 0; }
    .portal-tools, .portal-tools.portal-highlights { grid-template-columns: 1fr; }
    .portal-rose-wrap { min-height: 190px; }
    #nightingaleRose { width: 250px; }
    .portal-rose-center { width: 88px; height: 88px; }
    .portal-rose-center img { width: 34px; height: 34px; }
    .portal-trust { display: grid; grid-template-columns: 1fr auto; }
    .portal-trust span { grid-column: 1; }
    .portal-trust button { grid-column: 2; grid-row: 1; }
    .portal-stats { grid-template-columns: 1fr; }
    .portal-stats > div { min-height: 64px; border-right: 0; border-bottom: 1px solid var(--line); }
    .portal-stats > div:last-child { border-bottom: 0; }
    .portal-news-grid { grid-template-columns: 1fr; }
    .portal-section-head { align-items: flex-start; flex-direction: column; }
}

body.easy-mode .portal-rose-wrap,
body.easy-mode .portal-trust span:nth-child(3),
body.easy-mode .portal-stats,
body.easy-mode .portal-side {
    display: none;
}

body.easy-mode .portal-hero {
    grid-template-columns: 1fr;
    min-height: 0;
}
