/**
 * Remove Duplicate Lines — SarkariResizer
 * 
 * Extracted from: deepseek_html_20261002_25b0ff.html
 * 
 * 100% CSS preserved. No changes to:
 *   - Class names (sr-rdl-*)
 *   - Colors, spacing, typography
 *   - Responsive breakpoints
 *   - Preset button styling
 * 
 * Scoped to: .sr-rdl (tool root)
 * 
 * Requires: remove-duplicate-lines.php partial + remove-duplicate-lines.js
 */

/* ===== RESET & TOKENS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sr-indigo: #4F46E5;
  --sr-indigo-dark: #4338CA;
  --sr-indigo-soft: rgba(79,70,229,.10);
  --sr-indigo-tint: #EEF2FF;
  --sr-indigo-border: rgba(79,70,229,.24);

  --sr-text-primary: #18181B;
  --sr-text-secondary: #3F3F46;
  --sr-text-tertiary: #71717A;
  --sr-text-quaternary: #A1A1AA;

  --sr-bg-alt: #FAFAFB;
  --sr-bg-tint: #F4F4F5;
  --sr-border: #E4E4E7;
  --sr-border-soft: #EFEFF1;

  --sr-success: #16A34A;
  --sr-error: #DC2626;
  --sr-warning: #D97706;

  --sr-radius-card: 14px;
  --sr-radius-input: 12px;
  --sr-radius-btn: 11px;
  --sr-shadow-card: 0 1px 3px rgba(0,0,0,.03), 0 4px 16px rgba(0,0,0,.02);
  --sr-shadow-focus: 0 0 0 3px var(--sr-indigo-soft);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ============================================================
   SCOPED TOOL WRAPPER
============================================================ */
.sr-rdl {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--sr-text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* BREADCRUMB */
.sr-rdl-breadcrumb {
  font-size: 12px; color: var(--sr-text-tertiary);
  margin-bottom: 10px; font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.sr-rdl-breadcrumb a { color: var(--sr-text-tertiary); text-decoration: none; transition: color .15s ease; }
.sr-rdl-breadcrumb a:hover { color: var(--sr-indigo); }
.sr-rdl-breadcrumb .sr-rdl-sep { color: var(--sr-text-quaternary); }
.sr-rdl-breadcrumb .sr-rdl-current { color: var(--sr-indigo); }

/* HEADER */
.sr-rdl-head { text-align: center; margin-bottom: 22px; }
.sr-rdl-head h1 {
  font-size: 26px; font-weight: 800;
  letter-spacing: -.03em; color: var(--sr-text-primary);
  margin-bottom: 6px;
}
.sr-rdl-head p {
  font-size: 13.5px; color: var(--sr-text-tertiary);
  font-weight: 500; max-width: 620px; margin: 0 auto;
}

/* CARD */
.sr-rdl-card {
  background: #fff;
  border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius-card);
  padding: 20px;
  box-shadow: var(--sr-shadow-card);
  margin-bottom: 16px;
}

/* SECTION TITLE */
.sr-rdl-section-title {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sr-text-quaternary);
  margin-bottom: 10px;
}

/* LABEL */
.sr-rdl-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sr-text-quaternary);
  display: block; margin-bottom: 8px;
}

/* TEXTAREA */
.sr-rdl-textarea {
  width: 100%; min-height: 240px; max-height: 500px;
  border: 1.5px solid var(--sr-border);
  border-radius: var(--sr-radius-input);
  padding: 14px 16px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.7;
  color: var(--sr-text-primary); background: #fff;
  resize: vertical; transition: border-color .15s ease, box-shadow .15s ease;
  outline: none; overflow-y: auto;
}
.sr-rdl-textarea::placeholder { color: var(--sr-text-quaternary); font-family: inherit; }
.sr-rdl-textarea:focus { border-color: var(--sr-indigo); box-shadow: var(--sr-shadow-focus); }
.sr-rdl-textarea[readonly] { background: var(--sr-bg-alt); }

