:root{
  --ink:#111827;
  --muted:#475569;
  --line:#d7dee8;
  --soft:#f8fafc;
  --accent:#d60000;
  --gold:#f7d99b;
}
*{box-sizing:border-box}
html{background:#eef2f7}
body.pdf-export-page{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--ink);
  background:#eef2f7;
  line-height:1.48;
  font-size:15px;
}
.pdf-toolbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  padding:12px 18px;
  background:#111827;
  color:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.16);
}
.pdf-toolbar button,.pdf-toolbar a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:#d60000;
  color:#fff;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}
.pdf-toolbar a{background:transparent}
.pdf-page{
  width:min(1050px, calc(100% - 32px));
  margin:26px auto 38px;
  padding:34px;
  background:#fff;
  border-radius:18px;
  box-shadow:0 18px 60px rgba(15,23,42,.12);
}
.pdf-header{
  display:grid;
  grid-template-columns:1fr auto;
  gap:22px;
  align-items:start;
  border-bottom:3px solid var(--ink);
  padding-bottom:18px;
  margin-bottom:22px;
}
.pdf-brand{
  font-weight:900;
  color:var(--accent);
  letter-spacing:.02em;
  text-align:right;
  white-space:nowrap;
}
h1{font-size:34px;line-height:1.08;margin:0 0 10px;text-transform:uppercase;letter-spacing:.01em}
h2{font-size:22px;margin:26px 0 12px;line-height:1.2}
h3{font-size:18px;margin:0 0 10px;line-height:1.25}.pdf-subtitle{color:var(--muted);margin:0;font-size:15px}.pdf-meta{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin:18px 0 24px;
}
.pdf-meta-item{border:1px solid var(--line);border-radius:12px;background:var(--soft);padding:10px 12px}
.pdf-meta-item b{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;margin-bottom:3px}.pdf-box,.procedure-tools-used,.procedure-parts-used{
  border:1px solid var(--line);
  padding:16px;
  margin:20px 0;
  border-radius:14px;
  background:#fafafa;
  break-inside:avoid;
  page-break-inside:avoid;
}.procedure-tools-used{background:#f8fbff;border-color:#bfdbfe}.procedure-parts-used{background:#fffdf2;border-color:#f7d99b}.procedure-tools-used h2,.procedure-parts-used h2{margin-top:0}.procedure-tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:12px;
}.procedure-tool-card,.procedure-part-card{
  margin:0;
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  break-inside:avoid;
  page-break-inside:avoid;
}.procedure-tool-card img,.procedure-part-card img{
  width:100%;
  height:105px;
  object-fit:contain;
  display:block;
  background:#fff;
  padding:6px;
}.procedure-tool-card figcaption,.procedure-part-card figcaption{padding:8px 10px;font-weight:800;color:#142033}.procedure-tool-card div,.procedure-part-card div{padding:0 10px 10px;color:#64748b;font-size:13px}.pdf-step{
  display:grid;
  grid-template-columns:42% 1fr;
  gap:20px;
  align-items:start;
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:22px;
  break-inside:avoid;
  page-break-inside:avoid;
}.pdf-step-media img{
  width:100%;
  max-height:360px;
  object-fit:contain;
  display:block;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
}.pdf-step-content{min-width:0}.pdf-step-badge{display:inline-block;background:var(--accent);color:#fff;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:900;margin-bottom:8px}.pdf-step-body :first-child{margin-top:0}.pdf-step-body img{max-width:100%;height:auto}.procedure-step-tools-inline,.procedure-step-parts-inline{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(105px,1fr));
  gap:10px;
  margin:14px 0 0;
  padding:12px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
}
.procedure-step-tools-inline>strong,.procedure-step-parts-inline>strong{grid-column:1/-1}.procedure-step-tool-card{margin:0;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#fff}.procedure-step-tool-card img{width:100%;height:84px;object-fit:contain;background:#fff;padding:5px;display:block}.procedure-step-tool-card figcaption{font-weight:800;font-size:12px;padding:6px}.procedure-step-tool-card small{display:block;color:#64748b;font-size:11px;padding:0 6px 6px}.pdf-content{margin-top:20px}.pdf-content img{max-width:100%;height:auto;border-radius:12px}
@media (max-width:800px){
  .pdf-page{width:calc(100% - 18px);padding:20px}.pdf-header{grid-template-columns:1fr}.pdf-brand{text-align:left}.pdf-meta{grid-template-columns:1fr 1fr}.pdf-step{grid-template-columns:1fr}h1{font-size:26px}
}
@page{size:A4;margin:12mm}
@media print{
  html,body.pdf-export-page{background:#fff;font-size:11.5pt;color:#000}
  .pdf-toolbar{display:none!important}
  .pdf-page{width:auto;margin:0;padding:0;border-radius:0;box-shadow:none;background:#fff}
  .pdf-header{border-bottom:2px solid #000;margin-bottom:12px;padding-bottom:10px}
  h1{font-size:21pt}h2{font-size:16pt;margin:14pt 0 8pt}h3{font-size:13pt}
  .pdf-meta{grid-template-columns:repeat(4,1fr);gap:5mm;margin:8mm 0}
  .pdf-meta-item{padding:3mm;border-color:#bbb;background:#fff}
  .pdf-box,.procedure-tools-used,.procedure-parts-used{padding:4mm;margin:6mm 0;background:#fff;border-color:#bbb}
  .procedure-tools-grid{grid-template-columns:repeat(4,1fr);gap:4mm}
  .procedure-tool-card img,.procedure-part-card img{height:32mm;object-fit:contain}
  .pdf-step{grid-template-columns:42% 1fr;gap:6mm;margin-top:7mm;padding-top:7mm;border-top:1px solid #ccc}
  .pdf-step-media img{max-height:78mm;border-color:#ccc}
  .pdf-step-badge{background:#000;color:#fff}
  .procedure-step-tool-card img{height:24mm}
  a{color:#000;text-decoration:none}
}
