:root {
    color-scheme: light;
    --canvas: #e4e4e4;
    --paper: #ffffff;
    --paper-alt: #f4f4f4;
    --ink: #222222;
    --ink-muted: #4a4a4a;
    --rule: #cccccc;
    --rule-strong: #9f9f9f;
    --accent: #005596;
    --accent-strong: #003366;
    --accent-soft: #e9eef4;
    --brand-red: #e52521;
    --brand-red-dark: #d9381e;
    --danger: #b32820;
    --focus: #005596;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, "Times New Roman", Times, serif;
    line-height: 1.56;
    color: var(--ink);
    background: var(--canvas);
    text-align: left;
}

body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--canvas);
}

body.auth-page .app-shell {
    width: 100%;
    max-width: none;
    padding: 1rem;
}

body.auth-page .page-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

body.auth-page .page-card > h1 {
    display: none;
}

body.auth-transition .app-shell {
    visibility: hidden;
}

a {
    color: var(--accent);
    text-underline-offset: 0.17em;
}

a:hover {
    color: var(--accent-strong);
}

.app-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 2.25rem 1rem 3rem;
}

.site-header {
    min-height: 4.15rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-strong);
}

.page-card {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 2.05rem 2.2rem 2.4rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
    counter-reset: section;
}

.page-card > h1 {
    margin: 0 0 1.35rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--rule);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.85rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--ink);
}

.home-action {
    display: inline-block;
    margin-top: 0.35rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
}

h2,
h3 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ink);
    margin: 1.45rem 0 0.6rem;
    line-height: 1.25;
}

h2 {
    font-size: 1.28rem;
    font-weight: 600;
}

h3 {
    font-size: 1.08rem;
    font-weight: 600;
}

.session-panel {
    margin-bottom: 1.2rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--paper-alt);
}

.session-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.session-panel-header h2 {
    margin: 0.1rem 0 0;
    font-size: 1.08rem;
}

.session-eyebrow {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.session-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.session-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 1px;
    font-size: 0.77rem;
    font-weight: 600;
    border: 1px solid var(--rule-strong);
    background: #ffffff;
}

.session-chip-ok {
    color: #1f4f38;
}

.session-chip-warn {
    color: #70450f;
}

.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 0.65rem;
    margin: 0;
}

.session-grid div {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--rule);
    background: #fff;
}

.session-grid dt {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-muted);
    margin-bottom: 0.22rem;
}

.session-grid dd {
    margin: 0;
    font-size: 0.92rem;
    word-break: break-word;
}

.session-warning {
    margin: 0.85rem 0 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid #d7c5b8;
    background: #fffaf1;
    border-left: 3px solid #c9863d;
}

.auth-shell {
    width: min(860px, 100%);
    margin: 0 auto;
}

.auth-panel {
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--paper);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}

.auth-panel .auth-card {
    padding: 2rem 2.1rem;
}

.auth-panel form {
    display: grid;
    gap: 0.9rem;
}

.auth-step {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.95rem;
    padding: 0.16rem 0.45rem;
    border: 1px solid var(--rule);
    background: #fff;
    color: var(--ink-muted);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-kicker {
    margin: 0 0 1.1rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.auth-signup-title {
    margin: 0.2rem 0 0.75rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ink);
    font-size: 1.16rem;
    font-weight: 600;
}

.auth-explainer {
    margin: 0 0 1rem;
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-cta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.auth-cta-row button {
    margin-top: 0;
    width: 100%;
    min-height: 2.9rem;
    border-radius: 2px;
    border-color: var(--brand-red-dark);
    background: var(--brand-red);
}

.auth-cta-row button:hover:not(:disabled) {
    background: var(--brand-red-dark);
}

.auth-ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0.56rem 0.9rem;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: #fff;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.auth-note {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.auth-validation-message {
    margin: 0 0 1rem;
    color: var(--danger);
    font-weight: 700;
}

label {
    display: block;
    margin: 0.9rem 0 0.32rem;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: #fff;
    color: var(--ink);
}
input:focus-visible,

select:focus-visible,

textarea:focus-visible,

button:focus-visible,

.auth-ghost-link:focus-visible,

a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

textarea {
    min-height: 7rem;
}

button {
    margin-top: 1rem;
    min-height: 2.65rem;
    padding: 0.56rem 0.9rem;
    border: 1px solid var(--accent-strong);
    border-radius: 2px;
    background: var(--accent-strong);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

button:hover:not(:disabled) {
    background: var(--accent);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--rule-strong);
    font-size: 0.93rem;
}

th,
td {
    border: 1px solid var(--rule-strong);
    padding: 0.5rem 0.58rem;
    text-align: left;
    vertical-align: top;
}

th {
    font-weight: 600;
    background: var(--accent-strong);
    color: #ffffff;
}

tbody tr:nth-child(even) {
    background: #f1f1f1;
}

.dashboard-table {
    margin: 0 0 1rem;
    background: #fff;
}

.output-preview {
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    background: #fff;
}

.output-preview-locked {
    max-width: 42rem;
    border: 1px dashed var(--rule);
}

.output-preview-live {
    max-width: 34rem;
    border: 1px solid var(--rule);
}

.output-preview-frame {
    position: relative;
    max-width: 38rem;
    min-height: 23rem;
    padding: 0.85rem;
    border: 1px solid #bcc6d4;
    border-radius: 8px;
    background: #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    font-family: "Source Serif 4", "Noto Serif", "Merriweather", "IBM Plex Serif", Georgia, serif;
}

.output-preview-document {
    position: relative;
    min-height: 21rem;
    padding: 1rem;
    border: 1px solid #d1d5db;
    background: #fff;
}

.output-preview-document-muted {
    filter: grayscale(100%) contrast(95%);
}

.output-preview-heading {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.output-preview-document > h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.output-preview-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.output-preview-section {
    padding: 0.65rem;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    background: #fbfcfe;
}

.output-preview-section > p {
    margin: 0.25rem 0;
}

.output-preview-section > p:first-child {
    margin: 0 0 0.45rem;
    font-weight: 700;
}

.output-preview-detail {
    color: #111827;
    font-size: 0.9rem;
}

.output-preview-sensitive {
    filter: blur(4px);
    user-select: none;
}

.output-preview-live .output-preview-document {
    min-height: 0;
    border-radius: 10px;
    background: #f9f7f3;
}

.output-preview-live .output-preview-document > p {
    margin: 0.15rem 0;
}

.output-preview-live .output-preview-document > p:first-child {
    margin: 0 0 0.45rem;
}

ul {
    padding-left: 1.1rem;
}

li {
    margin: 0.35rem 0;
}

p {
    margin: 0.5rem 0 0.85rem;
    text-align: left;
}

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 1.3rem 0;
}

#root > div > div > div {
    margin-bottom: 0.75rem;
}

