/*
 * FondPas application design system
 * ---------------------------------
 * This is the final visual authority for every authenticated and public
 * application surface. It deliberately sits after redesign.css so legacy
 * templates share one FondPas language without changing their domain logic.
 */

:root {
    --fp-ink: #0e1c30;
    --fp-muted: #566a84;
    --fp-muted-dark: #aab6c8;
    --fp-navy: #101d31;
    --fp-navy-soft: #1d2b42;
    --fp-topbar: #172334;
    --fp-surface: #ffffff;
    --fp-surface-soft: #f7f9fd;
    --fp-canvas: #f2f6fb;
    --fp-line: #dde5ef;
    --fp-violet: #5952f3;
    --fp-violet-deep: #4843d9;
    --fp-cyan: #66cff4;
    --fp-success: #16856b;
    --fp-warning: #a86913;
    --fp-danger: #b84255;
    --fp-radius-large: 34px;
    --fp-radius-medium: 24px;
    --fp-radius-control: 15px;
    --fp-shadow-bar: 0 22px 55px rgba(16, 29, 49, 0.16);
    --fp-shadow-stage: 0 32px 70px rgba(16, 29, 49, 0.18);
    --fp-shadow-surface: 0 20px 55px rgba(16, 29, 49, 0.075);
    --fp-brand-gradient: linear-gradient(100deg, var(--fp-violet), var(--fp-violet-deep));
    --fp-progress-gradient: linear-gradient(90deg, var(--fp-violet) 0%, var(--fp-cyan) 100%);
    --fp-canvas-gradient:
        radial-gradient(circle at 88% 7%, rgba(102, 207, 244, 0.12), transparent 25%),
        linear-gradient(135deg, #f0f3ff 0%, var(--fp-canvas) 48%, #f6fbfc 100%);
    --fp-stage-gradient:
        radial-gradient(circle at 12% 18%, rgba(83, 86, 217, 0.2), transparent 32%),
        var(--fp-navy);
    --fp-soft-gradient:
        linear-gradient(90deg, rgba(89, 82, 243, 0.055), transparent 82%);

    /* Existing templates consume these aliases. */
    --ui-bg: var(--fp-navy);
    --ui-bg-soft: var(--fp-navy-soft);
    --ui-surface: var(--fp-surface);
    --ui-surface-soft: var(--fp-surface-soft);
    --ui-surface-muted: #eef3f9;
    --ui-border: var(--fp-line);
    --ui-border-strong: #c9d9e9;
    --ui-text: var(--fp-ink);
    --ui-text-soft: var(--fp-muted);
    --ui-text-faint: #63758f;
    --ui-text-muted: var(--fp-muted);
    --ui-ink: var(--fp-ink);
    --ui-muted: var(--fp-muted);
    --ui-primary: var(--fp-violet);
    --ui-primary-strong: var(--fp-violet-deep);
    --ui-primary-soft: rgba(89, 82, 243, 0.1);
    --ui-accent: var(--fp-cyan);
    --ui-accent-soft: rgba(102, 207, 244, 0.14);
    --ui-success: var(--fp-success);
    --ui-warning: #d9922e;
    --ui-danger: #d9576e;
    --ui-shadow-sm: var(--fp-shadow-surface);
    --ui-shadow-md: 0 26px 64px rgba(16, 29, 49, 0.12);
    --ui-shadow-lg: var(--fp-shadow-stage);
    --ui-radius-sm: var(--fp-radius-control);
    --ui-radius-md: var(--fp-radius-medium);
    --ui-radius-lg: var(--fp-radius-large);
}

html {
    background: var(--fp-canvas);
}

body {
    color: var(--fp-ink);
    background: var(--fp-canvas-gradient);
    background-attachment: fixed;
}

::selection {
    color: #fff;
    background: var(--fp-violet);
}

.ui-app {
    width: min(100%, 1480px);
    padding: 22px 24px 96px;
}

.ui-page {
    gap: 30px;
}

/* Global FondPas bar */

.ui-topbar {
    top: 18px;
    min-height: 100px;
    margin-bottom: 30px;
    padding: 16px 24px;
    color: #f7f9fd;
    background: rgba(23, 35, 52, 0.985);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 40px;
    box-shadow: var(--fp-shadow-bar);
    backdrop-filter: blur(20px) saturate(125%);
}

.ui-brand-logo {
    width: clamp(205px, 17vw, 260px);
}

.ui-nav-link {
    min-height: 44px;
    padding: 0 17px;
    color: rgba(247, 249, 253, 0.68);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
}

.ui-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.06);
}

.ui-nav-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ui-profile-switcher > summary {
    min-height: 54px;
    padding: 9px 40px 9px 15px;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.018);
}

.ui-topbar .ui-button-ghost {
    min-height: 54px;
    padding-inline: 23px;
    border-color: rgba(255, 255, 255, 0.13);
    background: #f7f9fd;
    color: var(--fp-ink);
    box-shadow: none;
}

@media (min-width: 1121px) {
    .ui-journey-nav {
        position: absolute;
        left: 50%;
        width: max-content;
        max-width: min(38vw, 520px);
        transform: translateX(-50%);
    }
}

/* Typography and compact orientation */

.ui-kicker,
.eyebrow,
.ui-label,
.application-workspace-overline,
.application-step-navigation-label {
    color: #8497b5;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.ui-section-title,
.section-heading h1,
.section-heading h2,
.section-heading h3,
.step-context-bar h2,
.application-workspace-title h1,
.application-overview h2,
.final-gate h2,
.itms-transfer-head h2,
.itms-copy-workspace h2 {
    color: var(--fp-ink);
    font-weight: 750;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.ui-section-copy,
.ui-note,
.muted,
.page-header-copy,
.section-heading > p:not(.eyebrow) {
    color: var(--fp-muted);
}

a {
    text-underline-offset: 0.18em;
}

.text-link,
.application-workspace-source a,
.start-profile-summary a,
.start-discovery-link a,
.application-overview-grid a,
.final-attention-list a {
    color: #308fb8;
}

/* One action language */

.ui-button,
.primary-button {
    min-height: 48px;
    padding-inline: 21px;
    color: #fff;
    background: var(--fp-brand-gradient);
    border: 1px solid rgba(89, 82, 243, 0.28);
    border-radius: var(--fp-radius-control);
    box-shadow: 0 16px 30px rgba(89, 82, 243, 0.22);
}

.ui-button:hover,
.primary-button:hover {
    box-shadow: 0 20px 38px rgba(89, 82, 243, 0.28);
}

.ui-button-secondary,
.secondary-button {
    color: #f7f9fd;
    background: linear-gradient(135deg, #182743 0%, var(--fp-navy) 70%);
    border-color: rgba(255, 255, 255, 0.06);
    border-radius: var(--fp-radius-control);
    box-shadow: 0 14px 28px rgba(16, 29, 49, 0.18);
}

.ui-button-ghost,
.ghost-button {
    color: var(--fp-ink);
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--fp-line);
    border-radius: var(--fp-radius-control);
    box-shadow: none;
}

.ui-button-ghost:hover,
.ghost-button:hover {
    border-color: #b8c3d4;
    box-shadow: 0 12px 28px rgba(16, 29, 49, 0.08);
}

/* Branded stages */

.ui-stage,
.start-workspace {
    position: relative;
    overflow: hidden;
    color: #f7f9fd;
    background: var(--fp-stage-gradient);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: var(--fp-radius-large);
    box-shadow: var(--fp-shadow-stage);
}

.ui-stage::after,
.start-workspace::after {
    position: absolute;
    inset: auto -12% -44% 28%;
    width: 70%;
    aspect-ratio: 1;
    content: "";
    border: 1px solid rgba(102, 207, 244, 0.055);
    border-radius: 50%;
    pointer-events: none;
}

.ui-stage-title {
    color: #f7f9fd;
}

.ui-stage-body {
    color: #b8c3d4;
}

.ui-stage-stat {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.07);
    border-radius: 20px;
}

.ui-stage-stat .ui-label,
.ui-stage .ui-kicker {
    color: #9aabc5;
}

.ui-stage .ui-surface {
    color: var(--fp-ink);
    background: #fff;
    border-color: rgba(255, 255, 255, 0.42);
    border-radius: var(--fp-radius-medium);
    box-shadow: 0 24px 58px rgba(4, 12, 25, 0.22);
}

.ui-page > .ui-stage:first-child {
    min-height: 560px;
}

.ui-page > .ui-stage:first-child > .ui-stage-panel {
    min-height: inherit;
    padding: clamp(46px, 5.5vw, 78px);
}

.ui-page > .ui-stage:first-child .ui-stage-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    gap: clamp(42px, 6vw, 96px);
}

.ui-page > .ui-stage:first-child .ui-stage-copy {
    justify-content: center;
}

.ui-page > .ui-stage:first-child .ui-stage-title {
    font-size: clamp(3.5rem, 6vw, 7.4rem);
    line-height: 0.88;
    letter-spacing: -0.08em;
}

/* Brand promise: public entry and application signature */

