/*
 * Phase 7 of the redesign (2026-10-30): the home page (home-page.php), an
 * author (author-page.php), the authors archive (authors-page.php), the
 * service pages (service-page.php), the 404 (notfound-page.php). Sources:
 * design/projects/home/proto/home.html, design/projects/pages/proto/pages.html,
 * DESIGN.md "Home", "Authors and service pages". The cards are css/card.css.
 * Scoped to .hm / .pg so the old bare rules of style.css stay out.
 */

.hm, .pg {padding: 0 16px 56px; font-family: var(--sans); color: var(--graphite); font-size: 17px; line-height: 1.55;}
.hm *, .pg *, .hm *::before, .pg *::before, .hm *::after, .pg *::after {box-sizing: border-box;}
.hm h1, .hm h2, .hm h3, .hm p, .hm figure, .hm ul, .pg h1, .pg h2, .pg h3, .pg p, .pg figure, .pg ul {margin: 0; padding: 0; text-align: left; color: inherit;}
.hm ul, .pg ul {list-style: none;}
.hm li, .pg li {margin: 0; padding: 0; background: none;}
.hm img, .pg img {display: block; max-width: 100%; height: auto;}
.hm :focus-visible, .pg :focus-visible {outline: 2px solid var(--form); outline-offset: 3px; border-radius: 4px;}
.vh {position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;}

/* Section heads with a link on the right */
.sec-h {display: flex; align-items: baseline; justify-content: space-between; gap: 16px;}
.sec-h h2 {font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em;}
.sec-h a {display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--form-deep); font-size: 15px; font-weight: 600; text-decoration: none;}
.sec-h a:hover {text-decoration: underline; text-underline-offset: .18em;}
.sec-h .ch-ico, .sheet-list .ch-ico {width: 18px; height: 18px;}

/* Test sections as the rows of a form: a circle, the name, the number. */
.sheet-list {margin: 14px 0 0; border-top: 1px solid var(--rule);}
.sheet-list a {display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--rule); color: var(--graphite); font-size: 17px; font-weight: 600; line-height: 1.3; text-decoration: none;}
.sheet-list a::before {content: ''; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--form); transition: background-color .2s var(--ease);}
@media (hover: hover) {
	.sheet-list a:hover::before {background: var(--graphite); border-color: var(--graphite);}
	.sheet-list a:hover {color: var(--form-deep);}
}
.sheet-list .n {font: 500 13px/1 var(--mono); color: var(--form);}
.sheet-list .ch-arrow {color: var(--form);}
.sheet-list a.all {color: var(--form-deep);}
/* "All tests": an outer ring - start here - never filled (a filled circle
   is a mark the visitor made). */
.sheet-list a.all::before {box-shadow: 0 0 0 2.5px var(--paper), 0 0 0 4px var(--form);}

/* Cards */
.hm .cards, .pg .cards {display: grid; gap: 18px; margin: 14px 0 0;}
.hm .art-card .d, .pg .art-card .d {display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px;}

/* ---------- home ---------- */
.hero {display: grid; gap: 16px; padding: 28px 0 0;}
.hero h1 {font-size: 36px; line-height: 1.04; font-weight: 700; letter-spacing: -.035em; color: var(--graphite); text-wrap: balance;}
.hero h1 span {display: block;}
.hero h1 .brand {color: var(--form);}
.hero p {max-width: 34em; font-size: 17px; line-height: 1.6;}
.hero p:first-of-type {font-size: 18px; line-height: 1.55;}
.hero p + p {color: var(--graphite-2);}
.hm-btn {margin-top: 6px;}
.hero-cover {display: none;}
.secs {margin: 40px 0 0;}
.fresh {margin: 48px 0 0;}
.partners {margin: 56px 0 0; padding: 24px 0 0; border-top: 1px solid var(--rule);}
.partners h2 {font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--graphite-2);}
.partners ul {display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px;}
.partners a {display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--form-deep); font-size: 15.5px; font-weight: 600; text-decoration: none;}
.partners a .ch-ico {width: 15px; height: 15px;}
.partners a:hover {text-decoration: underline; text-underline-offset: .18em;}
/* Phone: no button or cover on the first screen - "All tests" is the first
   row; the second paragraph goes under the sections. */
@media (max-width: 1279px) {
	.hm {display: flex; flex-direction: column;}
	.hero {display: contents;}
	.hero h1 {order: 1; margin-top: 28px;}
	.hero p:first-of-type {order: 2; margin-top: 16px;}
	.hero .hm-btn, .hero-cover {display: none;}
	.secs {order: 3; margin-top: 32px;}
	.hero p + p {order: 4; margin-top: 24px;}
	.fresh {order: 5;}
	.partners {order: 6;}
	.art-card.d-only {display: none;}
}

