
    /* =============================
       Design Tokens (Light)
    ============================== */
    :root {
      --bg: #f4f7fb;
      --surface: #ffffff;
      --surface-muted: #f8fafc;
      --text: #0f172a;
      --text-muted: #475569;
      --line: #e2e8f0;
      --primary: #2563eb;
      --primary-2: #38bdf8;
      --success: #16a34a;
      --warning: #d97706;
      --danger: #dc2626;
      --radius-lg: 20px;
      --radius-md: 14px;
      --radius-sm: 10px;
      --space-1: 8px;
      --space-2: 12px;
      --space-3: 16px;
      --space-4: 24px;
      --shadow-card: 0 8px 28px rgba(15, 23, 42, 0.08);
      --shadow-hero: 0 28px 70px rgba(37, 99, 235, 0.25);
      --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.2);
    }

    /* =============================
       Dark Mode (Variables Only)
    ============================== */
    body.dark {
      --bg: #0b1220;
      --surface: #111b2e;
      --surface-muted: #17253b;
      --text: #e5e7eb;
      --text-muted: #94a3b8;
      --line: #26364f;
      --primary: #60a5fa;
      --primary-2: #22d3ee;
      --success: #22c55e;
      --warning: #f59e0b;
      --danger: #f87171;
      --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.34);
      --shadow-hero: 0 28px 70px rgba(2, 132, 199, 0.2);
      --focus-ring: 0 0 0 3px rgba(96, 165, 250, 0.24);
    }

    /* =============================
       Base
    ============================== */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    

    button, input, select {
      font: inherit;
      color: inherit;
    }

    .app {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      gap: var(--space-3);
    }

    .card {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-card);
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .card:hover {
      transform: translateY(-2px);
    }

    .muted {
      color: var(--text-muted);
      font-size: 0.86rem;
    }

    /* =============================
       Header
    ============================== */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-2);
    }

    .header h1 {
      font-size: clamp(1.4rem, 2.4vw, 2rem);
      letter-spacing: -0.02em;
      margin-bottom: 6px;
    }

    .theme-control {
      display: flex;
      align-items: center;
      gap: var(--space-1);
      color: var(--text-muted);
      font-size: 0.9rem;
      user-select: none;
    }

    .switch {
      width: 44px;
      height: 24px;
      display: inline-block;
      position: relative;
    }

    .switch input {
      width: 0;
      height: 0;
      opacity: 0;
    }

    .switch-slider {
      position: absolute;
      inset: 0;
      background: #cbd5e1;
      border-radius: 999px;
      transition: all 0.2s ease;
    }

    .switch-slider::before {
      content: "";
      position: absolute;
      width: 18px;
      height: 18px;
      left: 3px;
      top: 3px;
      border-radius: 50%;
      background: #fff;
      transition: transform 0.2s ease;
    }

    .switch input:checked + .switch-slider {
      background: var(--primary);
    }

    .switch input:checked + .switch-slider::before {
      transform: translateX(20px);
    }

    /* =============================
       Hero Result
    ============================== */
    .hero {
      padding: var(--space-4);
      text-align: center;
      position: relative;
      overflow: hidden;
      border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
      box-shadow: var(--shadow-hero);
      background:
        radial-gradient(circle at 85% 5%, rgba(56, 189, 248, 0.24), transparent 42%),
        radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.28), transparent 45%),
        var(--surface);
    }

    .hero .summary {
      font-size: clamp(1.7rem, 4.2vw, 2.6rem);
      font-weight: 800;
      letter-spacing: -0.025em;
      margin-bottom: 8px;
    }

    .hero .energy {
      font-size: clamp(1.2rem, 2.6vw, 1.8rem);
      font-weight: 700;
      color: var(--primary);
      margin-bottom: 6px;
    }

    .hero .config {
      display: inline-block;
      padding: 8px 14px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--primary) 18%, transparent);
      border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
      font-size: 0.9rem;
      font-weight: 700;
      letter-spacing: 0.03em;
    }

    /* =============================
       Main Layout
    ============================== */
    .layout {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: var(--space-3);
      align-items: start;
    }

    .stack {
      display: grid;
      gap: var(--space-3);
    }

    /* =============================
       Input Panel + Accordion
    ============================== */
    .panel {
      padding: var(--space-3);
    }

    .panel-title {
      font-size: 1rem;
      margin-bottom: var(--space-2);
    }

    .accordion {
      display: grid;
      gap: 10px;
    }

    .step {
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--surface-muted);
      overflow: hidden;
    }

    .step-header {
      width: 100%;
      border: 0;
      background: transparent;
      padding: 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      text-align: left;
      font-weight: 700;
    }

    .step-header:hover {
      background: color-mix(in srgb, var(--primary) 5%, transparent);
    }

    .step-num {
      display: inline-grid;
      place-items: center;
      width: 24px;
      height: 24px;
      margin-right: 8px;
      border-radius: 999px;
      border: 1px solid var(--line);
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .step-label {
      display: flex;
      align-items: center;
    }

    .step-body {
      max-height: 720px;
      opacity: 1;
      padding: 0 12px 12px;
      overflow: hidden;
      transition: max-height 0.26s ease, opacity 0.2s ease, padding 0.2s ease;
    }

    .step.collapsed .step-body {
      max-height: 0;
      opacity: 0;
      padding-top: 0;
      padding-bottom: 0;
    }

    .fields {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    label {
      display: block;
      margin-bottom: 6px;
      color: var(--text-muted);
      font-size: 0.82rem;
      font-weight: 600;
    }

    .input,
    .select {
      width: 100%;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .input:focus,
    .select:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: var(--focus-ring);
    }

    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .btn {
      border: 0;
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 0.88rem;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
    }

    .btn:hover {
      transform: translateY(-1px);
      filter: brightness(1.04);
    }

    .btn-primary {
      color: #fff;
      background: linear-gradient(135deg, var(--primary), var(--primary-2));
    }

    .btn-subtle {
      color: var(--text);
      background: var(--surface);
      border: 1px solid var(--line);
    }

    /* =============================
       Results Panel
    ============================== */
    .metric-section {
      padding: var(--space-3);
    }

    .metric-section h3 {
      margin-bottom: var(--space-2);
      font-size: 1rem;
    }

    .metrics {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 10px;
    }

    .metric {
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-muted);
      transition: border-color 0.2s ease, transform 0.2s ease;
    }

    .metric:hover {
      transform: translateY(-1px);
      border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
    }

    .metric-key {
      color: var(--text-muted);
      font-size: 0.74rem;
      margin-bottom: 5px;
      font-weight: 600;
    }

    .metric-value {
      font-size: 1.04rem;
      font-weight: 800;
      letter-spacing: -0.01em;
    }

    .warning-list {
      margin-top: 10px;
      display: grid;
      gap: 8px;
    }

    .warning {
      padding: 10px;
      border-radius: 10px;
      border: 1px solid transparent;
      font-size: 0.86rem;
      transition: transform 0.2s ease;
    }

    .warning:hover {
      transform: translateX(1px);
    }

    .warning.safe {
      color: var(--success);
      background: color-mix(in srgb, var(--success) 14%, transparent);
      border-color: color-mix(in srgb, var(--success) 36%, transparent);
    }

    .warning.medium {
      color: var(--warning);
      background: color-mix(in srgb, var(--warning) 14%, transparent);
      border-color: color-mix(in srgb, var(--warning) 36%, transparent);
    }

    .warning.high {
      color: var(--danger);
      background: color-mix(in srgb, var(--danger) 14%, transparent);
      border-color: color-mix(in srgb, var(--danger) 36%, transparent);
    }

    /* =============================
       Visualization Panel
    ============================== */
    .viz-card {
      padding: var(--space-3);
    }

    .viz-grid {
      margin-top: 10px;
      display: grid;
      gap: 4px;
      min-height: 140px;
    }

    .cell {
      border-radius: 6px;
      min-height: 15px;
      border: 1px solid color-mix(in srgb, var(--line) 80%, var(--text) 20%);
      background: linear-gradient(180deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.64));
      animation: pop 0.24s ease;
    }

    @keyframes pop {
      from { transform: scale(0.9); opacity: 0.48; }
      to { transform: scale(1); opacity: 1; }
    }

    .alternatives {
      margin-top: 10px;
      display: grid;
      gap: 8px;
    }

    .alt-item {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-muted);
      padding: 10px;
      font-size: 0.88rem;
    }

    /* =============================
       Responsive
    ============================== */
    @media (max-width: 980px) {
      .layout {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 640px) {
      body {
        padding: 14px;
      }

      .fields {
        grid-template-columns: 1fr;
      }

      .actions {
        flex-direction: column;
      }
    }
    
    
    
    
    /* מצב רגיל */
.layout {
  transition: all 0.3s ease;
}

/* מצב Fullscreen */
.layout.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;

  width: 100vw;
  height: 100vh;

  padding: 20px;
  background: var(--bg);

  overflow-y: auto; /* 👈 גלילה */
}

/* אופציונלי - מסתיר דברים מסביב */
body.fs-active .header,
body.fs-active .hero,
body.fs-active .embed-box,
body.fs-active .similar-tools,
body.fs-active .tool-legal,
body.fs-active .scroll-btn-wrapper {
  display: none;
}
  