/* Daylight is warm paper and indigo ink. At night the same engraving
   becomes a pale copperplate impression against a deep blue ground. */
:root {
  --paper:#f6f2e9; --panel-paper:#fffcf5; --wash:#ede7da; --ink:#222f44;
  --subtle:#515c68; --line:#cec7b9; --accent:#785626; --accent-wash:#eae0cb;
  --button:#263951; --button-ink:#fff9eb; --primary-card:#273b52; --on-card:#fff7e9;
  --card-copy:#e1e4e5; --card-detail:#e9cc93; --ring:#876430; --success:#275e49; --error:#963e37;
  --serif:"Iowan Old Style","Palatino Linotype","Songti SC","STSong","Noto Serif CJK SC","Noto Serif CJK HK","PMingLiU",Georgia,serif;
  --sans:"Avenir Next","Segoe UI","PingFang SC","PingFang HK","Microsoft YaHei",Arial,sans-serif;
  --mac-paper:var(--paper); --mac-muted:var(--subtle); --mac-blue:var(--accent); --mac-line:var(--line); --mac-ink:var(--ink); --mac-font:var(--sans);
  color-scheme:light; background:var(--paper); color:var(--ink); font-family:var(--sans)
}
:root[data-theme="dark"] {
  --paper:#111b2b; --panel-paper:#1a293b; --wash:#223247; --ink:#f4eddf;
  --subtle:#bbc5d1; --line:#405065; --accent:#e0bc7f; --accent-wash:#363749;
  --button:#e5c594; --button-ink:#202c3b; --primary-card:#303b4a; --on-card:#fff3df;
  --card-copy:#e4dfd5; --card-detail:#f1cd8d; --ring:#efd59e; --success:#a4d6b6; --error:#ffb7a4;
  color-scheme:dark
}
body {margin:0;min-height:100vh;color:var(--ink);background:var(--paper);font-family:var(--sans)}
.portal-home *, .portal-home, .portal-footer, .masthead * {box-sizing:border-box}
.sr-only {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.icon-library {position:absolute;width:0;height:0;overflow:hidden}
.skip-link {position:fixed;top:8px;left:12px;z-index:10;padding:.65rem;color:var(--button-ink);background:var(--button);transform:translateY(-150%)}
.skip-link:focus {transform:none}
.portal-home a {color:inherit;text-decoration:none}
.portal-home :is(a,summary):focus-visible, .masthead :is(a,button,select):focus-visible {outline:2px solid var(--ring);outline-offset:4px}
.portal-home h1,.portal-home h2,.portal-home h3,.portal-home p,.portal-home ol {margin:0}
.portal-width,.masthead .masthead-inner {width:min(1176px,calc(100% - 88px));margin-inline:auto}
.masthead {position:relative;z-index:3;background:var(--paper);border:0;border-bottom:1px solid var(--line);backdrop-filter:none;-webkit-backdrop-filter:none}
.masthead .masthead-inner {min-height:70px;display:flex;justify-content:space-between;align-items:center;gap:24px}
.masthead .brand {display:inline-flex;gap:8px;align-items:center;text-decoration:none;color:var(--ink)}
.portal-emblem {display:grid;width:39px;height:39px;place-items:center;color:var(--accent)}
.portal-emblem svg {width:100%;height:100%}
.masthead .brand strong,.footer-brand {font:600 28px/1 var(--serif);letter-spacing:-.05em}
.masthead .brand .brand-caption {font:500 12px/1.3 var(--sans);color:var(--subtle);border-left:1px solid var(--line);padding-left:12px;margin-left:4px}
.masthead .primary-nav {display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:23px;background:none;border:0;border-radius:0;box-shadow:none;padding:0}
.masthead .primary-nav a {position:relative;font:500 13px/1.4 var(--sans);border-radius:0;color:var(--subtle);background:transparent;padding:12px 1px;text-decoration:none}
.masthead .primary-nav a:hover,.masthead .primary-nav a[aria-current="page"] {background:none;box-shadow:none;color:var(--ink)}
.masthead .primary-nav a[aria-current="page"]::after {position:absolute;content:"";height:2px;background:var(--accent);inset:auto 0 5px}
.masthead .header-actions {display:flex;gap:8px;align-items:center;justify-content:flex-end}
.portal-home {width:auto;max-width:none;padding:0;min-width:0}
.landscape-hero {position:relative;isolation:isolate;overflow:hidden;display:grid;place-items:center;min-height:320px;text-align:center}
.landscape-print {position:absolute;z-index:-2;inset:0;background:url("./mountain-etching.webp") center 67%/100% auto no-repeat;mix-blend-mode:multiply;opacity:.77;
  mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 87%,transparent)}
