:root { --ink: #172329; --muted: #64737a; --line: #dfe7e8; --paper: #f5f8f7; --card: #fff; --teal: #087f73; --teal-dark: #075c57; --yellow: #f2bd4d; --shadow: 0 14px 35px rgba(23, 35, 41, .07); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .7rem; margin-top: .45rem; }
.checkbox-option { display: flex; align-items: center; gap: .45rem; padding: .45rem .55rem; border: 1px solid var(--line, #d7e3e1); border-radius: .5rem; cursor: pointer; font-size: .92rem; }
.checkbox-option input { accent-color: var(--teal, #008b83); }
.relay-countdown { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.system-status { display: grid; gap: 12px; }.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }.status-grid > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f8fbfa; }.status-grid span { display: block; color: var(--muted); font-size: .75rem; }.status-grid strong { display: block; margin-top: 4px; font-size: .9rem; overflow-wrap: anywhere; }.status-relays { display: grid; gap: 6px; }.status-relays .field-hint { margin: 0; }.status-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 10px; border-bottom: 1px solid var(--line); }.status-row strong { color: var(--accent); }.relay-access-label { color: var(--muted); font-size: .78rem; margin-left: auto; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { min-height: 72px; padding: 0 5vw; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--teal); border-radius: 10px; font-weight: 900; }
.brand small { color: var(--teal); font-size: 9px; letter-spacing: .15em; margin-left: 4px; }
.topnav { display: flex; align-self: stretch; gap: 25px; margin-right: auto; }
.topnav a { display: grid; place-items: center; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.topnav a.active { color: var(--teal-dark); border-color: var(--teal); }
.sync-tools { display: flex; align-items: center; gap: 7px; margin-left: auto; }.compact-button { min-height: 33px; padding: 6px 10px; font-size: 11px; }.demo-badge { color: #8a5b0b; background: #fff5d9; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }.demo-badge.relay { color: #075c57; background: #e4f3ef; }.demo-badge.error { color: #a32c2c; background: #fff0f0; }
main { max-width: 1320px; margin: auto; padding: 0 5vw 70px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 25px; padding: 68px 0 42px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 14px; font-size: clamp(34px, 5vw, 62px); line-height: 1.03; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.025em; }
.hero-copy { max-width: 680px; color: var(--muted); font-size: 17px; }
.hero-card { min-width: 180px; padding: 18px; border: 1px solid #c9e4df; background: #e7f5f1; border-radius: 14px; }
.hero-card span, .hero-card small { display: block; color: var(--teal-dark); font-size: 12px; }.hero-card strong { display: block; margin: 5px 0 2px; }.hero-card small { opacity: .78; }
.access-gate { max-width: 660px; margin: 0 auto 35px; padding: 30px; }.access-gate h2 { margin-bottom: 12px; font-size: 28px; }.access-gate p:not(.eyebrow):not(.field-hint) { color: var(--muted); }.access-gate .field-hint { margin-top: 16px; }
.public-layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.sidebar { padding: 20px 15px; position: sticky; top: 20px; }.sidebar-heading { display: flex; justify-content: space-between; margin: 0 8px 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }.menu-list { display: grid; gap: 4px; }.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; text-align: left; color: var(--muted); padding: 10px 9px; border-radius: 8px; }.menu-count { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; color: #668079; background: #edf2f1; border-radius: 999px; font-size: 11px; font-weight: 800; }.menu-item:hover, .menu-item.active { color: var(--teal-dark); background: #e9f5f1; font-weight: 700; }.menu-item.active .menu-count { color: var(--teal-dark); background: #cde9e2; }.editor-link { display: block; margin: 25px 8px 3px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--teal); font-size: 12px; font-weight: 700; }
.search-box { padding: 22px; margin-bottom: 28px; }.search-box label, label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }.search-row { display: flex; gap: 10px; }.search-row input { flex: 1; }.hint { margin: 9px 0 0; color: var(--muted); font-size: 12px; }.search-chip { padding: 0; border: 0; color: var(--teal); background: transparent; font-weight: 700; text-decoration: underline; }
input, textarea, select { width: 100%; padding: 11px 12px; color: var(--ink); border: 1px solid #ccd9d9; border-radius: 9px; background: #fff; outline: 0; }.article-form input:focus, textarea:focus, select:focus, .search-box input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 115, .1); }
.section-header, .panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }.section-header { margin: 0 0 15px; }.count-pill { padding: 4px 9px; color: var(--teal-dark); background: #e4f3ef; border-radius: 999px; font-size: 12px; font-weight: 750; }.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 17px; }.article-card { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 20px rgba(23,35,41,.04); }.article-image { width: 100%; height: 150px; object-fit: cover; background: linear-gradient(135deg, #d5ebe6, #eff6f4); }.article-body { padding: 18px; }.article-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }.tag { padding: 4px 7px; color: var(--teal-dark); background: #e7f4f1; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .05em; }.article-body h3 { margin-bottom: 8px; font-size: 18px; line-height: 1.2; }.article-body p { margin-bottom: 0; color: var(--muted); font-size: 14px; }.empty { padding: 30px; color: var(--muted); text-align: center; border: 1px dashed #bdccca; border-radius: 12px; }
.editor-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 58px 0 35px; }.editor-heading h1 { margin-bottom: 8px; font-size: clamp(38px, 5vw, 58px); }.editor-heading p:not(.eyebrow) { max-width: 700px; color: var(--muted); }.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.editor-panel { padding: 22px; }.editor-wide { grid-column: 1 / -1; }.panel-title { margin-bottom: 20px; }.status-dot { padding: 5px 9px; color: var(--teal-dark); background: #e6f5f0; border-radius: 999px; font-size: 11px; font-weight: 750; }.editor-panel > label { margin-top: 15px; }.editor-panel > input, .editor-panel > textarea { margin-bottom: 3px; }.inline-form { display: flex; gap: 9px; margin-bottom: 15px; }.inline-form input { flex: 1; }.editor-list { display: grid; gap: 8px; }.editor-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; background: #f7faf9; border: 1px solid var(--line); border-radius: 9px; }.editor-row strong { font-size: 14px; }.editor-row small { display: block; color: var(--muted); font-size: 11px; }.row-actions { display: flex; gap: 5px; }.icon-button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: 12px; }.icon-button:hover { color: var(--teal-dark); border-color: var(--teal); }.article-form { padding: 18px; margin-bottom: 18px; background: #f7faf9; border: 1px solid var(--line); border-radius: 11px; }.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.article-form label { margin-top: 13px; }.form-actions { display: flex; gap: 8px; margin-top: 16px; }.primary-button, .secondary-button, .ghost-button { display: inline-flex; justify-content: center; align-items: center; min-height: 39px; padding: 9px 14px; border-radius: 8px; font-size: 13px; font-weight: 750; }.primary-button { color: #fff; background: var(--teal); border: 1px solid var(--teal); }.primary-button:hover { background: var(--teal-dark); }.secondary-button { color: var(--teal-dark); border: 1px solid #b8d6d1; background: #e7f5f1; }.ghost-button { color: var(--muted); border: 1px solid var(--line); background: #fff; }.ghost-button:hover { border-color: var(--teal); color: var(--teal-dark); }.demo-note { margin-top: 18px; padding: 16px; color: #71521b; background: #fff6dd; border: 1px solid #f1d795; border-radius: 11px; font-size: 13px; }.search-results { margin: -13px 0 26px; }.result-heading { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 750; }.result-list { display: grid; gap: 9px; }.result-item { display: flex; justify-content: space-between; gap: 15px; padding: 13px 15px; background: #eff8f5; border: 1px solid #cde6df; border-radius: 10px; }.result-item strong { font-size: 14px; }.result-item p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }.result-item .tag { align-self: start; }.no-results { color: var(--muted); font-size: 13px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 5vw; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.user-submit-panel { max-width: 900px; margin: 0 auto; padding: 8px; }
.user-entry-form { margin: 0; border: 0; background: #fff; }
.success-note { display: grid; gap: 4px; margin: 18px; padding: 18px; color: var(--teal-dark); background: #e6f5f0; border: 1px solid #b9ddd5; border-radius: 10px; }
.login-wrap { max-width: 520px; margin: 80px auto; padding: 32px; }
.login-wrap h1 { margin-bottom: 12px; font-size: 38px; }
.login-wrap > p:not(.eyebrow) { color: var(--muted); }
.login-wrap form { display: grid; gap: 10px; margin-top: 24px; }
.demo-code { margin-top: 18px; font-size: 13px; }
.error-note { color: #a32c2c !important; font-size: 13px; font-weight: 700; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pending-wrap { margin-bottom: 24px; padding: 16px; background: #fff8e4; border: 1px solid #efd58c; border-radius: 11px; }
.subsection-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.subsection-title h3 { margin: 0; font-size: 16px; }
.pending-wrap .editor-row { background: #fffdf7; border-color: #ead9aa; }
.article-open { width: 100%; margin-top: 15px; }
.record-dialog { width: min(720px, calc(100vw - 30px)); padding: 0; color: var(--ink); background: #fff; border: 0; border-radius: 16px; box-shadow: 0 30px 90px rgba(13, 29, 33, .28); }
.record-dialog::backdrop { background: rgba(15, 29, 33, .58); backdrop-filter: blur(3px); }
.record-dialog-head { display: flex; justify-content: space-between; gap: 20px; padding: 25px 25px 10px; }
.record-dialog-head h2 { font-size: 28px; line-height: 1.15; }
.dialog-close { flex: 0 0 auto; align-self: start; }
.record-dialog > .article-meta { padding: 0 25px 18px; }
.record-detail-image { width: 100%; max-height: 380px; object-fit: cover; }
.record-detail-images { display: grid; gap: 10px; }
.article-card img.article-image, .record-detail-image { cursor: zoom-in; }
.photo-lightbox { width: min(94vw, 1100px); max-width: none; max-height: 94vh; padding: 46px 18px 18px; border: 0; border-radius: 14px; background: rgba(12, 27, 33, .96); }
.photo-lightbox::backdrop { background: rgba(4, 13, 18, .82); }
.photo-lightbox img { display: block; width: 100%; max-height: calc(94vh - 70px); object-fit: contain; }
.photo-lightbox .dialog-close { position: absolute; top: 10px; right: 10px; color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.12); }
.photo-preview { display: block; width: min(100%, 360px); max-height: 220px; margin-top: 10px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #eef6f4; }
.photo-preview-extra { margin-top: 0; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.photo-actions .ghost-button { margin: 0; }
.photo-preview-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.photo-remove { margin-top: 0; }
.submission-status { margin-top: 14px; padding: 14px 16px; color: #7b2d2d; background: #fff0ef; border: 1px solid #efb8b3; border-radius: 10px; }
.submission-status p { margin: 6px 0; }
.submission-status .submission-intro { color: var(--muted); font-size: 13px; }
.submission-status h4 { margin: 14px 0 6px; color: var(--text); font-size: 12px; }
.submission-status .submission-list { display: grid; gap: 8px; }
.submission-status .editor-row { color: var(--text); background: #fff; }
.submission-status .editor-row small { color: var(--muted); }
.record-detail-body { padding: 23px 25px 10px; color: #34454b; font-size: 16px; white-space: pre-wrap; }
.record-detail-author { padding: 10px 25px 25px; color: var(--muted); font-size: 12px; }
.reactions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }.reaction-button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; }.reaction-button:hover:not(:disabled), .reaction-button.selected { color: var(--teal-dark); border-color: #8acbc0; background: #e7f5f1; }.reaction-button:disabled { cursor: not-allowed; opacity: .58; }.record-detail-reactions { padding: 0 25px 5px; }
.action-dialog-backdrop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 18px; background: rgba(15, 29, 33, .58); backdrop-filter: blur(3px); }
.action-dialog { width: min(520px, 100%); padding: 24px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 90px rgba(13, 29, 33, .28); }
.action-dialog h3 { margin: 0 0 10px; font-size: 22px; }
.action-dialog p { margin: 0 0 18px; color: var(--muted); white-space: pre-line; }
.action-dialog input { margin-bottom: 18px; }
.action-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
@media (max-width: 800px) { .topbar { flex-wrap: wrap; gap: 15px; padding: 13px 5vw; }.topnav { order: 3; width: 100%; height: 35px; }.sync-tools { order: 4; width: 100%; margin-left: 0; flex-wrap: wrap; }.demo-badge { margin-left: auto; }.hero, .editor-heading { display: block; }.hero-card { width: fit-content; margin-top: 25px; }.public-layout { grid-template-columns: 1fr; }.sidebar { position: static; }.menu-list { display: flex; flex-wrap: wrap; }.editor-grid { grid-template-columns: 1fr; }.editor-wide { grid-column: auto; }.form-two { grid-template-columns: 1fr; } footer { display: block; } footer span { display: block; margin: 5px 0; } }
@media (max-width: 800px) { .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v30.6 role and relay write state */
.relay-countdown.write-pending { color: #9a6700; font-weight: 800; animation: relay-pulse 1s ease-in-out infinite; }
.demo-badge.pending { color: #9a6700; background: #fff1b8; animation: relay-pulse 1s ease-in-out infinite; }
.demo-badge.confirmed { color: #0b6b4e; background: #d9f7e8; animation: none; }
.permission-panel { padding: 22px; margin-bottom: 28px; }
.permission-panel.role-admin { border: 2px solid #e27235; background: #fff7ed; }
.permission-panel.role-admin .eyebrow, .permission-panel.role-admin h2 { color: #b42318; }
.permission-panel.role-moderator { border-color: #c8b4e8; background: #fbf8ff; }
.permission-panel.role-denied { border-color: #efb8b8; background: #fff8f8; }
.admin-mode .topbar { border-bottom: 3px solid #c2410c; }
.admin-mode .topnav a#admin-nav, .admin-mode .editor-heading h1 { color: #b42318; font-weight: 850; }
.admin-mode .brand-mark { background: #b42318; }
.admin-mode .demo-badge { color: #9f2d1f; background: #ffebe7; }
@keyframes relay-pulse { 50% { opacity: .45; } }
/* v30.7 softer multi-colour hierarchy */
body { background: linear-gradient(135deg, #f5f8f7 0%, #f7f4fb 52%, #fff8ef 100%); }
.hero { position: relative; }
.hero::before { content: ""; position: absolute; inset: 25px -7vw auto; height: 190px; z-index: -1; background: linear-gradient(110deg, rgba(53, 116, 214, .10), rgba(157, 92, 204, .10), rgba(242, 189, 77, .13)); border-radius: 45px; filter: blur(2px); }
.hero-card { border-color: #c8b9e8; background: linear-gradient(145deg, #eef7ff, #f8efff); }
.sidebar { border-top: 4px solid #7b61c9; }
.search-box { border-top: 4px solid #2994c7; }
.article-card { border-top: 3px solid #65b7aa; transition: transform .18s ease, box-shadow .18s ease; }
.article-card:nth-child(3n + 2) { border-top-color: #8972d6; }
.article-card:nth-child(3n) { border-top-color: #e39a41; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(50, 53, 91, .12); }
.role-author { border-left: 5px solid #2994c7; }
.role-editor { border-left: 5px solid #65b7aa; }
.role-moderator { border-left: 5px solid #8972d6; }
.role-viewer { border-left: 5px solid #e39a41; }
.status-dot { background: #eee8ff; color: #58439b; }
 .role-key { display: block; max-width: 100%; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.article-author { margin: -2px 0 8px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
