/* ============================================================
   Ceygate Solutions — site stylesheet
   Palette from brand logo: red #ED1C24, gray #939598
   Themes: light (default) and dark, switched via
   <html data-theme="..."> (set before paint by an inline script).
   ============================================================ */

:root {
  --red: #ED1C24;
  --red-hover: #c8151c;
  --red-soft: rgba(237, 28, 36, 0.08);
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --panel: #ffffff;
  --panel-edge: #e4e7ec;
  --text: #171c26;
  --muted: #5b6472;
  --gray: #82868c;
  --header-bg: rgba(255, 255, 255, 0.85);
  --header-bg-solid: rgba(255, 255, 255, 0.97);
  --grid-line: rgba(20, 30, 50, 0.05);
  --hero-tint: rgba(237, 28, 36, 0.06);
  --hero-tint2: rgba(60, 90, 160, 0.06);
  --card-shadow: 0 18px 40px -20px rgba(30, 40, 60, 0.28);
  --cta-band-bg: linear-gradient(120deg, #fdf1f1, #f6f7f9 55%);
  --ok-bg: #e9f7ef; --ok-border: #a7dcbb; --ok-text: #17703a;
  --err-bg: #fdeced; --err-border: #f3b1b4; --err-text: #ab1218;
  --max: 1160px;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --red-hover: #ff353d;
  --red-soft: rgba(237, 28, 36, 0.12);
  --bg: #0b0e14;
  --bg-alt: #10141c;
  --panel: #151b26;
  --panel-edge: #232b3a;
  --text: #e8eaee;
  --muted: #9aa1ab;
  --gray: #939598;
  --header-bg: rgba(11, 14, 20, 0.85);
  --header-bg-solid: rgba(11, 14, 20, 0.95);
  --grid-line: rgba(255, 255, 255, 0.025);
  --hero-tint: rgba(237, 28, 36, 0.10);
  --hero-tint2: rgba(60, 90, 160, 0.10);
  --card-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --cta-band-bg: linear-gradient(120deg, #1a0c0e, #10141c 55%);
  --ok-bg: rgba(46, 160, 67, 0.15); --ok-border: rgba(46, 160, 67, 0.5); --ok-text: #7ee2a8;
  --err-bg: rgba(237, 28, 36, 0.12); --err-border: rgba(237, 28, 36, 0.5); --err-text: #ff8a8f;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: #fff; padding: 10px 18px; z-index: 200;
}
.skip-link:focus { left: 0; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }

/* Theme-dependent logo variants */
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--panel-edge); background: var(--header-bg-solid); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 18px;
}

.brand { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; margin-right: auto; }
.brand img { width: 148px; height: auto; }
.brand-sub {
  font-size: 0.62rem; letter-spacing: 0.42em; color: var(--gray); font-weight: 600;
  transform: translateY(-4px);
}

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) {
  font-size: 0.95rem; color: var(--muted); font-weight: 500;
  padding: 6px 0; position: relative; transition: color 0.2s;
}
.site-nav a:not(.btn):hover, .site-nav a.active { color: var(--text); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--red); border-radius: 2px;
}

