.ds-community main.cm-page, .ds-community main.cm-auth { padding-top: 120px; padding-bottom: 80px; position: relative; z-index: 1; }
.cm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Carta di accesso / registrazione */
.cm-auth { display: flex; justify-content: center; padding-left: 16px; padding-right: 16px; }
.cm-card { width: min(460px, 100%); background: var(--ds-glass-strong, #fff); border: 1px solid var(--ds-line, rgba(11,13,18,.1)); border-radius: 24px; padding: 32px; box-shadow: var(--ds-shadow, 0 20px 50px -30px rgba(0,0,0,.25)); }
.cm-card h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; color: #0b0d12; }
.cm-sub { margin: 0 0 18px; color: #3a4252; font-size: 15px; line-height: 1.55; }
.cm-form { display: flex; flex-direction: column; gap: 14px; }
.cm-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: #1b2230; }
.cm-form input:not([type="checkbox"]):not([type="radio"]), .cm-form textarea { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #cfd6e2; border-radius: 12px; background: #fff; color: #0b0d12; width: 100%; }
.cm-form input:focus, .cm-form textarea:focus { outline: 2px solid #3ddc84; outline-offset: 1px; border-color: transparent; }
.cm-form small, .cm-muted { font-weight: 400; color: #5a6475; font-size: 12.5px; }
.cm-prefix { display: flex; align-items: center; border: 1px solid #cfd6e2; border-radius: 12px; background: #fff; overflow: hidden; }
.cm-prefix b { padding-left: 13px; font-weight: 500; color: #5a6475; font-size: 14px; white-space: nowrap; }
.cm-prefix input { border: 0 !important; border-radius: 0 !important; outline: 0 !important; }
.cm-check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; }
.cm-check input { margin-top: 3px; }
.cm-foot { margin: 14px 0 0; text-align: center; font-size: 14px; color: #3a4252; }
.cm-foot a, .cm-card a:not(.cm-btn):not(.cm-google) { color: #1f6b36; font-weight: 600; }

.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; }
.cm-btn:hover { transform: translateY(-1px); }
.cm-btn-primary { background: #0b3d1e; color: #fff; }
.cm-btn-primary:hover { background: #135c2d; color: #fff; }
.cm-btn-ghost { background: transparent; border-color: #cfd6e2; color: #0b0d12; }
.cm-btn-ghost:hover { background: rgba(11,13,18,.04); color: #0b0d12; }
.cm-btn-danger { background: #b42318; color: #fff; }
.cm-btn-sm { padding: 7px 14px; font-size: 13.5px; }
.cm-link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; color: #1f6b36; cursor: pointer; text-decoration: underline; }
.cm-danger { color: #b42318; }

.cm-google { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border: 1px solid #cfd6e2; border-radius: 999px; background: #fff; color: #0b0d12; font-weight: 600; text-decoration: none; transition: box-shadow .2s; }
.cm-google:hover { box-shadow: 0 6px 20px -10px rgba(0,0,0,.3); color: #0b0d12; }
.cm-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #5a6475; font-size: 13px; }
.cm-or::before, .cm-or::after { content: ""; flex: 1; height: 1px; background: #dde3ec; }

.cm-alert { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 14px; }
.cm-alert-error { background: #fdecea; color: #8a1c12; border: 1px solid #f5c6c0; }
.cm-alert-ok { background: #e7f7ee; color: #14532d; border: 1px solid #b6e6c9; }

.cm-done { text-align: center; }
.cm-done .cm-btn { margin: 6px 4px 0; }
.cm-done-ic { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; background: #e7f7ee; color: #1f9d55; font-size: 34px; margin-bottom: 10px; }
.cm-done-bad { background: #fdecea; color: #b42318; }

/* Prova di umanità */
.cm-human { border: 2px dashed #b6e6c9; border-radius: 16px; padding: 12px 14px 14px; background: #f4fbf7; margin: 0; }
.cm-human legend { float: none; width: auto; padding: 0 8px; margin: 0; font-size: 13px; font-weight: 700; color: #14532d; }
.cm-human-bot { display: inline-block; animation: cmBob 2s ease-in-out infinite; }
@keyframes cmBob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(6deg); } }
.cm-human-q { margin: 4px 0 10px; font-size: 14.5px; font-weight: 600; color: #0b0d12; }
.cm-human-q small { display: block; font-weight: 400; color: #5a6475; margin-top: 2px; }
.cm-human-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cm-human-choice { position: relative; cursor: pointer; }
.cm-human-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cm-human-choice span { display: flex; align-items: center; justify-content: center; height: 54px; font-size: 28px; border: 2px solid #d5e8dc; border-radius: 14px; background: #fff; transition: transform .15s, border-color .15s, background .15s; }
.cm-human-choice:hover span { transform: translateY(-2px) scale(1.04); }
.cm-human-choice input:checked + span { border-color: #1f9d55; background: #e7f7ee; transform: scale(1.06); }
.cm-human-choice input:focus-visible + span { outline: 2px solid #1f9d55; outline-offset: 2px; }

/* Feed e hero */
.cm-hero { text-align: center; padding: 20px 16px 40px; }
.cm-hero h1 { font-size: clamp(30px, 5vw, 52px); letter-spacing: -.02em; margin: 10px auto 12px; max-width: 820px; color: #0b0d12; }
.cm-hero p { max-width: 640px; margin: 0 auto 20px; color: #3a4252; font-size: 17px; line-height: 1.6; }
.cm-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.cm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.cm-feed { min-width: 0; }
.cm-section { font-size: 20px; margin: 0 0 6px; color: #0b0d12; }
.cm-filter { margin: 0 0 14px; color: #3a4252; }
.cm-empty { text-align: center; padding: 40px 20px; border: 1px dashed #cfd6e2; border-radius: 18px; background: rgba(255,255,255,.7); }
.cm-post-card { display: flex; gap: 20px; justify-content: space-between; padding: 22px 0; border-bottom: 1px solid #e3e8f0; }
.cm-post-main { min-width: 0; flex: 1; }
.cm-post-card h2 { font-size: 22px; line-height: 1.25; margin: 8px 0 6px; letter-spacing: -.01em; }
.cm-post-card h2 a { color: #0b0d12; text-decoration: none; }
.cm-post-card h2 a:hover { color: #1f6b36; }
.cm-post-card p { margin: 0 0 10px; color: #3a4252; font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-post-cover { flex: 0 0 150px; }
.cm-post-cover img { width: 150px; height: 100px; object-fit: cover; border-radius: 12px; display: block; }
.cm-author { display: inline-flex; align-items: center; gap: 8px; color: #0b0d12; text-decoration: none; font-size: 13.5px; }
.cm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #0b3d1e; color: #fff; font-weight: 700; font-size: 13px; object-fit: cover; flex: 0 0 auto; }
.cm-avatar-lg { width: 44px; height: 44px; font-size: 18px; }
.cm-avatar-xl { width: 96px; height: 96px; font-size: 38px; }
.cm-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: #5a6475; }
.cm-tag { display: inline-block; padding: 3px 11px; border-radius: 999px; background: #eef2f7; color: #1b2230; font-size: 12.5px; text-decoration: none; }
.cm-tag:hover { background: #dff3e6; color: #14532d; }
.cm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-pager { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; color: #5a6475; }
.cm-pager a { color: #1f6b36; font-weight: 600; text-decoration: none; }
.cm-side { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 18px; }
.cm-box { background: var(--ds-glass-strong, #fff); border: 1px solid #e3e8f0; border-radius: 20px; padding: 22px; }
.cm-box h2, .cm-box h3 { font-size: 17px; margin: 0 0 10px; color: #0b0d12; }
.cm-box p { color: #3a4252; font-size: 14.5px; line-height: 1.6; }
.cm-box-dark { background: #07110b; border-color: #07110b; }
.cm-box-dark h2, .cm-box-dark h3 { color: #fff; }
.cm-box-dark p { color: #c5e8d1; }
.cm-box-dark a { color: #3ddc84; font-weight: 600; text-decoration: none; }

/* Articolo */
.cm-article { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.cm-article h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; color: #0b0d12; }
.cm-subtitle { font-size: 20px; line-height: 1.5; color: #4a5365; margin: 0 0 20px; }
.cm-byline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0 22px; }
.cm-byline > div:first-of-type { flex: 1; min-width: 0; }
.cm-byline a { color: #0b0d12; text-decoration: none; }
.cm-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 18px; margin: 0 0 26px; display: block; }
.cm-body { font-size: 18px; line-height: 1.75; color: #1b2230; }
.cm-body p { margin: 0 0 1.2em; }
.cm-body h2 { font-size: 28px; margin: 1.6em 0 .5em; color: #0b0d12; }
.cm-body h3 { font-size: 22px; margin: 1.4em 0 .4em; color: #0b0d12; }
.cm-body a { color: #1f6b36; text-decoration: underline; }
.cm-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0; }
.cm-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid #3ddc84; color: #3a4252; font-style: italic; }
.cm-body pre { background: #0d1117; color: #e6edf3; padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.cm-body code { background: #eef2f7; color: #8a1c4a; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.cm-body pre code { background: transparent; color: inherit; padding: 0; }
.cm-reactions, .cm-reactions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 22px 0; border-top: 1px solid #e3e8f0; border-bottom: 1px solid #e3e8f0; margin: 28px 0; }
.cm-reactions form { margin: 0; }
.cm-react { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid #cfd6e2; border-radius: 999px; background: #fff; color: #0b0d12; font: inherit; font-size: 14px; cursor: pointer; transition: background .2s, border-color .2s; }
.cm-react:hover, .cm-react.is-on { background: #e7f7ee; border-color: #3ddc84; color: #14532d; }
.cm-react b { font-weight: 700; }
.cm-react-cta { font-size: 13.5px; color: #5a6475; }
.cm-react-cta a { color: #1f6b36; font-weight: 600; }
.cm-comments h2 { font-size: 22px; margin: 0 0 14px; color: #0b0d12; }
.cm-comments .cm-form textarea { min-height: 90px; }
.cm-comment { padding: 14px 0; border-bottom: 1px solid #eef1f6; }
.cm-comment p { margin: 6px 0; color: #1b2230; line-height: 1.6; white-space: pre-wrap; }
.cm-comment a { color: #0b0d12; text-decoration: none; }
.cm-badge-member { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #e7f7ee; color: #14532d; font-size: 11.5px; font-weight: 700; }

/* Profilo */
.cm-profile { max-width: 860px; }
.cm-profile-head { display: flex; gap: 22px; align-items: center; padding: 10px 0 26px; flex-wrap: wrap; }
.cm-profile-head h1 { font-size: 32px; margin: 0; letter-spacing: -.01em; color: #0b0d12; }
.cm-handle { color: #5a6475; margin: 2px 0 8px; }
.cm-bio { color: #1b2230; max-width: 520px; line-height: 1.6; }
.cm-profile-head .cm-hero-cta { justify-content: flex-start; margin-top: 10px; }
.cm-profile-head form { margin: 0; }
.cm-me { max-width: 980px; }
.cm-me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cm-avatar-pick { border: 1px solid #e3e8f0; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cm-avatar-pick legend { float: none; width: auto; font-size: 13.5px; font-weight: 600; padding: 0 6px; margin: 0; }
.cm-choice { flex-direction: row !important; gap: 10px !important; align-items: flex-start; font-weight: 400 !important; }
.cm-mypost { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef1f6; }
.cm-mypost a { color: #0b0d12; text-decoration: none; }
.cm-mypost-actions { display: flex; gap: 12px; align-items: center; flex: 0 0 auto; }
.cm-mypost-actions a { font-size: 13.5px; color: #1f6b36; }
.cm-mypost-actions form { margin: 0; }
.cm-status { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef2f7; color: #3a4252; }
.cm-status-published { background: #e7f7ee; color: #14532d; }
.cm-status-hidden { background: #fdecea; color: #8a1c12; }

/* Editor */
.cm-write { max-width: 760px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.cm-title-input { font-size: 38px; font-weight: 700; border: 0; border-bottom: 1px solid #e3e8f0; padding: 8px 0; background: transparent; color: #0b0d12; width: 100%; letter-spacing: -.02em; }
.cm-subtitle-input { font-size: 20px; border: 0; padding: 4px 0 10px; background: transparent; color: #4a5365; width: 100%; }
.cm-title-input:focus, .cm-subtitle-input:focus { outline: 0; border-color: #3ddc84; }
.cm-editor { background: #fff; border-radius: 0 0 14px 14px; min-height: 340px; font-size: 18px; }
.cm-editor.ql-container { font-family: inherit; }
.cm-write .ql-toolbar { border-radius: 14px 14px 0 0; background: #fff; border-color: #dde3ec; }
.cm-write .ql-container { border-color: #dde3ec; border-radius: 0 0 14px 14px; font-size: 18px; min-height: 340px; }
.cm-write .ql-editor { min-height: 340px; line-height: 1.7; color: #1b2230; }
.cm-write-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cm-write-meta label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: #1b2230; }
.cm-write-meta input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #cfd6e2; border-radius: 12px; width: 100%; }
.cm-cover-row { display: flex; gap: 8px; align-items: center; }
.cm-write-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

@media (max-width: 991.98px) {
  .cm-layout { grid-template-columns: 1fr; }
  .cm-side { position: static; }
  .cm-me-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .ds-community main.cm-page, .ds-community main.cm-auth { padding-top: 96px; }
  .cm-card { padding: 22px; border-radius: 20px; }
  .cm-post-cover { display: none; }
  .cm-body { font-size: 17px; }
  .cm-write-meta { grid-template-columns: 1fr; }
  .cm-title-input { font-size: 28px; }
  .cm-human-choices { grid-template-columns: repeat(2, 1fr); }
  .cm-mypost { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .cm-human-bot { animation: none; } .cm-btn, .cm-human-choice span { transition: none; } }

.ds-community a.cm-btn-primary, .ds-community button.cm-btn-primary, .ds-community a.cm-btn-primary:hover, .ds-community .cm-btn-danger { color: #fff !important; }
.ds-community a.cm-btn-ghost, .ds-community button.cm-btn-ghost { color: #0b0d12 !important; }

.ds-community .cm-box.cm-box-dark { background: #07110b !important; border-color: #07110b !important; }
.ds-community .cm-box.cm-box-dark h2, .ds-community .cm-box.cm-box-dark h3 { color: #ffffff !important; }
.ds-community .cm-box.cm-box-dark p { color: #c5e8d1 !important; }
.ds-community .cm-box.cm-box-dark a { color: #3ddc84 !important; }

.cm-write-hint { margin: 0; color: #3a4252; font-size: 14.5px; line-height: 1.55; }
.cm-lang-tabs { display: flex; gap: 8px; border-bottom: 1px solid #e3e8f0; }
.cm-lang-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; font: inherit; font-weight: 600; color: #5a6475; cursor: pointer; }
.cm-lang-tab.is-active { color: #0b0d12; border-bottom-color: #3ddc84; }
.cm-lang-panel { display: none; flex-direction: column; gap: 12px; }
.cm-lang-panel.is-active { display: flex; }
.cm-field { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; color: #1b2230; }
.cm-field-label { font-size: 13.5px; font-weight: 600; color: #1b2230; }
.cm-lang-switch { display: inline-flex; gap: 6px; margin: 0 0 14px; }
.cm-lang-switch a { padding: 4px 12px; border: 1px solid #cfd6e2; border-radius: 999px; font-size: 13px; color: #0b0d12; text-decoration: none; }
.cm-lang-switch a.is-active { background: #0b3d1e; border-color: #0b3d1e; color: #fff !important; }
.cm-langs { padding: 1px 8px; border-radius: 999px; background: #eef2f7; font-size: 11.5px; font-weight: 700; }

.cm-status-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cm-downloads-edit { border: 1px solid #e3e8f0; border-radius: 16px; padding: 16px 18px; background: rgba(255,255,255,.7); display: flex; flex-direction: column; gap: 10px; }
.cm-downloads-edit h3 { margin: 0; font-size: 17px; color: #0b0d12; }
.cm-attachments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cm-attachments li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid #e3e8f0; border-radius: 10px; background: #fff; font-size: 14px; color: #0b0d12; }
.cm-downloads { margin: 28px 0; padding: 18px 20px; border: 1px solid #b6e6c9; border-radius: 16px; background: #f4fbf7; }
.cm-downloads h2 { margin: 0 0 10px; font-size: 18px; color: #0b0d12; }
.cm-downloads ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-downloads a { color: #14532d; font-weight: 600; text-decoration: none; }
.cm-downloads a:hover { text-decoration: underline; }
