:root {
    --blue: #003399;
    --blue-light: #edf3ff;
    --coral: #ff6547;
    --ink: #111a38;
    --muted: #6b7287;
    --line: #e1e5ed;
    --paper: #f7f8fb;
    --sun: #ffd05c;
    --white: #ffffff;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--paper);
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

textarea:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

.portal-frame {
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: 100vh;
    transition: grid-template-columns .24s ease;
}

.portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 26px 18px 20px;
    border-right: 1px solid var(--line);
    background: #fffefa;
    box-shadow: 10px 0 30px rgba(26, 38, 70, .025);
    transition: width .24s ease, padding .24s ease;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: max-content;
    margin: 3px 13px 38px;
    text-decoration: none;
}

.portal-brand img {
    width: 68px;
}

.portal-brand-word {
    padding-left: 9px;
    border-left: 1px solid #bdc6d8;
    color: var(--blue);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .2em;
}

.sidebar-section-label {
    margin: 0 12px 10px;
    color: #9299aa;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.portal-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.portal-sidebar nav a {
    position: relative;
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 4px 12px 4px 6px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #555e74;
    font-size: 12px;
    font-weight: 720;
    text-decoration: none;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.portal-sidebar nav a::before {
    position: absolute;
    inset: 9px auto 9px 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--coral);
    opacity: 0;
    content: "";
    transform: translateX(-3px);
    transition: opacity .16s ease, transform .16s ease;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #778198;
    background: #f5f6f9;
    transition: color .16s ease, background .16s ease;
}

.nav-icon svg,
.support-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.nav-label {
    white-space: nowrap;
}

.portal-sidebar nav a b {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--blue);
    background: #dfe9ff;
    font-size: 9px;
}

.portal-sidebar nav a.active,
.portal-sidebar nav a:hover {
    color: var(--blue);
    border-color: #dbe4f6;
    background: #f0f4fd;
    transform: translateX(2px);
}

.portal-sidebar nav a.active::before {
    opacity: 1;
    transform: translateX(0);
}

.portal-sidebar nav a.active .nav-icon {
    color: white;
    background: var(--blue);
    box-shadow: 0 7px 16px rgba(0, 51, 153, .22);
}

.portal-sidebar nav a:hover .nav-icon {
    color: var(--blue);
    background: #e5edfc;
}

.portal-sidebar nav a.active:hover .nav-icon {
    color: white;
    background: var(--blue);
}

.sidebar-support {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 11px;
    min-height: 88px;
    padding: 15px;
    margin-top: auto;
    border-radius: 14px;
    color: var(--white);
    background: #142553;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(20, 37, 83, .16);
    transition: background .16s ease, transform .16s ease;
}

.sidebar-support:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.support-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--ink);
    background: var(--sun);
}

.support-copy small,
.support-copy strong,
.support-copy em {
    display: block;
}

.support-copy small {
    color: #b9c8ea;
    font-size: 8px;
}

.support-copy strong {
    margin: 3px 0 8px;
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: 400;
}

.support-copy em {
    color: #e0e8f8;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 18px 6px 0;
    margin-top: 14px;
    border-top: 1px solid var(--line);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--white);
    background: var(--coral);
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 0 0 4px #fff0e9;
}

.user-copy strong,
.user-copy small {
    display: block;
}

.user-copy strong {
    margin-bottom: 2px;
    font-size: 11px;
}

.user-copy small {
    color: var(--muted);
    font-size: 9px;
}

.sidebar-user button,
.card-label button {
    border: 0;
    color: var(--muted);
    background: transparent;
}

.portal-body {
    grid-column: 2;
    min-width: 0;
}

.wireframe-boundary {
    padding: 7px 24px;
    color: #5f5168;
    background: #f7eefa;
    font-size: 10px;
    text-align: center;
}

