/* ==========================================================================
   Grapphen Atelier — Mail: site layer
   Loaded after atelier.css and pages-company.css. Uses their tokens only.
   Every selector is prefixed gam- (or scopes an at-/c- component inside one).

   1  Lockup and footer columns     5  Page sections (plate, pair, directory)
   2  Artefacts: shared bits        6  Pricing
   3  Artefacts                      7  Contact form and third-party widgets
   4  Inner-page lists               8  Responsive
   ========================================================================== */

/* 1 Lockup and footer columns -------------------------------------------- */
.gam-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.gam-lockup .gam-lockup__logo { height: 30px; width: auto; }
.gam-lockup__product {
	position: relative;
	padding-left: 13px;
	font-family: var(--font-display);
	font-size: 1.3125rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1;
	color: var(--ink);
}
.gam-lockup__product::before {
	content: "";
	position: absolute; left: 0; top: 50%;
	width: 1px; height: 22px;
	transform: translateY(-50%);
	background: var(--rule-strong);
}
.gam-lockup--footer .gam-lockup__logo { height: 28px; }
.gam-lockup--footer .gam-lockup__product { font-size: 1.25rem; }

.gam-footer__grid .at-footer__brand { grid-column: 1 / span 3; }
.gam-footer__cols {
	grid-column: 5 / span 8;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	column-gap: var(--gutter);
	row-gap: 40px;
}
.gam-footer__cols .at-footer__col { grid-column: auto; }
.gam-footer__app a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: .2em; }
.gam-footer__app a:hover { text-decoration-color: currentColor; }
.at-footer__line + .gam-footer__app { margin-top: 12px; }

/* 2 Artefacts: shared bits ----------------------------------------------- */
.gam-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gam-table { width: 100%; border-collapse: collapse; }
.gam-table th,
.gam-table td { padding: 11px 10px; text-align: left; font-weight: 400; white-space: nowrap; }
.gam-table th:first-child, .gam-table td:first-child { padding-left: 22px; }
.gam-table th:last-child, .gam-table td:last-child { padding-right: 22px; }
.gam-table thead th { padding-top: 12px; padding-bottom: 10px; font-size: .75rem; color: var(--slate); border-bottom: 1px solid var(--rule); }
.gam-table tbody tr + tr { border-top: 1px solid var(--rule-soft); }
.gam-table tbody th { font-weight: 500; }
.gam-table td.at-mono { color: var(--slate); }

.gam-label {
	display: inline-block;
	padding: 1px 8px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	font-size: .6875rem;
	font-weight: 500;
	line-height: 1.6;
	color: var(--slate);
	white-space: nowrap;
}

/* 3 Artefacts ------------------------------------------------------------ */

