/* Machon Zarchin — "The straight line" design system.
   Letters that wander find their line: the school-notebook ruling (blue lines, red margin)
   is the structural device; Rubik carries headings and Assistant carries reading text,
   both chosen for clear, easy reading. */

:root {
  --ink: #182a3a;
  --ink-soft: #46596b;
  --navy: #10446a;
  --navy-deep: #0b3352;
  --rule: #bfd8ec;
  --rule-soft: #dfecf7;
  --panel: #eef5fb;
  --paper: #ffffff;
  --margin: #e2554b;
  --marker: #f7a21b;
  --marker-soft: rgba(247, 162, 27, .28);
  --ok: #1f7a4d;

  --font-head: "Rubik", "Assistant", "Segoe UI", Arial, sans-serif;
  --font-text: "Assistant", "Segoe UI", Arial, sans-serif;

  --step--1: clamp(.94rem, .9rem + .15vw, 1rem);
  --step-0: clamp(1.06rem, 1rem + .3vw, 1.19rem);
  --step-1: clamp(1.25rem, 1.15rem + .45vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + .9vw, 2rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.8vw, 3.85rem);

  --line: 2.25rem;            /* notebook line spacing */
  --wrap: 1200px;
  --measure: 68ch;
  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 76px;
  --shadow-lift: 0 14px 30px -18px rgba(16, 68, 106, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--navy); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.3; font-weight: 600; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1.1em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 200; background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

/* ---------- Notebook surfaces ---------- */
.ruled {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule-soft) calc(var(--line) - 1px), var(--rule-soft) var(--line));
}
.margin-line { position: relative; }
.margin-line::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: clamp(.5rem, 3vw, 2.4rem);
  width: 2px; background: color-mix(in srgb, var(--margin) 55%, transparent);
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--marker); --fg: var(--navy-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.4rem; border: 2px solid transparent; border-radius: 999px;
  background: var(--bg); color: var(--fg); font: 700 var(--step-0)/1.2 var(--font-text);
  text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.btn:hover { color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow-lift); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn--ghost { --bg: transparent; --fg: var(--navy); border-color: currentColor; }
.btn--navy { --bg: var(--navy); --fg: #fff; }
.btn--light { --bg: #fff; --fg: var(--navy); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.link-arrow::after { content: ""; width: .5em; height: .5em; border-block-start: 2px solid currentColor; border-inline-end: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); }
[dir="ltr"] .link-arrow::after { transform: rotate(45deg); }
.link-arrow:hover::after { transform: translateX(-3px) rotate(-45deg); }
[dir="ltr"] .link-arrow:hover::after { transform: translateX(3px) rotate(45deg); }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.topbar { background: var(--navy-deep); color: #dbe8f3; font-size: .95rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar .social { display: flex; gap: .3rem; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: inherit; }
.icon-btn svg { width: 20px; height: 20px; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.12); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { flex: none; display: block; }
.brand img { height: 52px; width: auto; }
.main-nav { flex: 1; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .3rem; }
.main-nav a { display: block; padding: .45rem .7rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.02rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--panel); color: var(--navy); }
.header-cta { display: flex; align-items: center; gap: .5rem; flex: none; }
.header-cta .btn { min-height: 44px; padding: .5rem 1.1rem; font-size: 1rem; white-space: nowrap; }
.header-cta .btn small { font-weight: 600; opacity: .85; }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .topbar { display: none; }
  .main-nav, .header-cta .btn-phone-text { display: none; }
  .site-header .wrap { justify-content: space-between; }
  .brand img { height: 44px; }
  .menu-toggle { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; border: 2px solid var(--rule); background: #fff; color: var(--navy); cursor: pointer; }
}

/* Drawer (mobile navigation) */
.drawer { position: fixed; inset: 0; z-index: 120; display: none; }
.drawer[open], .drawer.is-open { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(11, 51, 82, .45); }
.drawer__panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(88vw, 380px); background: #fff; padding: 1.2rem 1.4rem 2rem; overflow-y: auto; box-shadow: -20px 0 40px rgba(0,0,0,.15); }
.drawer__panel ul { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.drawer__panel li a { display: block; padding: .8rem .2rem; border-bottom: 1px solid var(--rule-soft); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.1rem; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.drawer__close { width: 48px; height: 48px; border-radius: 999px; border: 2px solid var(--rule); background: #fff; color: var(--navy); cursor: pointer; display: grid; place-items: center; }
@media (prefers-reduced-motion: no-preference) {
  .drawer.is-open .drawer__panel { animation: drawer-in .28s var(--ease); }
  @keyframes drawer-in { from { transform: translateX(-100%); } }
  [dir="ltr"] .drawer.is-open .drawer__panel { animation-name: drawer-in-ltr; }
  @keyframes drawer-in-ltr { from { transform: translateX(100%); } }
}

/* ---------- Breadcrumbs & page head ---------- */
.crumbs { font-size: .95rem; color: var(--ink-soft); padding-block: 1.1rem .2rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li + li::before { content: "‹"; margin-inline-end: .35rem; color: var(--margin); font-weight: 700; }
[dir="ltr"] .crumbs li + li::before { content: "›"; }
.crumbs a { color: var(--ink-soft); }
.page-head { padding-block: .6rem 2rem; }
.page-head h1 { max-width: 22ch; margin-bottom: .35em; }
.page-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; color: var(--ink-soft); font-size: .98rem; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: .15rem .8rem; border-radius: 999px; background: var(--panel); color: var(--navy); font-weight: 700; text-decoration: none; font-size: .95rem; }
.chip:hover { background: var(--rule-soft); }
.banner { margin-block: 0 2.5rem; }
.banner img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 700px) { .banner img { aspect-ratio: 16 / 9; } }

/* ---------- Home hero: the signature moment ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero.margin-line::before { inset-inline-start: clamp(.6rem, 4vw, 3.5rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__kicker { font-family: var(--font-head); font-size: var(--step-1); color: var(--margin); font-weight: 500; margin: 0 0 .4rem; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.3vw, 4.1rem); line-height: 1.2; font-weight: 700; margin-bottom: .5em; max-width: 13ch; }
.hero__text { font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; line-height: 1.7; }
.hero__text p:last-child { margin-bottom: 0; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem; margin-top: 1.8rem; }
.hero__phone { color: var(--ink-soft); font-size: 1rem; }
.hero__phone a { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* letters settling onto the reading line */
.abc { display: flex; gap: clamp(.35rem, 1vw, .8rem); margin-top: 2.2rem; padding-bottom: .3rem; border-bottom: 2px solid var(--rule); width: fit-content; max-width: 100%; overflow: hidden; }
.abc span { font-family: var(--font-head); font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); font-weight: 600; color: var(--navy); opacity: .9; line-height: 1.2; display: inline-block; }
.abc span:nth-child(3n) { color: var(--marker); }
.abc span:nth-child(5n) { color: var(--margin); }
@media (prefers-reduced-motion: no-preference) {
  .abc span { animation: settle 1.5s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 250ms); }
  @keyframes settle {
    0% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
    35% { opacity: .9; }
    100% { transform: none; opacity: .9; }
  }
}

.hero__media { position: relative; min-height: 420px; }
.hero__photo { position: absolute; border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: 0 30px 60px -35px rgba(16, 68, 106, .55); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo--1 { inset: 0 0 18% 12%; }
.hero__photo--2 { width: 46%; aspect-ratio: 4 / 3; inset-inline-end: 0; bottom: 0; transform: rotate(-3deg); border: 6px solid #fff; }
.hero__photo--3 { width: 30%; aspect-ratio: 1; inset-inline-start: 0; top: 8%; transform: rotate(4deg); border: 6px solid #fff; }
[dir="rtl"] .hero__photo--1 { inset: 0 12% 18% 0; }
.tape::after { content: ""; position: absolute; top: -10px; inset-inline-start: 50%; width: 84px; height: 24px; transform: translateX(50%) rotate(-4deg); background: color-mix(in srgb, var(--marker) 55%, #fff); opacity: .85; border-radius: 3px; }
@media (max-width: 900px) {
  .hero.margin-line::before { inset-inline-start: 6px; }
  .abc span:nth-child(n+11) { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { min-height: 0; aspect-ratio: 4 / 3; order: -1; }
  .hero h1 { max-width: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--panel { background: var(--panel); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-intro { max-width: var(--measure); color: var(--ink-soft); }
.section-intro h2 { font-size: var(--step-2); color: var(--navy); }

/* Services as a notebook index */
.index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3.5rem); border-top: 2px solid var(--rule); }
.index li { border-bottom: 1px solid var(--rule); }
.index a { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 1.1rem; align-items: center; padding: 1.25rem .2rem; text-decoration: none; color: var(--ink); }
.index img { width: 72px; height: 72px; object-fit: contain; }
.index h3 { font-size: var(--step-1); margin: 0 0 .25rem; display: inline; background: linear-gradient(var(--marker-soft), var(--marker-soft)) no-repeat 100% 88% / 0 38%; transition: background-size .35s var(--ease); }
[dir="ltr"] .index h3 { background-position: 0 88%; }
.index p { margin: .3rem 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.index a:hover h3 { background-size: 100% 38%; }
.index .chev { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; border: 2px solid var(--rule); color: var(--navy); transition: background .2s, border-color .2s; }
.index a:hover .chev { background: var(--marker); border-color: var(--marker); }
.index .chev svg { width: 16px; height: 16px; }
[dir="ltr"] .index .chev svg { transform: scaleX(-1); }
@media (max-width: 760px) { .index { grid-template-columns: 1fr; } .index a { grid-template-columns: 56px minmax(0,1fr) auto; } .index img { width: 56px; height: 56px; } }

/* Video facade */
.video-block { max-width: 920px; margin-inline: auto; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); box-shadow: 0 30px 60px -35px rgba(16,68,106,.6); }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(to top, rgba(11,51,82,.45), transparent 60%); }
.video-play span { width: 84px; height: 84px; border-radius: 999px; background: var(--marker); display: grid; place-items: center; transition: transform .2s var(--ease); }
.video-play span svg { width: 34px; height: 34px; color: var(--navy-deep); margin-left: 4px; }
.video-play:hover span { transform: scale(1.06); }
.video-block .caption { margin-top: 1rem; color: var(--ink-soft); }

/* Features ("why us") */
.features { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.features__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.features__list li { display: flex; gap: 1rem; align-items: center; padding-block: 1.2rem; border-bottom: 1px solid var(--rule); }
.features__list img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.features__list h3 { font-size: var(--step-1); margin: 0; }
.features__list p { margin: .3rem 0 0; color: var(--ink-soft); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .features__list { grid-template-columns: 1fr; } }

/* ---------- Lead form ---------- */
.lead { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.lead::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), rgba(255,255,255,.06) calc(var(--line) - 1px), rgba(255,255,255,.06) var(--line)); }
.lead .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2rem 4rem; align-items: center; }
.lead h2 { color: #fff; font-size: var(--step-3); margin-bottom: .3em; }
.lead__sub { color: #cfe0ee; font-size: var(--step-1); margin: 0; }
.lead__contact { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.lead--paper { background: var(--panel); color: var(--ink); }
.lead--paper::after { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule-soft) calc(var(--line) - 1px), var(--rule-soft) var(--line)); }
.lead--paper h2 { color: var(--navy); }
.lead--paper .lead__sub { color: var(--ink-soft); }
.lead--paper .form { background: #fff; border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: 0 24px 50px -36px rgba(16,68,106,.6); }
.lead--paper .field label { color: var(--ink); }
@media (max-width: 860px) { .lead .wrap { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.form .field { display: grid; gap: .3rem; }
.form .field--wide, .form .form__actions, .form .form__status { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .98rem; color: #fff; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border-radius: var(--radius-sm); border: 2px solid var(--rule);
  background: #fff; color: var(--ink); font: 500 1.05rem/1.4 var(--font-text);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--marker); outline: none; box-shadow: 0 0 0 3px var(--marker-soft); }
.field input[aria-invalid="true"] { border-color: var(--margin); }
.field .err { color: #ffd2cd; font-size: .92rem; font-weight: 600; min-height: 0; }
.lead--paper .field .err, .dialog .field .err { color: #b3261e; }
.form__actions .btn { width: 100%; min-height: 54px; font-size: 1.15rem; }
.form__status { font-weight: 700; }
.form__status[data-state="ok"] { background: #e7f6ee; color: var(--ok); padding: .8rem 1rem; border-radius: var(--radius-sm); }
.form__status[data-state="error"] { background: #fdecea; color: #b3261e; padding: .8rem 1rem; border-radius: var(--radius-sm); }
.form .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { grid-column: 1 / -1; margin: 0; font-size: .88rem; opacity: .8; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(1.2rem, 2.5vw, 2rem); }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--navy); }
.card__img { aspect-ratio: 3 / 2; background: var(--panel); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card h3 { font-size: 1.22rem; margin: 0; line-height: 1.35; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .more { margin-top: auto; padding-top: .4rem; font-weight: 700; color: var(--navy); font-size: .98rem; }
.card:focus-within { outline: 3px solid var(--marker); outline-offset: 3px; }
.card h3 a:focus-visible { outline: none; }

.pager { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 3rem; }
.pager a, .pager span { min-width: 46px; min-height: 46px; display: grid; place-items: center; padding: 0 .9rem; border-radius: 999px; border: 2px solid var(--rule); text-decoration: none; font-weight: 700; }
.pager [aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.article-layout--wide { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }
.sheet { position: relative; padding-inline-start: clamp(1.3rem, 4vw, 3.2rem); }
.sheet::before { content: ""; position: absolute; inset-block: .3rem 0; inset-inline-start: 0; width: 2px; background: color-mix(in srgb, var(--margin) 60%, transparent); }
.aside { position: sticky; top: calc(var(--header-h) + 1.2rem); display: grid; gap: 1.2rem; }
@media (max-width: 1000px) { .aside { position: static; } }
.toc { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: #fff; }
.toc h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; counter-reset: toc; }
.toc a { display: block; padding: .35rem .2rem; text-decoration: none; color: var(--ink); line-height: 1.45; font-size: .98rem; border-radius: 6px; }
.toc a:hover { background: var(--panel); color: var(--navy); }
.toc details summary { cursor: pointer; font-family: var(--font-head); color: var(--navy); font-weight: 600; font-size: 1.1rem; min-height: 32px; }
.ask { border-radius: var(--radius); padding: 1.3rem; background: var(--navy); color: #fff; }
.ask h2 { color: #fff; font-size: 1.3rem; }
.ask .btn { width: 100%; margin-top: .55rem; }

/* Reading text */
.prose { max-width: var(--measure); font-size: var(--step-0); line-height: 1.85; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: var(--step-2); margin: 1.9em 0 .55em; }
.prose h3 { font-size: var(--step-1); margin: 1.6em 0 .45em; }
.prose h4 { font-size: 1.15rem; margin: 1.4em 0 .4em; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--marker); font-weight: 700; }
.prose img { border-radius: var(--radius-sm); margin: 1.6em auto; height: auto; }
.prose .alignleft, .prose .alignright { max-width: min(50%, 360px); }
@media (min-width: 700px) {
  .prose .alignleft { float: left; margin: .4em 0 1em 1.6em; }
  .prose .alignright { float: right; margin: .4em 1.6em 1em 0; }
}
.prose .aligncenter { margin-inline: auto; }
.prose blockquote { margin: 1.6em 0; padding: .4em 1.2em; border-inline-start: 4px solid var(--marker); background: var(--panel); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.08em; }
.prose a { font-weight: 600; }
.prose strong { color: var(--navy-deep); }
.prose .table-wrap { overflow-x: auto; margin: 1.4em 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .55em .8em; text-align: start; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
.prose .video { margin: 1.6em 0; }
.prose::after { content: ""; display: block; clear: both; }
/* "related articles" list written into the old content */
.prose h3.zr-related { margin-top: 2.4em; padding-top: 1.4em; border-top: 2px solid var(--rule); font-size: var(--step-1); }
.prose ul.zr-related { list-style: none; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.prose ul.zr-related li { break-inside: avoid; border-bottom: 1px solid var(--rule-soft); margin: 0; }
.prose ul.zr-related a { display: block; padding: .5rem 0; text-decoration: none; font-weight: 600; }
.prose ul.zr-related a:hover { text-decoration: underline; }

/* FAQ accordion */
.faq { margin: 2.4em 0; }
.faq h2 { font-size: var(--step-2); margin: 0 0 .7em; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem .2rem; min-height: 56px; font-family: var(--font-head); font-weight: 500; font-size: var(--step-1); color: var(--navy); line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--panel); color: var(--navy); font: 700 1.3rem/1 var(--font-text); transition: transform .2s var(--ease), background .2s; }
.faq details[open] summary::after { content: "−"; background: var(--marker); }
.faq .answer { padding: 0 .2rem 1.1rem; }

/* More-info section */
.more-info { background: var(--panel); }
.more-info .prose { max-width: 76ch; }

/* Contact block */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--rule); }
.contact-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.contact-list .ico { width: 56px; height: 56px; border-radius: 999px; background: var(--panel); display: grid; place-items: center; }
.contact-list .ico img { width: 30px; height: 30px; object-fit: contain; }
.contact-list h2 { font-size: 1.15rem; margin: 0; }
.contact-list p { margin: 0; font-size: 1.12rem; font-weight: 600; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-form { background: var(--navy); color: #fff; border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); }
.contact-form h2 { color: #fff; font-size: var(--step-2); }

/* Tabs (course page) */
.tabs__list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; border-bottom: 2px solid var(--rule); padding-bottom: .9rem; }
.tabs__list button { min-height: 46px; padding: .5rem 1.1rem; border-radius: 999px; border: 2px solid var(--rule); background: #fff; color: var(--navy); font: 700 1rem/1.2 var(--font-text); cursor: pointer; }
.tabs__list button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs__panel h2 { font-size: var(--step-2); }
.js .tabs__panel[hidden] { display: none; }
.tabs__panel + .tabs__panel { margin-top: 2.5rem; }
.js .tabs__panel + .tabs__panel { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #d5e3ef; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), rgba(255,255,255,.045) calc(var(--line) - 1px), rgba(255,255,255,.045) var(--line)); }
.site-footer .wrap { position: relative; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr 1.6fr 1.2fr; gap: 2.5rem; padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem; }
.footer-grid h2 { color: #fff; font-size: 1.2rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .35rem; line-height: 1.5; }
.footer-links ul { columns: 2; column-gap: 1.5rem; }
.footer-links li { break-inside: avoid; }
.footer-brand .logo-chip { display: inline-block; background: #fff; border-radius: 14px; padding: .6rem .9rem; }
.footer-brand .logo-chip img { height: 46px; width: auto; }
.footer-brand p { margin: 1rem 0; color: #c2d6e6; }
.footer-social { display: flex; gap: .4rem; }
.footer-social .icon-btn { background: rgba(255,255,255,.1); width: 44px; height: 44px; }
.footer-social .icon-btn:hover { background: var(--marker); color: var(--navy-deep); }
.branch { margin-bottom: 1.2rem; }
.branch strong { display: block; color: #fff; font-family: var(--font-head); font-weight: 500; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: 1.3rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .95rem; color: #b5cadc; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } .footer-links ul { columns: 1; } }

/* ---------- Floating contact ---------- */
.dock { position: fixed; z-index: 60; inset-inline-start: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.dock a, .dock button { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0,0,0,.4); }
.dock svg { width: 26px; height: 26px; }
.dock .wa { background: #25d366; color: #fff; }
.dock .call { background: var(--navy); color: #fff; }
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .dock { display: none; }
  body { padding-bottom: 68px; }
  .mobile-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--rule); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.35); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-bar a, .mobile-bar button { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; font: 700 .9rem/1 var(--font-text); color: var(--navy); text-decoration: none; background: none; border: 0; cursor: pointer; }
  .mobile-bar svg { width: 24px; height: 24px; }
  .mobile-bar .primary { background: var(--marker); color: var(--navy-deep); }
  .a11y-btn { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-end: 10px; width: 44px; height: 44px; border-radius: 999px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
  .a11y-panel { top: auto; bottom: 130px; inset-inline-end: 10px; }
}

/* Lead dialog */
.dialog { border: 0; padding: 0; border-radius: var(--radius); width: min(94vw, 560px); max-height: 92vh; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); }
.dialog::backdrop { background: rgba(11, 51, 82, .55); }
.dialog__inner { padding: clamp(1.4rem, 4vw, 2.2rem); background: #fff; }
.dialog h2 { font-size: var(--step-2); margin-bottom: .3em; }
.dialog .form .field label { color: var(--ink); }
.dialog__close { position: absolute; top: .7rem; inset-inline-end: .7rem; width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--rule); background: #fff; color: var(--navy); cursor: pointer; display: grid; place-items: center; }

/* Accessibility panel */
.a11y-btn { position: fixed; z-index: 61; inset-inline-end: 0; top: 40%; width: 48px; height: 52px; border: 0; border-radius: 12px 0 0 12px; background: var(--navy); color: #fff; cursor: pointer; display: grid; place-items: center; }
[dir="ltr"] .a11y-btn { border-radius: 0 12px 12px 0; }
.a11y-btn svg { width: 26px; height: 26px; }
.a11y-panel { position: fixed; z-index: 130; inset-inline-end: 56px; top: 25%; width: min(88vw, 300px); background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 1rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.a11y-panel h2 { font-size: 1.15rem; }
.a11y-panel .grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.a11y-panel button { min-height: 48px; border-radius: var(--radius-sm); border: 2px solid var(--rule); background: #fff; color: var(--navy); font: 700 .95rem/1.2 var(--font-text); cursor: pointer; padding: .4rem; }
.a11y-panel button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.a11y-panel a { display: block; margin-top: .8rem; font-weight: 700; }
html.a11y-contrast { filter: contrast(1.25); }
html.a11y-contrast body { --ink-soft: #1d2b38; }
html.a11y-links a { text-decoration: underline !important; text-decoration-thickness: 2px !important; }
html.a11y-readable body, html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3, html.a11y-readable h4, html.a11y-readable summary { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: .02em; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; }

/* Search / 404 / thanks */
.search-form { display: flex; gap: .6rem; max-width: 560px; }
.search-form input { flex: 1; min-height: 50px; padding: .6rem 1rem; border: 2px solid var(--rule); border-radius: 999px; font: 500 1.05rem var(--font-text); }
.results { list-style: none; padding: 0; margin: 2rem 0 0; max-width: var(--measure); }
.results li { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.results a { font-family: var(--font-head); font-size: var(--step-1); font-weight: 500; text-decoration: none; }
.results p { margin: .3rem 0 0; color: var(--ink-soft); }
.center-note { text-align: center; max-width: 640px; margin-inline: auto; }
.center-note .prose { margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .dock, .mobile-bar, .a11y-btn, .lead, .aside { display: none !important; }
  .sheet::before, .ruled { background: none !important; }
}
