/* ============================================================================
   DISHA · AI PRESENTATION PROMPT GENERATOR — STYLES
   ----------------------------------------------------------------------------
   DESIGN NOTE FOR INTEGRATION
   The live site at disha-info.netlify.app could only be inspected through its
   rendered content (its CSS/asset files were not directly reachable from this
   environment). What we do know for certain: the site declares a brand theme
   color of #0a2e6d (deep navy) in its metadata, and it presents as a clean,
   card-based youth-empowerment/education site with sliders, stat counters and
   rounded imagery. This stylesheet is built around that confirmed navy as the
   primary brand color, with a warm amber as a complementary accent (a common,
   high-trust pairing in education/NGO branding) and a soft, rounded, shadow-
   based card language.

   Every brand value lives in the :root variables below. If your real palette,
   font, radius or shadow values differ, update the variables here only — the
   rest of the file references them exclusively, so the whole page will adapt.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.tools-page {
  /* ---------- Brand tokens (confirm/adjust against live site) ---------- */
  --color-primary: #0a2e6d;        /* confirmed via site theme-color meta tag */
  --color-primary-dark: #071f4d;
  --color-secondary: #12428f;
  --color-accent: #f2a900;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fc;
  --color-text: #12213d;
  --color-text-muted: #5b6b85;
  --color-border: #e3e9f3;
  --color-success: #1c9d6c;
  --color-danger: #d64545;

  /* ---------- Type ---------- */
  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* ---------- Shape & elevation ---------- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(10, 46, 109, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 46, 109, 0.10);
  --shadow-lg: 0 20px 48px rgba(10, 46, 109, 0.16);

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-mid: 260ms;

  display: block;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 5vw, 64px) 80px;
  box-sizing: border-box;
}

.tools-page *,
.tools-page *::before,
.tools-page *::after { box-sizing: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .tools-page * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Visible, on-brand focus ring everywhere */
.tools-page :focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================== HEADER ============================== */
.tools-header {
  max-width: 900px;
  margin: 0 auto 36px;
  text-align: center;
}
.tools-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(242, 169, 0, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 14px;
}
.tools-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  color: var(--color-primary);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.tools-subtitle {
  color: var(--color-text-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  max-width: 720px;
  margin: 0 auto;
}

/* ============================== LAYOUT ============================== */
.tools-layout {
  display: grid;
  grid-template-columns: minmax(0, 35%) minmax(0, 65%);
  gap: 28px;
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
}

.config-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.studio-panel { min-width: 0; max-width: 100%; }
.studio-sticky {
  /* NOTE: intentionally NOT height-constrained and NOT overflow:auto here.
     Clipping this column produced the "scrollbar inside the right panel"
     and "prompt bleeding outside its card" issues — the sticky column now
     simply flows with page scroll like the left column does. */
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

/* Elegant thin scrollbars, on-brand (used by textarea + internal sub-lists only) */
.studio-textarea::-webkit-scrollbar,
.config-panel::-webkit-scrollbar,
.slide-outline::-webkit-scrollbar { width: 8px; }
.studio-textarea::-webkit-scrollbar-track,
.slide-outline::-webkit-scrollbar-track { background: transparent; }
.studio-textarea::-webkit-scrollbar-thumb,
.slide-outline::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}
.studio-textarea::-webkit-scrollbar-thumb:hover,
.slide-outline::-webkit-scrollbar-thumb:hover { background: var(--color-secondary); }

@media (max-width: 1080px) {
  .tools-layout { grid-template-columns: 45% 55%; gap: 20px; }
}
@media (max-width: 900px) {
  .tools-layout { grid-template-columns: 1fr; }
  .studio-sticky { position: static; }
}
@media (max-width: 600px) {
  .studio-textarea { min-height: 220px; }
  .action-row { flex-direction: column; align-items: stretch; }
  .action-row .btn { width: 100%; justify-content: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================== CARDS ============================== */
.config-card, .studio-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px clamp(16px, 2.4vw, 26px);
  transition: box-shadow var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
}

.config-card:hover, .studio-card:hover { box-shadow: var(--shadow-md); }

.config-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.config-card__icon {
  font-size: 1.15rem;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.config-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--color-primary);
  margin: 0;
}
.config-card__hint {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

/* Collapsible advanced-options card */
.config-card--collapsible { padding: 0; overflow: hidden; }
.config-card__head--toggle {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 22px clamp(16px, 2.4vw, 26px);
  margin: 0;
  font: inherit;
  text-align: left;
}
.config-card__head--toggle .chevron {
  margin-left: auto;
  transition: transform var(--dur-mid) var(--ease);
  color: var(--color-text-muted);
  font-size: 1.1rem;
}
.config-card__head--toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.config-card__body {
  padding: 0 clamp(16px, 2.4vw, 26px) 22px;
  display: grid;
  gap: 16px;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--dur-mid) var(--ease), opacity var(--dur-mid) var(--ease), padding var(--dur-mid) var(--ease);
}
.config-card__body--collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}
.config-card__body > * { min-height: 0; overflow: hidden; }

/* ============================== FIELDS ============================== */
.field { margin-bottom: 16px; position: relative; }
.field:last-child { margin-bottom: 0; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  margin-bottom: 16px;
}
@media (max-width: 480px) { .field-grid { grid-template-columns: 1fr; } }

.field__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.field__label--static { pointer-events: none; }

.field__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.field__input:hover { border-color: var(--color-border); }
.field__input:focus {
  border-color: var(--color-secondary);
  background: var(--color-bg);
  outline: none;
}
.field__input--textarea { resize: vertical; min-height: 52px; }

select.field__input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
                     linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* Floating label fields (Topic, Goal) */
.field--float .field__label {
  position: absolute;
  left: 13px; top: 12px;
  margin: 0;
  padding: 0 4px;
  background: transparent;
  transition: transform var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  transform-origin: left top;
}
.field--float .field__input { padding-top: 12px; }
.field--float .field__input:focus + .field__label,
.field--float .field__input:not(:placeholder-shown) + .field__label {
  transform: translateY(-19px) scale(0.82);
  color: var(--color-secondary);
  background: var(--color-bg);
}
.field--float:focus-within .field__input { background: var(--color-bg); }

/* Slider fields */
.field__slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.field__slider-value {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.86rem;
  background: var(--color-bg-alt);
  padding: 2px 10px;
  border-radius: 999px;
}
.field__range {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--color-secondary) var(--fill, 50%), var(--color-border) 0);
  outline: none;
}
.field__range::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-secondary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}
.field__range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.field__range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-secondary);
  cursor: pointer;
}