.ui-auth-shell {
    min-height: min(720px, calc(100svh - 190px));
    display: block;
}

.ui-auth-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(370px, 0.85fr);
    gap: clamp(42px, 6vw, 88px);
    min-height: 620px;
    overflow: hidden;
    padding: clamp(34px, 4.5vw, 68px);
    color: #f7f9fd;
    background: var(--fp-stage-gradient);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: var(--fp-radius-large);
    box-shadow: var(--fp-shadow-stage);
}

.ui-auth-stage::after {
    position: absolute;
    inset: auto -12% -52% 22%;
    width: 78%;
    aspect-ratio: 1;
    content: "";
    border: 1px solid rgba(102, 207, 244, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.ui-auth-brand,
.ui-auth-card {
    position: relative;
    z-index: 1;
}

.ui-auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.ui-auth-brand .ui-kicker {
    color: #9aabc5;
}

.ui-auth-brand h1 {
    max-width: 9ch;
    margin: 14px 0 28px;
    color: #fff;
    font: 760 clamp(4.2rem, 7vw, 7.7rem) / 0.84 var(--ui-font-display);
    letter-spacing: -0.085em;
    text-wrap: balance;
}

.ui-auth-brand > p:last-child {
    max-width: 560px;
    margin: 0;
    color: #b8c3d4;
    font-size: clamp(1rem, 1.2vw, 1.16rem);
    line-height: 1.7;
}

.ui-auth-card {
    align-self: stretch;
    width: auto;
    display: grid;
    align-items: center;
    padding: clamp(30px, 3vw, 46px);
    color: var(--fp-ink);
    background: rgba(255, 255, 255, 0.985);
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: var(--fp-radius-medium);
    box-shadow: 0 24px 58px rgba(4, 12, 25, 0.24);
}

.ui-auth-card-head h2 {
    margin: 10px 0 12px;
    color: var(--fp-ink);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.ui-auth-card-head > p:last-child {
    margin: 0;
    color: var(--fp-muted);
    line-height: 1.6;
}

.start-brand-promise {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    margin: 0;
    color: #aebcd0;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.start-brand-promise span {
    color: var(--fp-cyan);
}

.ui-site-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-top: 48px;
    padding: 30px 10px 0;
    color: var(--fp-muted);
    border-top: 1px solid rgba(16, 29, 49, 0.1);
}

.ui-site-footer-signature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ui-site-footer-logo {
    display: block;
    width: 92px;
    max-width: 100%;
    height: auto;
}

.ui-site-footer-signature span {
    color: #60718a;
    font-size: 0.82rem;
    font-weight: 600;
}

.ui-site-footer p {
    margin: 0;
    font-size: 0.74rem;
}

.ui-site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
}

.ui-site-footer-links a {
    color: #50637d;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
}

.ui-site-footer-links a:hover,
.ui-site-footer-links a:focus-visible {
    color: #5548e8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-document {
    max-width: 1120px;
    margin-inline: auto;
}

.legal-document > .ui-panel {
    padding: clamp(30px, 5vw, 64px);
}

.legal-document h1 {
    max-width: 16ch;
    margin: 8px 0 14px;
    color: var(--fp-ink);
    font-size: clamp(2.25rem, 6vw, 4.8rem);
    line-height: 0.94;
    letter-spacing: -0.055em;
}

.legal-lead {
    max-width: 68ch;
    margin: 0;
    color: var(--fp-muted);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.65;
}

.legal-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 38px;
    border-top: 1px solid var(--fp-line);
}

.legal-document-grid article {
    min-width: 0;
    padding: 26px 28px 28px 0;
    border-bottom: 1px solid var(--fp-line);
}

.legal-document-grid article:nth-child(even) {
    padding-right: 0;
    padding-left: 28px;
    border-left: 1px solid var(--fp-line);
}

.legal-document-grid h2 {
    margin: 0 0 10px;
    color: var(--fp-ink);
    font-size: 1.05rem;
}

.legal-document-grid p {
    margin: 0 0 8px;
    color: var(--fp-muted);
    line-height: 1.65;
}

.legal-updated {
    margin: 24px 0 0;
    color: var(--fp-muted);
    font-size: 0.75rem;
}

/*
 * The landing page does not use an admin dashboard hero. It follows the
 * live FondPas composition: one generous navy stage and one asymmetric
 * white action panel.
 */

.start-workspace {
    min-height: 660px;
    padding: clamp(34px, 4vw, 64px);
    scroll-margin-top: 152px;
}

.start-workspace-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
    gap: clamp(48px, 7vw, 112px);
    min-height: 530px;
    align-items: stretch;
}

.start-workspace-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.start-workspace-copy > h1 {
    max-width: none;
    margin: 10px 0 24px;
    color: #fff;
    font: 760 clamp(4.5rem, 8vw, 8.5rem) / 0.84 var(--ui-font-display);
    letter-spacing: -0.09em;
    white-space: nowrap;
}

.start-workspace-copy > p:not(.ui-kicker) {
    max-width: 760px;
    margin: 0;
    color: #b8c3d4;
    font-size: clamp(1rem, 1.25vw, 1.18rem);
    line-height: 1.7;
}

.start-workspace-copy > .start-paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 12px;
    margin-top: 40px;
    padding-top: 0;
    border: 0;
}

.start-workspace-copy .start-path-choice {
    position: relative;
    display: grid;
    gap: 7px;
    min-height: 118px;
    align-content: center;
    padding: 20px 22px;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.095);
    border-radius: 20px;
    animation: fp-start-choice-glow 1320ms 520ms cubic-bezier(0.22, 0.76, 0.24, 1);
    transition:
        transform 170ms ease,
        background-color 170ms ease,
        border-color 170ms ease,
        box-shadow 220ms ease;
}

.start-workspace-copy .start-path-choice:nth-child(2) {
    animation-delay: 650ms;
}

.start-workspace-copy .start-path-choice:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.105);
    border-color: rgba(102, 207, 244, 0.3);
    box-shadow: 0 14px 32px rgba(4, 12, 28, 0.2);
}

.start-workspace-copy .start-path-choice strong {
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.15;
}

.start-workspace-copy .start-path-choice small {
    color: #aebcd0;
    font-size: 0.78rem;
}

.start-workspace-copy .start-path-choice .start-path-number {
    position: absolute;
    top: 18px;
    right: 20px;
    color: rgba(255, 255, 255, 0.26);
    font-size: 1rem;
}

@keyframes fp-start-choice-glow {
    0%,
    100% {
        border-color: rgba(255, 255, 255, 0.095);
        background: rgba(255, 255, 255, 0.07);
        box-shadow: 0 0 0 rgba(89, 82, 243, 0);
    }
    42% {
        border-color: rgba(102, 207, 244, 0.42);
        background: rgba(255, 255, 255, 0.105);
        box-shadow:
            0 0 0 1px rgba(89, 82, 243, 0.18),
            0 14px 34px rgba(89, 82, 243, 0.18),
            0 0 28px rgba(102, 207, 244, 0.11);
    }
}

.start-saved-briefs {
    width: max-content;
    margin-top: 18px;
    color: var(--fp-cyan);
    font-size: 0.8rem;
    font-weight: 700;
}

.start-workspace-panel {
    display: flex;
    flex-direction: column;
    color: var(--fp-ink);
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--fp-radius-medium);
    box-shadow: 0 24px 58px rgba(4, 12, 25, 0.22);
    scroll-margin-top: 152px;
}

.discovery-results {
    scroll-margin-top: 152px;
}

.start-workspace-panel-main {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 34px 32px 30px;
}

.start-workspace-panel-main > .start-path-number {
    position: absolute;
    top: 36px;
    right: 32px;
    color: #c9d4e2;
    font-size: 1.15rem;
}

