/* GMSI Soci — mobile-first app styles. Tokens follow the gmsi.ch identity. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0b1224; --ink-2: #111b33; --navy: #15213f; --navy-600: #1e2f5a;
  --red: #b41f14; --red-deep: #8f150c; --red-bright: #d92c1d; --red-soft: #ff9184; --sky: #9db8e8;
  --paper: #f7f5f0; --white: #ffffff;
  --bg: var(--paper); --surface: var(--white); --surface-2: #efece6;
  --text: #2b2e38; --text-soft: #5c6070; --text-faint: #666a78;
  --line: rgba(21, 33, 63, .12); --line-strong: rgba(21, 33, 63, .28);
  --accent: var(--navy); --accent-ink: #ffffff; --cta: var(--red); --cta-hover: var(--red-deep);
  --ok: #1d7a4a; --ok-bg: #e2f3e9; --warn: #9a5b00; --warn-bg: #fff1d6; --bad: #a61b1b; --bad-bg: #fbe3e3; --info-bg: #e6edf9;
  --k-socio: var(--navy); --k-socio-bg: var(--info-bg); --k-alumni: #6b3fa0; --k-alumni-bg: #efe6fb; --k-esterno: #0e6b6b; --k-esterno-bg: #dff3f3;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px; --radius-s: 10px; --radius-pill: 999px;
  --shadow-s: 0 1px 2px rgba(11,18,36,.05), 0 4px 12px rgba(11,18,36,.06);
  --shadow-m: 0 2px 4px rgba(11,18,36,.06), 0 12px 32px rgba(11,18,36,.12);
  --header-h: 56px; --tabs-h: 64px; --gutter: 16px; --max-w: 720px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink); --surface: var(--ink-2); --surface-2: #182443;
    --text: #e9ecf3; --text-soft: #aab1c4; --text-faint: #8b93a8;
    --line: rgba(255,255,255,.12); --line-strong: rgba(255,255,255,.3);
    --accent: #2a3f78; --cta: var(--red-bright); --cta-hover: #ff4a3a;
    --ok: #7fd4a4; --ok-bg: #123a26; --warn: #f2c063; --warn-bg: #3d2c08; --bad: #ff8a80; --bad-bg: #4a1414; --info-bg: #1b2a4d;
    --k-socio: var(--sky); --k-socio-bg: var(--info-bg); --k-alumni: #c9a7f5; --k-alumni-bg: #2d1f4a; --k-esterno: #7fd6d6; --k-esterno-bg: #0f3535;
    --shadow-s: none; --shadow-m: 0 12px 32px rgba(0,0,0,.4);
  }
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
p + p { margin-top: .6em; }
.muted { color: var(--text-soft); }
.small { font-size: 13px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 8px; } .row-wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ── boot / logged-out shell ─────────────────────────── */
.boot { min-height: 100dvh; display: grid; place-content: center; text-align: center; color: var(--text-soft); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -.03em; color: var(--navy); display: block; }
@media (prefers-color-scheme: dark) { .wordmark { color: #fff; } }
.boot-sub { display: block; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.boot-noscript { padding: 24px; text-align: center; }

/* ── layout ──────────────────────────────────────────── */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.header { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; padding-top: var(--safe-t); }
.header-in { height: var(--header-h); max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 10px; }
.header .brand { display: flex; align-items: baseline; gap: 6px; }
.header .brand b { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.header .brand span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.header .brand { flex: 1; }
.header-btn { min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #fff; background: rgba(255,255,255,.12); font-weight: 600; font-size: 13px; }
.header-btn.active { background: #fff; color: var(--navy); }
.header-in > a[href="/profilo"] { min-width: 44px; min-height: 44px; display: inline-grid; place-content: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-content: center; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.t1 { background: #1e2f5a; } .avatar.t2 { background: #2c4a7c; } .avatar.t3 { background: #5b4a7a; } .avatar.t4 { background: #3f6b5c; } .avatar.t5 { background: #7a4b3a; } .avatar.t6 { background: #4a5a78; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-content: center; }

.main { flex: 1; width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 16px var(--gutter) calc(var(--tabs-h) + var(--safe-b) + 24px); }
.main.no-tabs { padding-bottom: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head p { margin-top: 2px; }
.page-head .btn { min-height: 44px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs-in { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabs-h); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-soft); position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--navy); }
@media (prefers-color-scheme: dark) { .tab.active { color: #fff; } }
.tab.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.tab .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

/* ── components ──────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.card.clickable { display: block; }
.card.clickable:active { transform: scale(.995); }
.card + .card { margin-top: 12px; }
.card-list > * + * { margin-top: 12px; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--red-soft); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-s); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; border: 1px solid transparent; text-align: center; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-link { background: none; color: var(--red); font-weight: 600; min-height: 36px; padding: 0 6px; } @media (prefers-color-scheme: dark) { .btn-link { color: var(--red-soft); } }
.skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.btn-block { width: 100%; }
.btn-icon { min-width: 44px; padding: 0; }
.btn svg { width: 18px; height: 18px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.info { background: var(--info-bg); color: var(--navy); }
@media (prefers-color-scheme: dark) { .chip.info { color: var(--sky); } }
.chip.tag { background: var(--info-bg); color: var(--navy); font-weight: 500; }
@media (prefers-color-scheme: dark) { .chip.tag { color: var(--sky); } }
.chip.selectable { cursor: pointer; border: 1px solid transparent; } .chip.selectable.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; } .chips.scroll::-webkit-scrollbar { display: none; }
.chip.tag.selectable.on { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.selectable.on, .chip.tag.selectable.on { background: var(--sky); border-color: var(--sky); color: var(--ink); } }
.chips.scroll > .chip.selectable.on { font-weight: 700; }
/* filter rows and pickers: real touch targets (the base .chip stays small for labels inside cards) */
.chips.scroll > .chip, .legend > .chip { min-height: 40px; padding: 0 14px; font-size: 13px; }
.skills > .chip { min-height: 36px; padding: 0 12px; }

.field { display: block; margin-top: 12px; }
.field > span:not(.help) { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text-soft); }
.field > .help { display: block; }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input.code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.help { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.switch input { width: 22px; height: 22px; accent-color: var(--navy); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.notice { padding: 12px 14px; border-radius: var(--radius-s); background: var(--info-bg); font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); } .notice.bad { background: var(--bad-bg); color: var(--bad); } .notice.ok { background: var(--ok-bg); color: var(--ok); }
.empty { text-align: center; padding: 36px 16px; color: var(--text-soft); }
.empty h1, .empty h2 { color: var(--text); margin-bottom: 6px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.meta { font-size: 12px; color: var(--text-faint); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row .grow b { display: block; }
.list-row .grow .meta, .list-row .grow .ellip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .right { text-align: right; flex: none; } .list-row .right .meta { display: block; margin-top: 2px; }
.group-head { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); margin: 14px 0 4px; }
.searchbar { position: relative; }
.searchbar .input { padding-left: 38px; }
.searchbar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); }

/* markdown */
.md { line-height: 1.6; }
.md h1, .md h2, .md h3 { margin: 1.2em 0 .4em; } .md h1:first-child, .md h2:first-child { margin-top: 0; }
.md p, .md ul, .md ol { margin: 0 0 .8em; } .md ul, .md ol { padding-left: 1.3em; }
.md a { color: var(--red); text-decoration: underline; } @media (prefers-color-scheme: dark) { .md a { color: var(--red-soft); } }
.md blockquote { border-left: 3px solid var(--line-strong); padding-left: 12px; color: var(--text-soft); }
.md code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; } .md td, .md th { border: 1px solid var(--line); padding: 6px 8px; }
.md img { margin: 6px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }

/* ── login ───────────────────────────────────────────── */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 32px var(--gutter); max-width: 440px; margin: 0 auto; }
.login .wordmark { font-size: 40px; }
.login .lead { margin: 8px 0 24px; color: var(--text-soft); }
.login .card { padding: 20px; }
.login .foot { margin-top: 28px; font-size: 13px; color: var(--text-soft); text-align: center; }
.login .alt { margin-top: 12px; text-align: center; font-size: 14px; } .login .alt button { color: var(--navy); text-decoration: underline; font-weight: 600; min-height: 44px; }
@media (prefers-color-scheme: dark) { .login .alt button { color: var(--sky); } }
.btn-primary:disabled { opacity: 1; background: var(--cta); }
.login .foot a { text-decoration: underline; }
.turnstile { margin-top: 12px; min-height: 0; }

/* ── events ──────────────────────────────────────────── */
.event-row { display: flex; gap: 14px; align-items: flex-start; }
.date-box { flex: none; width: 52px; border-radius: var(--radius-s); background: var(--navy); color: #fff; text-align: center; padding: 6px 0; line-height: 1.1; }
.date-box b { display: block; font-family: var(--font-display); font-size: 22px; }
.date-box span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.date-box.past { background: var(--surface-2); color: var(--text-soft); }
.event-row h3 { margin-bottom: 2px; }
.event-row .answer { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.event-row .answer .todo-pill { border: 1.5px solid var(--red); color: var(--red); background: transparent; } @media (prefers-color-scheme: dark) { .event-row .answer .todo { color: var(--red-soft); } }
.answers .group { padding: 8px 0; border-top: 1px solid var(--line); } .answers .group:first-child { border-top: 0; padding-top: 0; }
.answers .who { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 14px; } .answers .who .note { color: var(--text-soft); font-size: 13px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segmented .btn { padding: 0 6px; font-size: 14px; }
.segmented .btn.on-yes { background: var(--ok); color: #fff; } .segmented .btn.on-maybe { background: var(--warn); color: #fff; } .segmented .btn.on-no { background: var(--text-soft); color: #fff; }
@media (prefers-color-scheme: dark) { .segmented .btn.on-yes, .segmented .btn.on-maybe, .segmented .btn.on-no { color: var(--ink); } }
.answers { display: grid; gap: 10px; }
.answers .group b { display: block; font-size: 13px; margin-bottom: 4px; }
.answers .names { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── board (bacheca) ─────────────────────────────────── */
.composer .textarea { min-height: 72px; }
.post { display: flex; gap: 12px; }
.post .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.vote { display: flex; flex-direction: column; align-items: center; flex: none; width: 40px; }
.vote button { width: 40px; height: 36px; border-radius: 8px; color: var(--text-faint); display: grid; place-content: center; }
.vote button svg { width: 22px; height: 22px; }
.vote button.on-up { color: #fff; background: var(--navy); } .vote button.on-down { color: #fff; background: var(--bad); }
.post.pinned { border-color: var(--navy); } .post .pin-label { color: var(--navy); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
@media (prefers-color-scheme: dark) { .post .pin-label { color: var(--sky); } }
.post .tools { display: flex; gap: 12px; margin-top: 6px; } .post .tools button { color: var(--text-soft); font-size: 13px; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
.vote .score { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; padding: 2px 0; }
.inline-link { color: var(--red); text-decoration: underline; } @media (prefers-color-scheme: dark) { .inline-link { color: var(--red-soft); } }
.link-cards { display: grid; gap: 8px; margin-top: 8px; }
.link-card { position: relative; display: block; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.link-card:active { transform: scale(.995); }
.link-card > .row { padding: 10px 12px; } .link-card > .row svg { flex: none; color: var(--text-soft); }
.link-card img { width: 100%; max-height: 320px; object-fit: cover; background: var(--surface-2); }
.link-card img.loading { position: absolute; width: 1px; height: 1px; opacity: 0; }
.link-card .help { display: block; margin: 0; padding: 0 12px 10px; }
.steps { padding: 0 4px 0 24px; } .steps li + li { margin-top: 4px; }

/* ── network ─────────────────────────────────────────── */
.person { display: flex; gap: 12px; align-items: flex-start; }
.person .bio { font-size: 14px; color: var(--text-soft); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .contact { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.person .contact .btn { min-height: 36px; }
/* The card opens into the popup: a tap anywhere on it (its buttons and links aside), or the name for the keyboard. */
.card.person.openable { cursor: pointer; }
.card.person.openable:active { transform: scale(.995); }
.person-name { padding: 0; text-align: left; overflow-wrap: anywhere; }
.person-name:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.person-go { flex: none; align-self: center; margin-right: -6px; color: var(--text-soft); }
.rete-legend > .chip { min-height: 32px; padding: 0 12px; font-size: 12px; }
.overlay.sheet > .card.person-sheet { position: relative; padding: 0; border-radius: 20px; }
.person-sheet-body { padding: 26px 20px 22px; }
.person-sheet-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 40px; }
.person-sheet h2 { font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; } .person-sheet h2:focus { outline: none; }
.person-sheet .bio { margin-top: 14px; font-size: 16px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.person-sheet h3 { margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.person-sheet .contact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; } .person-sheet .contact .btn { min-height: 44px; flex: 1 1 auto; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; }

/* ── ideas ──────────────────────────────────────── */
.idea .status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.idea h2 { font-size: 18px; }
.idea .block { margin-top: 10px; } .idea .block b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); margin-bottom: 2px; }
.hands { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.hands .avatars { display: flex; gap: 4px; }
.idea .mine { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--info-bg); font-size: 14px; } .idea .mine b { display: block; } .idea .mine .row { margin-top: 6px; }
.idea .due { font-size: 13px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 4px; }

/* ── soci (board) ────────────────────────────────────── */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.subtabs a { flex: none; min-height: 44px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface-2); font-weight: 600; font-size: 14px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
@media (max-width: 440px) { .subtabs { gap: 4px; } .subtabs a { padding: 0 9px; font-size: 13px; } }
@media (max-width: 380px) { .subtabs { flex-wrap: wrap; } }
.subtabs a.active { background: var(--navy); color: #fff; }
.pay-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: start; }
.pay-row .amount { font-family: var(--font-display); font-weight: 700; font-size: 17px; text-align: right; }
.pay-row .msg { grid-column: 1 / -1; font-size: 14px; color: var(--text-soft); font-style: italic; }
.decide { margin-top: 12px; padding: 12px; border-radius: var(--radius-s); background: var(--surface-2); } .decide b { display: block; margin-bottom: 8px; }
.reason { font-size: 13px; color: var(--warn); margin-top: 6px; } @media (prefers-color-scheme: dark) { .reason { color: var(--warn); } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.kv b { color: var(--text-soft); font-weight: 600; }
details.more { margin-top: 12px; } details.more > summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border-radius: var(--radius-s); }
details.more > summary:hover { background: var(--surface-2); }
details.more > summary::-webkit-details-marker { display: none; } details.more > summary svg { transition: transform .15s; color: var(--text-soft); } details.more[open] > summary svg { transform: rotate(90deg); }

/* ── overlay (privacy first-run) ─────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(11,18,36,.55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.overlay .card { width: 100%; max-width: 480px; max-height: 80dvh; overflow: auto; box-shadow: var(--shadow-m); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); transform: translateX(-50%); z-index: 40; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-pill); font-size: 14px; box-shadow: var(--shadow-m); max-width: calc(100% - 32px); }

@media (min-width: 720px) {
  body { font-size: 16px; }
  .main { padding-top: 24px; }
  .segmented .btn { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── photos, pictures, event kinds, ideas, wiki (round 4) ── */
.avatar.has-img { background: var(--surface-2); overflow: hidden; padding: 0; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.btn.disabled { opacity: .55; pointer-events: none; }
.switch.off { opacity: .6; }
.switch > span .help { font-weight: 400; }
.chip.kind { gap: 5px; }
.chip.members { background: var(--red); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.members { background: var(--red-bright); } }
.card.members-only { border-left: 4px solid var(--red); }
.organizer { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.organizer .meta, .organizer b { display: block; }
.card.idea.priority { border-color: rgba(180, 31, 20, .45); }
.chip.priority-chip { background: var(--red); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.priority-chip { background: var(--red-bright); } .card.idea.priority { border-color: rgba(255, 145, 132, .5); } }
.docs-link { border-left: 4px solid var(--navy); }
@media (prefers-color-scheme: dark) { .docs-link { border-left-color: var(--sky); } }
.card > .cover { display: block; width: calc(100% + 32px); max-width: none; margin: -14px -16px 12px; border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.card.members-only > .cover { width: calc(100% + 29px); margin-left: -13px; border-top-left-radius: 10px; }
.field .cover { width: 100%; margin-top: 6px; border-radius: var(--radius-s); aspect-ratio: 16 / 9; object-fit: cover; }
.tagbox { position: relative; }
.tagbox > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--text-faint); }
.tagbox .input { padding-left: 26px; min-height: 40px; }

/* ── the Rete: three kinds of people (migration 0006) ── */
.chip.k-socio { background: var(--k-socio-bg); color: var(--k-socio); } .chip.k-alumni { background: var(--k-alumni-bg); color: var(--k-alumni); } .chip.k-esterno { background: var(--k-esterno-bg); color: var(--k-esterno); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; } .legend .chip { border: 1px solid transparent; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip.k-socio.selectable.on { background: var(--k-socio); color: #fff; border-color: var(--k-socio); } .chip.k-alumni.selectable.on { background: var(--k-alumni); color: #fff; border-color: var(--k-alumni); } .chip.k-esterno.selectable.on { background: var(--k-esterno); color: #fff; border-color: var(--k-esterno); }
@media (prefers-color-scheme: dark) { .chip.k-socio.selectable.on, .chip.k-alumni.selectable.on, .chip.k-esterno.selectable.on { color: var(--ink); } }
.card.person.k-socio { border-left: 4px solid var(--k-socio); } .card.person.k-alumni { border-left: 4px solid var(--k-alumni); } .card.person.k-esterno { border-left: 4px solid var(--k-esterno); }
.person h3 .chip { vertical-align: middle; }

/* ── bookkeeping: Consiglio → Contabilità (migration 0008) ── */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border-radius: var(--radius-s); background: var(--surface-2); }
.seg > a, .seg > button { min-height: 38px; padding: 2px 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: 13px; line-height: 1.15; color: var(--text-soft); }
.seg > .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-s); }
@media (prefers-color-scheme: dark) { .seg > .on { background: var(--accent); color: #fff; } }
.fin-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 10px; align-items: start; width: 100%; text-align: left; padding: 10px 0; border-top: 1px solid var(--line); }
.card > div:first-child > .fin-row { border-top: 0; padding-top: 0; }
.fin-row .when { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.fin-row .what b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.fin-row .what .meta { display: block; }
.fin-row .clip { display: inline-flex; align-items: center; gap: 1px; vertical-align: -2px; }
.fin-edit { padding: 0 0 4px 50px; }
@media (max-width: 420px) { .fin-edit { padding-left: 0; } }
.amt { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; display: inline-flex; align-items: center; gap: 3px; }
.amt.in { color: var(--ok); } .amt.tr { color: var(--text-soft); font-weight: 600; }
.neg, .amt.neg { color: var(--bad); }
.missing { color: var(--warn); font-weight: 600; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fin-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-soft); padding: 0 0 4px; }
.fin-table td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.fin-table .num { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-table tr.total td { font-weight: 700; border-top: 1.5px solid var(--line-strong); }
.table-wrap { overflow-x: auto; }
.result { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); font-weight: 600; }
.result b { font-family: var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipts { display: grid; gap: 6px; }
.receipt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.receipt > a, .receipt > .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.receipt > a span, .receipt > .grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt svg { flex: none; color: var(--text-soft); }
.fin-list { margin-top: 10px; }
.fin-list > div + div > .list-row { border-top: 1px solid var(--line); padding-top: 12px; }

/* == UX-A: eventi + bacheca == */
/* Eventi: "Tutti / Organizzati da GMSI" (two segments; bold marks the choice, not colour alone). */
.seg.two { grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.seg.two > button { min-height: 44px; font-size: 14px; }
.seg.two > .on { font-weight: 700; }
.card > .cover.cover-sm { aspect-ratio: 21 / 9; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 8px; }
.organizer.first, .actions.first { margin-top: 0; }
/* Bacheca: page head with the sort select. */
.page-head .select.sort { width: auto; min-height: 44px; padding: 8px 10px; font-weight: 600; font-size: 16px; flex: none; }
/* Closed composer: one tap target that looks like a field. */
.composer-closed { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.composer-open { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; text-align: left; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--bg); color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-open:hover { border-color: var(--text-soft); }
.composer .meta:empty { display: none; }
.composer .meta { margin-top: 4px; text-align: right; }
.composer-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 10px; }
.composer-actions .row { gap: 8px; }
.composer-actions .row:last-child { margin-left: auto; }
.composer-actions .btn-sm, .tag-chosen { min-height: 40px; }
.tag-chosen { padding: 0 12px; font-size: 13px; gap: 6px; }
.attach-help { padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.attach-help .help { margin-top: 6px; }
/* Post: full-width header and text, votes in a footer row. */
.post.feed-post { display: block; }
.post-head { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.post-head .grow { min-width: 0; line-height: 1.3; }
.post-head .grow b { margin-right: 4px; }
.post-head .more-btn { width: 44px; min-height: 44px; margin: -8px -10px -8px 0; border-color: transparent; color: var(--text); flex: none; }
.post-head .more-btn[aria-expanded="true"] { background: var(--surface-2); }
.post-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding: 8px; border-radius: var(--radius-s); background: var(--surface-2); }
.post-menu .btn { min-height: 44px; }
.post-menu .btn-soft { background: var(--surface); }
.post-menu .btn-danger { margin-left: auto; }
.post-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; margin-left: -6px; }
.votes { display: inline-flex; align-items: center; }
.votes button { width: 44px; height: 44px; border-radius: var(--radius-s); color: var(--text-soft); display: grid; place-content: center; }
.votes button svg { width: 22px; height: 22px; }
.votes button.on-up { color: #fff; background: var(--navy); } .votes button.on-down { color: #fff; background: var(--bad); }
.votes .score { min-width: 24px; text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.post-foot .chip.tag { min-height: 32px; padding: 0 12px; }
@media (prefers-color-scheme: dark) { .votes button.on-up { background: var(--accent); } .votes button.on-down { color: var(--ink); } }
/* == end UX-A == */

/* == UX-B: wiki tiles + page view, Rete sheet, Profilo save bar == */
/* Wiki home: tiles grouped by theme; the colour is the group (tokens, so both themes). */
.tile-group { margin-top: 22px; } .tile-group > h2 { font-size: 17px; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 112px; padding: 14px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.tile:active { transform: scale(.98); }
.tile > b, .tile > .teaser { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile > b { font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--text); }
.tile > .teaser { font-size: 13px; line-height: 1.35; color: var(--text-soft); }
.tiles > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-content: center; min-height: 72px; }
.tiles > .tile:last-child:nth-child(odd) > .w-ico { grid-row: span 2; margin: 0; align-self: center; }
.tiles > .tile:last-child:nth-child(odd) > b:last-child { grid-row: span 2; align-self: center; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, 1fr); } .tiles > .tile:last-child:nth-child(odd) { grid-column: auto; display: flex; min-height: 112px; } .tiles > .tile:last-child:nth-child(odd) > .w-ico { margin-bottom: 8px; } }
.w-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-content: center; background: var(--tile-bg); color: var(--tile-fg); margin-bottom: 8px; }
.g1 { --tile-bg: var(--k-socio-bg); --tile-fg: var(--k-socio); } .g2 { --tile-bg: var(--warn-bg); --tile-fg: var(--warn); }
.g3 { --tile-bg: var(--k-esterno-bg); --tile-fg: var(--k-esterno); } .g4 { --tile-bg: var(--ok-bg); --tile-fg: var(--ok); } .g0 { --tile-bg: var(--surface-2); --tile-fg: var(--text-soft); }
/* Wiki page: icon badge + title, "In breve" box, long pages fold their sections. */
.wiki-head { display: flex; align-items: flex-start; gap: 12px; } .wiki-head .w-ico { margin: 0; }
.callout { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--info-bg); border-left: 4px solid var(--navy); }
.callout > h2 { font-size: 16px; margin-bottom: 6px; } .callout .md > :last-child { margin-bottom: 0; }
@media (prefers-color-scheme: dark) { .callout { border-left-color: var(--sky); } }
details.sec { border-top: 1px solid var(--line); } details.sec:last-child { border-bottom: 1px solid var(--line); }
details.sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 0; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary h2 { font-size: 17px; margin: 0; }
details.sec > summary svg { flex: none; color: var(--text-soft); transform: rotate(90deg); transition: transform .15s; } details.sec[open] > summary svg { transform: rotate(-90deg); }
details.sec > .md { padding-bottom: 8px; }
/* Rete: the opt-in notice and the sheet (on .overlay). */
.notice.rete-off { display: flex; align-items: center; gap: 10px; }
.overlay.sheet { padding-bottom: calc(16px + var(--safe-b)); }
.overlay.sheet > .card { max-height: 85dvh; padding: 20px; font-size: 16px; animation: sheet-up .18s ease-out; }
.overlay.sheet > .card > h2 { font-size: 20px; } .overlay.sheet > .card > h2:focus { outline: none; }
.overlay.sheet .help { font-size: 13px; }
.sheet-actions { display: grid; gap: 12px; margin-top: 18px; } .sheet-actions .btn { min-height: 48px; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .overlay.sheet > .card { animation: none; } }
/* Profilo: with unsaved changes the save button stays in reach, above the tab bar. */
.actions.save-bar { position: sticky; bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); z-index: 5; margin: 12px -8px 0; padding: 8px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); flex-wrap: nowrap; }
/* == end UX-B == */

/* == UX-C: idee (categories, filters, slimmer card) + consiglio == */
.idea-filters { margin-bottom: 14px; }
.idea-filters .chip svg { flex: none; }
.idea .status { min-height: 24px; }
.idea .status:has(.idea-edit) { margin-top: -6px; margin-right: -8px; }
.idea .overline { font-size: 12px; font-weight: 600; color: var(--text-soft); margin-bottom: 2px; }
.idea > h2 { overflow-wrap: anywhere; }
.idea details.more { margin-top: 2px; }
.idea details.more + details.more { margin-top: 0; }
.idea details.more > summary { margin: 0 -4px; }
.idea .idea-more { padding: 2px 0 4px; }
.idea .idea-more h3 { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0; margin: 8px 0 2px; }
.idea .idea-more h3:first-child { margin-top: 2px; }
.idea .event-link { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: underline; color: var(--text); }
.idea .event-link svg { flex: none; color: var(--text-soft); }
.idea .hands-none { margin-top: 10px; }
.idea .hands-sum { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--text-soft); }
.idea .hands-sum .avatars { display: flex; gap: 3px; }
.idea > .cover { aspect-ratio: 21 / 9; object-position: 50% 100%; }
.idea .mine { margin-top: 10px; }
.idea .actions { margin-top: 10px; }
.subtabs a { text-decoration: none; }
/* == end UX-C == */
/* Bacheca: sort menu alone in the head sits on the right; file cards from other sites */
.page-head:has(> .select.sort:only-child) { justify-content: flex-end; }
.link-file { display: flex; flex-direction: column; min-width: 0; }
.link-file b, .link-file .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* == Floating add button (Eventi, Idee) and forms in a sheet == */
.fab { position: fixed; z-index: 25; right: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter))); bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--cta); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(11,18,36,.35), 0 0 0 1px rgba(255,255,255,.12); }
.fab:hover { background: var(--cta-hover); }
.fab:active { transform: scale(.96); }
.fab:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--cta), 0 4px 14px rgba(11,18,36,.35); }
.fab-space { height: 72px; }
.sheet-form .actions { position: sticky; bottom: -20px; z-index: 2; margin: 16px -20px -20px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); }
/* == Rete: intro, board actions == */
.tick { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.tick input { width: 22px; height: 22px; flex: none; accent-color: var(--navy); }
.rete-board { align-items: center; margin-top: 12px; }
.rete-board .help { margin: 0; flex: 1 1 200px; }
.list-row[aria-expanded="true"] { scroll-margin-top: 76px; }

/* == Eventi in preparazione (0013): list, overview, steps, the grid of dates, the day picker == */
/* Eventi: "Tutti / Di GMSI / In preparazione"; the last label is the longest, the count sits next to it. */
.seg.three { grid-template-columns: .8fr 1fr 1.55fr; margin-bottom: 14px; }
.seg.three > button { min-height: 44px; font-size: 14px; gap: 6px; }
.seg.three > .on { font-weight: 700; }
.seg-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 700; display: inline-grid; place-content: center; }
.seg.three-eq { grid-template-columns: repeat(3, 1fr); }
.seg.three-eq > button { min-height: 44px; font-size: 14px; }
.prep-intro { margin: -4px 0 12px; }
.prep-card h3 { overflow-wrap: anywhere; }
.prep-progress { margin-top: 10px; }
.prep-progress .bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.prep-progress .bar > i { display: block; height: 100%; border-radius: 3px; background: var(--navy); }
@media (prefers-color-scheme: dark) { .prep-progress .bar > i { background: var(--sky); } }
.prep-progress .meta { display: block; margin-top: 4px; }
.prep-help { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--warn); }
.prep-help svg { flex: none; }
.prep-banner { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-bottom: 12px; text-align: left; font-weight: 600; color: var(--warn); background: var(--warn-bg); }
.prep-link .row svg:first-child { color: var(--text-soft); }
/* choosing between options: big rows with a title and a line of explanation */
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; text-align: left; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
.choice:hover { border-color: var(--text-soft); }
.choice > svg { flex: none; color: var(--text-soft); }
.choice b { display: block; }
.choice .help { display: block; margin-top: 2px; }
.choice.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
@media (prefers-color-scheme: dark) { .choice.on { border-color: var(--sky); box-shadow: inset 0 0 0 1px var(--sky); } }
.choice input[type="radio"] { width: 20px; height: 20px; flex: none; accent-color: var(--navy); }
/* the overview: one row per step */
.step-list { display: grid; }
.step-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--line); }
.step-row:first-child { border-top: 0; }
.step-row .grow b { display: block; }
.step-row .grow .meta { display: block; }
.step-row > svg { flex: none; color: var(--text-soft); }
.step-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center; font-weight: 700; font-size: 13px; border: 1.5px solid var(--line-strong); color: var(--text-soft); }
.step-dot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-dot.now { border-color: var(--navy); color: var(--navy); box-shadow: 0 0 0 3px var(--info-bg); }
@media (prefers-color-scheme: dark) { .step-dot.done { color: var(--ink); } .step-dot.now { border-color: var(--sky); color: var(--sky); } }
.step-nav { display: flex; justify-content: space-between; gap: 8px; }
/* guests */
.invite-row { display: block; width: 100%; text-align: left; font: inherit; color: inherit; }
.invite-row .grow b, .invite-row .grow .meta { display: block; }
.invite-row .chips { display: flex; }
.invite-meta { display: block; margin-top: 8px; }
.pick-row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
.pick-row .grow b, .pick-row .grow .meta { display: block; }
.pick-row > svg { flex: none; color: var(--text-soft); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.code-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.code-box b { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .08em; }
.code-box .meta { width: 100%; }
/* dates and venue */
.fixed-date { border-left: 4px solid var(--ok); }
.venue-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.venue-line .grow b, .venue-line .grow .meta { display: block; }
.card.best { border-color: var(--ok); }
.grade-list { padding: 4px 12px; }
.grade-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 0; text-align: left; border-top: 1px solid var(--line); }
.grade-list > .grade-row:first-child, .best .grade-row:first-child { border-top: 0; }
.grade-row .when { flex: none; width: 92px; line-height: 1.2; }
.grade-row .when b { display: block; font-size: 14px; }
.grade-row .when span { font-size: 12px; color: var(--text-soft); }
.grade-row.blocked .when b { color: var(--text-faint); text-decoration: line-through; }
.grade-row.works .when b { color: var(--ok); }
.grade-row > svg { flex: none; color: var(--text-soft); }
.ans-list { display: flex; flex-wrap: wrap; gap: 4px; }
.ans { display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 0 7px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-soft); white-space: nowrap; }
.ans.yes { background: var(--ok-bg); color: var(--ok); } .ans.maybe { background: var(--warn-bg); color: var(--warn); } .ans.no { background: var(--bad-bg); color: var(--bad); }
.ans.none { background: transparent; border: 1px dashed var(--line-strong); font-weight: 600; }
.ans.venue.libera { background: var(--ok-bg); color: var(--ok); } .ans.venue.occupata { background: var(--bad-bg); color: var(--bad); } .ans.venue.da_chiedere { background: var(--surface-2); }
.legend-box { margin-bottom: 10px; }
.ans-q { font-size: 12px; font-weight: 800; line-height: 1; }
.role-card.referente { border-left: 4px solid var(--navy); }
@media (prefers-color-scheme: dark) { .role-card.referente { border-left-color: var(--sky); } }
.legend-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.ok-text { color: var(--ok); font-weight: 600; }
.date-rowform + .date-rowform { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.textarea.prog-text { min-height: 280px; font-size: 15px; }
/* team */
.role-people { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.role-hand.compact { padding: 10px 0; border-top: 1px solid var(--line); }
.role-hand.compact:first-child { border-top: 0; }
.task-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; }
.task-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--ok); }
.task-row .task-title { display: block; font-weight: 600; }
.task-row .meta { display: block; }
.task-row.done .task-title { text-decoration: line-through; color: var(--text-soft); font-weight: 500; }
.task-mark { width: 22px; height: 22px; flex: none; display: grid; place-content: center; color: var(--ok); }
.meta.late { color: var(--bad); font-weight: 600; }
.card.risk { border-left: 4px solid var(--warn); }
/* the day picker (guest page and team) */
.dp-legend { margin: 0 0 4px; }
.dp-month .group-head { margin-top: 12px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.dp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 64px; padding: 6px 4px; border-radius: var(--radius-s); border: 1.5px solid var(--line-strong); background: var(--surface); text-align: center; line-height: 1.2; }
.dp b { font-size: 14px; } .dp span { font-size: 12px; color: var(--text-soft); } .dp em { font-style: normal; font-size: 12px; font-weight: 700; min-height: 15px; }
.dp.yes { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.dp.maybe { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.dp.yes span, .dp.maybe span { color: inherit; }
.dp:disabled { opacity: .6; cursor: default; }
@media (max-width: 380px) { .seg.three > button { font-size: 13px; padding: 2px 4px; } .two-cols { grid-template-columns: 1fr; } }
/* the guest page (/invito): no tab bar, a short footer, the steps as cards */
.main.guest { padding-bottom: 32px; }
.guest-code { max-width: 440px; margin: 8px auto 0; padding: 20px; }
.guest-hero h1 { overflow-wrap: anywhere; }
.guest-step h2 { font-size: 18px; }
.guest-terms { margin: 10px 0 0; }
.guest-terms h3 { font-size: 15px; }
.guest-conditions { padding: 4px 4px 0; }
.consent { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.seg.two-eq { grid-template-columns: 1fr 1fr; }
.seg.two-eq > button { min-height: 44px; font-size: 14px; }
.guest-cannot { text-align: center; }
.guest-foot { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-soft); }
.guest-foot p + p { margin-top: 6px; }
.guest-foot a { text-decoration: underline; }
.toast.guest-toast { bottom: calc(16px + var(--safe-b)); }
@media (max-width: 380px) { .consent { grid-template-columns: 1fr; } }
/* == Direttivo area: its own bottom bar (app.js), red line under the header and over the bar == */
:root { --board-bar: var(--navy); --board-line: var(--red); --board-ink: rgba(255,255,255,.72); }
@media (prefers-color-scheme: dark) { :root { --board-bar: var(--navy-600); --board-line: var(--red-bright); } }
.header.board { box-shadow: inset 0 -3px 0 var(--board-line); }
.header-btn.exit { background: #fff; color: var(--navy); }
.tabs.board { background: var(--board-bar); border-top: 3px solid var(--board-line); }
.tabs.board .tabs-in { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } /* four sections; fewer until the database has Email and Relazioni */
.tabs.board .tab { color: var(--board-ink); }
.tabs.board .tab.active { color: #fff; }
.tabs.board .tab.active::before { background: #fff; }
.tabs.board .tab .badge { box-shadow: 0 0 0 2px var(--board-bar); }
.page-head .board-mark { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }

/* Idee (2026-10-15): sections that fold, one compact row per idea on phones, a grid of cards on computers. */
.ideas-head { align-items: center; }
.ideas-head .btn { font-size: 14px; padding-inline: 14px; }
.idea-filters { margin-bottom: 4px; }
.idea-filters .chip { flex: none; }
.idea-sec { margin-top: 10px; }
.idea-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 2px; border-radius: var(--radius-s); }
.idea-sec > summary::-webkit-details-marker { display: none; }
.idea-sec > summary:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.idea-sec-h { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; color: var(--text); }
.idea-sec-rule { display: block; font-size: 13px; color: var(--text-soft); margin-top: 1px; }
.idea-sec > summary > svg { flex: none; color: var(--text-soft); transform: rotate(90deg); transition: transform .15s; }
.idea-sec:not([open]) > summary > svg { transform: none; }
.idea-sec:not([open]) { border-bottom: 1px solid var(--line); }
.idea-n { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text-soft); background: var(--surface-2); border-radius: var(--radius-pill); padding: 1px 9px; }
.idea-none { font-size: 14px; color: var(--text-soft); padding: 2px 2px 12px; }
.idea-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 0 14px; margin-bottom: 6px; }
.idea-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "th head act" "th meta meta"; column-gap: 12px; row-gap: 3px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.idea-item:first-child { border-top: 0; }
.idea-th { grid-area: th; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: var(--info-bg); color: var(--text-soft); }
.idea-th img { width: 100%; height: 100%; object-fit: cover; }
.idea-head { grid-area: head; min-width: 0; align-self: end; }
.idea-head h3 { font: inherit; margin: 0; }
.idea-cats { display: none; }
.idea-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; padding: 0; text-align: left; font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: var(--text); overflow-wrap: anywhere; }
.idea-name:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.idea-sum { display: none; }
.idea-meta { grid-area: meta; align-self: start; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--text-soft); }
.idea-meta b { color: var(--text); font-weight: 600; }
.idea-meta .ok, .idea-prog .ok { color: var(--ok); font-weight: 600; }
.idea-star { display: inline-flex; color: var(--red); }
.idea-dots { display: inline-flex; gap: 3px; flex: none; }
.idea-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); opacity: .55; }
.idea-dots i.on { background: var(--navy); opacity: 1; }
.idea-faces { display: flex; }
.idea-faces .avatar { width: 22px; height: 22px; font-size: 9px; border: 2px solid var(--surface); margin-left: -4px; }
.idea-faces .avatar:first-child { margin-left: 0; }
.idea-outcome { display: inline-flex; align-items: center; gap: 4px; }
.idea-outcome.done { color: var(--ok); }
.idea-act { grid-area: act; align-self: center; }
.idea-ci { min-height: 40px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.idea-ci.on { background: var(--ok-bg); color: var(--ok); }
.idea-ci:disabled { opacity: .6; }

/* The popup: same shape as the event page. Shared pieces: the round close button and the grab bar. */
.overlay.sheet > .card.idea-sheet { position: relative; padding: 0; border-radius: 20px; }
.sheet-grip { position: absolute; top: 8px; left: 50%; z-index: 2; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line-strong); }
.sheet-grip.on-img { background: rgba(255, 255, 255, .7); }
.sheet-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.sheet-x.on-img { background: rgba(11, 18, 36, .5); color: #fff; }
.sheet-x:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.idea-cover { position: relative; aspect-ratio: 5 / 2; background: var(--surface-2); }
.idea-cover img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 20px 20px 0 0; }
.idea-sheet-body { padding: 18px 20px 22px; }
.idea-sheet-body.no-cover { padding-top: 26px; }
.idea-sheet-body.no-cover .idea-chips { padding-right: 48px; }
.idea-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.idea-chips .chip { font-size: 12px; }
.stage-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; white-space: nowrap; }
.stage-chip.desire { background: var(--warn-bg); color: var(--warn); }
.stage-chip.eval { background: var(--info-bg); color: var(--navy); }
.stage-chip.live, .stage-chip.done { background: var(--ok-bg); color: var(--ok); }
.stage-chip.closed { background: var(--surface-2); color: var(--text-soft); }
.idea-sheet h2 { font-size: 22px; line-height: 1.25; margin-top: 10px; text-wrap: balance; overflow-wrap: anywhere; }
.idea-sheet h2:focus { outline: none; }
.idea-by { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 13px; color: var(--text-soft); }
.idea-box { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.idea-box h3, .idea-part h3 { font-size: 16px; }
.idea-prog { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 14px; color: var(--text-soft); }
.idea-prog b { color: var(--text); font-weight: 600; }
.idea-prog .idea-dots i { width: 10px; height: 10px; }
.idea-box .help { margin-top: 6px; }
.idea-box .btn-block { margin-top: 12px; min-height: 48px; font-size: 16px; }
.idea-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 8px 8px 8px 12px; border-radius: var(--radius-s); background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.idea-in > span { display: inline-flex; align-items: center; gap: 6px; }
.link-btn { min-height: 36px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.idea-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; }
.idea-ask > span { flex: 1 1 100%; }
.idea-news { display: flex; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ok); }
.idea-news svg, .idea-warn svg, .idea-next svg { flex: none; margin-top: 2px; }
.idea-box .field { margin-top: 12px; }
.idea-part { margin-top: 22px; }
.idea-part h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.idea-part .md { font-size: 15px; }
.idea-people .who { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.idea-people .who .avatar { margin-top: 1px; }
.idea-people .who b { display: block; font-size: 14px; font-weight: 600; }
.idea-people .who .note { display: block; font-size: 13px; color: var(--text-soft); overflow-wrap: anywhere; }
.idea-people .who .you { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.idea-link { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.idea-link span { flex: 1; text-decoration: underline; text-underline-offset: 3px; }
.idea-link svg { flex: none; color: var(--text-soft); }
.idea-own { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-soft); }
.idea-own .idea-ask { margin-top: 0; flex: 1 1 100%; }
.idea-board { margin-top: 24px; padding: 14px 16px 16px; border-radius: var(--radius); background: var(--info-bg); }
.idea-board-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idea-board-h p { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.idea-board-h .btn { background: var(--surface); }
.idea-lab { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.idea-flow { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.idea-flow.two { grid-template-columns: 1fr 1fr; }
.idea-flow button { min-height: 46px; padding: 4px; border-left: 1px solid var(--line); font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--text); }
.idea-flow button:first-child { border-left: 0; }
.idea-flow button small { display: block; font-size: 11px; font-weight: 500; color: var(--text-soft); }
.idea-flow button.cur { background: var(--surface-2); color: var(--text-soft); cursor: default; opacity: 1; }
.idea-flow button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.idea-flow button:focus-visible { outline: 2px solid var(--sky); outline-offset: -2px; }
.idea-confirm { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.idea-confirm .help { margin-top: 8px; }
.idea-confirm .row { margin-top: 10px; }
.idea-warn { display: flex; gap: 8px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--warn-bg); color: var(--warn); font-size: 13px; }

/* The propose form, in the same popup frame. */
.idea-sheet .idea-form { padding: 26px 20px 20px; }
.idea-form h2 { font-size: 21px; margin-top: 0; padding-right: 44px; }
.idea-form .lead { margin-top: 4px; font-size: 14px; color: var(--text-soft); }
.idea-form .field > span { color: var(--text); }
.field .opt { font-weight: 500; color: var(--text-soft); }
.idea-form .textarea { min-height: 88px; }
.idea-form .textarea.short { min-height: 64px; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-chip { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text); }
.theme-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.theme-chip.add { border-style: dashed; color: var(--text-soft); }
.image-drop { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-s); background: var(--bg); color: var(--text-soft); font-size: 14px; font-weight: 600; cursor: pointer; }
.image-drop.disabled { opacity: .6; pointer-events: none; }
.image-drop:focus-within { outline: 2px solid var(--sky); outline-offset: 2px; }
.idea-next { display: flex; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); font-size: 13px; color: var(--text-soft); }
.idea-form .actions .btn-primary { min-height: 48px; font-size: 16px; }

/* Kept from the event pages: picking and listing ideas linked to an event. */
.idea-picker { max-height: 250px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: 8px; }
.idea-picker .tick { min-height: 48px; padding: 10px 12px; align-items: start; }
.idea-picker .tick + .tick { border-top: 1px solid var(--line); }
.idea-picker .tick input { flex: none; margin-top: 3px; }
.linked-ideas .event-link { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  .idea-dots i.on { background: var(--sky); }
  .idea-star { color: var(--red-soft); }
  .stage-chip.eval { color: var(--sky); }
  .idea-board-h p { color: var(--sky); }
  .idea-flow button[aria-pressed="true"], .theme-chip[aria-pressed="true"] { background: var(--sky); border-color: var(--sky); color: var(--ink); }
}
@media (min-width: 720px) {
  .overlay.sheet:has(> .idea-sheet), .overlay.sheet:has(> .person-sheet) { align-items: center; }
  .overlay.sheet > .card.idea-sheet, .overlay.sheet > .card.person-sheet { max-width: 560px; }
  .sheet-grip { display: none; }
}
@media (min-width: 760px) {
  .main.ideas-main { max-width: 1180px; padding-left: 24px; padding-right: 24px; }
  .app:has(.ideas-main) .header-in { max-width: 1180px; padding-inline: 24px; }
  .app:has(.ideas-main) .tabs-in { max-width: 1180px; }
  .idea-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 0; background: none; border: 0; box-shadow: none; }
  .idea-item { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "th head head" "sum sum sum" "meta meta act"; grid-template-rows: auto 1fr auto; row-gap: 10px; align-items: start;
    padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); }
  .idea-item:first-child { border-top: 1px solid var(--line); }
  .idea-item:hover { border-color: var(--line-strong); }
  .idea-item.priority { border-color: rgba(180, 31, 20, .45); }
  .idea-th { width: 40px; height: 40px; }
  .idea-head { align-self: center; }
  .idea-cats { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--text-soft); }
  .idea-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
  .idea-sum { grid-area: sum; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--text-soft); }
  .idea-meta, .idea-act { align-self: end; }
  .idea-meta { min-height: 40px; }
}