.theme-toggle {
  background: none; border: 1px solid var(--panel-edge); border-radius: 9px;
  width: 38px; height: 38px; display: grid; place-items: center;
  cursor: pointer; color: var(--muted); flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--gray); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 5px 0; border-radius: 2px; transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 0;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--panel-edge);
}
.btn-ghost:hover { border-color: var(--gray); }
.nav-cta { padding: 10px 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 110px 0 90px;
  background:
    radial-gradient(ellipse 60% 50% at 75% 10%, var(--hero-tint), transparent 60%),
    radial-gradient(ellipse 50% 60% at 15% 90%, var(--hero-tint2), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero .container { position: relative; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); background: var(--red-soft);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 26px;
}
.hero-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  max-width: 780px; margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead {
  font-size: 1.16rem; color: var(--muted); max-width: 640px; margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 80px; padding-top: 40px;
  border-top: 1px solid var(--panel-edge);
}
.hero-stats .stat b { display: block; font-size: 1.9rem; color: var(--text); }
.hero-stats .stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Sections ---------- */
section { padding: 90px 0; }
section.alt { background: var(--bg-alt); }

.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-kicker {
  color: var(--red); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.16em; text-transform: uppercase; display: block; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Service cards ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.service-card {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 30px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(237, 28, 36, 0.45);
  box-shadow: var(--card-shadow);
}
.service-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--red-soft); color: var(--red);
  display: grid; place-items: center;
}
.service-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-size: 1.18rem; }
.service-card p { color: var(--muted); font-size: 0.96rem; flex: 1; }
.card-link { color: var(--red); font-weight: 600; font-size: 0.92rem; }
.card-link:hover { color: var(--red-hover); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 56px; }
.why-item { display: flex; gap: 18px; }
.why-num {
  font-size: 0.9rem; font-weight: 700; color: var(--red);
  border: 1px solid rgba(237, 28, 36, 0.4); border-radius: 10px;
  width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0;
}
.why-item h3 { font-size: 1.08rem; margin-bottom: 6px; }
.why-item p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process-step {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 26px 24px; position: relative;
}
.process-step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 2rem; font-weight: 800; color: var(--red-soft);
  -webkit-text-stroke: 1px rgba(237, 28, 36, 0.55);
  display: block; margin-bottom: 12px;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { color: var(--muted); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--cta-band-bg);
  border-top: 1px solid var(--panel-edge);
  border-bottom: 1px solid var(--panel-edge);
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 32px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(ellipse 55% 60% at 80% 0%, var(--hero-tint), transparent 60%),
    var(--bg-alt);
  border-bottom: 1px solid var(--panel-edge);
}
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 14px; max-width: 760px; }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.breadcrumb { font-size: 0.85rem; color: var(--gray); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* ---------- Service detail ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.feature-list { display: grid; gap: 18px; margin-top: 34px; }
.feature-item {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 22px 24px;
}
.feature-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-item h3::before { content: "— "; color: var(--red); }
.feature-item p { color: var(--muted); font-size: 0.95rem; }

.detail-aside {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 28px; position: sticky; top: 100px;
}
.detail-aside h3 { font-size: 1.02rem; margin-bottom: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag-list li {
  font-size: 0.83rem; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--panel-edge);
  padding: 6px 12px; border-radius: 999px;
}
.detail-aside .btn { width: 100%; text-align: center; }
.aside-note { font-size: 0.85rem; color: var(--gray); margin-top: 14px; text-align: center; }

/* ---------- About ---------- */
.about-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.about-cols .prose p { color: var(--muted); margin-bottom: 18px; font-size: 1.02rem; }
.about-cols .prose p strong { color: var(--text); }
.values-stack { display: grid; gap: 16px; }
.value-card {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--red);
  border-radius: 10px; padding: 20px 22px;
}
.value-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.value-card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 380px 1fr; gap: 48px; align-items: start; }
.contact-info-card {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 30px;
}
.contact-info-card h3 { margin-bottom: 18px; font-size: 1.1rem; }
.contact-info-card ul { display: grid; gap: 14px; }
.contact-info-card li { color: var(--muted); font-size: 0.96rem; }
.contact-info-card li b { color: var(--text); display: block; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.contact-info-card a:hover { color: var(--red); }

.contact-form {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 34px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; }
.form-group label .req { color: var(--red); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--panel-edge);
  color: var(--text); font: inherit; font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--red);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status { margin-top: 16px; padding: 13px 16px; border-radius: 9px; font-size: 0.94rem; display: none; }
.form-status.ok { display: block; background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }
.form-status.err { display: block; background: var(--err-bg); border: 1px solid var(--err-border); color: var(--err-text); }

