/* Shared text roles for the complete public site; historical D/E layouts stay independent. */
:root {
  --type-body: 16px;
  --type-small: 14px;
  --leading-body: 1.85;
  --type-control: 13px;
  --leading-control: 1.6;
  --type-featured-control: 17px;
  --type-item-title: 21px;
  --leading-item-title: 1.4;
  --type-small-section-title: 24px;
  --type-diagram-title: 16px;
  --type-page-title: clamp(60px, 6.3vw, 96px);
  --type-subpage-section: clamp(48px, 4.8vw, 72px);
  --type-breadcrumb: 12px;
}
@media (max-width: 1100px) { :root { --type-page-title: clamp(52px, 7.5vw, 80px); } }
@media (max-width: 800px) {
  :root {
    --type-body: 15px;
    --type-item-title: 19px;
    --type-page-title: clamp(42px, 7.6vw, 60px);
    --type-subpage-section: 52px;
  }
}
@media (max-width: 540px) {
  :root {
    --type-small-section-title: 22px;
    --type-page-title: clamp(32px, 9vw, 48px);
    --type-subpage-section: 43px;
    --type-breadcrumb: 11px;
  }
}
/* Shared subpage text roles use the same type scale without per-page duplicates. */
:is(.service-page, .about-page, .contact-page, .legal-page) { font-size: var(--type-body); line-height: var(--leading-body); }
:is(.service-page, .about-page) h3 { letter-spacing: -.025em; font-weight: 650; font-size: var(--type-item-title); line-height: var(--leading-item-title); }
:is(.service-page, .about-page) .display-title { font-size: var(--type-subpage-section); }

/* The homepage statement, display headings and statistics retain their editorial emphasis. */
:is(.hero, .introduction, .professional, .services-section, .work-section, .cooperation-section, .cooperation-section + .contact-section) {
  --type-control: 14px;
}
.personal > p:first-child span, .experience span {
  font-size: 14px;
  line-height: 1.7;
}
.hero-kicker { max-width: none; font-size: var(--type-small); line-height: 1.7; }
.personal > p:nth-child(2) { font-size: var(--type-body); line-height: var(--leading-body); }
.experience { flex-wrap: wrap; }
.example-link { font-size: var(--type-control); line-height: var(--leading-control); font-weight: 650; }
.report-study h3 { font-size: var(--type-item-title); line-height: var(--leading-item-title); font-weight: 650; letter-spacing: -.025em; }
.report-study figcaption p { font-size: var(--type-body); line-height: var(--leading-body); }
.decision > p, .study-bottom .explanation { font-size: var(--type-body); line-height: var(--leading-body); }
.study-bottom { align-items: start; }
.study-bottom .explanation > p + p { margin-top: 12px; }