/* ---------- headings and text of the pages (the article's reading type) ---------- */
.pg-h1 {padding: 16px 0 0 !important; font-size: min(32px, 8.4vw); line-height: 1.08; font-weight: 700; letter-spacing: -.03em; color: var(--graphite); text-wrap: balance; overflow-wrap: break-word;}
.txt {padding: 20px 0 0; font-size: 18px; line-height: 1.65;}
/* .pg in front: the bare .pg p {margin: 0} above outranked these and ran
   the paragraphs together (Designer's review, 2026-10-30). */
.pg .txt > * {margin: 0;}
.pg .txt > * + * {margin-top: 1em;}
.txt > p, .txt > ul, .txt > ol {max-width: 34em;}
.txt p {margin-bottom: 0;}
.txt a {color: var(--form-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;}
.pg .txt h2 {margin-top: 40px; font-size: 25px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; text-wrap: balance;}
.pg .txt h3 {margin-top: 28px; font-size: 20px; line-height: 1.3; font-weight: 650;}
.pg .txt h2 + *, .pg .txt h3 + * {margin-top: 12px;}
.pg .txt > h2:first-child {margin-top: 8px;}
.txt strong, .txt b {font-weight: 600;}
.txt ul, .txt ol {padding: 0; margin-left: 0;}
.txt ul > li {position: relative; padding: 0 0 0 26px;}
.txt ul > li::before {content: ''; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--form);}
.txt ol {list-style: none; counter-reset: n;}
.txt ol > li {position: relative; counter-increment: n; padding: 0 0 0 36px;}
.txt ol > li::before {content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: .32em; font: 500 13px/1.4 var(--mono); color: var(--form);}
.txt li + li {margin-top: .55em;}
.txt img {max-width: 100%; height: auto;}

/* People as rows: photo, name, role, number, arrow */
.rows {border-top: 1px solid var(--rule);}
.rows > li {border-bottom: 1px solid var(--rule);}
.prow {display: grid; grid-template-columns: 64px minmax(0, 1fr) 18px; align-items: center; gap: 14px; padding: 14px 0; color: var(--graphite) !important; text-decoration: none !important;}
.prow img, .prow-blank {width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--field);}
.prow b {display: block; font-size: 17px; line-height: 1.3; font-weight: 650;}
.prow .r {display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.4; color: var(--graphite-2);}
.prow .n {display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.2; font-weight: 500; color: var(--form-deep);}
.prow .n .m {font: 500 13px/1 var(--mono); color: var(--form);}
.prow .ch-arrow {color: var(--form);}
@media (hover: hover) {a.prow:hover b {color: var(--form-deep); text-decoration: underline; text-underline-offset: .18em;}}

/* About: the team block in the page's text (classes since 2026-10-30) as
   the same rows; the link on its own line. */
.txt .wg-team {margin-top: 12px; border-top: 1px solid var(--rule);}
.txt .wg-team-member {display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 14px; align-items: center; align-content: center; padding: 14px 0; border-bottom: 1px solid var(--rule);}
.txt .wg-team-photo {grid-row: 1 / span 3; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--field);}
.txt .wg-team-name {display: block; font-size: 17px; line-height: 1.3; font-weight: 650;}
.txt .wg-team-role {display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.4; color: var(--graphite-2);}
.txt .wg-team-link {display: inline-flex; align-items: center; justify-self: start; min-height: 44px; margin: 2px 0 -10px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere;}

/* The author: a large square portrait. */
.au-head {display: grid; gap: 16px; padding: 18px 0 0;}
.au-head img {width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); background: var(--field);}
.au-head .pg-h1 {padding: 0 !important; font-size: 30px;}
.au-head p {margin-top: 6px; font-size: 16px; line-height: 1.4; color: var(--form-deep); font-weight: 500;}

/* Side columns: desktop only. */
.pg .side {display: none;}

/* 404: the number, its zero an empty printed ring. */
.nf-num {display: flex; align-items: baseline; gap: .06em; padding: 28px 0 0 !important; font: 600 96px/1 var(--mono); letter-spacing: -.05em; color: var(--form) !important;}
.nf-num i {width: .72em; height: .72em; border-radius: 50%; border: .13em solid var(--form);}
.nf .pg-h1 {padding-top: 14px !important;}
.nf .sec-h {margin-top: 40px;}
@media (max-width: 1279px) {.pg .art-card.d-only {display: none;}}

