/* Tool pages — shared design-system overrides, aligned with the
   Capitolul urmator homepage (plum / ochre / cream, Fraunces + Instrument Sans).
   Loaded AFTER each page's own <style>; retints the palette via CSS variables
   and restyles the shared component vocabulary. Page JS is untouched.
   NOTE: colors are hex / rgba (no oklch) — html2canvas 1.4.1 (PDF export)
   cannot parse oklch(). */

:root {
  /* Base palette (homepage design system) */
  --paper: #FAF6F0;
  --paper-soft: #F3ECE1;
  --paper-deep: rgba(46, 42, 40, 0.14);
  --surface: rgba(255, 255, 255, 0.72);
  --ink: #2E2A28;
  --ink-soft: #564b52;
  --ink-mute: #7b7069;
  --radius: 12px;
  --radius-lg: 22px;

  /* Aliases used by the Personal Values pages */
  --card: rgba(255, 255, 255, 0.72);
  --ink-2: #564b52;
  --muted: #7b7069;
  --soft: rgba(46, 42, 40, 0.14);
  --line: rgba(46, 42, 40, 0.14);
  --paper-2: #F3ECE1;

  /* Default category accent: adults (plum) */
  --accent: #7A4E63;
  --accent-deep: #5E3A4C;
  --accent-tint: #ECE1E7;
  --accent-soft: rgba(122, 78, 99, 0.45);
  --grad: #EFE4EA;
  --bordo: #7A4E63;

  /* Destructive (Reset) */
  --danger: #b14e49;
  --danger-border: rgba(177, 78, 73, 0.35);
  --danger-border-hover: rgba(177, 78, 73, 0.6);
  --danger-bg-hover: #f6e5e2;
}
body.cat-teens {
  --accent: #B07E3F;
  --accent-deep: #8A6230;
  --accent-tint: #F3E7D2;
  --accent-soft: rgba(176, 126, 63, 0.45);
  --grad: #F6ECD9;
  --bordo: #B07E3F;
}
body.cat-teams {
  --accent: #5E3A4C;
  --accent-deep: #4A2C3C;
  --accent-tint: #E6DCE1;
  --accent-soft: rgba(94, 58, 76, 0.45);
  --grad: #EADFE5;
  --bordo: #5E3A4C;
}
body.cat-authors {
  --accent: #C89A5B;
  --accent-deep: #B07E3F;
  --accent-tint: #F5EAD6;
  --accent-soft: rgba(200, 154, 91, 0.45);
  --grad: #F8EFDD;
  --bordo: #C89A5B;
}

body {
  /* Aliases resolved on body so category classes (also on body) win */
  --coral: var(--accent);
  --coral-2: var(--accent-deep);
  --bordo: var(--accent);
  background: var(--paper);
  background-image: radial-gradient(120% 50% at 90% -5%, var(--grad), transparent 55%);
  background-attachment: fixed;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: var(--ink);
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.page {
  position: relative;
  padding-top: 24px;
}

/* Top bar: back link left, language toggle pinned right */
.back-link {
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
}
.back-link:hover, .back-link:focus-visible { color: var(--ink); }

.lang-toggle {
  position: absolute;
  top: 24px;
  right: 28px;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  overflow: visible;
  font-size: 13px;
  letter-spacing: 0;
}
.lang-toggle a {
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--ink-mute);
  background: transparent;
}
.lang-toggle a[aria-current="page"] {
  font-weight: 600;
  background: var(--plum, #7A4E63);
  color: #fff;
}
.lang-toggle a:not([aria-current]):hover { color: var(--ink); }

/* Tool header */
header.top {
  border-bottom: none;
  padding: 34px 0 4px;
  margin-bottom: 10px;
}
header.top > div:first-child { max-width: 620px; }
header.top > div:first-child::before {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
html[lang="ro"] body.cat-adults header.top > div:first-child::before { content: "1:1 · Adulți"; }
html[lang="ro"] body.cat-teens header.top > div:first-child::before { content: "1:1 · Adolescenți"; }
html[lang="ro"] body.cat-teams header.top > div:first-child::before { content: "Echipă"; }
html[lang="ro"] body.cat-authors header.top > div:first-child::before { content: "1:1 · Autori"; }
html[lang="en"] body.cat-adults header.top > div:first-child::before { content: "1:1 · Adults"; }
html[lang="en"] body.cat-teens header.top > div:first-child::before { content: "1:1 · Teenagers"; }
html[lang="en"] body.cat-teams header.top > div:first-child::before { content: "Teams"; }
html[lang="en"] body.cat-authors header.top > div:first-child::before { content: "1:1 · Authors"; }

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--plum-deep, #5E3A4C);
}
h1 em {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.subtitle {
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  margin-top: 10px;
}

.session-info input {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  color: var(--ink);
}

.intro {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 16px 0 10px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}
.intro strong { color: var(--ink); }
.privacy-note {
  font-size: 13px;
  color: var(--ink-mute);
  font-style: normal;
  margin-bottom: 26px;
}
.privacy-note::before { content: "🔒 "; }

/* Section cards (.step vocabulary) */
.step {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 20px;
  overflow: hidden;
}
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent);
}
.step-header {
  border-bottom: none;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 0;
}
.step-letter {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--accent);
}
.step-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.015em;
}
.step-sub {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
}
.prompts li {
  font-family: inherit;
  font-style: normal;
  font-size: 15px;
  color: var(--ink-soft);
}

textarea {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 15px;
  padding: 14px 16px;
}
textarea:focus { border-color: var(--accent); }

/* 1-10 scale */
.scale { gap: 8px; }
.scale-chip {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--paper-deep);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.15s ease;
}
.scale-chip:hover { border-color: var(--accent); transform: scale(1.08); }
.scale-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffbf5;
}

/* Actions table */
table.actions input[type=text],
table.actions input[type=date] {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 12px 14px;
}
.add-row {
  border: 1.5px dashed var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}
.add-row:hover { background: var(--accent-tint); border-color: var(--accent); }

/* Action bar buttons */
.actions-bar { border-top: none; padding-top: 24px; }
.btn {
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--paper-deep);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { background: #ffffff; transform: translateY(-2px); }
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #FAF6F0;
  box-shadow: 0 10px 24px rgba(46, 42, 40, 0.22);
}
.btn.primary:hover { background: var(--ink); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--paper-deep);
  color: var(--ink-mute);
}
.btn.ghost:hover { background: #ffffff; }

/* Reset: destructive outlined pill (muted red) */
#btn-reset, #reset,
.btn#btn-reset, .btn.ghost#btn-reset {
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--danger-border);
  color: var(--danger);
}
#btn-reset:hover, #reset:hover {
  background: var(--danger-bg-hover);
  border-color: var(--danger-border-hover);
}

/* Next-step CTA */
.next-step {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 22px;
  padding: 26px 28px;
}
.next-step-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.015em;
}
.next-step-title em {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

/* Footer */
footer.bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 14px;
  color: var(--ink-mute);
}
footer.bottom a { color: var(--accent); font-weight: 600; }

/* Saved-sessions dropdown */
.sessions-list {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(94, 58, 76, 0.16);
}
.session-item:hover { background: #F3ECE1; }

/* Keep print/PDF exports clean */
@media print {
  body { background: white; }
}