.wireframe-boundary strong {
    margin-right: 7px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
    padding: 0 clamp(28px, 5vw, 72px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
}

.active-case {
    position: relative;
}

.active-case > span,
.active-case > button {
    display: block;
}

.active-case > span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.active-case > button {
    padding: 0;
    border: 0;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
}

.active-case i {
    margin-left: 7px;
    color: var(--muted);
}

.case-menu {
    position: absolute;
    top: 48px;
    left: -12px;
    z-index: 100;
    width: min(330px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 18px 48px rgba(17, 32, 72, .18);
}

.case-menu > button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.case-menu > button:hover,
.case-menu > button.selected {
    background: var(--blue-light);
}

.case-menu > button > span:nth-child(2) strong,
.case-menu > button > span:nth-child(2) small {
    display: block;
}

.case-menu > button > span:nth-child(2) strong {
    margin-bottom: 3px;
    font-size: 11px;
}

.case-menu > button > span:nth-child(2) small {
    color: var(--muted);
    font-size: 9px;
}

.case-menu > button > b {
    color: var(--blue);
    font-size: 12px;
}

.case-menu-avatar,
.case-menu-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #38517f;
    background: #dfe7f4;
    font-size: 9px;
    font-weight: 800;
}

.case-menu-mark {
    color: var(--blue);
    background: var(--white);
    border: 1px dashed #aebbd0;
    font-size: 16px;
}

.case-menu > button.case-menu-create {
    grid-template-columns: 34px 1fr;
    margin-top: 6px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    color: var(--blue);
}

.case-menu-create > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    font-size: 16px;
}

.case-menu-create > strong {
    font-size: 10px;
}

.portal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #63708a;
    background: var(--white);
}

.primary-action {
    display: inline-block;
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    color: var(--white);
    background: var(--blue);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(0, 51, 153, .17);
}

.portal-main {
    width: min(1080px, calc(100% - 64px));
    margin: 0 auto;
    padding: 60px 0 90px;
}

.case-created-confirmation {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: 30px;
    border: 1px solid #bee4d2;
    border-radius: 10px;
    color: #155f43;
    background: #ecfaf3;
}

.case-created-confirmation > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--white);
    background: #27815d;
}

.case-created-confirmation strong,
.case-created-confirmation p {
    display: block;
    margin: 0;
}

.case-created-confirmation strong {
    margin-bottom: 2px;
    font-size: 11px;
}

.case-created-confirmation p {
    color: #37735d;
    font-size: 9px;
}

.portal-eyebrow {
    margin: 0 0 11px;
    color: var(--blue);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.portal-welcome {
    margin-bottom: 42px;
}

.portal-welcome h1 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -.035em;
}

.portal-welcome > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 20px;
}

.summary-card {
    min-height: 255px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 10px 32px rgba(34, 48, 83, .05);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.blue-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    font-family: Georgia, serif;
    font-style: italic;
}

.card-heading span,
.card-heading small {
    display: block;
}

.card-heading span {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 800;
}

.card-heading small {
    color: var(--muted);
    font-size: 10px;
}

.question-input {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 9px 10px 9px 16px;
    margin: 26px 0 14px;
    border: 1px solid #cbd3e2;
    border-radius: 9px;
    color: #7a8294;
    font-size: 12px;
}

.question-input span {
    flex: 1;
}

.question-input button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 7px;
    color: var(--white);
    background: var(--blue);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.quick-links button {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #697287;
    background: var(--white);
    font-size: 9px;
}

.card-label {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.case-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.case-person > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #38517f;
    background: #dfe7f4;
    font-size: 11px;
    font-weight: 800;
}

.case-person h2,
.case-person p {
    margin: 0;
}

.case-person h2 {
    margin-bottom: 4px;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 400;
}

.case-person p {
    color: var(--muted);
    font-size: 10px;
}

.case-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 24px;
}

.case-card dl div {
    padding: 10px;
    border-radius: 6px;
    background: var(--paper);
}

.case-card dt {
    color: var(--muted);
    font-size: 8px;
    text-transform: uppercase;
}

.case-card dd {
    margin: 4px 0 0;
    font-size: 10px;
    font-weight: 750;
}

.case-card > a,
.section-title-row > a,
.library-panel > a,
.support-panel > a {
    display: flex;
    justify-content: space-between;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.case-card-empty {
    display: flex;
    flex-direction: column;
    min-height: 330px;
}

.case-card-empty h2 {
    margin: 20px 0 8px;
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 400;
}

.case-card-empty > p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.case-empty-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 18px;
}

.case-empty-map > span {
    display: grid;
    place-items: center;
    min-height: 30px;
    padding: 6px;
    border: 1px dashed #c4cddd;
    border-radius: 7px;
    color: #657087;
    background: var(--paper);
    font-size: 8px;
    font-weight: 700;
}