/* Domain health (home hero) */
.gam-domain__table { width: 100%; border-collapse: collapse; }
.gam-domain__table th,
.gam-domain__table td { padding: 10px 10px; text-align: left; font-weight: 400; vertical-align: baseline; }
.gam-domain__table th:first-child, .gam-domain__table td:first-child { padding-left: 22px; }
.gam-domain__table th:last-child, .gam-domain__table td:last-child { padding-right: 22px; }
.gam-domain__table thead th { padding-top: 12px; font-size: .75rem; color: var(--slate); border-bottom: 1px solid var(--rule); }
.gam-domain__table tbody tr + tr { border-top: 1px solid var(--rule-soft); }
.gam-domain__table tbody th { font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.gam-domain__detail { color: var(--slate); font-size: .8125rem; }

/* Inbox */
.gam-inbox__tabs { display: flex; gap: 24px; padding: 14px 22px 0; border-bottom: 1px solid var(--rule); }
.gam-inbox__tab { padding-bottom: 12px; font-size: .8125rem; font-weight: 500; color: var(--slate); }
.gam-inbox__tab .at-mono { margin-left: 4px; color: var(--mute); }
.gam-inbox__tab.is-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.gam-inbox__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2px 12px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--rule-soft);
}
.gam-inbox__row.is-open { background: var(--cobalt-wash); box-shadow: inset 2px 0 0 var(--cobalt); }
.gam-inbox__from { font-size: .8125rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gam-inbox__time { font-size: .75rem; color: var(--slate); text-align: right; }
.gam-inbox__subject { font-size: .8125rem; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gam-inbox__row .gam-label { justify-self: end; }
.gam-inbox__thread { padding: 16px 22px 20px; border-top: 1px solid var(--rule); }
.gam-inbox__list + .gam-inbox__thread { border-top: 0; }
.gam-inbox__auth { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rule-soft); }
.gam-inbox__auth .at-state { font-size: .75rem; }
.gam-inbox__label { margin-bottom: 8px; font-size: .75rem; color: var(--slate); }
.gam-inbox__summary { display: grid; gap: 6px; margin-bottom: 16px; }
.gam-inbox__summary li { position: relative; padding-left: 16px; font-size: .8125rem; line-height: 1.5; }
.gam-inbox__summary li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 1.5px; background: var(--ink); }
.gam-inbox__replies { display: flex; flex-wrap: wrap; gap: 8px; }
.gam-inbox__replies .at-fakebtn { padding: 6px 12px; font-size: .75rem; border-radius: 999px; }

/* Tenants (reseller console) */
.gam-tenants .at-artefact__head .at-fakebtn { flex-shrink: 0; }

/* Authentication results */
.gam-auth__checks > div {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 12px;
	align-items: baseline;
	padding: 11px 22px;
	border-bottom: 1px solid var(--rule-soft);
}
.gam-auth__checks > div:last-child { border-bottom: 0; }
.gam-auth__checks dt { font-size: .8125rem; font-weight: 500; }
.gam-auth__checks dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.gam-auth__detail { font-size: .75rem; color: var(--slate); overflow-wrap: anywhere; }

/* Warm-up ramp */
.gam-warmup__chart { padding: 22px 22px 14px; }
.gam-warmup__ramp { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 3px; align-items: end; height: 120px; }
.gam-warmup__ramp li { height: calc(max(var(--h), .03) * 100%); background: var(--rule); border-radius: 1px 1px 0 0; }
.gam-warmup__ramp li.is-done { background: var(--ink); }
.gam-warmup__ramp li.is-now { background: var(--cobalt); }
.gam-warmup__axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: .6875rem; color: var(--slate); }
.gam-warmup__foot { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 4 Inner-page lists ------------------------------------------------------ */

/* Release notes (changelog) */
.gam-release { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 16px; padding: 36px 0 40px; border-top: 1px solid var(--rule); }
.gam-release:first-child { border-top-color: var(--ink); }
.gam-release__head { grid-column: 1 / span 3; }
.gam-release__version { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.gam-release__meta { margin-top: 6px; font-size: .875rem; color: var(--slate); }
.gam-release__items { grid-column: 5 / span 8; }
.gam-release__items li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); font-size: .9375rem; line-height: 1.55; }
.gam-release__items li:first-child { padding-top: 0; }
.gam-release__type { font-size: .8125rem; font-weight: 500; color: var(--slate); padding-top: 2px; }
.gam-release__type--new { color: var(--cobalt); }

/* Topic groups (documentation) */
.gam-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 48px; }
.gam-topics__group { padding-top: 22px; border-top: 1px solid var(--ink); }
.gam-topics__title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.gam-topics__list { margin-top: 14px; }
.gam-topics__list li { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); font-size: .9375rem; color: var(--slate); }

/* Endpoint groups (API reference) */
.gam-endpoints { border-top: 1px solid var(--ink); }
.gam-endpoints__row {
	display: grid;
	grid-template-columns: 4.25rem minmax(0, 18rem) 1fr;
	gap: 6px 18px;
	align-items: baseline;
	padding: 12px 0;
	border-bottom: 1px solid var(--rule-soft);
	font-size: .9375rem;
}
.gam-endpoints__row code { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink); overflow-wrap: anywhere; }
.gam-endpoints__row .c-endpoint__method { min-width: 0; }
.gam-endpoints__desc { color: var(--slate); }