.start-workspace-panel-main h2 {
    max-width: 12ch;
    margin: 0;
    color: var(--fp-ink);
    font-size: clamp(1.7rem, 2.5vw, 2.25rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.start-workspace-panel-main > p:not(.ui-kicker) {
    margin: 0;
    color: var(--fp-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.start-workspace-panel .start-path-form {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.start-workspace-panel .start-path-form .ui-button {
    width: 100%;
}

.start-workspace-panel .start-discovery-link {
    justify-content: flex-start;
    padding: 18px 0 0;
    border-top: 1px solid var(--fp-line);
    background: transparent;
    border-radius: 0;
}

.start-profile-summary {
    margin-top: auto;
    padding: 24px 32px 26px;
    border: 0;
    border-top: 1px solid var(--fp-line);
    background: var(--fp-surface-soft);
    border-radius: 0 0 var(--fp-radius-medium) var(--fp-radius-medium);
}

.start-profile-summary strong {
    margin-top: 8px;
    color: var(--fp-ink);
    font-size: 1.03rem;
    line-height: 1.2;
}

.start-profile-summary p {
    color: var(--fp-muted);
}

.start-workspace-panel .ui-input {
    color: var(--fp-ink);
    background: var(--fp-surface-soft);
    border-color: var(--fp-line);
}

.start-workspace-panel .ui-input::placeholder {
    color: #8191a7;
}

.start-intelligence-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 38px 34px 30px;
}

.start-intelligence-main h2 {
    max-width: 10ch;
    margin: 12px 0 14px;
    color: var(--fp-ink);
    font-size: clamp(2.1rem, 3.2vw, 3.2rem);
    line-height: 0.94;
    letter-spacing: -0.06em;
}

.start-intelligence-main > p:not(.ui-kicker) {
    margin: 0;
    color: var(--fp-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.start-intelligence-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 28px 0;
    border-block: 1px solid var(--fp-line);
}

.start-intelligence-metrics > div {
    display: grid;
    gap: 4px;
    padding: 20px 10px 20px 0;
}

.start-intelligence-metrics > div + div {
    padding-left: 14px;
    border-left: 1px solid var(--fp-line);
}

.start-intelligence-metrics strong {
    color: var(--fp-ink);
    font-size: 1.9rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.start-intelligence-metrics span {
    color: var(--fp-muted);
    font-size: 0.66rem;
    line-height: 1.25;
}

.start-intelligence-main > .ui-button {
    width: 100%;
    margin-top: auto;
}

.start-intelligence-sync {
    margin-top: 12px;
    color: #8191a7;
    text-align: center;
}

/* URL-first intake: one focused action, then a human confirmation gate. */

.call-intake-stage,
.brief-review-stage {
    position: relative;
    overflow: hidden;
    color: #f7f9fd;
    background: var(--fp-stage-gradient);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: var(--fp-radius-large);
    box-shadow: var(--fp-shadow-stage);
}

.call-intake-stage::after,
.brief-review-stage::after {
    position: absolute;
    right: -16%;
    bottom: -56%;
    width: 72%;
    aspect-ratio: 1;
    content: "";
    border: 1px solid rgba(102, 207, 244, 0.065);
    border-radius: 50%;
    pointer-events: none;
}

.call-intake-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
    gap: clamp(48px, 7vw, 110px);
    min-height: 590px;
    padding: clamp(34px, 3.8vw, 54px);
}

.call-intake-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.call-intake-copy h1,
.brief-review-stage-copy h1 {
    max-width: 12ch;
    margin: 10px 0 20px;
    color: #fff;
    font-size: clamp(3.5rem, 5.4vw, 5.7rem);
    line-height: 0.89;
    letter-spacing: -0.075em;
}

.call-intake-copy > p:not(.ui-kicker),
.brief-review-stage-copy > p:not(.ui-kicker) {
    max-width: 760px;
    margin: 0;
    color: #b8c3d4;
    line-height: 1.58;
}

.call-intake-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 26px 0 20px;
    padding: 0;
    list-style: none;
    border-block: 1px solid rgba(255, 255, 255, 0.09);
}

.call-intake-steps li {
    display: grid;
    gap: 5px;
    padding: 14px 18px 14px 0;
}

.call-intake-steps li + li {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.call-intake-steps span {
    color: #788aa5;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.call-intake-steps strong {
    color: #f7f9fd;
    font-size: 0.86rem;
}

.call-intake-steps small {
    color: #8fa0b8;
    font-size: 0.68rem;
}

.call-intake-form {
    display: grid;
    gap: 14px;
}

.call-intake-form label {
    display: grid;
    gap: 10px;
}

.call-intake-form label > span {
    color: #dfe7f3;
    font-size: 0.78rem;
    font-weight: 750;
}

.call-intake-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
}

.call-intake-control input {
    min-width: 0;
    height: 54px;
    padding: 0 18px;
    color: #f7f9fd;
    background: transparent;
    border: 0;
    outline: 0;
}

.call-intake-control input::placeholder {
    color: #71839d;
}

.call-intake-control:focus-within {
    border-color: rgba(102, 207, 244, 0.5);
    box-shadow: 0 0 0 4px rgba(102, 207, 244, 0.08);
}

.call-intake-control button,
.brief-review-actions button {
    min-height: 54px;
    padding: 0 24px;
    color: #fff;
    font-weight: 760;
    background: var(--fp-brand-gradient);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(89, 82, 243, 0.24);
    cursor: pointer;
}

.call-intake-loading {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 14px 16px;
    color: #dbe5f2;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.call-intake-loading > span {
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, 0.24);
    border-top-color: var(--fp-cyan);
    border-radius: 50%;
    animation: fp-spin 800ms linear infinite;
}

.call-intake-loading div {
    display: grid;
    gap: 3px;
}

.call-intake-loading small {
    color: #93a5bd;
}

.call-intake-error,
.brief-review-errors {
    padding: 16px 18px;
    color: #ffe9ed;
    background: rgba(184, 66, 85, 0.17);
    border: 1px solid rgba(235, 122, 139, 0.27);
    border-radius: 16px;
}

.call-intake-error p,
.brief-review-errors p {
    margin: 5px 0 0;
}

.call-intake-back {
    width: max-content;
    margin-top: 20px;
    color: #8dcce5;
    font-size: 0.78rem;
}

.call-intake-profile {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    overflow: hidden;
    color: var(--fp-ink);
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--fp-radius-medium);
    box-shadow: 0 24px 58px rgba(4, 12, 25, 0.22);
}

.call-intake-profile > div:first-child {
    padding: 36px 32px 30px;
}

.call-intake-profile h2 {
    margin: 12px 0 10px;
    color: var(--fp-ink);
    font-size: 1.55rem;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.call-intake-profile p {
    color: var(--fp-muted);
    line-height: 1.55;
}

.call-intake-profile a {
    color: #308fb8;
    font-size: 0.78rem;
    font-weight: 750;
}

.call-intake-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: auto;
    border-block: 1px solid var(--fp-line);
}

.call-intake-profile-stats div {
    display: grid;
    gap: 5px;
    padding: 22px 12px;
}

.call-intake-profile-stats div + div {
    border-left: 1px solid var(--fp-line);
}

.call-intake-profile-stats strong {
    font-size: 1.55rem;
    letter-spacing: -0.05em;
}

.call-intake-profile-stats span {
    color: var(--fp-muted);
    font-size: 0.63rem;
}

.call-intake-profile footer {
    display: grid;
    gap: 4px;
    padding: 22px 32px 26px;
    background: var(--fp-surface-soft);
}

.call-intake-profile footer span {
    color: var(--fp-muted);
    font-size: 0.68rem;
}

.call-intake-profile footer strong {
    font-size: 0.78rem;
}

/* AI brief review */

.brief-review-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: clamp(48px, 7vw, 110px);
    min-height: 500px;
    padding: clamp(40px, 5vw, 70px);
}

.brief-review-stage-copy,
.brief-review-status {
    position: relative;
    z-index: 1;
}

.brief-review-stage-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brief-review-stage-copy h1 {
    font-size: clamp(3.4rem, 5.6vw, 6.4rem);
}

.brief-review-call {
    display: grid;
    gap: 6px;
    max-width: 690px;
    margin-top: 30px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
}

.brief-review-call span {
    color: #8fa0b8;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brief-review-call strong {
    color: #fff;
}

.brief-review-call a {
    width: max-content;
    color: var(--fp-cyan);
    font-size: 0.74rem;
}

.brief-review-status {
    align-self: stretch;
    padding: 34px 32px;
    color: var(--fp-ink);
    background: #fff;
    border-radius: var(--fp-radius-medium);
    box-shadow: 0 24px 58px rgba(4, 12, 25, 0.22);
}

.brief-review-status ol {
    display: grid;
    gap: 0;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.brief-review-status li {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 56px;
    color: #8998ac;
    border-top: 1px solid var(--fp-line);
}

.brief-review-status li span {
    font-size: 0.67rem;
    font-weight: 800;
}

.brief-review-status li strong {
    font-size: 0.82rem;
}

.brief-review-status li.is-done {
    color: var(--fp-success);
}

.brief-review-status li.is-current {
    color: var(--fp-ink);
}

.brief-review-status li.is-current::after {
    position: absolute;
    right: 0;
    width: 8px;
    height: 8px;
    content: "";
    background: var(--fp-violet);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(89, 82, 243, 0.1);
}

.brief-review-status li.needs-input {
    color: var(--fp-warning);
}

.brief-review-shell {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: var(--fp-radius-medium);
    box-shadow: var(--fp-shadow-surface);
}

.brief-review-head {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 36px clamp(28px, 4vw, 54px);
    border-bottom: 1px solid var(--fp-line);
}

.brief-review-head h2 {
    max-width: 850px;
    margin: 10px 0;
    color: var(--fp-ink);
    font-size: clamp(2rem, 3.2vw, 3.5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.brief-review-head p {
    max-width: 760px;
    margin: 0;
    color: var(--fp-muted);
}

.brief-review-badge {
    flex: 0 0 auto;
    padding: 10px 13px;
    color: var(--fp-violet-deep);
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(89, 82, 243, 0.08);
    border: 1px solid rgba(89, 82, 243, 0.13);
    border-radius: 999px;
}

.brief-review-errors {
    margin: 28px clamp(28px, 4vw, 54px) 0;
    color: var(--fp-danger);
    background: #fff4f6;
    border-color: #f3d0d7;
}

.brief-review-missing {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 24px clamp(28px, 4vw, 54px) 0;
}

.brief-review-missing span {
    color: var(--fp-muted);
    font-size: 0.72rem;
}

.brief-review-missing strong {
    padding: 7px 10px;
    color: var(--fp-warning);
    font-size: 0.7rem;
    background: #fff8ec;
    border: 1px solid #f2dfbd;
    border-radius: 999px;
}

.brief-review-form {
    display: grid;
    gap: 0;
    padding: 10px clamp(28px, 4vw, 54px) 46px;
}

.brief-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--fp-line);
}

.brief-review-grid .brief-review-field:nth-child(odd) {
    padding-right: 32px;
}

.brief-review-grid .brief-review-field:nth-child(even) {
    padding-left: 32px;
    border-left: 1px solid var(--fp-line);
}

.brief-review-field {
    display: grid;
    gap: 14px;
    padding-block: 28px;
}

.brief-review-field--wide + .brief-review-grid,
.brief-review-grid + .brief-review-field--wide {
    border-top: 1px solid var(--fp-line);
}

.brief-review-field > span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    justify-content: space-between;
}

.brief-review-field strong {
    color: var(--fp-ink);
}

.brief-review-field small {
    color: #8292a8;
    font-size: 0.68rem;
}

.brief-review-field input,
.brief-review-field textarea {
    width: 100%;
    padding: 16px 17px;
    color: var(--fp-ink);
    font: inherit;
    line-height: 1.55;
    background: #f8fafd;
    border: 1px solid var(--fp-line);
    border-radius: 14px;
    outline: 0;
    resize: vertical;
}

.brief-review-field input:focus,
.brief-review-field textarea:focus {
    background: #fff;
    border-color: rgba(89, 82, 243, 0.52);
    box-shadow: 0 0 0 4px rgba(89, 82, 243, 0.07);
}

.brief-review-confirm {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 6px;
    padding: 22px;
    background: linear-gradient(90deg, rgba(89, 82, 243, 0.06), rgba(102, 207, 244, 0.045));
    border: 1px solid rgba(89, 82, 243, 0.14);
    border-radius: 18px;
}

.brief-review-confirm input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--fp-violet);
}