/* OUTPUT HEADER */
.sr-rdl-output-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.sr-rdl-output-head-left {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* DEDUP BADGE */
.sr-rdl-badge {
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(22,163,74,.10);
  color: var(--sr-success);
  letter-spacing: .02em;
  transition: all .2s ease;
}
.sr-rdl-badge.sr-rdl-neutral {
  background: var(--sr-bg-tint);
  color: var(--sr-text-tertiary);
}
.sr-rdl-badge.sr-rdl-warn {
  background: rgba(217,119,6,.12);
  color: var(--sr-warning);
}

/* MINI BUTTONS */
.sr-rdl-mini-btn {
  height: 36px; padding: 0 12px; border-radius: 8px;
  font-family: inherit; font-size: 11.5px; font-weight: 800;
  cursor: pointer; border: 1px solid var(--sr-border);
  background: #fff; color: var(--sr-text-secondary);
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s ease; white-space: nowrap;
}
.sr-rdl-mini-btn:hover {
  border-color: var(--sr-indigo); color: var(--sr-indigo);
  background: var(--sr-indigo-tint);
}
.sr-rdl-mini-btn:focus-visible {
  outline: none; border-color: var(--sr-indigo);
  box-shadow: var(--sr-shadow-focus);
}
.sr-rdl-mini-btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.sr-rdl-mini-btn.sr-rdl-success {
  border-color: var(--sr-success); color: var(--sr-success);
  background: rgba(22,163,74,.08);
}
.sr-rdl-mini-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

/* OPTIONS GRID */
.sr-rdl-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.sr-rdl-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--sr-bg-alt);
  border: 1.5px solid var(--sr-border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
  min-height: 48px;
}
.sr-rdl-option:hover {
  border-color: var(--sr-indigo-border);
  background: var(--sr-indigo-tint);
}
.sr-rdl-option.sr-rdl-checked {
  border-color: var(--sr-indigo);
  background: var(--sr-indigo-tint);
}
.sr-rdl-option:focus-within {
  border-color: var(--sr-indigo);
  box-shadow: var(--sr-shadow-focus);
}
.sr-rdl-option input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--sr-indigo);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.sr-rdl-option-info {
  display: flex; flex-direction: column; gap: 0;
  min-width: 0; line-height: 1.35;
}
.sr-rdl-option-name {
  font-size: 12.5px; font-weight: 800;
  color: var(--sr-text-primary);
  letter-spacing: -.01em;
}
.sr-rdl-option-desc {
  font-size: 11px; font-weight: 600;
  color: var(--sr-text-tertiary);
  line-height: 1.3;
}

/* PRESETS */
.sr-rdl-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.sr-rdl-preset-btn {
  height: 40px; padding: 0 10px; border-radius: 10px;
  font-family: inherit; font-size: 12px; font-weight: 800;
  cursor: pointer; border: 1.5px solid var(--sr-border);
  background: #fff; color: var(--sr-text-secondary);
  transition: all .15s ease;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; white-space: nowrap;
  min-width: 0; overflow: hidden;
}
.sr-rdl-preset-btn span.sr-rdl-preset-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-rdl-preset-btn:hover {
  border-color: var(--sr-indigo); color: var(--sr-indigo);
  background: var(--sr-indigo-tint);
}
.sr-rdl-preset-btn:focus-visible {
  outline: none; box-shadow: var(--sr-shadow-focus);
}
.sr-rdl-preset-btn.sr-rdl-active {
  border-color: var(--sr-indigo);
  background: var(--sr-indigo);
  color: #fff;
}
.sr-rdl-preset-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

