/* =========================================================================
   JobJankari PDF Tools — Stylesheet
   Design tokens: navy/blue on white, Inter typeface, utility-first layout.
   ========================================================================= */

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

:root{
  --navy:        #0F3D5C;
  --navy-dark:   #0A2C43;
  --blue:        #1B6FC9;
  --blue-hover:  #155A9F;
  --blue-tint:   #EAF2FE;
  --blue-tint-2: #DCEBFE;
  --bg:          #F7F9FB;
  --surface:     #FFFFFF;
  --ink:         #16232E;
  --muted:       #5B6B7A;
  --border:      #DCE4EC;
  --border-strong:#C4D2DF;
  --success:     #1E8E5A;
  --success-tint:#E7F6EE;
  --danger:      #B3261E;
  --danger-tint: #FBEAE9;
  --amber:       #A9660A;
  --amber-tint:  #FCF2E1;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 2px rgba(15,61,92,0.06), 0 1px 0 rgba(15,61,92,0.04);
  --shadow-pop:  0 12px 28px rgba(15,61,92,0.14);

  --container: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img,svg{ display:block; max-width:100%; }
a{ color: var(--blue); }
h1,h2,h3,h4{ color: var(--navy-dark); line-height:1.2; margin: 0 0 .5em; font-weight: 700; }
p{ margin:0 0 1em; }
ul,ol{ margin:0; padding:0; }
button{ font-family: 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;
}
.skip-link{
  position:absolute; left:-9999px; top:0; background:var(--navy); color:#fff;
  padding:.75rem 1.25rem; z-index:1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus{ left:0; }

:focus-visible{ outline: 3px solid #7FB4EE; outline-offset: 2px; }

/* ===================== BUTTONS ===================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  font-weight:600; font-size:.95rem; border-radius: var(--radius-md);
  padding:.7em 1.3em; border:1.5px solid transparent; cursor:pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
  text-decoration:none; line-height:1.2; min-height:44px;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--blue); color:#fff; }
.btn-primary:hover{ background: var(--blue-hover); }
.btn-primary:disabled{ background:#9FC1E8; cursor:not-allowed; }
.btn-secondary{ background:#fff; color: var(--navy); border-color: var(--border-strong); }
.btn-secondary:hover{ background: var(--blue-tint); border-color:var(--blue); }
.btn-ghost{ background:transparent; color: var(--muted); border-color:transparent; }
.btn-ghost:hover{ color: var(--danger); }
.btn-lg{ padding:.85em 1.8em; font-size:1rem; }
.btn-sm{ padding:.4em .8em; font-size:.85rem; min-height:36px; }

/* ===================== HEADER ===================== */
.site-header{
  background:#fff; border-bottom:1px solid var(--border);
  position: sticky; top:0; z-index: 50;
}
.header-inner{
  max-width: var(--container); margin:0 auto; padding: .85rem 1.25rem;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
}
.logo{ display:flex; align-items:center; gap:.6rem; text-decoration:none; }
.logo-mark{
  width:38px; height:38px; border-radius:10px; background: var(--navy);
  color:#fff; font-weight:800; font-size:.95rem; display:flex; align-items:center;
  justify-content:center; letter-spacing:.02em;
}
.logo-text{ font-weight:800; font-size:1.15rem; color: var(--navy-dark); }
.logo-dot{ color: var(--blue); font-weight:600; }

.primary-nav ul{ display:flex; gap:1.6rem; list-style:none; }
.primary-nav a{
  color: var(--ink); text-decoration:none; font-weight:500; font-size:.95rem;
  padding:.4rem .1rem; border-bottom:2px solid transparent;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"]{
  color: var(--blue); border-bottom-color: var(--blue);
}

.nav-toggle{
  display:none; width:44px; height:44px; border:1px solid var(--border-strong);
  border-radius: var(--radius-sm); background:#fff; cursor:pointer;
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
.nav-toggle span{ width:20px; height:2px; background: var(--navy); border-radius:2px; }

/* ===================== AD CONTAINERS ===================== */
.ad-container{
  max-width: var(--container); margin: 1.5rem auto; padding: 1rem;
  min-height: 90px; display:flex; align-items:center; justify-content:center;
  background: #F0F4F8; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
}
.ad-placeholder-label{ font-size:.8rem; color: var(--muted); letter-spacing:.02em; }
/* <div class="ad-container"> reserved for AdSense units. See README for insertion instructions. */

/* ===================== HERO ===================== */
.hero{ padding: 2.5rem 1.25rem 1rem; }
.hero-inner{ max-width: var(--container); margin:0 auto; text-align:center; }
.hero h1{ font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero-subhead{ font-size:1.1rem; color: var(--muted); max-width: 46ch; margin: 0 auto .9rem; }
.privacy-note{
  display:inline-flex; align-items:center; gap:.5rem; font-size:.88rem;
  color: var(--navy); background: var(--blue-tint); padding:.55rem 1rem;
  border-radius: 999px; margin-bottom: 2rem;
}
.privacy-note svg{ color: var(--blue); flex-shrink:0; }

.tool-cards{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:1.1rem;
  max-width: 920px; margin: 0 auto;
}
.tool-card{
  background:#fff; border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem 1.3rem; text-align:left; cursor:pointer;
  box-shadow: var(--shadow-card); transition: border-color .15s, box-shadow .15s, transform .1s;
  display:flex; flex-direction:column; gap:.6rem;
}
.tool-card:hover{ border-color: var(--blue); box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.tool-icon{ margin-bottom:.2rem; }
.tool-name{ font-weight:700; font-size:1.1rem; color: var(--navy-dark); }
.tool-desc{ color: var(--muted); font-size:.92rem; flex-grow:1; }
.tool-cta{
  color: var(--blue); font-weight:600; font-size:.92rem; margin-top:.3rem;
}
.tool-cta::after{ content:''; }

/* ===================== WORKSPACE / TOOL PANEL ===================== */
.workspace{ padding: 0 1.25rem 2rem; }
.workspace-inner{ max-width: 820px; margin:0 auto; }

.tool-panel{
  background:#fff; border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-card);
}
.tool-panel-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:1rem;
  margin-bottom: 1.4rem;
}
.tool-panel-desc{ color: var(--muted); margin:0; }
.tool-close{
  background: var(--bg); border:1px solid var(--border); width:36px; height:36px;
  border-radius:50%; cursor:pointer; color: var(--muted); font-size:1rem; flex-shrink:0;
}
.tool-close:hover{ color: var(--danger); border-color: var(--danger); }

/* Upload zone */
.upload-zone{
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--blue-tint); text-align:center; padding: 2.4rem 1.25rem;
  cursor:pointer; transition: border-color .15s, background .15s;
}
.upload-zone.is-dragover{ border-color: var(--blue); background: var(--blue-tint-2); }
.upload-title{ font-weight:700; color: var(--navy-dark); font-size:1.05rem; margin:.6rem 0 .1rem; }
.upload-or{ color: var(--muted); font-size:.85rem; margin:.2rem 0 .8rem; }
.upload-limit{ color: var(--muted); font-size:.82rem; margin: .9rem 0 0; }

.file-error{
  margin-top: 1rem; background: var(--danger-tint); color: var(--danger);
  border: 1px solid #F1C6C2; border-radius: var(--radius-sm); padding: .75rem 1rem;
  font-size:.92rem; font-weight:500;
}

/* Merge file cards */
.merge-file-list{ margin-top: 1.5rem; }
.file-cards{ list-style:none; display:flex; flex-direction:column; gap:.65rem; }
.file-card{
  display:flex; align-items:center; gap:.85rem; background:#fff;
  border:1px solid var(--border); border-radius: var(--radius-md); padding: .75rem .9rem;
}
.file-card.is-dragging{ opacity:.5; }
.file-card-handle{
  cursor:grab; color: var(--muted); font-size:1.2rem; line-height:1; padding:.2rem;
  touch-action: none;
}
.file-card-thumb{
  width:38px; height:50px; border:1px solid var(--border); border-radius:4px;
  background:#fff; flex-shrink:0; overflow:hidden; display:flex; align-items:center; justify-content:center;
}
.file-card-thumb canvas, .file-card-thumb img{ width:100%; height:100%; object-fit:cover; }
.file-card-info{ flex-grow:1; min-width:0; }
.file-card-name{
  font-weight:600; font-size:.92rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.file-card-meta{ color: var(--muted); font-size:.8rem; }
.file-card-reorder{ display:flex; flex-direction:column; gap:2px; }
.file-card-reorder button{
  width:26px; height:22px; border:1px solid var(--border); background:#fff; border-radius:4px;
  cursor:pointer; color: var(--navy); font-size:.7rem; display:flex; align-items:center; justify-content:center;
}
.file-card-reorder button:disabled{ opacity:.35; cursor:not-allowed; }
.file-card-remove{
  background:none; border:none; color: var(--muted); cursor:pointer; font-size:1.1rem;
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
}
.file-card-remove:hover{ background: var(--danger-tint); color: var(--danger); }

.list-actions{ display:flex; gap:.75rem; margin-top:1rem; flex-wrap:wrap; }
.list-summary{ margin-top:.75rem; color: var(--muted); font-size:.88rem; }

.tool-panel-actions{ margin-top: 1.5rem; }

/* Progress */
.progress-block{ margin-top:1.5rem; }
.progress-bar{
  height:8px; background: var(--border); border-radius:999px; overflow:hidden;
}
.progress-fill{
  height:100%; width:0%; background: var(--blue); border-radius:999px;
  transition: width .35s ease;
}
.progress-label{ margin: .6rem 0 0; color: var(--navy); font-weight:600; font-size:.92rem; }

/* Result card */
.result-card{
  margin-top: 1.75rem; border: 1px solid #BFE3CE; background: var(--success-tint);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.result-head{ display:flex; align-items:center; gap:.6rem; margin-bottom:1rem; }
.result-check{
  width:28px; height:28px; border-radius:50%; background: var(--success); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:.9rem; flex-shrink:0;
}
.result-head h3{ margin:0; font-size:1.05rem; color: var(--navy-dark); }
.result-stats{
  display:grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap:1rem;
  margin: 0 0 1rem;
}
.result-stats dt{ font-size:.78rem; color: var(--muted); text-transform:none; margin-bottom:.15rem; }
.result-stats dd{ margin:0; font-weight:700; color: var(--navy-dark); font-size:1.05rem; }
.rename-field{
  display:flex; align-items:center; gap:.5rem; margin-bottom:1.1rem; font-size:.88rem;
  color: var(--navy); font-weight:500; flex-wrap:wrap;
}
.rename-field input{
  flex:1; min-width:140px; padding:.55rem .7rem; border:1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size:.92rem; font-family:inherit;
}
.result-actions{ display:flex; gap:.75rem; flex-wrap:wrap; }

/* Split-specific */
.split-file-info, .compress-file-info{
  margin-top:1.25rem; display:flex; align-items:center; justify-content:space-between;
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius-md);
  padding: .85rem 1rem; gap:1rem; flex-wrap:wrap;
}
.file-info-row{ display:flex; flex-direction:column; gap:.15rem; min-width:0; }
.file-info-name{ font-weight:700; color: var(--navy-dark); word-break:break-all; }
.file-info-meta{ color: var(--muted); font-size:.85rem; }

.split-methods{ margin-top: 1.5rem; }
.split-tabs{ display:flex; gap:.4rem; border-bottom:1px solid var(--border); margin-bottom:1.25rem; flex-wrap:wrap; }
.split-tab{
  background:none; border:none; padding:.7rem .3rem; margin-right:1rem; cursor:pointer;
  font-weight:600; color: var(--muted); border-bottom:2px solid transparent; font-size:.95rem;
}
.split-tab.is-active{ color: var(--blue); border-bottom-color: var(--blue); }
.split-method-panel label{ display:block; font-weight:600; margin-bottom:.4rem; font-size:.92rem; color: var(--navy-dark); }
.split-method-panel input[type="text"]{
  width:100%; padding:.7rem .85rem; border:1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size:.95rem; font-family:inherit; margin-bottom:.5rem;
}
.field-hint{ color: var(--muted); font-size:.85rem; margin-bottom:1rem; }
.field-hint.is-error{ color: var(--danger); }
.split-output-list{
  list-style:none; display:flex; flex-direction:column; gap:.4rem; margin-bottom:1.1rem;
}
.split-output-list li{
  display:flex; align-items:center; justify-content:space-between; background:#fff;
  border:1px solid var(--border); border-radius: var(--radius-sm); padding:.55rem .8rem; font-size:.9rem;
}
.split-output-list a{ font-weight:600; text-decoration:none; }

/* Compress-specific */
.compress-options{ margin-top:1.5rem; }
.options-label{ font-weight:600; color: var(--navy-dark); margin-bottom:.7rem; }
.radio-group{ display:grid; grid-template-columns: repeat(3,1fr); gap:.75rem; margin-bottom:1.5rem; }
.radio-card{
  position:relative; border:1.5px solid var(--border-strong); border-radius: var(--radius-md);
  padding: .9rem .9rem 1rem; cursor:pointer; display:flex; flex-direction:column; gap:.2rem;
  background:#fff; transition: border-color .15s, background .15s;
}
.radio-card input{ position:absolute; top:.8rem; right:.8rem; }
.radio-card:has(input:checked){ border-color: var(--blue); background: var(--blue-tint); }
.radio-card.is-checked{ border-color: var(--blue); background: var(--blue-tint); }
.radio-title{ font-weight:700; color: var(--navy-dark); }
.radio-sub{ font-size:.82rem; color: var(--muted); }
.compress-note{ color: var(--muted); font-size:.88rem; }

/* ===================== SEO CONTENT ===================== */
.seo-content{ padding: 1rem 1.25rem 2.5rem; }
.seo-inner{ max-width: 760px; margin:0 auto; }
.seo-inner h2{ font-size:1.5rem; margin-top: 2rem; }
.seo-inner h2:first-child{ margin-top:0; }
.seo-inner h3{ font-size:1.15rem; margin-top:1.6rem; }
.seo-inner code{ background: var(--blue-tint); padding:.1em .4em; border-radius:4px; font-size:.9em; }
.how-to-list{ list-style:none; counter-reset: step; display:flex; flex-direction:column; gap:.75rem; }
.how-to-list li{
  counter-increment: step; padding-left: 2.2rem; position:relative;
}
.how-to-list li::before{
  content: counter(step); position:absolute; left:0; top:0; width:1.6rem; height:1.6rem;
  background: var(--blue); color:#fff; border-radius:50%; font-size:.8rem; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}

/* ===================== FAQ ===================== */
.faq-section{ padding: 0 1.25rem 3rem; }
.faq-inner{ max-width:760px; margin:0 auto; }
.faq-list{ border-top:1px solid var(--border); }
.faq-item{ border-bottom:1px solid var(--border); }
.faq-question{
  width:100%; text-align:left; background:none; border:none; padding:1.1rem .2rem;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  font-weight:600; font-size:1rem; color: var(--navy-dark); cursor:pointer;
}
.faq-caret{ color: var(--blue); font-size:1.2rem; transition: transform .15s; flex-shrink:0; }
.faq-question[aria-expanded="true"] .faq-caret{ transform: rotate(45deg); }
.faq-answer{
  max-height:0; overflow:hidden; transition: max-height .2s ease;
}
.faq-answer p{ padding: 0 .2rem 1.1rem; color: var(--muted); margin:0; }

/* ===================== FOOTER ===================== */
.site-footer{ background: var(--navy-dark); color:#CBD9E5; margin-top: 2rem; }
.footer-inner{
  max-width: var(--container); margin:0 auto; padding: 2.5rem 1.25rem 1.5rem;
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:2rem;
}
.footer-brand p{ color:#93A8BB; font-size:.9rem; max-width:32ch; margin-top:.4rem; }
.footer-logo{ color:#fff; }
.footer-links{ display:flex; flex-wrap:wrap; gap: 1rem 1.5rem; }
.footer-links a{ color:#CBD9E5; text-decoration:none; font-size:.92rem; }
.footer-links a:hover{ color:#fff; text-decoration:underline; }
.footer-copyright{
  text-align:center; font-size:.82rem; color:#7690A6; padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08); margin:0;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px){
  .radio-group{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  .primary-nav{
    position:absolute; top: 100%; left:0; right:0; background:#fff;
    border-bottom:1px solid var(--border); display:none;
  }
  .primary-nav.is-open{ display:block; }
  .primary-nav ul{ flex-direction:column; gap:0; padding: .5rem 1.25rem 1rem; }
  .primary-nav a{ display:block; padding:.8rem 0; border-bottom:1px solid var(--border); }
  .nav-toggle{ display:flex; }

  .tool-cards{ grid-template-columns: 1fr; }
  .tool-panel{ padding: 1.25rem; }
  .result-actions, .list-actions{ flex-direction:column; align-items:stretch; }
  .result-actions .btn, .list-actions .btn{ width:100%; }
  .file-info-row{ width:100%; }
  .split-file-info, .compress-file-info{ flex-direction:column; align-items:flex-start; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}