.case-empty-map > span.case-empty-centre {
    grid-column: 1 / -1;
    width: 62px;
    min-height: 32px;
    margin: 0 auto 2px;
    border-style: solid;
    border-color: var(--blue);
    color: var(--white);
    background: var(--blue);
}

.case-setup-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    margin-top: auto;
    border: 0;
    border-radius: 8px;
    color: var(--white);
    background: var(--blue);
    cursor: pointer;
    font-size: 10px;
    font-weight: 780;
}

.workspace-section {
    margin-top: 58px;
}

.section-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title-row h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 400;
}

.section-title-row > a {
    gap: 14px;
    padding-bottom: 4px;
}

.conversation-list {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    overflow: hidden;
}

.conversation-list article {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 15px;
    padding: 20px 22px;
}

.conversation-list article + article {
    border-top: 1px solid var(--line);
}

.conversation-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-light);
    font-family: Georgia, serif;
    font-size: 22px;
}

.conversation-copy h3,
.conversation-copy p,
.conversation-copy small {
    margin: 0;
}

.conversation-copy h3 {
    margin-bottom: 5px;
    font-size: 12px;
}

.conversation-copy p {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
}

.conversation-copy small {
    color: #9399a8;
    font-size: 8px;
}

.conversation-status {
    padding: 5px 8px;
    border-radius: 999px;
    color: #737b8f;
    background: #f0f2f5;
    font-size: 8px;
    font-weight: 750;
}

.conversation-status.saved {
    color: #267553;
    background: #e6f5ed;
}

.conversation-status.authority {
    color: #8c5e14;
    background: #fff2d8;
}

.conversation-list article > a {
    color: var(--blue);
    text-decoration: none;
}

.lower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.library-panel,
.support-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    min-height: 190px;
    padding: 28px;
    border-radius: 12px;
}

.library-panel {
    border: 1px solid var(--line);
    background: var(--white);
}

.support-panel {
    color: var(--white);
    background: #142553;
}

.panel-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-light);
}

.library-panel h2,
.support-panel h2 {
    margin: 0 0 9px;
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 400;
}

.library-panel p:not(.portal-eyebrow),
.support-panel p:not(.portal-eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.support-panel p:not(.portal-eyebrow) {
    color: #bcc9e7;
}

.support-panel .portal-eyebrow {
    color: #9cb8f2;
}

.library-panel > a,
.support-panel > a {
    grid-column: 2;
    justify-content: flex-start;
    align-self: end;
}

.support-panel > a {
    color: var(--white);
}

.case-setup {
    width: min(920px, 100%);
    margin: 0 auto;
}

.case-setup-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 32px;
}

.case-setup-heading h1 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 44px;
    font-weight: 400;
    letter-spacing: -.035em;
}

.case-setup-heading p:last-child {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.case-setup-heading > button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    background: var(--white);
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
}

.case-setup-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.case-setup-progress > span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-top: 3px solid #dfe4ec;
    color: #858c9b;
    font-size: 9px;
    font-weight: 760;
}

.case-setup-progress > span b {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--white);
    background: #aeb6c5;
    font-size: 8px;
}

.case-setup-progress > span.active {
    border-color: var(--blue);
    color: var(--blue);
}

.case-setup-progress > span.active b {
    background: var(--blue);
}

.case-setup-thread {
    min-height: 520px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 14px 38px rgba(34, 48, 83, .07);
}

.setup-message {
    display: flex;
    gap: 12px;
    width: fit-content;
    max-width: 76%;
    padding: 15px;
    margin-bottom: 18px;
    border-radius: 4px 13px 13px;
    font-size: 12px;
    line-height: 1.6;
}

.setup-message.assistant {
    background: var(--blue-light);
}

.setup-message.visitor {
    margin-left: auto;
    border-radius: 13px 4px 13px 13px;
    color: var(--white);
    background: var(--blue);
}

.setup-message strong,
.setup-message p {
    display: block;
    margin: 0;
}

.setup-message strong {
    margin-bottom: 5px;
    color: var(--blue);
    font-size: 10px;
}

.setup-message p + p {
    margin-top: 7px;
}

