@import url("tokens.css");

/* Sursa: brain design/e-grila/style.css (WEBA-65). Mai jos de „site”, doar ce cere conținutul importat. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: var(--w-regular) var(--fs-base)/var(--lh-text) var(--f-sans);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; }
h1, h2, h3 { color: var(--c-ink); font-weight: var(--w-bold); line-height: var(--lh-tight); letter-spacing: var(--track-tight); margin: 0; }
p { margin: 0 0 var(--s-3); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s-3); top: var(--s-3); background: var(--c-bg); padding: var(--s-2); z-index: 9; }

/* grilă */
.wrap { max-width: var(--grid-max); margin: 0 auto; padding: 0 var(--grid-pad); }
.grid { display: grid; grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr)); column-gap: var(--grid-gap); }

/* antet */
.site-head { border-bottom: var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 6rem; }
/* The SVG has built-in padding: the wordmark starts at x=46/526, so pull it onto the grid edge. */
.brand { display: block; margin-left: -1.1rem; }
.brand img { height: 72px; width: auto; }
@media (max-width: 719px) { .brand { margin-left: -0.9rem; } .brand img { height: 60px; } }
.brand .logo-inverse { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo { display: none; }
  :root:not([data-theme="light"]) .brand .logo-inverse { display: block; }
}
[data-theme="dark"] .brand .logo { display: none; }
[data-theme="dark"] .brand .logo-inverse { display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: var(--fs-sm); }
.nav a { color: var(--c-ink); text-decoration: none; padding: 0.25rem 0; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--c-brand); }
.nav a[aria-current] { color: var(--c-ink); text-decoration: underline; text-decoration-color: var(--c-brand); text-decoration-thickness: 2px; }

/* metadate și text auxiliar */
.meta { font-size: var(--fs-sm); color: var(--c-muted); margin: 0 0 var(--s-2); }
.meta span + span::before { content: ", "; }
.credit { font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--s-2); }
.crumbs { font-size: var(--fs-sm); color: var(--c-muted); padding-top: var(--s-4); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "/"; margin: 0 0.5rem; color: var(--c-rule); }
.crumbs a { color: var(--c-muted); }

