:root {
  --blue: #1E195A;
  --blue-dark: #0f0c29;
  --orange: #FF7828;
  --green: #7bbf2a;
  --ink: #1b2430;
  --muted: #607083;
  --line: #dce5eb;
  --pale: #f4f8fb;
  --white: #fff;
  --shadow: 0 8px 24px rgba(20, 38, 70, .10);
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: #eef4f8; border-bottom: 1px solid var(--line); font-size: 13px; color: #526174; }
.topbar .container, .mainbar .container { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.quicklinks, .main-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mainbar { background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.mainbar .container { min-height: 74px; }
.brand { display: inline-flex; align-items: center; color: var(--blue); font-size: 28px; font-weight: 900; }
.brand-logo { display: block; width: 190px; max-height: 58px; object-fit: contain; }
.main-actions a { color: #34465b; font-weight: 800; }
.breadcrumb { background: #fbfdff; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.breadcrumb .container { min-height: 42px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--blue); font-weight: 800; }
.button-link, .btn { min-height: 42px; border: 0; border-radius: 4px; background: var(--orange); color: white !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; font-weight: 900; }
.btn.secondary { background: white; color: var(--blue) !important; border: 1px solid var(--line); }
.hero { background: linear-gradient(90deg, rgba(15,12,41,.94), rgba(30,25,90,.84)), url("hero-infrastructure.png") center/cover; color: white; padding: 76px 0 66px; }
.hero-grid, .tool-layout, .split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 34px; align-items: center; }
.kicker { margin: 0 0 12px; color: var(--orange); text-transform: uppercase; font-size: 13px; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(34px, 5vw, 58px); line-height: 1.03; letter-spacing: 0; }
h2 { color: var(--blue); font-size: clamp(28px, 3.5vw, 42px); line-height: 1.12; margin-bottom: 12px; letter-spacing: 0; }
h3 { color: var(--blue); }
.hero h2 { color: var(--blue); font-size: 24px; }
.hero-text, .hero p { color: rgba(255,255,255,.86); font-size: 18px; line-height: 1.65; max-width: 720px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.hero-stats div { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.09); border-radius: 8px; padding: 16px; min-height: 92px; }
.hero-stats strong { display: block; font-size: 28px; line-height: 1; }
.hero-stats span { display: block; margin-top: 8px; color: rgba(255,255,255,.78); font-size: 13px; }
.hero-card, .tool-box, .info-card { background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 24px; box-shadow: var(--shadow); }
.hero-card a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: #34465b; font-weight: 800; }
.hero-card a:last-child { border-bottom: 0; }
section { padding: 66px 0; }
.section-title { max-width: 780px; margin-bottom: 30px; }
.section-title p, .info-card p, .tool-card p, .tool-intro p, .result-box p, li { color: var(--muted); line-height: 1.65; }
.tools-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tools-search { margin: 22px 0 18px; display: grid; gap: 8px; max-width: 720px; }
.tools-search label { font-size: 14px; }
.tools-search input { min-height: 48px; border-radius: 8px; font-size: 16px; box-shadow: 0 8px 20px rgba(20, 38, 70, .06); }
.tools-search p { margin: 0; color: var(--muted); font-weight: 800; font-size: 14px; }
.tool-card.is-hidden, .category-heading.is-hidden, .tools-grid.is-hidden { display: none; }
.category-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 30px; }
.category-strip a { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 10px 14px; color: #34465b; font-weight: 900; font-size: 14px; }
.category-heading { margin: 42px 0 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.category-heading h3 { font-size: 24px; margin-bottom: 6px; }
.category-heading p { color: var(--muted); line-height: 1.6; margin: 0; }
.tool-card { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 18px; min-height: 172px; box-shadow: 0 4px 16px rgba(20, 38, 70, .06); display: flex; flex-direction: column; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #c9d8e4; box-shadow: 0 10px 24px rgba(20, 38, 70, .12); }
.tool-card span { color: var(--orange); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.tool-card h3 { margin: 12px 0 8px; font-size: 18px; }
.band { background: var(--pale); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-list { display: grid; gap: 12px; }
.note-list p { margin: 0; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-weight: 800; color: #34465b; }
.tool-main { background: var(--pale); }
.tool-main + .seo-content { border-top: 0; }
.tool-layout { align-items: start; }
.tool-intro { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 24px; box-shadow: var(--shadow); }
.tool-box { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { color: #34465b; font-size: 13px; font-weight: 900; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 11px 12px; background: white; color: var(--ink); }
textarea { min-height: 112px; resize: vertical; }
.drop-zone { border: 2px dashed #c8d8e6; border-radius: 8px; background: #fbfdff; padding: 18px; display: grid; gap: 10px; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--orange); background: #fff8f2; box-shadow: 0 8px 20px rgba(255, 120, 40, .10); }
.drop-zone input[type="file"] { border: 0; padding: 0; background: transparent; }
.drop-zone-title { color: var(--blue); font-size: 16px; font-weight: 900; }
.drop-zone-help, .drop-zone-files { color: var(--muted); font-size: 13px; line-height: 1.5; }
.drop-zone-files { border-top: 1px solid var(--line); padding-top: 10px; overflow-wrap: anywhere; }
.result-box { background: #fbfdff; border: 1px solid var(--line); border-radius: 8px; min-height: 88px; padding: 18px; }
.result-value { display: block; color: var(--blue); font-size: 30px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.notice { border: 1px solid #f2d7bd; background: #fff7ef; color: #7a3a0a; border-radius: 8px; padding: 12px 14px; line-height: 1.55; font-size: 14px; }
.notice strong { display: block; margin-bottom: 3px; color: #643008; }
.success-note { border-color: #cfe8c4; background: #f2fbef; color: #2f631d; }
.copy-output { width: 100%; min-height: 96px; background: #fbfdff; }
.color-preview { min-height: 96px; border: 1px solid var(--line); border-radius: 8px; background: #ff7828; }
.preview-image { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; background: white; }
.geometry-diagram-wrap { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; padding: 14px; }
.geometry-diagram { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.geometry-diagram path, .geometry-diagram rect, .geometry-diagram circle, .geometry-diagram ellipse { fill: rgba(38, 91, 124, .08); stroke: var(--blue); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.geometry-diagram .dash { fill: none; stroke: var(--orange); stroke-width: 3; stroke-dasharray: 7 6; }
.geometry-diagram text { fill: #34465b; font: 700 13px Arial, sans-serif; stroke: none; }
.invoice-preview, .print-preview, .document-preview { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 22px; color: #1b2430; }
.invoice-line { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.print-preview { line-height: 1.7; white-space: pre-wrap; }
.document-preview img { display: block; max-width: 100%; height: auto; margin: 0 auto 22px; page-break-inside: avoid; }
.download-row { display: flex; gap: 10px; flex-wrap: wrap; }
.calculator-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.calculator-grid button { min-height: 46px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--blue); font-weight: 900; cursor: pointer; }
.calculator-grid button:hover { border-color: var(--orange); background: #fff8f2; }
.calculator-grid .calculator-equals { background: var(--orange); border-color: var(--orange); color: white; }
.signature-canvas, .tool-canvas { width: 100%; max-width: 720px; height: auto; border: 1px solid var(--line); border-radius: 8px; background: white; touch-action: none; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 86px; min-height: 64px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: end center; padding: 7px; font-size: 12px; font-weight: 900; color: white; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.faq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.faq-grid article { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: white; }
.seo-content { background: white; border-top: 1px solid var(--line); }
.seo-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .45fr); gap: 28px; align-items: start; }
.seo-content p { color: var(--muted); line-height: 1.75; }
.seo-content ul { padding-left: 20px; }
.seo-content li { margin-bottom: 8px; }
.seo-faq { display: grid; gap: 14px; }
.seo-faq article { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--pale); }
.seo-faq h3 { margin-bottom: 8px; font-size: 18px; }
footer { background: #101828; color: white; padding: 44px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 24px; }
footer p, footer a { color: rgba(255,255,255,.72); line-height: 1.7; }
footer h3 { color: white; margin-bottom: 12px; }
footer a { display: block; margin-bottom: 8px; }
.page-footer-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px; color: rgba(255,255,255,.58); font-size: 13px; }
@media (max-width: 980px) {
  .hero-grid, .tool-layout, .split { grid-template-columns: 1fr; }
  .seo-layout { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .topbar { display: none; }
  .mainbar .container { align-items: flex-start; padding: 12px 0; flex-direction: column; }
  .brand-logo { width: 160px; }
  .hero-stats, .form-grid, .tools-grid, .faq-grid, .footer-grid { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
}
@media print {
  body * { visibility: hidden; }
  #invoicePreview, #invoicePreview *, #pdfPreview, #pdfPreview *, #imagesPdfPreview, #imagesPdfPreview * { visibility: visible; }
  #invoicePreview, #pdfPreview, #imagesPdfPreview { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; }
}
