.page-title {
  margin: 0 0 .42em;
  font-size: clamp(2.15rem, 5.2vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.business-section .service-offer h2,
.business-section .work-steps h2,
.business-section .founder-note h2,
#projects .solution-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.route-section { padding-block: clamp(2.75rem, 7vw, 6rem); }
.route-back { margin: 0 0 1.35rem; }
.route-back a, .route-link {
  min-height: 44px;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.route-back a:hover, .route-link:hover { color: var(--white); }
.page-lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.55;
}
.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  margin-top: 2rem;
}
.service-detail h2 {
  margin: 0 0 .65rem;
  font-size: clamp(1.25rem, 2.7vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.service-detail p, .service-tasks {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.service-tasks { margin: 0 0 1.65rem; padding-left: 1.2em; }
.service-tasks li + li { margin-top: .45em; }
.service-detail aside .button { margin-top: .35rem; text-decoration: none; }
.next-step {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.5rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.75rem;
}
.next-step p { margin: 0; color: var(--muted); }
#services .business-intro { margin: 0 0 1.45rem; }
#services .page-title { margin-bottom: 1.1rem; }
#contacts .page-title { font-size: clamp(2.15rem, 4.7vw, 4rem); }
.brief-section { min-height: 52vh; }
@media (max-width: 720px) { .service-detail { grid-template-columns: minmax(0, 1fr); } }

/* Shared navigation around every screen. The same links form the desktop
   sidebar and the mobile tab bar, with no script needed to navigate. */
:root {
  --app-header-height: 70px;
  --app-rail-width: clamp(176px, 16vw, 228px);
  --app-gutter: clamp(20px, 4vw, 60px);
  --app-tab-height: 64px;
}
html { scroll-padding-top: calc(var(--app-header-height) + 12px); }
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--app-header-height);
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(20px, 3.5vw, 56px);
}
.app-brand, .app-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.app-brand .logo { flex: 0 0 auto; }
.app-brand-description {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 1rem;
  color: var(--muted);
  font-size: .875rem;
}
.app-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: .9rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  color: var(--white);
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 600;
}
.app-header-cta:hover { color: var(--mint); border-color: var(--mint); }
.app-header .theme-toggle { min-height: 44px; min-width: 44px; }
.app-layout {
  display: grid;
  grid-template-columns: var(--app-rail-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--app-header-height));
  max-width: 1600px;
  margin-inline: auto;
}
.app-nav {
  position: sticky;
  top: calc(var(--app-header-height) + 1px);
  align-self: start;
  display: grid;
  gap: .35rem;
  min-width: 0;
  padding: 1.4rem .8rem;
}
.app-tab {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  min-height: 47px;
  padding: .62rem .8rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
}
.app-tab:hover { background: var(--panel); color: var(--white); }
.app-tab[aria-current] {
  border-color: color-mix(in srgb, var(--mint) 45%, var(--line));
  background: color-mix(in srgb, var(--mint) 13%, var(--panel));
  color: var(--mint);
}
.app-tab-compact { display: none; }
.app-icon { position: relative; display: block; width: 18px; height: 18px; }
.app-icon::before, .app-icon::after {
  position: absolute;
  display: block;
  content: "";
}
.app-icon-home::before { inset: 7px 3px 2px; border: 1.5px solid; border-top: 0; border-radius: 0 0 2px 2px; }
.app-icon-home::after { top: 3px; left: 4px; width: 10px; height: 10px; border-top: 1.5px solid; border-left: 1.5px solid; transform: rotate(45deg); }
.app-icon-services::before { inset: 2px; border: 1.5px solid; border-radius: 3px; }
.app-icon-services::after { inset: 5px; background: linear-gradient(90deg, transparent calc(50% - .75px), currentColor calc(50% - .75px) calc(50% + .75px), transparent calc(50% + .75px)), linear-gradient(transparent calc(50% - .75px), currentColor calc(50% - .75px) calc(50% + .75px), transparent calc(50% + .75px)); }
.app-icon-work::before { top: 4px; left: 6px; width: 10px; height: 1.5px; background: currentColor; box-shadow: 0 4px currentColor, 0 8px currentColor; }
.app-icon-work::after { top: 4px; left: 2px; width: 2px; height: 1.5px; background: currentColor; box-shadow: 0 4px currentColor, 0 8px currentColor; }
.app-icon-about::before { top: 2px; left: 6px; width: 6px; height: 6px; border: 1.5px solid; border-radius: 50%; }
.app-icon-about::after { inset: 10px 3px 2px; border: 1.5px solid; border-radius: 5px 5px 2px 2px; }
.app-icon-projects::before { inset: 4px; border: 1.5px solid; transform: rotate(45deg); }
.app-icon-projects::after { left: 4px; top: 6px; width: 10px; height: 10px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.app-icon-contacts::before { inset: 3px 2px 5px; border: 1.5px solid; border-radius: 3px; }
.app-icon-contacts::after { left: 5px; bottom: 3px; width: 4px; height: 4px; border-left: 1.5px solid; transform: skewY(-35deg); }
.app-screen {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-inline-start: 1px solid var(--line);
}
.app-screen > main { flex: 1; }
.app-screen .wrap { width: min(1200px, calc(100% - var(--app-gutter) - var(--app-gutter))); }
.app-screen .legal-page { max-width: 850px; }
.app-screen #home {
  margin-block: clamp(22px, 4vw, 48px) 0;
  border: 1px solid var(--line);
  border-radius: clamp(18px, 2vw, 28px);
  padding: clamp(22px, 4vw, 52px);
  background: linear-gradient(135deg, var(--panel), var(--bg));
  gap: clamp(1.25rem, 3vw, 3rem);
}
.app-screen #home h1 { font-size: clamp(2.25rem, 4.3vw, 4.05rem); text-wrap: balance; }
.app-screen #home .hero-break { display: none; }
.app-screen #home .system-board { border-radius: 12px; }
.app-screen #home + #services { padding-top: clamp(32px, 5vw, 64px); }
.app-screen .service-offer { border-radius: .9rem; }
.app-screen .route-link {
  padding-inline: .85rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  text-decoration: none;
}
.app-screen .route-link:hover { border-color: var(--mint); }
.app-screen #main :is(section, article, details)[id] { scroll-margin-top: .75rem; }

