/* Public engineering pages share the main site's local fonts, navy/amber
   palette, spacing and surfaces. Load after native tool CSS. Selectors are
   scoped; technical diagrams and exported reports keep native styles. */
body.vg-engineering {
  --vg-host-navy: #0a1628;
  --vg-host-navy-mid: #0d1f3c;
  --vg-host-accent: #f59e0b;
  --vg-host-accent-text: #b45309;
  --vg-host-text: #1e293b;
  --vg-host-muted: #5b6b7c;
  --vg-host-bg: #f8fafc;
  --vg-host-gray: #f1f5f9;
  --vg-host-border: #e2e8f0;
  --vg-host-heading: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --vg-host-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --vg-host-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --ink: #1e293b;
  --muted: #5b6b7c;
  --line: #e2e8f0;
  margin: 0;
  font: 16px/1.6 var(--vg-host-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: light;
}
.vg-engineering :is(.hero, .tools-section, .workflow, .knowledge, .faq, .stat-strip, .document-page, #vg-top, #vg-export) * { box-sizing: border-box; }
.vg-engineering :is(#vg-top, #vg-tool-workspace) { box-sizing: border-box; }
.vg-engineering :is(.hero, .tools-section, .workflow, .knowledge, .faq, .document-page) :is(h1, h2, h3, h4) { font-family: var(--vg-host-heading); color: var(--vg-host-navy); }
.vg-engineering :is(.hero, .tools-section, .workflow, .knowledge, .faq, .document-page) :is(button, input, select, textarea) { font-family: var(--vg-host-body); }
.vg-engineering :is(.hero, .tools-section, .workflow, .knowledge, .faq, .stat-strip) .container,
.vg-engineering .container.stat-strip { width: 100%; max-width: 1200px; padding-inline: 1.5rem; margin-inline: auto; }
.vg-engineering :is(.hero, .tools-section, .workflow, .knowledge, .faq, .document-page, #vg-top, #vg-export) :focus-visible { outline: 3px solid var(--vg-host-accent-text); outline-offset: 3px; }
.vg-engineering :is(.hero, .document-page) .primary {
  min-height: 44px;
  border: 2px solid var(--vg-host-accent);
  border-radius: 6px;
  padding: .7rem 1.4rem;
  background: var(--vg-host-accent);
  color: var(--vg-host-navy);
  font: 600 .93rem/1.25 var(--vg-host-heading);
  transition: background-color .2s ease, border-color .2s ease;
}
.vg-engineering :is(.hero, .document-page) .primary:hover { background: #fcd34d; border-color: #fcd34d; }

/* The catalogue opens with the dark hero used by the knowledge hub. */
.vg-engineering--catalog .hero { min-height: 0; background: linear-gradient(135deg, #081120, #0d1f3c); color: #fff; border: 0; }
.vg-engineering--catalog .hero-grid { padding-block: 3rem 3.25rem; gap: 3.5rem; }
.vg-engineering--catalog .hero h1 {
  margin: .9rem 0 .7rem;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #fff;
}
.vg-engineering--catalog .hero h1 span { color: #fcd34d; }
.vg-engineering--catalog .hero :is(.hero-copy, .hero-note) { color: rgba(255, 255, 255, .78); }
.vg-engineering--catalog .hero-copy { max-width: 34rem; font-size: 1rem; line-height: 1.7; }
.vg-engineering--catalog .eyebrow { font: 600 .75rem/1.4 var(--vg-host-heading); letter-spacing: .08em; color: #fcd34d; }
.vg-engineering--catalog .eyebrow::before { box-shadow: 0 0 0 4px rgba(245, 158, 11, .15); }
.vg-engineering--catalog .hero-actions { gap: 1.5rem; margin-block: 1.5rem; flex-wrap: wrap; }
.vg-engineering--catalog .hero .secondary { color: #fff; font-family: var(--vg-host-heading); font-size: .93rem; }
.vg-engineering--catalog .hero .secondary:hover { color: #fcd34d; }
.vg-engineering--catalog .hero-note { font-size: .78rem; }
.vg-engineering--catalog .hero-note svg { color: #fcd34d; }
.vg-engineering--catalog .instrument {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .14);
  border-radius: 20px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, .2);
  transform: none;
}
.vg-engineering--catalog .instrument-results strong { font-family: var(--vg-host-heading); }
.vg-engineering--catalog .trace path[stroke='#23c7eb'] { stroke: #3b82f6; }
.vg-engineering--catalog .trace circle[fill='#23c7eb'] { fill: #3b82f6; }
.vg-engineering--catalog .trace stop[stop-color='#15cef1'] { stop-color: #3b82f6; }
.vg-engineering--catalog .stat-strip { padding-block: 1.5rem; font-size: .8rem; color: var(--vg-host-muted); }
.vg-engineering--catalog .stat-strip strong { font-family: var(--vg-host-heading); color: var(--vg-host-navy); font-size: 1.2rem; }
.vg-engineering--catalog .tools-section { padding-block: 2.5rem 4rem; }
.vg-engineering--catalog .section-heading { margin-bottom: 1.5rem; }
.vg-engineering--catalog .section-heading h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; }
.vg-engineering--catalog :is(.section-heading p, .workflow p, .knowledge p, .faq details p) { font-size: .9rem; color: var(--vg-host-muted); }
.vg-engineering--catalog .kicker { font: 600 .72rem/1.4 var(--vg-host-heading); letter-spacing: .08em; color: var(--vg-host-accent-text); }
.vg-engineering--catalog .search input { min-height: 44px; border-color: var(--vg-host-border); border-radius: 6px; font-size: .88rem; color: var(--vg-host-text); }
.vg-engineering--catalog .filter { min-height: 40px; background: var(--th-surface); color: var(--vg-host-muted); border-color: var(--vg-host-border); border-radius: 6px; font: 600 .8rem/1.35 var(--vg-host-heading); }
.vg-engineering--catalog .filter:hover { background: var(--th-tint-amber); border-color: var(--vg-host-accent); }
.vg-engineering--catalog .filter.active { background: var(--vg-host-navy); border-color: var(--vg-host-navy); color: #fff; }
.vg-engineering--catalog .filter .count { font-size: .72rem; opacity: 1; }
.vg-engineering--catalog .tool-grid { gap: 1.25rem; }
.vg-engineering--catalog .tool-card {
  background: var(--th-surface);
  border-color: var(--vg-host-border);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
  min-height: 230px;
  box-shadow: var(--vg-host-shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.vg-engineering--catalog .tool-card:hover { border-color: var(--vg-host-accent); transform: translateY(-4px); box-shadow: 0 10px 25px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .06); }
.vg-engineering--catalog .card-icon { width: 42px; height: 42px; color: var(--vg-host-navy); background: linear-gradient(135deg, #f59e0b, #d97706); border-radius: 10px; }
.vg-engineering--catalog .category-badge { background: var(--vg-host-gray); color: var(--vg-host-muted); font: 600 .6875rem/1.4 var(--vg-host-heading); }
.vg-engineering--catalog .tool-card h3 { font: 700 1.05rem/1.3 var(--vg-host-heading); letter-spacing: 0; margin-bottom: .55rem; }
.vg-engineering--catalog .tool-card p { font-size: .9rem; line-height: 1.55; color: var(--vg-host-muted); }
.vg-engineering--catalog .card-bottom { color: var(--vg-host-accent-text); font: 600 .85rem/1.4 var(--vg-host-body); }
.vg-engineering--catalog .favorite { color: var(--vg-host-muted); width: 36px; height: 36px; }
.vg-engineering--catalog .favorite[aria-pressed=true] { color: var(--clr-accent-text); }
.vg-engineering--catalog :is(.result-row, .recent) { font-size: .8rem; color: var(--vg-host-muted); }
.vg-engineering--catalog .empty { border-color: var(--vg-host-border); border-radius: 12px; font-size: .9rem; }
.vg-engineering--catalog :is(.workflow, .knowledge) { padding-block: 3rem; }
.vg-engineering--catalog .workflow h3 { font-size: 1.05rem; }
.vg-engineering--catalog .step-number { border-color: var(--th-amber-line); background: var(--th-tint-amber); color: var(--clr-accent-text); border-radius: 6px; font-family: var(--vg-host-heading); }
.vg-engineering--catalog .knowledge article { border-radius: 12px; border-color: var(--vg-host-border); box-shadow: var(--vg-host-shadow); }
.vg-engineering--catalog .knowledge h2 { font-size: 1.45rem; letter-spacing: 0; }
.vg-engineering--catalog .knowledge a { font-size: .88rem; }
.vg-engineering--catalog .faq h2 { font-size: 1.75rem; letter-spacing: 0; }
.vg-engineering--catalog .faq details { border-radius: 12px; border-color: var(--vg-host-border); padding: 1rem 1.25rem; }
.vg-engineering--catalog .faq summary { font: 600 .95rem/1.5 var(--vg-host-heading); }

/* Help/resource pages use the site's article typography and card treatment. */
.vg-engineering--info .document-page { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.vg-engineering--info .document-page:has(.resource-list) { max-width: 1200px; }
.vg-engineering--info .document-page h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin-block: .5rem .9rem; }
.vg-engineering--info .document-page h2 { font-size: 1.45rem; font-weight: 700; margin-block: 2rem .8rem; }
.vg-engineering--info .document-page :is(p, li) { color: var(--vg-host-text); font-size: .94rem; line-height: 1.8; }
.vg-engineering--info .document-page p { margin-block: 0 1rem; }
.vg-engineering--info .document-page li { margin-bottom: .45rem; }
.vg-engineering--info .document-page ul { padding-left: 1.25rem; }
.vg-engineering--info .document-page .back { color: var(--vg-host-accent-text); font-size: .85rem; margin-bottom: .75rem; }
.vg-engineering--info .document-page :is(.portal-entry, .resource-card) { border-color: var(--vg-host-border); border-radius: 12px; box-shadow: var(--vg-host-shadow); }
.vg-engineering--info .portal-entry { border-left-color: var(--vg-host-accent); }
.vg-engineering--info .portal-entry h2 { margin-top: 0; }
.vg-engineering--info .resource-summary div { background: var(--th-surface); border-color: var(--vg-host-border); box-shadow: var(--vg-host-shadow); }
.vg-engineering--info .resource-summary strong { font-family: var(--vg-host-heading); color: var(--vg-host-accent-text); }
.vg-engineering--info .resource-controls :is(input, select) { border-color: var(--vg-host-border); border-radius: 6px; min-height: 44px; }
.vg-engineering--info .resource-card h3 { font-size: 1.05rem; font-weight: 700; }
.vg-engineering--info .resource-card p { font-size: .9rem; line-height: 1.65; }
.vg-engineering--info .resource-tag { background: var(--th-tint-amber); color: var(--th-amber-ink); }
.vg-engineering--info .resource-license { background: var(--vg-host-gray); color: var(--vg-host-muted); }
.vg-engineering--info .document-page th { font-family: var(--vg-host-heading); background: var(--vg-host-navy); color: #fff; }
.vg-engineering--info .document-page :is(th, td) { padding: .65rem .9rem; font-size: .86rem; border-color: var(--vg-host-border); }

/* Native full-screen editor layouts stay inside the workspace. */
@media screen {
  body.vg-engineering {
    display: block !important;
    height: auto !important;
    min-height: 100vh;
    padding: 0 !important;
    background: var(--vg-host-bg) !important;
    color: var(--vg-host-text) !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    font-family: var(--vg-host-body) !important;
  }
  .vg-engineering > .vg-header { flex: none; }
  .vg-engineering > .vg-footer { margin-top: 0; }
  .vg-engineering #vg-top {
    position: relative;
    z-index: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 2rem max(1.5rem, calc((100% - 1200px) / 2 + 1.5rem)) 2.25rem;
    background: linear-gradient(135deg, #081120, #0d1f3c);
    color: #fff;
    border: 0;
    border-radius: 0 !important;
    box-shadow: none;
    font-family: var(--vg-host-body);
  }
  .vg-engineering #vg-top .vg-topline { justify-content: flex-start; border-bottom: 0; padding: 0; margin-bottom: 1rem; gap: 1rem; }
  .vg-engineering #vg-top .vg-links { gap: 1.2rem; }
  .vg-engineering #vg-top .vg-brand { display: none; }
  .vg-engineering #vg-top .vg-back { font-size: .8rem; color: rgba(255, 255, 255, .8); }
  .vg-engineering #vg-top .vg-back:hover { color: #fcd34d; text-decoration: underline; }
  .vg-engineering #vg-top .vg-crumb { font: 600 .72rem/1.4 var(--vg-host-heading); color: #fcd34d; letter-spacing: .06em; margin-bottom: .65rem; }
  .vg-engineering #vg-top h1 { max-width: 60rem; margin: 0 0 .7rem; font: 800 clamp(1.8rem, 3.7vw, 2.6rem)/1.2 var(--vg-host-heading); letter-spacing: -.02em; color: #fff; -webkit-text-fill-color: #fff; }
  .vg-engineering #vg-top .vg-description { max-width: 54rem; color: rgba(255, 255, 255, .78); font-size: .94rem; line-height: 1.7; }
  .vg-engineering #vg-top details { max-width: 65rem; border-color: rgba(255, 255, 255, .12); padding-top: .8rem; margin-top: 1rem; }
  .vg-engineering #vg-top summary { font: 600 .85rem/1.5 var(--vg-host-heading); color: #fcd34d; }
  .vg-engineering #vg-top .vg-method { color: rgba(255, 255, 255, .78); font-size: .82rem; line-height: 1.8; }
  .vg-engineering #vg-top .vg-method strong { color: #fff; }
  .vg-engineering #vg-top .vg-method a { color: #fcd34d; }
  .vg-engineering #vg-top :focus-visible { outline-color: #fcd34d; }
  .vg-engineering #vg-tool-workspace { min-width: 0; padding-block: 1.5rem 3rem; background: var(--vg-host-bg) !important; }
  .vg-engineering #vg-origin { font: .75rem/1.7 var(--vg-host-body); color: var(--vg-host-muted); margin: 0 auto; padding: 1rem 1.5rem 2rem; }
  .vg-engineering #vg-export { font-family: var(--vg-host-body); z-index: 900; }
  .vg-engineering #vg-export details { border-color: var(--vg-host-border); border-radius: 12px; box-shadow: 0 10px 25px -3px rgba(0, 0, 0, .12); }
  .vg-engineering #vg-export summary { font-family: var(--vg-host-heading); color: var(--vg-host-navy); }
  .vg-engineering #vg-export summary::before { background: var(--vg-host-accent); color: var(--vg-host-navy); border-radius: 6px; }
  .vg-engineering #vg-export button { font: 600 .8rem/1.35 var(--vg-host-heading); color: var(--vg-host-navy); background: var(--th-surface); border-color: var(--vg-host-border); border-radius: 6px; }
  .vg-engineering #vg-export button:hover { background: var(--th-tint-amber); border-color: var(--vg-host-accent); }
  .vg-engineering #vg-export button.vg-primary { background: var(--vg-host-accent); border-color: var(--vg-host-accent); color: var(--vg-host-navy); }
  .vg-engineering #vg-export button.vg-primary:hover { background: #fcd34d; border-color: #fcd34d; }
  .vg-engineering #vg-export :is(.vg-export-note, #vg-export-status) { color: var(--vg-host-muted); }
  .vg-engineering #vg-export #vg-export-status[data-error=true] { color: var(--th-red-ink); }
}
@media screen and (max-width: 720px) {
  .vg-engineering--catalog .hero-grid { padding-block: 2.25rem; gap: 2rem; }
  .vg-engineering--catalog .hero h1 { font-size: clamp(2rem, 7.6vw, 2.6rem); }
  .vg-engineering--catalog .hero-note { gap: .7rem 1rem; }
  .vg-engineering--catalog .hero-copy { font-size: .94rem; }
  .vg-engineering--catalog .tool-grid { grid-template-columns: 1fr; }
  .vg-engineering--catalog .tool-card { min-height: 215px; }
  .vg-engineering--catalog .workflow-grid { gap: 1.5rem; }
  .vg-engineering--catalog :is(.workflow, .knowledge) { padding-block: 2.25rem; }
  .vg-engineering--catalog .filter-favorite { margin-left: 0; }
  .vg-engineering #vg-top { padding-block: 1.5rem 1.75rem; }
  .vg-engineering #vg-top .vg-links { gap: .55rem 1rem; }
  .vg-engineering #vg-top .vg-back { font-size: .75rem; }
  .vg-engineering #vg-top h1 { font-size: clamp(1.65rem, 6vw, 2.1rem); }
  .vg-engineering #vg-top .vg-description { font-size: .88rem; }
  .vg-engineering #vg-tool-workspace { padding-top: 1rem; }
  .vg-engineering #vg-export { right: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .vg-engineering--catalog .tool-card:hover { transform: none; } }
@media print {
  .vg-engineering > :is(.vg-header, .vg-footer, .skip-to-content),
  .vg-engineering #vg-top,
  .vg-engineering #vg-origin,
  .vg-engineering #vg-export { display: none !important; }
  .vg-engineering #vg-tool-workspace { margin: 0; padding: 0; }
}

/* Koyu tema (data-theme, css/vg-shell.css --th-*): katalog ve bilgi sayfaları koyulaşır. Araç sayfalarında
   #vg-tool-workspace bilinçli olarak açık "kâğıt" kalır: teknik çizimler, grafik renkleri ve yazdırma/PDF
   düzenleri açık zemine göre tasarlanmıştır (color-scheme: light, sabit açık zemin). */
@media screen {
  :root[data-theme="dark"] body.vg-engineering:not(.vg-engineering--tool) {
    --vg-host-text: var(--th-text);
    --vg-host-muted: var(--th-muted);
    --vg-host-bg: var(--th-page);
    --vg-host-gray: var(--th-surface-3);
    --vg-host-border: var(--th-border);
    --vg-host-accent-text: var(--th-accent-text);
    --vg-host-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    --ink: var(--th-text);
    --muted: var(--th-muted);
    --line: var(--th-border);
    --paper: var(--th-page);
    color-scheme: dark;
  }
  :root[data-theme="dark"] body.vg-engineering:not(.vg-engineering--tool) :is(.tools-section, .workflow, .knowledge, .faq, .document-page) :is(h1, h2, h3, h4),
  :root[data-theme="dark"] .vg-engineering--catalog .stat-strip strong { color: var(--th-heading); }
  :root[data-theme="dark"] .vg-engineering--catalog .filter.active { background: var(--th-heading); border-color: var(--th-heading); color: #0a1628; }
  :root[data-theme="dark"] body.vg-engineering--tool { background: #f8fafc; color-scheme: light; }
}
