* {
    box-sizing:border-box}
 :root {
    --menu-font-size:1.125rem;
    --mast-blue:#013960;
    font-family:Segoe UI,system-ui,sans-serif;
    color:#142a37;
    background:#f6f8fa;
    font-synthesis:none}
 body {
    margin:0}
 a {
    color:inherit}
 button {
    font:inherit;
    cursor:pointer}
 button:disabled {
    cursor:not-allowed;
    opacity:.55}
 :focus-visible {
    outline:3px solid var(--mast-blue);
    outline-offset:4px}
 .skip-link {
    position:absolute;
    top:-80px;
    left:20px;
    background:white;
    padding:12px;
    z-index:2}
.skip-link:focus {
    top:16px}
.login-shell {
    min-height:100vh;
    display:grid;
    grid-template-columns:46% 54%}
.brand-panel {
    background:var(--mast-blue);
    color:#fff;
    padding:48px 11%;
    display:grid;
    grid-template-rows:1fr auto 1fr;
    position:relative;
    overflow:hidden}
.brand-panel:after {
    content:"";
    position:absolute;
    width:440px;
    height:440px;
    border:1px solid #ffffff12;
    border-radius:50%;
    bottom:-270px;
    right:-130px;
    pointer-events:none}
.brand {
    text-decoration:none;
    font-size:24px;
    font-weight:650;
    display:flex;
    align-items:center;
    gap:12px}
.mast-brand-mark {
    position:relative;
    isolation:isolate;
    display:inline-flex;
    flex:none;
    padding:6px 9px;
}
.mast-brand-mark::before {
    content:"";
    position:absolute;
    inset:1px;
    z-index:-1;
    background:white;
    border-radius:14px;
    filter:blur(3px);
}
.mast-brand-icon { width:46px; height:auto; display:block; }
.eyebrow {
    font-size:11px;
    font-weight:700;
    letter-spacing:2px;
    color:var(--mast-blue)}
