.brand-portal{--brand-accent:#57b957;--brand-ink:#202826;--brand-muted:#6c7772;--brand-surface:#f5f7f5;display:grid;grid-template-columns:280px minmax(0,1fr);min-height:80vh;background:#fff;color:var(--brand-ink);border:1px solid rgba(32,40,38,.09);border-radius:22px;overflow:hidden;font-family:var(--brand-body-font,Inter,Arial,sans-serif);font-weight:var(--brand-body-weight,400)}.brand-portal *{box-sizing:border-box}.brand-portal-sidebar{background:var(--brand-ink);color:#fff;padding:30px 24px;position:sticky;top:0;height:100vh;overflow:auto}.brand-portal-brand{display:flex;flex-direction:column;gap:5px;margin-bottom:28px}.brand-portal-brand strong{font-size:23px;line-height:1.1}.brand-portal-kicker,.brand-portal-nav-label,.brand-portal-eyebrow{font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:700}.brand-portal-kicker{color:var(--brand-accent)}.brand-portal-sidebar nav{display:flex;flex-direction:column;gap:2px}.brand-portal-sidebar a{color:rgba(255,255,255,.78);text-decoration:none;padding:8px 10px;border-radius:8px;font-size:14px}.brand-portal-sidebar a:hover{background:rgba(255,255,255,.08);color:#fff}.brand-portal-nav-label{color:rgba(255,255,255,.42);margin:18px 10px 5px}.brand-portal-main{min-width:0}.brand-portal-editbar{display:flex;gap:12px;align-items:center;padding:12px 32px;background:#fff7d6;border-bottom:1px solid #eadb9e;font-size:13px}.brand-portal-editbar a{margin-left:auto;color:inherit}.brand-portal-hero{padding:70px clamp(28px,6vw,78px);background:var(--brand-surface);border-bottom:1px solid rgba(32,40,38,.08)}.brand-portal-hero h1{font-family:var(--brand-heading-font,Inter,Arial,sans-serif);font-weight:var(--brand-heading-weight,500);font-size:clamp(42px,6vw,78px);line-height:.96;letter-spacing:-.04em;margin:10px 0 18px}.brand-portal-hero p{max-width:760px;font-size:18px;line-height:1.6;color:var(--brand-muted)}.brand-portal-eyebrow{color:var(--brand-accent)}.brand-portal-button{display:inline-flex;align-items:center;justify-content:center;background:var(--brand-ink);color:#fff!important;border:0;border-radius:999px;padding:11px 16px;text-decoration:none!important;font-size:13px;font-weight:700;cursor:pointer}.brand-portal-button.secondary{background:#e9eeeb;color:var(--brand-ink)!important}.brand-portal-section{padding:56px clamp(28px,6vw,78px);border-bottom:1px solid rgba(32,40,38,.08)}.brand-portal-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:28px}.brand-portal-section h2{font-family:var(--brand-heading-font,Inter,Arial,sans-serif);font-weight:var(--brand-heading-weight,500);font-size:38px;line-height:1.05;letter-spacing:-.025em;margin:6px 0 0}.brand-portal-section h3{margin:0}.brand-portal-text-link{font-size:13px;color:var(--brand-ink)}.brand-portal-prose{max-width:900px;font-size:16px;line-height:1.72}.brand-portal-prose h3{font-family:var(--brand-heading-font,Inter,Arial,sans-serif);font-weight:var(--brand-heading-weight,500);font-size:24px;margin:32px 0 10px}.brand-portal-prose table{width:100%;border-collapse:collapse}.brand-portal-prose td,.brand-portal-prose th{padding:10px;border-bottom:1px solid #dfe6e1;text-align:left;vertical-align:top}.brand-portal-asset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}.brand-portal-asset-card{border:1px solid #dfe6e1;border-radius:16px;overflow:hidden;background:#fff}.brand-portal-asset-preview{height:170px;background:var(--brand-surface);display:flex;align-items:center;justify-content:center;padding:25px}.brand-portal-asset-preview img{max-width:100%;max-height:100%;object-fit:contain}.brand-portal-asset-preview.is-empty span{font-weight:800;letter-spacing:.12em;color:#9aa39f}.brand-portal-asset-body{padding:16px}.brand-portal-asset-body h3{font-size:17px}.brand-portal-asset-body p{font-size:12px;color:var(--brand-muted);min-height:18px}.brand-portal-downloads{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.brand-portal-downloads a{font-size:11px;font-weight:800;text-decoration:none;border:1px solid #ccd5d0;border-radius:999px;padding:5px 8px;color:var(--brand-ink)}.brand-portal-generator{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:34px}.brand-portal-generator-controls{display:flex;flex-direction:column;align-items:flex-start;gap:13px}.brand-portal-generator-controls label{width:100%;font-size:13px;font-weight:700}.brand-portal-generator-controls select{display:block;width:100%;margin-top:6px;padding:10px;border:1px solid #ccd5d0;border-radius:8px;background:#fff}.brand-portal-generator-controls p,.brand-portal-generator-controls small{font-size:12px;line-height:1.55;color:var(--brand-muted)}.brand-portal-card-preview{aspect-ratio:1.75/1;max-width:600px;border-radius:10px;background:linear-gradient(135deg,var(--brand-ink),#35413d);color:#fff;padding:35px;box-shadow:0 20px 40px rgba(0,0,0,.13);display:flex;flex-direction:column;justify-content:flex-end}.brand-portal-card-preview strong{font-size:25px}.brand-portal-card-preview span{font-size:13px;opacity:.78}.brand-portal-card-preview .contact{margin-top:20px;font-size:12px;line-height:1.65}.brand-portal-signature-preview{border:1px solid #dfe6e1;border-radius:14px;padding:28px;min-height:180px;background:#fff}.brand-portal-signature-preview table{border-collapse:collapse;font-family:Arial,sans-serif}.brand-portal-signature-preview td{vertical-align:middle}.brand-portal-signature-preview img{max-width:150px;max-height:60px;margin-right:18px}.brand-portal-signature-preview .sig-name{font-size:16px;font-weight:700}.brand-portal-signature-preview .sig-title{font-size:12px;color:#69736f}.brand-portal-signature-preview .sig-contact{font-size:11px;line-height:1.6;color:#39423f;padding-top:6px}@media(max-width:900px){.brand-portal{display:block}.brand-portal-sidebar{position:relative;height:auto}.brand-portal-sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.brand-portal-nav-label{grid-column:1/-1}.brand-portal-generator{grid-template-columns:1fr}.brand-portal-hero{padding-top:45px}.brand-portal-section{padding-top:42px;padding-bottom:42px}}@media print{.brand-portal-sidebar,.brand-portal-editbar,.brand-portal-button,.brand-portal-text-link,.brand-portal-downloads,.brand-portal-generator{display:none!important}.brand-portal{display:block;border:0}.brand-portal-section,.brand-portal-hero{break-inside:avoid;padding:30px 0;background:#fff}.brand-portal-main{width:100%}}

.brand-portal-page{margin:0!important;padding:0!important;background:#fff}.brand-portal-page .brand-portal{min-height:100vh;border:0;border-radius:0}.brand-portal-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.brand-portal button{font-family:inherit}.brand-portal-sidebar strong,.brand-portal-asset-body h3,.brand-portal-card-preview strong{font-family:var(--brand-heading-font,Inter,Arial,sans-serif)}
@media print{#logo-library,#icon-library,#font-library,#social-graphics,#business-cards,#email-signatures{display:none!important}.brand-portal-actions{display:none!important}.brand-portal-hero{padding-top:0}}

/* v0.3.0 portal refinements */
.brand-portal-page .brand-portal{overflow:visible}
.brand-portal-sidebar{align-self:start;top:0;max-height:100vh}
.brand-portal-asset-subsection{margin-top:34px}
.brand-portal-asset-subsection:first-of-type{margin-top:0}
.brand-portal-asset-subtitle{font-family:var(--brand-heading-font,Inter,Arial,sans-serif);font-weight:var(--brand-heading-weight,500);font-size:23px!important;line-height:1.15;margin:0 0 16px!important;padding-bottom:10px;border-bottom:1px solid rgba(32,40,38,.12)}
.brand-portal-asset-preview.is-dark{background:#202826}
.brand-portal-asset-preview.is-dark.is-empty span{color:rgba(255,255,255,.6)}
.brand-portal-signature-preview{overflow-x:auto}
.brand-portal-signature-preview img{margin-right:0;max-width:none;max-height:none}
@media(max-width:900px){.brand-portal-page .brand-portal{overflow:hidden}.brand-portal-sidebar{max-height:none;align-self:auto}}

/* v0.4.0 signature isolation and polish */
.brand-portal-signature-preview{border:0!important;border-radius:0!important;padding:18px 0!important;min-height:160px;background:#fff!important;box-shadow:none!important}
.brand-portal-signature-preview table,.brand-portal-signature-preview tbody,.brand-portal-signature-preview tr,.brand-portal-signature-preview td{border:0!important;background:#fff!important;box-shadow:none!important}
.brand-portal-signature-preview td{padding:0}
.brand-portal-signature-preview img{margin:0!important}

/* v0.5 business-card proof: exact full-bleed ratio and both sides */

/* v0.6.0: canonical source downloads, exact trim-guide geometry, and approved signature spacing */

/* v0.6.1: isolate generated email tables from theme/Elementor table rules */
.brand-portal-signature-preview table{width:auto!important;max-width:none!important;margin:0!important;border-spacing:0!important}
.brand-portal-signature-preview tr{height:auto!important}
.brand-portal-signature-preview td{height:auto!important;line-height:normal}
.brand-portal-signature-preview table img{max-width:none!important}

/* v0.7.0 business-card template rendering */

/* v0.8.0: visual brand-system modules precede written guidelines */
.brand-portal-system-section{background:#fff}
.brand-portal-palette-group,.brand-portal-type-group{margin-top:34px}
.brand-portal-palette-group:first-of-type,.brand-portal-type-group:first-of-type{margin-top:0}
.brand-portal-swatch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}.brand-portal-swatch-grid.is-full-palette{grid-template-columns:repeat(5,minmax(0,1fr))}
.brand-portal-swatch-card{border:1px solid #dfe6e1;border-radius:14px;overflow:hidden;background:#fff}
.brand-portal-swatch-chip{height:108px;border-bottom:1px solid #e4e8e5}
.brand-portal-swatch-card strong{display:block;padding:13px 13px 3px;font-size:14px}
.brand-portal-swatch-card button{display:block;border:0;background:transparent;padding:3px 13px 13px;color:var(--brand-muted);font:600 11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;cursor:pointer;text-align:left}
.brand-portal-gradient-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,280px));gap:14px;justify-content:start}
.brand-portal-gradient-card{border:1px solid #dfe6e1;border-radius:14px;overflow:hidden;background:#fff}
.brand-portal-gradient-chip{height:108px;border-bottom:1px solid #e4e8e5}
.brand-portal-gradient-card strong{display:block;padding:13px 13px 3px;font-size:14px}
.brand-portal-gradient-card span{display:block;padding:3px 13px 13px;font:600 11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--brand-muted)}
.brand-portal-type-family{display:flex;align-items:end;justify-content:space-between;gap:20px;padding:24px 0 30px;border-bottom:1px solid #e2e6e3}
.brand-portal-type-family span{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--brand-muted);font-weight:700}
.brand-portal-type-family strong{font-size:clamp(42px,7vw,84px);line-height:.9;font-weight:400;letter-spacing:-.045em}
.brand-portal-type-weight-grid{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:12px}
.brand-portal-type-weight-grid article{border:1px solid #dfe6e1;border-radius:12px;padding:15px;min-width:0}
.brand-portal-type-weight-grid article>div{font-size:42px;line-height:1;margin-bottom:13px}
.brand-portal-type-weight-grid strong{display:block;font-size:13px;margin-bottom:3px}
.brand-portal-type-weight-grid span{display:block;font-size:11px;line-height:1.35;color:var(--brand-muted)}
.brand-portal-type-hierarchy{display:grid;gap:1px;background:#e3e7e4;border:1px solid #e3e7e4;border-radius:14px;overflow:hidden}
.brand-portal-type-hierarchy article{background:#fff;padding:18px 20px}
.brand-portal-type-hierarchy article>span{display:block;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--brand-muted);font-weight:700;margin-bottom:7px}
.brand-portal-type-hierarchy article>div{overflow-wrap:anywhere}
.brand-portal-type-hierarchy small{display:block;margin-top:6px;color:var(--brand-muted);font-size:10px}
.brand-portal-mixed-weight{font-size:clamp(30px,4vw,56px);line-height:1.05;letter-spacing:-.035em;margin-top:38px;padding:30px 0;border-top:1px solid #e2e6e3;border-bottom:1px solid #e2e6e3}
@media(max-width:1100px){.brand-portal-type-weight-grid{grid-template-columns:repeat(3,minmax(110px,1fr))}}
@media(max-width:1100px){.brand-portal-swatch-grid.is-full-palette{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:680px){.brand-portal-type-family{display:block}.brand-portal-type-family strong{display:block;margin-top:14px}.brand-portal-type-weight-grid{grid-template-columns:repeat(2,minmax(110px,1fr))}.brand-portal-swatch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.brand-portal-system-section{display:none!important}}

/* v0.8.0 guideline presentation helpers */
.brand-portal-brand-statement{margin:18px 0 28px;padding:24px 26px;border-left:4px solid var(--brand-accent);background:var(--brand-surface);font-family:var(--brand-heading-font,Inter,Arial,sans-serif);font-size:clamp(25px,3vw,38px);line-height:1.15;letter-spacing:-.025em}
.brand-portal-values-grid,.brand-portal-attribute-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0 26px}
.brand-portal-value-card,.brand-portal-attribute-card{padding:16px 18px;border:1px solid #dfe6e1;border-radius:12px;background:#fff}
.brand-portal-value-card strong,.brand-portal-attribute-card strong{display:block;margin-bottom:4px;font-family:var(--brand-heading-font,Inter,Arial,sans-serif)}
.brand-portal-value-card p,.brand-portal-attribute-card p{margin:0;color:var(--brand-muted);font-size:14px;line-height:1.5}
.brand-portal-tone-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:#dfe6e1;border:1px solid #dfe6e1;border-radius:12px;overflow:hidden;margin:14px 0 26px}
.brand-portal-tone-grid>div{background:#fff;padding:12px 15px}
.brand-portal-tone-grid strong{display:block;font-size:13px}
.brand-portal-tone-grid span{display:block;color:var(--brand-muted);font-size:12px;margin-top:2px}
.brand-portal-example-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 26px}
.brand-portal-example-pair>div{padding:15px 17px;border-radius:10px;background:var(--brand-surface)}
.brand-portal-example-pair strong{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--brand-accent);margin-bottom:6px}
.brand-portal-example-pair p{margin:0;font-size:14px;line-height:1.5}
@media(max-width:680px){.brand-portal-values-grid,.brand-portal-attribute-grid,.brand-portal-tone-grid,.brand-portal-example-pair{grid-template-columns:1fr}}


/* v0.8.5: refined sidebar scrolling + mobile sticky navigation + mobile palette density */
.brand-portal-sidebar{
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.42) rgba(255,255,255,.06);
  scrollbar-gutter:stable;
}
.brand-portal-sidebar::-webkit-scrollbar{width:10px}
.brand-portal-sidebar::-webkit-scrollbar-track{background:rgba(255,255,255,.045);border-radius:999px;margin:14px 0}
.brand-portal-sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.42);border:3px solid var(--brand-ink);border-radius:999px;min-height:44px}
.brand-portal-sidebar::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.58)}

@media(max-width:900px){
  .brand-portal-page .brand-portal{overflow:visible!important}
  .brand-portal-sidebar{
    position:sticky!important;
    top:0!important;
    z-index:100;
    height:auto!important;
    max-height:none!important;
    padding:13px 16px 10px;
    box-shadow:0 8px 24px rgba(0,0,0,.16);
    overflow:visible;
  }
  .brand-portal-brand{
    flex-direction:row;
    align-items:baseline;
    gap:9px;
    margin:0 0 10px;
    white-space:nowrap;
    overflow:hidden;
  }
  .brand-portal-brand strong{font-size:17px;line-height:1.1;overflow:hidden;text-overflow:ellipsis}
  .brand-portal-kicker{font-size:9px;flex:0 0 auto}
  .brand-portal-sidebar nav{
    display:flex!important;
    flex-direction:row!important;
    gap:7px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:0 0 5px;
    margin:0 -2px;
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.42) transparent;
  }
  .brand-portal-sidebar nav::-webkit-scrollbar{height:5px}
  .brand-portal-sidebar nav::-webkit-scrollbar-track{background:transparent}
  .brand-portal-sidebar nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.42);border-radius:999px}
  .brand-portal-sidebar nav a{
    flex:0 0 auto;
    scroll-snap-align:start;
    white-space:nowrap;
    padding:7px 11px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:999px;
    background:rgba(255,255,255,.045);
    font-size:12px;
    line-height:1.15;
  }
  .brand-portal-sidebar nav a:hover,
  .brand-portal-sidebar nav a:focus-visible{
    background:rgba(255,255,255,.12);
    border-color:rgba(255,255,255,.26);
    color:#fff;
  }
  .brand-portal-nav-label{display:none!important}
}

@media(max-width:680px){
  .brand-portal-swatch-grid,
  .brand-portal-swatch-grid.is-full-palette,
  .brand-portal-gradient-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px;
  }
  .brand-portal-swatch-chip,.brand-portal-gradient-chip{height:92px}
  .brand-portal-swatch-card strong,.brand-portal-gradient-card strong{padding:11px 11px 3px;font-size:13px}
  .brand-portal-swatch-card button,.brand-portal-gradient-card span{padding:3px 11px 11px;font-size:10px}
}

/* Typography download belongs with the type system rather than a separate asset library. */
.brand-portal-heading-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}
.brand-portal-heading-actions .brand-portal-button{padding:9px 14px}