.brief-review-confirm span {
    display: grid;
    gap: 5px;
}

.brief-review-confirm strong {
    color: var(--fp-ink);
}

.brief-review-confirm small {
    color: var(--fp-muted);
    line-height: 1.5;
}

.brief-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    margin-top: 22px;
}

.brief-review-actions a {
    color: var(--fp-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

@keyframes fp-spin {
    to { transform: rotate(360deg); }
}

/* Shared surfaces: new and legacy templates */

:where(
    .ui-surface,
    .card,
    .start-workspace,
    .work-register,
    .application-workspace-head,
    .final-gate,
    .final-attention,
    .final-human-input,
    .final-evidence-details,
    .application-overview,
    .application-overview-attention,
    .application-output-register,
    .itms-transfer-head,
    .itms-transfer-summary,
    .itms-copy-workspace,
    .itms-human-boundary,
    .expert-trace
) {
    border-color: var(--fp-line);
    border-radius: var(--fp-radius-medium);
    box-shadow: var(--fp-shadow-surface);
}

:where(
    .ui-surface,
    .card,
    .work-register,
    .application-workspace-head,
    .final-gate,
    .final-attention,
    .final-human-input,
    .final-evidence-details,
    .application-overview,
    .application-overview-attention,
    .application-output-register,
    .itms-transfer-head,
    .itms-transfer-summary,
    .itms-copy-workspace,
    .expert-trace
) {
    background: rgba(255, 255, 255, 0.965);
}

.ui-surface::before,
.card::before {
    display: none;
}

.ui-panel,
.card,
.workspace-step-main,
.ai-review-workspace {
    padding: clamp(24px, 2.5vw, 36px);
}

:where(
    .ui-metric-card,
    .ui-case-card,
    .ui-guidance-card,
    .ui-source-card,
    .ui-form-card,
    .ui-content-card,
    .ui-side-card,
    .ui-review-card,
    .ui-call-card,
    .guidance-card,
    .callout-card,
    .output-card,
    .review-metric-card,
    .budget-row,
    .document-ops-card,
    .requirement-card,
    .register-row,
    .review-summary-block,
    .application-command-card,
    .application-command-actions,
    .application-hero-mini,
    .step-stage-stat,
    .list-row.static
) {
    color: var(--fp-ink);
    background: var(--fp-surface-soft);
    border: 1px solid var(--fp-line);
    border-radius: 20px;
    box-shadow: none;
}

.ui-case-card:hover,
.ui-call-card:hover,
.ui-guidance-card:hover,
.register-row:hover {
    border-color: #c9d9e9;
    background: #fff;
    box-shadow: 0 16px 36px rgba(16, 29, 49, 0.075);
}

/* Project command surface */

.application-workspace-head {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
    gap: clamp(38px, 5vw, 78px);
    padding: clamp(32px, 4vw, 58px);
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 18%, rgba(89, 82, 243, 0.19), transparent 30%),
        var(--fp-navy);
    border-color: rgba(255, 255, 255, 0.055);
    border-radius: var(--fp-radius-large);
    box-shadow: var(--fp-shadow-stage);
}

.application-workspace-title {
    align-self: center;
    padding: 0;
}

.application-workspace-overline {
    margin-bottom: 8px;
    font-size: 0.7rem;
}

.application-workspace-title h1 {
    max-width: 820px;
    margin-block: 12px 18px;
    color: #fff;
    font-size: clamp(2.7rem, 4.8vw, 5.6rem);
    line-height: 0.9;
    letter-spacing: -0.07em;
}

.application-workspace-title > p {
    color: #b8c3d4;
    font-size: 1rem;
}

.application-decision-strip {
    align-self: stretch;
    overflow: hidden;
    color: var(--fp-ink);
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--fp-radius-medium);
    box-shadow: 0 24px 58px rgba(4, 12, 25, 0.22);
}

.application-decision-strip article {
    padding: 28px 30px;
}

.application-decision-strip article + article {
    border-top-color: var(--fp-line);
}

.application-decision-strip strong {
    color: var(--fp-ink);
    font-size: 1.05rem;
}

.application-decision-strip p {
    color: var(--fp-muted);
}

.application-truth-strip {
    grid-column: 1 / -1;
    margin: 2px calc(clamp(32px, 4vw, 58px) * -1) calc(clamp(32px, 4vw, 58px) * -1);
    border-top-color: var(--fp-line);
    background: rgba(255, 255, 255, 0.055);
}

.application-truth-strip > span + span {
    border-left-color: rgba(255, 255, 255, 0.085);
}

.application-truth-strip small {
    color: #91a3bd;
}

.application-truth-strip strong {
    color: #f7f9fd;
}

.application-truth-strip > .ui-chip {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.application-workspace-source .ui-chip-light {
    color: #eaf0f8;
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.1);
}

.application-workspace-source details {
    color: #aab6c8;
}

.application-workspace-source details > summary {
    color: #b8c3d4;
}

.ui-progress-track,
.progress-track,
.review-progress-track {
    background: #e9f2fb;
}

.ui-progress-bar,
.progress-bar,
.review-progress-bar {
    background: var(--fp-progress-gradient);
}

/* One persistent project path */

.application-step-navigation {
    top: 132px;
    margin-top: -17px;
    padding: 12px 16px;
    border-color: rgba(221, 229, 239, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(16, 29, 49, 0.1);
    backdrop-filter: blur(22px) saturate(130%);
}

.application-step-navigation > div {
    gap: 3px;
}

.application-step-navigation > div a,
.application-step-review-link {
    min-height: 36px;
    padding: 9px 12px;
    color: var(--fp-muted);
    border: 1px solid transparent;
    border-radius: 11px;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.application-step-navigation > div a:hover {
    color: var(--fp-ink);
    background: #eef4fa;
}

.application-step-navigation > div a.is-active {
    color: #fff;
    background: var(--fp-navy);
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 9px 20px rgba(16, 29, 49, 0.16);
}

.application-step-navigation > div a.is-done:not(.is-active) {
    color: #18745f;
}

.application-step-navigation > div a.is-gate {
    border-left-color: var(--fp-line);
}

/* Workspaces and long forms */

.workspace-step-shell {
    gap: 22px;
}

.step-context-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 42px;
    align-items: end;
    padding: 28px 8px 34px;
    border-bottom-color: var(--fp-line);
}

.step-context-bar h2 {
    color: var(--fp-ink);
    margin: 8px 0 10px;
    font-size: clamp(2.4rem, 4vw, 4.8rem);
    line-height: 0.92;
    letter-spacing: -0.065em;
}

.workspace-step-layout {
    grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.58fr);
    gap: 28px;
}

