/* ═══════════════════════════════════════════════════════════════════
   Content Calendar — stylingCalendar.css
   Color theme: Amber (#f59e0b)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Page shell ───────────────────────────────────────────────────── */
.cal-page {
    background: #160e00;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #f1f5f9;
    margin-bottom: -96px;
}

/* ── Header ───────────────────────────────────────────────────────── */
.cal-header {
    background: linear-gradient(140deg, #1a1200 0%, #2d1f00 55%, #1a1200 100%);
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    margin-top: -60px;
}

.cal-header__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cal-badge {
    display: inline-flex;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 999px;
    padding: 3px 10px;
    /* margin-top: -130px; */
}

.cal-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.cal-subtitle {
    font-size: 0.90rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    max-width: 480px;
}

.cal-header__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-bottom: 4px;
}

.cal-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(245, 158, 11, 0.80);
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
    padding: 4px 12px;
    white-space: nowrap;
}

.cal-chip--posts {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.40);
}

/* ── Body ─────────────────────────────────────────────────────────── */
.cal-body {
    /* padding: 40px 0 80px; */
}

.cal-body.container {
    min-height: 0;
    margin-bottom: -96px;
}

/* ── Section ──────────────────────────────────────────────────────── */
.cal-section {
    margin-bottom: 48px;
}

.cal-section__header {
    margin-bottom: 20px;
}

.cal-section__title {
    font-size: 1.10rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 4px;
}

.cal-section__sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.40);
    margin: 0;
}

/* ── Params grid ──────────────────────────────────────────────────── */
.cal-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.cal-param-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.15s;
}

.cal-param-card--warn { border-color: rgba(251, 146, 60, 0.45) !important; }

.cal-param-warn {
    font-size: 0.80rem;
    margin-left: auto;
    cursor: default;
    line-height: 1;
}

.cal-chip--locked {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.30);
}

.cal-param-card:hover {
    border-color: rgba(245, 158, 11, 0.25);
}

.cal-param-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-param-card__emoji {
    font-size: 1rem;
}

.cal-param-card__label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cal-param-card__count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dim-color, #f59e0b);
    background: rgba(245, 158, 11, 0.10);
    border-radius: 999px;
    padding: 1px 7px;
}

.cal-param-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.cal-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    font-weight: 500;
    background: rgba(245, 158, 11, 0.12);
    color: var(--dim-color, #f59e0b);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 2px 8px 2px 10px;
}

.cal-tag__remove {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.55;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.12s;
}

.cal-tag__remove:hover { opacity: 1; }

.cal-param-input-row {
    display: flex;
    gap: 6px;
}

.cal-param-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.80rem;
    padding: 6px 10px;
    outline: none;
    transition: border-color 0.15s;
}

.cal-param-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.cal-param-input:focus { border-color: rgba(245, 158, 11, 0.50); }

.cal-param-add {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.30);
    color: #f59e0b;
    border-radius: 8px;
    width: 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-param-add:hover { background: rgba(245, 158, 11, 0.28); }

/* ── Settings ─────────────────────────────────────────────────────── */
.cal-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-bottom: 24px;
}

.cal-setting-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cal-setting-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.40);
}

.cal-days-row,
.cal-weeks-row {
    display: flex;
    gap: 6px;
}

.cal-day-btn,
.cal-week-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.cal-day-btn--active,
.cal-week-btn--active {
    background: rgba(245, 158, 11, 0.20);
    border-color: rgba(245, 158, 11, 0.50);
    color: #f59e0b;
}

.cal-day-btn:hover:not(.cal-day-btn--active),
.cal-week-btn:hover:not(.cal-week-btn--active) {
    background: rgba(255, 255, 255, 0.09);
    color: #e2e8f0;
}

.cal-date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.82rem;
    padding: 6px 12px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.cal-date-input:focus { border-color: rgba(245, 158, 11, 0.50); }

.cal-generate-row {
    display: flex;
    justify-content: flex-start;
}

.cal-generate-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #1a1200;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 11px 28px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    letter-spacing: 0.02em;
}

.cal-generate-btn:hover { opacity: 0.90; transform: translateY(-1px); }
.cal-generate-btn:active { transform: translateY(0); }

/* ── Calendar output ──────────────────────────────────────────────── */
.cal-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.cal-output-actions {
    display: flex;
    gap: 8px;
}

.cal-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.70);
    border-radius: 8px;
    font-size: 0.80rem;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.cal-action-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.cal-action-btn--export {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.30);
    color: #f59e0b;
}

.cal-action-btn--export:hover { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }

