/* Stil unic pentru tot site-ul. Ideea: hârtie de desen tehnic; elementul de reținut e
   „cartușul" (title block) din dreapta postării. Restul rămâne liniștit. */

:root {
  --paper: #F3F5F4;
  --field: #FFFFFF;
  --ink: #1D2830;
  --muted: #5A6970;
  --line: #C5D0CD;
  --accent: #1F62A8;
  --accent-strong: #174D86;
  --accent-soft: #E3ECF6;
  --red: #B83227;
  --ok: #2C7A4B;
  --warn: #8A5A00;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --ui: "Fira Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --r: 3px;
  --wrap: 72rem;
  --measure: 40rem;
  --gap: clamp(1rem, 3vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #152029;
    --field: #1B2833;
    --ink: #E3E9E7;
    --muted: #97A6AD;
    --line: #2E3D47;
    --accent: #6FA8E6;
    --accent-strong: #9CC4F0;
    --accent-soft: #1E3247;
    --red: #F06C5E;
    --ok: #5DBE85;
    --warn: #E0B04A;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--serif);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-block: var(--gap) calc(var(--gap) * 2); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--ui); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 40rem) { .wrap { padding-inline: 1.5rem; } }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .4rem .8rem; z-index: 10; }
.skip:focus { left: .5rem; }
.muted { color: var(--muted); }

/* ---------- Antet ---------- */
header.site { border-bottom: 2px solid var(--ink); background: var(--paper); }
.bar { display: flex; align-items: center; gap: 1.25rem; min-height: 3.5rem; flex-wrap: wrap; font-family: var(--ui); }
.brand { font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; padding-block: .5rem; }
.brand:hover { color: var(--ink); }
.cats { display: flex; gap: 1rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.cats a { color: var(--muted); text-decoration: none; white-space: nowrap; padding-block: .9rem .75rem; border-bottom: 3px solid transparent; }
.cats a:hover { color: var(--ink); }
.cats a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.tools { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.icon { display: inline-flex; align-items: center; color: var(--ink); padding: .35rem; border-radius: var(--r); position: relative; }
.icon:hover { background: var(--accent-soft); color: var(--ink); }
.lang { color: var(--muted); text-decoration: none; font-size: .95rem; }
.login { font-weight: 600; text-decoration: none; }
.bell .count {
  position: absolute; top: -.15rem; right: -.3rem; min-width: 1.15rem; height: 1.15rem;
  background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; line-height: 1.15rem; text-align: center; padding-inline: .25rem;
}

.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: var(--r); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; margin-left: .45rem; border: 4px solid transparent; border-top-color: currentColor; vertical-align: -.1rem; }
.menu[open] summary { border-color: var(--ink); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 5; min-width: 13rem;
  background: var(--field); border: 2px solid var(--ink); display: flex; flex-direction: column;
}
.menu-panel > a, .menu-panel button { display: block; padding: .55rem .9rem; color: var(--ink); text-decoration: none; text-align: left; width: 100%; font: inherit; }
.menu-panel > a + a, .menu-panel form { border-top: 1px solid var(--line); }
.menu-panel > a:hover, .menu-panel button:hover { background: var(--accent-soft); }

@media (max-width: 40rem) {
  .bar { gap: .25rem 1rem; }
  .cats { order: 3; flex-basis: 100%; gap: 1.1rem; }
  .cats a { padding-block: .4rem .5rem; }
}

.verify-banner { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-family: var(--ui); font-size: .95rem; }
.verify-banner .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding-block: .5rem; }

/* ---------- Butoane și formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 1rem/1.2 var(--ui); padding: .55rem 1rem; border-radius: var(--r);
  border: 1px solid var(--ink); background: var(--field); color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0E1820; } }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.small { padding: .3rem .65rem; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.htmx-request.btn, .htmx-request .btn[type=submit] { opacity: .65; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.linklike.danger { color: var(--red); }

label { font-family: var(--ui); font-weight: 600; display: block; margin-bottom: .3rem; }
input, select, textarea {
  font: 1rem/1.4 var(--ui); color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-bottom-color: var(--muted); border-radius: var(--r);
  padding: .55rem .7rem; width: 100%; max-width: 100%;
}
textarea { font-family: var(--serif); line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); padding: 0; }
input[type=file] { border-style: dashed; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; margin: 0; }

.stack { display: flex; flex-direction: column; gap: 1.1rem; max-width: 30rem; }
.field { margin: 0; }
.field.narrow { max-width: 14rem; }
.field-hint { font: .9rem/1.45 var(--ui); color: var(--muted); margin: .3rem 0 0; }
.field-error { font: .9rem/1.45 var(--ui); color: var(--red); margin: .3rem 0 0; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-family: var(--ui); }
.form-actions .field-hint { margin: 0; }
.form-error, .form-notice { font-family: var(--ui); padding: .6rem .85rem; border-left: 4px solid; margin: 0 0 1rem; background: var(--field); }
.form-error { border-color: var(--red); color: var(--red); }
.form-notice { border-color: var(--ok); }
.stack > .form-error, .stack > .form-notice { margin: 0; }
.note { font-family: var(--ui); border-left: 4px solid var(--accent); background: var(--accent-soft); padding: .6rem .85rem; }
.alt { font-family: var(--ui); margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Pagini înguste (login etc.) ---------- */
.narrow-page { max-width: 30rem; margin-inline: auto; padding-top: 1rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.crumb { font-family: var(--ui); margin-bottom: .4rem; }
.empty-note, .empty-block { color: var(--muted); font-style: italic; }
.empty-block { border: 1px dashed var(--line); padding: 2rem; text-align: center; }
.more { margin: 1.5rem 0 0; }

/* ---------- Prima pagină ---------- */
.intro { margin-bottom: 2.5rem; display: grid; gap: 1.5rem var(--gap); grid-template-columns: minmax(0, 1fr); }
.intro-text { max-width: var(--measure); }
@media (min-width: 60rem) {
  .intro { grid-template-columns: minmax(0, var(--measure)) 22rem; justify-content: space-between; align-items: start; }
  .intro .skills-strip { margin-top: .6rem; }
}
.intro-text h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.1rem); line-height: 1.08; margin-bottom: .4em; }
.intro-text > p { font-size: 1.2rem; color: var(--muted); }
.skills-strip { border: 2px solid var(--ink); background: var(--field); font-family: var(--ui); }
.skills-strip h2 { font-size: .95rem; color: var(--muted); font-weight: 400; margin: 0; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.skills-strip ul { list-style: none; padding: 0; margin: 0; }
.skills-strip li { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.skills-strip li a { font-weight: 600; font-size: 1.08rem; display: block; }
.skills-strip li span { color: var(--muted); font-size: .92rem; line-height: 1.35; display: block; }
.skills-strip .btn { margin: .8rem; width: calc(100% - 1.6rem); border-top-width: 1px; }
.section-title { font-size: 1.4rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }

/* ---------- Liste de postări ---------- */
.post-list { max-width: 50rem; }
.post-item { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.post-item.with-cover { grid-template-columns: 1fr 9rem; }
.post-item h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover { color: var(--accent); text-decoration: underline; }
.post-item .summary { margin-bottom: .45rem; }
.thumb img { aspect-ratio: 4/3; object-fit: cover; width: 100%; border: 1px solid var(--line); display: block; }
.meta { font: .92rem/1.4 var(--ui); color: var(--muted); display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: 0; }
.meta a { color: var(--muted); }
.lang-note, .has-video { border: 1px solid var(--line); border-radius: var(--r); padding: 0 .35rem; }
@media (max-width: 34rem) { .post-item.with-cover { grid-template-columns: 1fr 5.5rem; } }

.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-family: var(--ui); }
.tags .n { color: var(--muted); font-size: .8rem; margin-left: .2rem; }

/* ---------- Postarea + cartușul ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (min-width: 60rem) {
  .post-layout { grid-template-columns: minmax(0, var(--measure)) 17.5rem; justify-content: space-between; }
  .titleblock { position: sticky; top: 1rem; }
}
@media (max-width: 59.99rem) { .task-page .titleblock { order: -1; } }
.post h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.75rem); line-height: 1.12; }
.cover { display: block; margin: 0 0 1.5rem; border: 1px solid var(--line); }
.video { position: relative; aspect-ratio: 16/9; margin: 0 0 1.5rem; border: 2px solid var(--ink); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Cartușul: ramă groasă, linii subțiri, etichete în stânga ca pe un desen tehnic. */
.titleblock { font-family: var(--ui); border: 2px solid var(--ink); background: var(--field); }
.titleblock table { border-collapse: collapse; width: 100%; }
.titleblock th, .titleblock td { border-bottom: 1px solid var(--line); padding: .45rem .7rem; vertical-align: top; text-align: left; }
.titleblock th { width: 38%; font-weight: 400; color: var(--muted); font-size: .85rem; border-right: 1px solid var(--line); padding-top: .55rem; }
.titleblock td { font-size: .98rem; overflow-wrap: anywhere; }
.titleblock tr:last-child th, .titleblock tr:last-child td { border-bottom: 0; }
.titleblock td[title] { font-family: var(--mono); font-size: .85rem; letter-spacing: .02em; }
.titleblock .langs { display: flex; gap: .6rem; }
.titleblock .langs a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
.tb-tags a { margin-right: .3rem; }
.tb-action { border-top: 2px solid var(--ink); padding: .8rem .7rem; }
.tb-action p { font-size: .88rem; color: var(--muted); margin: .5rem 0 0; }
.tb-action label { font-size: .85rem; font-weight: 400; color: var(--muted); }
.tb-action .row { display: flex; gap: .4rem; }
.tb-action + .tb-action { border-top-width: 1px; border-top-color: var(--line); }

/* ---------- Text din Markdown ---------- */
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose table, .prose figure { margin: 0 0 1em; }
.prose h1 { font-size: 1.6rem; margin-top: 2rem; }
.prose > h1:first-child { display: none; } /* titlul e deja deasupra */
.prose h2 { margin-top: 2rem; padding-bottom: .25rem; border-bottom: 1px solid var(--line); }
.prose h3 { margin-top: 1.6rem; }
.prose li + li { margin-top: .3em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose img { display: block; border: 1px solid var(--line); margin-inline: auto; }
.prose blockquote { border-left: 3px solid var(--accent); padding: .1rem 0 .1rem 1rem; color: var(--muted); font-style: italic; }
.prose :not(pre) > code { background: var(--accent-soft); padding: .1em .3em; border-radius: var(--r); }
.prose pre { background: #1D2830; color: #E3E9E7; padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5; border-radius: var(--r); }
.prose pre code { background: none; padding: 0; font-size: .85rem; }
.prose table { border-collapse: collapse; font: .95rem/1.4 var(--ui); display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4rem .65rem; text-align: left; }
.prose th { background: var(--accent-soft); }
.prose hr { border: 0; border-top: 2px solid var(--ink); margin: 2rem 0; }
.prose input[type=checkbox] { width: auto; margin-right: .35rem; vertical-align: -.1rem; }
.prose .task-list-item { list-style: none; margin-left: -1.4em; }

/* ---------- Comentarii ---------- */
.comments { max-width: var(--measure); margin-top: 3rem; border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.comments-list:empty::before, .messages:empty::before, .attachments:empty::before {
  content: attr(data-empty); display: block; color: var(--muted); font-style: italic; margin-bottom: 1rem;
}
.thread { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.comment header { font-family: var(--ui); display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .75rem; margin-bottom: .25rem; }
.comment .author { font-weight: 600; }
.comment .when, .comment .edited { color: var(--muted); font-size: .88rem; text-decoration: none; }
.comment-body > :last-child { margin-bottom: 0; }
.comment-body pre { background: var(--field); border: 1px solid var(--line); padding: .6rem; overflow-x: auto; }
.comment-actions { display: flex; gap: 1rem; margin-top: .35rem; font: .9rem var(--ui); }
.replies { margin-left: clamp(.75rem, 3vw, 2rem); border-left: 2px solid var(--line); padding-left: 1rem; }
.replies:empty { display: none; }
.replies .comment { padding-top: .8rem; }
.comment-removed { color: var(--muted); font-style: italic; margin: 0; }
.comment-form { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.comment-form.reply, .comment-form.edit { margin: .6rem 0 0 clamp(.75rem, 3vw, 2rem); }
.comment-form.edit { margin-left: 0; }
.comment-login { font-family: var(--ui); margin-top: 1rem; }

/* ---------- Căutare ---------- */
.search-form { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; max-width: 50rem; margin-bottom: 1.5rem; }
.search-form input[type=search] { grid-column: 1 / -1; font-size: 1.2rem; padding: .7rem .85rem; border: 2px solid var(--ink); }
.search-form select { width: auto; }
.search-form .check { justify-self: start; }
@media (min-width: 40rem) { .search-form { grid-template-columns: 1fr auto auto auto; } }
.results { max-width: 50rem; }
.results-count { font-family: var(--ui); color: var(--muted); }
.hit { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.hit h2 { font-size: 1.2rem; margin-bottom: .2rem; }
.snippet { margin-bottom: .3rem; }
.snippet mark { background: var(--accent-soft); color: inherit; padding: 0 .1em; box-shadow: inset 0 -2px var(--accent); }

/* ---------- Servicii ---------- */
.skill-list { list-style: none; padding: 0; margin: 1.5rem 0; max-width: 50rem; border-top: 2px solid var(--ink); }
.skill-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: start; }
.skill-list h2 { font-size: 1.25rem; margin: 0; }
.skill-list p { grid-column: 1; margin: 0; color: var(--muted); }
.skill-list .btn { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.custom { font-family: var(--ui); }

/* ---------- Taskuri ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; font-family: var(--ui); }
.filters a { padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.filters a:hover { border-color: var(--ink); }
.filters a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.task-table, .user-table { width: 100%; border-collapse: collapse; font-family: var(--ui); }
.task-table th, .user-table th { text-align: left; font-weight: 400; color: var(--muted); font-size: .88rem; border-bottom: 2px solid var(--ink); padding: .4rem .6rem; }
.task-table td, .user-table td { border-bottom: 1px solid var(--line); padding: .6rem; vertical-align: top; }
.task-table .num { color: var(--muted); width: 3rem; }
.task-table .from { display: block; color: var(--muted); font-size: .88rem; }
@media (max-width: 40rem) {
  .task-table thead { display: none; }
  .task-table tr { display: grid; grid-template-columns: 2.25rem 1fr auto; grid-template-areas: "num title title" "num who st" "num when st"; border-bottom: 1px solid var(--line); padding: .6rem 0; gap: .15rem .5rem; }
  .task-table td { border: 0; padding: 0; }
  .task-table .num { grid-area: num; }
  .task-table .title { grid-area: title; }
  .task-table .who { grid-area: who; font-size: .92rem; }
  .task-table .st { grid-area: st; align-self: end; }
  .task-table .when { grid-area: when; color: var(--muted); font-size: .88rem; }
}

.status { display: inline-block; font: 600 .82rem/1.5 var(--ui); padding: 0 .45rem; border-radius: var(--r); border: 1px solid currentColor; white-space: nowrap; }
.status-new { color: var(--accent); }
.status-discussing, .status-accepted { color: var(--warn); }
.status-in_progress { color: var(--accent-strong); background: var(--accent-soft); }
.status-done { color: var(--ok); }
.status-rejected, .status-cancelled { color: var(--muted); }

.task-new { max-width: var(--measure); }
.task-new .stack { max-width: none; }
.context { border: 2px solid var(--ink); background: var(--field); padding: .75rem 1rem; margin-bottom: 1.5rem; font-family: var(--ui); }
.context p { margin: 0; }
.context > p:first-child { color: var(--muted); font-size: .88rem; }
.context-title { font-size: 1.15rem; font-weight: 600; }
.context .field-hint { margin-top: .4rem; }

.task-description { white-space: pre-wrap; margin-bottom: 2rem; }
.conversation, .files { border-top: 2px solid var(--ink); padding-top: 1rem; margin-bottom: 2rem; }
.message { padding: .75rem 1rem; border: 1px solid var(--line); background: var(--field); margin-bottom: .75rem; border-radius: var(--r); max-width: 36rem; }
.message.from-admin { border-left: 4px solid var(--accent); margin-left: auto; }
.message header { font-family: var(--ui); display: flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; font-size: .92rem; margin-bottom: .2rem; }
.message time { color: var(--muted); }
.message .role { color: var(--accent); }
.message-body { white-space: pre-wrap; margin: 0; }
.message-form { display: flex; flex-direction: column; gap: .5rem; }
.attachments { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; }
.attachment { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-family: var(--ui); }
.attachment a { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.attachment img { width: 3rem; height: 3rem; object-fit: cover; border: 1px solid var(--line); }
.attachment .name { overflow-wrap: anywhere; }
.attachment .size { color: var(--muted); white-space: nowrap; }
.upload-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.upload-form label { flex-basis: 100%; margin: 0; }
.upload-form input[type=file] { flex: 1; min-width: 12rem; }
.upload-form .field-hint { flex-basis: 100%; }
.upload-progress { width: 100%; height: .4rem; accent-color: var(--accent); }

/* ---------- Cont ---------- */
.account-grid { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .account-grid .wide { grid-column: 1 / -1; } }
.account-grid > section { border-top: 2px solid var(--ink); padding-top: 1rem; }
.email-line { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; font-family: var(--ui); overflow-wrap: anywhere; }
.ok-mark { color: var(--ok); }
.warn-mark { color: var(--warn); }
.prefs { overflow-x: auto; margin: 1rem 0 1.5rem; }
.prefs table { border-collapse: collapse; font-family: var(--ui); min-width: 30rem; }
.prefs th, .prefs td { border-bottom: 1px solid var(--line); padding: .5rem .8rem; text-align: center; }
.prefs thead th:first-child { text-align: left; }
.prefs thead th { font-weight: 400; color: var(--muted); font-size: .88rem; border-bottom: 2px solid var(--ink); }
.prefs tbody th { text-align: left; font-weight: 400; }
.prefs td input[title] { opacity: .5; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.inline-form .field { flex: 1; min-width: 14rem; }
.inline-form .form-actions { padding-bottom: 1.6rem; }

/* ---------- Notificări ---------- */
.notification-list { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 46rem; border-top: 2px solid var(--ink); }
.notification-list li { border-bottom: 1px solid var(--line); }
.notification-list form { margin: 0; }
.notification {
  display: flex; justify-content: space-between; gap: 1rem; width: 100%; text-align: left;
  background: none; border: 0; padding: .75rem .5rem; font: inherit; color: var(--muted); cursor: pointer;
}
.notification:hover { background: var(--accent-soft); }
.notification time { font: .88rem var(--ui); white-space: nowrap; }
.unread .notification { color: var(--ink); }
.unread .msg { font-weight: 600; }
.unread .notification::before { content: ""; flex: none; width: .5rem; height: .5rem; margin-top: .55rem; border-radius: 50%; background: var(--accent); order: -1; }
.notification .msg { flex: 1; }

/* ---------- Admin ---------- */
.user-table td.actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.tag-admin { font-size: .8rem; color: var(--accent); border: 1px solid currentColor; border-radius: var(--r); padding: 0 .3rem; }
@media (max-width: 40rem) {
  .user-table thead { display: none; }
  .user-table tr { display: block; border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .user-table td { display: block; border: 0; padding: .15rem 0; }
  .user-table td.actions { justify-content: flex-start; padding-top: .4rem; }
}

/* ---------- Eroare ---------- */
.error-page .code { font: 600 4.5rem/1 var(--ui); color: var(--line); margin: 0 0 .5rem; }

/* ---------- Toast ---------- */
.toast-area { position: fixed; z-index: 20; left: 50%; bottom: 1.25rem; transform: translateX(-50%); width: min(30rem, calc(100% - 32px)); display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { pointer-events: auto; font-family: var(--ui); background: var(--ink); color: var(--paper); padding: .7rem 1rem; border-left: 5px solid var(--ok); border-radius: var(--r); }
.toast-error { border-left-color: var(--red); }
.toast.leaving { opacity: 0; transition: opacity .3s; }

/* ---------- Subsol ---------- */
footer.site { border-top: 1px solid var(--line); font: .92rem var(--ui); color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: 1.25rem; }
.foot a { color: var(--muted); }
.foot span { margin-right: auto; }

/* Conținutul nou adus de HTMX se luminează scurt — singura mișcare de pe site. */
@media (prefers-reduced-motion: no-preference) {
  .arrived { animation: arrive 1.6s ease-out; }
  @keyframes arrive { from { background-color: var(--accent-soft); } to { background-color: transparent; } }
  .message.arrived { animation-name: arrive-msg; }
  @keyframes arrive-msg { from { background-color: var(--accent-soft); } to { background-color: var(--field); } }
}

@media print {
  header.site, footer.site, .comments, .tb-action, .toast-area { display: none; }
  body { background: #fff; }
}
