/* Arc & Saw — tema „cald" (previzualizare: python build.py --theme cald).
   Aspectul site-ului actual (hârtie caldă, serif, colțuri rotunjite), plus navigarea nouă:
   meniuri derulante, meniu pe telefon, „Începe aici", fir de Ariadna, cuprins lateral. */

/* header fix sus, pe fundal de hârtie ușor transparent */
.theme-cald .site-head.sticky { position: sticky; top: 0; z-index: 50; background: rgba(245, 241, 234, .92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-cald .site-head.sticky { background: rgba(23, 22, 20, .9); } }

.theme-cald .menus { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: .95rem; }
.theme-cald .menus > a, .theme-cald .dd > button { color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
  font: inherit; padding: 9px 14px; border-radius: 999px; display: flex; align-items: center; gap: 6px; }
.theme-cald .menus > a.plain:hover, .theme-cald .dd:hover > button, .theme-cald .dd:focus-within > button { background: var(--paper-2); color: var(--spark); }
.theme-cald .dd > button svg { width: 11px; height: 11px; transition: transform .2s; opacity: .7; }
.theme-cald .dd:hover > button svg, .theme-cald .dd:focus-within > button svg { transform: rotate(180deg); }
.theme-cald .dd { position: relative; }
/* puntea invizibilă: meniul nu se închide când muți mouse-ul spre el */
.theme-cald .dd::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.theme-cald .dd-panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px); min-width: 300px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  box-shadow: 0 18px 40px -12px rgba(40, 30, 15, .28); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; }
.theme-cald .dd:hover .dd-panel, .theme-cald .dd:focus-within .dd-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.theme-cald .dd-panel a, .theme-cald .mob-panel a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .98rem; line-height: 1.25; }
.theme-cald .dd-panel a small, .theme-cald .mob-panel a small { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-3); margin-top: 3px; }
.theme-cald .dd-panel a:hover, .theme-cald .dd-panel a:focus { background: var(--paper-2); outline: none; }
.theme-cald .dd-panel a:last-child { color: var(--spark); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 12px; }
.theme-cald .menus a.lang { margin-left: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .8rem; letter-spacing: .06em; }
.theme-cald .menus a.lang:hover { border-color: var(--spark); color: var(--spark); }

/* telefon: buton rotund cu meniul complet */
.theme-cald .mobnav { display: none; }
@media (max-width: 860px) {
  .theme-cald .menus { display: none; }
  .theme-cald .mobnav { display: block; }
  .theme-cald .mobnav summary { list-style: none; cursor: pointer; width: 46px; height: 46px; display: grid; place-content: center; gap: 5px;
    border-radius: 50%; background: var(--card); border: 1px solid var(--line); }
  .theme-cald .mobnav summary::-webkit-details-marker { display: none; }
  .theme-cald .mobnav summary span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .theme-cald .mobnav[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .theme-cald .mobnav[open] summary span:nth-child(2) { opacity: 0; }
  .theme-cald .mobnav[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .theme-cald .mob-panel { position: fixed; left: 12px; right: 12px; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto;
    background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px 22px; box-shadow: 0 24px 50px -16px rgba(40,30,15,.35); }
  .theme-cald .mob-h { font: 700 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: 18px 14px 6px; }
  .theme-cald .mob-panel a.lang { display: inline-block; margin: 16px 0 0 14px; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 16px; }
  .theme-cald .mob-panel a.plain { margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0; padding-top: 14px; }
}

/* fir de Ariadna */
.theme-cald .crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.theme-cald .crumbs a { color: var(--ink-2); text-decoration: none; }
.theme-cald .crumbs a:hover { color: var(--spark); text-decoration: underline; }
.theme-cald .crumbs i { font-style: normal; color: var(--line); font-size: 1.1em; }

/* „Începe aici": carduri rotunjite cu săgeată */
.theme-cald section.start { padding: 8px 0 72px; }
.theme-cald .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.theme-cald .tile { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 54px;
  text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.theme-cald .tile b { display: block; font: 600 1.25rem/1.2 var(--serif); margin-bottom: 6px; }
.theme-cald .tile span { font-size: .92rem; color: var(--ink-2); }
.theme-cald .tile i { position: absolute; left: 22px; bottom: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2);
  color: var(--spark); font-style: normal; display: grid; place-items: center; transition: transform .2s, background .2s, color .2s; }
.theme-cald .tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(40,30,15,.3); border-color: var(--brass); }
.theme-cald .tile:hover i { background: var(--spark); color: var(--spark-ink); transform: translateX(4px); }

/* articol: cuprinsul lângă text pe ecrane mari */
@media (min-width: 1100px) {
  .theme-cald .prose:not(.page) { max-width: 1080px; display: grid; grid-template-columns: minmax(0, 720px) 250px; column-gap: 56px; }
  .theme-cald .prose:not(.page) > * { grid-column: 1; }
  .theme-cald .prose:not(.page) > .toc { grid-column: 2; grid-row: 1 / span 400; position: sticky; top: 96px; align-self: start; margin: 0; }
  .theme-cald .article-head .wrap { max-width: 1080px; }
  .theme-cald .article-head h1, .theme-cald .article-head p { max-width: 760px; }
}
.theme-cald .toc a { color: var(--ink-2); text-decoration: none; }
.theme-cald .toc a:hover { color: var(--spark); }
html:has(body.theme-cald) { scroll-padding-top: 90px; scroll-behavior: smooth; }
