:root {
  --sky-1: #c9e8f7;
  --sky-2: #85c7e9;
  --blue: #1676ae;
  --blue-dark: #0e5d8d;
  --ink: #182c38;
  --muted: #5e7380;
  --panel: #ffffff;
  --green: #167c55;
  --shadow: 0 8px 24px rgba(18, 72, 101, .12), 0 1px 2px rgba(18, 72, 101, .08);
  --radius: 13px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255,255,255,.82) 0 5%, transparent 5.5%),
    radial-gradient(ellipse at 81% 11%, rgba(255,255,255,.58) 0 4%, transparent 4.5%),
    linear-gradient(180deg, var(--sky-1) 0, var(--sky-2) 250px, #eef6f9 560px, #eef6f9 100%);
  background-attachment: fixed;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .drop-zone:focus-visible, a:focus-visible { outline: 3px solid rgba(15, 101, 153, .32); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 12px; top: -80px; padding: 10px 14px; color: #fff; background: #092f46; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; }

.topbar { position: sticky; z-index: 20; top: 0; color: #fff; background: linear-gradient(180deg, #238bc2, #126fa8); border-bottom: 1px solid rgba(4, 56, 90, .52); box-shadow: 0 2px 8px rgba(11, 69, 101, .2); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; width: min(1160px, calc(100% - 32px)); min-height: 58px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 1.16rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; text-shadow: 0 1px 1px rgba(0,0,0,.16); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 10px 10px 10px 3px; box-shadow: inset 0 -2px rgba(17, 91, 135, .1); }
.brand-mark svg, .profile-avatar svg { width: 25px; fill: var(--blue); }
.brand-mark .mark-lines, .profile-avatar .mark-lines { fill: none; stroke: #fff; stroke-width: 2.2; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; color: #eafff5; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(4, 56, 84, .28); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; }
.lock-dot { width: 8px; height: 8px; background: #77f0b4; border-radius: 50%; box-shadow: 0 0 0 3px rgba(119,240,180,.15); }

.shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; width: min(1160px, calc(100% - 32px)); margin: 26px auto 54px; align-items: start; }
.main-column, .sidebar { min-width: 0; }
.sidebar { display: grid; gap: 16px; }
.panel { background: rgba(255,255,255,.97); border: 1px solid rgba(126, 173, 197, .63); border-radius: var(--radius); box-shadow: var(--shadow); }
.composer { padding: 28px; overflow: hidden; }
.composer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--blue-dark); font-size: .77rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 680px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 3.2vw, 2.5rem); line-height: 1.08; letter-spacing: -.035em; }
.lede { margin: 11px 0 0; color: var(--muted); }
code { padding: .08em .32em; color: #184d6b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: #eef7fb; border: 1px solid #d4e9f2; border-radius: 4px; }
.privacy-seal { display: flex; align-items: center; flex: 0 0 168px; gap: 9px; padding: 10px 12px; color: #145a43; font-size: .76rem; line-height: 1.25; background: #effbf5; border: 1px solid #bfe6d2; border-radius: 9px; }
.privacy-seal svg { width: 27px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.privacy-seal strong { display: block; }

.drop-zone { display: grid; grid-template-columns: 50px 1fr; gap: 2px 14px; align-items: center; min-height: 148px; margin-top: 24px; padding: 24px; color: #315362; background: linear-gradient(135deg, #f5fbfe, #eaf7fd); border: 2px dashed #6aafd2; border-radius: 12px; transition: .16s ease; }
.drop-zone:hover, .drop-zone.is-dragging { color: #173e53; background: #e3f4fc; border-color: var(--blue); transform: translateY(-1px); }
.drop-zone.is-dragging { box-shadow: inset 0 0 0 4px rgba(22,118,174,.08); }
.drop-icon { display: grid; grid-row: 1 / span 2; place-items: center; width: 50px; height: 50px; color: var(--blue); background: #fff; border: 1px solid #beddeb; border-radius: 11px; box-shadow: 0 2px 7px rgba(21, 96, 138, .09); }
.drop-icon svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { display: block; font-size: 1.09rem; }
.drop-zone span { display: block; color: var(--muted); }
.drop-zone .linkish { display: inline; color: var(--blue-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.drop-zone small { grid-column: 2; color: #6b7f89; }
.file-summary { margin-top: 11px; padding: 10px 13px; color: #315c47; font-size: .9rem; background: #effaf4; border: 1px solid #c9e8d7; border-radius: 8px; }
.file-summary strong { color: #174e38; }

.settings { margin-top: 16px; border-top: 1px solid #dbe8ee; border-bottom: 1px solid #dbe8ee; }
.settings summary { display: flex; justify-content: space-between; gap: 15px; padding: 13px 3px; color: #355466; font-weight: 800; list-style: none; cursor: pointer; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary::before { content: "+"; color: var(--blue); margin-right: 7px; }
.settings[open] summary::before { content: "–"; }
.settings summary span { margin-left: auto; color: #7b8e98; font-size: .8rem; font-weight: 500; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 2px 3px 18px; }
.field { display: grid; gap: 6px; color: #405d6c; font-size: .84rem; font-weight: 800; }
select, input[type="text"], input[type="search"] { min-height: 43px; width: 100%; color: var(--ink); background: #fff; border: 1px solid #b7cfdb; border-radius: 8px; }
select, input[type="text"] { padding: 8px 10px; }
.check-row { display: flex; grid-column: 1 / -1; gap: 10px; align-items: flex-start; color: #405d6c; }
.check-row input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); }
.check-row strong { display: block; font-size: .88rem; }
.check-row small { display: block; color: #748893; }
.scan-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 21px; color: #fff; font-weight: 900; background: linear-gradient(180deg, #228bc2, #106da5); border: 1px solid #0c5c8d; border-radius: 8px; box-shadow: inset 0 1px rgba(255,255,255,.28), 0 2px 4px rgba(12,84,125,.18); }
.primary-button:hover:not(:disabled) { background: linear-gradient(180deg, #2697d1, #0d679e); }
.primary-button:active:not(:disabled) { transform: translateY(1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .48; }
.primary-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scan-actions p { margin: 0; color: #778992; font-size: .82rem; }
.scan-status { margin-top: 18px; padding: 13px; background: #f0f8fc; border: 1px solid #c8e2ee; border-radius: 8px; }
.status-row { display: flex; justify-content: space-between; gap: 15px; color: #365c70; font-size: .86rem; }
.progress-track { height: 8px; margin-top: 9px; overflow: hidden; background: #d7e8f0; border-radius: 999px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #1c88c0, #35b488); border-radius: inherit; transition: width .18s ease; }
.error-box { margin-top: 14px; padding: 12px 14px; color: #7f252a; background: #fff1f1; border: 1px solid #efc1c4; border-radius: 8px; }

.profile-card { overflow: hidden; }
.profile-cover { position: relative; height: 78px; overflow: hidden; background: linear-gradient(145deg, #2a97ce, #0e669e); }
.profile-cover span { position: absolute; width: 76px; height: 28px; background: rgba(255,255,255,.18); border-radius: 50%; transform: skewX(-18deg); }
.profile-cover span:nth-child(1) { left: 22px; top: 14px; }
.profile-cover span:nth-child(2) { left: 112px; top: 39px; }
.profile-cover span:nth-child(3) { right: 15px; top: 10px; }
.profile-body { position: relative; padding: 41px 18px 18px; }
.profile-avatar { position: absolute; display: grid; place-items: center; left: 18px; top: -34px; width: 64px; height: 64px; background: #fff; border: 4px solid #fff; border-radius: 14px 14px 14px 5px; box-shadow: 0 1px 5px rgba(5,61,91,.24); }
.profile-avatar svg { width: 37px; }
.profile-body h2, .side-card h2 { margin: 0; font-size: 1.04rem; line-height: 1.25; }
.profile-body > p, .side-card > p { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }
.privacy-list { display: grid; gap: 7px; margin: 16px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid #dfebf0; color: #405c69; font-size: .84rem; }
.privacy-list span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; color: #fff; font-size: .68rem; font-weight: 900; background: var(--green); border-radius: 50%; }
.side-card { padding: 18px; }
.category-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.category-cloud span { padding: 4px 8px; color: #345568; font-size: .75rem; font-weight: 700; background: #eff7fb; border: 1px solid #d0e5ef; border-radius: 999px; }
.instructions-card ol { margin: 12px 0 0; padding-left: 24px; color: #445f6d; font-size: .87rem; }
.instructions-card li + li { margin-top: 5px; }

.results { margin-top: 20px; }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; }
.results-header h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; }
.export-buttons { display: flex; gap: 8px; }
.export-button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 7px 11px; color: #244b60; font-size: .84rem; font-weight: 800; background: #f7fbfd; border: 1px solid #b9d4e0; border-radius: 7px; }
.export-button:hover { color: #0b5781; background: #eaf6fb; }
.export-button:disabled { cursor: not-allowed; opacity: .5; }
.file-type { padding: 2px 5px; color: #fff; font-size: .67rem; letter-spacing: .04em; background: var(--blue); border-radius: 4px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 10px; overflow: hidden; background: #bfd6e1; border: 1px solid #bfd6e1; border-radius: 9px; }
.stat-strip div { padding: 12px 14px; background: rgba(255,255,255,.94); }
.stat-strip strong { display: block; color: #184d6a; font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; line-height: 1.1; }
.stat-strip span { color: #68808d; font-size: .76rem; }
.filter-bar { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 9px; margin-top: 10px; padding: 10px; }
.filter-bar select { min-height: 41px; padding: 7px 30px 7px 10px; color: #365766; background: #fff; border: 1px solid #b7cfdb; border-radius: 7px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 11px; top: 11px; width: 20px; fill: none; stroke: #67808d; stroke-width: 1.8; }
.search-field input { min-height: 41px; padding: 7px 10px 7px 39px; }
.selection-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px 7px; color: #6e818b; font-size: .8rem; }
.selection-row button { padding: 0; color: var(--blue-dark); font-size: .8rem; font-weight: 800; background: none; border: 0; }
.selection-row button:hover { text-decoration: underline; }
.selection-row span { margin-left: auto; }
.result-list { display: grid; gap: 9px; }
.post-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; padding: 16px; background: rgba(255,255,255,.98); border: 1px solid #c8dce6; border-radius: 10px; box-shadow: 0 3px 13px rgba(23,75,101,.07); }
.post-card.is-unselected { opacity: .64; }
.post-avatar { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; font-family: Georgia, serif; font-size: 1.05rem; font-weight: 800; background: linear-gradient(145deg, #2a95c9, #176493); border-radius: 9px 9px 9px 3px; }
.post-main { min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #758892; font-size: .76rem; }
.risk-label { padding: 2px 7px; font-weight: 900; border-radius: 999px; }
.risk-high { color: #8d1f27; background: #fdebec; border: 1px solid #f4c7ca; }
.risk-medium { color: #86500c; background: #fff5df; border: 1px solid #efd7a3; }
.risk-low { color: #48606c; background: #eff4f6; border: 1px solid #d5e0e5; }
.post-text { margin: 9px 0 10px; color: #1d3440; font-size: .98rem; line-height: 1.47; white-space: pre-wrap; overflow-wrap: anywhere; }
.signals { display: flex; flex-wrap: wrap; gap: 5px; }
.signal { padding: 3px 7px; color: #47606e; font-size: .7rem; font-weight: 800; background: #f1f7fa; border: 1px solid #d6e5ec; border-radius: 4px; }
.post-actions { display: flex; align-items: center; gap: 12px; margin-top: 11px; font-size: .78rem; }
.post-actions a { color: var(--blue-dark); font-weight: 800; text-decoration: none; }
.post-actions a:hover { text-decoration: underline; }
.post-reason { color: #73858e; }
.select-post { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; }
.select-post input { width: 18px; height: 18px; accent-color: var(--blue); }
.load-more { width: 100%; min-height: 44px; margin-top: 10px; color: var(--blue-dark); font-weight: 900; background: #f7fbfd; border: 1px solid #bfd8e4; border-radius: 8px; }
.no-results { padding: 35px 22px; text-align: center; }
.no-results div { display: grid; place-items: center; width: 45px; height: 45px; margin: 0 auto 10px; color: #fff; font-size: 1.4rem; background: var(--green); border-radius: 50%; }
.no-results h3 { margin: 0; }
.no-results p { margin: 5px 0 0; color: var(--muted); }
footer { width: min(1160px, calc(100% - 32px)); margin: 0 auto 32px; color: #5f7783; font-size: .8rem; text-align: center; }
footer p { max-width: 780px; margin: 0 auto; }
.noscript { position: fixed; inset: auto 10px 10px; padding: 12px; color: #fff; background: #81272c; border-radius: 8px; text-align: center; }

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, 1fr); }
  .profile-card { grid-row: span 2; }
}
@media (max-width: 640px) {
  body { background: linear-gradient(180deg, var(--sky-1), #edf5f8 480px); }
  .topbar-inner, .shell, footer { width: min(100% - 22px, 1160px); }
  .topbar-inner { min-height: 54px; }
  .local-badge { padding: 5px 8px; font-size: .69rem; }
  .composer { padding: 20px 16px; }
  .composer-heading { display: block; }
  .privacy-seal { width: fit-content; margin-top: 15px; }
  .drop-zone { grid-template-columns: 42px 1fr; min-height: 138px; padding: 18px 14px; }
  .drop-icon { width: 42px; height: 42px; }
  .settings-grid { grid-template-columns: 1fr; }
  .check-row { grid-column: auto; }
  .scan-actions { display: grid; }
  .primary-button { width: 100%; }
  .scan-actions p { text-align: center; }
  .sidebar { grid-template-columns: 1fr; }
  .profile-card { grid-row: auto; }
  .results-header { align-items: flex-start; padding: 16px; }
  .export-buttons { flex-direction: column; }
  .export-button { min-height: 38px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 9px; padding: 13px 11px; }
  .post-avatar { width: 36px; height: 36px; }
  .post-actions { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
