:root {
    color-scheme: light;
    --page: #E9EEF2;
    --sheet: #FFFFFF;
    --paper: #ffffff;
    --ink: #182022;
    --muted: #667173;
    --line: #e2e4df;
    --dark: #17282a;
    --dark-2: #28433e;
    --accent: #2e7569;
    --accent-soft: #edf5f2;
    --shadow: 0 28px 72px rgba(20, 36, 38, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body.hosted-profile-page {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
        var(--page);
}

.identity-sheet {
    /* Export modes planned: Full Bio Sheet, Compact Identity Card, Social Share Image, and PDF-safe layout. */
    width: min(calc(100% - 24px), 820px);
    margin: 12px auto;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid rgba(82, 95, 104, 0.18);
    border-radius: 24px;
    box-shadow: 0 32px 86px rgba(31, 45, 55, 0.10);
    --palette-accent: var(--accent);
    --palette-accent-soft: var(--accent-soft);
    --palette-link-decoration: rgba(47, 111, 99, 0.45);
    --palette-dark: var(--dark);
    --palette-dark-2: var(--dark-2);
    --palette-panel-glow: rgba(255, 255, 255, 0.18);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.16);
    --palette-hero-glow: rgba(46, 117, 105, 0.12);
    --palette-divider: rgba(102, 113, 115, 0.16);
    --palette-contact-divider: #e9ebe6;
    --palette-qr-border: rgba(46, 117, 105, 0.2);
    --mode-accent: var(--palette-accent);
    --mode-accent-soft: var(--palette-accent-soft);
    --mode-link-decoration: var(--palette-link-decoration);
    --mode-dark: var(--palette-dark);
    --mode-dark-2: var(--palette-dark-2);
    --mode-panel-glow: var(--palette-panel-glow);
    --mode-panel-glow-2: var(--palette-panel-glow-2);
    --mode-hero-glow: var(--palette-hero-glow);
    --mode-divider: var(--palette-divider);
    --mode-contact-divider: var(--palette-contact-divider);
    --mode-qr-border: var(--palette-qr-border);
    --mode-ornament-opacity: 0.08;
}

body.hosted-profile-page .identity-sheet {
    margin-block: clamp(18px, 4vw, 44px);
    box-shadow: 0 26px 72px rgba(31, 45, 55, 0.09);
}

.identity-sheet.palette-deep-emerald {
    --palette-accent: #2e7569;
    --palette-accent-soft: #edf5f2;
    --palette-link-decoration: rgba(47, 111, 99, 0.45);
    --palette-dark: #17282a;
    --palette-dark-2: #28433e;
    --palette-panel-glow: rgba(255, 255, 255, 0.18);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.16);
    --palette-hero-glow: rgba(46, 117, 105, 0.12);
    --palette-divider: rgba(102, 113, 115, 0.16);
    --palette-contact-divider: #e9ebe6;
    --palette-qr-border: rgba(46, 117, 105, 0.2);
    --palette-professional-accent: #4f746f;
    --palette-professional-hero-glow: rgba(46, 117, 105, 0.1);
}

.identity-sheet.palette-slate-blue {
    --palette-accent: #46677d;
    --palette-accent-soft: #eef3f6;
    --palette-link-decoration: rgba(70, 103, 125, 0.42);
    --palette-dark: #1c2931;
    --palette-dark-2: #33495a;
    --palette-panel-glow: rgba(237, 246, 249, 0.16);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.14);
    --palette-hero-glow: rgba(70, 103, 125, 0.13);
    --palette-divider: rgba(70, 103, 125, 0.16);
    --palette-contact-divider: rgba(70, 103, 125, 0.14);
    --palette-qr-border: rgba(70, 103, 125, 0.22);
    --palette-professional-accent: #587589;
    --palette-professional-dark: #22313a;
    --palette-professional-dark-2: #3a5263;
}