.workspace-step-main {
    overflow: hidden;
    border-color: var(--fp-line);
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--fp-radius-medium);
    box-shadow: var(--fp-shadow-surface);
}

.workspace-step-main > .section-heading:first-of-type {
    margin: calc(clamp(24px, 2.5vw, 36px) * -1) calc(clamp(24px, 2.5vw, 36px) * -1) 4px;
    padding: 30px clamp(24px, 2.5vw, 36px);
    color: #fff;
    background:
        radial-gradient(circle at 92% 0%, rgba(102, 207, 244, 0.13), transparent 28%),
        var(--fp-navy);
}

.workspace-step-main > .section-heading:first-of-type .eyebrow {
    color: #91a3bd;
}

.workspace-step-main > .section-heading:first-of-type h2 {
    margin: 7px 0 0;
    color: #fff;
    font-size: clamp(1.75rem, 2.5vw, 2.7rem);
}

.workspace-step-main > .ai-worknote {
    display: grid;
    grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 20px 22px;
    background: transparent;
    border: 1px solid var(--fp-line);
    border-radius: 18px;
}

.workspace-step-main > .ai-worknote p {
    margin: 0;
    color: var(--fp-muted);
}

.workspace-step-side {
    position: sticky;
    top: 198px;
    display: grid;
    gap: 16px;
}

.workspace-step-side .guidance-card {
    padding: 22px;
    background: rgba(247, 249, 253, 0.94);
}

.workspace-step-side .guidance-card:first-child {
    color: #f7f9fd;
    background:
        radial-gradient(circle at 100% 0%, rgba(102, 207, 244, 0.14), transparent 34%),
        var(--fp-navy);
    border-color: rgba(255, 255, 255, 0.055);
}

.workspace-step-side .guidance-card:first-child .eyebrow {
    color: #9aabc5;
}

.workspace-step-side .guidance-card:first-child h3 {
    color: #fff;
}

.workspace-step-side .guidance-card:first-child p {
    color: #b8c3d4;
}

.workspace-mini-list {
    color: var(--fp-muted);
}

.form-footer {
    position: sticky;
    bottom: 14px;
    z-index: 6;
    margin: 8px -12px -12px;
    padding: 14px 16px;
    border: 1px solid rgba(221, 229, 239, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(16, 29, 49, 0.12);
    backdrop-filter: blur(20px);
}

/* Forms share one material */

.field,
.ui-field {
    gap: 8px;
}

.field > span:first-child,
.ui-field > span:first-child {
    color: var(--fp-ink);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.field input,
.field select,
.field textarea,
.ui-input,
.ui-select,
.ui-textarea {
    min-height: 48px;
    padding: 13px 15px;
    color: var(--fp-ink);
    background: #fff;
    border: 1px solid var(--fp-line);
    border-radius: var(--fp-radius-control);
    box-shadow: inset 0 1px 0 rgba(16, 29, 49, 0.015);
}

.field textarea,
.ui-textarea {
    min-height: 148px;
    line-height: 1.55;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.ui-input:hover,
.ui-select:hover,
.ui-textarea:hover {
    border-color: #c9d9e9;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
    outline: none;
    border-color: rgba(89, 82, 243, 0.48);
    box-shadow: 0 0 0 4px rgba(89, 82, 243, 0.1);
}

.field input[type="file"] {
    background: var(--fp-surface-soft);
}

.field-meta,
.field small,
.ui-note-small {
    color: #71839a;
}

.ai-draft-field input,
.ai-draft-field textarea,
.ai-draft-field select,
.needs-confirmation-field input,
.needs-confirmation-field textarea,
.needs-confirmation-field select {
    background:
        linear-gradient(135deg, rgba(102, 207, 244, 0.055), rgba(238, 244, 250, 0.3)),
        #fff;
    border-color: #d4e2f0;
}

[data-manual-highlight].is-humanized input,
[data-manual-highlight].is-humanized textarea,
[data-manual-highlight].is-humanized select {
    background: #f4fbf8;
    border-color: #cce8df;
}

/* Repeating budget and KPI records are structured dossiers, not plain boxes. */

.budget-row {
    counter-increment: fp-budget-record;
    position: relative;
    display: grid;
    gap: 19px;
    padding: clamp(22px, 2.3vw, 30px);
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(102, 207, 244, 0.055), transparent 58%),
        #f7f9fd;
    border-color: #dce5f2;
    border-radius: 22px;
}

.workspace-step-main {
    counter-reset: fp-budget-record;
}

.budget-row::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    content: "";
    background: var(--fp-progress-gradient);
    opacity: 0.72;
}

.budget-row::after {
    position: absolute;
    top: 18px;
    right: 22px;
    color: #cad5e3;
    content: counter(fp-budget-record, decimal-leading-zero);
    font: 760 1.25rem/1 var(--ui-font-display);
}

.budget-row .grid {
    gap: 16px;
}

.budget-row .field input,
.budget-row .field select,
.budget-row .field textarea {
    background-color: rgba(255, 255, 255, 0.96);
}

.budget-row .field textarea {
    min-height: 116px;
}

.budget-row-disclosure {
    padding: 0;
}

.budget-row-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 92px;
    padding: 24px 58px 24px 24px;
    cursor: pointer;
    list-style: none;
}

.budget-row-disclosure > summary::-webkit-details-marker {
    display: none;
}

.budget-row-disclosure > summary > span:first-child,
.budget-row-summary-meta {
    display: grid;
    gap: 6px;
}

.budget-row-disclosure > summary small {
    color: var(--fp-ink-muted);
}

.budget-row-summary-meta {
    flex: 0 0 auto;
    text-align: right;
}

.budget-row-disclosure[open] > summary {
    border-bottom: 1px solid var(--fp-line);
    background: rgba(255, 255, 255, 0.78);
}

.budget-row-body {
    display: grid;
    gap: 16px;
    padding: 24px;
}

@media (max-width: 720px) {
    .budget-row-disclosure > summary {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 52px;
    }

    .budget-row-summary-meta {
        text-align: left;
    }
}

/* Status, warnings and evidence */

.ui-callout,
.callout-card,
.inline-note,
.review-summary-block {
    border-color: var(--fp-line);
    background: var(--fp-surface-soft);
    border-radius: 18px;
}

.callout-card.accent,
.guidance-card.subtle,
.review-summary-block.emphasis,
.ai-worknote.accent {
    background:
        linear-gradient(90deg, rgba(102, 207, 244, 0.085), rgba(247, 249, 253, 0.55)),
        #f7f9fd;
    border-color: #d8e2f1;
}

.callout-card.warning,
.ui-callout-warning,
.warning {
    color: #764b0d;
    background: #fff8ec;
    border-color: #f0dfc2;
}

.callout-card.danger,
.ui-callout-danger,
.danger {
    color: #8d3041;
    background: #fff3f5;
    border-color: #f2d6dc;
}

.callout-card.success,
.ui-callout-success,
.success,
.final-clear {
    color: #12634f;
    background: #edf9f5;
    border-color: #cee9df;
}

.ui-chip,
.ui-chip-light,
.pill,
.recommendation-priority,
.review-status-indicator {
    border-color: var(--fp-line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--fp-ink);
}

.ui-chip-primary {
    color: #4740c8;
    background: rgba(89, 82, 243, 0.1);
    border-color: rgba(89, 82, 243, 0.16);
}

.ui-chip-success {
    color: #12634f;
    background: #e8f6f1;
    border-color: #cee9df;
}

.ui-chip-warning {
    color: #82530f;
    background: #fff4df;
    border-color: #f0dfc2;
}

.ui-chip-danger {
    color: #973a4a;
    background: #fdecef;
    border-color: #f2d6dc;
}

/* Registers, details and tables */

.ui-register,
.table-list,
.requirement-review-list,
.draft-stack,
.detail-list {
    gap: 14px;
}

.requirement-basic-overview {
    display: grid;
    gap: 22px;
}

.requirement-basic-overview > .hero-actions {
    justify-content: flex-start;
}

.requirement-basic-groups {
    display: grid;
    gap: 12px;
}

.requirement-basic-group {
    overflow: hidden;
    border: 1px solid var(--fp-line);
    border-radius: var(--fp-radius-medium);
    background: var(--fp-surface-soft);
}

.requirement-basic-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}

.requirement-basic-group > summary::-webkit-details-marker {
    display: none;
}

.requirement-basic-group > summary > span:first-child {
    display: grid;
    gap: 6px;
}

.requirement-basic-group > summary small {
    max-width: 72ch;
    color: var(--fp-ink-muted);
}

.requirement-basic-group[open] > summary {
    border-bottom: 1px solid var(--fp-line);
    background: #fff;
}

.requirement-basic-list {
    display: grid;
    gap: 0;
    padding: 0 22px;
}

.requirement-basic-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
}

.requirement-basic-item + .requirement-basic-item {
    border-top: 1px solid var(--fp-line);
}

.requirement-basic-item h3 {
    margin: 0 0 6px;
}

.requirement-basic-item p {
    margin: 0;
    color: var(--fp-ink-muted);
}