/* homepage */
.intro { padding-block: var(--s-6) var(--s-5); }
.intro h1 { grid-column: 1 / span 5; font-size: var(--fs-2xl); }
.intro p { grid-column: 1 / span 7; font-size: var(--fs-md); color: var(--c-text); margin: 0; max-width: 34rem; }
/* The homepage H1 stays in the DOM for SEO; the header logo already shows the name. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.lead { padding-block: 0 var(--s-6); }
.lead > .grid { border-top: var(--rule); padding-top: var(--s-5); }
.cover { text-decoration: none; }
.lead .cover { grid-column: 1 / span 3; }
.lead .body { grid-column: 5 / span 7; align-self: center; }
.lead figure { grid-column: 1 / span 5; margin: 0; }
.lead .has-photo .body { grid-column: 7 / span 6; }
.lead h2 { font-size: var(--fs-2xl); margin-bottom: var(--s-3); }
.lead h2 a, .entry h3 a, .entry h2 a { color: inherit; text-decoration: none; }
.lead h2 a:hover, .entry h3 a:hover, .entry h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.lead .dek { font-size: var(--fs-md); max-width: 36rem; }

.cover { aspect-ratio: 2 / 3; background: var(--c-cover-bg); color: var(--c-cover-ink); padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; font-size: var(--fs-sm); line-height: 1.3; }
.cover b { font-size: 1.5rem; font-weight: var(--w-bold); letter-spacing: var(--track-tight); line-height: 1.1; }

.section-title { font-size: var(--fs-sm); font-weight: var(--w-bold); color: var(--c-ink); letter-spacing: 0; padding: var(--s-3) 0 var(--s-4); border-top: 2px solid var(--c-ink); margin: 0; }
.recent { padding-bottom: var(--s-6); }
.recent .grid { row-gap: var(--s-6); }
.entry h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.entry p.ex { color: var(--c-text); max-width: 34rem; }
.entry figure { margin: 0 0 var(--s-3); }
.entry figure img, .lead figure img { width: 100%; }
.entry.text h3 { font-size: 1.375rem; }
.entry.ruled { border-top: var(--rule); padding-top: var(--s-3); }
.entry.side { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); align-items: center; border-top: var(--rule); padding-top: var(--s-5); }
.entry.side figure { grid-column: 1 / span 7; margin: 0; }
.entry.side .body { grid-column: 9 / span 4; }
.stack { display: grid; row-gap: var(--s-5); align-content: start; }
.c-1-7 { grid-column: 1 / span 7; }
.c-9-4 { grid-column: 9 / span 4; }
.c-1-12 { grid-column: 1 / -1; }
.c-1-4 { grid-column: 1 / span 4; }
.c-5-4 { grid-column: 5 / span 4; }
.c-1-8 { grid-column: 1 / span 8; }
.c-1-6 { grid-column: 1 / span 6; }
.c-8-5 { grid-column: 8 / span 5; }
.wide-caption { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); }
.wide-caption > div { grid-column: 1 / span 7; }

.hubs { padding-block: var(--s-5) var(--s-6); }
.hubs .grid { row-gap: var(--s-5); }
.hub { grid-column: span 4; }
.hub h3 { font-size: 1.375rem; margin-bottom: var(--s-2); }
.hub h3 a { color: inherit; text-decoration: none; }
.hub p { color: var(--c-muted); font-size: var(--fs-sm); }
.hub ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.hub li { padding: 0.45rem 0; border-top: var(--rule); }
.hub li a { color: var(--c-ink); text-decoration: none; }
.hub li a:hover { text-decoration: underline; }

/* articol */
.article-head { padding-block: var(--s-4) var(--s-5); }
.article-head .side { grid-column: 1 / span 3; }
.article-head .main { grid-column: 4 / span 7; }
.article-head h1 { font-size: var(--fs-2xl); margin-bottom: var(--s-4); }
.byline { font-size: var(--fs-sm); color: var(--c-muted); margin: 0; }
.byline a { color: var(--c-ink); font-weight: var(--w-medium); }

.article-body { padding-bottom: var(--s-7); }
.article-body .side { grid-column: 1 / span 3; font-size: var(--fs-sm); }
.article-body .main { grid-column: 4 / span 7; max-width: var(--measure); }
.article-body .aside-r { grid-column: 11 / span 2; }
.facts { margin: 0 0 var(--s-5); }
.facts dt { color: var(--c-muted); }
.facts dd { margin: 0 0 var(--s-2); color: var(--c-ink); }
.facts dd a { color: var(--c-ink); }
.toc { position: sticky; top: var(--s-4); }
.toc h2 { font-size: var(--fs-sm); margin-bottom: var(--s-2); letter-spacing: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; padding: 0.3rem 0 0.3rem 1.75rem; position: relative; border-top: var(--rule); }
.toc li::before { content: counter(toc); position: absolute; left: 0; color: var(--c-muted); font-feature-settings: "tnum"; }
.toc a { color: var(--c-ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc a[aria-current] { color: var(--c-accent); font-weight: var(--w-medium); }

.summary { font-size: var(--fs-md); line-height: 1.5; color: var(--c-ink); margin: 0 0 var(--s-5); padding-bottom: var(--s-4); border-bottom: var(--rule); }
.summary strong { font-weight: var(--w-bold); }
.prose h2 { font-size: 1.625rem; margin: var(--s-6) 0 var(--s-3); }
.prose h3 { font-size: 1.1875rem; margin: var(--s-4) 0 var(--s-2); }
.prose p { margin-bottom: 1.1em; }
.todo { background: var(--c-wash); color: var(--c-muted); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-3); font-size: var(--fs-sm); }
.todo b { color: var(--c-ink); font-weight: var(--w-medium); }
.todo-inline { color: var(--c-muted); }
blockquote .todo { text-indent: 0; }

blockquote { margin: var(--s-5) 0; padding: 0; font-size: var(--fs-md); line-height: 1.45; color: var(--c-ink); }
blockquote p { margin: 0 0 var(--s-2); text-indent: -0.45em; }
blockquote footer { font-size: var(--fs-sm); color: var(--c-muted); }

.figure { margin: var(--s-5) 0; }
.cover-inline { width: 12rem; }

.fisa { margin: var(--s-6) 0 var(--s-5); border-top: 2px solid var(--c-ink); padding-top: var(--s-3); }
.fisa h2, .fisa h3 { font-size: var(--fs-sm); margin: 0 0 var(--s-3); letter-spacing: 0; }
.fisa dl { display: grid; grid-template-columns: 11rem 1fr; margin: 0; font-size: var(--fs-sm); }
.fisa dt, .fisa dd { padding: 0.45rem 0; border-top: var(--rule); margin: 0; }
.fisa dt { color: var(--c-muted); }
.fisa dd { color: var(--c-ink); }
.fisa .note { font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--s-2); }