.identity-sheet.palette-graphite {
    --palette-accent: #5e686b;
    --palette-accent-soft: #f1f3f3;
    --palette-link-decoration: rgba(94, 104, 107, 0.42);
    --palette-dark: #202728;
    --palette-dark-2: #3b4445;
    --palette-panel-glow: rgba(255, 255, 255, 0.14);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.12);
    --palette-hero-glow: rgba(94, 104, 107, 0.11);
    --palette-divider: rgba(94, 104, 107, 0.16);
    --palette-contact-divider: rgba(94, 104, 107, 0.14);
    --palette-qr-border: rgba(94, 104, 107, 0.22);
    --palette-professional-accent: #697476;
}

.identity-sheet.palette-burgundy {
    --palette-accent: #7a4b58;
    --palette-accent-soft: #f6eff1;
    --palette-link-decoration: rgba(122, 75, 88, 0.4);
    --palette-dark: #2a2024;
    --palette-dark-2: #553542;
    --palette-panel-glow: rgba(255, 238, 242, 0.15);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.12);
    --palette-hero-glow: rgba(122, 75, 88, 0.12);
    --palette-divider: rgba(122, 75, 88, 0.15);
    --palette-contact-divider: rgba(122, 75, 88, 0.13);
    --palette-qr-border: rgba(122, 75, 88, 0.22);
    --palette-professional-accent: #845a64;
}

.identity-sheet.palette-navy-steel {
    --palette-accent: #3f5f73;
    --palette-accent-soft: #edf2f5;
    --palette-link-decoration: rgba(63, 95, 115, 0.42);
    --palette-dark: #17212b;
    --palette-dark-2: #2c4657;
    --palette-panel-glow: rgba(233, 243, 247, 0.16);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.12);
    --palette-hero-glow: rgba(63, 95, 115, 0.12);
    --palette-divider: rgba(63, 95, 115, 0.16);
    --palette-contact-divider: rgba(63, 95, 115, 0.14);
    --palette-qr-border: rgba(63, 95, 115, 0.22);
    --palette-professional-accent: #506b7c;
}

.identity-sheet.palette-sandstone {
    --palette-accent: #77674e;
    --palette-accent-soft: #f4f1eb;
    --palette-link-decoration: rgba(119, 103, 78, 0.4);
    --palette-dark: #26241f;
    --palette-dark-2: #4c4435;
    --palette-panel-glow: rgba(255, 248, 234, 0.17);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.12);
    --palette-hero-glow: rgba(119, 103, 78, 0.11);
    --palette-divider: rgba(119, 103, 78, 0.15);
    --palette-contact-divider: rgba(119, 103, 78, 0.13);
    --palette-qr-border: rgba(119, 103, 78, 0.22);
    --palette-professional-accent: #7e715c;
}

.identity-sheet.palette-charcoal {
    --palette-accent: #505c5e;
    --palette-accent-soft: #f0f2f2;
    --palette-link-decoration: rgba(80, 92, 94, 0.42);
    --palette-dark: #171c1d;
    --palette-dark-2: #30393b;
    --palette-panel-glow: rgba(255, 255, 255, 0.13);
    --palette-panel-glow-2: rgba(255, 255, 255, 0.11);
    --palette-hero-glow: rgba(80, 92, 94, 0.1);
    --palette-divider: rgba(80, 92, 94, 0.16);
    --palette-contact-divider: rgba(80, 92, 94, 0.14);
    --palette-qr-border: rgba(80, 92, 94, 0.22);
    --palette-professional-accent: #606b6d;
}

.identity-sheet.is-business {
    --mode-accent: var(--palette-accent);
    --mode-accent-soft: var(--palette-accent-soft);
    --mode-link-decoration: var(--palette-link-decoration);
    --mode-dark: var(--palette-dark);
    --mode-dark-2: var(--palette-dark-2);
}

.identity-sheet.is-professional {
    --mode-accent: var(--palette-professional-accent, var(--palette-accent));
    --mode-accent-soft: var(--palette-accent-soft);
    --mode-link-decoration: var(--palette-link-decoration);
    --mode-dark: var(--palette-professional-dark, var(--palette-dark));
    --mode-dark-2: var(--palette-professional-dark-2, var(--palette-dark-2));
    --mode-panel-glow: var(--palette-professional-panel-glow, rgba(255, 255, 255, 0.15));
    --mode-panel-glow-2: var(--palette-professional-panel-glow-2, rgba(255, 255, 255, 0.12));
    --mode-hero-glow: var(--palette-professional-hero-glow, var(--palette-hero-glow));
    --mode-ornament-opacity: 0.055;
}