.setup-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    font-family: Georgia, serif;
    font-style: italic;
}

.setup-prompt,
.case-agreement,
.case-details-card,
.case-review-card {
    width: min(610px, 88%);
    padding: 22px;
    margin: 8px 0 0 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
}

.setup-prompt > strong {
    display: block;
    margin-bottom: 15px;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 400;
}

.setup-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.setup-choices button {
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid #b9c6db;
    border-radius: 8px;
    color: var(--blue);
    background: var(--white);
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
}

.case-agreement h2,
.case-review-card h2 {
    margin: 0 0 18px;
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 400;
}

.agreement-points {
    display: grid;
    gap: 10px;
    padding: 15px;
    border-radius: 9px;
    background: var(--blue-light);
}

.agreement-points > span {
    display: flex;
    gap: 8px;
    color: #4f5c74;
    font-size: 10px;
    line-height: 1.5;
}

.agreement-points b {
    color: var(--blue);
}

.case-agreement > label,
.review-conversation {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 9px;
    margin: 17px 0;
    color: #4f596e;
    font-size: 10px;
    line-height: 1.5;
}

.case-agreement input,
.review-conversation input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--blue);
}

.case-agreement > button,
.case-details-card > button,
.review-actions button {
    min-height: 42px;
    padding: 10px 13px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 760;
}

.case-agreement > button,
.case-details-card > button,
.review-actions .primary {
    color: var(--white);
    background: var(--blue);
}

.case-agreement > button,
.case-details-card > button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.case-agreement > button:disabled,
.case-details-card > button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.case-details-card label {
    display: block;
    margin-bottom: 7px;
    color: #3f4a61;
    font-size: 10px;
    font-weight: 760;
}

.case-details-card input,
.case-details-card textarea {
    width: 100%;
    padding: 11px 12px;
    margin-bottom: 16px;
    border: 1px solid #bec8d9;
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    font-size: 13px;
}

.case-details-card textarea {
    resize: vertical;
}

.review-heading {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.case-review-card dl {
    margin: 0;
}

.case-review-card dl > div {
    display: grid;
    grid-template-columns: 135px 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.case-review-card dt {
    color: var(--muted);
    font-size: 9px;
}

.case-review-card dd {
    margin: 0;
    font-size: 10px;
    font-weight: 740;
}

.review-conversation {
    padding: 12px;
    border-radius: 8px;
    background: var(--blue-light);
}

.review-conversation strong,
.review-conversation small {
    display: block;
}

.review-conversation small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.review-actions .secondary {
    border: 1px solid var(--line);
    color: var(--blue);
    background: var(--white);
}

.review-reassurance {
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 8px;
    text-align: right;
}

.portal-empty {
    padding: 80px 0;
}

.portal-empty h1 {
    font-family: Georgia, serif;
    font-size: 40px;
    font-weight: 400;
}

.access-frame {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100dvh;
    color: var(--ink);
    background: #faf6ee;
}

.access-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 92px;
    padding: 12px max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid #e0d9cc;
    background: rgba(255, 255, 255, .92);
}

.access-header::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--coral) 0 36%, var(--sun) 36% 49%, var(--blue) 49% 100%);
    content: "";
}

.access-header .portal-brand {
    margin: 0;
}

.access-header > p {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #4d5870;
    font-size: 12px;
    font-weight: 700;
}

.access-header > p span {
    color: #32a06f;
    font-size: 10px;
}

.access-main {
    display: grid;
    place-items: center;
    padding: 54px 24px 70px;
}

.access-journey {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr);
    width: min(1180px, 100%);
    overflow: hidden;
    border-radius: 26px;
    background: var(--white);
    box-shadow: 0 28px 80px rgba(17, 32, 72, .15);
}

.held-conversation {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 650px;
    padding: 52px;
    overflow: hidden;
    color: var(--white);
    background: var(--blue);
}

.held-conversation::before {
    position: absolute;
    top: -120px;
    right: -110px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: var(--coral);
    content: "";
}

.held-conversation::after {
    position: absolute;
    right: 74px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--sun);
    content: "";
}

.held-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    font-size: 11px;
    font-weight: 760;
}

.held-badge i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #73e0ae;
}

.held-copy {
    position: relative;
    z-index: 1;
    max-width: 510px;
    margin-top: 64px;
}