.brand-panel .eyebrow {
    color:#aecaff}
.brand-message {
    grid-row:2;
    margin:0}
.brand-message h1 {
    font-size:clamp(34px,3.5vw,54px);
    line-height:1.13;
    font-weight:600;
    letter-spacing:-1.4px;
    margin:24px 0}
.brand-message p {
    color:#edf4ff;
    max-width:350px;
    font-size:17px;
    line-height:1.65}
.app-header :focus-visible, .brand-panel :focus-visible { outline-color:white; }
.brand-panel .brand-line { background:#fff; }
.brand-line {
    width:48px;
    height:3px;
    background:var(--mast-blue);
    margin-top:38px}
.brand-footer {
    align-self:end;
    font-size:12px;
    color:#e0eafa}
.login-main {
    display:grid;
    grid-template-rows:minmax(max-content, 3fr) auto minmax(2rem, 2fr) auto;
    justify-items:center;
    padding:0 42px 28px}
.login-card {
    width:100%;
    max-width:410px}
.login-card h2 {
    font-size:32px;
    line-height:1.2;
    letter-spacing:-.8px;
    margin:0 0 16px}
.muted {
    color:#5c6f7b;
    line-height:1.65}
.microsoft-button {
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    background:#fff;
    border:1px solid #cbd5db;
    border-radius:8px;
    padding:17px;
    margin-top:32px;
    font-weight:600;
    color:#18303d}
.microsoft-button:hover:enabled {
    border-color:var(--mast-blue);
    background:#eff4ff}
.microsoft-mark {
    display:grid;
    grid-template-columns:repeat(2,8px);
    gap:2px}
.microsoft-mark i {
    width:8px;
    height:8px;
    background:#f25022}
.microsoft-mark i:nth-child(2) {
    background:#7fba00}
.microsoft-mark i:nth-child(3) {
    background:#00a4ef}
.microsoft-mark i:nth-child(4) {
    background:#ffb900}
.security-note {
    font-size:12px;
    line-height:1.6;
    color:#637784;
    margin-top:20px}
.help {
    border-top:1px solid #dde5e9;
    margin-top:40px;
    padding-top:24px;
    line-height:1.8;
    font-size:13px;
    color:#637784}
.help strong {
    color:#334d5c;
    font-weight:600}
.notice {
    background:#e9f1f4;
    border-radius:8px;
    padding:16px;
    line-height:1.6;
    font-size:14px}
.login-main footer {
    font-size:11px;
    color:#637784;
    grid-row:4}
.login-main footer span {
    padding:0 10px}
.app-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:24px 6%;
    border-bottom:1px solid var(--mast-blue);
    color:#fff;
    background:var(--mast-blue)}
.secondary-button {
    border:1px solid #cbd5db;
    border-radius:8px;
    padding:10px 20px;
    background:#fff;
    color:#18303d}
.home {
    font-size:.9375rem;
    max-width:1100px;
    margin:60px auto;
    padding:0 28px}
.home h1 {
    font-size:clamp(26.25px,3.75vw,37.5px);
    letter-spacing:-.8px}
.next-step {
    background:#fff;
    padding:30px;
    border:1px solid #dde5e9;
    border-radius:12px;
    max-width:700px;
    margin-top:40px}
.next-step p {
    line-height:1.65;
    color:#5c6f7b}
@media(max-width:760px) {
    .login-shell {
    display:block}
.brand-panel {
    display:block;
    padding:25px 28px}
.brand-message {
    margin:0}
.brand-message h1 {
    font-size:32px}
.brand-message p,.brand-line,.brand-footer {
    display:none}
.login-main {
    padding:0 28px 25px;
    min-height:65vh}
.login-card h2 {
    font-size:28px}
.home {
    margin-top:35px}
.app-header {
    padding:20px 28px}
}

.workspace { max-width:1400px; margin:40px auto; padding:0 28px 60px; }
.workspace h1 { font-size:clamp(26px,3vw,38px); letter-spacing:-.6px; }
.workspace h2 { font-size:20px; }
.workspace-nav { font-size:var(--menu-font-size); font-weight:600; display:flex; gap:20px; flex-wrap:wrap; }
.workspace-nav a,.pagination a { text-underline-offset:4px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.section-heading .secondary-button { text-decoration:none; white-space:nowrap; }
.module-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:36px; }
.module-card,.data-panel { background:#fff; border:1px solid #dde5e9; border-radius:12px; padding:24px; }
.module-card { text-decoration:none; }
.module-card:hover { border-color:var(--mast-blue); }
.module-card p { line-height:1.6; color:#5c6f7b; }
.module-card>span:last-child { font-weight:600; color:var(--mast-blue); }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:16px; background:#fff; border:1px solid #dde5e9; border-radius:12px; padding:22px; margin:24px 0; }
.filter-field { display:flex; flex-direction:column; gap:8px; flex:1 1 160px; }
.filter-field label { font-size:14px; font-weight:600; }
.filter-field input,.filter-field select { font:inherit; border:1px solid #a3b5c0; border-radius:6px; padding:10px; min-width:0; width:100%; background:#fff; color:#142a37; }
.primary-button { background:var(--mast-blue); color:#fff; border:1px solid var(--mast-blue); border-radius:8px; padding:11px 22px; font:inherit; }
.table-scroll { overflow-x:auto; background:#fff; border:1px solid #dde5e9; border-radius:10px; }
.table-scroll table { border-collapse:collapse; width:100%; font-size:14px; }
.table-scroll th,.table-scroll td { padding:16px; text-align:left; vertical-align:top; border-bottom:1px solid #e6ecef; }
.table-scroll th { background:#edf3f5; font-weight:650; white-space:nowrap; }
.table-scroll td small { display:block; color:#536b78; margin-top:6px; }
.table-scroll td a { color:var(--mast-blue); font-weight:600; }
.table-scroll .money { white-space:nowrap; font-variant-numeric:tabular-nums; }
.badge { display:inline-block; background:#edf3f5; padding:5px 9px; border-radius:6px; font-size:12px; white-space:nowrap; }
.data-warning { color:#825018; background:#fff5df; padding:8px; border-radius:6px; font-size:13px; white-space:normal; }
.empty-state { padding:30px; background:#fff; border:1px solid #dde5e9; border-radius:10px; }
.pagination { display:flex; justify-content:flex-end; gap:20px; margin:24px 0; }
.detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.detail-grid dt { font-size:13px; color:#536b78; margin-bottom:8px; }
.detail-grid dd { margin:0; overflow-wrap:anywhere; }
.data-panel { margin:24px 0; }
.preserve-lines { white-space:pre-wrap; overflow-wrap:anywhere; }
.back-link { display:inline-block; margin-bottom:20px; }
.totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.totals strong { font-size:26px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:760px) {
    .app-header { flex-wrap:wrap; gap:18px; }
    :root { --menu-font-size:1.0625rem; }
    .workspace-nav { order:3; width:100%; gap:16px; }
    .workspace { padding:0 18px 35px; margin-top:28px; }
    .module-grid,.detail-grid,.totals { grid-template-columns:1fr; }
    .section-heading { align-items:start; flex-direction:column; gap:8px; }
    .filters { padding:18px; }
    .filter-field { flex-basis:100%; }
    .totals { gap:0; }
}

.quote-editor { display:grid; gap:16px; }
.quote-editor label { display:flex; flex-direction:column; gap:6px; font-weight:600; }
.quote-editor input:not([type=checkbox]),.quote-editor select { font:inherit; border:1px solid #a3b5c0; border-radius:6px; padding:10px; min-width:0; width:100%; background:#fff; color:#142a37; }
.quote-editor label:has(input[type=checkbox]) { flex-direction:row; align-items:center; }
.quote-editor fieldset { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin:0; }
.quote-editor legend { font-weight:700; padding:0 8px; }
.quote-editor button { justify-self:start; }
.party-field { position:relative; min-width:0; }
.party-field > label { margin-bottom:6px; }
.party-field > small { display:block; margin-top:6px; color:#536b78; }
.party-options { position:absolute; top:100%; left:0; right:0; z-index:3; max-height:240px; overflow-y:auto; list-style:none; margin:0; padding:4px; background:#fff; border:1px solid #a3b5c0; border-radius:6px; box-shadow:0 4px 12px #142a3726; }
.party-options button { display:block; width:100%; padding:10px; border:0; background:#fff; color:#142a37; font:inherit; text-align:left; cursor:pointer; }
.party-options button:hover,.party-options button[aria-selected=true] { background:#edf3f5; }

.line-movement { display: flex; gap: .5rem; margin-bottom: 1rem; }
[data-line-drag] { cursor: grab; }
.line-dragging { outline: 2px dashed var(--mast-blue); }

.home > .eyebrow { font-size:clamp(1.29rem,2.25vw,1.875rem); line-height:1.2; letter-spacing:.06em; }
.home .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.home .module-card .eyebrow { font-size:1.172rem; letter-spacing:.06em; }
.home .module-card h2 { font-size:clamp(1.406rem,2.25vw,1.758rem); line-height:1.2; margin:.6em 0 .4em; }
.home .module-card p { font-size:1.055rem; line-height:1.5; }
.home .module-card > span:last-child { font-size:1rem; }
@media (max-width:760px) {
    .home .module-grid { grid-template-columns:1fr; }
}

.mast-login-logo { display:block; align-self:center; width:clamp(10rem,18vw,15rem); max-width:100%; height:auto; margin:1.5rem 0; }
.app-header .brand { max-width:100%; font-size:var(--menu-font-size); }
.app-header .brand span { overflow-wrap:anywhere; }
.app-header.workspace-header {
    padding:14px clamp(12px, 1.5vw, 32px);
    gap:24px;
    font-size:14px;
    background:var(--mast-blue);
    color:#fff;
    border-bottom:1px solid var(--mast-blue);
    flex-wrap:wrap;
}
.workspace-header .workspace-nav { gap:8px; }
.workspace-header .workspace-nav a {
    text-decoration:none;
    padding:9px 12px;
    border-radius:5px;
}
.workspace-header .workspace-nav a:hover { background:#234362; }
.workspace-header .secondary-button { padding:9px 14px; }
@media (max-width:760px) {
    .app-header.workspace-header { gap:12px; }
    .workspace-header .workspace-nav { overflow-wrap:anywhere; gap:4px; }
    .workspace-header .workspace-nav a { padding:8px; }
}