/* Pop-ups, one way (2026-10-15; simplified 2026-10-16): the Idee popup's frame for every popup of Eventi (popup.js).
   One type scale (title 20, text 15, secondary 13), one left edge, the rest folded under "Avanzate (facoltativo)". */
.overlay.sheet > .card.pop { position: relative; padding: 0; border-radius: 20px; }
.pop-body { padding: 26px 20px 20px; font-size: 15px; }
.pop-body > h2, .pop-head h2 { font-size: 20px; line-height: 1.25; text-wrap: balance; overflow-wrap: anywhere; }
.pop-body > h2 { padding-right: 44px; }
.pop-body > h2:focus, .pop-head h2:focus { outline: none; }
.pop-lead { margin-top: 4px; color: var(--text-soft); }
.pop-lead.ok { color: var(--ok); font-weight: 600; }
.pop-text { margin-top: 10px; }
.pop-line { margin-top: 6px; overflow-wrap: anywhere; }
.pop-line b { font-weight: 600; }
.pop-line.ok { color: var(--ok); } .pop-line.muted { color: var(--text-soft); }
.pop-sec { margin-top: 20px; }
.pop-sec > h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--text); margin-bottom: 2px; }
.pop .opt { font-weight: 400; color: var(--text-soft); }
.pop .field { margin-top: 14px; }
.pop .field > span:not(.help) { font-size: 14px; font-weight: 500; color: var(--text); }
.pop .help { font-size: 13px; font-weight: 400; margin-top: 4px; }
.pop .two-cols .field { margin-top: 14px; }
.pop .choice-list { margin-top: 16px; }
.pop .choice { gap: 10px; }
.pop .notice { margin-top: 12px; }
.pop .searchbar { margin-top: 8px; }
.pop .seg, .pop .skills { margin-top: 6px; }
.pop .tick { margin-top: 2px; }
.pop .code-box { margin-top: 8px; }
.pop .textarea { margin-top: 0; }
.pop-list { margin-top: 4px; }
.pop-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 0; border-top: 1px solid var(--line); text-align: left; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--text); }
.pop-row:first-child { border-top: 0; }
.pop-row .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pop-row .t small { display: block; font-size: 13px; font-weight: 400; color: var(--text-soft); }
.pop-row > svg { flex: none; color: var(--text-soft); transition: transform .15s; }
.pop-row[aria-expanded="true"] > svg:last-child { transform: rotate(90deg); }
.pop-row.danger { color: var(--bad); }
.pop-row:disabled { opacity: .55; cursor: default; }
.pop-row-body { padding: 0 0 12px; }
.pop-row-body .field { margin-top: 6px; } .pop-row-body .field > span:empty { display: none; }
.pop-row-body .idea-picker { margin-top: 8px; }
.pop-adv { margin-top: 22px; border-top: 1px solid var(--line); }
.pop-adv > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 0; font-size: 15px; font-weight: 600; color: var(--text); }
.pop-adv > summary::-webkit-details-marker { display: none; }
.pop-adv > summary svg { flex: none; color: var(--text-soft); transform: rotate(90deg); transition: transform .15s; }
.pop-adv[open] > summary svg { transform: rotate(-90deg); }
.pop-adv > summary:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.pop-adv-body { padding-bottom: 6px; }
.pop-adv-body > .field:first-child, .pop-adv-body > .two-cols:first-child > .field { margin-top: 4px; }
.pop-adv-body > .pop-sec:first-child { margin-top: 8px; }
.pop-adv-body > .pop-list:first-child { margin-top: 0; }
.pop-adv-body > .pop-list:first-child > .pop-row:first-child { border-top: 0; }
.pop-adv-body .pop-sec + .pop-list { margin-top: 10px; }
.pop-confirm { margin: 6px 0 10px; padding: 12px; border-radius: var(--radius-s); background: var(--bad-bg); color: var(--bad); font-size: 14px; }
.pop-confirm .row { margin-top: 10px; }
.pop-confirm-err { margin-top: 6px; font-weight: 600; }
.btn-danger-solid { background: var(--bad); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger-solid { color: var(--ink); } }
.pop-foot { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; margin-top: 20px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; }
.pop-foot .btn { min-height: 48px; font-size: 16px; }
.pop-foot .btn:first-child { flex: 1; }
.pop-pick { margin-top: 6px; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.pop-pick label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.pop-pick label:first-child { border-top: 0; }
.pop-pick label.on { background: var(--info-bg); }
.pop-pick input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--navy); }
.pop-pick b { display: block; font-size: 15px; font-weight: 500; color: var(--text); }
.pop-pick small { display: block; font-size: 13px; color: var(--text-soft); }
.pop-pick b .pop-now { display: inline; margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.pop-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.pop-head .avatar { width: 48px; height: 48px; font-size: 16px; }
.pop-head .grow { min-width: 0; }
.pop-head p { margin-top: 2px; font-size: 14px; color: var(--text-soft); }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pop-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pop-pills a, .pop-pills button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: 14px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.pop-pills svg { flex: none; }
.pop-preview { margin-top: 12px; }
.pop-note { margin-top: 10px; font-size: 13px; color: var(--text-soft); }
@media (min-width: 720px) {
  .overlay.sheet:has(> .pop) { align-items: center; }
  .overlay.sheet > .card.pop { max-width: 520px; }
}
/* Reimbursement requests (0019): the member's page (rimborsi.js) and Contabilità → Rimborsi. */
.sec-h { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; color: var(--text); }
.rentry { margin-top: 12px; }
.rentry .row { gap: 12px; }
.rentry .grow b { display: block; }
.rentry .meta { display: block; white-space: normal; }
.rentry .row > svg:last-child { color: var(--text-soft); flex: none; }
.rcard.tap { position: relative; cursor: pointer; }
.rcard-open { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rcard-open::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.rcard-open:focus-visible { outline: none; }
.rcard.tap:has(.rcard-open:focus-visible) { outline: 2px solid var(--cta); outline-offset: 2px; }
.rcard h3 { margin-top: 8px; font-size: 16px; overflow-wrap: anywhere; }
.rcard .row .amt { font-size: 17px; font-weight: 700; white-space: nowrap; }
.rcard .row .grow { min-width: 0; }
.rcard .row .grow b, .rcard .row .grow .meta { display: block; }
.rcard .row .grow .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rmeta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--text-soft); }
.rsteps { list-style: none; margin: 14px 0 2px; padding: 0; display: grid; gap: 0; }
.rsteps li { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.rsteps li:last-child { padding-bottom: 0; }
.rsteps li::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line-strong); }
.rsteps li.done::before { background: var(--ok); }
.rsteps li:last-child::before { display: none; }
.rsteps .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); color: #fff; }
.rsteps li.done .dot { background: var(--ok); border-color: var(--ok); }
.rsteps li.stop .dot { background: var(--text-soft); border-color: var(--text-soft); }
.rsteps li.now .dot { border-color: var(--navy); box-shadow: 0 0 0 3px var(--info-bg); }
.rsteps b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.rsteps li:not(.done):not(.now):not(.stop) b { color: var(--text-soft); font-weight: 500; }
.rsteps small { display: block; font-size: 13px; color: var(--text-soft); overflow-wrap: anywhere; }
.seg.four { grid-template-columns: 1fr 1.15fr 1fr 1.1fr; }
.seg.four > a { min-height: 44px; gap: 4px; }
.seg.four > .on { font-weight: 700; }
.rbal .amt { font-size: 18px; font-weight: 700; }
.rnote { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--info-bg); font-size: 14px; }
.rnote svg { flex: none; margin-top: 2px; color: var(--navy); }
.rthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rthumbs > a, .rthumbs > span { width: 92px; height: 116px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; }
.rthumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rthumbs .rdoc { display: grid; justify-items: center; gap: 4px; padding: 6px; color: var(--text-soft); text-align: center; }
.rthumbs .rdoc small { font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; max-height: 3.6em; overflow: hidden; }
/* Elenco soci (2026-11-10, second pass): headings like the newer pages, no avatar and no status pill on each row (the
   heading of the group says it), one hairline between people and the same space above and below each, one left edge
   for names, details and buttons. */