/* Reseller tiers */
.gam-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.gam-tier { padding: 28px 32px 32px 0; }
.gam-tier + .gam-tier { padding-left: 32px; border-left: 1px solid var(--rule); }
.gam-tier__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }
.gam-tier__range { margin-top: 4px; font-size: .875rem; color: var(--slate); }
.gam-tier__value { margin-top: 22px; font-family: var(--font-display); font-size: 2.75rem; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.gam-tier__value span { margin-left: 8px; font-family: var(--font-text); font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--slate); }
.gam-tier .at-points { margin-top: 24px; }

/* 5 Page sections --------------------------------------------------------- */
.gam-plate > .at-shell { padding-top: 0; }
.gam-plate__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 40px; align-items: start; }
.gam-plate__art { grid-column: 1 / span 7; }
.gam-plate__aside { grid-column: 9 / span 4; }
.gam-plate__aside .at-h3 + p { margin-top: 10px; color: var(--slate); }

.gam-split__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px calc(var(--gutter) * 2.5); align-items: start; }
.gam-split__text { margin-top: 10px; color: var(--slate); max-width: 52ch; }
.gam-split__col .at-points { margin-top: 24px; }
.gam-split__col ol.at-sequence { margin-top: 24px; }

.gam-directory { border-top: 1px solid var(--ink); }
.gam-directory__row {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	row-gap: 10px;
	align-items: baseline;
	padding: 26px 0 28px;
	border-bottom: 1px solid var(--rule);
}
.gam-directory__title { grid-column: 1 / span 3; font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.gam-directory__names { grid-column: 4 / span 4; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.gam-directory__names li { font-weight: 500; line-height: 1.6; }
.gam-directory__desc { grid-column: 9 / span 4; font-size: .9375rem; line-height: 1.55; color: var(--slate); }

.at-faq__answer a { color: var(--cobalt); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(40, 74, 241, .35); }

/* 6 Pricing --------------------------------------------------------------- */
.gam-plans .at-plan__amount { font-variant-numeric: tabular-nums; }
.gam-plans .at-plan__desc { min-height: 3.1em; }
.gam-program {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter);
	row-gap: 24px;
	align-items: end;
	padding-top: 28px;
	border-top: 1px solid var(--ink);
}
.gam-program__text { grid-column: 1 / span 8; }
.gam-program__text p { margin-top: 10px; color: var(--slate); max-width: 60ch; }
.gam-program__action { grid-column: 10 / span 3; justify-self: end; }

/* 7 Contact form and third-party widgets --------------------------------- */
/* The live CF7 form (#44) wraps every label and control in an autop <p>, and
   the OTP mu-plugin ships its own button colours with !important. */
.gam .at-formcard .wpcf7-form p { margin: 0; }
.gam .at-formcard .wpcf7-form br { display: none; }
.gam .at-formcard .wpcf7-form label:has(.wpcf7-form-control-wrap) { display: flex; flex-direction: column; gap: 8px; }
.gam .at-formcard .cf7-col > p,
.gam .at-formcard .cf7-field > p { display: flex; flex-direction: column; gap: 8px; }
.gam .at-formcard .cf7-row,
.gam .at-formcard .cf7-field { margin: 0; }
.gam .at-formcard .cf7-col,
.gam .at-formcard .cf7-field { gap: 8px; }
.gam .at-formcard label abbr { margin-left: 2px; color: var(--mute); text-decoration: none; border: 0; }
.gam .at-formcard .cf7-otp-group { display: block; }
.gam .at-formcard .cf7-otp-group > p { display: flex; gap: 8px; align-items: stretch; }
.gam .at-formcard .cf7-otp-group .wpcf7-form-control-wrap { flex: 1 1 auto; min-width: 0; }
.gam .at-formcard .btn-cf7-otp,
.gam .at-formcard #btn-cf7-send-otp {
	flex-shrink: 0;
	height: auto;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid var(--rule-strong) !important;
	border-radius: var(--r-btn);
	background: var(--paper) !important;
	color: var(--ink) !important;
	box-shadow: none !important;
	font-size: .875rem;
	font-weight: 500;
	transform: none !important;
	white-space: nowrap;
	cursor: pointer;
}
.gam .at-formcard .btn-cf7-otp:hover:not(:disabled) { border-color: var(--ink) !important; }
.gam .at-formcard .btn-cf7-otp:disabled { color: var(--mute) !important; cursor: not-allowed; }
.gam .at-formcard .cf7-otp-msg { min-height: 0; margin-top: 0; font-size: .8125rem; }
.gam .at-formcard .cf7-otp-msg.success { color: var(--sage-ink); }
.gam .at-formcard .cf7-otp-msg.error { color: var(--error); }
.gam .at-formcard .cf7-otp-msg.info { color: var(--slate); }
.gam .at-formcard .cf7-sms-consent { padding: 16px 18px; background: var(--mist); border-radius: var(--r-field); }
.gam .at-formcard .cf7-sms-consent label { display: grid; grid-template-columns: 18px 1fr; gap: 12px; font-size: .8125rem; font-weight: 400; line-height: 1.55; color: var(--slate); }
.gam .at-formcard .cf7-sms-consent input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cobalt); }
.gam .at-formcard .cf7-sms-consent strong { color: var(--ink); font-weight: 500; }
.gam .at-formcard .cf7-sms-consent a { color: var(--cobalt) !important; font-weight: 400 !important; text-decoration-color: rgba(40, 74, 241, .35) !important; text-underline-offset: .2em; }
.gam .at-formcard .cf7-turnstile-slot { margin: 0 !important; min-height: 0; }
.gam .at-formcard .wpcf7 { width: 100%; }
.gam .at-form__success[hidden] { display: none; }