.form-pristine .validate.invalid {
    border-color: var(--rule-strong);
}

.form-pristine .validate.invalid + div,
.form-pristine .validate.invalid + span {
    display: none;
}

.validate.invalid,
.validate.invalid + div,
.validate.invalid + span {
    border-color: #d28a84;
}

.error,
[class*="error"],
#root div:has(> input.validate.invalid),
#root div:has(> select.validate.invalid) {
    color: var(--danger);
}

.runtime-error-text {
    color: var(--danger);
}

.fallback-template {
    display: none;
}

button[data-delete-action] {
    margin: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--brand-red-dark);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

button[data-delete-action]:hover:not(:disabled) {
    background: none;
    color: var(--brand-red);
}

body.portfolio-designer-page .app-shell {
    max-width: 1500px;
    padding: 1.5rem 1rem 2.25rem;
}

body.portfolio-designer-page .page-card {
    max-width: none;
    border-radius: 2px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}

body.portfolio-designer-page .page-card > h1 {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0.35rem;
}

body.portfolio-designer-page .page-card::after {
    display: none;
}

.pd-output-selector {
    position: relative;
    position: sticky;
    top: 0.5rem;
    z-index: 8;
    border: 1px solid #a9b4c4;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
}

.pd-output-selector::after {
    content: "";
    position: absolute;
    left: -0.85rem;
    right: -0.85rem;
    bottom: -0.65rem;
    border-bottom: 2px solid #d6dee9;
}

.pd-layout {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1rem;
    align-items: start;
}

.pd-layout-maintenance-only {
    grid-template-columns: minmax(0, 1fr);
}

.pd-pane {
    display: grid;
    gap: 0.9rem;
}

.pd-pane-preview {
    position: sticky;
    top: 11.5rem;
}

.pd-upgrade-banner {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e8b255;
    border-radius: 8px;
    background: #fff8ea;
}

.pd-upgrade-banner p {
    margin: 0 0 0.5rem;
}

.pd-section-copy {
    margin: 0.25rem 0 0;
    color: #4b5563;
    font-size: 0.92rem;
}

@media (max-width: 1100px) {
    .pd-layout {
        grid-template-columns: 1fr;
    }

    .pd-pane-preview,
    .pd-output-selector {
        position: static;
    }

    .pd-output-selector::after {
        display: none;
    }
}

.page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 0.8rem;
    align-items: start;
}

.page-head h1 {
    margin: 0 0 0.25rem;
    line-height: 1.15;
}