/* ---------- Footer (always dark, both themes) ---------- */
.site-footer { background: #07090d; border-top: 1px solid #232b3a; padding: 64px 0 0; color: #9aa1ab; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px; padding-bottom: 48px;
}
.footer-brand img { width: 130px; margin-bottom: 16px; }
.footer-brand p { color: #9aa1ab; font-size: 0.92rem; max-width: 300px; }
.footer-values { margin-top: 12px; color: #939598 !important; font-size: 0.82rem !important; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer h4 { font-size: 0.86rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer ul a, .footer-contact li { color: #9aa1ab; font-size: 0.93rem; }
.site-footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #232b3a;
  padding: 22px 24px; text-align: center;
}
.footer-bottom p { color: #939598; font-size: 0.85rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .about-cols, .contact-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 700px) {
  section { padding: 64px 0; }
  .hero { padding: 76px 0 64px; }
  .services-grid, .process-grid, .why-grid, .form-row { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 76px 0 auto 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--panel-edge);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 24px 22px;
    transform: translateY(-130%); transition: transform 0.3s ease;
    z-index: 90;
  }
  .site-nav.open { transform: none; }
  .site-nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--panel-edge); }
  .site-nav a.active::after { display: none; }
  .nav-cta { margin-top: 16px; text-align: center; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ============================================================
   v2 — Tools platform, i18n, blog, tool UI widgets
   ============================================================ */

/* Language switch */
.lang-switch { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.lang-switch a {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  padding: 5px 8px; border-radius: 7px; transition: color 0.2s, background 0.2s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { color: var(--red); background: var(--red-soft); }

/* Tools hub */
.tools-search { margin-top: 26px; max-width: 460px; }
.tools-search input {
  width: 100%; padding: 13px 18px; border-radius: 10px; font: inherit; font-size: 1rem;
  background: var(--panel); border: 1px solid var(--panel-edge); color: var(--text);
}
.tools-search input:focus { outline: none; border-color: var(--red); }
.tools-hub { padding-top: 54px; }
.tool-cat-block { margin-bottom: 56px; }
.tool-cat-head { margin-bottom: 24px; }
.tool-cat-head h2 { font-size: 1.5rem; margin-bottom: 6px; }
.tool-cat-head p { color: var(--muted); max-width: 640px; }
.no-results { color: var(--muted); text-align: center; padding: 40px; }

a.tool-card { text-decoration: none; color: inherit; }
a.tool-card h3 { color: var(--text); }

/* Tool page */
.tool-hero .tool-privacy {
  margin-top: 16px; font-size: 0.9rem; color: var(--muted);
  display: inline-block; background: var(--panel); border: 1px solid var(--panel-edge);
  padding: 8px 16px; border-radius: 999px;
}
.tool-body { padding: 44px 0; }
.tool-card-ui {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 30px; max-width: 760px;
}
.tool-wide { max-width: 100%; }
.tool-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool-field { margin-bottom: 18px; }
.tool-field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 7px; }
.tool-field input, .tool-field select, .tool-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px; font: inherit; font-size: 1rem;
  background: var(--bg); border: 1px solid var(--panel-edge); color: var(--text);
}
.tool-field input:focus, .tool-field select:focus, .tool-field textarea:focus { outline: none; border-color: var(--red); }
.tool-field textarea { min-height: 150px; resize: vertical; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.9rem; }
.tool-hint { font-size: 0.84rem; color: var(--gray); margin-top: 5px; }

.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; align-items: center; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* Result blocks */
.result-box {
  margin-top: 24px; background: var(--bg-alt); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 24px;
}
.result-headline { font-size: 2rem; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.result-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.result-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.result-table td { padding: 9px 4px; border-bottom: 1px solid var(--panel-edge); }
.result-table td:last-child { text-align: right; font-weight: 600; color: var(--text); white-space: nowrap; }
.result-table tr:last-child td { border-bottom: 0; }
.result-table tr.total td { font-size: 1.05rem; padding-top: 14px; border-top: 2px solid var(--panel-edge); border-bottom: 0; }
.result-table tr.total td:last-child { color: var(--red); }
.result-table tr.muted-row td { color: var(--muted); font-weight: 400; }

.bar-track { height: 12px; border-radius: 6px; background: var(--panel-edge); overflow: hidden; display: flex; margin: 4px 0 2px; }
.bar-seg { height: 100%; }

.data-note {
  margin-top: 22px; font-size: 0.82rem; color: var(--gray);
  border-top: 1px dashed var(--panel-edge); padding-top: 14px;
}
.data-note strong { color: var(--muted); }

.output-area {
  width: 100%; min-height: 150px; padding: 14px; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--panel-edge); color: var(--text);
  font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; white-space: pre; overflow: auto;
}
.status-line { margin-top: 10px; font-size: 0.9rem; font-weight: 600; min-height: 1em; }
.status-line.ok { color: var(--ok-text); }
.status-line.err { color: var(--err-text); }
.copied-flash { color: var(--ok-text); font-size: 0.85rem; margin-left: 6px; opacity: 0; transition: opacity 0.2s; }
.copied-flash.show { opacity: 1; }

/* Grade badges (security tools) */
.grade { display: inline-grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; font-size: 1.9rem; font-weight: 800; color: #fff; }
.grade-a { background: #21a366; } .grade-b { background: #5cae4a; }
.grade-c { background: #e0a200; } .grade-d { background: #e6772e; }
.grade-f { background: var(--red); }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--panel-edge); }
.check-row:last-child { border-bottom: 0; }
.check-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff; }
.check-pass { background: #21a366; } .check-fail { background: var(--red); } .check-warn { background: #e0a200; }
.check-body h4 { font-size: 0.98rem; margin-bottom: 3px; }
.check-body p { font-size: 0.88rem; color: var(--muted); }
.check-row code { font-size: 0.82rem; background: var(--bg); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--panel-edge); word-break: break-all; }

/* Holidays table */
.holiday-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 24px; }
.holiday-next .big { font-size: 2rem; font-weight: 800; color: var(--red); }
.hol-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.hol-table th { text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray); padding: 10px 12px; border-bottom: 1px solid var(--panel-edge); }
.hol-table td { padding: 11px 12px; border-bottom: 1px solid var(--panel-edge); color: var(--muted); }
.hol-table tr.is-past td { opacity: 0.5; }
.hol-table tr.is-next td { background: var(--red-soft); color: var(--text); }
.hol-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-right: 4px; border: 1px solid var(--panel-edge); }
.hol-badge.poya { background: var(--red-soft); color: var(--red); border-color: rgba(237,28,36,0.3); }