/* 8 Responsive ------------------------------------------------------------ */
@media (max-width: 1240px) {
	.gam-footer__grid .at-footer__brand { grid-column: 1 / -1; }
	.gam-footer__cols { grid-column: 1 / -1; }
}
@media (max-width: 1079px) {
	.gam-plate__art, .gam-plate__aside,
	.gam-program__text, .gam-program__action { grid-column: 1 / -1; justify-self: start; }
	.gam-release__head, .gam-release__items { grid-column: 1 / -1; }
	.gam-topics { grid-template-columns: 1fr 1fr; }
	.gam-directory__title { grid-column: 1 / -1; }
	.gam-directory__names { grid-column: 1 / span 6; }
	.gam-directory__desc { grid-column: 7 / span 6; }
	.gam-tiers { grid-template-columns: 1fr; border-top: 0; }
	.gam-tier, .gam-tier + .gam-tier { padding: 28px 0 32px; border-left: 0; border-top: 1px solid var(--ink); }
	.gam-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.gam-split__grid { grid-template-columns: 1fr; }
	.gam-topics { grid-template-columns: 1fr; }
	.gam-directory__names, .gam-directory__desc { grid-column: 1 / -1; }
	.gam-release__items li { grid-template-columns: 1fr; gap: 2px; }
	.gam-endpoints__row { grid-template-columns: 4.25rem 1fr; }
	.gam-endpoints__desc { grid-column: 1 / -1; }
	.gam-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.gam-lockup .gam-lockup__logo { height: 26px; }
	.gam-lockup__product { font-size: 1.125rem; padding-left: 11px; }
	.gam-lockup { gap: 10px; }
	.gam-domain__table th:first-child, .gam-domain__table td:first-child,
	.gam-table th:first-child, .gam-table td:first-child { padding-left: 18px; }
	.gam-domain__table th:last-child, .gam-domain__table td:last-child,
	.gam-table th:last-child, .gam-table td:last-child { padding-right: 18px; }
	.gam-inbox__tabs, .gam-inbox__row, .gam-inbox__thread, .gam-auth__checks > div, .gam-warmup__chart { padding-inline: 18px; }
	.gam-warmup__foot { grid-template-columns: 1fr 1fr; }
	.gam-auth__checks > div { grid-template-columns: 1fr; gap: 4px; }
}

