/* ---------- fonts (all self-hosted) ---------- */
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("/fonts/Estedad.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Arabic"; src: url("/fonts/NotoSansArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Arabic"; src: url("/fonts/NotoSansArabic-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Kufi Arabic"; src: url("/fonts/NotoKufiArabic-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Ubuntu Sans Mono"; src: url("/fonts/UbuntuSansMono.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --navy: #0e1b2c;
  --navy-2: #16283f;
  --navy-line: #26405f;
  --navy-deep: #0a1522;
  --paper: #f8f7f3;
  --white: #ffffff;
  --ink: #16202c;
  --muted: #556274;
  --line: #dde1e4;
  --line-strong: #b9c2cb;
  --soft: #eef1f3;
  --teal: #0b7c83;
  --teal-dark: #086168;
  --turq: #2bc4c0;
  --turq-soft: #e3f4f3;
  --on-navy: #f8f7f3;
  --on-navy-muted: #a9b6c6;
  --error: #b42318;
  --error-bg: #fdecea;
  --error-line: #f3c2bd;
  --success: #157347;
  --success-bg: #e2f3ea;
  --success-line: #b9e0c9;
  --r-sm: 4px; --r: 8px; --r-lg: 12px;
  --font: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
  --display: "Estedad", "Vazirmatn", "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
  --mono: "Ubuntu Sans Mono", "DejaVu Sans Mono", Consolas, monospace;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0; font-weight: 800; text-wrap: balance; }
h1, h2 { font-family: var(--display); }
p { margin: 0; }
ul, ol { margin: 0; }
code, pre, .mono { font-family: var(--mono); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--turq); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: 8px; inset-inline-start: 16px; z-index: 50; background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: var(--r); transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r); border: 1.5px solid transparent; font-weight: 700; font-size: .95rem; line-height: 1.3; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--soft); border-color: #95a1ae; }
.btn-primary.on-navy { background: var(--turq); color: var(--navy); }
.btn-primary.on-navy:hover { background: #56d3d0; }
.btn-secondary.on-navy { color: var(--on-navy); border-color: #4a6280; }
.btn-secondary.on-navy:hover { background: rgba(255, 255, 255, .06); border-color: #6c86a6; }
.btn-danger { background: var(--white); color: var(--error); border-color: #e6b4b0; }
.btn-danger:hover { background: var(--error-bg); border-color: var(--error); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-xs { min-height: 34px; padding: 0 12px; font-size: .84rem; font-weight: 500; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .75; cursor: progress; }
.btn.is-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before { animation: none; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- small components ---------- */
.layer { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: var(--teal); direction: ltr; unicode-bidi: isolate; }
.tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 0; list-style: none; }
.tags li { font-family: var(--mono); font-size: .76rem; line-height: 1.7; padding: 0 8px; border-radius: var(--r-sm); background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.badge { display: inline-block; font-size: .76rem; line-height: 1.8; padding: 0 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; font-weight: 500; }
.badge.pub { background: var(--success-bg); color: var(--success); }
.badge.draft { background: #f3efe3; color: #6b5a24; }
.badge.new { background: var(--turq-soft); color: var(--teal-dark); }
.help { font-size: .82rem; color: var(--muted); font-weight: 400; }
.help.error { color: var(--error); }
.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r); padding: 12px 16px; font-size: .92rem; }
.alert-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; margin-top: 3px; }
.alert.err { background: var(--error-bg); color: var(--error); border: 1px solid var(--error-line); }
.alert.err .alert-icon { background: var(--error); }
.alert.ok { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-line); }
.alert.ok .alert-icon { background: var(--success); }
.alert-title { font-weight: 800; }
.form-done { flex-direction: row; }
.form-done > div { display: grid; gap: 8px; justify-items: start; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 36px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--teal); }
.empty-title { color: var(--ink); font-weight: 700; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 24px; scrollbar-width: thin; }
.chips a { flex: none; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--muted); text-decoration: none; font-size: .88rem; }
.chips a:hover { border-color: var(--line-strong); color: var(--ink); }
.chips a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips.on-navy { margin: 22px 0 0; }
.chips.on-navy a { background: transparent; border-color: var(--navy-line); color: var(--on-navy-muted); }
.chips.on-navy a:hover { color: var(--on-navy); border-color: #4a6280; }

/* ---------- header ---------- */
.hdr { background: var(--navy); color: var(--on-navy); border-bottom: 1px solid var(--navy-line); position: sticky; top: 0; z-index: 30; }
.hdr-row { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1rem; white-space: nowrap; }
.logo-mark { width: 32px; height: 32px; border-radius: 7px; border: 1.5px solid var(--turq); display: grid; place-items: center; font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--turq); direction: ltr; flex: none; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a { color: var(--on-navy-muted); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: .93rem; }
.nav a:hover { color: var(--on-navy); background: rgba(255, 255, 255, .06); }
.nav a[aria-current] { color: var(--on-navy); box-shadow: inset 0 -2px 0 var(--turq); border-radius: 0; }
.mnav { display: none; }
.mnav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border: 1px solid var(--navy-line); border-radius: var(--r); display: grid; place-items: center; }
.mnav summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; right: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.mnav-panel { position: fixed; inset: 0; z-index: 40; background: var(--navy); padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.mnav-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin-bottom: 12px; }
.mnav-close { width: 44px; height: 44px; border: 1px solid var(--navy-line); border-radius: var(--r); background: transparent; color: var(--on-navy); font-size: 1.1rem; cursor: pointer; }
.mnav-panel nav { display: grid; }
.mnav-panel nav a { color: var(--on-navy); text-decoration: none; font-size: 1.1rem; padding: 12px 4px; border-bottom: 1px solid var(--navy-line); }
.mnav-panel nav a[aria-current] { color: var(--turq); }
.mnav-panel .btn { margin-top: 18px; }
.mnav-phone { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--on-navy-muted); text-decoration: none; padding: 12px; }
.mnav-phone svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--on-navy); }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; padding-block: 84px 76px; }
.who { color: var(--turq); font-weight: 700; font-size: .95rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--turq); box-shadow: 0 0 0 4px rgba(43, 196, 192, .18); flex: none; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); line-height: 1.4; margin-bottom: 18px; }
.hero-sub { font-size: 1.1rem; color: var(--on-navy-muted); max-width: 32em; margin-bottom: 30px; }
.hero .cta-row { margin-bottom: 36px; }
.stack { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; list-style: none; padding: 18px 0 0; border-top: 1px solid var(--navy-line); font-family: var(--mono); font-size: .82rem; color: var(--on-navy-muted); }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 74% center; border-radius: 14px; background: var(--navy-2); }
.hero-photo figcaption { position: absolute; inset-inline: 16px; bottom: 16px; background: rgba(14, 27, 44, .88); border: 1px solid var(--navy-line); border-radius: 10px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .86rem; line-height: 1.6; }
.hero-photo figcaption b { display: block; font-size: .95rem; }
.hero-photo figcaption small { color: var(--on-navy-muted); }
.online { font-family: var(--mono); color: var(--turq); font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; }
.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--turq); }
.hero-face { display: none; }