.held-copy .portal-eyebrow {
    color: #c0d4ff;
}

.held-copy h1 {
    margin: 0 0 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -.04em;
}

.held-copy > p:last-child {
    max-width: 470px;
    margin: 0;
    color: #d7e4ff;
    font-size: 16px;
    line-height: 1.7;
}

.held-preview {
    position: relative;
    z-index: 1;
    width: min(450px, 100%);
    padding: 22px;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
}

.held-question {
    width: max-content;
    max-width: 88%;
    padding: 10px 13px;
    margin-left: auto;
    border-radius: 12px 4px 12px 12px;
    color: var(--ink);
    background: var(--sun);
    font-size: 12px;
    font-weight: 700;
}

.held-answer {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.held-answer > span,
.recovered-message.assistant > span {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--blue);
    background: var(--white);
    font-family: Georgia, serif;
    font-style: italic;
}

.held-answer p {
    margin: 0;
    color: #edf3ff;
    font-size: 12px;
    line-height: 1.55;
}

.held-preview small {
    display: block;
    padding-top: 13px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    color: #bfcff0;
    font-size: 10px;
}

.workspace-preview {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: min(450px, 100%);
    padding: 20px;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
}

.workspace-preview div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 17px;
    border-radius: 11px;
    color: var(--ink);
    background: var(--white);
}

.workspace-preview div:nth-child(2) {
    background: var(--sun);
}

.workspace-preview strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 400;
}

.workspace-preview span {
    color: #59647a;
    font-size: 10px;
    font-weight: 740;
}

.workspace-preview small {
    grid-column: 1 / -1;
    padding-top: 6px;
    color: #c7d6f3;
    font-size: 10px;
}

.access-card {
    align-self: center;
    padding: 48px clamp(34px, 5vw, 68px);
}

.access-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0;
    margin: 0 0 42px;
    list-style: none;
}

.sign-in-progress {
    grid-template-columns: repeat(2, 1fr);
}

.access-progress li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 13px;
    border-top: 3px solid #e0e5ed;
    color: #8a92a3;
    font-size: 10px;
    font-weight: 760;
}

.access-progress li.active {
    border-color: var(--blue);
    color: var(--blue);
}

.access-progress li span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--white);
    background: #aeb6c5;
    font-size: 9px;
}

.access-progress li.active span {
    background: var(--blue);
}

.access-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    margin-bottom: 36px;
    border-radius: 10px;
    background: var(--blue-light);
}

.access-mode button {
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    color: #657087;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 740;
}

.access-mode button.active {
    color: var(--blue);
    background: var(--white);
    box-shadow: 0 4px 14px rgba(13, 40, 91, .1);
}

.access-card .portal-eyebrow {
    margin-bottom: 14px;
}

.access-card h2 {
    margin: 0 0 17px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 3.2vw, 46px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.access-intro {
    margin: 0 0 30px;
    color: #5d667a;
    font-size: 14px;
    line-height: 1.65;
}

.access-card > label:not(.access-consent) {
    display: block;
    margin-bottom: 8px;
    color: #39445c;
    font-size: 12px;
    font-weight: 760;
}

.access-card > input:not([type="checkbox"]) {
    width: 100%;
    min-height: 54px;
    padding: 13px 15px;
    border: 1px solid #bec8d9;
    border-radius: 9px;
    color: var(--ink);
    background: var(--white);
    font-size: 16px;
}

.access-card > input:not([type="checkbox"]):focus {
    border-color: var(--blue);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 51, 153, .11);
}

.code-input {
    letter-spacing: .32em;
}

.access-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    margin-top: 15px;
    border: 0;
    border-radius: 9px;
    color: var(--white);
    background: var(--blue);
    cursor: pointer;
    font-size: 13px;
    font-weight: 780;
}

.access-primary:hover:not(:disabled) {
    background: #002b82;
}

.access-primary:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.access-reassurance {
    display: flex;
    gap: 9px;
    margin: 18px 0 0;
    color: #747d90;
    font-size: 10px;
    line-height: 1.55;
}

.access-reassurance span {
    color: var(--coral);
}

.access-back,
.access-text-button {
    min-height: 42px;
    padding: 0;
    border: 0;
    color: var(--blue);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 740;
}