/* Radio row (pills) */
.field--radio-row { border: none; padding: 0; margin: 0 0 16px; }
.field--radio-row legend { padding: 0; margin-bottom: 8px; }
.radio-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; margin: 0 6px 6px 0;
  border-radius: 999px;
  background: var(--color-bg-alt);
  border: 1.5px solid transparent;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill:has(input:checked) {
  background: var(--color-primary);
  color: #fff;
}
.radio-pill:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.radio-pill:hover { border-color: var(--color-secondary); }

/* Chips (single + multi select) */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  user-select: none;
}
.chip:hover { border-color: var(--color-secondary); transform: translateY(-1px); }
.chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.chip:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Color pickers */
.color-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.color-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 0.74rem;
  color: var(--color-text-muted);
  cursor: pointer;
}
.color-swatch input[type="color"] {
  width: 40px; height: 40px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: none;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.color-swatch input[type="color"]:hover { transform: scale(1.06); }
.color-swatch input[type="color"]:focus-visible { border-color: var(--color-accent); }

.palette-preview {
  display: flex; height: 44px; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.palette-preview span { flex: 1; transition: background var(--dur-fast) var(--ease); }

/* Checkbox grid (Include Options) */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 480px) { .checkbox-grid { grid-template-columns: 1fr; } }

.checkbox-tile {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--dur-fast) var(--ease);
}
.checkbox-tile--wide { grid-column: 1 / -1; }
.checkbox-tile:hover { border-color: var(--color-secondary); background: var(--color-bg-alt); }
.checkbox-tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-tile__box {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px;
  border-radius: 5px;
  border: 2px solid var(--color-border);
  position: relative;
  transition: all var(--dur-fast) var(--ease);
}
.checkbox-tile input:checked ~ .checkbox-tile__box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.checkbox-tile input:checked ~ .checkbox-tile__box::after {
  content: "";
  position: absolute; left: 5px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-tile input:focus-visible ~ .checkbox-tile__box { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.checkbox-tile:has(input:checked) { border-color: var(--color-primary); background: rgba(10, 46, 109, 0.04); }

/* Preset grid */
.preset-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-btn {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.preset-btn:hover { background: var(--color-primary); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.preset-btn:active { transform: translateY(0); }
.preset-btn.is-selected { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-primary-dark); }

/* Ripple effect shared by buttons/chips */
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.55); transform: scale(0); animation: ripple 550ms var(--ease); pointer-events: none; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ============================== STUDIO PANEL ============================== */
.studio-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.studio-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--color-primary); margin: 0 0 4px; }
.studio-card__hint { font-size: 0.82rem; color: var(--color-text-muted); margin: 0; }

.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 700; color: var(--color-success);
  background: rgba(28, 157, 108, 0.1);
  padding: 5px 10px; border-radius: 999px;
  flex-shrink: 0;
}
.live-dot__pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--color-success);
  animation: pulse 1.6s infinite var(--ease);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28,157,108,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(28,157,108,0); }
}

.studio-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 340px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  resize: vertical;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  transition: border-color var(--dur-fast) var(--ease);
}
.studio-textarea:focus { border-color: var(--color-secondary); outline: none; }