.reg-search { margin-top: 12px; }
.reg-filters { margin-top: 10px; }
.reg-card { padding: 0 16px; }
.reg-item + .reg-item { border-top: 1px solid var(--line); }
.reg .reg-row.list-row { width: 100%; text-align: left; border-top: 0; padding: 13px 0; gap: 10px; }
.reg-top { display: flex; align-items: baseline; gap: 12px; }
.reg-top b { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.reg-when { flex: none; font-size: 13px; color: var(--text-soft); }
.reg .reg-row .meta { margin-top: 2px; }
.reg-board { color: var(--navy); font-weight: 600; }
@media (prefers-color-scheme: dark) { .reg-board { color: var(--sky); } }
.reg-chev { flex: none; display: inline-flex; color: var(--text-faint); transition: transform .15s; }
.reg-item.open .reg-chev { transform: rotate(90deg); }
.reg-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.m-open { padding: 0 0 16px; }
.m-data p { margin: 2px 0 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.m-data p:first-child { margin-top: 0; }
.m-data a { color: inherit; text-decoration: none; }
.m-data a:hover { text-decoration: underline; }
.m-data .soft { color: var(--text-soft); font-size: 14px; }
.m-data a.m-link { color: var(--red); font-weight: 600; } @media (prefers-color-scheme: dark) { .m-data a.m-link { color: var(--red-soft); } }
.m-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.m-acts .btn { padding: 0 8px; font-size: 14px; }
.m-acts .m-danger { color: var(--bad); }
@media (min-width: 640px) { .m-acts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Direttivo, 2026-11-16: a request opened inside Elenco soci (its count in the group title is a to-do), the TWINT
   emails the reader could not read (Contabilità → Movimenti) */
.req-open .kv { margin-top: 2px; }
.idea-n.todo { background: var(--cta); color: #fff; }
.tw-err { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tw-err .meta { display: block; }

/* Direttivo → Relazioni: the list of the organisations and one organisation's page */
.rel-next { display: block; margin-top: 3px; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-brief { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.rel-facts { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; }
.rel-ico { min-width: 40px; padding: 0; flex: none; }
.rel-person-name { display: block; min-width: 0; padding: 0; text-align: left; color: inherit; }
.rel-person-name b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.rel-hist { margin-top: 12px; }
.rel-h { display: block; width: 100%; padding: 13px 0; text-align: left; color: inherit; }
.rel-h-body { display: block; margin: 3px 0 4px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.rel-h .reg-when { white-space: nowrap; }
.rel-rows { padding: 2px 16px; }
.rel-rows .pop-list { margin-top: 0; }
/* a conversation of Email linked to the organisation, in its history */
a.rel-h { position: relative; padding-right: 26px; }
.rel-h-go { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

/* Direttivo → Email (mockup approved 2026-11-15): it reads as a mail program. Folders, then one row per conversation */
.mail-check { min-width: 44px; }
.mail-check.turning svg { animation: mail-turn 1s linear infinite; }
@keyframes mail-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mail-check.turning svg { animation: none; } }
.mail-notice { margin-bottom: 12px; }
.mail-why { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }
.mail-folders { margin-top: 12px; }
.mail-hint { margin: 12px 2px 0; }
.mail-list { margin-top: 12px; padding: 0; overflow: hidden; }
.mail-state { margin-top: 10px; } .mail-state:empty { display: none; }
.mail-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-top: 1px solid var(--line); color: inherit; }
.mail-row:first-child { border-top: 0; }
.mail-row > .avatar { margin-top: 2px; }
.mail-row-top { display: flex; align-items: baseline; gap: 6px; }
.mail-row-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
.mail-row-top .reg-when { margin-left: auto; padding-left: 6px; flex: none; white-space: nowrap; }
.mail-n { flex: none; font-size: 12px; color: var(--text-faint); }
.mail-dot { flex: none; align-self: center; width: 9px; height: 9px; border-radius: 50%; background: var(--cta); }
.mail-row-sub, .mail-row-snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-sub { margin-top: 1px; font-size: 14px; color: var(--text); }
.mail-row-snip { font-size: 13px; color: var(--text-soft); }
.mail-row.unread .mail-row-top b, .mail-row.unread .mail-row-sub { font-weight: 700; }
.mail-row.unread .reg-when { color: var(--text); font-weight: 700; }
.mail-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mail-labels:empty { display: none; }
.mail-compose { position: fixed; z-index: 25; right: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter))); bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); display: inline-flex; align-items: center; gap: 8px;
  height: 54px; padding: 0 22px 0 18px; border: 0; border-radius: 18px; background: var(--cta); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(11,18,36,.3); }
.mail-compose:hover { background: var(--cta-hover); }
/* a conversation: one card, the older messages folded to a line, the last one open */
.mail-title { font-size: 22px; overflow-wrap: anywhere; text-wrap: balance; }
a.chip.tag { text-decoration: none; }
.mail-conv { margin-top: 16px; padding: 0; overflow: hidden; }
.mail-m { display: block; width: 100%; padding: 14px; border-top: 1px solid var(--line); text-align: left; color: inherit; }
.mail-conv > :first-child { border-top: 0; }
.mail-m.folded { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
.mail-m .row { gap: 10px; align-items: flex-start; }
.mail-m .grow .meta { display: block; margin-top: 1px; overflow-wrap: anywhere; }
.mail-m .row > .reg-when { flex: none; margin-top: 2px; white-space: nowrap; }
.mail-us { flex: none; padding: 0 7px; border-radius: var(--radius-pill); background: var(--info-bg); color: var(--navy); font-size: 11px; font-weight: 700; line-height: 18px; }
@media (prefers-color-scheme: dark) { .mail-us { color: var(--sky); } }
.mail-text { margin-top: 12px; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.mail-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mail-files .btn { max-width: 100%; gap: 6px; }
.mail-files .btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-note { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--warn-bg); font-size: 14px; }
.mail-note > svg { flex: none; margin-top: 2px; color: var(--warn); }
.mail-note b { font-weight: 600; }
.mail-note p { margin: 4px 0 2px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.mail-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.mail-rows { margin-top: 16px; }
/* writing an email: Da / A / Oggetto as lines, the text without a box, the signature, the quoted message */
.mail-env { margin-top: 14px; border-top: 1px solid var(--line); }
.mail-env > * { display: flex; align-items: baseline; gap: 8px; min-height: 44px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.mail-env b { flex: none; font-weight: 500; color: var(--text-soft); }
.mail-env span { min-width: 0; overflow-wrap: anywhere; }
.mail-env input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: 16px; color: var(--text); outline: none; }
.mail-env label:focus-within { border-bottom-color: var(--navy); }
.mail-body { display: block; width: 100%; min-height: 130px; margin-top: 4px; padding: 12px 0; border: 0; background: none; font-size: 16px; line-height: 1.5; color: var(--text); resize: vertical; outline: none; }
.mail-sign { margin: 0; font-size: 14px; line-height: 1.4; }
.mail-sign b, .mail-sign > span { display: block; }
.mail-sign b { font-weight: 600; color: var(--text); }
.mail-sign > span { color: var(--text-soft); }
.mail-quote { margin-top: 16px; padding-left: 12px; border-left: 3px solid var(--line-strong); font-size: 14px; color: var(--text-soft); }
.mail-quote p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.mail-file { min-height: 40px; }
.mail-file .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