body.portfolio-designer-page .page-head h1 {
    color: var(--ink);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(1.75rem, 2.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
    text-shadow: none;
    -webkit-text-stroke: 0;
}

.page-head p {
    margin: 0;
}

.ink-outline-heading {
    color: transparent;
    -webkit-text-stroke: 1.4px #111111;
    text-shadow: none;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.page-callout {
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #fff;
    padding: 0.6rem 0.7rem;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.35;
}

#portfolio-designer-root {
    margin-top: 1rem;
}

.build-auth-gateway {
    max-width: 42rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.build-auth-gateway h2 {
    margin: 0 0 0.65rem;
}

.build-auth-gateway p {
    margin: 0;
    line-height: 1.5;
}

.build-auth-gateway-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.build-auth-gateway-actions .pd-action {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    text-decoration: none;
}

/* Shown on phones instead of the builder (portfolio-designer-bootstrap.js). */
.build-phone-gate {
    max-width: 28rem;
    margin: 1rem auto 0;
    padding: 1.5rem 1.25rem;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.build-phone-gate img {
    width: 100%;
    max-width: 20rem;
    height: auto;
    border: 1px solid var(--rule);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.build-phone-gate-message {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--ink);
}

.build-auth-gateway-reassurance {
    color: #475569;
    font-size: 0.92rem;
}

.pd-arch-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #fff;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--ink);
}

.pd-arrow {
    color: var(--ink-muted);
    font-weight: 600;
}

.pd-demo-control select,
.pd-target-card select,
.pd-target-card input {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    font: inherit;
    background: #fff;
    width: 100%;
}

.pd-target-card {
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #fff;
    padding: 0.85rem;
    margin-bottom: 0.8rem;
}

.pd-target-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: flex-start;
}

.pd-debug-tools-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: flex-start;
}

.pd-demo-control {
    width: 170px;
    flex: 0 0 auto;
    background: var(--paper-alt);
    border: 1px dashed var(--rule-strong);
    border-radius: 2px;
    padding: 0.45rem 0.5rem;
}

.pd-demo-control-wide {
    width: 230px;
}

.pd-demo-control label {
    display: block;
    margin: 0 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.pd-demo-control select {
    padding: 0.35rem 0.45rem;
    font-size: 0.85rem;
}

.pd-target-card h3 {
    margin: 0;
    color: #111827;
}

.pd-target-copy,
.pd-variant-description,
.pd-placeholder-note {
    margin: 0.35rem 0 0;
    color: #4b5563;
}

.pd-target-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0;
    align-items: start;
}

.pd-setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 0.85rem;
    align-items: start;
    margin-top: 0.25rem;
}

.pd-setup-main {
    min-width: 0;
}

.pd-step-group {
    min-width: 0;
}

.pd-step-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.pd-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #ffffff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
}

.pd-step-title {
    display: inline-block;
    margin: 0;
    color: #111827;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
}

.pd-style-toggle {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
}

.pd-style-toggle input {
    width: auto;
    margin: 0;
    vertical-align: middle;
}

.pd-step-heading .pd-style-toggle {
    position: relative;
    top: 1px;
}

.pd-style-toggle-help {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
}

.pd-step-heading-action {
    margin-bottom: 0.6rem;
}

.pd-step-heading-section {
    margin: 0.1rem 0 0.55rem;
}

.pd-field-label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.pd-text-size-group {
    min-width: 0;
}

.pd-radio-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.05rem;
}

.pd-radio-card {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    padding: 0.08rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.pd-radio-card input {
    width: auto;
    margin: 0;
}

.pd-radio-card:has(input:checked) {
    color: var(--accent-strong);
}

.pd-radio-card-label {
    display: inline-block;
}

.pd-side-summary {
    display: grid;
    gap: 0.15rem;
    margin-top: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--paper-alt);
}

.pd-side-summary p {
    margin: 0;
}

.pd-needtoknow-box {
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--paper-alt);
    padding: 0.8rem 0.85rem;
    margin-top: 2.85rem;
}

.pd-needtoknow-box-with-guidance {
    margin-top: 5.5rem;
}

.pd-needtoknow-box h4 {
    margin: 0 0 0.45rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.98rem;
    color: #111827;
}

.pd-needtoknow-box p {
    margin: 0.28rem 0;
}

.pd-setup-footer {
    margin-top: 0.75rem;
}

.pd-step-action {
    margin-top: 0.15rem;
}

.pd-basic-variant-guidance {
    margin-top: 0.5rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--rule);
    background: var(--paper-alt);
    border-radius: 2px;
}

.pd-basic-variant-guidance p {
    margin: 0;
    color: #1f2937;
}

.pd-basic-variant-guidance .pd-action {
    margin-top: 0.45rem;
}

.pd-preview-only-banner {
    margin-top: 0.45rem;
    padding: 0.52rem 0.62rem;
    border: 1px dashed #b38a41;
    background: #fff8ea;
    border-radius: 2px;
}

.pd-preview-only-banner p {
    margin: 0;
    color: #5b4520;
}

.pd-preview-only-banner p + p {
    margin-top: 0.28rem;
}

.pd-placeholder-note {
    margin-top: 0.55rem;
    color: #4a4a4a;
    font-weight: 700;
}

.pd-generate-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.65rem;
}

.pd-capacity-feedback {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 2px solid var(--danger);
    border-radius: 2px;
    background: #fff3f2;
    color: #641c18;
}

.pd-capacity-feedback-title,
.pd-capacity-feedback-copy {
    margin: 0;
}

.pd-capacity-feedback-title {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 800;
}

.pd-capacity-feedback-copy {
    margin-top: 0.25rem;
}

.pd-capacity-feedback-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.6rem 0 0;
    padding-left: 1.25rem;
}

.pd-capacity-feedback-list li {
    padding-left: 0.15rem;
}