.sky-disc {position:absolute;z-index:-1;left:13%;top:25%;width:48px;aspect-ratio:1;border:1px solid #b9985d;border-radius:100%;background:repeating-linear-gradient(to bottom,#dfc495aa 0 1px,transparent 1px 3px);opacity:.86}
:root[data-theme="dark"] .landscape-print {filter:grayscale(1) invert(1) sepia(.55) saturate(.8);mix-blend-mode:screen;opacity:.68}
:root[data-theme="dark"] .sky-disc {background:none;border:0;box-shadow:inset -9px -4px 0 #ebd1a0;transform:rotate(20deg);width:38px}
:root[data-theme="dark"] .sky-disc::after {content:"";position:absolute;top:-15px;left:56px;width:2px;height:2px;background:#ecd7ac;box-shadow:30px 16px #baa98c,60px -8px #d6d0b9,-86px 79px #aaa99f,-33px -7px #b9ab8f}
.hero-copy {position:relative;width:min(670px,85%);padding:44px 10px 48px}
.hero-kicker {display:flex;align-items:center;justify-content:center;gap:13px;font:600 12px/1.4 var(--sans);letter-spacing:.21em;color:var(--accent)}
.hero-kicker span {font-size:11px}
.portal-home #hero-title {margin:12px 0 13px;color:var(--ink);font:600 clamp(42px,5.4vw,74px)/1.19 var(--serif);letter-spacing:.035em;text-wrap:balance}
.hero-intro {font:500 15px/1.7 var(--sans);color:var(--subtle);text-wrap:balance}
.hero-actions {display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:21px;margin-top:24px}
.portal-home .hero-primary,.portal-home .hero-secondary {display:inline-flex;align-items:center;justify-content:center;gap:14px;font:600 14px/1.45 var(--sans);min-height:43px}
.portal-home .hero-primary {color:var(--button-ink);background:var(--button);padding:10px 20px;border:1px solid var(--button);border-radius:5px}
.portal-home .hero-primary:hover {filter:brightness(1.12)}
.portal-home .hero-secondary {color:var(--ink);text-decoration:underline;text-underline-offset:5px;text-decoration-color:var(--accent)}
.portal-home .icon {display:block;width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.portal-home .hero-primary .icon,.card-action .icon {width:17px;height:17px}
.service-area {position:relative;padding-top:8px}
.service-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.service-grid .service-card {position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:24px 24px 19px;border:1px solid var(--line);border-radius:7px;background:var(--panel-paper);transition:transform .18s,border-color .18s}
.service-grid .service-card:hover {transform:translateY(-3px);border-color:var(--accent)}
.card-icon {display:grid;place-items:center;width:41px;height:41px;margin-bottom:20px;border:1px solid var(--line);border-radius:50%;color:var(--accent);background:var(--paper)}
.card-icon .icon {width:22px;height:22px}
.service-grid h3 {color:var(--ink);font:600 clamp(21px,1.8vw,26px)/1.25 var(--serif);text-wrap:balance}
.service-grid p {padding-block:10px 20px;color:var(--subtle);font:400 14px/1.65 var(--sans)}
.card-action {display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding-top:13px;margin-top:auto;border-top:1px solid var(--line);color:var(--accent);font:600 13px/1.5 var(--sans)}
.service-grid .featured {background:var(--primary-card);border-color:var(--primary-card)}
:root[data-theme="dark"] .service-grid .featured {border-color:#9e8764}
.featured .card-icon {background:transparent;border-color:#81909b;color:var(--card-detail)}
.featured h3 {color:var(--on-card)} .featured p {color:var(--card-copy)} .featured .card-action {color:var(--card-detail);border-color:#67727e}
.process-area {padding-block:45px 29px}
.process-heading {display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:23px}
.process-heading span {display:block;height:1px;background:var(--line);flex:1;position:relative}
.process-heading span:first-child::after,.process-heading span:last-child::before {content:"";position:absolute;top:-2px;right:0;width:5px;height:5px;background:var(--accent);transform:rotate(45deg)}
.process-heading span:last-child::before {left:0;right:auto}
.process-heading h2 {font:600 clamp(22px,2vw,28px)/1.35 var(--serif);text-align:center}
.process-list {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;padding:0;list-style:none}
.process-list li {display:flex;gap:15px;align-items:flex-start}
.step-index {display:block;padding-top:1px;color:var(--accent);font:italic 25px/1.1 var(--serif)}
.process-list h3 {color:var(--ink);font:600 17px/1.4 var(--serif)}
.process-list p {max-width:35em;margin-top:5px;color:var(--subtle);font:400 13px/1.75 var(--sans)}
.portal-footer {display:flex;justify-content:space-between;align-items:center;gap:18px;padding:17px 0 24px;border-top:1px solid var(--line);color:var(--subtle)}
.footer-brand {font-size:20px}
.footer-links {display:flex;flex-wrap:wrap;gap:8px 22px}
.footer-links a {padding:7px 0;font:500 13px/1.5 var(--sans)}
.footer-links a:hover {text-decoration:underline}
:lang(ru) .hero-kicker,:lang(en) .hero-kicker {letter-spacing:.08em}
html:is(:lang(ru),:lang(en)) #hero-title {letter-spacing:-.035em;font-size:clamp(40px,4.5vw,66px)}
html:lang(ru) .masthead .primary-nav {gap:14px}
@media (min-width:1600px) {.landscape-print {background-size:1600px auto}}
@media (max-width:1040px) {
  .portal-width,.masthead .masthead-inner {width:calc(100% - 48px)}
  .masthead .primary-nav {gap:12px}.masthead .masthead-inner {gap:12px}
  .masthead .brand .brand-caption {display:none}
  .service-grid .service-card {padding:19px 17px 16px}
  .landscape-print {background-size:auto 110%}
}
@media (max-width:780px) {
  .masthead .masthead-inner {flex-wrap:wrap;column-gap:8px;row-gap:0;padding:7px 0 0}
  .masthead .primary-nav {order:3;width:100%;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:7px;border-top:1px solid var(--line);margin-top:6px}
  .masthead .primary-nav a {flex:0 1 auto;font-size:12px;line-height:1.25;text-align:center;white-space:normal;padding:9px 0;align-self:stretch;align-content:center}
  .masthead .primary-nav a[aria-current="page"]::after {bottom:0}
  .masthead .portal-emblem {width:31px;height:31px}
  .masthead .brand strong {font-size:24px}
  .service-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .landscape-hero {min-height:285px}.hero-copy {padding-block:30px}
  .landscape-print {background-size:cover;background-position:center bottom;opacity:.49}
  .sky-disc {width:31px;left:7%;top:16%}
  .process-area {padding-top:32px}
  .process-list {gap:14px}.process-list li {gap:9px}
}
@media (max-width:560px) {
  .portal-width,.masthead .masthead-inner {width:calc(100% - 32px)}
  .masthead .primary-nav a {font-size:11.5px}
  .landscape-hero {min-height:268px}.hero-copy {width:95%;padding:32px 7px 38px}
  .landscape-print {background-size:auto 63%;background-position:55% bottom;opacity:.52}
  :root[data-theme="dark"] .landscape-print {opacity:.46}
  .hero-kicker {font-size:11px}.hero-intro {max-width:30ch;margin:auto;font-size:14px}.hero-actions {margin-top:16px;gap:16px}
  .portal-home #hero-title {font-size:clamp(32px,9.6vw,49px);margin:10px 0}
  .service-grid {gap:10px}.service-grid .service-card {padding:16px 13px 12px}
  .card-icon {width:34px;height:34px;margin-bottom:12px}.card-icon .icon {width:18px;height:18px}
  .service-grid h3 {font-size:21px}.service-grid p {font-size:13px;padding-block:6px 12px}
  .card-action {font-size:12px;padding-top:9px}
  .process-heading {gap:12px;margin-bottom:19px}.process-list {grid-template-columns:1fr;gap:15px}
  .step-index {min-width:30px}.process-list h3 {font-size:16px}
  .portal-footer {flex-wrap:wrap;gap:8px}.footer-links {gap:0 14px}
}
html:lang(ru) .service-grid h3 {overflow-wrap:anywhere;hyphens:auto}
@media(max-width:360px) {html:lang(ru) .service-grid {grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce) {.service-grid .service-card {transition:none}.service-grid .service-card:hover {transform:none}}
.landscape-hero {background:var(--paper)}
@media(min-width:1041px) {
  .landscape-print {inset:12px 0 0;background-size:min(100%,1660px) 100%;background-position:center bottom}
}
body .legacy-controls {display:flex;align-items:center;gap:8px;margin-left:auto;order:3}
body .legacy-brand {font:600 24px/1.2 var(--serif);text-decoration:none;color:var(--portal-ink)}
.subscription-strip {display:flex;align-items:center;gap:15px;box-sizing:border-box;margin-top:17px;padding:14px 19px;border:1px solid var(--line);border-radius:7px;background:var(--wash)}
.strip-icon {flex:none;display:grid;place-items:center;width:36px;height:36px;color:var(--accent)}
.subscription-strip h2 {font:600 18px/1.35 var(--serif);color:var(--ink)}
.subscription-strip p {margin:3px 0 0;font:400 13px/1.6 var(--sans);color:var(--subtle)}
.portal-home .subscription-strip a {display:inline-flex;gap:10px;align-items:center;justify-content:center;flex:none;margin-left:auto;padding:9px 14px;border:1px solid var(--accent);border-radius:4px;color:var(--accent);font:600 13px/1.45 var(--sans)}
.subscription-strip a:hover {background:var(--panel-paper)}.subscription-strip a .icon {width:15px;height:15px}
@media(max-width:560px) {.subscription-strip {gap:9px;padding:12px}.strip-icon {display:none}.portal-home .subscription-strip a {padding:8px}.subscription-strip a .icon {display:none}}
@media(max-width:560px) {
  html:lang(ru) .service-grid {grid-template-columns:minmax(0,1fr)}
  html:lang(ru) .service-grid .service-card {display:grid;grid-template-columns:38px minmax(0,1fr);column-gap:12px;align-items:start;padding:15px}
  html:lang(ru) .card-icon {grid-column:1;grid-row:1 / 3;margin:0}
  html:lang(ru) .service-grid h3 {overflow-wrap:normal;hyphens:none;text-wrap:wrap;font-size:21px}
  html:lang(ru) .service-grid p,html:lang(ru) .service-grid h3 {grid-column:2}
  html:lang(ru) .card-action {grid-column:2}
}
html:lang(ru) {--serif:Georgia,"Times New Roman",serif;--sans:"Segoe UI",Arial,sans-serif}