@media (max-width: 720px) {
    .requirement-basic-group > summary,
    .requirement-basic-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

.discovery-planned > .ui-panel,
.discovery-results > .ui-panel,
.work-register {
    padding: clamp(34px, 4vw, 58px);
}

.discovery-planned .ui-register,
.discovery-results .ui-register,
.work-register-list {
    gap: 0;
    margin-top: 28px;
    border-top: 1px solid var(--fp-line);
}

.discovery-planned .ui-call-card,
.discovery-results .ui-call-card,
.work-case {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--fp-line);
    border-radius: 0;
}

.discovery-planned .ui-call-card,
.discovery-results .ui-call-card {
    padding-block: 26px;
}

.discovery-planned .ui-call-card:hover,
.discovery-results .ui-call-card:hover,
.work-case:hover {
    background: linear-gradient(90deg, rgba(102, 207, 244, 0.06), transparent 70%);
    box-shadow: none;
}

.work-case {
    padding: 22px 0;
}

.work-case.is-priority {
    background: transparent;
    box-shadow: inset 3px 0 0 var(--fp-violet);
}

.work-case.is-priority:hover {
    background: linear-gradient(90deg, rgba(89, 82, 243, 0.055), transparent 70%);
}

.list-row.static,
.register-row {
    background: var(--fp-surface-soft);
}

table,
.table-list {
    color: var(--fp-ink);
}

th {
    color: #71839a;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

td,
th {
    border-color: var(--fp-line);
}

details > summary {
    transition: background-color 160ms ease, color 160ms ease;
}

details > summary:hover {
    background-color: rgba(238, 244, 250, 0.7);
}

.ai-review-workspace {
    border-color: var(--fp-line);
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--fp-radius-medium);
    box-shadow: var(--fp-shadow-surface);
}

.ai-review-section {
    border-color: var(--fp-line);
    background: var(--fp-surface-soft);
}

.ai-review-section-body {
    border-top-color: var(--fp-line);
    background: #fff;
}

.ai-review-summary {
    border-color: var(--fp-line);
}

.ai-review-summary span + span {
    border-left-color: var(--fp-line);
}

/* Overview and expert trace */

.application-overview-grid,
.expert-trace-flow,
.expert-trace-details {
    border-color: var(--fp-line);
}

.application-overview-grid article + article,
.expert-trace-flow li + li {
    border-left-color: var(--fp-line);
}

.expert-trace {
    background: rgba(255, 255, 255, 0.965);
}

.expert-trace-flow li::before {
    background: #9da9bb;
}

.expert-trace-flow li.is-ready::before {
    background: var(--fp-success);
}

.expert-trace-flow li.is-working::before {
    background: var(--fp-violet);
}

.expert-trace-flow li.is-attention::before {
    background: #d68b24;
}

.expert-trace-flow li.is-blocked::before {
    background: #c74b52;
}

.expert-ai-register,
.final-next-action {
    color: #fff;
    background:
        radial-gradient(circle at 92% 8%, rgba(102, 207, 244, 0.12), transparent 28%),
        var(--fp-navy);
}

/* ITMS handoff */

.itms-copy-sections,
.itms-copy-sections details + details,
.itms-copy-field,
.itms-transfer-summary article + article {
    border-color: var(--fp-line);
}

.itms-copy-sections details[open] > summary,
.expert-trace-details[open] > summary {
    background: var(--fp-surface-soft);
}

.itms-copy-field pre {
    color: var(--fp-ink);
    background: #eef3f9;
    border: 1px solid var(--fp-line);
}

/* Light entrance, shared across the application. */

.ui-topbar {
    animation: fp-enter 520ms ease-out both;
}

.ui-page > :first-child {
    animation: fp-enter 620ms 70ms ease-out both;
}

@keyframes fp-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1120px) {
    .ui-topbar {
        position: static;
        border-radius: 30px;
    }

    .application-step-navigation {
        top: 12px;
    }

    .workspace-step-side {
        top: 86px;
    }
}