a {
    color: inherit;
    text-decoration-color: var(--mode-link-decoration, rgba(47, 111, 99, 0.45));
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

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

.hero {
    position: relative;
    min-height: 144px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 18%, rgba(250, 250, 248, 0.13), transparent 26%),
        radial-gradient(circle at 18% 74%, var(--mode-hero-glow), transparent 30%),
        linear-gradient(135deg, var(--mode-dark, var(--dark)), var(--mode-dark-2, var(--dark-2)));
}

.bio-page {
    width: min(100%, 760px);
    margin: -58px auto 0;
    padding: 0 12px 18px;
    position: relative;
    z-index: 1;
}

.profile-card,
.bio-section,
.bio-footer {
    background: transparent;
}

.profile-card {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(82, 95, 104, 0.18);
    border-radius: 22px;
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    background: var(--paper);
}

.brand-panel {
    position: relative;
    display: grid;
    min-height: 126px;
    place-items: center;
    align-content: center;
    gap: 9px;
    padding: 18px 18px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 42%, var(--mode-panel-glow), transparent 28%),
        radial-gradient(circle at 18% 18%, var(--mode-panel-glow-2), transparent 24%),
        linear-gradient(145deg, var(--mode-dark), var(--mode-dark-2));
}

.brand-panel::before {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    content: "";
}

/* Professional profiles use the same panel, tuned slightly person-first. */
.identity-sheet.is-professional .brand-panel {
    gap: 6px;
    padding: 14px;
}