/* Full homepage extension and report automation example. */
.automation-track { stroke: var(--text-blue); }
.trigger-connector { fill: none; stroke: var(--accent-orange); stroke-width: 3; stroke-linejoin: round; }
.automation-source, .automation-trigger { display: flex; flex-direction: column; gap: 6px; }
.automation-source { padding: 16px 0 20px; }
.automation-source strong { font-size: var(--type-diagram-title); }
.automation-source span, .automation-trigger span { font-size: 12px; line-height: 1.7; }
.automation-trigger { border-left: 3px solid var(--accent-orange); padding-left: 15px; margin-bottom: 28px; }
.automation-trigger strong { font-size: var(--type-diagram-title); }
.automation-steps { list-style: none; padding: 0; margin: 0; }
.automation-steps li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 18px; padding-bottom: 30px; }
.automation-steps li:last-child { padding-bottom: 0; }
.automation-steps li:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--text-blue); }
.automation-node { width: 36px; height: 36px; background: var(--diagram-peach); }
.automation-steps li:nth-child(2) .automation-node { background: var(--accent-blue); }
.automation-steps li:nth-child(3) .automation-node { background: var(--accent-green); border-radius: 50%; }
.automation-steps h4 { line-height: 1.5; font-size: var(--type-diagram-title); }
.automation-steps p { font-size: 12px; line-height: 1.8; margin-top: 5px; }
html { scroll-padding-top: 116px; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
.site-header { position: sticky; top: 0; z-index: 18; display: block; min-height: 100px; background: white; border-bottom: 2px solid transparent; transition: border-color .28s ease-out, box-shadow .28s ease-out; }
.header-inner { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.brand { white-space: nowrap; }
.full-nav { display: flex; gap: 24px; align-items: center; font-size: 14px; font-weight: 650; }
.full-nav > a:not(.action-button) { padding-block: 16px; }
.full-nav > a:not(.action-button):hover { color: var(--text-blue); }
.nav-group { position: relative; }
.nav-group summary { display: flex; align-items: center; gap: 7px; min-height: 44px; list-style: none; cursor: pointer; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary svg { width: 12px; height: 7px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .2s; }
.nav-group[open] summary svg { transform: rotate(180deg); }
.nav-panel { position: absolute; top: calc(100% + 10px); left: -22px; width: 310px; padding: 15px; background: white; border: 1px solid #d8dfda; box-shadow: 0 18px 40px #20382e12; }
.nav-panel-right { left: auto; right: -22px; width: 240px; }
.nav-panel :is(button, a) { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 13px 12px; font-size: 13px; line-height: 1.5; }
.nav-panel :is(button, a):is(:hover, :focus-visible) { background: #f3f3f3; }
.nav-panel a[aria-current="page"] { background: #f3f3f3; box-shadow: inset 2px 0 var(--accent-blue); }
@media (min-width: 1101px) {
  .site-header { min-height: 0; }
  .header-inner { min-height: 0; padding-block: 25px; transition: padding .28s cubic-bezier(.22, .61, .36, 1); }
  .full-nav { min-height: 48px; }
  .full-nav .nav-contact, .nav-panel :is(button, a) { font-size: 14px; }
  .site-header.is-compact { border-bottom-color: var(--accent-blue); box-shadow: 0 4px 10px rgb(32 56 46 / 10%); }
  .site-header.is-compact .header-inner { padding-block: 11px; }
  .nav-panel::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }
}
.nav-contact, .action-button { display: inline-flex; align-items: center; border: 0; border-radius: 40px; padding: 14px 23px; font-weight: 650; text-decoration: none; font-size: var(--type-control); line-height: var(--leading-control); }
.menu-toggle { display: none; }
.text-button { display: inline-block; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 5px; background: none; font-weight: 650; text-align: left; border-radius: 0; font-size: var(--type-control); line-height: var(--leading-control); }
.text-button:hover { color: var(--text-blue); }
.related-evidence { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 32px; font-size: var(--type-small); }
.related-evidence .text-button { max-width: 100%; font-size: var(--type-small); }
.display-title { font: 600 clamp(52px, 5.4vw, 82px)/1.03 var(--display); text-transform: uppercase; letter-spacing: -.015em; }
.services-section { background: var(--accent-green); padding-block: 90px 96px; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 65px 66px; }
.services-intro h2 { margin-bottom: 22px; }
.services-intro > p { max-width: 290px; font-size: var(--type-body); line-height: var(--leading-body); }
.service-item { display: flex; flex-direction: column; align-items: start; padding-top: 12px; min-width: 0; }
.service-heading { display: flex; align-items: flex-start; gap: 20px; width: 100%; }
.service-icon { flex: 0 0 64px; width: 64px; height: 64px; }
.service-item h3 { flex: 1; min-width: 0; font-weight: 650; font-size: var(--type-item-title); line-height: var(--leading-item-title); letter-spacing: -.025em; }
.service-item > p { max-width: 340px; margin-block: 22px 25px; font-size: var(--type-body); line-height: var(--leading-body); }
.service-item .text-button { margin-top: auto; }
.services-section .text-button:hover { color: #142c22; border-bottom-width: 2px; padding-bottom: 4px; }
.work-section { padding-block: 100px 90px; }
.section-opening { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: end; }
.section-opening > p { max-width: 430px; padding-bottom: 6px; font-size: var(--type-body); line-height: var(--leading-body); }
.reference-viewport { --reference-gap: 36px; margin-top: 30px; padding: 18px clamp(70px, 10%, 220px) 32px; }
.reference-track { display: grid; grid-template-columns: 1fr 1fr; gap: var(--reference-gap); }
.reference-slide { min-width: 0; background: #fff; border: 1px solid #f0f0f0; box-shadow: 7px 10px 22px rgb(0 0 0 / 7%), 1px 2px 5px rgb(0 0 0 / 3%); }
.reference-slide figure { height: 280px; background: white; margin: 20px 20px 24px; }
.reference-slide figure img { width: 100%; height: 100%; object-fit: contain; user-select: none; }
.work-copy { padding: 0 32px 32px; }
.work-copy .work-client { font: 600 clamp(28px, 2.7vw, 40px)/1.15 var(--display); letter-spacing: -.012em; }
.work-copy > p:not(.work-role) { max-width: 520px; margin-top: 18px; font-size: var(--type-body); line-height: var(--leading-body); }
.work-copy .work-role { font-size: var(--type-small); color: #5c6861; line-height: 1.7; margin-top: 14px; }
.is-carousel-ready .reference-viewport { overflow: hidden; touch-action: pan-y pinch-zoom; cursor: grab; }
.is-carousel-ready .reference-viewport:active { cursor: grabbing; }
.reference-viewport.is-pointer-focused:focus { outline: none; }
.reference-viewport.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.is-carousel-ready .reference-track { display: flex; }
.is-carousel-ready .reference-slide { flex: 0 0 calc((100% - var(--reference-gap)) / 2); }
.carousel-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; width: min(1320px, calc(100% - 100px)); margin: 12px auto 0; }
.carousel-paging { display: flex; gap: 12px; }
.carousel-paging .action-button { min-height: 44px; padding: 12px 22px; }
.carousel-dots { display: flex; gap: 5px; }
.carousel-dots button { display: grid; place-items: center; width: 32px; height: 38px; padding: 0; border: 0; background: transparent; }
.carousel-dots button::after { content: ''; width: 24px; height: 3px; background: #c8d0ca; transition: background .2s; }
.carousel-dots button[aria-current="true"]::after { background: var(--ink); }
.carousel-dots button:hover::after { background: var(--text-blue); }
.carousel-toggle { justify-self: end; min-height: 38px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.case-study-page { min-height: 65vh; padding-block: 75px; }
.case-study-page h1 { text-transform: uppercase; letter-spacing: -.02em; font: 600 var(--type-page-title)/1.03 var(--display); }
.full-nav > a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.cooperation-section { padding-block: 90px; background: #f3f3f3; }
.cooperation-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 110px; }
.cooperation-intro > p { margin-block: 27px 30px; max-width: 440px; font-size: var(--type-body); line-height: var(--leading-body); }
.cooperation-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px 32px; }
.cooperation-points { padding-top: 8px; display: grid; gap: 35px; }
.cooperation-points h3 { font-weight: 650; letter-spacing: -.025em; font-size: var(--type-item-title); line-height: var(--leading-item-title); }
.cooperation-points p { margin-top: 12px; max-width: 460px; font-size: var(--type-body); line-height: var(--leading-body); }
.contact-section { display: grid; grid-template-columns: 1.2fr 1fr; gap: 110px; align-items: center; padding-block: 116px 120px; }
.contact-title { font: 600 clamp(70px, 7.7vw, 116px)/.98 var(--display); text-transform: uppercase; letter-spacing: -.018em; }
.contact-lead { margin-top: 27px; font-size: var(--type-body); line-height: var(--leading-body); }
.contact-actions { max-width: 385px; }
.contact-actions > p { font-size: var(--type-small); line-height: var(--leading-body); }
.contact-button { padding: 20px 39px; margin-block: 29px 28px; font-size: var(--type-featured-control); }
.contact-email { display: block; width: fit-content; padding-bottom: 5px; border-bottom: 1px solid #bcc4bf; font-size: var(--type-body); line-height: var(--leading-body); }
.contact-email:hover { border-color: var(--ink); }
.full-footer { background: #f3f3f3; padding-top: 58px; }
.footer-top { display: grid; grid-template-columns: 1.2fr 1fr .65fr; gap: 70px; }
.footer-identity > p { font-size: var(--type-small); line-height: 1.8; margin-block: 21px 13px; }
.footer-identity > span { font-size: 14px; }
.footer-top nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-top nav > p { font-size: var(--type-small); font-weight: 750; margin-bottom: 10px; }
.footer-top nav > a, .footer-top nav > button { border: 0; background: none; padding: 3px 0; font-size: 14px; line-height: 1.6; text-align: left; }
.footer-top nav > a:hover, .footer-top nav > button:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 28px; border-top: 1px solid #d7dcd8; margin-top: 54px; font-size: 13px; line-height: 1.8; }
.footer-bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; }

/* Native dialogs preserve keyboard dismissal and focus return. */
#contact-form { display: grid; gap: 23px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
#contact-form label { display: block; font-size: 13px; line-height: 1.7; font-weight: 650; }
#contact-form label > span { font-weight: 400; }
#contact-form input, #contact-form textarea { display: block; width: 100%; border: 1px solid #aab8ae; border-radius: 0; padding: 13px 12px; margin-top: 8px; font-size: 15px; color: var(--ink); background: #fff; }
#contact-form textarea { resize: vertical; min-height: 125px; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.form-bottom > p { font-size: var(--type-small); line-height: 1.8; max-width: 220px; }
[hidden] { display: none !important; }

/* Alternate the three approved hover colors in page order. */
[data-hover-color="green"] { --button-hover-background: var(--accent-green); --button-hover-text: var(--ink); }
[data-hover-color="blue"] { --button-hover-background: var(--accent-blue); --button-hover-text: var(--ink); }
[data-hover-color="orange"] { --button-hover-background: var(--accent-orange); --button-hover-text: #111111; }
.menu-toggle { transition: transform .22s ease, background-color .22s ease, color .22s ease; }
:is(.action-button, .menu-toggle, .back-to-top)[data-hover-color]:focus-visible {
  background: var(--button-hover-background) !important;
  color: var(--button-hover-text) !important;
}
@media (hover: hover) {
  :is(.action-button, .menu-toggle, .back-to-top)[data-hover-color]:hover {
    background: var(--button-hover-background) !important;
    color: var(--button-hover-text) !important;
    transform: translateY(-3px);
  }
}
.back-to-top { position: fixed; right: 24px; bottom: max(24px, var(--footer-clearance, 0px)); z-index: 19; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #c8d0ca; border-radius: 50%; background: white; color: var(--ink); box-shadow: 0 3px 12px #20382e20; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .22s ease, color .22s ease; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 700px) {
  .back-to-top { right: 16px; bottom: max(16px, var(--footer-clearance, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-hover-color] { transition: none !important; transform: none !important; }
}
@media print { .back-to-top { display: none; } .site-header { position: static; box-shadow: none; } }

@media (max-width: 1250px) {
  .study-bottom { grid-template-columns: 1fr; gap: 30px; }
  .full-nav { gap: 17px; }
  .header-inner { gap: 20px; }
  .site-header .brand { font-size: 21px; gap: 9px; }
  .services-grid { gap: 55px 38px; }
  .cooperation-grid, .contact-section { gap: 65px; }
}
@media (max-width: 1100px) {
  html { scroll-padding-top: 100px; }
  .site-header { min-height: 84px; }
  .site-header.is-scrolled { border-bottom-color: var(--accent-blue); box-shadow: 0 4px 10px rgb(32 56 46 / 10%); }
  .header-inner { min-height: 82px; }
  .menu-toggle { display: block; border: 1px solid #cad3cc; background: white; border-radius: 30px; padding: 12px 22px; font-size: 13px; }
  .full-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: white; padding: 18px 25px 27px; border: 1px solid #d7dfd9; box-shadow: 0 20px 35px #20382e12; font-size: 15px; max-height: calc(100dvh - 120px); overflow: auto; }
  .full-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-group summary { justify-content: space-between; min-height: 52px; }
  .nav-panel, .nav-panel-right { position: static; width: auto; box-shadow: none; border: 0; border-left: 2px solid var(--accent-green); padding: 0 8px; margin-block: 8px 15px; }
  .full-nav > a:not(.action-button) { padding-block: 16px; }
  .full-nav .nav-contact { margin-top: 15px; align-self: start; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; }
  .services-intro { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
  .services-intro h2 { margin: 0; }
  .services-intro > p { max-width: 340px; }
  .services-section, .cooperation-section { padding-block: 70px; }
  .section-opening { gap: 65px; }
  .work-copy { padding-inline: 24px; }
  .carousel-controls { width: calc(100% - 44px); }
  .contact-section { padding-block: 90px; }
  .footer-top { gap: 40px; }
}
@media (max-width: 800px) {
  .service-heading { gap: 16px; }
  .service-icon { flex-basis: 56px; width: 56px; height: 56px; }
  .display-title { font-size: 58px; }
  .section-opening { grid-template-columns: 1fr; gap: 26px; }
  .section-opening > p { max-width: 520px; }
  .work-section { padding-block: 65px; }
  .reference-slide figure { height: 220px; }
  .reference-viewport { --reference-gap: 24px; }
  .work-copy .work-client { font-size: 31px; }
  .carousel-controls { gap: 16px; }
  .carousel-paging { gap: 8px; }
  .carousel-paging .action-button { padding-inline: 17px; }
  .cooperation-grid { grid-template-columns: 1fr; gap: 40px; }
  .cooperation-intro > p { max-width: 570px; }
  .cooperation-points { grid-template-columns: 1fr; gap: 28px; }
  .cooperation-points p { max-width: 570px; }
  .contact-section { gap: 40px; grid-template-columns: 1fr 1fr; }
  .contact-title { font-size: 68px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 35px; }
  .footer-identity { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .experience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience > p { flex-direction: column; align-items: flex-start; }
  html { scroll-padding-top: 93px; }
  .site-header { min-height: 77px; }
  .header-inner { min-height: 75px; }
  .site-header .brand { font-size: 20px; }
  .menu-toggle { font-size: 12px; padding: 10px 19px; }
  .display-title { font-size: 48px; }
  .services-section { padding-block: 48px 52px; }
  .services-grid { grid-template-columns: 1fr; gap: 36px; }
  .services-intro { display: block; grid-column: auto; }
  .services-intro h2 br { display: none; }
  .services-intro > p { margin-top: 21px; }
  .service-item { border-top: 1px solid #7fa58b; padding-top: 25px; }
  .service-item h3 br { display: none; }
  .service-item > p { margin-block: 15px 20px; max-width: none; }
  .work-section { padding-block: 51px 55px; }
  .section-opening { gap: 23px; }
  .reference-viewport { margin-top: 16px; }
  .reference-slide figure { height: 210px; margin: 10px 12px 18px; }
  .work-copy { padding: 0 22px 26px; }
  .work-copy .work-client { font-size: 31px; }
  .work-copy > p:not(.work-role) { margin-top: 15px; }
  .carousel-controls { width: calc(100% - 36px); margin-top: 5px; grid-template-columns: 1fr auto; gap: 14px; }
  .carousel-dots { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .carousel-toggle { grid-column: 2; grid-row: 1; }
  .cooperation-section { padding-block: 50px; }
  .cooperation-intro > p { margin-block: 23px; }
  .cooperation-points p { margin-top: 9px; }
  .contact-section { padding-block: 65px; grid-template-columns: 1fr; gap: 30px; }
  .contact-title { font-size: clamp(48px, 14.8vw, 78px); }
  .contact-lead { margin-top: 22px; }
  .contact-button { margin-block: 25px; }
  .full-footer { padding-top: 43px; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-identity { grid-column: auto; }
  .footer-top nav { gap: 7px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 38px; }
  .footer-legal { justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; gap: 23px; }
  .form-bottom { flex-direction: column; align-items: start; gap: 18px; }
}
@media (max-width: 700px) {
  .reference-viewport { --reference-gap: 16px; padding-inline: 36px; }
  .reference-track { grid-template-columns: 1fr; }
  .is-carousel-ready .reference-slide { flex-basis: 100%; }
}
