/* ===== style.css ===== */
*{box-sizing:border-box}body{margin:0;background:#eef3fb;color:#111827;font-family:Arial,Helvetica,sans-serif}.page{width:min(1500px,calc(100% - 24px));margin:0 auto;padding:14px 0 32px}.topbar{color:white;border-radius:18px;padding:18px;box-shadow:0 14px 32px rgba(15,23,42,.22)}.topbar h1{margin:0;font-size:27px}.topbar p{margin:6px 0 0;color:#dbeafe}.site-nav{display:flex;gap:5px;flex-wrap:wrap;margin:14px 0}.site-nav a{background:#fff;border:1px solid #dbe3ef;color:#172554;text-decoration:none;padding:7px 10px;border-radius:999px;font-weight:900;font-size:12px}.site-nav a.active,.site-nav a.nav-image.active{background:#dcfce7;border-color:#86efac;color:#166534}.site-nav a.nav-image{background:#fce7f3;border-color:#f9a8d4;color:#9d174d}.site-nav a.nav-image:hover{background:#fbcfe8}.site-nav a:hover{background:#dbeafe}

/* Red file input button */
input[type="file"]::file-selector-button{background:#dc2626;color:#fff;border:1px solid #b91c1c;border-radius:8px;padding:6px 14px;font-weight:900;font-size:12px;cursor:pointer;transition:background .15s}
input[type="file"]::file-selector-button:hover{background:#ef4444}.tool-card,.card,.result-card,.seo-content{background:#fff;border:1px solid #dbe3ef;border-radius:16px;box-shadow:0 8px 20px rgba(15,23,42,.08);overflow:hidden}.tool-header{padding:14px;display:flex;justify-content:space-between;gap:12px;align-items:center;background:#f8fafc;border-bottom:1px solid #dbe3ef}.tool-header h2,.result-header h2{margin:0;color:#172554}.tool-header p{margin:4px 0 0;color:#64748b}.tool-actions,.result-actions{display:flex;gap:8px;flex-wrap:wrap}button{border:0;background:#2563eb;color:white;padding:10px 15px;border-radius:11px;font-weight:900;cursor:pointer;box-shadow:0 8px 18px rgba(37,99,235,.25)}button:hover{background:#1d4ed8}button.btn-light{background:#e5e7eb;color:#111827;box-shadow:none}button.btn-light:hover{background:#d1d5db}.options-card{display:flex;gap:14px;flex-wrap:wrap;padding:12px;border-bottom:1px solid #dbe3ef}.options-card label{font-size:13px;font-weight:800;color:#334155}.summary-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:12px}.summary-card{border:1px solid #dbe3ef;border-radius:14px;padding:12px;background:#fff}.summary-card span{display:block;font-size:12px;color:#64748b;font-weight:900;margin-bottom:5px;text-transform:uppercase}.summary-card b{font-size:24px}.summary-card.added b{color:#16a34a}.summary-card.removed b{color:#dc2626}.summary-card.changed b{color:#ca8a04}.summary-card.same b{color:#475569}.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:0 12px 12px}.card-title{min-height:56px;padding:10px 12px;background:#f8fafc;border-bottom:1px solid #dbe3ef;display:flex;align-items:center;justify-content:space-between;gap:12px}.card-title strong{display:block;color:#334155}.card-title small{display:block;color:#64748b;font-size:11px;margin-top:3px}.card-title input{max-width:240px;font-size:12px}textarea{width:100%;height:300px;resize:vertical;border:0;outline:none;padding:12px;font-size:14px;line-height:1.45;font-family:Consolas,Monaco,monospace}.result-actions{padding:0 12px 12px}.result-card{margin:0 12px 12px}.result-header{padding:12px;background:#f8fafc;border-bottom:1px solid #dbe3ef;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:12px;font-weight:800;color:#475569}.lg{display:inline-block;width:13px;height:13px;border-radius:4px;vertical-align:middle;margin-right:4px;border:1px solid #cbd5e1}.lg.added{background:#dcfce7}.lg.removed{background:#fee2e2}.lg.changed{background:#fef3c7}.lg.same{background:#f8fafc}.status-pill{padding:5px 9px;background:#e5e7eb;color:#334155;border-radius:999px;font-size:12px;font-weight:900}.difference-table-wrap{overflow:auto;max-height:520px}.difference-table{width:100%;border-collapse:collapse;table-layout:fixed;font-family:Consolas,Monaco,monospace;font-size:13px}.difference-table th{position:sticky;top:0;z-index:3;background:#334155;color:#fff;padding:8px;text-align:left;border:1px solid #475569}.difference-table td{border:1px solid #e5e7eb;padding:7px 8px;vertical-align:top;white-space:pre-wrap;word-break:break-word}.line-col{width:80px;text-align:center!important;font-weight:900}td.line-col{background:#f8fafc;color:#64748b}tr.added-row td.new-cell{background:#dcfce7}tr.added-row td.old-cell,tr.removed-row td.new-cell{background:#f8fafc;color:#94a3b8}tr.removed-row td.old-cell{background:#fee2e2}tr.changed-row td.text-cell{background:#fef3c7}.empty{padding:24px!important;text-align:center;font-family:Arial,Helvetica,sans-serif;color:#64748b}.only-difference{padding:12px;min-height:120px;max-height:480px;overflow:auto;font-family:Consolas,Monaco,monospace;font-size:13px;line-height:1.45}.difference-item{border:1px solid #dbe3ef;border-radius:13px;overflow:hidden;margin-bottom:10px}.difference-item-title{padding:8px 10px;background:#f8fafc;color:#334155;font-family:Arial,Helvetica,sans-serif;font-weight:900;font-size:12px;border-bottom:1px solid #dbe3ef}.difference-line{padding:8px 10px;white-space:pre-wrap;word-break:break-word}.difference-line.old{background:#fee2e2}.difference-line.new{background:#dcfce7}mark{background:#facc15;color:#111827;border-radius:4px;padding:0 2px}.seo-content{margin-top:16px;padding:20px;line-height:1.65}.seo-content h2{margin:20px 0 8px;color:#172554;font-size:21px}.seo-content h2:first-child{margin-top:0}.seo-content h3{margin:15px 0 6px;color:#334155;font-size:17px}.seo-content p,.seo-content li{color:#334155;font-size:14px}.keyword-list{columns:2;gap:28px}@media(max-width:900px){.tool-header{flex-direction:column;align-items:flex-start}.summary-grid{grid-template-columns:repeat(2,1fr)}.editor-grid{grid-template-columns:1fr}textarea{height:230px}.keyword-list{columns:1}}@media(max-width:520px){.summary-grid{grid-template-columns:1fr}.card-title{flex-direction:column;align-items:flex-start}.card-title input{max-width:100%}}

/* DifferencePilot logo header */
.brand-topbar{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:144px;
  padding:18px;
  background:
    radial-gradient(circle at 16% 12%, rgba(34,211,238,.28), transparent 26%),
    linear-gradient(135deg,#8999eb 0%,#a9a9a5 48%,#0284c7 100%);
}
.brand-topbar::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,0) 46%);
  pointer-events:none;
}
.brand-topbar::after{
  content:"";
  position:absolute;
  right:-110px;
  top:-110px;
  width:280px;
  height:280px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  pointer-events:none;
}

/* ===== DifferencePilot logo fix - bigger logo without increasing top bar height ===== */
.brand-logo{
  position:relative;
  z-index:1;
  flex:0 0 520px;
  width:580px;
  max-width:100%;
  height:108px;
  min-height:0!important;
  padding:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.brand-logo img{
  width:280px;
  max-width:none;
  height:auto;
  max-height:none;
  display:block;
  object-fit:contain;
  transform:scale(1.85);
  transform-origin:center center;
}
.brand-copy{
  position:relative;
  z-index:1;
  flex:1 1 auto;
  max-width:620px;
  text-align:right;
}
.brand-copy h1{
  margin:0;
  color:#fff;
  font-size:30px;
  line-height:1.1;
  letter-spacing:-.5px;
}
.brand-copy p{
  margin:8px 0 0;
  color:#dff7ff;
  font-size:14px;
  line-height:1.45;
}

/* duplicate mobile logo rules removed - see FINAL MOBILE OVERRIDE at bottom */
/* ===== Mobile performance + layout optimization ===== */
@media (max-width: 768px) {
  .page {
    width: 100%;
    max-width: 100%;
    padding: 8px 7px 20px;
    overflow-x: hidden;
  }

  .brand-topbar {
    min-height: auto !important;
    padding: 16px 12px !important;
    gap: 8px;
    border-radius: 12px;
    align-items: center !important;
    flex-direction: column !important;
    text-align: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .brand-logo {
    width: 100% !important;
    max-width: 100% !important;
    height: 108px !important;
    flex: none !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .brand-logo img {
    width: 580px !important;
    max-width: none !important;
    transform: scale(1.85) !important;
    transform-origin: center center !important;
    max-height: none !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .brand-copy h1 {
    font-size: 20px !important;
  }

  .brand-copy p {
    font-size: 12px !important;
    margin-top: 3px;
  }

  .brand-copy {
    text-align: center !important;
  }

  .page {
    width: calc(100% - 16px) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .site-nav {
    gap: 6px;
    margin: 8px 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .site-nav a {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 8px 10px;
  }

  .tool-header {
    padding: 10px;
  }

  .tool-header h2 {
    font-size: 20px;
  }

  .tool-header p {
    font-size: 13px;
  }

  .summary-grid {
    gap: 8px;
    padding: 8px;
  }

  .editor-grid {
    padding: 0 8px 8px;
    gap: 8px;
  }

  textarea {
    height: 190px;
  }

  .seo-content {
    padding: 14px;
  }
}/* ===== Image Difference Checker ===== */
.image-options-card {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid #dbe3ef;
  background: #fff;
}

.image-options-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.image-options-card input[type="range"] {
  width: 160px;
}

.image-options-card select {
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  color: #111827;
  font-weight: 800;
}

.image-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 12px 12px;
}

.image-panel {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.image-preview-box {
  min-height: 260px;
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
}

.image-preview-box img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: none;
}

.image-placeholder {
  color: #64748b;
  font-weight: 900;
  font-size: 13px;
}

.image-result-card {
  margin-top: 0;
}

.result-actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-result-wrap {
  min-height: 320px;
  padding: 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
}

#differenceCanvas {
  max-width: 100%;
  height: auto;
  display: none;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15,23,42,.10);
}

@media (max-width: 900px) {
  .image-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .image-options-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .image-summary-grid {
    grid-template-columns: 1fr;
  }

  .image-preview-box {
    min-height: 200px;
  }

  .image-options-card input[type="range"] {
    width: 120px;
  }
}

/* ===== tools-style.css ===== */
/* ===== RESET & BASE ===== */
*{box-sizing:border-box;margin:0;padding:0}
body{background:#f0f4f8;color:#1e293b;font-family:'Segoe UI',system-ui,-apple-system,sans-serif;line-height:1.5;min-height:100vh}
::selection{background:#0ea5e9;color:#fff}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#7dd3fc;border-radius:99px}

/* ===== PAGE ===== */
.page{width:min(1360px,calc(100% - 20px));margin:0 auto;padding:12px 0 40px}

/* ===== HERO ===== */
.hero{
  background:linear-gradient(135deg,#ffffff 0%,#ffffff 50%,#ffffff 100%);
  border-radius:14px;padding:14px 20px 28px;
  display:flex;align-items:center;gap:14px;
  position:relative;overflow:hidden;
  box-shadow:0 4px 20px rgba(15,23,42,.3),0 2px 6px rgba(0,0,0,.1)
}
.hero::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 15% 0%,rgba(99,102,241,.15),transparent 50%),radial-gradient(ellipse at 85% 100%,rgba(56,189,248,.1),transparent 40%);pointer-events:none}
/* .brand-logo hero rule removed - conflicts with topbar logo */
.hero-brand{
  font-size:52px;letter-spacing:-.5px;font-weight:900;
  background:linear-gradient(135deg,#021af5 0%,#021af5 50%,#021af5 100%);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
  text-shadow:none;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.15));
  margin:0;margin-left:auto;position:relative;z-index:1
}
.hero-desc{margin:0;color:rgba(255,255,255,.75);font-size:11.5px;line-height:1.3;text-align:center;position:absolute;bottom:10px;left:50%;transform:translateX(-50%);white-space:nowrap;z-index:1}

/* ===== TAB NAVIGATION ===== */
.tool-tabs{display:flex;gap:6px;margin:12px 0;flex-wrap:wrap}
.tab-btn{
  border:1px solid #e2e8f0;
  background:linear-gradient(180deg,#fff,#f8fafc);
  color:#64748b;padding:9px 16px;border-radius:10px;
  font-weight:700;font-size:13px;cursor:pointer;
  transition:all .2s ease;
  box-shadow:0 1px 3px rgba(0,0,0,.06)
}
.tab-btn:hover{color:#0284c7;border-color:#7dd3fc;background:linear-gradient(180deg,#fff,#f0f9ff)}
.tab-btn.active{
  background:linear-gradient(180deg,#22c55e,#16a34a);
  color:#fff;border-color:#16a34a;
  box-shadow:0 0 16px rgba(34,197,94,.25),0 3px 10px rgba(34,197,94,.2)
}

/* ===== TOOL SECTION ===== */
.tool-section{display:none;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;margin-bottom:14px;box-shadow:0 4px 20px rgba(0,0,0,.06)}
.tool-section.active{display:block}
.section-head{padding:14px 16px;display:flex;justify-content:space-between;gap:12px;align-items:center;background:linear-gradient(180deg,#fafbff,#f5f7ff);border-bottom:1px solid #e2e8f0}
.section-head h2{font-size:18px;color:#1e293b;font-weight:800;letter-spacing:-.3px}
.section-head p{margin:3px 0 0;color:#64748b;font-size:13px}

/* ===== GRID ===== */
.grid-2{display:grid;grid-template-columns:1fr;gap:12px;padding:12px}

/* ===== CARD ===== */
.card{
  background:#fff;
  border:1px solid #e2e8f0;border-radius:14px;
  padding:14px;overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,.04)
}
.card-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-14px -14px 12px;padding:10px 14px;background:#fafbff;border-bottom:1px solid #e2e8f0}
.card-title strong{color:#475569;font-size:13px;font-weight:700}

/* ===== FORM ELEMENTS ===== */
input,select,textarea,button{font:inherit}
input[type="file"]{max-width:260px;font-size:12px;color:#64748b}
input[type="file"]::file-selector-button{
  background:linear-gradient(180deg,#ef4444,#dc2626);
  color:#fff;border:1px solid #b91c1c;border-radius:8px;
  padding:6px 12px;font-size:12px;font-weight:700;cursor:pointer;
  margin-right:8px;transition:all .15s
}
input[type="file"]::file-selector-button:hover{background:linear-gradient(180deg,#f87171,#ef4444);border-color:#dc2626}

.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
label,.full-label{display:block;color:#475569;font-size:12px;font-weight:700;letter-spacing:.2px}
label input:not([type="range"]):not([type="color"]):not([type="file"]),
label select,
.full-label input,
.full-label textarea{
  width:100%;margin-top:5px;
  border:1px solid #d4d9e3;border-radius:8px;
  padding:8px 10px;
  background:#fff;color:#1e293b;
  font-size:13px;
  transition:border-color .15s,box-shadow .15s
}
label input:focus,label select:focus,.full-label input:focus,.full-label textarea:focus{
  outline:none;border-color:#818cf8;
  box-shadow:0 0 0 3px rgba(99,102,241,.1)
}
.full-label textarea{height:120px;resize:vertical;font-family:'Cascadia Code',Consolas,monospace;font-size:13px}
input[type="range"]{width:100%;margin-top:6px;accent-color:#0ea5e9}
input[type="color"]{width:50px;height:34px;border:1px solid #d4d9e3;border-radius:8px;padding:2px;margin-top:5px;background:#fff;cursor:pointer}

/* ===== PRESET FILTER ===== */
.preset-filter-wrap{position:relative;margin-top:5px}
.preset-filter-wrap input[type="text"]{
  width:100%;padding:8px 10px;
  border:1px solid #d4d9e3;border-radius:8px 8px 0 0;
  background:#fff;color:#1e293b;font-size:13px;
  margin:0
}
.preset-filter-wrap input[type="text"]:focus{outline:none;border-color:#818cf8;box-shadow:0 0 0 3px rgba(99,102,241,.1)}
.preset-filter-wrap select{
  width:100%;padding:6px 10px;
  border:1px solid #d4d9e3;border-top:0;border-radius:0 0 8px 8px;
  background:#fff;color:#1e293b;font-size:13px;
  margin:0;cursor:pointer
}
.preset-filter-wrap select{height:auto;min-height:120px}
.preset-filter-wrap select option{padding:5px 8px}
.preset-filter-wrap select option:checked{background:linear-gradient(180deg,#eef2ff,#e0e7ff);color:#4338ca;font-weight:700}

/* ===== GLOSSY BUTTONS ===== */
.actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}

button{
  border:0;
  padding:9px 16px;border-radius:10px;
  font-weight:700;font-size:13px;cursor:pointer;
  transition:all .2s ease;
  position:relative;overflow:hidden
}
button::before{
  content:"";position:absolute;top:0;left:0;right:0;height:50%;
  background:linear-gradient(180deg,rgba(255,255,255,.25) 0%,rgba(255,255,255,0) 100%);
  pointer-events:none;border-radius:10px 10px 0 0
}
button:not(.btn-light){
  background:linear-gradient(180deg,#0ea5e9,#0284c7);
  color:#fff;
  border:1px solid rgba(14,165,233,.4);
  box-shadow:0 0 12px rgba(14,165,233,.15),0 3px 10px rgba(14,165,233,.2),inset 0 1px 0 rgba(255,255,255,.12)
}
button:not(.btn-light):hover{
  background:linear-gradient(180deg,#38bdf8,#0ea5e9);
  box-shadow:0 0 20px rgba(14,165,233,.3),0 5px 14px rgba(14,165,233,.25),inset 0 1px 0 rgba(255,255,255,.15);
  transform:translateY(-1px)
}
button:not(.btn-light):active{transform:translateY(0);box-shadow:0 0 8px rgba(14,165,233,.15),0 1px 4px rgba(14,165,233,.12)}

button.btn-light{
  background:linear-gradient(180deg,#d946ef,#a21caf);
  color:#fff;
  border:1px solid rgba(217,70,239,.4);
  box-shadow:0 0 12px rgba(217,70,239,.15),0 3px 10px rgba(217,70,239,.2),inset 0 1px 0 rgba(255,255,255,.12)
}
button.btn-light:hover{
  background:linear-gradient(180deg,#e879f9,#d946ef);
  border-color:#d946ef;color:#fff;
  box-shadow:0 0 20px rgba(217,70,239,.3),0 5px 14px rgba(217,70,239,.25);
  transform:translateY(-1px)
}
button.btn-light:active{transform:translateY(0)}

/* ===== RESULT TITLE ===== */
.result-title{font-weight:800;color:#1e293b;font-size:14px;margin-bottom:10px;letter-spacing:-.2px}

/* ===== STATS ===== */
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:10px}
.stats-grid div,.passport-stats div{
  border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px;
  background:linear-gradient(180deg,#fafbff,#f5f7ff)
}
.stats-grid span,.passport-stats span{display:block;color:#64748b;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;margin-bottom:2px}
.stats-grid b,.passport-stats b{font-size:15px;color:#1e293b}

/* ===== PREVIEW BOXES ===== */
.preview-box,.qr-preview,.barcode-preview{
  min-height:260px;
  background:repeating-conic-gradient(#f8fafc 0% 25%,#f0f4f8 0% 50%) 50%/16px 16px;
  border:1px dashed #d4d9e3;border-radius:14px;
  display:flex;align-items:center;justify-content:center;text-align:center;
  color:#94a3b8;font-weight:700;font-size:13px;padding:14px;
  overflow:hidden
}
.preview-box img{max-width:100%;max-height:400px;display:none;object-fit:contain;background:#fff;border-radius:10px;border:1px solid #e2e8f0}
.qr-preview{max-height:350px}
.qr-preview canvas,.qr-preview img{max-width:100%;max-height:320px;height:auto;background:#fff;border-radius:10px}

/* QR Compact Controls */
.qr-compact-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.qr-color-label{display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:#475569;white-space:nowrap}
.qr-color-label input[type="color"]{width:28px;height:28px;padding:1px;border:1px solid #d4d9e3;border-radius:6px;cursor:pointer;margin:0}
.qr-inline-label{display:flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:#475569;white-space:nowrap}
.qr-inline-label select{padding:4px 6px;border-radius:6px;border:1px solid #d4d9e3;font-size:12px;margin:0}

/* QR Editor max height */
.qr-editor-stage{max-height:350px}
.qr-editor-stage img{max-height:320px}

/* QR Border & Frame */
.qr-frame-section{margin-top:4px}
/* QR Frame Resizable */
.qr-frame-resize-wrap{
  position:relative;
  display:inline-block;
  margin-top:8px;
  width:100%;
  min-width:100px;
  max-width:100%
}
.qr-frame-preview{
  min-height:80px;
  max-height:300px;
  width:100%;height:100%;
  border:1px dashed #d4d9e3;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  background:repeating-conic-gradient(#f8fafc 0% 25%,#f0f4f8 0% 50%) 50%/12px 12px;
  color:#94a3b8;font-size:12px;font-weight:700
}
.qr-frame-preview img{
  width:100%;height:100%;
  max-height:300px;
  object-fit:contain;
  pointer-events:none;
  user-select:none
}
.qr-frame-resize-handle{
  display:none;
  position:absolute;
  right:-6px;bottom:-6px;
  width:18px;height:18px;
  background:linear-gradient(135deg,transparent 40%,#6366f1 40%,#6366f1 50%,transparent 50%,transparent 60%,#6366f1 60%,#6366f1 70%,transparent 70%,transparent 80%,#6366f1 80%);
  border-radius:0 0 6px 0;
  cursor:nwse-resize;
  z-index:5;
  touch-action:none
}
.qr-frame-resize-wrap.has-frame .qr-frame-resize-handle{display:block}
.qr-frame-resize-wrap.has-frame .qr-frame-preview{
  border:2px solid #c7d2fe;
  cursor:default
}
.qr-frame-resize-wrap.resizing .qr-frame-preview{
  border-color:#6366f1;
  box-shadow:0 0 0 3px rgba(99,102,241,.15)
}
.qr-frame-size-info{
  font-size:11px;font-weight:700;color:#6366f1;
  margin-top:4px;min-height:16px
}
#qrFinalCanvas{border-radius:10px;border:1px solid #e2e8f0;box-shadow:0 4px 16px rgba(0,0,0,.06)}

/* QR Interactive Editor */
.qr-editor-wrap{margin-top:10px}
.qr-editor-stage{
  position:relative;
  display:inline-block;
  border:2px solid #c7d2fe;border-radius:12px;
  overflow:hidden;
  background:repeating-conic-gradient(#f8fafc 0% 25%,#eef2ff 0% 50%) 50%/14px 14px;
  user-select:none;
  touch-action:none;
  max-width:100%
}
.qr-editor-stage img{display:block;max-width:100%;height:auto;pointer-events:none;user-select:none}
.qr-editor-qr{
  position:absolute;
  border:2px dashed #6366f1;
  border-radius:4px;
  cursor:grab;
  touch-action:none;
  z-index:2;
  box-shadow:0 2px 12px rgba(99,102,241,.2)
}
.qr-editor-qr:active{cursor:grabbing;border-color:#4338ca;box-shadow:0 4px 20px rgba(99,102,241,.35)}
.qr-editor-qr canvas{display:block;width:100%;height:100%;pointer-events:none}
.qr-editor-qr-handle{
  position:absolute;right:-5px;bottom:-5px;
  width:16px;height:16px;
  background:#6366f1;border:2px solid #fff;
  border-radius:3px;cursor:nwse-resize;
  z-index:3;
  box-shadow:0 1px 4px rgba(0,0,0,.2);
  touch-action:none
}
.qr-editor-qr-handle:hover{background:#4338ca;transform:scale(1.15)}
.qr-editor-info{
  font-size:11px;font-weight:700;color:#6366f1;
  margin-top:6px;min-height:16px
}
.barcode-preview svg{max-width:100%;background:#fff;border-radius:10px;display:none}

/* ===== SEO CONTENT ===== */
.seo-content{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;line-height:1.65;box-shadow:0 4px 20px rgba(0,0,0,.06)}
.seo-content h2{color:#1e293b;font-size:16px;margin:16px 0 6px}
.seo-content h2:first-child{margin-top:0}
.seo-content p{color:#475569;font-size:13px}

/* ===== NOTES ===== */
.small-note,.guide-note{margin-top:10px;color:#64748b;font-size:12px;line-height:1.5}

/* ===== PASSPORT GRID ===== */
.passport-grid{display:grid;grid-template-columns:1fr;gap:12px;padding:12px}
.passport-result-grid{display:grid;grid-template-columns:1fr;gap:12px;padding:0 12px 12px}

.passport-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin-bottom:10px
}

/* ===== CROPPER ===== */
.cropper-wrap{
  min-height:280px;
  max-height:350px;
  border:1px dashed #d4d9e3;border-radius:14px;
  background:repeating-conic-gradient(#f8fafc 0% 25%,#f0f4f8 0% 50%) 50%/16px 16px;
  position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center
}
#passportCropImage{max-width:100%;display:none}
.cropper-placeholder{color:#94a3b8;font-weight:700;padding:18px;text-align:center;font-size:13px}

/* ===== PASSPORT PREVIEW ===== */
.passport-preview-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;padding:0 12px 12px}
.passport-info-compact{display:grid;grid-template-columns:1fr;gap:6px}
.passport-info-compact div{border:1px solid #e2e8f0;border-radius:8px;padding:6px 8px;background:linear-gradient(180deg,#fafbff,#f5f7ff)}
.passport-info-compact span{display:block;color:#64748b;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.passport-info-compact b{font-size:13px;color:#1e293b}
.passport-preview-box{min-height:180px;overflow:auto}
#passportCanvas,#passportSheetCanvas{
  display:none;max-width:100%;height:auto;
  background:#fff;border-radius:10px;
  border:1px solid #e2e8f0;
  box-shadow:0 4px 16px rgba(0,0,0,.06)
}

/* ===== LOADER OVERLAY ===== */
.loader-overlay{
  position:fixed;inset:0;
  background:rgba(255,255,255,.7);
  backdrop-filter:blur(10px);
  z-index:9999;display:none;
  align-items:center;justify-content:center;flex-direction:column;gap:16px
}
.loader-overlay.active{display:flex}
.loader-spinner{width:56px;height:56px;position:relative}
.loader-spinner::before,.loader-spinner::after{content:"";position:absolute;inset:0;border-radius:50%;border:3px solid transparent}
.loader-spinner::before{border-top-color:#6366f1;border-right-color:#8b5cf6;animation:loaderSpin .8s linear infinite}
.loader-spinner::after{inset:8px;border-bottom-color:#f472b6;border-left-color:#34d399;animation:loaderSpin 1.2s linear infinite reverse}
.loader-text{color:#1e293b;font-size:14px;font-weight:700;text-align:center;max-width:240px;line-height:1.4}
.loader-dots::after{content:"";animation:loaderDots 1.2s steps(4,end) infinite}
@keyframes loaderSpin{to{transform:rotate(360deg)}}
@keyframes loaderDots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}

/* ===== SHEET INFO ===== */
#passportSheetInfo{margin-top:8px;font-weight:700;font-size:12px}
#passportSheetInfo.error{color:#dc2626}
#passportSheetInfo.success{color:#16a34a}

/* ===== IMAGE CONVERTER DROP ZONE ===== */
.cv-drop-zone{
  border:2px dashed #7dd3fc;border-radius:12px;
  min-height:120px;display:flex;align-items:center;justify-content:center;
  text-align:center;padding:14px;
  background:linear-gradient(180deg,#f0f9ff,#f8fafc);
  color:#64748b;font-size:12px;font-weight:700;
  transition:border-color .2s;
  overflow:hidden
}
.cv-check-line{
  display:inline-flex;align-items:center;gap:4px;
  margin-top:8px;cursor:pointer
}
.cv-check-line input[type="checkbox"]{
  accent-color:#0ea5e9;
  width:14px;height:14px;min-width:14px;
  margin:0;padding:0;cursor:pointer
}
.cv-check-line span{
  color:#475569;font-weight:700;font-size:12px;
  line-height:1;white-space:nowrap
}

/* ===== RESPONSIVE ===== */
@media(max-width:960px){
  .hero{flex-direction:column;align-items:flex-start}
  .hero h1{font-size:24px}
  .brand-logo-wrap{align-self:flex-end;margin-top:-36px}
  .hero-card{width:100%}
  .grid-2,.passport-grid,.passport-result-grid{grid-template-columns:1fr}
  .section-head{flex-direction:column;align-items:flex-start}
  .tool-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .tab-btn{flex:0 0 auto}
  .passport-stats{grid-template-columns:repeat(2,1fr)}
  .passport-preview-row{grid-template-columns:1fr}
}
@media(max-width:560px){
  .page{width:calc(100% - 12px);padding-top:6px}
  .hero{padding:14px;border-radius:14px}
  .hero h1{font-size:20px}
  .hero p{font-size:12px}
  .grid-2,.passport-grid,.passport-result-grid{padding:8px;gap:8px}
  .form-row,.passport-stats,.stats-grid{grid-template-columns:1fr}
  .preview-box,.qr-preview,.barcode-preview,.cropper-wrap{min-height:200px}
  .card{padding:10px}
  .card-title{margin:-10px -10px 10px;padding:8px 10px;flex-direction:column;align-items:flex-start}
  input[type="file"]{max-width:100%}
  .passport-stats{grid-template-columns:1fr}
}
/* ===== SITE NAV (DifferencePilot) ===== */
.site-nav{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.site-nav a{background:#fff;border:1px solid #dbe3ef;color:#172554;text-decoration:none;padding:9px 12px;border-radius:999px;font-weight:900;font-size:13px}
.site-nav a:hover{background:#dbeafe}

/* ===== TOPBAR (DifferencePilot brand header) ===== */
.topbar{color:white;border-radius:18px;padding:18px;box-shadow:0 14px 32px rgba(15,23,42,.22)}
.topbar h1{margin:0;font-size:27px}
.topbar p{margin:6px 0 0;color:#dbeafe}
/* duplicate topbar/logo rules removed - see top of file and FINAL MOBILE OVERRIDE at bottom */

.tool-tabs a.tab-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f7fb;
  color: #111827;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 22px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  text-decoration: none;
}

.tagline {
  font-size: 13px;
  color: #64748b;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 16px 50px;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 38px;
  color: #0f172a;
}

.hero p {
  max-width: 760px;
  margin: 0 auto;
  color: #475569;
  font-size: 17px;
  line-height: 1.6;
}

.tool-card,
.tool-panel,
.seo-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.tool-card {
  padding: 18px;
  margin-bottom: 18px;
}

.upload-box {
  border: 2px dashed #94a3b8;
  border-radius: 18px;
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background: #f8fafc;
}

.upload-box.dragover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.upload-btn,
.action-btn,
.favicon-btn,
.copy-btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
  transition: 0.15s ease;
}

.upload-btn:hover,
.action-btn:hover,
.favicon-btn:hover,
.copy-btn:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
}

.upload-box p {
  margin: 10px 0 0;
  color: #64748b;
}

.file-info {
  margin-top: 12px;
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #a5f3fc;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.preview-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.preview-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.preview-card img {
  max-width: 100%;
  max-height: 320px;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  background: #f1f5f9;
}

.details {
  display: grid;
  gap: 9px;
  color: #334155;
  font-size: 14px;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tool-panel {
  padding: 18px;
}

.tool-panel.full {
  grid-column: 1 / -1;
}

.tool-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #0f172a;
}

.tool-panel p {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.5;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.form-row label {
  font-weight: 800;
  font-size: 13px;
  color: #334155;
}

.form-row input {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px;
  color: #475569;
  font-weight: 700;
}

.favicon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.html-code-box {
  margin-top: 18px;
}

.html-code-box h3 {
  margin: 0 0 10px;
}

.html-code-box textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  font-family: Consolas, monospace;
  font-size: 13px;
  background: #f8fafc;
}

.copy-btn {
  margin-top: 10px;
  background: #0f172a;
}

.copy-btn:hover {
  background: #020617;
}

.seo-content {
  margin-top: 20px;
  padding: 22px;
}

.seo-content h2 {
  margin: 0 0 10px;
}

.seo-content p {
  color: #475569;
  line-height: 1.7;
}

.site-footer {
  text-align: center;
  padding: 24px 16px;
  color: #64748b;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

@media (max-width: 760px) {
  .hero h1 {
    font-size: 30px;
  }

  .preview-grid,
  .tools-grid,
  .form-row,
  .favicon-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ===== HOME PAGE TOOLS GRID ===== */
.tools-grid-home{
  margin:18px 0;
}
.tools-grid-title{
  margin:0 0 14px;
  color:#172554;
  font-size:22px;
  text-align:center;
}
.tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:12px;
}
.tool-grid-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  background:#fff;
  border:2px solid #dbe3ef;
  border-radius:16px;
  padding:18px 10px;
  text-decoration:none;
  text-align:center;
  transition:transform .15s,box-shadow .15s,border-color .15s;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(15,23,42,.06);
}
.tool-grid-card:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 28px rgba(15,23,42,.14);
}
.tool-grid-card .tool-icon{
  font-size:32px;
  line-height:1;
  margin-bottom:4px;
}
.tool-grid-card strong{
  color:#172554;
  font-size:14px;
}
.tool-grid-card small{
  color:#64748b;
  font-size:11px;
}
/* Color coding by tool type */
.tool-grid-card.tool-diff{border-color:#bfdbfe}.tool-grid-card.tool-diff:hover{border-color:#3b82f6;background:#eff6ff}
.tool-grid-card.tool-image{border-color:#fbcfe8}.tool-grid-card.tool-image:hover{border-color:#ec4899;background:#fdf2f8}
.tool-grid-card.tool-gen{border-color:#bbf7d0}.tool-grid-card.tool-gen:hover{border-color:#22c55e;background:#f0fdf4}

@media(max-width:520px){
  .tools-grid{grid-template-columns:repeat(2,1fr);gap:8px}
  .tool-grid-card{padding:12px 6px}
  .tool-grid-card .tool-icon{font-size:24px}
  .tool-grid-card strong{font-size:12px}
  .tool-grid-card small{font-size:10px}
}
/* ===== FINAL MOBILE OVERRIDE - must stay at bottom ===== */
@media(max-width:768px){
  html{overflow-x:hidden!important}
  body{overflow-x:hidden!important;margin:0!important;max-width:100vw!important;width:100%!important}
  .page{width:calc(100% - 16px)!important;max-width:100%!important;padding:8px 0 20px!important;margin:0 auto!important;box-sizing:border-box!important;overflow-x:hidden!important}
  .brand-topbar{
    flex-direction:column!important;
    align-items:center!important;
    text-align:center!important;
    padding:16px 12px!important;
    min-height:auto!important;
    overflow:hidden!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    border-radius:12px!important;
  }
  .brand-logo{
    width:100%!important;
    max-width:100%!important;
    height:108px!important;
    flex:none!important;
    justify-content:center!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:center!important;
  }
  .brand-logo img{
    width:180px!important;
    max-width:none!important;
    height:auto!important;
    max-height:none!important;
    transform:scale(1.85)!important;
    transform-origin:center center!important;
    object-fit:contain!important;
    display:block!important;
  }
  .brand-copy{text-align:center!important;max-width:100%!important}
  .brand-copy h1{font-size:20px!important}
  .brand-copy p{font-size:12px!important}
  .tools-grid-home{margin:12px 0!important;max-width:100%!important;overflow:hidden!important}
  .tools-grid{grid-template-columns:repeat(2,1fr)!important;gap:8px!important;max-width:100%!important}
  .tool-grid-card{min-width:0!important;overflow:hidden!important}
  .seo-content{word-break:break-word!important;overflow-wrap:break-word!important;max-width:100%!important;box-sizing:border-box!important}
  .reviews-grid{grid-template-columns:1fr!important}
  .suggestion-row{grid-template-columns:1fr!important}
  *{max-width:100vw}
}

/* ===== USER REVIEWS ===== */
.reviews-section{margin:20px 0}
.reviews-title{text-align:center;color:#172554;font-size:22px;margin:0 0 16px;font-weight:900}
.reviews-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.review-card{background:#fff;border:1px solid #dbe3ef;border-radius:16px;padding:18px;box-shadow:0 4px 14px rgba(15,23,42,.06);transition:transform .2s,box-shadow .2s}
.review-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(15,23,42,.12)}
.review-stars{color:#f59e0b;font-size:18px;margin-bottom:8px;letter-spacing:2px}
.review-text{color:#334155;font-size:14px;line-height:1.6;margin:0 0 12px;font-style:italic}
.review-author{display:flex;align-items:center;gap:8px}
.review-author strong{color:#172554;font-size:14px}
.review-author span{color:#64748b;font-size:12px;background:#f1f5f9;padding:2px 8px;border-radius:999px}

/* ===== SUGGESTION BOX ===== */
.suggestion-section{margin:20px 0;background:#fff;border:1px solid #dbe3ef;border-radius:16px;padding:24px;box-shadow:0 4px 14px rgba(15,23,42,.06)}
.suggestion-title{color:#172554;font-size:20px;margin:0 0 6px;font-weight:900}
.suggestion-desc{color:#64748b;font-size:14px;margin:0 0 16px}
.feedback-buttons{display:flex;gap:12px;flex-wrap:wrap}
.feedback-btn{display:inline-flex;align-items:center;gap:8px;padding:14px 24px;border-radius:14px;font-size:15px;font-weight:900;text-decoration:none;color:#fff;transition:all .2s;box-shadow:0 4px 14px rgba(0,0,0,.1)}
.feedback-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.18)}
.feedback-suggest{background:linear-gradient(135deg,#6366f1,#4f46e5)}
.feedback-suggest:hover{background:linear-gradient(135deg,#818cf8,#6366f1)}
.feedback-review{background:linear-gradient(135deg,#f59e0b,#d97706)}
.feedback-review:hover{background:linear-gradient(135deg,#fbbf24,#f59e0b)}
.feedback-bug{background:linear-gradient(135deg,#ef4444,#dc2626)}
.feedback-bug:hover{background:linear-gradient(135deg,#f87171,#ef4444)}

@media(max-width:900px){
  .reviews-grid{grid-template-columns:repeat(2,1fr)}
}