.profile-media {
    /* Future: image moderation, compression, retina thumbnails, and export-quality variants belong before this render step. */
    position: relative;
    z-index: 1;
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 22px;
    box-shadow:
        0 16px 34px rgba(6, 22, 23, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

/* Business = institutional/brand-first; logo frame is substantial but contained. */
.identity-sheet.is-business .profile-media {
    width: 112px;
    height: 112px;
}

/* Professional = identity/person-first; portrait frame is modestly larger but card-stable. */
.identity-sheet.is-professional .profile-media {
    width: 148px;
    height: 148px;
    border-radius: 30px;
}

.identity-sheet.is-professional .profile-mark {
    font-size: 2.52rem;
}

.identity-sheet.is-professional .profile-media.is-photo img {
    padding: 0;
    object-fit: cover;
    object-position: var(--photo-x, 50%) var(--photo-y, 35%);
    transform: scale(var(--photo-zoom, 1));
    transform-origin: center center;
}

.profile-media img {
    /* Guardrail: uploaded logos are contained and never stretched. */
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 7px;
    object-fit: contain;
    object-position: center;
}

.profile-media.is-photo img {
    padding: 0;
    object-fit: cover;
    object-position: center;
}

.profile-mark {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #ffffff;
    font-size: 1.96rem;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-panel span {
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-content {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 22px;
}

.eyebrow {
    margin: 0;
    color: var(--mode-accent, var(--accent));
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.identity-sheet.is-professional .eyebrow {
    color: var(--mode-accent);
    font-weight: 650;
}

h1,
h2,
p,
dl,
dd {
    margin: 0;
}

h1 {
    font-size: clamp(1.72rem, 7.4vw, 2.82rem);
    line-height: 0.96;
    letter-spacing: 0;
}

[data-profile-display-name] {
    /* Guardrail: display name scales via name-short/name-medium/name-long classes. */
    display: block;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
}

[data-profile-display-name].name-medium {
    font-size: clamp(1.26rem, 4.9vw, 1.86rem);
    line-height: 1;
}

[data-profile-display-name].name-long {
    font-size: clamp(1.04rem, 3.9vw, 1.42rem);
    line-height: 1.01;
}

h2 {
    font-size: clamp(1.45rem, 5vw, 2.15rem);
    line-height: 1.16;
    letter-spacing: 0;
}

.tagline {
    /* Guardrail: tagline supports a maximum of two lines before web truncation. */
    display: -webkit-box;
    max-width: 34rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tagline.tagline-medium {
    font-size: 0.92rem;
    line-height: 1.38;
}

.tagline.tagline-long {
    font-size: 0.84rem;
    line-height: 1.32;
}

.contact-list {
    display: grid;
    gap: 0;
    padding-top: 16px;
    border-top: 1px solid var(--mode-contact-divider, var(--line));
}

.contact-row {
    display: grid;
    grid-template-columns: minmax(106px, 0.38fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mode-contact-divider, #e9ebe6);
}

.contact-list dt {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.contact-list dd {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.94rem;
    font-weight: 640;
    line-height: 1.28;
}

.contact-list dd,
.contact-list a {
    /* Web mode truncates long labels; future export mode should show full contact details. */
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-qr-module {
    display: none;
}

.identity-sheet.is-business .business-qr-module {
    display: grid;
    justify-self: end;
    width: 60px;
    height: 60px;
    margin: 0;
    padding: 6px;
    place-items: center;
    border: 1px solid var(--mode-qr-border, rgba(102, 113, 115, 0.18));
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
}

.business-qr-module img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.export-mode-full-bio-sheet .identity-sheet {
    background: #ffffff;
}

.export-mode-compact-card,
.export-mode-social-share,
.export-mode-pdf-safe {
    /* Placeholder states for future download/render flows. Keep one canonical renderer, then tune output constraints per mode. */
}

.pdf-page-one-capture {
    box-sizing: border-box;
    width: 850px;
    height: 1100px;
    padding: 12px 19px 24px;
    overflow: hidden;
    background: #ffffff;
}

.pdf-page-one-capture > .identity-sheet {
    width: 812px;
    max-width: none;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.pdf-page-one-capture .bio-page {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: min(100%, 760px);
    min-height: 0;
}

.pdf-page-one-capture .profile-card {
    flex: 0 0 auto;
}

.pdf-page-one-capture .profile-media,
.pdf-page-one-capture .identity-sheet.is-business .profile-media {
    width: 140px;
    height: 140px;
}

.pdf-page-one-capture .identity-sheet.is-professional .profile-media {
    width: 176px;
    height: 176px;
}

.pdf-page-one-capture .bio-section {
    flex: 1 1 auto;
    align-content: start;
    width: 100%;
    max-width: 676px;
    margin-top: 24px;
    padding-right: 4px;
    padding-left: 4px;
}

.pdf-page-one-capture .bio-section p:not(.eyebrow) {
    max-width: 64ch;
}

.pdf-page-one-capture .bio-footer {
    flex: 0 0 auto;
    margin-top: auto;
    margin-bottom: 0;
}

.identity-sheet.export-full-portrait-sheet {
    width: 850px;
    height: 1100px;
    padding: 46px 54px 50px;
    border-radius: 0;
    box-shadow: none;
}

.identity-sheet.export-full-portrait-sheet .hero {
    min-height: 148px;
    border-radius: 22px 22px 0 0;
}

.identity-sheet.export-full-portrait-sheet .bio-page {
    width: 100%;
    margin-top: -46px;
    padding: 0 10px;
}

.identity-sheet.export-full-portrait-sheet .profile-card {
    grid-template-columns: 1fr;
    border-radius: 20px;
}

.identity-sheet.export-full-portrait-sheet .brand-panel {
    min-height: 238px;
    padding: 28px 26px 24px;
    gap: 10px;
}

.identity-sheet.export-full-portrait-sheet .profile-media,
.identity-sheet.export-full-portrait-sheet.is-business .profile-media {
    width: 158px;
    height: 158px;
}

.identity-sheet.export-full-portrait-sheet.is-professional .profile-media {
    width: 188px;
    height: 188px;
}

.identity-sheet.export-full-portrait-sheet .profile-content {
    gap: 9px;
    padding: 24px 34px 24px;
}

.identity-sheet.export-full-portrait-sheet .contact-list {
    padding-top: 10px;
}

.identity-sheet.export-full-portrait-sheet .bio-section {
    max-width: 672px;
    gap: 10px;
    margin-top: 22px;
    padding: 18px 2px 0;
}

.identity-sheet.export-full-portrait-sheet .about-header-row {
    gap: 16px;
}

.identity-sheet.export-full-portrait-sheet .bio-section p:not(.eyebrow) {
    font-size: 0.96rem;
    line-height: 1.58;
}

.identity-sheet.export-full-portrait-sheet .bio-section p:not(.eyebrow) + p:not(.eyebrow) {
    margin-top: 3px;
}

.identity-sheet.export-full-portrait-sheet .bio-footer {
    min-height: 40px;
    margin-top: 20px;
    padding: 8px 16px;
}

.pdf-page-one-capture.export-fit-tight .bio-section {
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
}

.pdf-page-one-capture.export-fit-tight .bio-section p:not(.eyebrow) {
    line-height: 1.62;
}

.pdf-page-one-capture.export-fit-tight .bio-section p:not(.eyebrow) + p:not(.eyebrow) {
    margin-top: 2px;
}

.pdf-page-one-capture.export-fit-tight .bio-footer {
    margin-top: auto;
}

.pdf-page-one-capture.export-fit-tighter .bio-page {
    padding-bottom: 12px;
}

.pdf-page-one-capture.export-fit-tighter .bio-section {
    gap: 7px;
    margin-top: 18px;
    padding-top: 14px;
}

.pdf-page-one-capture.export-fit-tighter .bio-section p:not(.eyebrow) {
    line-height: 1.58;
}

.pdf-page-one-capture.export-fit-tighter .bio-footer {
    margin-top: auto;
    padding-top: 6px;
    padding-bottom: 6px;
}

.identity-sheet.export-mobile-share-card {
    width: 360px;
    height: 640px;
    padding: 12px;
    border-radius: 0;
    box-shadow: none;
}

.identity-sheet.export-mobile-share-card .hero {
    min-height: 78px;
    border-radius: 20px 20px 0 0;
}

.identity-sheet.export-mobile-share-card .bio-page {
    width: 100%;
    margin-top: -28px;
    padding: 0 4px 8px;
}

.identity-sheet.export-mobile-share-card .profile-card {
    grid-template-columns: 1fr;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(20, 36, 38, 0.11);
}

.identity-sheet.export-mobile-share-card .brand-panel {
    min-height: 198px;
    padding: 20px 16px 18px;
    gap: 9px;
}

.identity-sheet.export-mobile-share-card.is-professional .brand-panel {
    min-height: 226px;
    padding: 22px 16px 20px;
}

.identity-sheet.export-mobile-share-card .brand-panel::before {
    inset: 14px;
}

.identity-sheet.export-mobile-share-card .profile-media,
.identity-sheet.export-mobile-share-card.is-business .profile-media {
    width: 130px;
    height: 130px;
    border-radius: 26px;
}

.identity-sheet.export-mobile-share-card.is-professional .profile-media {
    width: 158px;
    height: 158px;
    border-radius: 32px;
}

.identity-sheet.export-mobile-share-card .profile-media img {
    padding: 8px;
}

.identity-sheet.export-mobile-share-card .profile-media.is-photo img,
.identity-sheet.export-mobile-share-card.is-professional .profile-media.is-photo img {
    padding: 0;
    object-fit: cover;
}

.identity-sheet.export-mobile-share-card .profile-mark {
    font-size: 2.18rem;
}

.identity-sheet.export-mobile-share-card.is-professional .profile-mark {
    font-size: 2.72rem;
}

.identity-sheet.export-mobile-share-card .brand-panel span {
    font-size: 0.82rem;
}

.identity-sheet.export-mobile-share-card .profile-content {
    gap: 6px;
    padding: 15px 14px 13px;
}

.identity-sheet.export-mobile-share-card h1 {
    font-size: 1.86rem;
    line-height: 1;
}

.identity-sheet.export-mobile-share-card [data-profile-display-name].name-medium {
    font-size: 1.34rem;
    line-height: 1.03;
}

.identity-sheet.export-mobile-share-card [data-profile-display-name].name-long {
    font-size: 1.08rem;
    line-height: 1.04;
}

.identity-sheet.export-mobile-share-card .tagline {
    font-size: 0.88rem;
    line-height: 1.34;
}

.identity-sheet.export-mobile-share-card .tagline.tagline-medium {
    font-size: 0.82rem;
    line-height: 1.3;
}

.identity-sheet.export-mobile-share-card .tagline.tagline-long {
    font-size: 0.76rem;
    line-height: 1.25;
}

.identity-sheet.export-mobile-share-card .contact-list {
    padding-top: 8px;
}

.identity-sheet.export-mobile-share-card .contact-row {
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 4px 0;
}

.identity-sheet.export-mobile-share-card .contact-list dd {
    padding-left: 28px;
    font-size: 0.86rem;
    line-height: 1.24;
}

.identity-sheet.export-mobile-share-card.is-business .business-qr-module {
    width: 50px;
    height: 50px;
    padding: 5px;
    border-radius: 9px;
}

.identity-sheet.export-mobile-share-card .bio-section {
    gap: 6px;
    margin-top: 10px;
    padding: 10px 2px 0;
}

.identity-sheet.export-mobile-share-card .about-header-row {
    gap: 12px;
}

.identity-sheet.export-mobile-share-card .bio-section p:not(.eyebrow) {
    font-size: 0.86rem;
    line-height: 1.46;
}

.identity-sheet.export-mobile-share-card .bio-section.has-mobile-bio-summary [data-profile-bio-paragraph] {
    display: none;
}

.identity-sheet.export-mobile-share-card .bio-section > .eyebrow,
.identity-sheet.export-mobile-share-card .mobile-bio-continuation {
    display: none;
}

.identity-sheet.export-mobile-share-card .bio-section.has-mobile-bio-summary .mobile-bio-summary:not([hidden]) {
    display: block;
}

.identity-sheet.export-mobile-share-card .bio-footer {
    min-height: 36px;
    margin-top: 12px;
    padding: 6px 10px;
}

.identity-sheet.export-qr-card-sheet {
    width: 420px;
    height: 640px;
    padding: 22px;
    border-radius: 0;
    box-shadow: none;
}

.identity-sheet.export-qr-card-sheet .hero {
    min-height: 104px;
    border-radius: 20px 20px 0 0;
}

.identity-sheet.export-qr-card-sheet .bio-page {
    width: 100%;
    margin-top: -34px;
    padding: 0 14px 16px;
}

.identity-sheet.export-qr-card-sheet .profile-card {
    grid-template-columns: 1fr;
    border-radius: 20px;
    box-shadow: 0 22px 56px rgba(20, 36, 38, 0.09);
}

.identity-sheet.export-qr-card-sheet .brand-panel {
    min-height: 138px;
    padding: 18px 18px 16px;
}

.identity-sheet.export-qr-card-sheet .profile-media,
.identity-sheet.export-qr-card-sheet.is-business .profile-media,
.identity-sheet.export-qr-card-sheet.is-professional .profile-media {
    width: 96px;
    height: 96px;
    border-radius: 21px;
}

.identity-sheet.export-qr-card-sheet .profile-content {
    gap: 7px;
    padding: 20px 18px 16px;
    text-align: center;
}

.identity-sheet.export-qr-card-sheet .eyebrow {
    justify-content: center;
}

.identity-sheet.export-qr-card-sheet h1 {
    font-size: 1.74rem;
    line-height: 1.05;
}

.identity-sheet.export-qr-card-sheet .tagline {
    font-size: 0.88rem;
    line-height: 1.38;
}

.identity-sheet.export-qr-card-sheet .bio-section {
    justify-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 20px;
    text-align: center;
}

.identity-sheet.export-qr-card-sheet .about-header-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
}

.identity-sheet.export-qr-card-sheet .business-qr-module,
.identity-sheet.export-qr-card-sheet.is-business .business-qr-module {
    display: grid;
    justify-self: center;
    width: 156px;
    height: 156px;
    padding: 12px;
    border-radius: 17px;
}

.identity-sheet.export-qr-card-sheet .bio-footer {
    margin-top: 20px;
}

.identity-sheet.pdf-utility-page {
    width: 850px;
    height: 1100px;
    padding: 50px 58px 54px;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 28px;
    background:
        radial-gradient(circle at 88% 12%, var(--accent-soft) 0, rgba(255, 255, 255, 0) 28%),
        linear-gradient(180deg, #ffffff 0%, #f7f8f4 100%);
}

.pdf-utility-header {
    display: grid;
    gap: 7px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mode-divider, rgba(102, 113, 115, 0.16));
}

.pdf-utility-header p,
.pdf-utility-kicker {
    margin: 0;
    color: var(--mode-accent, var(--accent));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pdf-utility-header h1 {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: 0;
}

.pdf-utility-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    min-height: 0;
}

.pdf-utility-stack {
    display: grid;
    align-items: center;
    min-height: 0;
}

.pdf-utility-mobile-frame {
    display: grid;
    width: 300px;
    min-height: 430px;
    place-items: center;
    overflow: visible;
}

.identity-sheet.pdf-utility-mobile-card {
    margin: 0;
    transform: scale(0.82);
    transform-origin: center center;
    box-shadow: 0 24px 64px rgba(20, 36, 38, 0.11);
}

.identity-sheet.pdf-utility-mobile-card .bio-section,
.identity-sheet.pdf-utility-mobile-card .business-qr-module {
    display: none;
}

.pdf-qr-utility-card {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 34px 38px 32px;
    border: 1px solid var(--mode-divider, rgba(102, 113, 115, 0.16));
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 24px 62px rgba(20, 36, 38, 0.08);
    text-align: center;
}

.pdf-qr-utility-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 2rem;
    line-height: 1.08;
}

.pdf-qr-frame {
    display: grid;
    width: 210px;
    height: 210px;
    padding: 16px;
    place-items: center;
    border: 1px solid var(--mode-qr-border, rgba(102, 113, 115, 0.18));
    border-radius: 22px;
    background: #ffffff;
}

.pdf-qr-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pdf-qr-url {
    max-width: 24rem;
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.pdf-utility-url {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    padding: 20px 24px;
    border: 1px solid var(--mode-divider, rgba(102, 113, 115, 0.16));
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
}

.pdf-utility-url p {
    margin: 0;
}

.pdf-utility-url p:first-child {
    color: var(--mode-accent, var(--accent));
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pdf-utility-url p:last-child {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.detail-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--mode-accent, var(--accent));
    background: var(--mode-accent-soft, var(--accent-soft));
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.detail-icon svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.bio-section {
    display: grid;
    gap: 10px;
    max-width: 640px;
    margin: 24px auto 0;
    padding: 18px 4px 0;
    border-top: 1px solid var(--mode-divider, rgba(102, 113, 115, 0.16));
}

.about-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.about-header-row h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bio-section p:not(.eyebrow) {
    color: #344043;
    font-size: 0.99rem;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.bio-section p:not(.eyebrow) + p:not(.eyebrow) {
    margin-top: 4px;
}

.mobile-bio-summary,
.mobile-bio-continuation {
    display: none;
}

.mobile-bio-continuation {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.35;
}

.bio-footer {
    display: grid;
    min-height: 48px;
    margin-top: 24px;
    padding: 12px 18px 10px;
    place-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

.bio-footer p {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 15px;
    border: 1px solid rgba(102, 113, 115, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
}

@media (min-width: 680px) {
    .identity-sheet {
        margin-block: 22px;
    }

    .hero {
        min-height: 176px;
    }

    .bio-page {
        margin-top: -68px;
        padding: 0 20px 24px;
    }

    .profile-card {
        grid-template-columns: minmax(185px, 0.58fr) 1fr;
    }

    .brand-panel {
        min-height: 100%;
        padding: 22px;
    }

    .identity-sheet.is-professional .brand-panel {
        padding: 18px;
    }

    .identity-sheet.is-business .profile-media {
        width: 128px;
        height: 128px;
        border-radius: 24px;
    }

    .identity-sheet.is-professional .profile-media {
        width: 156px;
        height: 156px;
        border-radius: 32px;
    }

    .profile-content {
        padding: 26px 30px;
    }
}

@media (max-width: 420px) {
    .identity-sheet {
        width: min(calc(100% - 16px), 820px);
        margin-block: 6px;
        border-radius: 20px;
    }

    .hero {
        min-height: 78px;
    }

    .bio-page {
        margin-top: -30px;
        padding-inline: 9px;
        padding-bottom: 12px;
    }

    .brand-panel {
        min-height: 118px;
        padding: 14px 10px 16px;
        gap: 6px;
    }

    .identity-sheet.is-professional .brand-panel {
        min-height: 140px;
        padding: 14px 10px 15px;
        gap: 6px;
    }

    .profile-media {
        width: 72px;
        height: 72px;
        border-radius: 18px;
    }

    .identity-sheet.is-professional .profile-media {
        width: 96px;
        height: 96px;
        border-radius: 23px;
    }

    .profile-mark {
        font-size: 1.38rem;
    }

    .identity-sheet.is-professional .profile-mark {
        font-size: 1.82rem;
    }

    .profile-content {
        gap: 6px;
        padding: 15px 14px 13px;
    }

    h1 {
        font-size: clamp(1.5rem, 6.8vw, 1.95rem);
    }

    [data-profile-display-name].name-medium {
        font-size: clamp(1.02rem, 4.7vw, 1.24rem);
        line-height: 1.03;
    }

    [data-profile-display-name].name-long {
        font-size: clamp(0.9rem, 4.1vw, 1.04rem);
        line-height: 1.03;
    }

    .tagline {
        font-size: 0.88rem;
        line-height: 1.36;
    }

    .tagline.tagline-medium {
        font-size: 0.81rem;
        line-height: 1.3;
    }

    .tagline.tagline-long {
        font-size: 0.74rem;
        line-height: 1.26;
    }

    .contact-row {
        grid-template-columns: 1fr;
        gap: 1px;
        padding: 4px 0;
    }

    .contact-list {
        padding-top: 6px;
    }

    .contact-list dd {
        padding-left: 27px;
        font-size: 0.86rem;
        line-height: 1.24;
    }

    .identity-sheet.is-business .business-qr-module {
        width: 58px;
        height: 58px;
        padding: 5px;
        border-radius: 9px;
    }

    .bio-section {
        gap: 7px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .bio-section p:not(.eyebrow) {
        font-size: 0.91rem;
        line-height: 1.56;
    }

    .bio-section.has-mobile-bio-summary [data-profile-bio-paragraph] {
        display: none;
    }

    .bio-section.has-mobile-bio-summary .mobile-bio-summary:not([hidden]),
    .bio-section.has-mobile-bio-summary .mobile-bio-continuation:not([hidden]) {
        display: block;
    }

    .bio-section p:not(.eyebrow) + p:not(.eyebrow) {
        margin-top: 2px;
    }

    .mobile-bio-continuation {
        margin-top: 4px;
        color: rgba(102, 113, 115, 0.82);
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .bio-footer {
        min-height: 40px;
        margin-top: 16px;
        padding-block: 8px 7px;
    }
}

@media print {
    :root {
        --page: #ffffff;
        --paper: #ffffff;
        --sheet: #ffffff;
        --shadow: none;
    }

    /* PDF-safe baseline. Future QR placement should reserve explicit space instead of changing renderer flow at print time. */

    .hero {
        display: none;
    }

    body {
        background: #ffffff;
    }

    .identity-sheet {
        width: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .bio-page {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .profile-card {
        border: 1px solid #d8d8d8;
        border-radius: 0;
        box-shadow: none;
    }

    .bio-section,
    .bio-footer {
        margin-top: 28px;
    }
}
