  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
    padding: 32px 16px;
  }

  h1 {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .site-title {
    cursor: pointer;
    transition: opacity 0.15s;
  }

  .site-title:hover { opacity: 0.8; }

  h1 span {
    background: #33334d;
    color: #ffffff;
    padding: 3px 12px;
    border-radius: 8px;
    letter-spacing: 0;
  }

  .byline {
    text-align: center;
    font-size: 0.8rem;
    color: #58667c;
    margin-bottom: 12px;
  }

  .byline a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: none;
  }

  .byline a:hover { text-decoration: underline; }

  .lang-picker-wrap {
    position: relative;
    display: flex;
    justify-content: flex-end;
    max-width: 860px;
    margin: 0 auto 10px;
  }

  .lang-btn {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lang-btn:hover { background: #f8fafc; }

  .lang-menu {
    display: none;
    position: absolute;
    top: 38px;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 50;
    min-width: 170px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
  }

  html[dir="rtl"] .lang-menu { right: auto; left: 0; }
  html[dir="rtl"] .lang-picker-wrap { justify-content: flex-start; }
  html[dir="rtl"] .lang-option { text-align: right; }
  html[dir="rtl"] body { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }

  .lang-menu.open { display: block; }

  .lang-option {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1a1a2e;
    cursor: pointer;
  }

  .lang-option-flag {
    display: inline-block;
    margin-right: 6px;
    font-size: 0.95rem;
  }

  html[dir="rtl"] .lang-option-flag { margin-right: 0; margin-left: 6px; }

  .lang-option:hover { background: #f1f5f9; }

  .lang-option.active {
    background: #33334d;
    color: #fff;
    font-weight: 600;
  }

  /* ═══════════════════════════════
     LANDING / ABOUT SCREEN
  ═══════════════════════════════ */

  #screen-about {
    max-width: 560px;
    margin: 0 auto;
  }

  .about-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 16px;
  }

  .about-intro {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 16px;
  }

  .about-intro strong { color: #1a1a2e; }

  .source-callout {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #1e3a8a;
    line-height: 1.6;
    margin-bottom: 24px;
    text-wrap: balance;
    text-align: center;
  }

  .source-callout strong { color: #1e3a8a; font-weight: 700; }

  .source-callout.callout-yellow {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
  }

  .source-callout.callout-yellow strong { color: #92400e; }

  .about-question {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
    text-align: center;
  }

  .about-btns {
    display: flex;
    gap: 12px;
  }

  .btn-yes {
    flex: 1;
    padding: 12px;
    background: #33334d;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(51,51,77,0.3);
    transition: background 0.15s, transform 0.1s;
  }

  .btn-yes:hover { background: #1a1a2e; }
  .btn-yes:active { transform: scale(0.97); }

  .btn-no {
    flex: 1;
    padding: 12px;
    background: #fff;
    color: #374151;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
  }

  .btn-no:hover { background: #f8fafc; }
  .btn-no:active { transform: scale(0.97); }

  /* How-to guide (hidden by default) */
  #howto {
    display: none;
    margin-top: 20px;
  }

  #howto.visible { display: block; }

  .howto-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  .howto-card h2 {
    font-size: 1rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 18px;
  }

  .step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: flex-start;
  }

  .step-num {
    width: 28px; height: 28px;
    min-width: 28px;
    background: #33334d;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
  }

  .step-body {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.6;
    padding-top: 4px;
    text-wrap: balance;
  }

  .step-body strong { color: #1a1a2e; }

  .step-body a {
    color: #1a1a2e;
    font-weight: 600;
    word-break: break-all;
  }

  .step-body .note {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #94a3b8;
  }

  .howto-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 0 20px;
  }

  .btn-have-it-now {
    width: 100%;
    padding: 12px;
    background: #33334d;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(51,51,77,0.3);
    transition: background 0.15s, transform 0.1s;
  }

  .btn-have-it-now:hover { background: #1a1a2e; }
  .btn-have-it-now:active { transform: scale(0.97); }

  /* ═══════════════════════════════
     TOOL SCREEN
  ═══════════════════════════════ */

  #screen-tool { display: none; }

  .tool-header {
    text-align: center;
    margin-bottom: 20px;
  }

  .tool-header p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 4px;
  }

  .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 16px;
    text-decoration: underline;
  }

  .btn-back:hover { color: #1a1a2e; }

  .privacy-note {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 7px 16px;
    max-width: 420px;
    margin: 0 auto 24px;
    line-height: 1.6;
  }

  .lists-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto 20px;
  }

  .list-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  .list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .list-badge {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem;
    flex-shrink: 0;
  }

  .badge-a { background: #33334d; color: #ffffff; }
  .badge-b { background: #ffffff; color: #33334d; border: 2px solid #33334d; }

  .list-name-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
  }

  .drop-zone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 10px;
  }

  .drop-zone:hover, .drop-zone.drag-over {
    border-color: #33334d;
    background: #eef0fd;
  }

  .drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
  }

  .dz-icon { font-size: 1.6rem; margin-bottom: 6px; }

  .dz-text {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.5;
  }

  .dz-text span {
    color: #1a1a2e;
    font-weight: 700;
    text-decoration: underline;
  }

  .drop-zone.has-file {
    border-style: solid;
    border-color: #33334d;
    background: #eef0fd;
  }

  .drop-zone.has-file .dz-text { color: #3730a3; }

  .file-status {
    font-size: 0.75rem;
    margin-top: 4px;
    min-height: 1.2em;
    color: #1a1a2e;
    font-weight: 600;
  }

  .file-status.error { color: #dc2626; }

  textarea {
    width: 100%;
    height: 110px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    resize: vertical;
    color: #374151;
    background: #fafafa;
    outline: none;
    transition: border-color 0.15s;
  }

  textarea:focus { border-color: #33334d; background: #fff; }

  .or-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
  }

  .hint { font-size: 0.75rem; color: #94a3b8; margin-top: 5px; }

  .actions {
    max-width: 860px;
    margin: 0 auto 24px;
    display: flex;
    gap: 10px;
    justify-content: center;
  }

  button { transition: transform 0.1s; }
  button:active { transform: scale(0.97); }

  .btn-compare {
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: #33334d;
    color: #fff;
    box-shadow: 0 2px 8px rgba(51,51,77,0.35);
  }

  .btn-compare:hover { background: #1a1a2e; }

  .btn-clear {
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
  }

  .btn-clear:hover { background: #f8fafc; }

  /* Results */
  .link-tip {
    max-width: 860px;
    margin: 0 auto 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3730a3;
    text-align: center;
  }

  /* ═══════════════════════════════════════════════
     CALLOUT BOXES — reusable across the whole site.
     Base class: .callout-box
     Color variants: .warning-box (yellow), .info-box (blue),
     .alert-box (red), .success-box (green)
     Usage: <div class="callout-box warning-box"><p>...</p></div>
  ═══════════════════════════════════════════════ */
  .callout-box {
    display: block;
    max-width: 860px;
    margin: 0 auto 16px;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
  }

  .callout-box p {
    margin: 4px 0;
  }

  .warning-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
  }

  .info-box {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #1e3a8a;
  }

  .alert-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
  }

  .success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
  }

  /* Legacy aliases so existing markup keeps working */
  .results-disclaimer { max-width: 860px; margin: 0 auto 16px; border-radius: 8px; padding: 10px 16px; font-size: 0.8rem; line-height: 1.5; text-align: center; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
  .results-disclaimer.all-good { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
  .results-disclaimer.info-blue { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
  .results-disclaimer p { margin: 4px 0; }

  .results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto;
  }

  .feedback-box {
    max-width: 860px;
    margin: 24px auto 0;
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  .feedback-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
  }

  .feedback-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 16px;
  }

  .feedback-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.88rem;
    color: #374151;
    background: #fafafa;
    outline: none;
    margin-bottom: 10px;
    font-family: inherit;
  }

  .feedback-input:focus { border-color: #33334d; background: #fff; }

  .feedback-textarea {
    width: 100%;
    height: 90px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #374151;
    background: #fafafa;
    outline: none;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 12px;
  }

  .feedback-textarea:focus { border-color: #33334d; background: #fff; }

  .btn-feedback-send {
    padding: 9px 24px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: #33334d;
    color: #fff;
  }

  .btn-feedback-send:hover { background: #1a1a2e; }

  .feedback-note {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 10px;
  }

  .feedback-status {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    min-height: 1.2em;
  }

  .feedback-status.success { color: #166534; }
  .feedback-status.error { color: #dc2626; }

  .btn-feedback-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .result-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-self: start;
  }

  .result-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 12px;
    color: #94a3b8;
  }

  .link-list-wrapper { position: relative; flex: 1; }

  .link-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .link-list.collapsed { max-height: 290px; }
  .link-list.expanded  { max-height: 99999px; }

  .fade-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
    transition: opacity 0.25s;
  }

  .fade-overlay.hidden { opacity: 0; }

  .ig-link {
    display: block;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s;
    word-break: break-all;
    flex-shrink: 0;
  }

  .ig-link-a { color: #1d4ed8; background: #f5f8ff; }
  .ig-link-a:hover { background: #dbeafe; }
  .ig-link-b { color: #166534; background: #f0fdf4; }
  .ig-link-b:hover { background: #dcfce7; }

  .empty-msg { font-size: 0.85rem; color: #94a3b8; font-style: italic; }

  .count-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 6px;
  }

  .btn-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #33334d;
    background: #fff;
    color: #33334d;
    width: 100%;
    letter-spacing: 0.01em;
  }

  .btn-expand:hover { background: #33334d; color: #fff; }

  .btn-expand .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1rem;
    line-height: 1;
  }

  .btn-expand.is-expanded .arrow { transform: rotate(180deg); }

  .btn-export {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #374151;
    width: 100%;
  }

  .btn-export:hover { background: #f1f5f9; }

  @media (max-width: 560px) {
    .lists-row, .results { grid-template-columns: 1fr; }
    .about-btns { flex-direction: column; }
    textarea, .feedback-input, .feedback-textarea { font-size: 16px; }
  }
