:root{
  --ink:#F1F3F6;
  --ink-deep:#FFFFFF;
  --paper:#1A2233;
  --amber:#2563EB;
  --amber-deep:#1D4ED8;
  --steel:#5C8FB0;
  --success:#178A4C;
  --charcoal:#FFFFFF;
  --muted:#667085;
  --line:#E3E7ED;
}
*{box-sizing:border-box;}
body{
  margin:0;
  background:
    radial-gradient(1000px 620px at 12% -6%, #CFE0FF 0%, rgba(207,224,255,0) 62%),
    radial-gradient(900px 560px at 92% 4%, #DCEBFF 0%, rgba(220,235,255,0) 58%),
    linear-gradient(180deg, #F7F9FC 0%, var(--ink) 480px);
  background-attachment:fixed;
  color:var(--paper);
  font-family:'Inter',sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{ color:inherit; }
h1,h2,h3{ font-family:'Space Grotesk',sans-serif; font-weight:700; margin:0; }

/* Trust strip — persistent site-wide privacy reminder, below header */
.trust-strip{
  background:#0F2A6B; border-bottom:1px solid var(--amber-deep);
  text-align:center; padding:8px 16px; font-size:12.5px; color:#DCE8FF;
}
.trust-strip a{ color:#DCE8FF; text-decoration:none; }
.trust-strip a:hover{ color:#FFFFFF; }

/* Header */
.site-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 32px;
  background:linear-gradient(120deg, #16326E 0%, #2856C7 55%, #3B6FE0 100%);
  border-bottom:1px solid var(--amber-deep);
  box-shadow:0 2px 10px rgba(16,24,40,0.12);
  position:relative; z-index:20;
}
.logo{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:19px;
  display:flex; align-items:center; gap:8px;
  text-decoration:none;
  color:#FFFFFF;
}
.logo .dot{ width:9px; height:9px; border-radius:50%; background:#FFD166; }

/* Site nav: a few direct links to popular tools + an "All Tools" dropdown
   for the rest — keeps the header to one line regardless of how many tools
   exist, instead of a long link list wrapping across 3 lines. */
.site-nav{ display:flex; align-items:center; gap:22px; }
.site-nav > a{
  text-decoration:none; color:#C9D8F5; font-size:14px; white-space:nowrap;
}
.site-nav > a:hover{ color:#FFFFFF; }

.nav-tools{ position:relative; }
.nav-tools-btn{
  display:flex; align-items:center; gap:7px;
  background:var(--charcoal); border:1px solid var(--line); color:var(--paper);
  border-radius:7px; padding:8px 14px; font-size:14px; font-family:'Inter',sans-serif; cursor:pointer;
  transition:border-color .15s ease;
}
.nav-tools-btn:hover{ border-color:var(--amber); }
.nav-tools-btn svg{ transition:transform .15s ease; flex-shrink:0; }
.nav-tools.open .nav-tools-btn{ border-color:var(--amber); }
.nav-tools.open .nav-tools-btn svg{ transform:rotate(180deg); }

.nav-dropdown{
  position:absolute; top:calc(100% + 10px); right:0;
  background:var(--charcoal); border:1px solid var(--line); border-radius:12px;
  padding:22px; box-shadow:0 16px 40px rgba(15,23,42,0.14); z-index:50;
  display:flex; gap:30px; flex-wrap:wrap;
  min-width:640px; max-width:min(760px, 90vw);
  opacity:0; visibility:hidden; transform:translateY(-6px); pointer-events:none;
  transition:opacity .14s ease, transform .14s ease, visibility .14s;
}
.nav-tools.open .nav-dropdown{ opacity:1; visibility:visible; transform:translateY(0); pointer-events:auto; }
.nav-col{ display:flex; flex-direction:column; gap:1px; min-width:150px; }
.nav-col-title{
  font-family:'IBM Plex Mono',monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
  color:var(--muted); margin-bottom:8px; padding:0 10px;
}
.nav-col a{
  color:var(--paper); text-decoration:none; font-size:13.5px; padding:7px 10px; border-radius:6px;
  transition:background .12s ease, color .12s ease;
}
.nav-col a:hover{ background:#EFF4FF; color:var(--amber); }

@media(max-width:640px){
  .nav-dropdown{
    position:fixed; top:auto; left:12px; right:12px; bottom:12px;
    min-width:0; max-width:none; max-height:65vh; overflow-y:auto;
  }
}

/* Spec plate - signature element used on tool cards and tool page headers */
.spec-plate{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--amber-deep);
  background:#EAF1FF;
  border:1px solid var(--amber);
  padding:4px 10px;
  border-radius:4px;
}

/* Hero */
.hero{
  padding:70px 32px 50px;
  max-width:760px;
  margin:0 auto;
  text-align:center;
}
.hero .eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--amber);
  margin-bottom:16px;
}
.hero h1{
  font-size:clamp(30px,5vw,46px);
  line-height:1.15;
  margin-bottom:14px;
}
.hero p{
  color:var(--muted);
  font-size:16px;
  line-height:1.5;
}

/* Tool grid (homepage) */
.grid{
  max-width:960px;
  margin:0 auto;
  padding:10px 32px 90px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}
.tool-card{
  background:var(--charcoal);
  border:1px solid var(--line);
  border-radius:12px;
  padding:24px;
  text-decoration:none;
  color:var(--paper);
  display:flex;
  flex-direction:column;
  gap:12px;
  box-shadow:0 1px 2px rgba(16,24,40,0.04);
  transition:border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tool-card:hover{ border-color:var(--amber); transform:translateY(-2px); box-shadow:0 8px 20px rgba(16,24,40,0.08); }
.tool-card .icon{ font-size:26px; }
.tool-card h3{ font-size:17px; }
.tool-card p{ color:var(--muted); font-size:13.5px; margin:0; line-height:1.5; }

/* Tool page shell */
.tool-page{
  max-width:820px;
  margin:0 auto;
  padding:48px 24px 90px;
}
.tool-page .tool-head{
  margin-bottom:28px;
}
.tool-page h1{ font-size:clamp(26px,4vw,34px); margin:12px 0 10px; }
.tool-page .sub{ color:var(--muted); font-size:15px; line-height:1.5; }

.breadcrumb{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  font-size:12.5px; color:var(--muted); margin-bottom:18px;
}
.breadcrumb a{ color:var(--muted); text-decoration:none; }
.breadcrumb a:hover{ color:var(--amber-deep); text-decoration:underline; }
.breadcrumb .sep{ color:var(--line); }
.breadcrumb .cat-label{ color:var(--muted); }
.breadcrumb .current{ color:var(--paper); font-weight:600; }

/* Dropzone / workspace */
.dropzone{
  border:2px dashed var(--line);
  border-radius:14px;
  padding:44px 20px;
  text-align:center;
  cursor:pointer;
  background:var(--charcoal);
  transition:border-color .15s ease, background .15s ease;
}
.dropzone.drag-over, .dropzone:hover{ border-color:var(--amber); background:#F5F8FF; }
.dropzone .icon{ font-size:34px; margin-bottom:10px; }
.dropzone .primary{ font-weight:600; margin-bottom:4px; }
.dropzone .secondary{ color:var(--muted); font-size:13px; }
input[type=file]{ display:none; }

.file-list{ margin-top:18px; display:flex; flex-direction:column; gap:8px; }
.file-row{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--charcoal);
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 14px;
  font-family:'IBM Plex Mono',monospace;
  font-size:12.5px;
}
.file-row .name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:60%; }
.file-row .actions{ display:flex; gap:8px; }
.file-row button{
  background:none; border:1px solid var(--line); color:var(--muted);
  border-radius:5px; padding:3px 8px; cursor:pointer; font-family:inherit; font-size:12px;
}
.file-row button:hover{ color:var(--paper); border-color:var(--amber); }

/* Controls */
.controls{ margin-top:22px; display:flex; flex-direction:column; gap:16px; }
.control-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.control-row label{ font-size:13.5px; color:var(--muted); }
input[type=range]{ accent-color:var(--amber); width:160px; }

.btn{
  background:var(--amber);
  color:var(--ink-deep);
  border:none;
  border-radius:8px;
  padding:13px 22px;
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:14.5px;
  cursor:pointer;
  transition:background .15s ease;
}
.btn:hover{ background:var(--amber-deep); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn.secondary{
  background:var(--charcoal); border:1px solid var(--line); color:var(--paper);
}
.btn.secondary:hover{ border-color:var(--amber); }

.status-line{
  font-family:'IBM Plex Mono',monospace;
  font-size:12.5px;
  color:var(--muted);
  margin-top:14px;
  min-height:16px;
  display:flex; align-items:center; gap:8px;
}
.status-line.ok{ color:var(--success); }
.status-line.loading::before{
  content:'';
  width:12px; height:12px; flex-shrink:0;
  border:2px solid var(--line); border-top-color:var(--amber);
  border-radius:50%;
  animation:status-spin .7s linear infinite;
}
@keyframes status-spin{ to{ transform:rotate(360deg); } }

/* Info / FAQ sections for SEO content depth */
.info-section{
  margin-top:64px;
  padding-top:32px;
  border-top:1px solid var(--line);
}
.info-section h2{ font-size:19px; margin-bottom:14px; }
.info-section p{ color:var(--muted); font-size:14.5px; line-height:1.65; margin:0 0 14px; }
.faq-item{ margin-bottom:18px; }
.faq-item .q{ font-weight:600; font-size:14.5px; margin-bottom:5px; }
.faq-item .a{ color:var(--muted); font-size:14px; line-height:1.6; }

footer{
  text-align:center;
  color:#C9D8F5;
  font-size:12px;
  font-family:'IBM Plex Mono',monospace;
  padding:34px 20px;
  margin-top:64px;
  background:linear-gradient(120deg, #16326E 0%, #2856C7 55%, #3B6FE0 100%);
  border-top:3px solid var(--amber);
}
footer .footer-links{ margin-top:10px; }
footer .footer-links a{ color:#DCE8FF; text-decoration:none; margin:0 8px; }
footer .footer-links a:hover{ color:#FFFFFF; }
footer .footer-credit{ margin-top:10px; color:#C9D8F5; }

/* Related tools block — internal linking, above footer on tool pages */
.related-tools{
  margin-top:48px; padding-top:28px; border-top:1px solid var(--line);
}
.related-tools h2{ font-size:15px; margin-bottom:14px; color:var(--muted); font-family:'IBM Plex Mono',monospace; text-transform:uppercase; letter-spacing:.05em; }
.related-tools .links{ display:flex; flex-wrap:wrap; gap:10px; }
.related-tools a{
  display:inline-block; background:var(--charcoal); border:1px solid var(--line); color:var(--paper);
  text-decoration:none; padding:9px 16px; border-radius:8px; font-size:13.5px; transition:border-color .15s ease, color .15s ease;
}
.related-tools a:hover{ border-color:var(--amber); color:var(--amber); }

/* Trust badges — homepage hero */
.trust-badges{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:18px; }
.trust-badge{
  display:inline-flex; align-items:center; gap:6px; background:var(--charcoal); border:1px solid var(--line);
  border-radius:20px; padding:6px 14px; font-size:12.5px; color:var(--muted); font-family:'IBM Plex Mono',monospace;
}

/* PDF editor canvas workspace */
.editor-shell{ display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.editor-canvas-wrap{
  position:relative;
  background:#EEF0F3;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:auto;
  max-width:100%;
}
#pdfCanvas{ display:block; }
#overlayCanvas{ position:absolute; top:0; left:0; cursor:crosshair; }
.editor-sidebar{
  flex:1;
  min-width:220px;
  display:flex; flex-direction:column; gap:14px;
}
.page-nav{ display:flex; align-items:center; gap:10px; font-family:'IBM Plex Mono',monospace; font-size:13px; }
.page-nav button{
  background:var(--charcoal); border:1px solid var(--line); color:var(--paper);
  border-radius:6px; width:30px; height:30px; cursor:pointer;
}

@media(max-width:640px){
  .site-header{ padding:16px 18px; }
  /* Direct quick-links don't fit next to the logo on small screens — the
     "All Tools" dropdown already lists everything, so just hide them there
     instead of wrapping/overflowing the header. */
  .site-nav > a{ display:none; }
  .hero{ padding:44px 18px 34px; }
}

/* Ad slot — reserves space now so a future AdSense unit doesn't shift
   layout when it's added; invisible/collapsed until it actually holds
   something. */
.ad-slot{
  display:flex; align-items:center; justify-content:center;
  min-height:0; margin:18px 0; overflow:hidden;
}
.ad-slot:empty{ margin:0; min-height:0; }

/* Cookie consent banner */
.cookie-banner{
  position:fixed; left:0; right:0; bottom:0; z-index:200;
  background:var(--charcoal); border-top:1px solid var(--line);
  box-shadow:0 -4px 20px rgba(16,24,40,0.1);
  padding:16px 24px;
  display:flex; align-items:center; justify-content:center; gap:20px; flex-wrap:wrap;
}
.cookie-banner p{
  margin:0; color:var(--muted); font-size:13.5px; line-height:1.5; max-width:640px;
}
.cookie-banner p a{ color:var(--amber); text-decoration:none; }
.cookie-banner p a:hover{ text-decoration:underline; }
.cookie-banner .actions{ display:flex; gap:10px; flex-shrink:0; }
.cookie-banner button{
  font-family:'Inter',sans-serif; font-size:13.5px; font-weight:600;
  border-radius:7px; padding:9px 18px; cursor:pointer; white-space:nowrap;
}
.cookie-banner .accept{ background:var(--amber); color:#fff; border:none; }
.cookie-banner .accept:hover{ background:var(--amber-deep); }
.cookie-banner .decline{ background:none; border:1px solid var(--line); color:var(--paper); }
.cookie-banner .decline:hover{ border-color:var(--amber); }
