:root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    font-synthesis: none;
    color: #202734;
    background: #f7f8fa;
    --accent: #234dc3;
    --border: #e1e5eb;
    --muted: #606b7c;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, .platform-primary, .platform-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #ccd3df;
    border-radius: 8px;
    background: #fff;
    color: #303c52;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
}
button:hover, .platform-secondary:hover { background: #f1f4f9; text-decoration: none; }
.platform-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.platform-primary:hover { color: #fff; background: #1c3ea1; text-decoration: none; }
input, select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #bfc8d5;
    border-radius: 7px;
    background: #fff;
    color: #202734;
}
input::placeholder { color: #788394; font-weight: 400; }
input[readonly] { color: #606b7c; background: #f5f6f8; }
label { display: grid; gap: 7px; color: #3e495b; font-size: 13px; font-weight: 600; min-width: 0; }
form { display: grid; gap: 18px; margin: 0; }
form button { justify-self: start; }
input:focus, select:focus, button:focus-visible, a:focus-visible {
    outline: 3px solid #8daff8;
    outline-offset: 3px;
}
h1, h2, p { margin: 0; }
h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 650; letter-spacing: -.035em; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
p { color: var(--muted); }
.platform-topbar {
    display: flex;
    align-items: center;
    gap: 40px;
    min-height: 80px;
    padding: 14px max(28px, calc((100vw - 1200px) / 2));
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.platform-brand { color: #253044; font-weight: 650; font-size: 17px; letter-spacing: -.03em; white-space: nowrap; }
.platform-brand:hover { text-decoration: none; }
.platform-topbar nav { display: flex; align-items: center; gap: 8px; flex: 1; }
.platform-topbar nav a { color: #596577; font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 7px; }
.platform-topbar nav a[aria-current="page"] { color: #234dc3; background: #edf2ff; }
.platform-account { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.platform-account > span { max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.platform-account button { min-height: 36px; padding: 7px 12px; }
.platform-main { width: 100%; max-width: 1256px; margin: 0 auto; padding: 40px 28px 64px; flex: 1; }
.platform-page-heading { margin-bottom: 12px; }
.platform-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.platform-toolbar p { font-size: 14px; }
.platform-toolbar-actions, .platform-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.platform-toolbar-actions { justify-content: flex-end; }
.platform-form-actions { padding-top: 8px; }
.platform-form-actions a { padding: 10px 4px; font-size: 13px; }
.platform-panel, .platform-event { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.platform-panel { margin-bottom: 24px; }
.platform-panel > p { margin-top: 12px; }
.platform-editor { border-color: #b8c8eb; box-shadow: 0 2px 10px #273c6405; margin-bottom: 28px; }
.platform-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.platform-section-heading > a { font-size: 13px; white-space: nowrap; }
.platform-event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.platform-event-grid .platform-panel { margin-bottom: 0; }
.platform-event { display: flex; flex-direction: column; }
.platform-event h2 { margin: 18px 0 7px; font-size: 22px; }
.platform-event > p { font-size: 13px; }
.platform-event > p.platform-help { margin-top: 6px; }
.platform-event-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platform-badge { display: inline-flex; border-radius: 6px; padding: 4px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #f0f2f6; color: #556174; }
.status-live { background: #e9f6ee; color: #21603b; }
.status-scheduled { background: #edf2ff; color: #3157a3; }
.status-paused { background: #fff4df; color: #7c5717; }
.status-completed, .status-archived { background: #f0f1f3; color: #666d77; }
.platform-environment { font-size: 11px; color: var(--muted); }
.platform-event-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; font-size: 12px; color: var(--muted); padding: 20px 0; margin-bottom: auto; }
.platform-event-facts span { display: grid; align-content: start; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.platform-event-facts strong { color: #3e495b; font-size: 10px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.platform-event-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; font-size: 13px; font-weight: 500; }
.platform-event-links:empty { display: none; }
.platform-event-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; border-top: 1px solid #eef0f4; padding-top: 18px; margin-top: 22px; font-size: 12px; }
.platform-event-actions a { color: #45536b; }
.platform-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
[data-event-period-editor] label[hidden] { display: none; }
.platform-wide { grid-column: 1 / -1; }
.platform-form-section { min-width: 0; margin: 0; padding: 0 0 24px; border: 0; border-bottom: 1px solid #e9edf3; }
.platform-form-section legend { width: 100%; padding: 0; color: #253044; font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.platform-form-section > p { margin: 6px 0 18px; font-size: 13px; }
.platform-help { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.platform-result-count { color: var(--muted); font-size: 12px; margin: -4px 0 16px; }
.platform-filters { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 24px; }
.platform-filters .platform-search { flex: 1; max-width: 430px; }
.platform-filters label { min-width: 180px; }
.platform-filters button { min-height: 44px; }
.platform-filters > a { font-size: 13px; padding: 11px 0; }
.platform-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #606c80; font-size: 11px; font-weight: 600; text-align: left; }
th, td { padding: 15px 12px; border-bottom: 1px solid #e9edf2; vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tr:last-child td { border-bottom: 0; }
td strong { font-weight: 600; }
.platform-cell-detail { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.platform-row-actions { display: flex; flex-wrap: wrap; gap: 7px 16px; min-width: 125px; }
.platform-row-actions a { white-space: nowrap; }
.platform-scope-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; font-size: 13px; }
.platform-scope-tabs a { padding: 0 0 12px; color: var(--muted); }
.platform-scope-tabs a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 600; }
.platform-scope-picker { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.platform-scope-picker label { flex: 1; max-width: 480px; }
.platform-scope-picker button { min-height: 44px; }
.platform-alert { padding: 14px 16px; border: 1px solid #c7e0d2; border-radius: 8px; background: #eff8f2; color: #285e3e; margin-bottom: 24px; font-size: 13px; }
.platform-alert.error { background: #fff3f2; border-color: #edc6c1; color: #8b332b; }
.platform-danger-link { color: #9c3028; }
.platform-danger { background: #9c3028; border-color: #9c3028; color: #fff; }
.platform-danger:hover { background: #7c241e; border-color: #7c241e; }
.platform-purge-confirmation .platform-alert { line-height: 1.65; }
.platform-purge-status { color: #7c5717; font-size: 12px; font-weight: 650; line-height: 1.5; }
.platform-empty { padding: 44px 28px; text-align: center; }
.platform-empty p { margin-top: 10px; font-size: 13px; }
.platform-auth { background: #fafbfc; }
.platform-auth .platform-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.platform-login { width: 100%; max-width: 400px; padding: 36px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 6px 28px #172a4a04; }
.platform-login h1 { font-size: 25px; letter-spacing: -.035em; text-align: center; margin-bottom: 32px; }
.platform-login form { gap: 20px; }
.platform-login form button { width: 100%; margin-top: 4px; min-height: 44px; }
.platform-login .platform-alert { margin-bottom: 20px; }
.platform-footer { padding: 24px; text-align: center; color: #6e7888; font-size: 11px; }
.platform-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.platform-skip-link { position: absolute; left: 16px; top: -80px; padding: 10px 16px; background: #fff; z-index: 10; border: 1px solid var(--accent); border-radius: 6px; }
.platform-skip-link:focus { top: 12px; }
.event-context-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 24px; background: #eef2fc; color: #29497d; font-size: 13px; }
@media (max-width: 900px) {
    .platform-topbar { gap: 20px; padding: 16px 24px; flex-wrap: wrap; }
    .platform-topbar nav { order: 3; flex-basis: 100%; }
    .platform-account { margin-left: auto; }
}
@media (max-width: 680px) {
    .platform-topbar { padding: 16px; gap: 16px; }
    .platform-brand { font-size: 15px; }
    .platform-account > span { display: none; }
    .platform-topbar nav { gap: 12px; }
    .platform-topbar nav a { padding: 8px 10px; }
    .platform-main { padding: 28px 16px 44px; }
    .platform-toolbar { align-items: flex-start; flex-direction: column; gap: 16px; }
    .platform-toolbar-actions { width: 100%; justify-content: flex-start; }
    .platform-event-grid, .platform-form-grid, .platform-event-facts { grid-template-columns: 1fr; }
    .platform-event-grid { gap: 16px; }
    .platform-panel, .platform-event { padding: 20px; }
    .platform-section-heading { align-items: flex-start; gap: 12px; }
    .platform-section-heading h2 { font-size: 18px; }
    .platform-section-heading > a { font-size: 12px; }
    .platform-filters { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
    .platform-filters .platform-search { max-width: none; grid-column: 1 / -1; }
    .platform-filters label { min-width: 0; }
    .platform-filters > a { grid-column: 1 / -1; padding: 0; }
    .platform-scope-picker { align-items: stretch; flex-direction: column; }
    .platform-scope-tabs { gap: 18px; }
    .platform-table-wrap table { min-width: 570px; }
    .platform-auth .platform-main { padding: 24px 16px; }
    .platform-login { padding: 28px 24px; }
    .platform-login h1 { font-size: 24px; }
    .platform-footer { padding: 20px 16px; }
}