.faq h3 { font-size: 1.1875rem; }
.signoff { font-size: var(--fs-md); color: var(--c-ink); font-weight: var(--w-medium); margin-top: var(--s-5); }
.author-box { margin-top: var(--s-6); padding-top: var(--s-3); border-top: var(--rule); font-size: var(--fs-sm); color: var(--c-muted); display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3); align-items: start; }
.author-box img { width: 40px; height: 40px; }
.author-box a { color: var(--c-ink); font-weight: var(--w-medium); }

/* tag */
.hub-head { padding-block: var(--s-4) var(--s-5); }
.hub-head h1 { grid-column: 1 / span 4; font-size: var(--fs-2xl); }
.hub-head p { grid-column: 5 / span 6; font-size: var(--fs-md); margin: 0.35rem 0 0; color: var(--c-text); }
.listing { list-style: none; margin-block: 0; padding-block: 0 var(--s-7); }
.listing > li { padding: var(--s-4) 0; border-top: var(--rule); row-gap: var(--s-3); }
/* Text keeps one left edge whether or not the post has an image (most don't); the thumbnail sits right. */
.listing .txt { grid-column: 1 / span 8; grid-row: 1; }
.listing figure { grid-column: 10 / span 3; grid-row: 1; margin: 0; }
.listing figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.listing h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.listing h2 a { color: inherit; text-decoration: none; }
.listing h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.pager { font-size: var(--fs-sm); padding-bottom: var(--s-6); }

/* despre */
.about-photo { margin: 0 0 var(--s-5); }

/* subsol */
.site-foot { border-top: var(--rule); padding: var(--s-4) 0 var(--s-5); font-size: var(--fs-sm); color: var(--c-muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); }
.site-foot a { color: var(--c-muted); }
.site-foot nav { display: flex; gap: var(--s-4); }

/* componente */
.spec h2.k { font-size: var(--fs-xl); margin: var(--s-6) 0 var(--s-2); }
.spec .k-note { color: var(--c-muted); font-size: var(--fs-sm); max-width: 40rem; margin-bottom: var(--s-4); }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.themes > div { background: var(--c-bg); color: var(--c-text); padding: var(--s-5); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--s-3); font-size: var(--fs-xs); }
.swatches i { display: block; height: 3rem; border: var(--rule); margin-bottom: var(--s-1); }
.scale p { margin: 0 0 var(--s-2); color: var(--c-ink); line-height: 1.2; }
.scale small { display: block; font-size: var(--fs-xs); color: var(--c-muted); }