.cal-action-btn--ics {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.28);
    color: #34d399;
}
.cal-action-btn--ics:hover { background: rgba(52, 211, 153, 0.22); color: #6ee7b7; }

.cal-calendar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cal-week {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--week-color, #f59e0b);
    border-radius: 10px;
    overflow: hidden;
}

.cal-week__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cal-week__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--week-color, #f59e0b);
    white-space: nowrap;
}

.cal-week__note {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    padding: 2px 4px;
    outline: none;
    min-width: 0;
    transition: border-color 0.15s, color 0.15s;
}
.cal-week__note::placeholder { color: rgba(255, 255, 255, 0.18); }
.cal-week__note:focus { border-bottom-color: var(--week-color, #f59e0b); color: rgba(255, 255, 255, 0.70); }

.cal-week__slots {
    display: grid;
    gap: 0;
}

.cal-slot {
    padding: 12px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.15s;
}

.cal-slot:last-child { border-right: none; }

.cal-slot--locked   { background: rgba(245, 158, 11, 0.06); }
.cal-slot--recurring { background: rgba(52, 211, 153, 0.05); }

.cal-slot[draggable="true"] { cursor: grab; }
.cal-slot[draggable="true"]:active { cursor: grabbing; }

.cal-slot--drag-over {
    background: rgba(245, 158, 11, 0.14);
    outline: 2px dashed rgba(245, 158, 11, 0.55);
    outline-offset: -2px;
}

/* Actions row (lock + recur) */
.cal-slot__actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cal-slot__recur {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    opacity: 0.20;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}
.cal-slot__recur:hover  { opacity: 0.70; }
.cal-slot__recur--on    { opacity: 1; }

/* Platform distribution bar */
.cal-platform-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cal-platform-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(167, 139, 250, 0.10);
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 999px;
    padding: 3px 10px;
}

.cal-platform-count__name {
    font-size: 0.73rem;
    font-weight: 600;
    color: #a78bfa;
}

.cal-platform-count__num {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(167, 139, 250, 0.65);
}

.cal-slot__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.cal-slot__date {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.cal-slot__lock {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.30;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}
.cal-slot__lock:hover { opacity: 0.80; }
.cal-slot__lock--on { opacity: 1; }

.cal-slot__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cal-slot__tag {
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 7px;
    white-space: nowrap;
}

.cal-slot__tag--format   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.cal-slot__tag--angle    { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.cal-slot__tag--platform { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.cal-slot__tag--topic    { background: rgba(52, 211, 153, 0.15); color: #34d399; }

/* ── Empty state ──────────────────────────────────────────────────── */
.cal-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.30);
}

.cal-empty span { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cal-empty p { font-size: 0.90rem; }

/* ═══════════════════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] .cal-page { background: #fffbeb; }
html[data-theme="light"] .cal-page { color: #1c1917; }

html[data-theme="light"] .cal-page .cal-header {
    background: linear-gradient(140deg, #fffbeb 0%, #fef3c7 55%, #fffbeb 100%);
    border-bottom-color: rgba(245, 158, 11, 0.30);
}

html[data-theme="light"] .cal-page .cal-title { color: #78350f; }
html[data-theme="light"] .cal-page .cal-subtitle { color: rgba(120, 53, 15, 0.60); }
html[data-theme="light"] .cal-page .cal-badge { color: #b45309; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.30); }
html[data-theme="light"] .cal-page .cal-chip { color: #b45309; background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.25); }
html[data-theme="light"] .cal-page .cal-chip--posts { color: #d97706; background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.38); }

html[data-theme="light"] .cal-page .cal-section__title { color: #1c1917; }
html[data-theme="light"] .cal-page .cal-section__sub { color: #78716c; }

html[data-theme="light"] .cal-page .cal-param-card { background: #fff; border-color: #e7e5e4; }
html[data-theme="light"] .cal-page .cal-param-card:hover { border-color: rgba(245, 158, 11, 0.40); }
html[data-theme="light"] .cal-page .cal-param-card__label { color: #44403c; }
html[data-theme="light"] .cal-page .cal-param-card__count { color: #b45309; background: rgba(245, 158, 11, 0.10); }

html[data-theme="light"] .cal-page .cal-tag { background: rgba(245, 158, 11, 0.10); color: #b45309; border-color: rgba(245, 158, 11, 0.25); }

html[data-theme="light"] .cal-page .cal-param-input { background: #f5f5f4; border-color: #d6d3d1; color: #1c1917; }
html[data-theme="light"] .cal-page .cal-param-input::placeholder { color: #a8a29e; }
html[data-theme="light"] .cal-page .cal-param-input:focus { border-color: rgba(245, 158, 11, 0.55); }
html[data-theme="light"] .cal-page .cal-param-add { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.30); color: #b45309; }
html[data-theme="light"] .cal-page .cal-param-add:hover { background: rgba(245, 158, 11, 0.22); }

html[data-theme="light"] .cal-page .cal-setting-label { color: #78716c; }
html[data-theme="light"] .cal-page .cal-day-btn,
html[data-theme="light"] .cal-page .cal-week-btn { background: #fff; border-color: #d6d3d1; color: #57534e; }
html[data-theme="light"] .cal-page .cal-day-btn--active,
html[data-theme="light"] .cal-page .cal-week-btn--active { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.45); color: #b45309; }
html[data-theme="light"] .cal-page .cal-day-btn:hover:not(.cal-day-btn--active),
html[data-theme="light"] .cal-page .cal-week-btn:hover:not(.cal-week-btn--active) { background: #f5f5f4; color: #1c1917; }

html[data-theme="light"] .cal-page .cal-date-input { background: #fff; border-color: #d6d3d1; color: #1c1917; }
html[data-theme="light"] .cal-page .cal-date-input:focus { border-color: rgba(245, 158, 11, 0.55); }

html[data-theme="light"] .cal-page .cal-action-btn { background: #fff; border-color: #d6d3d1; color: #57534e; }
html[data-theme="light"] .cal-page .cal-action-btn:hover { background: #f5f5f4; color: #1c1917; }
html[data-theme="light"] .cal-page .cal-action-btn--export { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.28); color: #b45309; }
html[data-theme="light"] .cal-page .cal-action-btn--export:hover { background: rgba(245, 158, 11, 0.20); }
html[data-theme="light"] .cal-page .cal-action-btn--ics { background: rgba(5, 150, 105, 0.10); border-color: rgba(5, 150, 105, 0.28); color: #047857; }
html[data-theme="light"] .cal-page .cal-action-btn--ics:hover { background: rgba(5, 150, 105, 0.20); }

html[data-theme="light"] .cal-page .cal-week { background: #fff; border-color: #e7e5e4; }
html[data-theme="light"] .cal-page .cal-week__header { border-bottom-color: #f0ede8; }
html[data-theme="light"] .cal-page .cal-week__note { color: #78716c; border-bottom-color: #d6d3d1; }
html[data-theme="light"] .cal-page .cal-week__note::placeholder { color: #c4bfbb; }
html[data-theme="light"] .cal-page .cal-slot { border-right-color: #f0ede8; border-bottom-color: #f0ede8; }
html[data-theme="light"] .cal-page .cal-slot--locked    { background: rgba(245, 158, 11, 0.06); }
html[data-theme="light"] .cal-page .cal-slot--recurring { background: rgba(5, 150, 105, 0.05); }
html[data-theme="light"] .cal-page .cal-slot--drag-over { background: rgba(245, 158, 11, 0.10); outline-color: rgba(180, 83, 9, 0.50); }
html[data-theme="light"] .cal-page .cal-platform-count  { background: rgba(109, 40, 217, 0.08); border-color: rgba(109, 40, 217, 0.18); }
html[data-theme="light"] .cal-page .cal-platform-count__name { color: #6d28d9; }
html[data-theme="light"] .cal-page .cal-platform-count__num  { color: rgba(109, 40, 217, 0.55); }
html[data-theme="light"] .cal-page .cal-slot__date { color: #a8a29e; }
html[data-theme="light"] .cal-page .cal-param-card--warn { border-color: rgba(194, 65, 12, 0.45) !important; }

html[data-theme="light"] .cal-page .cal-slot__tag--format   { background: rgba(245, 158, 11, 0.12); color: #b45309; }
html[data-theme="light"] .cal-page .cal-slot__tag--angle    { background: rgba(251, 146, 60, 0.12); color: #c2410c; }
html[data-theme="light"] .cal-page .cal-slot__tag--platform { background: rgba(124, 58, 237, 0.10); color: #6d28d9; }
html[data-theme="light"] .cal-page .cal-slot__tag--topic    { background: rgba(5, 150, 105, 0.10); color: #047857; }

html[data-theme="light"] .cal-page .cal-empty { color: #a8a29e; }

/* ═══════════════════════════════════════════════════════════════════
   How It Works — button + modal
   ═══════════════════════════════════════════════════════════════════ */

.cal-hiw-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.50);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    /* margin-top: -130px; */
}
.cal-hiw-btn:hover {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.30);
}

.cal-hiw-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: cal-backdrop-in 0.18s ease;
}
@keyframes cal-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cal-hiw-modal {
    position: relative;
    background: #1a1200;
    border: 1px solid rgba(245, 158, 11, 0.20);
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.70), 0 0 0 1px rgba(245,158,11,0.08);
    animation: cal-modal-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(245,158,11,0.20) transparent;
}
.cal-hiw-modal::-webkit-scrollbar       { width: 5px; }
.cal-hiw-modal::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.20); border-radius: 99px; }