/* STATS */
.sr-rdl-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.sr-rdl-stat {
  background: var(--sr-bg-alt);
  border: 1px solid var(--sr-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.sr-rdl-stat-label {
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--sr-text-quaternary);
}
.sr-rdl-stat-value {
  font-size: 18px; font-weight: 800; letter-spacing: -.02em;
  color: var(--sr-text-primary); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.sr-rdl-stat.sr-rdl-primary {
  background: linear-gradient(135deg, var(--sr-indigo-tint) 0%, #fff 100%);
  border-color: var(--sr-indigo-border);
}
.sr-rdl-stat.sr-rdl-primary .sr-rdl-stat-label { color: var(--sr-indigo); }
.sr-rdl-stat.sr-rdl-primary .sr-rdl-stat-value { color: var(--sr-indigo-dark); }

/* ACTIONS */
.sr-rdl-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 16px;
}
.sr-rdl-btn {
  height: 46px; padding: 0 20px; border-radius: var(--sr-radius-btn);
  font-family: inherit; font-size: 13px; font-weight: 800;
  cursor: pointer; border: 1.5px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; transition: all .15s ease; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sr-rdl-btn:focus-visible { outline: none; box-shadow: var(--sr-shadow-focus); }
.sr-rdl-btn-primary { background: var(--sr-indigo); color: #fff; }
.sr-rdl-btn-primary:hover {
  background: var(--sr-indigo-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,.28);
}
.sr-rdl-btn-secondary {
  background: #fff; color: var(--sr-text-secondary);
  border-color: var(--sr-border);
}
.sr-rdl-btn-secondary:hover {
  border-color: var(--sr-indigo); color: var(--sr-indigo);
  transform: translateY(-1px);
}
.sr-rdl-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.sr-rdl-btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* COLLAPSIBLE */
.sr-rdl-details {
  background: #fff; border: 1px solid var(--sr-border);
  border-radius: var(--sr-radius-card); margin-bottom: 12px;
  overflow: hidden; transition: border-color .15s ease;
}
.sr-rdl-details[open] { border-color: var(--sr-indigo-border); }
.sr-rdl-details > summary {
  list-style: none; cursor: pointer; padding: 16px 18px;
  font-size: 13.5px; font-weight: 800;
  color: var(--sr-text-primary);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; user-select: none; transition: color .15s ease;
}
.sr-rdl-details > summary::-webkit-details-marker { display: none; }
.sr-rdl-details > summary:hover { color: var(--sr-indigo); }
.sr-rdl-details > summary:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--sr-indigo-soft); }
.sr-rdl-details-title-wrap { display: flex; align-items: center; gap: 10px; }
.sr-rdl-details-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--sr-indigo-tint); color: var(--sr-indigo);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sr-rdl-details-icon svg { width: 15px; height: 15px; }
.sr-rdl-details-sub { font-size: 11px; font-weight: 600; color: var(--sr-text-tertiary); margin-top: 1px; }
.sr-rdl-chevron {
  width: 20px; height: 20px; color: var(--sr-text-quaternary);
  transition: transform .2s ease; flex-shrink: 0;
}
.sr-rdl-details[open] .sr-rdl-chevron { transform: rotate(180deg); color: var(--sr-indigo); }
.sr-rdl-details-body { padding: 16px 18px 18px; border-top: 1px solid var(--sr-border-soft); }

/* FAQ */
.sr-rdl-faq-body {
  font-size: 13.5px; color: var(--sr-text-secondary);
  line-height: 1.7; font-weight: 500;
}
.sr-rdl-faq-body p + p { margin-top: 8px; }
.sr-rdl-faq-body code {
  background: var(--sr-bg-tint); padding: 1px 6px;
  border-radius: 4px; font-size: 12.5px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

/* PRIVACY */
.sr-rdl-privacy {
  background: linear-gradient(135deg, rgba(22,163,74,.06) 0%, rgba(255,255,255,1) 100%);
  border: 1px solid rgba(22,163,74,.20);
  border-radius: var(--sr-radius-card);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.sr-rdl-privacy-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(22,163,74,.12); color: var(--sr-success);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sr-rdl-privacy-icon svg { width: 20px; height: 20px; }
.sr-rdl-privacy-text h3 {
  font-size: 13.5px; font-weight: 800;
  color: var(--sr-text-primary); margin-bottom: 2px;
}
.sr-rdl-privacy-text p {
  font-size: 12.5px; font-weight: 600;
  color: var(--sr-text-tertiary); line-height: 1.5;
}

/* TOAST */
.sr-rdl-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--sr-text-primary); color: #fff;
  font-size: 12.5px; font-weight: 700;
  padding: 11px 20px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 1001;
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 32px);
}
.sr-rdl-toast.sr-rdl-show {
  transform: translateX(-50%) translateY(0); opacity: 1;
}
.sr-rdl-toast svg { width: 15px; height: 15px; color: #4ADE80; flex-shrink: 0; }
.sr-rdl-toast.sr-rdl-toast-error svg { color: #F87171; }

/* IO GRID */
.sr-rdl-io-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}

/* RESPONSIVE */
@media (min-width: 640px) {
  .sr-rdl { padding: 24px; }
  .sr-rdl-card { padding: 26px; }
  .sr-rdl-head h1 { font-size: 32px; }
  .sr-rdl-options-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sr-rdl-option { padding: 10px 14px; }
  .sr-rdl-presets { grid-template-columns: repeat(4, 1fr); }
  .sr-rdl-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .sr-rdl-io-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 480px) {
  .sr-rdl-mini-btn { padding: 0 9px; }
  .sr-rdl-mini-btn .sr-rdl-mini-label { display: none; }
  .sr-rdl-preset-btn { font-size: 11px; padding: 0 8px; height: 38px; }
  .sr-rdl-preset-btn svg { width: 12px; height: 12px; }
}

@media (max-width: 400px) {
  .sr-rdl-option { padding: 8px 10px; min-height: 44px; gap: 8px; }
  .sr-rdl-option-name { font-size: 12px; }
  .sr-rdl-option-desc { font-size: 10.5px; }
  .sr-rdl-preset-btn { font-size: 11px; padding: 0 8px; height: 38px; }
  .sr-rdl-preset-btn svg { width: 12px; height: 12px; }
}

@media (max-width: 360px) {
  .sr-rdl { padding: 12px; }
  .sr-rdl-card { padding: 16px; }
}

@media (max-width: 340px) {
  .sr-rdl-preset-btn span.sr-rdl-preset-text { display: none; }
  .sr-rdl-preset-btn { padding: 0 6px; }
}