@media (max-width: 1023px) {
  :root { --grid-pad: 1.5rem; --grid-gap: 1rem; }
  .intro h1 { grid-column: 1 / -1; }
  .intro p { grid-column: 1 / -1; }
  .article-head .side { display: none; }
  .article-head .main { grid-column: 1 / -1; }
  .article-body .side { grid-column: 1 / -1; order: 2; }
  .article-body .main { grid-column: 1 / -1; }
  .article-body .aside-r { display: none; }
  .toc { position: static; margin-bottom: var(--s-5); }
  .hub { grid-column: span 6; }
}
@media (max-width: 719px) {
  :root { --grid-pad: 1.25rem; --fs-2xl: 2.25rem; --fs-md: 1.1875rem; --fs-base: 1.0625rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; padding-top: var(--s-3); padding-bottom: var(--s-3); gap: var(--s-2); }
  .nav { gap: 0.25rem 1rem; }
  .intro { padding-block: var(--s-5) var(--s-4); }
  .lead .cover { width: 9rem; margin-bottom: var(--s-4); }
  .lead h2 { font-size: var(--fs-xl); }
  .wide-caption > div { grid-column: 1 / -1; }
  .recent .grid { row-gap: var(--s-5); }
  .listing figure { margin-bottom: var(--s-3); }
  .listing .txt, .listing figure { grid-row: auto; }
  .entry.side { display: block; }
  .entry.side figure { margin-bottom: var(--s-3); }
  .fisa dl { grid-template-columns: 8rem 1fr; }
  .themes { grid-template-columns: 1fr; }
  .cover-inline { width: 9rem; }
  .cover { padding: 0.875rem; font-size: var(--fs-xs); }
  .cover b { font-size: 1.0625rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .site-head nav, .toc, .site-foot nav { display: none; } }

/* site: conținutul importat din Ghost */
.prose img { margin: var(--s-4) 0; }
.prose figure { margin: var(--s-5) 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--s-2); }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.35em; }
.prose pre { background: var(--c-wash); padding: var(--s-3); overflow-x: auto; font-size: var(--fs-sm); line-height: 1.45; margin: 0 0 1.1em; }
.prose code { font-family: ui-monospace, "DejaVu Sans Mono", Menlo, monospace; font-size: 0.9em; }
.prose pre code { font-size: inherit; }
.prose iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; margin: var(--s-4) 0; }
.prose hr { border: 0; border-top: var(--rule); margin: var(--s-5) 0; }
.prose h4, .prose h5 { color: var(--c-ink); font-size: var(--fs-base); margin: var(--s-4) 0 var(--s-2); }
.lede-figure { margin: 0 0 var(--s-5); }
.tags { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: var(--fs-sm); }
.tags li::before { content: "#"; color: var(--c-muted); }
.pager { display: flex; justify-content: space-between; gap: var(--s-4); }
.pager a[rel="prev"]::before { content: "← "; }
.pager a[rel="next"]::after { content: " →"; }
.listing-wrap { padding-top: var(--s-3); }

/* site: comentarii */
.comments { margin-top: var(--s-6, 4rem); padding-top: var(--s-5); border-top: var(--rule); }
.comments h2 { font-size: var(--fs-lg, 1.375rem); margin: 0 0 var(--s-4); }
.thread { border-bottom: var(--rule); padding: var(--s-4) 0; }
.comment header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; font-size: var(--fs-sm); }
.comment header b { color: var(--c-ink); font-size: var(--fs-base); }
.comment header a { color: var(--c-muted); text-decoration: none; }
.comment .badge { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-accent); border: 1px solid currentColor; padding: 0 0.35em; }
.comment-body { margin: var(--s-2) 0; overflow-wrap: anywhere; }
.comment .reply { font-size: var(--fs-sm); color: var(--c-muted); }
.replies { margin: var(--s-3) 0 0 var(--s-4); padding-left: var(--s-4); border-left: 2px solid var(--c-rule); display: grid; gap: var(--s-4); }
.notice { background: var(--c-wash); padding: var(--s-3); border-left: 3px solid var(--c-accent); }
.comment-form { margin-top: var(--s-5); display: grid; gap: var(--s-2); }
.comment-form h3 { margin: 0 0 var(--s-2); color: var(--c-ink); }
.comment-form label { font-size: var(--fs-sm); color: var(--c-ink); }
.comment-form input, .comment-form textarea { width: 100%; font: inherit; color: var(--c-text); background: var(--c-bg); border: 1px solid var(--c-rule); padding: 0.55rem 0.7rem; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.comment-form .hint { font-size: var(--fs-xs); color: var(--c-muted); margin: 0; }
.comment-form button { justify-self: start; font: inherit; font-weight: 600; color: var(--c-bg); background: var(--c-ink); border: 0; padding: 0.65rem 1.2rem; cursor: pointer; }
.comment-form button:hover { background: var(--c-accent); }
.comment-form .errors { color: #b42318; margin: 0; padding-left: 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 719px) { .comment-form .row { grid-template-columns: 1fr; } .replies { margin-left: 0; } }