/* Belt-and-braces: no descendant of a card should ever exceed its box */
.config-card, .studio-card { overflow: hidden; }
.config-card__body, .studio-card > * { max-width: 100%; }

.studio-edited-note {
  font-size: 0.8rem; color: var(--color-accent);
  margin: 10px 0 0;
  display: flex; align-items: center; gap: 6px;
}
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--color-secondary); font-weight: 700; text-decoration: underline;
  cursor: pointer; font-size: inherit;
}

.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { background: var(--color-bg-alt); color: var(--color-primary); border-color: var(--color-border); }
.btn--ghost:hover { border-color: var(--color-secondary); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Slide outline list */
.slide-outline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; }
.slide-outline__item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-secondary);
  animation: slide-in var(--dur-mid) var(--ease) both;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }
.slide-outline__num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.slide-outline__title { font-weight: 700; font-size: 0.88rem; color: var(--color-text); margin: 0 0 2px; overflow-wrap: anywhere; }
.slide-outline__meta { font-size: 0.78rem; color: var(--color-text-muted); margin: 0; overflow-wrap: anywhere; }
.slide-outline__item > div { min-width: 0; }

/* ============================== SLIDE CONTENT EDITOR ============================== */
/* No internal max-height/scroll here on purpose: the parent card is collapsible
   (see .config-card--collapsible), so a long list simply expands the card in place
   rather than scrolling inside a small box.
   The grid (rather than a single flex column) also lets items sit side-by-side
   once the config panel is wide enough, instead of one big vertical stack. */
.slide-content-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.slide-content-item {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  padding: 10px;
  min-width: 0;
  animation: slide-in var(--dur-mid) var(--ease) both;
}
.slide-content-item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.slide-content-item__num {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.slide-content-item__label { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--color-primary); }

/* Compact field variant used only inside each slide-content card: tighter padding
   and a shorter bullets box than the standard .field--float used elsewhere. */
.slide-content-item .field { margin-bottom: 8px; }
.slide-content-item .field:last-child { margin-bottom: 0; }
.slide-content-item .field__input {
  background: var(--color-bg);
  padding: 8px 10px;
  font-size: 0.82rem;
}
.slide-content-item .field--float .field__input { padding-top: 9px; }
.slide-content-item .field--float .field__label { font-size: 0.78rem; left: 10px; top: 8px; }
.slide-content-item .field--float .field__input:focus + .field__label,
.slide-content-item .field--float .field__input:not(:placeholder-shown) + .field__label {
  transform: translateY(-16px) scale(0.82);
}
.slide-content-item .field__input--textarea { min-height: 40px; }

@media (max-width: 480px) {
  .slide-content-list { grid-template-columns: 1fr; }
}

.field__slider-toggle { margin-top: 12px; }

/* Empty state */
.empty-state { text-align: center; padding: 24px 12px; color: var(--color-text-muted); font-size: 0.85rem; }
.empty-state__icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }

/* Analytics */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 480px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}
.stat__value { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--color-primary); }
.stat__label { font-size: 0.72rem; color: var(--color-text-muted); }

.score-list { display: flex; flex-direction: column; gap: 12px; }
.score-row__head { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 6px; }
.score-row__head span:last-child { font-weight: 700; color: var(--color-primary); }
.score-bar { height: 8px; border-radius: 999px; background: var(--color-border); overflow: hidden; }
.score-bar__fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  width: 0%;
  transition: width 700ms var(--ease);
}

/* Toasts — compact "icon + label" cards, readable on any host-page background,
   auto-dismiss without ever occupying layout space (fixed position). */
.toast-region {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column-reverse; gap: 10px;
  z-index: 999;
  pointer-events: none; /* clicks pass through the empty region; toasts re-enable below */
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 11px 16px 11px 11px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  font-weight: 600;
  max-width: 320px;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.toast.is-leaving { opacity: 0; transform: translateY(6px) scale(0.97); }

.toast__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 46, 109, 0.1);
  color: var(--color-primary);
}
.toast__icon svg { width: 15px; height: 15px; }
.toast--success .toast__icon { background: rgba(28, 157, 108, 0.14); color: var(--color-success); }
.toast--error .toast__icon { background: rgba(214, 69, 69, 0.14); color: var(--color-danger); }
.toast__text { line-height: 1.3; }

@media (max-width: 480px) {
  .toast-region { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
}

/* Print: show only the prompt text cleanly */
@media print {
  body * { visibility: hidden; }
  .studio-textarea, .studio-textarea * { visibility: visible; }
  .studio-textarea {
    position: absolute; left: 0; top: 0; width: 100%; border: none; min-height: auto; background: #fff;
    box-shadow: none;
  }
}

.preview-footnote{ font-size:.75rem; color: var(--ink-faint); text-align:center; display:flex; gap:6px; align-items:center; justify-content:center;}