@media (max-width: 950px) {
  .app-brand-description { display: none; }
  .app-screen #home { grid-template-columns: minmax(0, 1fr); }
  .app-screen #home .system-board { max-width: 640px; }
}
@media (max-width: 760px) {
  :root { --app-header-height: 62px; --app-gutter: 16px; }
  .app-layout { display: block; padding-bottom: calc(var(--app-tab-height) + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(var(--app-tab-height) + env(safe-area-inset-bottom, 0px) + 12px); }
  .app-screen { border-inline-start: 0; min-height: calc(100vh - var(--app-header-height) - var(--app-tab-height)); }
  .app-header-inner { padding-inline: 16px; gap: .55rem; }
  .app-header-actions { gap: .45rem; }
  .app-header-cta { padding-inline: .6rem; font-size: .8rem; }
  .app-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 21;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 5px 6px max(5px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--panel);
  }
  .app-tab {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 53px;
    padding: 3px 0;
    text-align: center;
    font-size: clamp(.75rem, 3vw, .81rem);
  }
  .app-tab-label { display: none; }
  .app-tab-compact { display: block; }
  .app-screen #home { display: grid; padding: clamp(16px, 4.5vw, 32px); }
  .app-screen #home h1 { font-size: clamp(1.9rem, 8vw, 3rem); }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .app-header { view-transition-name: dalvik-app-header; }
  .app-nav { view-transition-name: dalvik-app-navigation; }
  ::view-transition-group(root),
  ::view-transition-group(dalvik-app-header),
  ::view-transition-group(dalvik-app-navigation) { animation-duration: 160ms; }
}

/* Business examples use the existing typography and theme tokens. */
.practical-links { margin-bottom:clamp(3rem,7vw,6rem); border-top:1px solid var(--line); padding-top:1.5rem; }
.practical-links h2 { margin:0 0 .5rem; font-size:clamp(1.45rem,3vw,2.15rem); }
.practical-links p { color:var(--muted); max-width:68ch; line-height:1.6; }
.practical-links > div { display:flex; flex-wrap:wrap; gap:.25rem 1.5rem; }
.practical-links .route-link { display:inline-flex; }
#projects .connect-example { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; align-items:start; gap:clamp(1rem,4vw,3rem); }
.connect-example .example-steps { border-inline-start:1px solid var(--line); padding-inline-start:1.5rem; }
.connect-example h3 { margin:0 0 .6rem; font-size:1.05rem; }
.connect-example ol { padding-inline-start:1.3rem; margin:0; color:var(--muted); line-height:1.55; }
.connect-example li+li { margin-top:.4rem; }
#connect { scroll-margin-block-start:6rem; }
@media(max-width:760px){#projects .connect-example{grid-template-columns:minmax(0,1fr)}.connect-example .example-steps{border-inline-start:0;border-top:1px solid var(--line);padding:1rem 0 0}}