.pd-capacity-review {
    min-height: 0;
    margin: 0 0 0 0.55rem;
    padding: 0.25rem 0.48rem;
    border-color: #8f241e;
    background: #ffffff;
    color: #721f1a;
    font-size: 0.86rem;
}

.pd-capacity-review:hover:not(:disabled) {
    background: #ffe5e2;
}

.pd-harness-card {
    border-top: 1px dashed var(--rule);
    margin-top: 0.8rem;
    padding-top: 0.8rem;
}

.pd-harness-copy h4 {
    margin: 0;
    color: #0f172a;
}

.pd-harness-copy p {
    margin: 0.35rem 0 0;
    color: #475569;
}

.pd-harness-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.6rem;
}

.pd-harness-grid label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.pd-harness-presets {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    color: #475569;
    font-weight: 600;
}

.pd-preset-button {
    margin-top: 0;
    min-height: 0;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 2px;
    padding: 0.28rem 0.55rem;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.pd-preset-button:hover:not(:disabled) {
    background: #edf2f7;
}

.pd-generate-button {
    margin-top: 0;
    min-height: 0;
    border: 1px solid var(--brand-red-dark);
    background: var(--brand-red);
    color: #fff;
    border-radius: 2px;
    padding: 0.55rem 0.85rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pd-generate-button:hover:not(:disabled) {
    background: var(--brand-red-dark);
}

.pd-generate-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.pd-generate-row-step4 {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: start;
}

.pd-shared-status {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 4.25rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pd-shared-status-idle {
    border-color: transparent;
    background: transparent;
}

.pd-shared-status-generating {
    color: #4b5563;
}

.pd-generate-status-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pd-output-preview {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: var(--paper);
}

.pd-output-preview-loading {
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.pd-output-preview-image {
    display: block;
    width: 100%;
    max-width: 22rem;
    height: auto;
    border: 1px solid var(--rule);
}

.pd-generate-button-lifering {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 4.25rem;
    padding: 0.7rem 1rem;
}

.pd-generate-button-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.pd-step-badge-inline {
    width: 2.25rem;
    height: 2.25rem;
}

.pd-generate-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pd-generate-button-icon svg {
    width: 2rem;
    height: 2rem;
    display: block;
    flex: 0 0 auto;
}

.pd-generate-button-copy {
    display: inline-flex;
    align-items: center;
}

.pd-generate-button-title {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.pd-generate-hint {
    margin: 0;
    color: #5b6472;
    font-size: 0.92rem;
}

.pd-debug-card {
    margin: 1rem 0 0.9rem;
    padding: 0.95rem 1rem;
    border: 1px dashed var(--rule-strong);
    border-radius: 2px;
    background: var(--paper-alt);
}

.pd-debug-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.pd-debug-head h3 {
    margin: 0;
    font-size: 1rem;
}

.pd-debug-copy {
    margin: 0.25rem 0 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.pd-debug-grid {
    margin-top: 0.85rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.pd-debug-grid label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.pd-debug-grid select {
    width: 100%;
}

.pd-debug-text-block {
    margin-top: 0.7rem;
}

.pd-debug-text-block label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.pd-debug-text-block textarea {
    width: 100%;
    min-height: 4.75rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0.45rem 0.55rem;
    font: inherit;
    line-height: 1.35;
    resize: vertical;
    background: #ffffff;
}

.pd-debug-error {
    margin: 0.8rem 0 0;
    color: var(--danger);
    font-size: 0.9rem;
}

.pd-debug-summary {
    margin-top: 0.8rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--rule);
    background: #ffffff;
}

.pd-debug-summary p {
    margin: 0.2rem 0;
    font-size: 0.92rem;
}

.pd-message {
    margin: 0 0 0.8rem;
    padding: 0.7rem 0.85rem;
    border-radius: 2px;
    border: 1px solid var(--rule-strong);
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
}

/* Build It loading state, in public/build/index.html until the page draws. */
.pd-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0.25rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.pd-loading-spinner {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--rule);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: lbm-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .pd-loading-spinner { animation: none; }
}

.pd-sections {
    display: grid;
    gap: 0.8rem;
}

.pd-section-card {
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #ffffff;
    padding: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pd-section-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.pd-section-header-titleline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem;
}

.pd-section-copy-inline {
    margin: 0;
    color: #4b5563;
    font-size: 0.92rem;
}

.pd-section-header-actionline {
    display: flex;
    justify-content: flex-start;
}

.pd-section-copy-limit {
    margin: 0 0 0.25rem;
    color: #4b5563;
    font-size: 0.92rem;
    font-weight: 600;
}

.pd-column-limit-note {
    margin: 0 0 0 0.15rem;
    line-height: 1.2;
}

.pd-column-limit-spacer {
    visibility: hidden;
    margin: 0 0 0 0.15rem;
    line-height: 1.2;
}

.pd-section-header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.32rem;
    line-height: 1.1;
}

.pd-section-helper {
    margin: 0.25rem 0 0;
    color: #4b5563;
    font-size: 0.92rem;
}

.pd-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: flex-start;
    justify-content: flex-end;
}

.pd-badge {
    display: inline-block;
    padding: 0.22rem 0.5rem;
    border-radius: 2px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid var(--rule);
    letter-spacing: 0;
    background: var(--paper-alt);
    color: var(--ink-muted);
}

.pd-badge-count {
    background: #eef2f6;
    border-color: #c8d2de;
    color: var(--accent-strong);
}

.pd-badge-limit-count {
    background: #f6f6f6;
    border-color: var(--rule);
    color: var(--ink-muted);
}

.pd-badge-included {
    background: #eef2f6;
    border-color: #c8d2de;
    color: var(--accent-strong);
}

.pd-badge-limit {
    background: #f5f5f5;
    border-color: var(--rule-strong);
    color: #3f3f3f;
}

.pd-badge-upgrade {
    background: #f5f5f5;
    border-color: var(--rule-strong);
    color: #3f3f3f;
}

.pd-create-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0.45rem 0 0.7rem;
}

.pd-create-row .pd-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.46rem;
}

.pd-row-actions {
    margin-top: 0.42rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.pd-blocked-state {
    border: 1px solid var(--rule-strong);
    background: var(--paper-alt);
    border-radius: 2px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.7rem;
}

.pd-blocked-title {
    margin: 0;
    font-weight: 800;
    color: var(--accent-strong);
}

.pd-blocked-copy {
    margin: 0.3rem 0 0;
    color: var(--ink-muted);
}

.pd-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 0.7rem;
}

.pd-column {
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #fff;
    padding: 0.65rem;
    min-height: 18rem;
}
.pd-transfer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    position: relative;
    align-items: start;
}

