:root {
  color-scheme: light;
  --canvas: #f6f5f0;
  --surface: #fffefa;
  --surface-raised: #fffefa;
  --ink: #263c31;
  --muted: #7a8177;
  --faint: #92998f;
  --line: #e5e7df;
  --accent: #315941;
  --on-accent: #fffefa;
  --accent-soft: #e9eee3;
  --accent-wash: #f0f2e9;
  --gold: #9b7b44;
  --gold-soft: #f2ecdd;
  --danger: #ac4d47;
  --danger-soft: #f8e9e5;
  --shadow: 0 4px 22px #243a2908;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body[data-theme="dark"] {
  color-scheme: dark;
  --canvas: var(--tg-theme-secondary-bg-color, #171e19);
  --surface: var(--tg-theme-bg-color, #202922);
  --surface-raised: #29352c;
  --ink: var(--tg-theme-text-color, #e9eddf);
  --muted: var(--tg-theme-hint-color, #a2ac9f);
  --faint: #99a492;
  --line: #ffffff16;
  --accent: #b9d2a6;
  --on-accent: #203326;
  --accent-soft: #b9d2a61a;
  --accent-wash: #b9d2a610;
  --gold: #d6b573;
  --gold-soft: #d6b57316;
  --danger: #f0a096;
  --danger-soft: #f0a09618;
  --shadow: none;
}
* { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); min-height: 100dvh; }
button, input, textarea { font: inherit; }
button, a, input, textarea, summary { touch-action: manipulation; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, input, textarea { -webkit-appearance: none; appearance: none; }
button { border: 0; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
input:focus, textarea:focus { outline: none; }
input:focus-visible, textarea:focus-visible { outline-offset: 2px; }
a { color: inherit; }
svg { display: block; width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
.app-shell { max-width: 700px; margin: 0 auto; padding: var(--safe-top) 24px calc(108px + var(--safe-bottom)); }
.brand-header { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 10px; line-height: 1.3; letter-spacing: 1.75px; font-weight: 700; }
.brand-mark { width: 31px; height: 35px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 1.45; }
.header-note { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.header-note::before { content: ""; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; opacity: .6; }
main:focus { outline: none; }
.eyebrow { color: var(--muted); font-size: 10px; line-height: 1.5; font-weight: 650; letter-spacing: 1.65px; text-transform: uppercase; }
.hero { padding: 21px 0 25px; }
.hero-heading { font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 8vw, 46px); letter-spacing: -1.8px; font-weight: 400; line-height: 1.13; margin: 8px 0 13px; }
.hero-copy { color: var(--muted); line-height: 1.6; font-size: 14px; max-width: 390px; text-wrap: pretty; }
.hero-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-spark { width: 44px; height: 44px; color: var(--gold); margin-top: 6px; flex-shrink: 0; transform: rotate(-10deg); }
.hero-spark svg { width: 44px; height: 44px; stroke-width: 1.2; }
.button { min-height: 49px; padding: 13px 19px; border-radius: 14px; font-size: 14px; line-height: 1.45; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.button:active:not(:disabled) { transform: scale(.985); }
.button svg { width: 20px; height: 20px; }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-soft { background: var(--accent-soft); color: var(--accent); }
.button-danger { background: var(--danger); color: #fff; }
body[data-theme="dark"] .button-danger { color: #35211d; }
.button-outline { background: transparent; border: 1px solid var(--line); }
.button-wide { width: 100%; }
.new-entry-button { min-height: 55px; justify-content: space-between; padding: 14px 18px; border-radius: 16px; }
.new-entry-button .button-label { display: flex; align-items: center; gap: 11px; }
.new-entry-button > svg { opacity: .72; width: 18px; height: 18px; }
.search-wrap { display: flex; position: relative; margin-top: 28px; align-items: center; }
.search-wrap > svg { position: absolute; left: 15px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search-input { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 13px; width: 100%; height: 46px; padding: 11px 42px; font-size: 14px; }
.search-input::placeholder { color: var(--muted); opacity: 1; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 4px; width: 39px; height: 39px; display: grid; place-items: center; background: transparent; color: var(--muted); border-radius: 10px; }
.search-clear svg { width: 17px; height: 17px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 25px 0 13px; }
.section-heading h2 { color: var(--muted); font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: 1.6px; text-transform: uppercase; }
.count-label { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.entry-list { display: flex; flex-direction: column; gap: 12px; }
.entry-card { width: 100%; display: block; text-align: left; padding: 20px 19px 17px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.entry-card:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.entry-card:active { background: var(--accent-wash); }
.entry-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 11px; }
.entry-date { color: var(--muted); font-size: 11px; letter-spacing: .2px; text-transform: lowercase; }
.entry-card-top > svg { color: var(--faint); width: 15px; height: 15px; }
.entry-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.35; letter-spacing: -.4px; font-weight: 400; overflow-wrap: anywhere; }
.entry-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-line; }
.entry-card-bottom { margin-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.entry-time { color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; line-height: 1.4; font-weight: 500; border-radius: 6px; padding: 5px 7px; background: var(--accent-soft); color: var(--accent); }
.status-pill svg { width: 12px; height: 12px; stroke-width: 1.6; }
.status-pill.pending { color: var(--gold); background: var(--gold-soft); }
.status-pill.failed { color: var(--muted); background: var(--accent-wash); }
.load-more { margin-top: 17px; width: 100%; min-height: 47px; font-size: 13px; }
.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; padding: 10px 24px max(13px, var(--safe-bottom)); gap: 5px; background: color-mix(in srgb, var(--canvas) 94%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.nav-item { display: flex; align-items: center; justify-content: center; gap: 9px; width: min(50%, 260px); background: transparent; color: var(--muted); padding: 13px 16px; border-radius: 13px; min-height: 48px; font-size: 12px; font-weight: 600; }
.nav-item svg { width: 19px; height: 19px; stroke-width: 1.6; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.initial-loading { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); font-size: 13px; }
.spinner { width: 24px; height: 24px; display: inline-block; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
.button .spinner { width: 17px; height: 17px; border-color: currentColor; border-right-color: transparent; }
.skeleton { height: 168px; border-radius: 20px; border: 1px solid var(--line); padding: 21px; background: var(--surface); overflow: hidden; }
.skeleton-line { height: 10px; width: 32%; margin: 0 0 17px; border-radius: 5px; background: var(--accent-soft); animation: pulse 1.5s ease-in-out infinite; }
.skeleton-line:nth-child(2) { width: 86%; height: 18px; }
.skeleton-line:nth-child(3) { width: 72%; }
.skeleton-line:nth-child(4) { width: 25%; margin-top: 20px; }
.empty-state { margin: 14px 0; padding: 32px 20px; border: 1px dashed var(--line); border-radius: 20px; text-align: center; }
.empty-symbol { width: 59px; height: 59px; margin: 0 auto 17px; background: var(--accent-soft); color: var(--accent); border-radius: 19px; display: grid; place-items: center; transform: rotate(-5deg); }
.empty-symbol svg { width: 27px; height: 27px; }
.empty-state h2, .empty-state h3 { font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.25; font-weight: 400; letter-spacing: -.45px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 290px; margin: 10px auto 0; }
.empty-state .button { margin-top: 21px; font-size: 13px; }
.inline-error { border: 1px solid var(--line); border-radius: 16px; padding: 17px; margin: 13px 0; background: var(--surface); }
.inline-error p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.inline-error .button { margin-top: 12px; min-height: 41px; padding: 9px 14px; font-size: 12px; }
.page-toolbar { min-height: 47px; display: flex; align-items: center; gap: 10px; margin: 5px 0 20px; }
.back-button { background: transparent; display: inline-flex; gap: 9px; align-items: center; color: var(--muted); min-height: 44px; padding: 5px 9px 5px 0; font-size: 12px; }
.back-button svg { width: 18px; height: 18px; }
.toolbar-end { margin-left: auto; }
.icon-button { background: transparent; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); }
.icon-button:hover { background: var(--accent-soft); }
.icon-button svg { width: 19px; height: 19px; }
.entry-detail-date { margin-top: 11px; font-family: Georgia, "Times New Roman", serif; font-size: 35px; letter-spacing: -1px; font-weight: 400; line-height: 1.2; }
.detail-subtitle { color: var(--muted); font-size: 12px; margin-top: 9px; }
.entry-paper { margin-top: 25px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); padding: 25px 22px; }
.entry-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.85; }
.detail-bottom { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.detail-bottom svg { width: 14px; height: 14px; }
.detail-facts { margin-top: 30px; }
.detail-facts-heading { display: flex; gap: 9px; align-items: center; margin-bottom: 7px; }
.detail-facts-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 400; letter-spacing: -.45px; }
.detail-facts-heading svg { width: 20px; height: 20px; color: var(--gold); }
.section-description { font-size: 12px; line-height: 1.7; color: var(--muted); margin-bottom: 17px; }
.processing-note { margin-top: 18px; border-radius: 15px; padding: 17px; color: var(--muted); background: var(--gold-soft); font-size: 12px; line-height: 1.65; display: flex; align-items: flex-start; gap: 11px; }
.processing-note > svg { width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }
.fact-list { display: flex; flex-direction: column; gap: 10px; }
.fact-card { padding: 18px; border-radius: 17px; background: var(--surface); border: 1px solid var(--line); }
.fact-subject { display: block; font-size: 10px; letter-spacing: .7px; color: var(--muted); margin-bottom: 7px; }
.fact-value { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.fact-meta { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 11px; display: flex; gap: 8px; flex-wrap: wrap; }
.fact-source { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.fact-source summary { color: var(--muted); font-size: 11px; cursor: pointer; padding: 3px 0; }
.fact-source blockquote { border-left: 2px solid var(--line); padding-left: 12px; margin: 12px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.editor-heading { font-family: Georgia, "Times New Roman", serif; font-size: 37px; line-height: 1.13; letter-spacing: -1.25px; font-weight: 400; margin: 8px 0 13px; }
.editor-description { color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 340px; }
.prompt-list { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 21px; }
.prompt-chip { min-height: 33px; background: var(--accent-soft); color: var(--accent); border-radius: 9px; padding: 8px 10px; font-size: 10px; }
.editor-paper { margin-top: 20px; border: 1px solid var(--line); border-radius: 20px; padding: 19px; background: var(--surface); }
.editor-date { color: var(--faint); font-size: 10px; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 15px; }
.entry-editor { background: transparent; color: var(--ink); padding: 0; border: 0; display: block; width: 100%; min-height: 210px; line-height: 1.85; font-size: 16px; resize: vertical; }
.entry-editor::placeholder { color: var(--faint); opacity: .8; }
.editor-counter { text-align: right; color: var(--muted); font-size: 10px; margin-top: 14px; font-variant-numeric: tabular-nums; }
.editor-counter.near-limit { color: var(--danger); }
.save-area { margin-top: 19px; }
.save-note { text-align: center; font-size: 10px; color: var(--muted); margin: 11px 0 0; line-height: 1.65; }
.knowledge-hero { padding-bottom: 23px; }
.knowledge-intro { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 22px; padding: 16px 15px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 12px; line-height: 1.65; }
.knowledge-intro svg { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.knowledge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.knowledge-card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); border-radius: 18px; padding: 17px 15px; min-height: 145px; background: var(--surface); box-shadow: var(--shadow); }
.knowledge-card.profile { grid-column: 1 / -1; min-height: 106px; flex-direction: row; align-items: center; gap: 15px; background: var(--accent); color: var(--on-accent); border-color: transparent; }
.knowledge-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; margin-bottom: 18px; background: var(--accent-soft); color: var(--accent); }
.knowledge-icon svg { width: 19px; height: 19px; }
.knowledge-card.profile .knowledge-icon { background: #ffffff18; color: inherit; width: 49px; height: 49px; margin: 0; border-radius: 15px; flex-shrink: 0; }
.knowledge-card.profile .knowledge-icon svg { width: 25px; height: 25px; }
.knowledge-card.profile .knowledge-card-copy { flex: 1; }
.knowledge-card.profile > svg { width: 18px; height: 18px; opacity: .6; }
.knowledge-card-title { font-size: 13px; line-height: 1.4; font-weight: 600; }
.knowledge-card-count { font-size: 10px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.knowledge-card.profile .knowledge-card-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 24px; letter-spacing: -.4px; }
.knowledge-card.profile .knowledge-card-count { color: inherit; opacity: .7; }
.topic-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.topic-card { display: flex; align-items: center; gap: 15px; min-height: 73px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 15px 17px; }
.topic-card-copy { flex: 1; }
.topic-card h2 { font-size: 14px; line-height: 1.4; font-weight: 550; }
.topic-card p { margin-top: 5px; font-size: 10px; color: var(--muted); }
.topic-card > svg { width: 18px; height: 18px; color: var(--faint); }
.item-group { margin-bottom: 24px; }
.item-title { display: flex; align-items: baseline; gap: 9px; justify-content: space-between; margin: 22px 0 12px; }
.item-title h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; letter-spacing: -.3px; font-weight: 400; overflow-wrap: anywhere; }
.item-title span { flex-shrink: 0; color: var(--gold); background: var(--gold-soft); padding: 5px 7px; border-radius: 6px; font-size: 9px; }
.gate { text-align: center; padding: 52px 4px 35px; }
.gate-art { position: relative; display: grid; place-items: center; width: 110px; height: 110px; border-radius: 34px; background: var(--accent-soft); color: var(--accent); margin: 0 auto 31px; transform: rotate(-6deg); }
.gate-art > svg { width: 54px; height: 54px; stroke-width: 1.1; }
.gate-art::after { position: absolute; content: "✦"; top: -12px; right: -12px; font-size: 34px; color: var(--gold); transform: rotate(6deg); }
.gate h1 { font-family: Georgia, "Times New Roman", serif; font-size: 35px; font-weight: 400; line-height: 1.2; letter-spacing: -1px; text-wrap: balance; }
.gate p { color: var(--muted); font-size: 14px; line-height: 1.75; max-width: 300px; margin: 17px auto 0; }
.gate .button { margin-top: 25px; }
.gate-draft { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-align: left; margin-top: 24px; }
.gate-draft p { font-size: 12px; margin-top: 0; }
.gate-draft .entry-editor { min-height: 105px; height: 130px; font-size: 14px; margin-top: 15px; }
.gate-draft .button { margin-top: 15px; width: 100%; }
.gate-draft .button + p { margin-top: 15px; }
.toast { position: fixed; z-index: 50; max-width: calc(100% - 40px); left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--canvas); padding: 13px 18px; border-radius: 13px; font-size: 12px; line-height: 1.5; box-shadow: 0 8px 32px #0002; text-align: center; }
dialog { width: calc(100% - 40px); max-width: 370px; border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); border-radius: 24px; padding: 25px; box-shadow: 0 20px 80px #0002; }
dialog::backdrop { background: #101c1680; backdrop-filter: blur(3px); }
.dialog-symbol { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--danger-soft); color: var(--danger); margin-bottom: 17px; }
.dialog-symbol svg { width: 21px; height: 21px; }
dialog h2 { font-family: Georgia, "Times New Roman", serif; font-size: 26px; line-height: 1.2; font-weight: 400; letter-spacing: -.65px; }
dialog p { font-size: 13px; line-height: 1.7; margin-top: 13px; color: var(--muted); }
.dialog-actions { display: flex; gap: 9px; margin-top: 23px; }
.dialog-actions .button { flex: 1; font-size: 12px; padding: 12px 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (min-width: 600px) {
  .app-shell { padding-left: 36px; padding-right: 36px; }
  .brand-header { height: 86px; }
  .hero { padding-top: 25px; }
  .hero-heading { font-size: 48px; }
  .hero-copy { max-width: none; }
  .entry-card { padding: 23px; }
  .entry-title { font-size: 23px; }
  .knowledge-card { min-height: 150px; padding: 21px; }
  .knowledge-card-title { font-size: 15px; }
  .entry-editor { min-height: 300px; }
}
@media (max-width: 360px) {
  .app-shell { padding-left: 19px; padding-right: 19px; }
  .hero-heading { font-size: 35px; }
  .hero-spark, .hero-spark svg { width: 34px; height: 34px; }
  .knowledge-grid { gap: 9px; }
  .knowledge-card { padding: 15px 13px; }
  .knowledge-card-title { font-size: 12px; }
  .entry-paper { padding: 21px 18px; }
  .editor-heading { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Review uses text signs as well as color, including in Telegram's dark theme. */
select { font: inherit; color: inherit; }
select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.review-version { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; margin: 17px 0; }
.diff-stats { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.diff-stat { padding: 5px 8px; border-radius: 7px; font-size: 10px; line-height: 1.5; background: var(--accent-wash); color: var(--muted); }
.diff-stat.added { color: var(--accent); background: var(--accent-soft); }
.diff-stat.updated { color: var(--gold); background: var(--gold-soft); }
.diff-stat.removed { color: var(--danger); background: var(--danger-soft); }
.diff-group { margin: 20px 0; }
.diff-group-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 11px; }
.diff-group-title h3 { font-size: 12px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.diff-group-title .count-label { flex-shrink: 0; }
.diff-card { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; margin: 9px 0; background: var(--surface); }
.diff-line { padding: 15px 17px; border-left: 3px solid transparent; }
.diff-line + .diff-line { border-top: 1px solid var(--line); }
.diff-before { background: var(--danger-soft); border-left-color: var(--danger); }
.diff-after { background: var(--accent-soft); border-left-color: var(--accent); }
.diff-label { color: var(--accent); font-size: 10px; font-weight: 650; margin-bottom: 9px; }
.diff-before .diff-label { color: var(--danger); }
.diff-unchanged .diff-label { color: var(--muted); }
.diff-path { font-size: 10px; color: var(--muted); margin: 0 0 10px; overflow-wrap: anywhere; }
.diff-meta { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 10px; overflow-wrap: anywhere; }
.diff-key { border: 0; padding-top: 0; margin-top: 7px; }
.diff-key summary { font-size: 10px; }
.review-edit { margin-top: 6px; }
#review-editor { scroll-margin-top: 22px; }
.review-form { margin-top: 20px; padding: 21px 17px; border: 1px solid var(--accent); border-radius: 20px; background: var(--surface); }
.review-heading { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 400; line-height: 1.3; margin: 0 0 10px; letter-spacing: -.35px; }
.review-heading:focus { outline: none; }
.review-fact { min-width: 0; margin: 21px 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; }
.review-fact legend { color: var(--muted); padding: 0 7px; font-size: 11px; }
.review-field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 15px; min-width: 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.review-input { width: 100%; min-width: 0; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.5; }
textarea.review-input { resize: vertical; }
select.review-input { padding-right: 7px; }
.review-help { color: var(--muted); font-size: 10px; line-height: 1.6; margin: -6px 0 16px; }
.review-advanced { margin: 9px 0 15px; }
.review-advanced > summary { color: var(--muted); font-size: 11px; padding: 10px 0; cursor: pointer; }
.review-advanced[open] > summary { margin-bottom: 8px; }
.review-checkbox { display: flex; align-items: center; gap: 10px; font-size: 11px; line-height: 1.5; margin: 0 0 18px; }
.review-checkbox input { appearance: auto; -webkit-appearance: auto; width: 19px; height: 19px; accent-color: var(--accent); flex-shrink: 0; }
.review-remove { color: var(--danger); font-size: 11px; padding: 9px 11px; min-height: 42px; width: 100%; }
.review-remove svg { width: 15px; height: 15px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.review-actions .button { flex: 1 1 100%; font-size: 12px; }
.review-conflict { margin-top: 18px; border: 1px solid var(--gold); padding: 14px; border-radius: 13px; background: var(--gold-soft); }
.review-conflict > .button { width: 100%; margin-top: 10px; font-size: 12px; }
.review-history { margin-top: 30px; }
.revision { padding: 16px; margin: 10px 0; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.revision > summary { cursor: pointer; font-size: 12px; line-height: 1.6; }
.revision-title { font-weight: 550; }
.revision-date { display: block; font-size: 10px; color: var(--muted); margin: 5px 0 0; }
.revision[open] > summary { margin-bottom: 20px; }
@media (min-width: 600px) {
  .review-form { padding: 25px; }
  .review-actions .button { flex-basis: auto; }
}
@media (max-width: 360px) {
  .review-form { padding: 17px 12px; }
  .review-fact { padding: 12px; }
  .diff-line { padding: 13px; }
}
.review-jump { font-size: 12px; min-height: 42px; margin-top: 18px; }
#detail-facts { scroll-margin-top: 22px; }
