* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: sans-serif; font-size: 18px; line-height: 1.6; color: #333; background: #f5f5f5; }
.container { max-width: 900px; margin: 0 auto; padding: 20px; }
h1 { font-size: 1.6em; margin-bottom: 16px; }
h2 { font-size: 1.3em; margin-bottom: 12px; color: #555; }
input, textarea, select { font-size: 16px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; width: 100%; }
button, .btn { font-size: 16px; padding: 8px 18px; border: none; border-radius: 4px; cursor: pointer;
    background: #0066cc; color: #fff; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: #0052a3; }
.btn-danger { background: #cc0000; }
.btn-danger:hover { background: #a30000; }
.btn-secondary { background: #666; }
.btn-secondary:hover { background: #444; }
.card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 20px; margin-bottom: 16px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; margin-bottom: 4px; font-weight: bold; font-size: 14px; color: #555; }
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.alert-error { background: #fde; border: 1px solid #faa; color: #900; }
.alert-success { background: #dfd; border: 1px solid #afa; color: #060; }
nav { background: #003366; color: #fff; padding: 10px 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
nav a { color: #adf; text-decoration: none; font-size: 15px; }
nav a:hover { color: #fff; }
nav .link-btn { background: none; border: none; padding: 0; color: #adf; font-size: 15px; cursor: pointer; }
nav .link-btn:hover { color: #fff; background: none; }
nav .brand { font-weight: bold; font-size: 18px; color: #fff; margin-right: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; font-size: 15px; }
th { background: #f0f0f0; font-weight: bold; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #0066cc; color: #fff; }
.footer { text-align: center; padding: 20px 0 8px; font-size: 13px; color: #aaa; }
.footer a { color: #aaa; }
.footer .version { font-size: 0.8em; color: #ccc; white-space: nowrap; }

/* Client styles */
.client-body p { margin-bottom: 0.8em; }
.client-body { font-family: sans-serif; font-size: 20px; line-height: 1.5; color: #333; margin: 0; padding: 70px 20px 100vh 20px; }
.lang-menu { position: fixed; top: 0; left: 0; right: 0; background: #f8f9fa; border-bottom: 1px solid #dee2e6;
    padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 1000; }
.lang-menu a { color: #007bff; text-decoration: none; font-weight: bold; white-space: nowrap; }
.lang-menu .home-btn { color: #6c757d; font-weight: normal; font-size: 18px; }
.lang-select { font-size: 18px; padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; background: #fff; flex: 1; max-width: 200px; }
.lang-menu .get-transcript-btn { color: #fff; background: #28a745; padding: 4px 12px; border-radius: 4px; font-size: 18px; white-space: nowrap; }
.event-header { border-bottom: 1px solid #ddd; margin-bottom: 1em; padding-bottom: 0.4em; }
.event-header h1 { font-size: 1.2em; margin: 0; }
.stamp { font-size: 0.55em; color: #999; font-weight: normal; }
nav.toc { background: #f8f9fa; border: 1px solid #ddd; border-radius: 6px; padding: 10px 16px; margin-bottom: 1.2em; font-size: 0.75em; }
nav.toc ul { list-style: none; padding: 0; margin: 0; }
nav.toc li { padding: 2px 0; }
nav.toc a { color: #0066cc; text-decoration: none; }
.rtl { direction: rtl; text-align: right; }
.rtl .lang-menu { flex-direction: row-reverse; }
hr { border: none; border-top: 1px solid #ccc; margin: 1em 0; }
blockquote { border-left: 4px solid #ccc; margin: 0.5em 0; padding: 4px 16px; color: #555; font-style: italic; }
ol, ul { padding-left: 1.4em; }
.rtl blockquote { border-left: none; border-right: 4px solid #ccc; padding: 4px 16px 4px 0; }
.rtl ol, .rtl ul { padding-left: 0; padding-right: 1.4em; }

/* Edit page */
.md-cheatsheet { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: #888; }
.md-cheatsheet span { white-space: nowrap; }
.md-cheatsheet b { color: #555; font-family: monospace; }
#input-area { width: 100%; height: 70vh; font-family: monospace; font-size: 16px; padding: 10px;
    resize: vertical; border: 1px solid #ccc; border-radius: 4px; }
.save-status { font-size: 13px; color: #888; margin-top: 6px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Editor meta fields */
.meta-grid { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.meta-grid label { font-size: 13px; color: #666; font-weight: bold; text-align: right; }
.meta-grid input { font-size: 14px; padding: 4px 8px; }

/* Small buttons, live toggle, clickable rows */
.btn-small { font-size: 13px; padding: 4px 10px; }
.btn-live { background: #2a9d2a; }
.btn-offline { background: #999; }
.row-link { cursor: pointer; }

/* Language / user pickers */
.picker { border: 1px solid #ccc; border-radius: 4px; }
.picker summary { padding: 6px 10px; cursor: pointer; user-select: none; list-style: none; display: flex;
    justify-content: space-between; align-items: center; background: #f8f9fa; border-radius: 4px; }
.picker-arrow { color: #888; font-size: 13px; }
.picker-body { padding: 8px 12px; }
.picker-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: normal; cursor: pointer; }
.picker-row input { width: auto; accent-color: #0066cc; }
.picker-code { font-family: monospace; color: #555; min-width: 90px; }

/* Participant landing page */
body.landing { padding: 30px 20px; }
.landing .card { border-radius: 8px; max-width: 500px; margin: 0 auto; }
.landing h1 { font-size: 1.4em; margin-bottom: 6px; }
.landing .sub { color: #666; font-size: 15px; margin-bottom: 20px; }
.landing .qr { text-align: center; margin-top: 20px; }
.landing .footer { margin-top: 16px; font-size: 12px; padding: 0; }
.lang-link { font-size: 22px; font-weight: bold; color: #007bff; text-decoration: none; }
.qr-url { font-size: 13px; color: #666; margin-top: 8px; word-break: break-all; }

/* Layout helpers (no inline styles: the CSP allows /static stylesheets only) */
.inline { display: inline; }
.container.narrow { max-width: 420px; }
.container.top { margin-top: 80px; }
.container.medium { max-width: 700px; }
.container.form-width { max-width: 520px; }
.hint { margin-bottom: 16px; color: #666; font-size: 14px; }
.card.flush { padding: 0; }
.input-small { width: 160px; font-size: 13px; padding: 4px 6px; display: inline; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; }
.row-form input[type=text], .row-form input[type=password] { width: 150px; }
.check-label { display: flex; align-items: center; gap: 4px; font-weight: normal; }
.check-label input, select.auto { width: auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
td.empty { color: #999; padding: 16px; }
.row-meta { font-size: 13px; color: #666; }
td.stats { color: #888; font-size: 13px; }
td.modified { color: #aaa; font-size: 12px; }
td.nowrap { white-space: nowrap; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
nav a.active { color: #fff; font-weight: bold; }
nav .nav-user { font-weight: normal; font-size: 14px; opacity: 0.8; }
nav .brand { text-decoration: none; }
nav form.inline { display: inline; }
.edit-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.edit-meta { flex: 1; margin-right: 20px; }
.edit-qr { text-align: center; flex-shrink: 0; }
.client-info { font-size: 13px; color: #888; display: flex; align-items: center; gap: 12px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.help { font-size: 12px; color: #888; margin-top: 6px; line-height: 1.6; }
.card h2 { margin-bottom: 10px; }
.field-label { margin-bottom: 6px; font-size: 14px; color: #555; }
.field { margin-bottom: 10px; }
.field select { font-size: 14px; }
nav.toc li.toc-sub { padding-left: 1.2em; }