/* FAQ + related */
.tool-faq h2, .related-tools h2 { font-size: 1.5rem; margin-bottom: 24px; }
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq-item { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 4px 20px; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; position: relative; padding-right: 30px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--red); font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--muted); padding: 0 0 18px; font-size: 0.96rem; }
.related-tools { padding: 70px 0; }

/* Newsletter (footer) */
.footer-newsletter { margin-top: 24px; }
.footer-newsletter h4 { margin-bottom: 8px; }
.nl-blurb { font-size: 0.85rem !important; color: #82868c !important; margin-bottom: 12px; max-width: 300px; }
.nl-row { display: flex; gap: 8px; max-width: 340px; }
.nl-row input { flex: 1; padding: 11px 13px; border-radius: 9px; font: inherit; font-size: 0.9rem; background: #10141c; border: 1px solid #232b3a; color: #e8eaee; }
.nl-row input:focus { outline: none; border-color: var(--red); }
.nl-row .btn { padding: 11px 18px; font-size: 0.88rem; white-space: nowrap; }
.nl-status { font-size: 0.85rem; margin-top: 8px; min-height: 1em; }
.nl-status.ok { color: #7ee2a8; } .nl-status.err { color: #ff8a8f; }
.footer-contact-h { margin-top: 24px; }

/* Insights / blog */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s, border-color 0.25s; }
.post-card:hover { transform: translateY(-4px); border-color: rgba(237,28,36,0.4); }
.post-card .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, #1a0c0e, #151b26); display: grid; place-items: center; color: var(--red); overflow: hidden; }
.post-card .cover svg { width: 46px; height: 46px; opacity: 0.6; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .body { padding: 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.post-card h3 { font-size: 1.12rem; margin-bottom: 8px; color: var(--text); }
.post-card p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.post-meta { font-size: 0.82rem; color: var(--gray); margin-top: 14px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.category-chips a { font-size: 0.86rem; font-weight: 600; color: var(--muted); padding: 7px 16px; border-radius: 999px; border: 1px solid var(--panel-edge); }
.category-chips a:hover { color: var(--text); }
.category-chips a.active { color: var(--red); background: var(--red-soft); border-color: rgba(237,28,36,0.35); }

.article { max-width: 760px; margin: 0 auto; }
.article-cover { aspect-ratio: 21/9; border-radius: var(--radius); background: linear-gradient(135deg, #1a0c0e, #151b26); display: grid; place-items: center; color: var(--red); margin-bottom: 30px; }
.article-cover svg { width: 70px; height: 70px; opacity: 0.6; }
.article-cover-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 30px; display: block; }
.prose-article { font-size: 1.05rem; line-height: 1.75; }
.prose-article h2 { font-size: 1.6rem; margin: 38px 0 14px; }
.prose-article h3 { font-size: 1.25rem; margin: 30px 0 12px; }
.prose-article p { color: var(--muted); margin-bottom: 18px; }
.prose-article ul, .prose-article ol { color: var(--muted); margin: 0 0 18px 22px; }
.prose-article li { margin-bottom: 8px; }
.prose-article a { color: var(--red); text-decoration: underline; }
.prose-article strong { color: var(--text); }
.prose-article blockquote { border-left: 3px solid var(--red); padding: 4px 0 4px 20px; margin: 0 0 18px; color: var(--muted); font-style: italic; }
.prose-article code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--bg-alt); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--panel-edge); }
.prose-article pre { background: var(--bg-alt); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin-bottom: 18px; }
.prose-article pre code { background: none; border: 0; padding: 0; }
.prose-article table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 0.95rem; }
.prose-article th, .prose-article td { border: 1px solid var(--panel-edge); padding: 9px 12px; text-align: left; }
.prose-article th { background: var(--bg-alt); }
.prose-article img { border-radius: 10px; margin: 0 auto 18px; }
.article-head { max-width: 760px; margin: 0 auto 30px; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 14px; }
.article-head .post-meta { font-size: 0.9rem; }

@media (max-width: 960px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .lang-switch { order: 5; }
}
@media (max-width: 700px) {
  .post-grid { grid-template-columns: 1fr; }
  .lang-switch { margin: 10px 0 0; }
  .site-nav { padding-bottom: 16px; }
}

/* ============================================================
   Invoice / Quotation generator
   ============================================================ */
.inv-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; align-items: start; }
.inv-form { max-width: 100%; }
.inv-sec { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red); margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--panel-edge); }
.inv-sec:first-child { margin-top: 0; }