.pd-transfer-grid::after {
    content: "";
    position: absolute;
    top: 0.4rem;
    bottom: 0.4rem;
    left: 50%;
    width: 0.95rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(11, 79, 151, 0.12) 0%, rgba(11, 79, 151, 0.05) 100%);
    border: 1px solid rgba(11, 79, 151, 0.1);
    pointer-events: none;
}

.pd-transfer-grid .pd-column {
    position: relative;
    z-index: 1;
}

.pd-transfer-meta-note {
    margin: 0;
    line-height: 1.2;
}

.pd-column-group-output {
    align-self: stretch;
}

.pd-column-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pd-column-title-selected {
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pd-column-title-text {
    color: #111827;
}

.pd-column-title-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pd-column-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.48rem;
    border: 1px solid rgba(11, 79, 151, 0.2);
    border-radius: 999px;
    background: #eef4ff;
    color: #0b4f97;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.pd-column-pill-value {
    display: inline-flex;
    min-width: 1.1rem;
    justify-content: center;
    color: #0b4f97;
}

.pd-column-title {
    margin: 0 0 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.86rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.pd-column-title-available {
    justify-content: flex-start;
    gap: 0.42rem;
}

.pd-column-title-available-label {
    font-weight: 800;
    letter-spacing: 0.05em;
}

.pd-column-title-available-detail {
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.84rem;
    font-weight: 600;
}

.pd-column-title-available-count {
    color: #0b4f97;
    font-weight: 800;
}

.pd-column-count {
    display: inline-flex;
    min-width: 1.5rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    border: 1px solid rgba(11, 79, 151, 0.2);
    border-radius: 999px;
    background: #eef4ff;
    color: #0b4f97;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
}

.pd-column-output {
    background: var(--paper-alt);
}

.pd-section-card-over-capacity {
    border: 2px solid var(--danger);
    box-shadow: 0 0 0 2px rgba(179, 40, 32, 0.1);
}

.pd-section-card-over-capacity:focus {
    outline: 3px solid rgba(179, 40, 32, 0.3);
    outline-offset: 2px;
}

.pd-column-pill-over-capacity,
.pd-column-pill-over-capacity .pd-column-pill-value {
    border-color: var(--danger);
    background: #fff3f2;
    color: var(--danger);
}

.pd-column h4 {
    margin: 0;
    color: #111827;
    font-size: 0.96rem;
}

.pd-row {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.55rem;
    padding: 0.48rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #ffffff;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.pd-row:hover {
    border-color: #9db6d8;
    box-shadow: 0 1px 6px rgba(11, 79, 151, 0.12);
}

.pd-row:focus-within {
    border-color: #0b4f97;
    box-shadow: 0 0 0 2px rgba(11, 79, 151, 0.14);
}

.pd-row-available {
    gap: 0.7rem;
}

.pd-row > div {
    flex: 1 1 auto;
    min-width: 0;
}

.pd-row-selected {
    background: #f5f5f5;
    border-color: var(--rule-strong);
}

.pd-column-output .pd-row-selected {
    background: #f7f9fc;
}

.pd-row-text {
    margin: 0;
    color: #1f2937;
    line-height: 1.3;
    font-weight: 400;
}

.pd-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.pd-row-actions-inline {
    margin-top: 0;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
    margin-left: 0.5rem;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.pd-row-selected .pd-row-actions-inline {
    flex-wrap: nowrap;
}

.pd-row-available .pd-transfer-arrow {
    margin-left: 0.15rem;
}

.pd-row-selected .pd-transfer-arrow {
    margin-right: 0.15rem;
}

.pd-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-top: 0;
    min-height: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(11, 79, 151, 0.22);
    border-radius: 2px;
    background: #ffffff;
    line-height: 1;
}

.pd-row-selected .pd-icon-link {
    width: 2.2rem;
    min-width: 2.2rem;
    height: 2.2rem;
}

.pd-icon-link svg {
    display: block;
    flex: 0 0 auto;
    min-width: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.pd-icon-link path,
.pd-action-icon path {
    fill: currentColor;
}

.pd-icon-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pd-icon-link:hover {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.pd-icon-link:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.pd-transfer-arrow {
    margin-top: 0;
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-strong);
    border-radius: 0;
    background: #f3f8ff;
    color: #063c78;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.pd-transfer-arrow span {
    display: inline-block;
    transform: translateY(-1px);
    letter-spacing: -0.04em;
}

.pd-transfer-arrow:hover:not(:disabled) {
    background: #0b4f97;
    color: #ffffff;
}

.pd-transfer-arrow:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.pd-transfer-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pd-transfer-arrow-remove {
    background: #f7f7f7;
    border-color: #445469;
    color: #2f3a48;
}

.pd-transfer-arrow-remove:hover:not(:disabled) {
    background: #445469;
    color: #ffffff;
}

.pd-row-link {
    display: inline;
    margin-right: 0.85rem;
    color: var(--accent);
    background: transparent;
    border: 0;
    padding: 0;
    min-height: 0;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.pd-row-link:hover {
    color: var(--accent-strong);
}

.pd-row-link:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.pd-action {
    margin-top: 0;
    min-height: 0;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 2px;
    background: var(--accent-strong);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 0.42rem 0.64rem;
    cursor: pointer;
}

.pd-action:hover:not(:disabled) {
    background: var(--accent);
}

.pd-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pd-action-secondary {
    background: #ffffff;
    color: var(--accent-strong);
    border-color: rgba(11, 79, 151, 0.35);
}

.pd-action-secondary:hover:not(:disabled) {
    background: #eef4ff;
    color: var(--accent-strong);
}

.pd-action-add {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    padding: 0.5rem 0.82rem;
    background: #ffffff;
    color: #0b4f97;
    border-color: rgba(11, 79, 151, 0.28);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.pd-action-add:hover:not(:disabled) {
    background: #f3f8ff;
    color: #063c78;
    border-color: rgba(11, 79, 151, 0.45);
}

.pd-action-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.pd-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0.15rem;
    border: 1px solid rgba(11, 79, 151, 0.24);
    background: #eef4ff;
}

.pd-action-icon svg {
    flex: 0 0 auto;
    width: 1.18rem;
    height: 1.18rem;
    fill: currentColor;
}

.pd-action-label {
    white-space: nowrap;
    text-decoration: none;
    font-weight: 700;
}

.pd-section-header .pd-action-add {
    align-self: center;
}

.pd-section-header .pd-action-add {
    width: fit-content;
    align-self: flex-start;
}

.pd-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 999;
}

.pd-modal-card {
    width: min(40rem, 100%);
    background: #ffffff;
    border: 1px solid var(--rule-strong);
    border-radius: 3px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.pd-modal-card-confirm {
    width: min(28rem, 100%);
}

.pd-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--rule);
    background: #f8fafc;
}

.pd-modal-head h3,
.pd-modal-card-confirm h3 {
    margin: 0;
    color: #111827;
}

.pd-modal-close {
    border: 1px solid var(--rule);
    background: #ffffff;
    color: #374151;
    border-radius: 2px;
    font-weight: 700;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

.pd-modal-body {
    padding: 0.9rem 1rem;
    display: grid;
    gap: 0.8rem;
}

.pd-modal-copy {
    margin: 0;
    padding: 0.95rem 1rem 0.2rem;
    color: #374151;
}

.pd-modal-summary {
    padding: 0 1rem 0.6rem;
}

.pd-modal-summary p {
    margin: 0.35rem 0;
}

.pd-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid var(--rule);
    background: #f8fafc;
}

.pd-form-field {
    display: grid;
    gap: 0.3rem;
}

.pd-form-field label {
    font-weight: 700;
    color: #1f2937;
}

.pd-form-field input,
.pd-form-field select,
.pd-form-field textarea {
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    padding: 0.52rem 0.58rem;
    font: inherit;
    background: #ffffff;
    color: #111827;
}

.pd-form-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-form-checkbox-row input {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.pd-form-help {
    margin: 0;
    color: #6b7280;
    font-size: 0.87rem;
}

.pd-form-required {
    color: #b91c1c;
    margin-right: 0.25rem;
}

.pd-form-error {
    margin: 0;
    color: #b91c1c;
    font-size: 0.88rem;
    font-weight: 600;
}

.pd-required-note {
    margin: 0;
    color: #586663;
    font-size: 0.9rem;
}

.pd-form-field-invalid input,
.pd-form-field-invalid select,
.pd-form-field-invalid textarea {
    border-color: #b91c1c;
    background: #fff6f6;
}

.pd-empty {
    margin-top: 0.55rem;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 768px) {
    .app-shell {
        padding: 1rem 0.7rem 2rem;
    }

    .page-card {
        padding: 1.25rem 1rem 1.6rem;
    }

    .page-card > h1 {
        font-size: 1.56rem;
    }

    .auth-panel .auth-card {
        padding: 1.35rem 1rem 1.5rem;
    }

    .auth-cta-row {
        grid-template-columns: 1fr;
    }

    .output-preview-columns {
        grid-template-columns: 1fr;
    }

    .page-head,
    .pd-setup-grid,
    .pd-target-grid,
    .pd-section-grid,
    .pd-harness-grid {
        grid-template-columns: 1fr;
    }

    .pd-demo-control {
        width: 100%;
    }

    .pd-radio-row {
        grid-template-columns: 1fr;
    }

    .pd-needtoknow-box,
    .pd-needtoknow-box-with-guidance {
        margin-top: 0;
    }

    .pd-row {
        flex-direction: column;
    }

    .pd-action {
        width: 100%;
    }

    .pd-generate-button-lifering {
        width: 100%;
        justify-content: center;
        min-height: 4rem;
    }

    .pd-generate-row-step4 {
        grid-template-columns: 1fr;
    }

    .pd-shared-status {
        min-height: 0;
    }
    
    .pd-transfer-grid {
        grid-template-columns: 1fr;
    }

    .pd-transfer-grid::after {
        display: none;
    }

    .pd-debug-grid {
        grid-template-columns: 1fr;
    }

    .pd-debug-head {
        flex-direction: column;
        align-items: stretch;
    }

    .pd-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 10.5pt;
    }

    .app-shell {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    .auth-note {
        display: none;
    }

    .page-card,
    .auth-panel {
        border: 1px solid #b8b8b8;
        box-shadow: none;
    }

    a {
        color: #000;
        text-decoration: none;
    }
}

/* Authentication-aware account menu */

/* Primary-navigation dropdowns (e.g. About), generated from metadata/navigation.json */

/* Authenticated account settings */
.account-settings-card { max-width: 760px; }
.account-settings-card > h1 { margin-bottom: 0; padding-bottom: 0.12rem; border-bottom: 1px solid var(--rule-strong); }
.account-settings-section { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.account-settings-section h2 { margin: 0 0 0.65rem; font-size: 1.25rem; }
.account-plan-section { margin-top: 0.65rem; padding-top: 0; border-top: 0; }
.account-plan-section p { margin: 0 0 0.75rem; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1.25rem; line-height: 1.3; }
#account-plan-label { font-weight: 700; }
.account-settings-status { padding: 0.7rem 0.8rem; border: 1px solid #b8c9d8; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.account-reminder-options { display: grid; gap: 0; max-width: 30rem; margin: 0; padding: 0; border: 0; }
.account-reminder-option { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; align-items: center; min-height: 1.45rem; padding: 0; cursor: pointer; line-height: 1.2; }
.account-reminder-option input { margin: 0; }
.account-reminder-option span { display: block; }
.account-reminder-option strong { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.account-settings-section #account-reminder-description { margin-bottom: 0.35rem; }
.account-settings-note { margin-top: 0.55rem; color: var(--ink-muted); font-size: 0.92rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Build modal (public/js/lifeline-build-modal.js) */
body.lbm-open { overflow: hidden; }
.lbm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.55);
}
.lbm-dialog {
    position: relative;
    width: min(33.75rem, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 3px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    padding: 1.875rem 1.875rem 1.6875rem;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ink);
}
.lbm-dialog:focus { outline: none; }
.lbm-dialog-reveal { width: min(37.5rem, 100%); }
.lbm-lock { display: flex; justify-content: center; color: var(--accent); }
.lbm-lock svg { width: 3.125rem; height: 3.125rem; }
.lbm-title {
    margin: 0.75rem 0 0;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.4375rem;
    text-align: center;
    text-wrap: balance;
}
.lbm-subtitle { margin: 0.25rem 0 0; text-align: center; font-size: 1.025rem; color: var(--ink-muted); }
.lbm-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.lbm-step {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.6875rem 0.4375rem;
    opacity: 0.4;
    transition: opacity 0.25s ease;
}
.lbm-step.is-active, .lbm-step.is-done { opacity: 1; }
.lbm-step-mark {
    flex: none;
    width: 1.5625rem;
    height: 1.5625rem;
    margin-top: 0.0625rem;
    border: 2px solid var(--rule-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lbm-step.is-active .lbm-step-mark { border-color: var(--accent); }
.lbm-step.is-active .lbm-step-mark::after {
    content: "";
    width: 0.6875rem;
    height: 0.6875rem;
    border: 2px solid var(--accent);
    border-right-color: transparent;
    border-radius: 50%;
    animation: lbm-spin 0.8s linear infinite;
}
.lbm-step.is-done .lbm-step-mark { border-color: #1c7a4d; background: #1c7a4d; }
.lbm-step.is-done .lbm-step-mark svg { width: 0.875rem; height: 0.875rem; }
.lbm-step-text { display: flex; flex-direction: column; gap: 0.125rem; }
.lbm-step-label { font-size: 1.1rem; font-weight: 600; }
.lbm-step-why { font-size: 0.975rem; line-height: 1.4; color: var(--ink-muted); }
.lbm-bar { height: 4px; margin-top: 1.375rem; background: var(--rule); border-radius: 999px; overflow: hidden; }
.lbm-bar-fill { width: 0; height: 100%; background: var(--accent); transition: width 0.35s ease; }
@keyframes lbm-spin { to { transform: rotate(360deg); } }

.lbm-caption { margin: 0.4375rem 0 1.125rem; min-height: 1.3em; text-align: center; font-size: 1.0625rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.lbm-dialog-build { width: min(52.5rem, 100%); }
.lbm-sides { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9375rem; }
.lbm-side-shell { flex: 1 1 20rem; max-width: 23.75rem; display: flex; flex-direction: column; gap: 0.3125rem; }
.lbm-side-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.lbm-side {
    aspect-ratio: 1.586;
    max-width: 100%;
    padding: 0.625rem 0.8125rem;
    background: #ffffff;
    color: #101010;
    border: 1.5px solid #2f2f2f;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    transition: font-size 0.6s ease, box-shadow 0.4s ease;
}
.lbm-side.is-fitted { box-shadow: 0 0 0 2px #1c7a4d, 0 6px 18px rgba(0, 0, 0, 0.12); }
.lbm-provenance { flex: none; font-size: 6.6px; letter-spacing: -0.01em; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbm-side-contacts { display: flex; flex-direction: column; gap: 0.2em; }
.lbm-table-head, .lbm-row { display: flex; align-items: baseline; gap: 0.6em; white-space: nowrap; }
.lbm-table-head { font-weight: 700; border-bottom: 1px solid #2f2f2f; padding-bottom: 0.15em; margin-bottom: 0.1em; }
.lbm-table-head span:nth-child(1), .lbm-row-name { flex: 1 1 32%; overflow: hidden; text-overflow: ellipsis; }
.lbm-table-head span:nth-child(2), .lbm-row-phone { flex: 0 0 30%; overflow: hidden; text-overflow: ellipsis; }
.lbm-table-head span:nth-child(3), .lbm-row-note { flex: 1 1 38%; overflow: hidden; text-overflow: ellipsis; }
.lbm-row { animation: lbm-slot-in 0.3s ease both; }
.lbm-row-name { font-weight: 700; }
.lbm-row-phone { color: #4a4a4a; font-variant-numeric: tabular-nums; }
.lbm-row-note { color: #6b6b6b; font-style: italic; }
@keyframes lbm-slot-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.lbm-side-items { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; }
.lbm-item { border: 1px solid #d8d8d8; padding: 0.25em 0.45em; overflow: hidden; animation: lbm-drop-in 0.35s ease both; }
.lbm-item-lead { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbm-item-rest { display: block; color: #6b6b6b; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbm-note { border-top: 1px solid #d8d8d8; padding-top: 0.3em; animation: lbm-drop-in 0.35s ease both; }
.lbm-note-title { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.lbm-note-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #4a4a4a; line-height: 1.3; }
@keyframes lbm-drop-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }

.lbm-preview { margin: 1.25rem auto 0; width: min(30rem, 100%); animation: lbm-reveal 0.5s ease both; }
.lbm-preview-image { display: block; width: 100%; height: auto; border: 1px solid var(--rule-strong); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
@keyframes lbm-reveal { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.lbm-masked {
    margin-top: 1.25rem;
    padding: 0.875rem 1.0625rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 3px;
    font-size: 1.0625rem;
    line-height: 1.45;
}
.lbm-masked-message { margin: 0; }
.lbm-upgrade { display: inline-block; margin-top: 0.5rem; font-weight: 700; color: var(--accent-strong); }
.lbm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.375rem; }
.lbm-download, .lbm-close {
    font: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 0.6875rem 1.25rem;
    border-radius: 2px;
    cursor: pointer;
}
.lbm-download { background: var(--accent); border: 1px solid var(--accent-strong); color: #ffffff; }
.lbm-download:hover { background: var(--accent-strong); }
.lbm-download.is-done { background: #1c7a4d; border-color: #1c7a4d; }
.lbm-close { background: var(--paper); border: 1px solid var(--rule-strong); color: var(--ink); }
.lbm-download:focus-visible, .lbm-close:focus-visible, .lbm-upgrade:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lbm-file { margin: 1rem 0 0; text-align: center; font-size: 0.975rem; color: var(--ink-muted); overflow-wrap: anywhere; }
.lbm-error { margin: 1rem 0 0; text-align: center; font-size: 1.125rem; color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
    .lbm-step.is-active .lbm-step-mark::after,
    .lbm-row, .lbm-item, .lbm-note,
    .lbm-preview { animation: none; }
    .lbm-bar-fill, .lbm-step, .lbm-side { transition: none; }
}