@media (max-width: 980px) {
    .ui-auth-stage {
        grid-template-columns: 1fr;
        gap: 34px;
        min-height: 0;
    }

    .ui-auth-brand {
        min-height: 350px;
    }

    .ui-auth-brand h1 {
        font-size: clamp(4.2rem, 12vw, 7rem);
    }

    .start-workspace {
        padding: 30px;
    }

    .start-workspace-grid {
        grid-template-columns: 1fr;
    }

    .start-workspace-copy {
        min-height: 480px;
    }

    .start-workspace-panel {
        max-width: none;
    }

    .call-intake-grid,
    .brief-review-stage {
        grid-template-columns: 1fr;
    }

    .call-intake-profile,
    .brief-review-status {
        min-height: 360px;
    }

    .workspace-step-layout {
        grid-template-columns: 1fr;
    }

    .workspace-step-side {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-step-side > :first-child:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .ui-app {
        padding: 14px 14px 72px;
    }

    .ui-topbar {
        min-height: 78px;
        padding: 12px;
        border-radius: 24px;
    }

    .ui-brand-logo {
        width: 185px;
    }

    .application-workspace-head {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px 24px;
    }

    .application-workspace-title {
        padding: 0;
    }

    .application-workspace-title h1 {
        font-size: clamp(2.25rem, 10vw, 3.8rem);
    }

    .application-truth-strip {
        margin: 2px -24px -28px;
    }

    .ui-page > .ui-stage:first-child {
        min-height: 0;
    }

    .ui-page > .ui-stage:first-child > .ui-stage-panel {
        padding: 32px 24px;
    }

    .ui-page > .ui-stage:first-child .ui-stage-layout {
        grid-template-columns: 1fr;
    }

    .step-context-bar {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .workspace-step-main > .ai-worknote {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .workspace-step-side {
        grid-template-columns: 1fr;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .call-intake-grid,
    .brief-review-stage {
        min-height: 0;
        padding: 34px 26px;
    }

    .call-intake-copy h1,
    .brief-review-stage-copy h1 {
        font-size: clamp(3rem, 12vw, 5.2rem);
    }

    .brief-review-head {
        flex-direction: column;
    }

    .brief-review-grid {
        grid-template-columns: 1fr;
    }

    .brief-review-grid .brief-review-field:nth-child(odd),
    .brief-review-grid .brief-review-field:nth-child(even) {
        padding-inline: 0;
        border-left: 0;
    }

    .brief-review-grid .brief-review-field + .brief-review-field {
        border-top: 1px solid var(--fp-line);
    }
}

@media (max-width: 640px) {
    .ui-topbar {
        gap: 10px;
    }

    .ui-topbar-main {
        gap: 12px;
    }

    .ui-brand-logo {
        width: 165px;
    }

    .ui-auth-stage {
        gap: 24px;
        padding: 26px 18px 18px;
        border-radius: 26px;
    }

    .ui-auth-brand {
        min-height: 300px;
        padding: 8px 8px 0;
    }

    .ui-auth-brand h1 {
        margin-bottom: 20px;
        font-size: clamp(3.65rem, 18vw, 5.25rem);
    }

    .ui-auth-card {
        padding: 28px 22px;
        border-radius: 22px;
    }

    .ui-site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-top: 34px;
        padding-inline: 4px;
    }

    .ui-site-footer-signature {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .ui-site-footer-links {
        justify-content: flex-start;
    }

    .legal-document-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .legal-document-grid article,
    .legal-document-grid article:nth-child(even) {
        padding: 22px 0;
        border-left: 0;
    }

    .application-step-navigation {
        margin-top: -12px;
    }

    .start-workspace {
        min-height: 0;
        padding: 26px 18px 18px;
        border-radius: 26px;
        scroll-margin-top: 98px;
    }

    .start-workspace-copy {
        min-height: 430px;
    }

    .start-workspace-copy > h1 {
        font-size: clamp(3.7rem, 19vw, 5.7rem);
        white-space: normal;
    }

    .start-workspace-copy > .start-paths {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .start-workspace-copy .start-path-choice {
        min-height: 92px;
    }

    .start-workspace-panel-main,
    .start-intelligence-main,
    .start-profile-summary {
        padding-inline: 22px;
    }

    .start-workspace-panel .start-path-form {
        grid-template-columns: 1fr;
    }

    .start-workspace-panel .start-discovery-link {
        align-items: flex-start;
        flex-direction: column;
    }

    .start-intelligence-metrics,
    .call-intake-profile-stats {
        grid-template-columns: 1fr;
    }

    .start-intelligence-metrics > div + div,
    .call-intake-profile-stats div + div {
        padding-left: 0;
        border-top: 1px solid var(--fp-line);
        border-left: 0;
    }

    .call-intake-grid,
    .brief-review-stage {
        padding: 28px 18px;
        border-radius: 26px;
    }

    .call-intake-steps {
        grid-template-columns: 1fr;
    }

    .call-intake-steps li + li {
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        border-left: 0;
    }

    .call-intake-control {
        grid-template-columns: 1fr;
    }

    .call-intake-profile > div:first-child,
    .call-intake-profile footer,
    .brief-review-status {
        padding-inline: 22px;
    }

    .brief-review-head,
    .brief-review-form {
        padding-inline: 22px;
    }

    .brief-review-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .brief-review-actions button {
        width: 100%;
    }

    .grid.cols-2,
    .grid.cols-3,
    .ui-grid-2,
    .ui-grid-3,
    .ui-grid-4 {
        grid-template-columns: 1fr;
    }

    .budget-row {
        padding: 20px 16px;
    }
}

.ui-assessment-trace {
    overflow: hidden;
    border: 1px solid var(--fp-line);
    border-radius: var(--fp-radius-medium);
    background: var(--fp-surface-soft);
}

.ui-assessment-trace > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
}

.ui-assessment-trace > summary::-webkit-details-marker {
    display: none;
}

.ui-assessment-trace > summary > span:first-child {
    display: grid;
    gap: 4px;
}

.ui-assessment-trace > summary strong {
    color: var(--fp-ink);
    font-family: var(--ui-font-display);
    font-size: 1.05rem;
    letter-spacing: -0.025em;
}

.ui-assessment-trace > summary small,
.ui-assessment-source-list small {
    color: var(--fp-muted);
    line-height: 1.45;
}

.ui-assessment-trace-toggle {
    flex: 0 0 auto;
    color: var(--fp-azure);
    font-size: 0.82rem;
    font-weight: 800;
}

.ui-assessment-trace[open] .ui-assessment-trace-toggle {
    font-size: 0;
}

.ui-assessment-trace[open] .ui-assessment-trace-toggle::after {
    content: "Skryť";
    font-size: 0.82rem;
}

.ui-assessment-trace-body {
    display: grid;
    gap: 24px;
    padding: 0 24px 24px;
    border-top: 1px solid var(--fp-line);
}

.ui-assessment-trace-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.ui-assessment-trace-metrics > div {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 22px 20px 20px 0;
}

.ui-assessment-trace-metrics > div + div {
    padding-left: 20px;
    border-left: 1px solid var(--fp-line);
}

.ui-assessment-trace-metrics dt {
    color: var(--fp-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ui-assessment-trace-metrics dd {
    margin: 0;
    color: var(--fp-ink);
    font-weight: 800;
    line-height: 1.35;
}

.ui-assessment-trace-context {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    gap: 24px;
    padding: 22px;
    border-radius: 18px;
    background: #fff;
}

.ui-assessment-trace-context > div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.ui-assessment-source-list p {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 0;
}

.ui-assessment-alternative {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px;
    border: 1px solid rgba(37, 193, 163, 0.26);
    border-radius: var(--fp-radius-medium);
    background: linear-gradient(135deg, rgba(225, 249, 243, 0.92), #fff);
}

/* Progressive expert workspace */

.application-expert-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 11px;
    color: #dce7f7 !important;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.application-expert-toggle > span {
    color: #9fb0c6;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.application-expert-toggle > strong {
    color: inherit;
    font-size: 0.72rem;
}

.application-expert-toggle[aria-pressed="true"]::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #63d8f2;
    box-shadow: 0 0 0 3px rgba(99, 216, 242, 0.13);
    content: "";
}

.application-expert-toggle:hover,
.application-expert-toggle:focus-visible,
.application-workspace-head.is-expert-mode .application-expert-toggle {
    color: #fff !important;
    border-color: rgba(102, 207, 244, 0.48);
    background: rgba(102, 207, 244, 0.14);
}

.application-secondary-risks {
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--fp-line);
    border-radius: 16px;
    background: #f7fafd;
}

.application-secondary-risks > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 10px 13px;
    color: var(--fp-muted);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.application-secondary-risks > summary::-webkit-details-marker {
    display: none;
}

.application-secondary-risks > summary strong {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 24px;
    color: var(--fp-ink);
    font-size: 0.72rem;
    border: 1px solid #cfdded;
    border-radius: 999px;
    background: #fff;
}

.application-secondary-risks[open] > summary {
    color: var(--fp-ink);
    border-bottom: 1px solid var(--fp-line);
    background: #eef5fb;
}

.application-secondary-risks > div {
    display: grid;
}

.application-secondary-risks > div > a {
    display: grid;
    gap: 3px;
    padding: 12px 13px;
    color: var(--fp-ink);
    text-decoration: none;
    background: #fff;
}

.application-secondary-risks > div > a + a {
    border-top: 1px solid var(--fp-line);
}

.application-secondary-risks > div > a:hover,
.application-secondary-risks > div > a:focus-visible {
    background: #f7fbff;
}

.application-secondary-risks > div > a span {
    color: var(--fp-azure);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.application-secondary-risks > div > a strong {
    font-size: 0.8rem;
    line-height: 1.35;
}

.application-secondary-risks > div > a small {
    color: var(--fp-muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.expert-trace.is-expert-mode {
    border-color: rgba(102, 207, 244, 0.34);
    box-shadow: 0 24px 56px rgba(16, 29, 49, 0.1);
}

/* Account administration */

.account-console-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 36px;
    padding: 22px 6px 4px;
}

.account-console-head > div:first-child {
    max-width: 760px;
}

.account-console-head h1 {
    margin: 7px 0 0;
    color: var(--fp-ink);
    font-family: var(--ui-font-display);
    font-size: clamp(2.25rem, 4.2vw, 4.6rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
    text-wrap: balance;
}

.account-console-head p:not(.ui-kicker) {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--fp-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.account-console-actions,
.account-form-actions,
.account-danger-actions,
.account-row-actions,
.account-name-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-console-actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--fp-line);
    border-bottom: 1px solid var(--fp-line);
    background: rgba(255, 255, 255, 0.62);
}

.account-metrics > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
    padding: 20px 24px;
}

.account-metrics > div + div {
    border-left: 1px solid var(--fp-line);
}

.account-metrics span {
    color: var(--fp-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.account-metrics strong {
    color: var(--fp-ink);
    font-family: var(--ui-font-display);
    font-size: 2rem;
    letter-spacing: -0.06em;
}

.account-register {
    overflow: visible;
}

.account-table {
    border-top: 1px solid var(--fp-line);
}

.account-table-head,
.account-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) minmax(180px, 0.75fr) minmax(150px, 0.55fr) minmax(190px, auto);
    gap: 20px;
    align-items: center;
}

.account-table-head {
    min-height: 48px;
    color: #788aa2;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.account-row {
    min-height: 92px;
    padding: 16px 0;
    border-top: 1px solid var(--fp-line);
    transition: background-color 160ms ease, opacity 160ms ease;
}

.account-row:hover {
    background: #f9fbfe;
}

.account-row.is-muted {
    opacity: 0.66;
}

.account-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.account-identity > div {
    min-width: 0;
}

.account-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    font-weight: 850;
    border-radius: 15px;
    background: var(--fp-navy);
}

.account-identity strong,
.account-role-cell strong {
    color: var(--fp-ink);
    line-height: 1.35;
}

.account-identity a {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    overflow: hidden;
    color: var(--fp-muted);
    font-size: 0.86rem;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-you {
    padding: 3px 7px;
    color: var(--fp-violet-deep);
    font-size: 0.63rem;
    font-weight: 850;
    border-radius: 999px;
    background: rgba(89, 82, 243, 0.1);
}

.account-role-cell,
.account-last-login {
    display: grid;
    gap: 6px;
    align-content: center;
}

.account-role-cell strong {
    font-size: 0.86rem;
}

.account-last-login strong {
    color: var(--fp-ink);
    font-size: 0.86rem;
}

.account-last-login span {
    color: var(--fp-muted);
    font-size: 0.76rem;
}

.account-status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 26px;
    padding: 4px 9px;
    color: var(--fp-muted);
    font-size: 0.67rem;
    font-weight: 850;
    border: 1px solid var(--fp-line);
    border-radius: 999px;
    background: #f7f9fc;
}

.account-status-active {
    color: #0e715b;
    border-color: #c9e9df;
    background: #eaf8f3;
}

.account-status-deactivated {
    color: #8c5d17;
    border-color: #efddbd;
    background: #fff6e7;
}

.account-table-actions-label,
.account-row-actions {
    justify-self: end;
}

.account-row-actions {
    justify-content: flex-end;
}

.account-row-actions form,
.account-danger-actions form {
    margin: 0;
}

.account-row-actions .ui-button-ghost {
    min-height: 40px;
    padding-inline: 14px;
    font-size: 0.78rem;
}

.account-text-action {
    padding: 7px 0;
    color: var(--fp-danger);
    font-size: 0.76rem;
    font-weight: 750;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.account-text-action.is-positive {
    color: var(--fp-success);
}

.account-text-action:hover,
.account-text-action:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.account-form-stack {
    display: grid;
    gap: 28px;
}

.account-password-block {
    display: grid;
    gap: 22px;
    padding-top: 26px;
    border-top: 1px solid var(--fp-line);
}

.account-password-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.account-locked-role {
    display: grid;
    gap: 5px;
    padding: 15px 16px;
    border: 1px solid #d7e2ee;
    border-radius: var(--fp-radius-control);
    background: #f7fafd;
}

.account-locked-role strong {
    color: var(--fp-ink);
}

.account-locked-role span {
    color: var(--fp-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.account-field-error {
    color: var(--fp-danger) !important;
    font-weight: 700;
}

.account-shared-note {
    margin: -4px 0 2px;
    padding: 14px 16px;
    border: 1px solid rgba(89, 82, 243, 0.18);
    border-radius: 14px;
    background: rgba(89, 82, 243, 0.055);
    color: #47566c;
    font-size: 0.88rem;
    line-height: 1.5;
}

.account-danger-zone {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 36px;
    padding: 28px 30px;
    color: #f9fbff;
    border-radius: var(--fp-radius-medium);
    background: var(--fp-navy);
}

.account-danger-zone > div:first-child {
    max-width: 680px;
}

.account-danger-zone h2 {
    margin: 6px 0 0;
    color: #fff;
    font-family: var(--ui-font-display);
    letter-spacing: -0.04em;
}

.account-danger-zone p:not(.ui-kicker) {
    margin: 10px 0 0;
    color: #b4c0d1;
    line-height: 1.6;
}

.account-danger-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-delete-confirm {
    position: relative;
}

.account-delete-confirm > summary {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    color: #ffbdc8;
    font-size: 0.8rem;
    font-weight: 750;
    border: 1px solid rgba(255, 157, 176, 0.24);
    border-radius: var(--fp-radius-control);
    cursor: pointer;
    list-style: none;
}

.account-delete-confirm > summary::-webkit-details-marker {
    display: none;
}

.account-delete-confirm > div {
    position: absolute;
    z-index: 4;
    top: calc(100% + 10px);
    right: 0;
    width: min(330px, 82vw);
    padding: 18px;
    color: var(--fp-ink);
    border: 1px solid var(--fp-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--fp-shadow-bar);
}

.account-delete-confirm > div p {
    margin: 0 0 14px !important;
    color: var(--fp-muted) !important;
    font-size: 0.82rem;
}

.resource-delete-confirm > summary {
    min-height: 42px;
    color: #a33b50;
    border-color: rgba(163, 59, 80, 0.22);
    background: rgba(255, 247, 249, 0.92);
}

.resource-delete-confirm > div {
    width: min(390px, 88vw);
}

.resource-delete-confirm form {
    display: grid;
    gap: 12px;
}

.resource-delete-confirm .ui-field span {
    color: var(--fp-ink);
}

.work-case-buttons .resource-delete-confirm {
    align-self: center;
}

.account-self-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

@media (max-width: 1050px) {
    .account-table-head {
        display: none;
    }

    .account-row {
        grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.7fr) auto;
    }

    .account-last-login {
        display: none;
    }

    .account-password-form {
        grid-template-columns: 1fr 1fr;
    }

    .account-password-form .ui-button-secondary {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .ui-assessment-trace > summary,
    .ui-assessment-alternative {
        align-items: flex-start;
        flex-direction: column;
    }

    .ui-assessment-trace-metrics,
    .ui-assessment-trace-context {
        grid-template-columns: 1fr;
    }

    .ui-assessment-trace-metrics > div {
        padding: 16px 0;
    }

    .ui-assessment-trace-metrics > div + div {
        padding-left: 0;
        border-top: 1px solid var(--fp-line);
        border-left: 0;
    }

    .application-expert-toggle {
        width: 100%;
        justify-content: center;
    }

    .application-secondary-risks > summary,
    .application-secondary-risks > div > a {
        padding-inline: 12px;
    }

    .account-console-head,
    .account-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .account-console-actions,
    .account-danger-actions {
        justify-content: flex-start;
    }

    .account-console-actions > *,
    .account-form-actions > *,
    .account-danger-actions > * {
        flex: 1 1 100%;
    }

    .account-metrics,
    .account-self-layout,
    .account-password-form {
        grid-template-columns: 1fr;
    }

    .account-metrics > div + div {
        border-top: 1px solid var(--fp-line);
        border-left: 0;
    }

    .account-row {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 20px 0;
    }

    .account-table-actions-label,
    .account-row-actions {
        justify-self: stretch;
    }

    .account-row-actions {
        justify-content: flex-start;
    }

    .account-row-actions .ui-button-ghost {
        flex: 1 1 auto;
    }

    .account-password-form .ui-button-secondary {
        grid-column: auto;
        justify-self: stretch;
    }

    .account-delete-confirm > div {
        right: auto;
        left: 0;
    }
}

/* Compact collaboration tray ------------------------------------------------ */
.collaboration-surface {
    margin-top: 26px;
}

.collaboration-disclosure {
    overflow: hidden;
    border: 1px solid var(--fp-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 38px rgba(16, 29, 49, 0.06);
}

.collaboration-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
}

.collaboration-summary::-webkit-details-marker {
    display: none;
}

.collaboration-summary h2 {
    margin: 4px 0 0;
    font-family: var(--ui-font-display);
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--fp-navy);
}

.collaboration-summary p:not(.ui-kicker) {
    margin: 8px 0 0;
    color: var(--fp-muted);
    line-height: 1.55;
}

.collaboration-summary-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

.collaboration-summary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--fp-navy);
}

.collaboration-summary-action::after {
    content: "↓";
    color: var(--fp-violet);
    transition: transform 180ms ease;
}

.collaboration-disclosure[open] .collaboration-summary-action::after {
    transform: rotate(180deg);
}

.collaboration-disclosure[open] .collaboration-summary {
    border-bottom: 1px solid var(--fp-line);
}

.collaboration-body {
    display: grid;
    gap: 20px;
    padding: 22px 24px 24px;
}

.collaboration-preview,
.collaboration-boundary-note,
.collaboration-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.collaboration-preview {
    padding: 14px 16px;
    border-radius: 15px;
    background: var(--fp-navy);
    color: #fff;
}

.collaboration-preview p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.83rem;
}

.collaboration-preview .ui-chip-light {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

.collaboration-preview .view-mode-switcher .is-active {
    border-color: var(--fp-cyan);
    background: var(--fp-cyan);
    color: var(--fp-navy);
}

.collaboration-boundary-note {
    padding: 14px 16px;
    border-left: 3px solid var(--fp-violet);
    background: rgba(89, 82, 243, 0.055);
}

.collaboration-boundary-note p,
.collaboration-read-only p,
.collaboration-empty p {
    margin: 4px 0 0;
    color: var(--fp-muted);
    line-height: 1.55;
}

.collaboration-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
    gap: 24px;
}

.collaboration-grid.is-read-only {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.35fr);
}

.collaboration-list-head {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fp-line);
}

.collaboration-list-head > span {
    color: var(--fp-muted);
    font-size: 0.8rem;
    font-weight: 750;
}

.collaboration-empty {
    padding: 22px 0 4px;
}

.collaboration-entry-form,
.collaboration-read-only {
    padding: 20px;
    border-radius: 18px;
    background: #f7f9fd;
    box-shadow: inset 0 0 0 1px var(--fp-line);
}

.collaboration-read-only {
    align-self: start;
}

.collaboration-event,
.collaboration-diff {
    border-radius: 15px;
    box-shadow: none;
}

.collaboration-ai-log {
    padding-top: 16px;
    border-top: 1px solid var(--fp-line);
}

.collaboration-ai-log > summary {
    cursor: pointer;
    color: var(--fp-navy);
}

.collaboration-ai-log > .ui-stack {
    margin-top: 16px;
}

.project-brief-admin-fill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    border: 1px dashed rgba(184, 132, 25, 0.48);
    border-radius: 18px;
    background:
        linear-gradient(110deg, rgba(255, 248, 228, 0.9), rgba(255, 253, 247, 0.96) 58%, rgba(238, 249, 246, 0.9));
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}

.project-brief-admin-fill-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.project-brief-admin-fill-copy strong {
    color: var(--fp-navy);
    font-size: 1rem;
}

.project-brief-admin-fill-copy p {
    max-width: 70ch;
    margin: 0;
    color: var(--fp-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.project-brief-admin-fill > .ui-button-ghost {
    justify-content: center;
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .collaboration-summary,
    .collaboration-preview,
    .collaboration-boundary-note,
    .collaboration-list-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .collaboration-summary-status {
        width: 100%;
        justify-content: space-between;
    }

    .collaboration-grid,
    .collaboration-grid.is-read-only {
        grid-template-columns: 1fr;
    }

    .project-brief-admin-fill {
        grid-template-columns: 1fr;
    }

    .project-brief-admin-fill > .ui-button-ghost {
        width: 100%;
        white-space: normal;
    }

    .collaboration-preview .view-mode-switcher {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .collaboration-summary,
    .collaboration-body {
        padding-inline: 18px;
    }

    .collaboration-summary-status {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-topbar,
    .ui-page > :first-child,
    .collaboration-summary-action::after,
    .start-workspace-copy .start-path-choice {
        animation: none;
        transition: none;
    }
}