.inv-item-row { display: grid; grid-template-columns: 1fr 62px 96px 30px; gap: 8px; margin-bottom: 8px; align-items: center; }
.inv-item-row input { width: 100%; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 0.9rem; background: var(--bg); border: 1px solid var(--panel-edge); color: var(--text); }
.inv-item-row input:focus { outline: none; border-color: var(--red); }
.it-del { background: none; border: 1px solid var(--panel-edge); color: var(--muted); border-radius: 8px; height: 36px; cursor: pointer; font-size: 1.2rem; line-height: 1; transition: color .2s, border-color .2s; }
.it-del:hover { color: var(--red); border-color: var(--red); }

/* Live A4 preview — always light (a document is white paper) */
.inv-preview-col { position: sticky; top: 96px; }
.inv-doc {
  background: #fff; color: #171c26; border: 1px solid var(--panel-edge);
  border-radius: 10px; padding: 32px; font-size: 12px; line-height: 1.5;
  box-shadow: 0 20px 50px -24px rgba(0,0,0,0.5); overflow: hidden;
}
.inv-doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #ED1C24; padding-bottom: 16px; margin-bottom: 18px; }
.pv-sname { font-size: 17px; font-weight: 800; color: #171c26; }
.pv-smeta { color: #6e747e; font-size: 11px; margin-top: 4px; max-width: 240px; }
.inv-doc-title { text-align: right; flex-shrink: 0; }
.pv-title { font-size: 26px; font-weight: 800; color: #ED1C24; letter-spacing: 0.02em; }
.pv-no { font-weight: 700; margin-top: 4px; }
.pv-dates { color: #6e747e; font-size: 11px; margin-top: 4px; }
.pv-billto { margin-bottom: 16px; }
.pv-billto-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: #ED1C24; }
.pv-bname { font-size: 14px; font-weight: 700; margin-top: 2px; }
.pv-baddr { color: #6e747e; font-size: 11px; white-space: pre-line; }
.pv-items { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.pv-items th { background: #171c26; color: #fff; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px; text-align: left; }
.pv-items th:nth-child(3), .pv-items th:nth-child(4), .pv-items th:nth-child(5) { text-align: right; }
.pv-items td { padding: 8px; border-bottom: 1px solid #e1e4e9; vertical-align: top; }
.pv-items td.r { text-align: right; white-space: nowrap; }
.pv-items td:first-child { width: 24px; color: #999; }
.pv-totals { margin-left: auto; width: 260px; }
.pv-trow { display: flex; justify-content: space-between; padding: 5px 0; color: #6e747e; }
.pv-trow span:last-child { color: #171c26; font-weight: 600; }
.pv-grand { border-top: 2px solid #ED1C24; margin-top: 4px; padding-top: 8px; font-size: 15px; }
.pv-grand span { color: #ED1C24 !important; font-weight: 800; }
.pv-words { font-style: italic; color: #6e747e; font-size: 11px; margin-top: 12px; }
.pv-notes { color: #6e747e; font-size: 11px; margin-top: 12px; white-space: pre-line; }
.pv-foot { text-align: center; color: #a4a8ae; font-size: 9px; margin-top: 22px; border-top: 1px solid #eee; padding-top: 10px; }

@media (max-width: 900px) {
  .inv-layout { grid-template-columns: 1fr; }
  .inv-preview-col { position: static; }
}

/* Print: show only the document */
@media print {
  body * { visibility: hidden !important; }
  .inv-doc, .inv-doc * { visibility: visible !important; }
  .inv-doc { position: absolute; inset: 0; margin: 0; border: 0; box-shadow: none; border-radius: 0; }
  .site-header, .site-footer, .tool-faq, .related-tools, .cta-band, .page-hero { display: none !important; }
}

/* ============================================================
   Signature maker
   ============================================================ */
.sig-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.sig-tab { background: none; border: 1px solid var(--panel-edge); color: var(--muted); font: inherit; font-weight: 600; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.sig-tab:hover { color: var(--text); }
.sig-tab.active { color: var(--red); background: var(--red-soft); border-color: rgba(237,28,36,0.35); }

.sig-canvas-wrap { position: relative; }
#sigCanvas { width: 100%; height: 240px; background: #fff; border: 2px dashed var(--panel-edge); border-radius: 12px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #b8bdc4; font-size: 0.95rem; pointer-events: none; }
.sig-type-preview { background: #fff; border: 2px dashed var(--panel-edge); border-radius: 12px; min-height: 150px; display: grid; place-items: center; font-size: 3rem; color: #0b2a5b; padding: 20px; text-align: center; word-break: break-word; }

.sig-pdf-stage { position: relative; margin-top: 12px; border: 1px solid var(--panel-edge); border-radius: 10px; overflow: hidden; display: inline-block; max-width: 100%; }
.sig-pdf-stage #pdfCanvas { display: block; max-width: 100%; }
.sig-overlay { position: absolute; cursor: grab; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.sig-overlay:active { cursor: grabbing; }
.amort td { font-size: 0.85rem; padding: 6px 8px; }
.amort tr:first-child td { color: var(--gray); font-weight: 600; }

/* ============================================================
   Website audit scorecard + meeting booking
   ============================================================ */
.audit-hero { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.audit-gauge {
  flex-shrink: 0; width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
}
.audit-gauge::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--panel); }
.audit-grade { position: relative; font-size: 3rem; font-weight: 800; line-height: 1; color: var(--text); }
.audit-score { position: relative; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.audit-hero-text { flex: 1; min-width: 260px; }
.audit-hero-text h2 { font-size: 1.4rem; word-break: break-all; }
.audit-cat-bars { margin-top: 16px; display: grid; gap: 10px; }
.audit-bar-row { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 12px; font-size: 0.9rem; }
.audit-bar-row > span:first-child { color: var(--muted); }
.audit-track { height: 9px; border-radius: 5px; background: var(--panel-edge); overflow: hidden; }
.audit-fill { display: block; height: 100%; border-radius: 5px; transition: width 0.5s; }
.audit-bar-row b { text-align: right; }

.audit-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.audit-cat-card { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 22px 24px; }
.audit-cat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--panel-edge); }
.audit-cat-head h3 { font-size: 1.1rem; }
.audit-cat-score { font-weight: 800; font-size: 1.1rem; margin-left: auto; }
.audit-pill { font-size: 0.75rem; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--panel-edge); padding: 3px 10px; border-radius: 999px; width: 100%; }
@media (max-width: 820px) { .audit-cats { grid-template-columns: 1fr; } }

/* Meeting booking */
.booking-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: start; }
.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.day-tab { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 10px 14px; cursor: pointer; text-align: center; font: inherit; color: var(--text); min-width: 74px; transition: border-color .2s, background .2s; }
.day-tab:hover { border-color: var(--gray); }
.day-tab.active { border-color: var(--red); background: var(--red-soft); }
.day-tab b { display: block; font-size: 1.1rem; }
.day-tab span { font-size: 0.76rem; color: var(--muted); }
.day-tab.full { opacity: 0.4; cursor: not-allowed; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot-btn { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 10px 6px; cursor: pointer; font: inherit; font-size: 0.9rem; color: var(--text); transition: border-color .2s, background .2s; }
.slot-btn:hover { border-color: var(--red); }
.slot-btn.active { background: var(--red); color: #fff; border-color: var(--red); }
.no-slots { color: var(--muted); padding: 20px 0; }
.booking-summary { background: var(--panel); border: 1px solid var(--panel-edge); border-left: 3px solid var(--red); border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; font-size: 0.95rem; }
.booking-summary b { color: var(--red); }
@media (max-width: 820px) { .booking-grid { grid-template-columns: 1fr; } }