/* ---------- sections ---------- */
.sec { padding-block: 76px; }
.sec-white { background: var(--white); border-block: 1px solid var(--line); }
.sec-tight { padding-block: 40px 76px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.sec-head h2 { font-size: 1.75rem; }
.sec-head p { color: var(--muted); margin-top: 4px; }
.sec-head > a { color: var(--teal); font-weight: 700; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.sec-head > a:hover { text-decoration: underline; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.svc { display: grid; gap: 8px; align-content: start; padding: 24px 24px 26px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; background: var(--paper); }
.svc:hover { background: var(--white); }
.svc:hover .go { text-decoration: underline; }
.svc h3 { font-size: 1.1rem; }
.svc p { color: var(--muted); font-size: .94rem; }
.svc .go { color: var(--teal); font-size: .88rem; font-weight: 700; margin-top: 4px; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.pcard > a { display: flex; flex-direction: column; height: 100%; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: inherit; text-decoration: none; }
.pcard > a:hover { border-color: var(--line-strong); }
.pcard > a:hover h3 { color: var(--teal); }
.pcard-img { aspect-ratio: 16 / 10; background: var(--navy-2); position: relative; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.topo-thumb { position: absolute; inset: 0; background:
  radial-gradient(circle at 22% 30%, var(--turq) 0 3px, transparent 4px),
  radial-gradient(circle at 50% 62%, var(--turq) 0 3px, transparent 4px),
  radial-gradient(circle at 78% 38%, var(--turq) 0 3px, transparent 4px),
  linear-gradient(33deg, transparent 49.6%, rgba(43, 196, 192, .35) 50%, transparent 50.4%),
  linear-gradient(-38deg, transparent 49.6%, rgba(43, 196, 192, .35) 50%, transparent 50.4%);
  opacity: .8; }
.pcard-body { padding: 18px 20px 20px; display: grid; gap: 6px; align-content: start; }
.pcard-body h3 { font-size: 1.05rem; }
.pcard-body p { color: var(--muted); font-size: .92rem; }
.pcard-body .tags { margin-top: 6px; }
.meta { color: var(--muted); font-size: .88rem; }

.co-grid { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; list-style: none; padding: 0; border-top: 1px solid var(--line); }
.co-grid li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; line-height: 1.6; }
.co-grid small { color: var(--muted); font-size: .84rem; }

.agrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.aitem > a { display: grid; gap: 8px; align-content: start; height: 100%; padding-top: 16px; border-top: 2px solid var(--ink); color: inherit; text-decoration: none; }
.aitem > a:hover h3 { color: var(--teal); }
.aitem .cat { font-size: .8rem; color: var(--teal); font-weight: 700; }
.aitem h3 { font-size: 1.08rem; }
.aitem p { color: var(--muted); font-size: .92rem; }
.aitem .when { color: var(--muted); font-size: .8rem; }
.alist { display: grid; gap: 0; }
.alist .aitem > a { grid-template-columns: 1fr; padding-block: 22px; border-top: 1px solid var(--line); }
.alist .aitem:first-child > a { border-top-color: var(--ink); border-top-width: 2px; }

/* ---------- contact band + form ---------- */
.cband { background: var(--navy); color: var(--on-navy); padding-block: 76px; }
.cband-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.cband h2 { font-size: 1.9rem; margin-bottom: 10px; }
.cband-sub { color: var(--on-navy-muted); margin-bottom: 26px; }
.cband-form { background: var(--white); color: var(--ink); border-radius: 14px; padding: 28px; }
.direct { display: grid; gap: 10px; }
.direct a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; background: var(--white); }
.direct a:hover { border-color: var(--teal); background: var(--turq-soft); }
.direct svg { width: 22px; height: 22px; color: var(--teal); flex: none; }
.direct span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.6; }
.direct small { color: var(--muted); }
.direct.on-navy a { background: transparent; border-color: var(--navy-line); color: var(--on-navy); }
.direct.on-navy a:hover { background: rgba(255, 255, 255, .05); border-color: var(--turq); }
.direct.on-navy svg { color: var(--turq); }
.direct.on-navy small { color: var(--on-navy-muted); }

.cform { display: grid; gap: 16px; }
.cform-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cform-foot .help { flex: 1 1 200px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: .9rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 9px 12px; background: var(--white); color: var(--ink); font-weight: 400; }
.field textarea { resize: vertical; line-height: 1.85; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--turq-soft); border-color: var(--teal); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field [aria-invalid="true"]:focus { outline-color: var(--error-bg); }
.field input::placeholder, .field textarea::placeholder { color: #8591a0; }
.field input[dir="ltr"]::placeholder { text-align: right; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- inner page head ---------- */
.phead { background: var(--navy); color: var(--on-navy); padding-block: 48px 44px; }
.phead h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); max-width: 26em; }
.phead-intro { color: var(--on-navy-muted); font-size: 1.08rem; max-width: 40em; margin-top: 10px; }
.phead-meta { color: var(--on-navy-muted); font-size: .88rem; margin-top: 14px; }
.crumbs { font-size: .86rem; color: var(--on-navy-muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--on-navy-muted); }
.crumbs a:hover { color: var(--on-navy); }
.preview-bar { background: #f3efe3; color: #6b5a24; text-align: center; padding: 8px 16px; font-weight: 700; font-size: .9rem; border-bottom: 1px solid #e5dcc2; }

/* services page */
.svc-list { display: grid; gap: 0; padding-block: 24px 40px; }
.svc-item { padding-block: 44px; border-bottom: 1px solid var(--line); display: grid; gap: 22px; justify-items: start; scroll-margin-top: 90px; }
.svc-item header { display: grid; gap: 6px; }
.svc-item h2 { font-size: 1.6rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 40em; }
.svc-parts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; }
.svc-part { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.svc-part h3 { font-size: .95rem; color: var(--teal); }
.svc-part .prose { font-size: .98rem; }
.checks { list-style: none; padding: 0; display: grid; gap: 6px; font-size: .98rem; }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: "✓"; color: var(--teal); font-weight: 800; }
.svc-related h3 { font-size: .95rem; margin-bottom: 4px; }
.svc-related ul { padding-inline-start: 1.2em; }
.process { padding-block: 48px 0; }
.process h2 { font-size: 1.5rem; margin-bottom: 20px; }
.process ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.process li { counter-increment: step; display: grid; gap: 4px; align-content: start; padding-top: 14px; border-top: 2px solid var(--line); }
.process li::before { content: counter(step, persian); font-family: var(--mono); color: var(--teal); font-weight: 700; }
.process li b { font-size: 1rem; }
.process li span { color: var(--muted); font-size: .9rem; }

/* detail pages */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 44px 76px; align-items: start; }
.detail-img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); margin-bottom: 28px; }
.dsec { padding-block: 18px; }
.dsec h2 { font-size: 1.3rem; margin-bottom: 8px; }
.detail-side { position: sticky; top: 90px; display: grid; gap: 16px; }
.facts { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 20px; }
.facts > div { padding-block: 12px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: .8rem; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.side-cta { background: var(--navy); color: var(--on-navy); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 12px; }
.side-cta p { font-weight: 700; }
.side-cta .btn-primary { background: var(--turq); color: var(--navy); }

.prose { font-size: 1.05rem; line-height: 2; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; scroll-margin-top: 90px; }
.prose ul { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .3em; }
.prose code { font-size: .88em; background: var(--soft); padding: 1px 6px; border-radius: var(--r-sm); unicode-bidi: isolate; }
.prose pre.code { background: var(--navy); color: #d7e3ef; border-radius: var(--r); padding: 16px 18px; overflow-x: auto; line-height: 1.7; text-align: left; font-size: .9rem; }
.prose pre.code code { background: none; padding: 0; font-size: inherit; }

.article-grid { display: grid; grid-template-columns: 250px minmax(0, 68ch); gap: 56px; padding-block: 44px 76px; justify-content: center; align-items: start; }
.article-grid.no-toc { grid-template-columns: minmax(0, 68ch); }
.toc { position: sticky; top: 90px; font-size: .9rem; }
.toc summary { font-weight: 800; cursor: pointer; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; border-inline-start: 2px solid var(--line); }
.toc li a { display: block; padding: 4px 14px; color: var(--muted); text-decoration: none; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.toc li a:hover { color: var(--ink); border-inline-start-color: var(--teal); }
.toc li.l3 a { padding-inline-start: 28px; font-size: .86rem; }
.article-body > .tags { margin-top: 28px; }
.service-box { margin-top: 40px; background: var(--turq-soft); border: 1px solid #bfe3e1; border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; }
.service-box-title { font-weight: 800; font-size: 1.05rem; }
.service-box p + p { color: var(--muted); font-size: .95rem; }

.search { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 4px 6px 4px 4px; padding-inline-start: 14px; margin-bottom: 18px; max-width: 560px; }
.search:focus-within { border-color: var(--teal); outline: 3px solid var(--turq-soft); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-height: 40px; min-width: 0; color: var(--ink); }
.result-note { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }

/* about / clients / contact */
.about-id { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.about-id img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 74% 30%; border: 2px solid var(--turq); }
.about-id div { display: grid; line-height: 1.6; }
.about-id span { color: var(--on-navy-muted); font-size: .92rem; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-block: 48px 64px; align-items: start; }
.about-summary h2 { font-size: 1.4rem; margin-bottom: 12px; }
.highlights { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 28px; }
.highlights li { border-top: 2px solid var(--ink); padding-top: 10px; display: grid; }
.highlights b { font-family: var(--display); font-size: 1.8rem; line-height: 1.4; }
.highlights span { color: var(--muted); font-size: .9rem; }
.about-side { display: grid; gap: 14px; position: sticky; top: 90px; }
.timeline { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 6px 28px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.tl-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; color: var(--muted); font-size: .9rem; }
.timeline h3 { font-size: 1.05rem; }
.timeline p { color: var(--muted); font-size: .95rem; }
.certs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.certs li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 2px; }
.certs span { color: var(--muted); font-size: .88rem; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.skill { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; display: grid; gap: 6px; align-content: start; }
.skill h3 { font-size: 1.05rem; }
.skill p { color: var(--muted); font-size: .92rem; }
.clients { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.clients li { padding-block: 20px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.clients h2 { font-family: var(--font); font-size: 1.1rem; }
.client-meta { color: var(--teal); font-size: .88rem; font-weight: 700; }
.clients p:not(.client-meta) { color: var(--muted); font-size: .95rem; }
.inline-cta { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.inline-cta p { font-weight: 700; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; padding-block: 48px 76px; align-items: start; }
.contact-grid h2 { font-size: 1.3rem; margin-bottom: 16px; }
.contact-direct { display: grid; gap: 12px; }
.contact-form { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }

/* 404 */
.nf { background: var(--navy); color: var(--on-navy); padding-block: 88px; }
.nf .wrap { display: grid; gap: 14px; justify-items: start; }
.nf-code { font-family: var(--mono); color: var(--turq); font-size: .95rem; text-align: left; line-height: 1.7; }
.nf-code span { color: #f0a39b; }
.nf h1 { font-size: 2rem; }
.nf p:not(.nf-code) { color: var(--on-navy-muted); }

/* ---------- footer ---------- */
.ftr { background: var(--navy-deep); color: var(--on-navy-muted); padding-block: 40px 20px; font-size: .92rem; }
.ftr .logo { color: var(--on-navy); }
.ftr-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; align-items: start; }
.ftr-about { display: grid; gap: 10px; }
.ftr-links, .ftr-contact { display: grid; gap: 4px; justify-items: start; }
.ftr a { color: var(--on-navy-muted); text-decoration: none; }
.ftr a:hover { color: var(--on-navy); text-decoration: underline; }
.ftr-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--navy-line); font-size: .84rem; }
.mbar { display: none; }

/* ---------- responsive (public) ---------- */
@media (max-width: 1000px) {
  .nav, .hdr-cta { display: none; }
  .mnav { display: block; margin-inline-start: auto; }
  .hdr-row { min-height: 64px; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .co-grid { grid-template-columns: repeat(2, 1fr); }
  .agrid { grid-template-columns: 1fr; gap: 0; }
  .agrid .aitem > a { padding-block: 18px; border-top-width: 1px; border-top-color: var(--line); }
  .agrid .aitem:first-child > a { border-top: 2px solid var(--ink); }
  .process ol { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: minmax(0, 68ch); }
  .toc { position: static; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
  .toc summary { margin: 0; }
  .toc ol { margin-top: 8px; }
}
@media (max-width: 800px) {
  body { font-size: 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; padding-block: 28px 36px; }
  .hero-photo, .who { display: none; }
  .hero-face { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
  .hero-face img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 74% 30%; border: 2px solid var(--turq); }
  .hero-face div { display: grid; line-height: 1.6; }
  .hero-face small { color: var(--turq); }
  .hero .cta-row { display: grid; gap: 10px; margin-bottom: 24px; }
  .sec { padding-block: 44px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 20px; }
  .sec-head h2 { font-size: 1.4rem; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc { padding: 18px 4px; background: transparent; }
  .svc p, .svc .go { display: none; }
  .svc { grid-template-columns: 1fr auto; align-items: center; }
  .svc .layer { order: 2; font-size: .7rem; }
  .pgrid { grid-template-columns: 1fr; }
  .home-scroll .pgrid { grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; }
  .cband { padding-block: 44px; }
  .cband-grid, .contact-grid, .about-grid, .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .cband-form, .contact-form { padding: 20px; }
  .cform-two { grid-template-columns: 1fr; }
  .cform-foot .btn { width: 100%; }
  .svc-parts { grid-template-columns: 1fr; }
  .detail-side, .about-side { position: static; }
  .timeline li { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  .ftr-about { grid-column: 1 / -1; }
  body:not(.admin) { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .mbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; position: fixed; inset-inline: 0; bottom: 0; z-index: 25; background: var(--white); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- admin ---------- */
body.admin { background: #f3f4f5; font-size: 15.5px; line-height: 1.8; }
.ad-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.ad-side { background: var(--navy); color: var(--on-navy); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.ad-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--on-navy); text-decoration: none; font-weight: 800; }
.ad-brand > span:last-child { display: grid; line-height: 1.5; }
.ad-brand small { color: var(--on-navy-muted); font-weight: 400; font-size: .8rem; }
.ad-nav, .ad-mnav { display: grid; gap: 2px; }
.ad-nav a, .ad-mnav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 7px; color: var(--on-navy-muted); text-decoration: none; font-size: .93rem; }
.ad-nav a:hover, .ad-mnav a:hover { color: var(--on-navy); background: rgba(255, 255, 255, .05); }
.ad-nav a[aria-current], .ad-mnav a[aria-current] { background: rgba(43, 196, 192, .14); color: var(--on-navy); font-weight: 700; }
.ad-nav em, .ad-mnav em { font-style: normal; font-size: .75rem; background: var(--turq); color: var(--navy); border-radius: 999px; padding: 0 8px; font-weight: 700; line-height: 1.7; }
.grp { font-size: .74rem; color: #7f93aa; padding: 14px 12px 4px; }
.ad-foot { margin-top: auto; display: grid; gap: 4px; padding: 0 12px; font-size: .9rem; }
.ad-foot a { color: var(--on-navy-muted); }
.ad-foot form, .ad-mnav form { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: #f0a39b; cursor: pointer; text-align: start; }
.ad-mnav .link-btn { padding: 8px 12px; }
.ad-mtop, .ad-tabs, .ad-fab { display: none; }
.ad-main { padding: 28px 36px 64px; min-width: 0; max-width: 1240px; }
.ad-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.ad-top h1 { font-size: 1.5rem; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-actions form { margin: 0; }
.ad-main > .alert { margin-bottom: 18px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.panel > h2 { font-family: var(--font); font-size: 1rem; margin-bottom: 14px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin: -20px -22px 0; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--font); font-size: 1rem; }
.panel-head a { font-size: .86rem; text-decoration: none; }
.panel-empty { color: var(--muted); padding-block: 18px; font-size: .92rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 0; color: var(--ink); text-decoration: none; line-height: 1.6; }
.stat:hover { border-color: var(--line-strong); }
.stat small { color: var(--muted); font-size: .82rem; }
.stat b { font-size: 1.8rem; font-variant-numeric: tabular-nums; line-height: 1.4; font-family: var(--display); }
.stat.hot { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.ad-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
.ad-cols .panel + .panel { margin-top: 0; }
.msg-link { display: block; color: inherit; text-decoration: none; margin-inline: -22px; padding-inline: 22px; border-bottom: 1px solid var(--line); }
.msg-link:last-child { border-bottom: 0; margin-bottom: -20px; }
.msg-link:hover { background: #fafbfb; }
.msg-link .msg { border: 0; border-radius: 0; padding: 12px 0; background: transparent; }
.msgs { display: grid; gap: 12px; }
.msg { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; display: grid; gap: 4px; scroll-margin-top: 20px; }
.msg.unread { border-inline-start: 3px solid var(--teal); }
.msg-top { display: flex; align-items: center; gap: 10px; }
.msg-top h3 { font-family: var(--font); font-size: 1rem; }
.msg-when { margin-inline-start: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.msg-meta { color: var(--muted); font-size: .88rem; }
.msg-snippet { color: var(--muted); font-size: .88rem; }
.msg-body { white-space: pre-wrap; margin-top: 6px; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg-actions form { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs a span { font-size: .8rem; background: var(--soft); border-radius: 999px; padding: 0 8px; }
.tabs a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--teal); }
.table-wrap { overflow-x: auto; }
.table-wrap.panel { padding: 0; }
.panel .table-wrap { margin: 0 -22px -20px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: start; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: .82rem; background: #fafbfb; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); }
td.num { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .86rem; }
.title-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.title-link:hover { color: var(--teal); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filters input, .filters select { min-height: 40px; border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 6px 12px; background: var(--white); }
.filters input { flex: 1 1 240px; }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hub-item { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hub-main { display: grid; color: var(--ink); text-decoration: none; line-height: 1.6; }
.hub-main small { color: var(--muted); }
.hub-main:hover b { color: var(--teal); }

.admin form .field { margin-bottom: 18px; }
.admin .field .help { margin-top: -4px; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.editor-side { display: grid; gap: 16px; position: sticky; top: 20px; }
.editor-side .panel + .panel { margin-top: 0; }
.editor-side .panel > .field:last-child { margin-bottom: 0; }
.status-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 700; }
.publish-actions { display: grid; gap: 8px; }
.side-link { display: block; text-align: center; margin-top: 12px; font-size: .9rem; }
.upload { display: grid; gap: 6px; }
.upload .field { margin-bottom: 4px !important; }
.upload-preview { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 10px; }
.upload input[type="file"] { padding: 8px; min-height: 0; font-size: .88rem; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.help-box { font-size: .88rem; color: var(--muted); margin-top: -6px; }
.help-box summary { cursor: pointer; color: var(--teal); }
.help-box ul { padding-inline-start: 1.3em; margin-top: 6px; }
.help-box code { background: var(--soft); padding: 0 6px; border-radius: var(--r-sm); }
.danger { margin-top: 24px; padding: 14px 22px; border: 1px solid var(--error-line); border-radius: 10px; background: var(--white); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.danger p { color: var(--muted); }
.danger form { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.settings .panel > .help { margin: -6px 0 16px; }
.form-actions { margin-top: 18px; }
.portrait-row { display: flex; gap: 20px; align-items: flex-start; }
.portrait-row .upload { flex: 1; }
.portrait-thumb { width: 120px; height: 150px; object-fit: cover; object-position: 74% center; border-radius: var(--r); border: 1px solid var(--line); flex: none; }
.narrow-panel { max-width: 460px; }

body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: var(--navy); }
.login-box { width: min(400px, 100%); display: grid; gap: 16px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--on-navy); font-weight: 800; }
.login-box h1 { font-size: 1.35rem; margin-bottom: 14px; }
.login-box .alert { margin-bottom: 16px; }
.login-box > .side-link { color: var(--on-navy-muted); }

@media (max-width: 1000px) {
  .ad-shell { grid-template-columns: 1fr; }
  .ad-side { display: none; }
  .ad-mtop { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: var(--on-navy); padding: 10px 14px; position: sticky; top: 0; z-index: 20; }
  .ad-mmenu summary { list-style: none; cursor: pointer; width: 42px; height: 42px; border: 1px solid var(--navy-line); border-radius: var(--r); display: grid; place-items: center; }
  .ad-mmenu summary::-webkit-details-marker { display: none; }
  .ad-mnav { position: absolute; inset-inline: 0; top: 100%; background: var(--navy); padding: 8px 14px 16px; border-top: 1px solid var(--navy-line); max-height: 75vh; overflow-y: auto; }
  .ad-main { padding: 18px 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .ad-tabs { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 20; background: var(--white); border-top: 1px solid var(--line); padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px)); }
  .ad-tabs a { display: grid; justify-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .78rem; }
  .ad-tabs a i { width: 22px; height: 3px; border-radius: 2px; }
  .ad-tabs a[aria-current] { color: var(--teal); font-weight: 700; }
  .ad-tabs a[aria-current] i { background: var(--teal); }
  .ad-fab { display: block; position: fixed; left: 16px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 21; background: var(--teal); color: #fff; text-decoration: none; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: .9rem; box-shadow: 0 6px 16px rgba(11, 124, 131, .3); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ad-cols, .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .ad-top h1 { font-size: 1.25rem; }
  .row-actions { justify-content: flex-start; }
}