.access-back {
    margin-bottom: 24px;
}

.access-text-button {
    display: block;
    margin: 8px auto 0;
}

.access-consent {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    margin: 20px 0 0;
    color: #5b6579;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.5;
}

.access-consent input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue);
}

.access-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
    padding: 16px max(24px, calc((100vw - 1180px) / 2));
    color: #747d8f;
    background: var(--white);
    font-size: 10px;
}

.access-footer nav {
    display: flex;
    gap: 18px;
}

.recovered-conversation {
    width: min(1080px, 100%);
}

.save-confirmation {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    margin-bottom: 46px;
    border: 1px solid #bee4d2;
    border-radius: 12px;
    color: #155f43;
    background: #ecfaf3;
}

.save-confirmation > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--white);
    background: #27815d;
}

.save-confirmation strong,
.save-confirmation p {
    display: block;
    margin: 0;
}

.save-confirmation strong {
    margin-bottom: 3px;
    font-size: 12px;
}

.save-confirmation p {
    color: #37735d;
    font-size: 11px;
}

.recovered-heading {
    max-width: 720px;
    margin-bottom: 38px;
}

.recovered-heading h1 {
    margin: 0 0 17px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 62px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.04em;
}

.recovered-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.recovered-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 22px;
}

.recovered-thread,
.conversation-next-step {
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 18px 48px rgba(17, 32, 72, .1);
}

.recovered-thread {
    padding: 30px;
}

.recovered-message {
    width: fit-content;
    max-width: 82%;
    padding: 13px 15px;
    margin-bottom: 16px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.6;
}

.recovered-message p {
    margin: 0;
}

.recovered-message.visitor {
    margin-left: auto;
    border-radius: 13px 4px 13px 13px;
    color: var(--white);
    background: var(--blue);
}

.recovered-message.assistant {
    display: flex;
    gap: 12px;
    max-width: 92%;
    padding: 16px;
    border-radius: 4px 13px 13px;
    background: var(--blue-light);
}

.recovered-message.assistant > span {
    color: var(--white);
    background: var(--blue);
}

.recovered-source {
    padding: 12px;
    margin-top: 14px;
    border-radius: 8px;
    background: var(--white);
}

.recovered-source strong,
.recovered-source span {
    display: block;
}

.recovered-source strong {
    margin-bottom: 5px;
    color: var(--blue);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.recovered-source span {
    color: #626d82;
    font-size: 10px;
}

.recovered-composer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 8px 9px 8px 15px;
    margin-top: 30px;
    border: 1px solid #c5cedd;
    border-radius: 10px;
    color: #7a8395;
    font-size: 12px;
}

.recovered-composer button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    color: var(--white);
    background: var(--coral);
}

.conversation-next-step {
    align-self: start;
    padding: 30px;
    color: var(--white);
    background: var(--blue);
}

.private-badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--ink);
    background: var(--sun);
    font-size: 9px;
    font-weight: 800;
}

.conversation-next-step h2 {
    margin: 32px 0 14px;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 400;
}

.conversation-next-step p {
    margin: 0 0 28px;
    color: #cddcff;
    font-size: 12px;
    line-height: 1.65;
}

.conversation-next-step button,
.conversation-next-step a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 760;
    text-decoration: none;
}

.conversation-next-step button {
    border: 0;
    color: var(--ink);
    background: var(--sun);
}

.conversation-next-step a {
    justify-content: space-between;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, .3);
    color: var(--white);
}

@media (max-width: 900px) {
    .access-journey,
    .recovered-grid {
        grid-template-columns: 1fr;
    }

    .held-conversation {
        min-height: 540px;
    }

    .conversation-next-step {
        width: 100%;
    }
}

