/* ─── KA Style Guide — Frontend CSS ──────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.kasg-guide-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #0d1117;
    line-height: 1.6;
}

/* ─── Section Wrappers ────────────────────────────────────── */

.kasg-section { padding: 64px 0; }
.kasg-section--light { background: #ffffff; }
.kasg-section--dark  { background: #0d1117; color: #e2ebf0; }

.kasg-section__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.kasg-section__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.kasg-section--dark .kasg-section__title {
    color: #6b7280;
    border-bottom-color: #1e293b;
}

/* ─── HERO ────────────────────────────────────────────────── */

.kasg-hero {
    padding: 0;
    min-height: 340px;
    display: flex;
    align-items: stretch;
}

.kasg-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.kasg-hero__left { flex: 1; }
.kasg-hero__right { flex: 1; max-width: 420px; }

.kasg-hero__logo {
    height: 40px;
    margin-bottom: 24px;
    display: block;
}

.kasg-hero__brand {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
    padding: 6px 0;
}

.kasg-hero__eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent, #165dff);
    margin-bottom: 10px;
}

.kasg-hero__title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    color: var(--text-color, #ffffff);
    line-height: 1.15;
    margin-bottom: 18px;
}

.kasg-hero__sub {
    font-size: 14px;
    color: var(--text-muted, rgba(255,255,255,0.6));
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 28px;
}

.kasg-hero__pills { display: flex; flex-wrap: wrap; gap: 10px; }

.kasg-hero__pill {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, rgba(255,255,255,0.75));
    border: 1px solid var(--text-muted, rgba(255,255,255,0.2));
    border-radius: 20px;
    padding: 5px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Dashboard Mockup */
.kasg-mockup {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.kasg-mockup--brand {
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    box-shadow: none;
    border: none !important;
}

.kasg-mockup__brand-inner {
    text-align: center;
    padding: 20px;
    width: 100%;
}

.kasg-mockup__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
}
.kasg-mockup__dot { width: 10px; height: 10px; border-radius: 50%; }

.kasg-mockup__nav {
    display: flex;
    gap: 20px;
    padding: 10px 16px;
    border-bottom: 1px solid #21262d;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}
.kasg-mockup__nav span:first-child { color: #fff; font-weight: 600; }

.kasg-mockup__body { padding: 0; }

.kasg-mockup__content { padding: 16px; }

.kasg-mockup__stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.kasg-mockup__stat-change {
    font-size: 12px;
    color: #22c55e;
    margin-bottom: 12px;
}

/* ─── COLOUR PALETTE ──────────────────────────────────────── */

.kasg-palette { display: flex; flex-direction: column; gap: 28px; }

.kasg-palette__group-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.kasg-palette__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.kasg-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.kasg-swatch__color {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 4px 5px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
    line-height: 1.3;
    border: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.kasg-swatch__codes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.kasg-swatch__name {
    font-size: 11px;
    font-weight: 600;
    color: #0d1117;
    letter-spacing: 0.01em;
    margin-bottom: 3px;
    max-width: 90px;
    word-break: break-word;
    text-align: center;
    line-height: 1.4;
}

.kasg-swatch__hex {
    font-size: 11px;
    color: #0d1117;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.kasg-swatch__rgb,
.kasg-swatch__cmyk {
    font-size: 11px;
    color: #6b7280;
    font-family: monospace;
    font-weight: 400;
    white-space: nowrap;
}

/* ─── TYPOGRAPHY ──────────────────────────────────────────── */

.kasg-type-demo {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.kasg-type-specimen {
    flex: 0 0 220px;
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.kasg-type-specimen__display {
    font-size: 72px;
    font-weight: 700;
    color: #0d1117;
    line-height: 1;
    margin-bottom: 8px;
}
.kasg-type-specimen__name {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}
.kasg-type-specimen__chars {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.8;
    word-break: break-all;
}

.kasg-type-scale { flex: 1; }

.kasg-type-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.kasg-type-row:last-child { border-bottom: none; }

.kasg-type-row__tag {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 52px;
    flex-shrink: 0;
}
.kasg-type-row__sample { flex: 1; color: #0d1117; }
.kasg-type-row__meta {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── UI COMPONENTS ───────────────────────────────────────── */

.kasg-components-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.kasg-comp-block__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    margin-bottom: 12px;
    margin-top: 20px;
}
.kasg-comp-block__label:first-child { margin-top: 0; }

.kasg-btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.kasg-ui-btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity .15s;
}
.kasg-ui-btn--primary { color: #fff; }
.kasg-ui-btn--secondary { background: #1e293b; color: #e2ebf0; border-color: #334155; }
.kasg-ui-btn--tertiary  { background: transparent; color: #374151; border-color: #d1d5db; }
.kasg-ui-btn[disabled]  { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; cursor: not-allowed; }

.kasg-form-demo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.kasg-ui-label { font-size: 12px; color: #374151; font-weight: 500; }
.kasg-ui-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    background: #f9fafb;
}

.kasg-check-row { display: flex; gap: 16px; }
.kasg-ui-check, .kasg-ui-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: default;
}

.kasg-tab-row { display: flex; gap: 0; border-bottom: 1px solid #e5e7eb; }
.kasg-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: default;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.kasg-tab--active { font-weight: 600; border-bottom-width: 2px; }

/* Alerts */
.kasg-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid;
    margin-bottom: 10px;
}
.kasg-alert:last-child { margin-bottom: 0; }
.kasg-alert strong { font-size: 13px; font-weight: 700; display: block; margin-bottom: 2px; }
.kasg-alert p { font-size: 12px; margin: 0; }
.kasg-alert__icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.kasg-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.kasg-alert--success .kasg-alert__icon { background: #22c55e; color: #fff; }
.kasg-alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.kasg-alert--info .kasg-alert__icon    { background: #3b82f6; color: #fff; }
.kasg-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.kasg-alert--warning .kasg-alert__icon { background: #f59e0b; color: #fff; }
.kasg-alert--error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.kasg-alert--error .kasg-alert__icon   { background: #ef4444; color: #fff; }

/* ─── DATA TABLE ──────────────────────────────────────────── */

.kasg-data-table-wrap { overflow-x: auto; }

.kasg-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.kasg-data-table th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #1e293b;
}
.kasg-data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #161b22;
    color: #e2ebf0;
    font-size: 13px;
}
.kasg-data-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.kasg-dt-symbol { font-weight: 600; color: #fff; }
.kasg-dt-positive { color: #22c55e; font-weight: 600; }
.kasg-dt-negative { color: #ef4444; font-weight: 600; }
.kasg-dt-muted { color: #6b7280; }

/* ─── CHARTS ──────────────────────────────────────────────── */

.kasg-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

.kasg-chart-demo {
    background: #161b22;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.kasg-chart-svg { width: 100%; overflow: visible; }

.kasg-charts-note {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    border-top: 1px solid #1e293b;
    padding-top: 14px;
}

/* ─── TRADING UI ──────────────────────────────────────────── */

.kasg-trading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.kasg-trading-panel {
    background: #161b22;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
}

.kasg-trading-panel__title {
    font-size: 12px;
    font-weight: 700;
    color: #e2ebf0;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e293b;
}

.kasg-tui-label { font-size: 11px; color: #6b7280; display: block; margin-bottom: 5px; margin-top: 12px; }
.kasg-tui-label:first-of-type { margin-top: 0; }

.kasg-tui-select {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 13px;
    color: #e2ebf0;
    display: flex;
    justify-content: space-between;
}

.kasg-tui-qty {
    display: flex;
    align-items: center;
    gap: 0;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 5px;
    overflow: hidden;
    width: fit-content;
}
.kasg-tui-qty span { padding: 6px 14px; font-size: 13px; color: #e2ebf0; }
.kasg-tui-qty__btn { background: #161b22; color: #6b7280; font-size: 16px; cursor: default; }

.kasg-tui-input {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 13px;
    color: #e2ebf0;
}

.kasg-tui-order-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.kasg-tui-buy, .kasg-tui-sell {
    flex: 1;
    padding: 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: default;
}
.kasg-tui-buy  { background: #22c55e; color: #fff; }
.kasg-tui-sell { background: #ef4444; color: #fff; }

.kasg-position-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1e293b;
    font-size: 13px;
}
.kasg-pos-sym { color: #fff; font-weight: 600; }
.kasg-pos-qty { color: #6b7280; }
.kasg-pos-pnl--pos { color: #22c55e; font-weight: 600; }
.kasg-pos-pnl--neg { color: #ef4444; font-weight: 600; }

.kasg-risk-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    margin-top: 12px;
    margin-bottom: 6px;
}
.kasg-risk-val { color: #e2ebf0; font-weight: 600; }
.kasg-risk-bar-wrap { background: #0d1117; border-radius: 3px; height: 6px; overflow: hidden; }
.kasg-risk-bar { height: 100%; border-radius: 3px; }
.kasg-risk-sub { font-size: 11px; color: #6b7280; text-align: right; margin-top: 3px; }

/* ─── PDF STYLE ───────────────────────────────────────────── */

.kasg-pdf-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.kasg-pdf-cover {
    border-radius: 8px;
    padding: 24px 20px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Image cover variant */
.kasg-pdf-cover--image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    justify-content: flex-end;
}

.kasg-pdf-cover__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.3) 40%,
        rgba(0,0,0,0.75) 100%
    );
    border-radius: 8px;
}

.kasg-pdf-cover--image .kasg-pdf-cover__content {
    position: relative;
    z-index: 1;
}
/* PDF orientation label */
.kasg-pdf-orientation-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 12px;
}

/* Landscape cover */
.kasg-pdf-cover-wrap--landscape .kasg-pdf-cover {
    min-height: 180px;
    aspect-ratio: 1.414 / 1;
    max-width: 580px;
}

/* Portrait cover keeps default but add aspect ratio */
.kasg-pdf-cover {
    aspect-ratio: 1 / 1.414;
    max-width: 300px;
}



.kasg-pdf-cover__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-end;
}

.kasg-pdf-cover__logo {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: auto;
}

.kasg-pdf-cover__title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 6px;
}

.kasg-pdf-cover__tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    margin-bottom: 8px;
}

.kasg-pdf-cover__date {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}

.kasg-pdf-cover__footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
    margin-top: 4px;
}
.kasg-pdf-cover__footer span {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
}

.kasg-pdf-cover__chart { margin-top: auto; }

.kasg-pdf-body { display: flex; flex-direction: column; gap: 20px; }

.kasg-pdf-block h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    margin-bottom: 10px;
}

.kasg-pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.kasg-pdf-table th {
    background: #0d1117;
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
}
.kasg-pdf-table td { padding: 7px 12px; border-bottom: 1px solid #e5e7eb; color: #374151; }
.kasg-pdf-table tbody tr:nth-child(even) td { background: #f9fafb; }
.kasg-pdf-table__total td { font-weight: 700; color: #0d1117; border-top: 2px solid #0d1117; }

.kasg-pdf-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0f7ff;
    border: 1px solid;
    border-left-width: 3px;
    border-radius: 6px;
    padding: 12px 14px;
}
.kasg-pdf-callout__icon {
    width: 20px;
    height: 20px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.kasg-pdf-callout p { font-size: 12px; color: #374151; line-height: 1.6; margin: 0; }

.kasg-pdf-takeaways { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.kasg-pdf-takeaways li {
    font-size: 12px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kasg-pdf-takeaways li::before {
    content: '✓';
    color: var(--accent, #22c55e);
    font-weight: 700;
    flex-shrink: 0;
}

/* ─── LIGHT / DARK MODES ──────────────────────────────────── */

.kasg-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.kasg-mode-card {
    border-radius: 10px;
    padding: 20px;
    overflow: hidden;
}

.kasg-mode-card__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.kasg-mode-stat {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.kasg-mode-change { font-size: 12px; }

/* ─── ICONS & SPACING ─────────────────────────────────────── */

.kasg-icons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.kasg-icons-block__label, .kasg-spacing-block h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    margin-bottom: 6px;
}

.kasg-icons-block__meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.6;
}

.kasg-icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.kasg-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
}
.kasg-icon-item__symbol { font-size: 20px; }
.kasg-icon-item__name   { font-size: 10px; color: #6b7280; }

.kasg-spacing-list { display: flex; flex-direction: column; gap: 10px; }
.kasg-spacing-row  { display: flex; align-items: center; gap: 12px; }
.kasg-spacing-label { font-size: 11px; color: #6b7280; font-weight: 600; white-space: nowrap; }

/* ─── CUSTOM ──────────────────────────────────────────────── */

.kasg-custom-content { font-size: 14px; line-height: 1.7; color: #374151; }
.kasg-custom-content h1, .kasg-custom-content h2, .kasg-custom-content h3 {
    color: #0d1117; margin: 0 0 12px;
}
.kasg-custom-empty { font-size: 13px; color: #9ca3af; font-style: italic; }
.kasg-section--dark .kasg-custom-content { color: #e2ebf0; }

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    .kasg-section__inner { padding: 0 20px; }
    .kasg-hero__inner { flex-direction: column; padding: 40px 20px; gap: 32px; }
    .kasg-hero__right { max-width: 100%; width: 100%; }
    .kasg-type-demo { flex-direction: column; }
    .kasg-components-grid,
    .kasg-charts-grid,
    .kasg-trading-grid,
    .kasg-pdf-grid,
    .kasg-modes-grid,
    .kasg-icons-grid { grid-template-columns: 1fr; }
}

/* ─── TOP BAR ─────────────────────────────────────────────── */

.kasg-topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.kasg-topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kasg-topbar__title {
    font-size: 13px;
    font-weight: 700;
    color: #0d1117;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kasg-topbar__actions { display: flex; gap: 10px; }

.kasg-topbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #0d1117;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    letter-spacing: 0.02em;
}
.kasg-topbar__btn:hover { background: #333; }

/* ─── PRINT STYLES ────────────────────────────────────────── */

@media print {

    /* Hide screen-only elements */
    .no-print,
    .kasg-topbar { display: none !important; }

    /* Reset page */
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    body, .kasg-guide-body {
        background: #fff !important;
        margin: 0;
        padding: 0;
        font-size: 11pt;
    }

    /* Sections — avoid page breaks inside where possible */
    .kasg-section {
        padding: 32pt 0;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .kasg-section__inner {
        max-width: 100%;
        padding: 0 32pt;
    }

    /* Hero — full bleed dark background prints correctly */
    .kasg-hero {
        page-break-after: always;
        break-after: page;
        min-height: auto;
    }
    .kasg-hero__inner { padding: 40pt 32pt; }
    .kasg-hero__right { display: none; } /* hide mockup in PDF */

    .kasg-hero__title  { font-size: 28pt; }
    .kasg-hero__sub    { font-size: 10pt; }

    /* Palette — wrap swatches nicely */
    .kasg-palette__swatches { flex-wrap: wrap; gap: 8pt; }
    .kasg-swatch__color { width: 52pt; height: 52pt; }

    /* Typography — hide specimen box, just show scale */
    .kasg-type-demo { flex-direction: column; gap: 16pt; }
    .kasg-type-specimen { display: none; }
    .kasg-type-scale { width: 100%; }

    /* Components — stack columns */
    .kasg-components-grid { grid-template-columns: 1fr 1fr; gap: 24pt; }

    /* Dark sections — keep dark background for PDF */
    .kasg-section--dark { background: #0d1117 !important; }

    /* Data table */
    .kasg-data-table { font-size: 9pt; }
    .kasg-data-table th, .kasg-data-table td { padding: 6pt 10pt; }

    /* Charts — keep SVG charts, hide nothing */
    .kasg-charts-grid { grid-template-columns: 1fr 1fr; gap: 16pt; }
    .kasg-chart-demo { min-height: 80pt; }

    /* Trading grid */
    .kasg-trading-grid { grid-template-columns: 1fr 1fr; gap: 16pt; }

    /* PDF style section */
    .kasg-pdf-grid { grid-template-columns: 160pt 1fr; gap: 24pt; }

    /* Modes */
    .kasg-modes-grid { grid-template-columns: 1fr 1fr; gap: 16pt; }

    /* Icons */
    .kasg-icons-grid { grid-template-columns: 1fr 1fr; gap: 32pt; }
    .kasg-icon-grid  { grid-template-columns: repeat(5, 1fr); }

    /* Page setup */
    @page {
        size: A4 landscape;
        margin: 0;
    }
}

/* ─── Multiple font blocks ─────────────────────────────────── */

.kasg-type-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #f3f4f6;
}
.kasg-type-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.kasg-type-block__role {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    background: #334155;
    border-radius: 4px;
    padding: 3px 10px;
    margin-bottom: 16px;
}

/* ─── Pantone swatch row ───────────────────────────────────── */

.kasg-swatch__pantone {
    font-size: 9px;
    color: #6b7280;
    font-family: monospace;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    border-top: 1px dashed #e5e7eb;
    padding-top: 3px;
    margin-top: 2px;
    width: 100%;
}

.kasg-swatch__pantone::before {
    content: 'PMS ';
    color: #9ca3af;
    font-weight: 400;
}

.kasg-palette-pantone-disclaimer {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    line-height: 1.6;
}

@media print {
    .kasg-swatch__pantone { font-size: 7px; }
}

/* ─── LOGO SECTION ─────────────────────────────────────────── */

.kasg-logo-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: center;
}

.kasg-logo-section__sub {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #374151;
    margin-bottom: 16px;
}

.kasg-logo-section__desc {
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 20px;
}

.kasg-logo-section__notes {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.7;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}
.kasg-logo-section__notes p { margin-bottom: 4px; }

.kasg-logo-display {
    border-radius: 8px;
    padding: 48px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border: 1px solid rgba(0,0,0,0.06);
}

.kasg-logo-display--nobg {
    background: transparent !important;
    border: none;
    padding: 24px 0;
}

.kasg-logo-display__img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.kasg-logo-display--nobg .kasg-logo-display__img {
    max-height: 500px;
    width: 100%;
}

.kasg-logo-display__empty {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.kasg-clearspace-img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* ─── LOGO VARIATIONS ──────────────────────────────────────── */

.kasg-lv-description {
    font-size: 13px;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 520px;
}

.kasg-variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.kasg-variation-card {}

.kasg-variation-card__preview {
    border-radius: 8px;
    padding: 40px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: none;
    margin-bottom: 10px;
}

.kasg-variation-card__preview img {
    max-width: 85%;
    max-height: 160px;
    object-fit: contain;
}

.kasg-variation-card__placeholder {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

.kasg-variation-card__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #374151;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.kasg-variation-card__note {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
}

/* ─── LOGO CLEAR SPACE ─────────────────────────────────────── */

.kasg-clearspace-wrap {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 48px;
    align-items: center;
}

.kasg-clearspace__desc {
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 20px;
}

.kasg-clearspace__rule {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.kasg-clearspace__rule strong { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #374151; display: block; margin-bottom: 4px; }
.kasg-clearspace__rule p { font-size: 12px; color: #6b7280; margin: 0; line-height: 1.6; }

.kasg-clearspace-diagram {
    position: relative;
    border-radius: 8px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Corner bracket markers */
.kasg-cs-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}
.kasg-cs-corner--tl { top: 16px; left: 16px; border-top-style: solid; border-left-style: solid; }
.kasg-cs-corner--tr { top: 16px; right: 16px; border-top-style: solid; border-right-style: solid; }
.kasg-cs-corner--bl { bottom: 16px; left: 16px; border-bottom-style: solid; border-left-style: solid; }
.kasg-cs-corner--br { bottom: 16px; right: 16px; border-bottom-style: solid; border-right-style: solid; }

.kasg-cs-safezone {
    position: absolute;
    inset: 48px;
    border: 1.5px dashed;
    border-radius: 2px;
    opacity: 0.4;
    pointer-events: none;
}

.kasg-cs-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kasg-cs-logo img {
    max-width: 60%;
    max-height: 120px;
    object-fit: contain;
}

/* ─── MOCKUPS ──────────────────────────────────────────────── */

.kasg-mockups-header { margin-bottom: 24px; }

.kasg-mockups-subheading {
    font-size: 22px;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 10px;
    line-height: 1.3;
}
.kasg-section--dark .kasg-mockups-subheading { color: #fff; }

.kasg-mockups-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.7;
    max-width: 480px;
}

/* Grid layout */
.kasg-mockups-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Masonry-style: first image wide */
.kasg-mockups-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.kasg-mockup-img {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}
.kasg-mockup-img--span-2 {
    grid-column: span 2;
}

.kasg-mockup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.kasg-mockup-img__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    margin-top: 8px;
}
.kasg-section--dark .kasg-mockup-img__label { color: #e2ebf0; }

/* ─── Admin CSS for new editors ────────────────────────────── */

@media (max-width: 768px) {
    .kasg-logo-section,
    .kasg-clearspace-wrap { grid-template-columns: 1fr; }
    .kasg-variations-grid { grid-template-columns: 1fr 1fr; }
    .kasg-mockups-grid,
    .kasg-mockups-masonry { grid-template-columns: 1fr; }
    .kasg-mockup-img--span-2 { grid-column: span 1; }
}

/* ─── WATERMARK ────────────────────────────────────────────── */

.kasg-watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    overflow: hidden;
}

.kasg-watermark__inner {
    position: absolute;
    inset: -50%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 60px 80px;
    transform: rotate(-35deg);
    opacity: 0.08;
}

.kasg-watermark__inner span {
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #000000;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    user-select: none;
}

@media print {
    .kasg-watermark { position: fixed; }
    .kasg-watermark__inner span { color: #000; }
}

/* ─── PDF Cover wrap (standalone) ─────────────────────────── */

.kasg-pdf-cover-wrap {
    margin-bottom: 40px;
    display: flex;
    justify-content: flex-start;
}
.kasg-pdf-cover-wrap .kasg-pdf-cover,
.kasg-pdf-cover-wrap .kasg-pdf-cover--image {
    width: 220px;
    flex-shrink: 0;
}

/* ─── PDF Inside Pages ─────────────────────────────────────── */

.kasg-pdf-pages-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 32px;
}

.kasg-pdf-pages-section__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: 20px;
}

.kasg-pdf-pages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.kasg-pdf-page-item { display: flex; flex-direction: column; gap: 10px; }

.kasg-pdf-page-item--span-2 { grid-column: span 2; }
.kasg-pdf-page-item--span-full { grid-column: 1 / -1; }

.kasg-pdf-page-item__preview {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    aspect-ratio: 1.414 / 1; /* A4 landscape ratio */
    display: flex;
    align-items: center;
    justify-content: center;
}

.kasg-pdf-page-item__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kasg-pdf-page-item__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
}
.kasg-pdf-page-item__placeholder span {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

.kasg-pdf-page-item__meta { padding: 0 2px; }

.kasg-pdf-page-item__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #374151;
    margin-bottom: 3px;
}

.kasg-pdf-page-item__notes {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .kasg-pdf-pages-grid { grid-template-columns: repeat(2, 1fr); }
    .kasg-pdf-page-item--span-2 { grid-column: span 1; }
    .kasg-pdf-page-item--span-full { grid-column: span 1; }
}

@media print {
    .kasg-pdf-pages-grid { grid-template-columns: repeat(3, 1fr); gap: 12pt; }
    .kasg-pdf-page-item--span-2 { grid-column: span 2; }
}

/* ─── LOGO SCALING ──────────────────────────────────────────── */

.kasg-scaling-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 480px;
}

.kasg-scaling-image {
    width: 100%;
}

.kasg-scaling-image img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

/* ─── SOCIAL MEDIA APPLICATION ──────────────────────────────── */

.kasg-social-wrap {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.kasg-social__left {
    flex: 0 0 280px;
    max-width: 280px;
}

.kasg-social__desc {
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
}

.kasg-social__right {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
}

.kasg-social-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.kasg-social-logo--large .kasg-social-logo__circle {
    width: 200px;
    height: 200px;
}

.kasg-social-logo--small .kasg-social-logo__circle {
    width: 150px;
    height: 150px;
}

.kasg-social-logo__circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kasg-social-logo__circle img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.kasg-social-logo__placeholder {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

.kasg-social-logo__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #374151;
    text-align: center;
}

.kasg-social-logo__note {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    max-width: 150px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .kasg-social-wrap { flex-direction: column; }
    .kasg-social__left { max-width: 100%; }
    .kasg-social-logo--large .kasg-social-logo__circle { width: 140px; height: 140px; }
    .kasg-social-logo--small .kasg-social-logo__circle { width: 110px; height: 110px; }
}