/* 9 Capability groups (same rules as grapphen.com pages-ai.css) ---------- */
.at-caps--mist { background: var(--mist); }
.at-caps__grid {
	display: grid;
	gap: 0 var(--gutter);
	margin-top: clamp(40px, 5vw, 64px);
	border-top: 1px solid var(--ink);
}
.at-caps__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.at-caps__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.at-caps__group { padding: 28px 0 36px; border-bottom: 1px solid var(--rule); }
.at-caps__title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.at-caps__text { margin-top: 8px; font-size: .9375rem; line-height: 1.55; color: var(--slate); }
.at-caps__list { margin-top: 18px; }
.at-caps__list li { padding: 11px 0; border-top: 1px solid var(--rule-soft); }
.at-caps__list li:first-child { border-top-color: var(--rule); }
.at-caps__name { display: block; font-size: .9375rem; font-weight: 500; color: var(--ink); }
.at-caps__desc { display: block; margin-top: 2px; font-size: .875rem; line-height: 1.5; color: var(--slate); }
.at-caps__link { margin-top: 18px; font-size: .9375rem; }
.at-caps__more { margin-top: 32px; font-size: 1rem; }
@media (max-width: 1079px) { .at-caps__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
	.at-caps__grid--3, .at-caps__grid--2 { grid-template-columns: 1fr; }
	.at-caps__group { padding: 24px 0 28px; }
}

/* 10 Blog, archives, single posts ---------------------------------------- */
.gam-posts__list { border-top: 1px solid var(--ink); }
.gam-posts__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: 26px 0; border-bottom: 1px solid var(--rule); }
.gam-posts__date { grid-column: 1 / span 3; font-size: .875rem; color: var(--slate); padding-top: 4px; }
.gam-posts__body { grid-column: 4 / span 8; }
.gam-posts__title { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.gam-posts__title a { text-decoration: none; }
.gam-posts__title a:hover { color: var(--cobalt); }
.gam-posts__excerpt { margin-top: 8px; color: var(--slate); max-width: 64ch; }
.gam-posts__empty { padding-top: 28px; border-top: 1px solid var(--ink); }
.gam-posts__empty .at-lede { max-width: 52ch; }
.gam-pagination .nav-links { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 32px; }
.gam-pagination a, .gam-pagination span { font-size: .9375rem; color: var(--slate); }
.gam-pagination .current { color: var(--ink); font-weight: 500; }
.gam-post__meta { margin-bottom: 18px; }
.gam-post__image { margin-bottom: 40px; max-width: 68ch; }
.gam-post__image img { border-radius: var(--r-field); }
.gam-post__nav { display: flex; justify-content: space-between; gap: 24px; max-width: 68ch; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); }
.gam-post__nav a { display: flex; flex-direction: column; gap: 2px; font-weight: 500; text-decoration: none; }
.gam-post__nav a span { font-size: .8125rem; font-weight: 400; color: var(--slate); }
.gam-post__nav a:hover { color: var(--cobalt); }
@media (max-width: 760px) {
	.gam-posts__date, .gam-posts__body { grid-column: 1 / -1; }
}

/* 11 Fixes after review ---------------------------------------------------- */
@media (max-width: 760px) {
	.at-table--compare { min-width: 34rem; }
}
/* Screen-reader labels are absolutely positioned; keep them inside the scroll box. */
.at-table-wrap, .gam-scroll, .c-legal__table { position: relative; }
