:root {
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f2f5f3;
  --page: #f3f4f6;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --accent-soft: #e8f7ed;
  --success: #057642;
  --danger: #b24020;
  --warning: #915907;
  --radius: 18px;
  --radius-small: 13px;
  --shadow: 0 8px 28px rgba(31, 41, 55, .06);
  --shadow-hover: 0 14px 36px rgba(31, 41, 55, .10);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #ecf7f0 0, var(--page) 280px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-width: 320px;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(22, 163, 74, .28); outline-offset: 2px; }

.topbar {
  min-height: 68px;
  padding: 0 clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 8px rgba(31, 35, 40, .04);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 780; letter-spacing: -.015em; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.page-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 100px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 28px; }
.intro h1, .section-heading h2 { margin: 0; letter-spacing: -.035em; }
.intro h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; }
.intro p:not(.eyebrow) { color: var(--muted); max-width: 660px; margin-bottom: 0; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.intro-card { position: relative; overflow: hidden; align-items: center; padding: clamp(28px, 5vw, 54px); color: #fff; background: linear-gradient(135deg, #16a34a 0%, #159647 58%, #15803d 100%); border: 1px solid rgba(255, 255, 255, .18); border-radius: calc(var(--radius) + 4px); box-shadow: 0 18px 44px rgba(20, 83, 45, .18); }
.intro-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -95px; top: -125px; border-radius: 50%; border: 48px solid rgba(255, 255, 255, .07); pointer-events: none; }
.intro-card > * { position: relative; z-index: 1; }
.intro-card .eyebrow { color: #d3f5de; }
.intro-card p:not(.eyebrow) { color: rgba(255, 255, 255, .82); }
.queue-summary { display: flex; gap: 20px; white-space: nowrap; color: var(--muted); font-size: 14px; }
.queue-summary strong { color: var(--ink); font-size: 20px; margin-right: 4px; }
.intro-card .queue-summary { color: rgba(255, 255, 255, .78); }
.queue-stat { min-width: 126px; padding: 14px 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius-small); backdrop-filter: blur(8px); }
.intro-card .queue-summary strong { color: #fff; }

.composer-card, .request-card, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.composer-card { padding: clamp(22px, 4vw, 38px); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.card-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.card-heading .eyebrow { margin-bottom: 5px; }
.card-note { padding: 7px 11px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.composer { display: grid; gap: 24px; }
.field { display: grid; gap: 9px; color: #303843; font-size: 14px; font-weight: 700; }
.field em { color: var(--muted); font-style: normal; font-weight: 500; }
.field textarea, .field input, .stack input {
  width: 100%;
  border: 1px solid #ccd3da;
  border-radius: var(--radius-small);
  padding: 14px 16px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field-primary textarea { font-size: 18px; line-height: 1.55; min-height: 170px; }
.field textarea:focus, .field input:focus, .stack input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(22, 163, 74, .12); }
.field small { justify-self: end; color: var(--muted); font-weight: 500; }
.optional-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.channel-choice { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.channel-choice legend { padding: 0 7px; font-size: 14px; font-weight: 750; }
.channel-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.channel-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.channel-option { transition: border-color .15s, background .15s, transform .15s; }
.channel-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.channel-option span, .channel-option small, .channel-select span, .channel-select small { display: block; }
.channel-option small, .channel-select small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.channel-choice > small { display: block; margin-top: 10px; color: var(--muted); }
.composer-footer { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-top: 4px; }
.request-options { display: flex; align-items: end; gap: 24px; flex-wrap: wrap; }
.version-choice { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.version-choice legend { width: 100%; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.version-choice input { position: absolute; opacity: 0; }
.version-choice span { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 700; }
.version-choice input:checked + span { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.language-choice { min-width: 220px; }
.button { border: 0; border-radius: 999px; min-height: 42px; padding: 10px 17px; font-weight: 750; text-decoration: none; transition: color .15s, background .15s, box-shadow .15s, transform .15s; }
.button-primary { min-height: 46px; padding-inline: 22px; color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-dark); box-shadow: 0 8px 18px rgba(22, 163, 74, .2); }
.button-secondary { color: var(--accent-dark); background: var(--accent-soft); }
.button-secondary:hover { background: #dcf3e3; }
.button-danger { color: var(--danger); background: #fff0ee; }
.button-danger:hover { background: #ffe2de; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-quiet { color: var(--muted); background: transparent; }
.button-quiet:hover { color: var(--ink); background: var(--soft); }
.button-quiet[aria-current="page"] { color: var(--accent-dark); background: var(--accent-soft); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.account-name { color: var(--muted); font-size: 14px; }

.history { margin-top: 56px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.section-heading h2 { font-size: 30px; }
.post-history { margin-top: 28px; overflow: hidden; background: rgba(255, 255, 255, .82); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 20px rgba(31, 35, 40, .05); }
.post-history-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; cursor: pointer; list-style: none; transition: background .15s; }
.post-history-summary::-webkit-details-marker { display: none; }
.post-history-summary:hover { background: var(--accent-soft); }
.post-history-copy, .post-history-copy > span, .post-history-copy strong, .post-history-copy small { display: block; }
.post-history-copy .eyebrow { margin-bottom: 4px; }
.post-history-copy strong { font-size: 21px; letter-spacing: -.02em; }
.post-history-copy small { margin-top: 3px; color: var(--muted); }
.post-history-toggle { flex: 0 0 auto; padding: 8px 12px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; font-size: 12px; font-weight: 800; }
.post-history[open] .post-history-toggle { font-size: 0; }
.post-history[open] .post-history-toggle::after { content: "Close history"; font-size: 12px; }
.post-history-body { padding: 24px 26px 28px; border-top: 1px solid var(--line); }
.post-history-note { margin: 0 0 18px; }
.post-history .request-card { box-shadow: 0 3px 14px rgba(31, 35, 40, .04); }
.history-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 22px; color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.history-pagination .button:first-child { justify-self: start; }
.history-pagination .button:last-child { justify-self: end; }
.live-indicator { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(20, 125, 87, .1); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.request-list { display: grid; gap: 18px; }
.request-card { padding: clamp(20px, 3vw, 30px); box-shadow: 0 3px 14px rgba(31, 35, 40, .04); transition: border-color .18s, box-shadow .18s, transform .18s; }
.request-header { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.request-header h3 { margin: 8px 0 0; max-width: 780px; font-size: 19px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-meta, .result-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.origin-badge { padding: 2px 7px; border-radius: 999px; font-weight: 800; }
.origin-manual { color: var(--muted); background: var(--soft); }
.origin-automatic { color: var(--accent-dark); background: var(--accent-soft); }
.status { display: inline-block; flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 800; }
.status-completed, .status-ready, .status-sent, .status-sent_to_buffer { color: var(--success); background: #eaf7f1; }
.status-processing, .status-sending, .status-dispatching { color: #3b5ccc; background: #eef2ff; }
.status-queued, .status-rewrite_queued, .status-buffer_queued, .status-discard_queued,
.status-scheduled_local, .status-local_scheduled, .status-buffer_scheduled, .status-scheduled { color: var(--warning); background: #fff7df; }
.status-failed, .status-unknown { color: var(--danger); background: #fff0ee; }
.status-partial { color: var(--warning); background: #fff7df; }
.status-discarded, .status-cancelled { color: var(--muted); background: #edf0f2; }
.status-active, .status-done { color: var(--success); background: #eaf7f1; }
.status-pending, .status-running { color: var(--warning); background: #fff7df; }
.status-rejected { color: var(--danger); background: #fff0ee; }
.brief-details { margin-top: 18px; color: var(--muted); font-size: 14px; }
.brief-details summary { cursor: pointer; font-weight: 700; }
.results-grid { display: grid; gap: 14px; margin-top: 24px; }
.result-card { padding: 20px; border-radius: 14px; background: #f8fafc; border: 1px solid #dbe7de; box-shadow: inset 3px 0 0 var(--accent); }
.result-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.post-text { color: #252d36; line-height: 1.68; overflow-wrap: anywhere; }
.hashtags { color: var(--accent); font-weight: 650; }
.result-meta { padding-top: 15px; margin-top: 16px; border-top: 1px solid var(--line); }
.delivery-list { display: grid; gap: 8px; margin-top: 14px; }
.delivery-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.delivery-row small { display: block; margin-top: 2px; color: var(--muted); }
.publication-list { display: grid; gap: 9px; margin-top: 14px; }
.publication-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid #bfe6cc; border-radius: 11px; background: var(--accent-soft); }
.publication-row small, .publication-row a { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.publication-row a { color: var(--accent-dark); font-size: 13px; }
.publication-live-link { justify-self: start; font-size: 13px; font-weight: 750; }
.review-form { display: grid; gap: 16px; }
.review-form textarea { min-height: 300px; font-size: 16px; line-height: 1.68; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.schedule-panel { display: grid; gap: 15px; padding: 16px; border: 1px solid #bfe6cc; border-radius: 13px; background: linear-gradient(145deg, #fff 0%, var(--accent-soft) 100%); }
.media-panel { display: grid; gap: 15px; padding: 16px; border: 1px solid #d7e0da; border-radius: 13px; background: #fff; }
.media-preview-frame, .media-history { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.media-preview-frame[hidden] { display: none; }
.media-preview-frame img, .media-history img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #edf1f4; }
.media-preview-frame figcaption, .media-history figcaption { padding: 9px 12px; color: var(--muted); background: #fff; font-size: 12px; overflow-wrap: anywhere; }
.media-history { margin-top: 16px; }
.media-file-field input[type="file"] { width: 100%; padding: 10px; border: 1px dashed #a7cdb4; border-radius: 10px; background: var(--accent-soft); }
.media-file-field input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 11px; border: 0; border-radius: 8px; color: #fff; background: var(--accent); font-weight: 750; cursor: pointer; }
.media-remove { display: flex; align-items: center; gap: 9px; color: var(--danger); font-size: 13px; font-weight: 700; cursor: pointer; }
.media-remove input { width: 18px; height: 18px; accent-color: var(--danger); }
.schedule-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.schedule-panel-heading strong, .schedule-panel-heading small { display: block; }
.schedule-panel-heading small { margin-top: 3px; color: var(--muted); }
.phase-badge { flex: 0 0 auto; padding: 5px 8px; color: var(--accent-dark); background: #fff; border: 1px solid #bfe6cc; border-radius: 999px; font-size: 11px; font-weight: 800; }
.schedule-fields { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; }
.channel-option.is-disabled { opacity: .58; background: var(--soft); }
.channel-option.is-disabled input { cursor: not-allowed; }
.secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.secondary-actions details { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.secondary-actions summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 750; }
.feedback-form { display: grid; gap: 12px; margin-top: 14px; }
.feedback-form .button { justify-self: start; }
.result-error { margin-top: 14px; }
.inline-error, .alert { padding: 13px 15px; border-radius: 10px; font-size: 14px; }
.inline-error, .alert-error { color: var(--danger); background: #fff0ee; border: 1px solid #ffd4ce; }
.alert-success { color: var(--success); background: #eaf7f1; border: 1px solid #c7eadc; }
.alert { margin-bottom: 20px; }
.empty-state { padding: 42px; color: var(--muted); text-align: center; background: rgba(255, 255, 255, .75); border: 1px dashed #b5c5ba; border-radius: var(--radius); }
.muted { color: var(--muted); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, #d9f3e2 0, #eef7f1 34%, var(--page) 70%); }
.login-card { width: min(430px, 100%); padding: 38px; border-top: 4px solid var(--accent); }
.login-card .brand-mark { width: 62px; height: 62px; margin: 0 auto 28px; }
.login-card h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.login-card .button-primary { width: 100%; }
.stack { display: grid; gap: 18px; margin-top: 28px; }
.stack label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
.stack input { padding: 12px 14px; }
code { font-size: .9em; }

.admin-shell { width: min(980px, calc(100% - 40px)); }
.admin-card, .user-card { padding: clamp(20px, 3vw, 30px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 14px rgba(31, 35, 40, .04); }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-form .button-primary { align-self: end; }
.field select { width: 100%; border: 1px solid #ccd3da; border-radius: var(--radius-small); padding: 14px 16px; color: var(--ink); background: #fff; }
.user-list { display: grid; gap: 14px; }
.user-summary { display: flex; justify-content: space-between; gap: 20px; }
.user-summary h3 { margin: 0; }
.user-summary p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.user-actions { display: flex; align-items: start; gap: 10px; margin-top: 20px; }
.password-panel { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.password-panel summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 750; }
.password-form { display: flex; align-items: end; gap: 10px; margin-top: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-grid .admin-card h2 { margin: 4px 0 12px; }
.credential-state { color: var(--muted); font-size: 14px; }
.compact-stack { margin-top: 22px; }
.compact-stack .button { justify-self: start; }
.channel-list { display: grid; gap: 12px; }
.channel-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 10px rgba(31, 35, 40, .03); }
.channel-card p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.channel-select { cursor: pointer; justify-content: flex-start; }
.channel-select:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.channel-select > .muted { margin-left: auto; }
.channel-note { margin-top: 16px; font-size: 13px; }
.document-list { display: grid; gap: 14px; margin-top: 22px; }
.document-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.document-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.document-card > summary strong, .document-card > summary small { display: block; }
.document-card > summary small { margin-top: 4px; color: var(--muted); font-weight: 500; }
.document-form { display: grid; gap: 16px; margin-top: 22px; }
.document-form textarea { min-height: 420px; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.document-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.document-footer p { margin: 0; font-size: 13px; }
.pwa-install-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 20px; border-color: #bfe6cc; background: linear-gradient(135deg, #fff 0%, #f2faf4 100%); }
.pwa-install-copy { display: flex; align-items: center; gap: 18px; }
.pwa-install-copy h2 { margin: 3px 0 6px; font-size: 22px; letter-spacing: -.025em; }
.pwa-install-copy p:last-child { margin: 0; }
.pwa-app-icon { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 9px 22px rgba(22, 163, 74, .12); }
.pwa-app-icon img { display: block; width: 100%; height: 100%; }
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, #d9f3e2 0, #eef7f1 34%, var(--page) 70%); }
.offline-card .button { display: block; margin-top: 24px; text-align: center; }

.automation-shell { width: min(1080px, calc(100% - 40px)); }
.automation-intro { min-height: 230px; }
.automation-state { display: inline-flex; align-items: center; gap: 10px; min-width: 120px; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 14px; font-weight: 800; backdrop-filter: blur(8px); }
.automation-state i { width: 10px; height: 10px; border-radius: 50%; background: #b9c5cf; box-shadow: 0 0 0 5px rgba(255, 255, 255, .08); }
.automation-state.is-on i { background: #62d59c; }
.activation-note { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; padding: 15px 18px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #c4ecd2; border-radius: var(--radius-small); font-size: 14px; }
.activation-note strong { white-space: nowrap; }
.automatic-queue-panel { margin-bottom: 24px; padding: 24px; border: 1px solid #bfe6cc; border-radius: var(--radius); background: linear-gradient(145deg, #fff 0%, #f3faf5 100%); box-shadow: var(--shadow); }
.automatic-queue-heading { align-items: flex-start; }
.automatic-queue-heading > div { max-width: 700px; }
.automatic-queue-heading p:last-child { margin: 7px 0 0; color: var(--muted); }
.automatic-queue-heading form { flex: 0 0 auto; }
.automatic-queue-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.automatic-queue-summary article { padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-small); background: rgba(255, 255, 255, .9); }
.automatic-queue-summary span, .automatic-queue-summary strong, .automatic-queue-summary small { display: block; }
.automatic-queue-summary span { color: var(--muted); font-size: 12px; font-weight: 750; }
.automatic-queue-summary strong { margin: 4px 0; color: var(--accent-dark); font-size: 27px; letter-spacing: -.04em; }
.automatic-queue-summary small { color: var(--muted); }
.automatic-queue-progress { overflow: hidden; height: 8px; margin: 13px 0 10px; border-radius: 999px; background: #e3eae4; }
.automatic-queue-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #22c55e); }
.automatic-queue-note { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; }
.automatic-queue-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.automatic-queue-column-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.automatic-queue-column-heading h3 { margin: 0; font-size: 17px; }
.automatic-queue-column-heading > span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; color: var(--accent-dark); border-radius: 999px; background: var(--accent-soft); font-size: 12px; font-weight: 850; }
.automatic-draft-list { display: grid; gap: 10px; }
.automatic-draft-card { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-small); background: #fff; }
.automatic-draft-card.is-legacy { background: #fafafa; }
.automatic-draft-card h4 { margin: 10px 0 5px; font-size: 14px; }
.automatic-draft-card p { margin: 9px 0; color: #36414c; font-size: 13px; line-height: 1.5; }
.automatic-draft-card > small { display: block; color: var(--muted); font-size: 11px; }
.automatic-draft-card a { font-size: 12px; font-weight: 800; text-decoration: none; }
.automatic-draft-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.automatic-draft-meta small { color: var(--muted); text-align: right; }
.automatic-queue-placeholder { padding: 18px; border: 1px dashed #b2d4bd; border-radius: var(--radius-small); background: rgba(255, 255, 255, .65); font-size: 13px; }
.automatic-queue-empty { margin-top: 18px; padding: 26px 20px; }
.automation-form { display: grid; gap: 20px; }
.automation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.automation-card { display: flex; flex-direction: column; min-height: 250px; }
.automation-card h2 { margin: 4px 0 12px; font-size: 24px; letter-spacing: -.025em; }
.automation-toggle-card { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
.automation-toggle-card > div { max-width: 650px; }
.switch-control { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; cursor: pointer; color: var(--accent-dark); font-size: 14px; font-weight: 800; }
.switch-control input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 52px; height: 30px; flex: 0 0 auto; border-radius: 999px; background: #aeb8c2; transition: background .18s; }
.switch-track i { position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(31, 35, 40, .2); transition: transform .18s; }
.switch-control input:checked + .switch-track { background: var(--accent); }
.switch-control input:checked + .switch-track i { transform: translateX(22px); }
.switch-control input:focus-visible + .switch-track { outline: 3px solid rgba(22, 163, 74, .28); outline-offset: 3px; }
.day-picker { margin: 8px 0 22px; padding: 0; border: 0; }
.day-picker legend { margin-bottom: 10px; color: #303843; font-size: 14px; font-weight: 700; }
.day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-picker legend { grid-column: 1 / -1; }
.day-picker input { position: absolute; opacity: 0; }
.day-picker span { display: grid; place-items: center; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 13px; font-weight: 800; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.day-picker input:checked + span { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.day-picker input:focus-visible + span { outline: 3px solid rgba(22, 163, 74, .28); outline-offset: 2px; }
.automation-fields { display: grid; grid-template-columns: minmax(120px, .72fr) minmax(0, 1.28fr); gap: 14px; margin-top: auto; }
.automation-volume-card .automation-fields { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.volume-explainer { margin: auto 0 0; padding: 13px 14px; color: var(--success); background: #eaf7f1; border-radius: 10px; font-size: 13px; }
.automation-savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 18px; border: 1px solid #c2d3c6; border-radius: 15px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 35px rgba(31, 35, 40, .14); backdrop-filter: blur(14px); }
.automation-savebar p { margin: 0; color: var(--muted); font-size: 13px; }
.maintenance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.maintenance-card { display: flex; align-items: flex-start; gap: 18px; }
.maintenance-card h3 { margin: 0 0 5px; }
.maintenance-card p { margin: 0; color: var(--muted); font-size: 14px; }
.maintenance-number { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; color: #fff; background: var(--accent); border-radius: 13px; font-weight: 850; }
.run-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 14px rgba(31, 35, 40, .04); }
.run-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.run-row:last-child { border-bottom: 0; }
.run-row strong, .run-row small { display: block; }
.run-row small { margin-top: 3px; color: var(--muted); }

.calendar-shell { width: min(1480px, calc(100% - 40px)); }
.calendar-intro { min-height: 230px; }
.calendar-timezone { min-width: 190px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius-small); background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.calendar-timezone small, .calendar-timezone strong { display: block; }
.calendar-timezone small { color: rgba(255, 255, 255, .72); }
.calendar-timezone strong { margin-top: 3px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 30px 0 18px; }
.calendar-month-actions { display: flex; align-items: center; gap: 16px; }
.calendar-month-actions h2 { min-width: 210px; margin: 0; font-size: 28px; letter-spacing: -.03em; text-align: center; }
.calendar-month-actions .eyebrow { margin-bottom: 2px; text-align: center; }
.calendar-month-actions .button { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; font-size: 19px; }
.calendar-today { border: 1px solid var(--line); background: var(--surface); }
.calendar-toolbar-actions { display: flex; align-items: center; gap: 9px; }
.calendar-toolbar-actions form { margin: 0; }
.calendar-sync-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -7px 0 18px; padding: 11px 14px; color: var(--muted); border: 1px solid #cbe6d3; border-radius: 10px; background: #f4faf6; font-size: 12px; }
.calendar-sync-note strong { color: var(--danger); }
.calendar-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.calendar-summary article { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); box-shadow: 0 2px 9px rgba(31, 35, 40, .035); }
.calendar-summary strong { color: var(--accent-dark); font-size: 25px; }
.calendar-summary span { color: var(--muted); font-size: 13px; font-weight: 700; }
.calendar-summary .has-attention { border-color: #efb6a5; background: #fff8f5; }
.calendar-summary .has-attention strong { color: var(--danger); }
.calendar-card { overflow: hidden; border: 1px solid #c8d4df; border-radius: var(--radius); background: #c8d4df; box-shadow: var(--shadow); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.calendar-weekdays span { padding: 11px 12px; color: var(--muted); background: #eef3ef; font-size: 12px; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .08em; }
.calendar-day { min-width: 0; min-height: 180px; padding: 10px; background: var(--surface); }
.calendar-day.is-placeholder { background: #edf1f4; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.calendar-day-heading { display: flex; align-items: center; gap: 7px; min-height: 28px; margin-bottom: 8px; }
.calendar-day-heading time { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; font-weight: 850; }
.calendar-day.is-today .calendar-day-heading time { color: #fff; background: var(--accent); }
.calendar-day-heading small { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 750; }
.calendar-mobile-weekday { display: none; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.calendar-day-publications { display: grid; gap: 7px; }
.calendar-entry { display: flow-root; min-width: 0; padding: 9px; border: 1px solid #cde5d4; border-left: 3px solid var(--accent); border-radius: 9px; background: #f5faf7; }
.calendar-entry-failed, .calendar-entry-unknown { border-color: #efc4b8; border-left-color: var(--danger); background: #fff8f5; }
.calendar-entry-sent { border-color: #bfe4d4; border-left-color: var(--success); background: #f5fbf8; }
.calendar-entry-cancelled { border-color: var(--line); border-left-color: #8a949e; background: var(--soft); }
.calendar-entry-topline { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.calendar-entry-topline time { color: var(--accent-dark); font-size: 13px; font-weight: 850; }
.calendar-entry .status { padding: 3px 6px; font-size: 9px; }
.calendar-source { display: inline-block; margin-bottom: 6px; padding: 2px 6px; border-radius: 999px; color: var(--muted); background: #e9eef2; font-size: 9px; font-weight: 800; }
.calendar-source-buffer { color: var(--accent-dark); background: var(--accent-soft); }
.calendar-entry > strong, .calendar-entry > small { display: block; overflow-wrap: anywhere; }
.calendar-entry > strong { font-size: 12px; line-height: 1.3; }
.calendar-entry > small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.calendar-entry p { display: -webkit-box; overflow: hidden; margin: 7px 0; color: #36414c; font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.calendar-entry-image { display: block; width: 100%; height: 72px; margin: 0 0 8px; border-radius: 7px; object-fit: cover; background: var(--soft); }
.calendar-entry-links { display: flex; flex-wrap: wrap; gap: 5px 9px; }
.calendar-entry-links a { font-size: 10px; font-weight: 800; text-decoration: none; }
.calendar-original-timezone { margin-top: 6px !important; }
.calendar-empty h2 { margin-top: 0; }
.calendar-empty p { margin-bottom: 24px; }
.calendar-source-note { max-width: 760px; margin: 18px auto 0; color: var(--muted); font-size: 12px; text-align: center; }

.statistics-shell { width: min(1280px, calc(100% - 40px)); }
.statistics-intro { min-height: 230px; }
.statistics-window { min-width: 210px; padding: 15px 17px; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius-small); background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.statistics-window small, .statistics-window strong, .statistics-window span { display: block; }
.statistics-window small, .statistics-window span { color: rgba(255, 255, 255, .72); }
.statistics-window strong { margin: 3px 0; font-size: 20px; }
.statistics-window span { font-size: 12px; }
.statistics-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 30px 0 18px; }
.statistics-periods, .statistics-toolbar-actions, .statistics-channel-filter { display: flex; align-items: end; gap: 8px; }
.statistics-toolbar-actions form { margin: 0; }
.statistics-channel-filter label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.statistics-channel-filter select { min-width: 210px; min-height: 42px; padding: 8px 34px 8px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.statistics-sync-note { margin-top: 0; }
.statistics-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-bottom: 30px; }
.statistics-summary article { min-width: 0; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); box-shadow: 0 3px 12px rgba(31, 35, 40, .04); }
.statistics-summary span, .statistics-summary strong { display: block; }
.statistics-summary span { min-height: 34px; color: var(--muted); font-size: 12px; font-weight: 750; }
.statistics-summary strong { margin-top: 7px; color: var(--accent-dark); font-size: clamp(24px, 3vw, 32px); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.statistics-section { margin-top: 40px; }
.statistics-section .section-heading small { max-width: 360px; color: var(--muted); text-align: right; }
.statistics-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.statistics-table { width: 100%; border-collapse: collapse; }
.statistics-table th, .statistics-table td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.statistics-table th { color: var(--muted); background: #f6f8fa; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.statistics-table th:first-child, .statistics-table td:first-child { min-width: 230px; text-align: left; }
.statistics-table tbody tr:last-child td { border-bottom: 0; }
.statistics-table td { font-size: 14px; font-weight: 720; }
.statistics-table td:first-child strong, .statistics-table td:first-child small { display: block; }
.statistics-table td:first-child small { margin-top: 2px; color: var(--muted); font-weight: 500; }
.statistics-signal { display: block; overflow: hidden; height: 4px; margin-top: 9px; border-radius: 99px; background: #e4ebf1; }
.statistics-signal i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #22c55e); }
.statistics-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.statistics-post-card { display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 14px rgba(31, 35, 40, .04); transition: border-color .18s, box-shadow .18s, transform .18s; }
.statistics-rank { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; color: var(--accent-dark); border-radius: 11px; background: var(--accent-soft); font-size: 13px; font-weight: 850; }
.statistics-post-body { min-width: 0; flex: 1; }
.statistics-post-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: 11px; }
.statistics-post-meta strong { color: var(--ink); font-size: 13px; }
.statistics-post-meta time { margin-left: auto; }
.statistics-post-card p { margin: 12px 0; color: #36414c; font-size: 13px; line-height: 1.55; }
.statistics-metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.statistics-metrics span { padding: 5px 8px; color: var(--muted); border-radius: 8px; background: var(--soft); font-size: 10px; }
.statistics-metrics strong { color: var(--ink); }
.statistics-post-card a { font-size: 12px; font-weight: 800; text-decoration: none; }
.statistics-empty { margin-top: 22px; }
.token-dashboard { margin: 0 0 30px; padding: clamp(20px, 3vw, 30px); border: 1px solid #bfe6cc; border-radius: var(--radius); background: linear-gradient(145deg, #fff 0%, #f3faf5 100%); box-shadow: var(--shadow); }
.token-dashboard-heading { align-items: flex-start; margin-bottom: 16px; }
.token-dashboard-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.token-dashboard-controls { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.token-periods { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.token-periods .button { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.token-budget-form { display: grid; grid-template-columns: minmax(170px, 220px) auto; align-items: end; gap: 7px 9px; }
.token-budget-form label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.token-budget-form input { min-height: 42px; padding: 8px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.token-budget-form small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; text-align: right; }
.token-coverage-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; padding: 11px 13px; color: var(--muted); border: 1px solid #cbe6d3; border-radius: 10px; background: #f4faf6; font-size: 11px; }
.token-coverage-note strong { color: var(--accent-dark); }
.token-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.token-summary article { min-width: 0; padding: 17px 15px; border: 1px solid var(--line); border-radius: var(--radius-small); background: rgba(255, 255, 255, .92); }
.token-summary article.has-attention { border-color: #efb6a5; background: #fff8f5; }
.token-summary span, .token-summary strong, .token-summary small { display: block; }
.token-summary span { color: var(--muted); font-size: 11px; font-weight: 750; }
.token-summary strong { margin: 5px 0; color: var(--accent-dark); font-size: clamp(24px, 3vw, 31px); line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.token-summary small { color: var(--muted); font-size: 10px; }
.token-summary-primary { border-color: #9fd6b2 !important; background: var(--accent-soft) !important; }
.token-budget-progress { overflow: hidden; height: 9px; margin: 18px 0 7px; border-radius: 999px; background: #e3eae4; }
.token-budget-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #22c55e); }
.token-budget-caption { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; }
.token-timeline-panel, .token-activity { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-small); background: rgba(255, 255, 255, .88); }
.token-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.token-panel-heading h3 { margin: 0; font-size: 16px; }
.token-panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.token-panel-heading > strong { flex: 0 0 auto; color: var(--accent-dark); font-size: 13px; }
.token-timeline-frame { overflow: visible; width: 100%; padding: 4px 2px 9px; }
.token-timeline { display: flex; align-items: end; gap: 6px; width: 100%; min-width: 0; height: 190px; }
.token-timeline article { display: grid; grid-template-rows: 19px 126px 22px; align-items: end; flex: 1 1 0; min-width: 0; height: 100%; text-align: center; }
.token-timeline article > span { overflow: hidden; color: var(--accent-dark); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.token-timeline-track { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 122px; justify-self: stretch; border-bottom: 1px solid #d7e0da; background: repeating-linear-gradient(to top, transparent 0, transparent 30px, rgba(205, 219, 231, .5) 30px, rgba(205, 219, 231, .5) 31px); }
.token-timeline-track i { position: relative; z-index: 1; display: block; width: min(26px, 68%); min-height: 5px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #22c55e, var(--accent-dark)); box-shadow: 0 4px 10px rgba(22, 163, 74, .17); }
.token-timeline-height-5 { height: 5%; }
.token-timeline-height-10 { height: 10%; }
.token-timeline-height-15 { height: 15%; }
.token-timeline-height-20 { height: 20%; }
.token-timeline-height-25 { height: 25%; }
.token-timeline-height-30 { height: 30%; }
.token-timeline-height-35 { height: 35%; }
.token-timeline-height-40 { height: 40%; }
.token-timeline-height-45 { height: 45%; }
.token-timeline-height-50 { height: 50%; }
.token-timeline-height-55 { height: 55%; }
.token-timeline-height-60 { height: 60%; }
.token-timeline-height-65 { height: 65%; }
.token-timeline-height-70 { height: 70%; }
.token-timeline-height-75 { height: 75%; }
.token-timeline-height-80 { height: 80%; }
.token-timeline-height-85 { height: 85%; }
.token-timeline-height-90 { height: 90%; }
.token-timeline-height-95 { height: 95%; }
.token-timeline-height-100 { height: 100%; }
.token-timeline article > small { align-self: start; color: var(--muted); font-size: 9px; white-space: nowrap; }
.token-breakdowns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.token-breakdowns > article { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-small); background: rgba(255, 255, 255, .88); }
.token-breakdowns h3 { margin: 0 0 12px; font-size: 15px; }
.token-breakdowns h3 small { color: var(--muted); font-size: 10px; font-weight: 650; }
.token-refresh-form { display: flex; align-items: center; }
.token-breakdown-list { display: grid; gap: 8px; }
.token-breakdown-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.token-breakdown-list > div:first-child { padding-top: 0; border-top: 0; }
.token-breakdown-list span { min-width: 0; }
.token-breakdown-list span strong, .token-breakdown-list span small { display: block; overflow-wrap: anywhere; }
.token-breakdown-list span strong { font-size: 12px; }
.token-breakdown-list span small { color: var(--muted); font-size: 10px; }
.token-breakdown-list > div > strong { flex: 0 0 auto; color: var(--accent-dark); font-size: 14px; }
.token-user-details { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .72); }
.token-user-details summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 800; }
.token-user-details .token-breakdown-list { margin-top: 12px; }
.token-activity-list { display: grid; }
.token-activity-list article { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.token-activity-list article:first-child { padding-top: 0; border-top: 0; }
.token-activity-list time { color: var(--muted); font-size: 11px; }
.token-activity-list article > div { min-width: 0; }
.token-activity-list article > div > strong, .token-activity-list article > div > small { display: block; overflow-wrap: anywhere; }
.token-activity-list article > div > strong { font-size: 12px; }
.token-activity-list article > div > small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.token-activity-usage { text-align: right; }
.token-activity-usage > strong { color: var(--accent-dark); font-size: 14px !important; }
.token-activity-limit { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.token-source-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

@media (hover: hover) {
  .request-card:hover, .user-card:hover, .admin-card:hover, .calendar-entry:hover, .statistics-post-card:hover { border-color: #c2d3c6; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
  .channel-option:hover { border-color: #b0cdb9; transform: translateY(-1px); }
}

@media (max-width: 980px) {
  .calendar-shell { width: min(100% - 28px, 820px); }
  .calendar-weekdays { display: none; }
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-day { display: none; min-height: 0; padding: 14px; }
  .calendar-day.has-publications { display: block; }
  .calendar-day.is-placeholder { display: none; }
  .calendar-day-heading { margin-bottom: 11px; }
  .calendar-mobile-weekday { display: inline; }
  .calendar-day-heading time { width: auto; height: auto; border-radius: 0; font-size: 17px; }
  .calendar-day.is-today .calendar-day-heading time { width: 31px; height: 31px; border-radius: 50%; }
  .calendar-day-publications { gap: 10px; }
  .calendar-entry { padding: 13px; }
  .calendar-entry-image { width: 116px; height: 82px; float: right; margin: 0 0 8px 12px; }
  .calendar-entry p { font-size: 13px; -webkit-line-clamp: 2; }
  .calendar-entry > strong { font-size: 14px; }
  .calendar-entry > small, .calendar-entry-links a { font-size: 12px; }
  .statistics-shell { width: min(100% - 28px, 900px); }
  .statistics-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .token-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statistics-posts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .page-shell, .admin-shell { width: min(100% - 24px, 1100px); padding: 24px 0 72px; }
  .topbar { min-height: 0; padding: 10px 12px; flex-wrap: wrap; gap: 9px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; }
  .topbar-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 5px; padding-top: 8px; border-top: 1px solid var(--line); }
  .topbar-actions form { display: contents; }
  .topbar-actions .button { width: 100%; min-height: 38px; padding: 7px 6px; font-size: 13px; text-align: center; }
  .intro, .composer-footer, .request-options, .request-header { align-items: stretch; flex-direction: column; }
  .intro-card { padding: 26px 22px; border-radius: var(--radius); }
  .intro h1 { font-size: clamp(30px, 10vw, 40px); }
  .intro-card::after { width: 180px; height: 180px; right: -90px; top: -100px; }
  .queue-summary { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 10px; white-space: normal; }
  .queue-stat { min-width: 0; padding: 12px; }
  .composer-card { padding: 20px 18px; }
  .card-heading { align-items: flex-start; flex-direction: column; gap: 12px; padding-bottom: 18px; margin-bottom: 20px; }
  .card-note { white-space: normal; }
  .optional-grid { grid-template-columns: 1fr; }
  .channel-options { grid-template-columns: 1fr; }
  .secondary-actions { grid-template-columns: 1fr; }
  .schedule-fields { grid-template-columns: 1fr; }
  .schedule-panel-heading, .publication-row { flex-direction: column; }
  .review-actions { align-items: stretch; flex-direction: column; }
  .review-actions .button, .composer-footer > .button-primary { width: 100%; }
  .request-header .status { align-self: flex-start; }
  .account-name { display: none; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-form .button-primary, .compact-stack .button, .document-footer .button { width: 100%; justify-self: stretch; }
  .settings-grid { grid-template-columns: 1fr; }
  .pwa-install-card, .pwa-install-copy { align-items: stretch; flex-direction: column; }
  .pwa-install-card .button { width: 100%; }
  .calendar-shell { width: min(100% - 24px, 820px); }
  .calendar-intro { min-height: 0; }
  .calendar-timezone { width: 100%; min-width: 0; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-toolbar-actions { justify-content: center; flex-wrap: wrap; }
  .calendar-sync-note { align-items: flex-start; flex-direction: column; gap: 4px; }
  .calendar-month-actions { justify-content: space-between; }
  .calendar-month-actions h2 { min-width: 0; font-size: 24px; }
  .calendar-today { align-self: center; }
  .calendar-summary { grid-template-columns: 1fr 1fr; }
  .calendar-summary article { align-items: center; flex-direction: column; gap: 0; text-align: center; }
  .statistics-shell { width: min(100% - 24px, 900px); }
  .statistics-intro { min-height: 0; }
  .statistics-window { width: 100%; min-width: 0; }
  .statistics-toolbar, .statistics-toolbar-actions { align-items: stretch; flex-direction: column; }
  .statistics-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statistics-periods .button { padding-inline: 8px; text-align: center; }
  .statistics-channel-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .statistics-channel-filter select { width: 100%; min-width: 0; }
  .statistics-toolbar-actions > form:last-child .button { width: 100%; }
  .statistics-sync-note span { display: block; }
  .token-dashboard-heading { align-items: stretch; flex-direction: column; }
  .token-dashboard-controls, .token-coverage-note { align-items: stretch; flex-direction: column; }
  .token-periods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; gap: 5px; }
  .token-periods .button { padding-inline: 5px; text-align: center; }
  .token-budget-form { grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .token-refresh-form, .token-refresh-form .button { width: 100%; }
  .token-breakdowns { grid-template-columns: 1fr; }
  .token-panel-heading { align-items: stretch; flex-direction: column; gap: 5px; }
  .token-panel-heading > strong { align-self: flex-start; }
  .token-timeline { width: 100%; }
  .token-timeline.is-dense { gap: 2px; }
  .token-timeline.is-dense article > span { visibility: hidden; }
  .token-timeline.is-dense article > small { visibility: hidden; font-size: 8px; }
  .token-timeline.is-dense article:nth-child(4n + 1) > small,
  .token-timeline.is-dense article:last-child > small { visibility: visible; }
  .token-timeline.is-dense .token-timeline-track i { width: 72%; }
  .token-activity-list article { grid-template-columns: 110px minmax(0, 1fr); }
  .token-activity-usage { grid-column: 2; text-align: left; }
  .statistics-summary { grid-template-columns: 1fr 1fr; }
  .token-summary { grid-template-columns: 1fr 1fr; }
  .statistics-summary article { text-align: center; }
  .statistics-summary span { min-height: 0; }
  .statistics-section .section-heading small { max-width: none; text-align: left; }
  .statistics-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .statistics-table, .statistics-table tbody, .statistics-table tr, .statistics-table td { display: block; width: 100%; }
  .statistics-table thead { display: none; }
  .statistics-table tbody { display: grid; gap: 12px; }
  .statistics-table tr { padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); box-shadow: 0 3px 12px rgba(31, 35, 40, .04); }
  .statistics-table td, .statistics-table td:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 7px 0; border: 0; text-align: right; }
  .statistics-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 650; }
  .statistics-table td:first-child { display: block; padding-bottom: 12px; text-align: left; }
  .statistics-table td:first-child::before { display: none; }
  .statistics-post-card { padding: 17px 15px; }
  .automation-shell { width: min(100% - 24px, 1080px); }
  .automation-intro { min-height: 0; }
  .automation-state { align-self: flex-start; }
  .activation-note, .automation-toggle-card, .automation-savebar { align-items: stretch; flex-direction: column; }
  .activation-note { gap: 4px; }
  .automatic-queue-panel { padding: 20px 18px; }
  .automatic-queue-heading { align-items: stretch; flex-direction: column; }
  .automatic-queue-heading form, .automatic-queue-heading .button { width: 100%; }
  .automatic-queue-summary { grid-template-columns: 1fr; }
  .automatic-queue-columns { grid-template-columns: 1fr; }
  .automatic-queue-columns > div, .automatic-draft-card { min-width: 0; }
  .automatic-draft-card p, .automatic-draft-meta small { overflow-wrap: anywhere; }
  .automatic-queue-note { flex-direction: column; gap: 3px; }
  .automation-grid, .maintenance-grid { grid-template-columns: 1fr; }
  .automation-toggle-card { gap: 22px; }
  .switch-control { justify-content: space-between; }
  .automation-savebar { bottom: 8px; gap: 12px; }
  .automation-savebar .button { width: 100%; }
  .channel-card { align-items: flex-start; flex-direction: column; }
  .channel-select > .muted { margin-left: 0; }
  .user-summary, .user-actions, .password-form { align-items: stretch; flex-direction: column; }
  .document-card > summary, .document-footer { align-items: stretch; flex-direction: column; }
  .history { margin-top: 44px; }
  .post-history-summary { align-items: stretch; flex-direction: column; gap: 13px; padding: 19px 17px; }
  .post-history-copy strong { font-size: 18px; }
  .post-history-toggle { align-self: flex-start; }
  .post-history-body { padding: 18px 14px 20px; }
  .history-pagination { grid-template-columns: 1fr 1fr; }
  .history-pagination > span { grid-column: 1 / -1; grid-row: 1; }
  .history-pagination .button { width: 100%; justify-self: stretch; }
  .history-pagination .button:first-child { grid-column: 1; }
  .history-pagination .button:last-child { grid-column: 2; }
  .section-heading { align-items: flex-start; gap: 16px; }
  .section-heading h2 { font-size: 27px; }
  .request-card { padding: 18px 16px; }
  .result-card { padding: 17px 14px; }
  .result-heading { align-items: flex-start; gap: 10px; }
  .review-form textarea { min-height: 240px; }
  .document-form textarea { min-height: 320px; }
  .empty-state { padding: 30px 20px; }
  .login-page { padding: 16px; }
  .login-card { padding: 30px 24px; }
}

@media (max-width: 460px) {
  .brand span:last-child { font-size: 14px; }
  .intro-card { padding: 24px 19px; }
  .channel-choice { padding: 14px; }
  .version-choice { width: 100%; }
  .version-choice label { flex: 1; }
  .version-choice span { text-align: center; }
  .language-choice { min-width: 0; width: 100%; }
  .automation-fields, .automation-volume-card .automation-fields { grid-template-columns: 1fr; }
  .day-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .day-picker legend { grid-column: 1 / -1; }
  .maintenance-card { padding: 18px 16px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading form .button { width: 100%; }
  .delivery-row { align-items: flex-start; flex-direction: column; }
  .calendar-entry-image { width: 92px; height: 72px; }
  .statistics-summary { gap: 8px; }
  .statistics-summary article { padding: 15px 10px; }
  .token-dashboard { padding: 18px 14px; }
  .token-budget-form { grid-template-columns: 1fr; }
  .token-budget-form .button { width: 100%; }
  .token-budget-form small { grid-column: 1; text-align: left; }
  .token-summary article { padding: 14px 10px; text-align: center; }
  .token-periods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .token-timeline-panel, .token-activity { padding: 15px 13px; }
  .token-activity-list article { grid-template-columns: 1fr; gap: 4px; }
  .token-activity-usage { grid-column: 1; }
  .statistics-post-card { align-items: stretch; flex-direction: column; }
  .statistics-rank { width: 34px; height: 34px; }
  .statistics-post-meta time { width: 100%; margin-left: 0; }
}