@media (max-width: 1180px) {
    .portal-frame {
        grid-template-columns: 88px 1fr;
    }

    .portal-sidebar {
        width: 88px;
        padding: 22px 14px 18px;
    }

    .portal-brand {
        margin: 2px auto 38px;
    }

    .portal-brand img {
        width: 52px;
    }

    .portal-brand-word,
    .sidebar-section-label,
    .nav-label,
    .support-copy,
    .sidebar-user .user-copy,
    .sidebar-user > button {
        display: none;
    }

    .portal-sidebar nav a {
        display: grid;
        grid-template-columns: 1fr;
        place-items: center;
        width: 58px;
        height: 54px;
        padding: 0;
        overflow: visible;
        transform: none;
    }

    .portal-sidebar nav a::before {
        inset: 12px auto 12px -15px;
        width: 4px;
    }

    .portal-sidebar nav a::after,
    .sidebar-support::after {
        position: absolute;
        left: calc(100% + 12px);
        z-index: 20;
        width: max-content;
        padding: 7px 9px;
        border-radius: 7px;
        color: white;
        background: #142553;
        box-shadow: 0 8px 22px rgba(20, 37, 83, .18);
        content: attr(data-label);
        font-size: 9px;
        font-weight: 750;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-5px);
        transition: opacity .14s ease, transform .14s ease;
    }

    .portal-sidebar nav a:hover::after,
    .portal-sidebar nav a:focus-visible::after,
    .sidebar-support:hover::after,
    .sidebar-support:focus-visible::after {
        opacity: 1;
        transform: translateX(0);
    }

    .portal-sidebar nav a b {
        position: absolute;
        right: 2px;
        top: 1px;
        width: 18px;
        height: 18px;
        border: 2px solid #fffefa;
        font-size: 8px;
    }

    .sidebar-support {
        position: relative;
        display: grid;
        grid-template-columns: 1fr;
        place-items: center;
        width: 58px;
        min-height: 54px;
        padding: 0;
        border-radius: 13px;
    }

    .support-icon {
        width: 34px;
        height: 34px;
    }

    .sidebar-user {
        display: grid;
        grid-template-columns: 1fr;
        place-items: center;
        padding: 18px 0 0;
    }

    .portal-body {
        grid-column: 2;
    }
}

@media (max-width: 740px) {
    .access-header {
        min-height: 74px;
    }

    .access-header > p {
        max-width: 150px;
        font-size: 9px;
        text-align: right;
    }

    .access-main {
        padding: 22px 12px 44px;
    }

    .access-journey {
        border-radius: 16px;
    }

    .held-conversation {
        min-height: 500px;
        padding: 28px 24px;
    }

    .held-copy {
        margin-top: 46px;
    }

    .held-copy h1 {
        font-size: 41px;
    }

    .held-copy > p:last-child {
        font-size: 14px;
    }

    .access-card {
        padding: 34px 24px 40px;
    }

    .access-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .save-confirmation {
        margin-bottom: 34px;
    }

    .recovered-heading h1 {
        font-size: 42px;
    }

    .recovered-thread,
    .conversation-next-step {
        padding: 22px;
    }

    .recovered-message {
        max-width: 92%;
    }

    .portal-frame {
        display: block;
    }

    .portal-sidebar {
        position: static;
        flex-direction: row;
        align-items: center;
        width: 100%;
        height: 68px;
        padding: 0 18px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .portal-brand {
        margin: 0;
    }

    .portal-sidebar nav,
    .sidebar-user,
    .sidebar-support {
        display: none;
    }

    .portal-body {
        display: block;
    }

    .portal-header {
        height: 68px;
        padding: 0 18px;
    }

    .case-menu {
        left: 0;
    }

    .icon-button {
        display: none;
    }

    .primary-action {
        padding: 10px 12px;
        font-size: 10px;
    }

    .portal-main {
        width: calc(100% - 32px);
        padding-top: 42px;
    }

    .portal-welcome h1 {
        font-size: 34px;
    }

    .summary-grid,
    .lower-grid {
        grid-template-columns: 1fr;
    }

    .case-setup-heading {
        flex-direction: column;
        gap: 18px;
    }

    .case-setup-heading h1 {
        font-size: 36px;
    }

    .case-setup-progress > span {
        padding: 9px 5px;
        font-size: 8px;
    }

    .case-setup-thread {
        padding: 18px 14px;
    }

    .setup-message {
        max-width: 92%;
    }

    .setup-prompt,
    .case-agreement,
    .case-details-card,
    .case-review-card {
        width: calc(100% - 12px);
        margin-left: 12px;
    }

    .case-review-card dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .conversation-list article {
        grid-template-columns: 38px 1fr 18px;
        padding: 17px 14px;
    }

    .conversation-status {
        display: none;
    }
}