@media (min-width: 1280px) {
	.wg-v2 .breadcrumbs:has(+ .hm), .wg-v2 .breadcrumbs:has(+ .pg) {margin-bottom: 0;}
	.hm, .pg {width: min(1280px, 100% - 48px); margin: 0 auto; padding: 0 0 80px; font-size: 18px;}
	.pg {padding-bottom: 88px;}

	.hero {grid-template-columns: minmax(0, 1fr) 440px; column-gap: 72px; align-items: center; padding-top: 48px;}
	.hero > :not(.hero-cover) {grid-column: 1;}
	.hero h1 {font-size: 58px; line-height: 1.03;}
	.hero p:first-of-type {font-size: 21px; line-height: 1.5;}
	.hero-cover {display: block; grid-column: 2; grid-row: 1 / span 5;}
	.hero-cover img {width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule);}
	.hm-btn {justify-self: start;}
	.secs {margin-top: 64px;}
	.sec-h h2 {font-size: 28px;}
	/* Nine rows - a 3x3 block on the cards' grid. */
	.sheet-list {display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; border-top: 0; margin-top: 20px;}
	.sheet-list a {border-top: 1px solid var(--rule); border-bottom: 0;}
	.sheet-list a:nth-last-child(-n+3) {border-bottom: 1px solid var(--rule);}
	.fresh {margin-top: 72px;}
	.hm .cards, .pg .cards {grid-template-columns: repeat(3, 1fr); gap: 40px 32px; margin-top: 22px;}
	.hm .art-card .d, .pg .art-card .d {font-size: 14.5px;}

	.pg-h1 {padding-top: 22px !important; font-size: 48px; line-height: 1.05;}
	.pg .txt > h2:first-child {margin-top: 12px;}
	/* Text and a right column - the article's grid: 720 + 300, 88 apart. */
	.cols {display: grid; grid-template-columns: minmax(0, 720px) 300px; column-gap: 88px; justify-content: space-between; align-items: start;}
	.txt {padding-top: 28px; font-size: 19px; line-height: 1.7;}
	.pg .txt h2 {font-size: 30px; margin-top: 48px;}
	.pg .side {display: block; position: sticky; top: 28px; margin-top: 34px;}
	.pg .side > p {font-size: 15px; font-weight: 650; color: var(--form-deep);}
	.pg .side nav {display: grid; margin-top: 10px; border-left: 1.5px solid var(--rule);}
	.pg .side nav a {display: flex; align-items: center; min-height: 44px; margin-left: -1.5px; padding: 0 0 0 14px; border-left: 1.5px solid transparent; color: var(--graphite); font-size: 15px; line-height: 1.35; text-decoration: none;}
	.pg .side nav a:hover {color: var(--form-deep);}
	.pg .side nav a[aria-current] {border-left-color: var(--form); color: var(--form-deep); font-weight: 600;}
	.txt .wg-team {display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; border-top: 0;}
	.txt .wg-team-member {grid-template-columns: 72px minmax(0, 1fr); column-gap: 18px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 0;}
	.txt .wg-team-member:nth-last-child(-n+2) {border-bottom: 1px solid var(--rule);}
	.txt .wg-team-photo {width: 72px; height: 72px;}
	.prow {grid-template-columns: 72px minmax(0, 1fr) 18px; gap: 18px; padding: 16px 0;}
	.prow img, .prow-blank {width: 72px; height: 72px;}
	.prow b {font-size: 18px;}
	.authors .rows {display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; margin-top: 32px; border-top: 0;}
	.authors .rows > li {border-top: 1px solid var(--rule); border-bottom: 0;}
	.authors .rows > li:nth-last-child(-n+2) {border-bottom: 1px solid var(--rule);}
	/* The author: name and text on the left, the portrait 300 on the right
	   with the other authors under it - one <img>, moved by the grid. */
	.au {display: grid; grid-template-columns: minmax(0, 720px) 300px; grid-template-rows: auto auto 1fr; column-gap: 88px; justify-content: space-between; align-items: start;}
	.au-head {display: contents;}
	.au-head > div {grid-column: 1; grid-row: 1; padding-top: 22px;}
	.au-head img {grid-column: 2; grid-row: 1 / span 2; width: 300px; margin-top: 34px;}
	.au-head .pg-h1 {font-size: 48px;}
	.au-head p {font-size: 19px;}
	.au .txt {grid-column: 1; grid-row: 2 / span 2;}
	.pg .au-side {grid-column: 2; grid-row: 3; position: static; margin-top: 32px;}
	.au-side > p {font-size: 15px; font-weight: 650; color: var(--form-deep);}
	.au-side .rows {margin-top: 10px;}
	.au-side .prow {grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 10px 0;}
	.au-side .prow img, .au-side .prow-blank {width: 48px; height: 48px;}
	.au-side .prow b {font-size: 15.5px;}
	.au-side .prow .r {display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px;}
	/* 404: the number and the heading on one line. */
	.nf-head {display: flex; align-items: flex-end; gap: 56px; padding-top: 40px;}
	.nf-num {padding-top: 0 !important; font-size: 168px;}
	.nf .nf-head .pg-h1 {padding: 0 0 14px !important;}
	.nf .sec-h {margin-top: 56px;}
}
@media (prefers-reduced-motion: reduce) {
	.hm *, .pg * {transition: none !important; animation: none !important;}
}