@keyframes cal-modal-in {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.cal-hiw-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.45);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cal-hiw-modal__close:hover { background: rgba(239,68,68,0.15); color: #f87171; border-color: rgba(239,68,68,0.30); }

.cal-hiw-modal__header { margin-bottom: 28px; padding-right: 40px; }

.cal-hiw-modal__eyebrow {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #f59e0b;
    margin: 0 0 8px;
}

.cal-hiw-modal__title {
    font-size: 1.50rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.cal-hiw-modal__subtitle {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.50);
    margin: 0;
    line-height: 1.6;
}

/* Section */
.cal-hiw-section {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 0;
}
.cal-hiw-section:first-of-type { border-top: none; }

.cal-hiw-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cal-hiw-section__icon {
    font-size: 1.15rem;
    width: 34px;
    height: 34px;
    background: rgba(245,158,11,0.10);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cal-hiw-section__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.cal-hiw-section__body {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin: 0 0 10px;
}
.cal-hiw-section__body:last-child { margin-bottom: 0; }
.cal-hiw-section__body strong { color: rgba(255,255,255,0.85); font-weight: 600; }
.cal-hiw-section__body em     { color: #fbbf24; font-style: normal; }

/* Four dimensions grid */
.cal-hiw-dims {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.cal-hiw-dim {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid var(--dc, #f59e0b);
    border-radius: 10px;
    padding: 14px;
}

.cal-hiw-dim__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cal-hiw-dim__emoji { font-size: 1rem; }

.cal-hiw-dim__label {
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--dc, #f59e0b);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cal-hiw-dim__desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    margin: 0;
}

/* Algorithm passes */
.cal-hiw-passes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.cal-hiw-pass {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
}

.cal-hiw-pass__num {
    width: 26px;
    height: 26px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.30);
    border-radius: 50%;
    color: #f59e0b;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cal-hiw-pass__content { flex: 1; min-width: 0; }

.cal-hiw-pass__title {
    font-size: 0.83rem;
    font-weight: 700;
    color: rgba(255,255,255,0.80);
    margin: 0 0 4px;
}

.cal-hiw-pass__desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    margin: 0;
}

/* ── HIW light mode ───────────────────────────────────────────────── */
html[data-theme="light"] .cal-page .cal-hiw-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: #78716c; }
html[data-theme="light"] .cal-page .cal-hiw-btn:hover { background: rgba(245,158,11,0.10); color: #b45309; border-color: rgba(245,158,11,0.30); }

.cal-hiw-backdrop { /* backdrop is always dark — intentional */ }

html[data-theme="light"] .cal-page .cal-hiw-modal { background: #fff; border-color: rgba(245,158,11,0.25); box-shadow: 0 32px 100px rgba(0,0,0,0.15); }
html[data-theme="light"] .cal-page .cal-hiw-modal__close { background: rgba(0,0,0,0.04); border-color: #e7e5e4; color: #78716c; }
html[data-theme="light"] .cal-page .cal-hiw-modal__eyebrow { color: #b45309; }
html[data-theme="light"] .cal-page .cal-hiw-modal__title { color: #1c1917; }
html[data-theme="light"] .cal-page .cal-hiw-modal__subtitle { color: #78716c; }
html[data-theme="light"] .cal-page .cal-hiw-section { border-top-color: #f0ede8; }
html[data-theme="light"] .cal-page .cal-hiw-section__icon { background: rgba(245,158,11,0.10); }
html[data-theme="light"] .cal-page .cal-hiw-section__title { color: #1c1917; }
html[data-theme="light"] .cal-page .cal-hiw-section__body { color: #57534e; }
html[data-theme="light"] .cal-page .cal-hiw-section__body strong { color: #1c1917; }
html[data-theme="light"] .cal-page .cal-hiw-section__body em { color: #d97706; }
html[data-theme="light"] .cal-page .cal-hiw-dim { background: #fafaf9; border-color: #e7e5e4; }
html[data-theme="light"] .cal-page .cal-hiw-dim__desc { color: #78716c; }
html[data-theme="light"] .cal-page .cal-hiw-pass { background: #fafaf9; border-color: #e7e5e4; }
html[data-theme="light"] .cal-page .cal-hiw-pass__title { color: #1c1917; }
html[data-theme="light"] .cal-page .cal-hiw-pass__desc { color: #78716c; }
