/*
 * TekkCenter site styles (T-021 branding, T-022 global layout, T-007 article template).
 *
 * Colours are the supplied brand values, verified from logo pixels and the existing
 * Elementor kit (post-7.css) on 2026-11-13: lime #8BC34A (= kit primary) and grey #333333.
 * Lime is 2.10:1 on white, so it is decorative only on light backgrounds. Text, link,
 * button and focus colours below were contrast-checked (WCAG 2.2 AA); see assets/brand/README.md.
 *
 * Fonts reuse the families the Elementor kit already loads site-wide (Roboto headings,
 * Atkinson Hyperlegible body), with system fallbacks if T-015 later removes them.
 *
 * Every selector is scoped under .tc-site (body class from header.php) so it wins over
 * the kit's ".elementor-kit-7 h1/p/a" rules without !important.
 */

:root {
    --tc-lime: #8bc34a;          /* brand lime: decoration on light, text/focus on dark */
    --tc-lime-tint: #eef5e6;     /* surface */
    --tc-green: #3e6b14;         /* links, buttons, focus: 6.33 white / 5.93 paper / 5.68 tint */
    --tc-green-hover: #2f5a0e;   /* 8.11 on white */
    --tc-grey: #333333;          /* brand grey: body text, 12.63 on white */
    --tc-ink: #171717;           /* headings (kit text colour), 17.93 on white */
    --tc-muted: #596356;         /* secondary text: 6.28 white / 5.89 paper / 5.63 tint */
    --tc-paper: #f7f8f4;         /* page band */
    --tc-white: #ffffff;
    --tc-line: #d9ded3;          /* decorative borders */
    --tc-line-strong: #8a9584;   /* UI boundaries: 3.13:1 on white */
    --tc-night: #20251f;         /* footer band: white 15.6, lime 7.43 */
    --tc-night-text: #d8e6e6;    /* kit accent: 12.17 on night */

    --tc-font-body: "Atkinson Hyperlegible", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --tc-font-head: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --tc-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --tc-wrap: 1120px;
    --tc-measure: 44rem;         /* ~70 characters of 18px body text */
    --tc-gutter: 24px;
    --tc-radius: 10px;
}

/* ---------- Base ---------- */

.tc-site {
    margin: 0;
    background: var(--tc-white);
    color: var(--tc-grey);
    font: 400 1.125rem/1.7 var(--tc-font-body);
    -webkit-text-size-adjust: 100%;
}
.tc-site *, .tc-site *::before, .tc-site *::after { box-sizing: border-box; }
.tc-site img { max-width: 100%; height: auto; }

.tc-site a { color: var(--tc-green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.tc-site a:hover { color: var(--tc-green-hover); text-decoration-thickness: 2px; }
.tc-site a:focus-visible,
.tc-site button:focus-visible,
.tc-site summary:focus-visible { outline: 3px solid var(--tc-green); outline-offset: 3px; border-radius: 2px; }

.tc-site h1, .tc-site h2, .tc-site h3, .tc-site h4 {
    font-family: var(--tc-font-head);
    color: var(--tc-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 .5em;
}
.tc-site p { margin: 0 0 1.1em; }

.tc-site .screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.tc-site .tc-wrap { width: min(var(--tc-wrap), calc(100% - 2 * var(--tc-gutter))); margin-inline: auto; }

.tc-site .tc-skip-link {
    position: absolute; left: 16px; top: -200px; z-index: 100000;
    padding: 12px 18px; background: var(--tc-white); color: var(--tc-green);
    font-weight: 700; border: 2px solid var(--tc-green); border-radius: 6px;
}
.tc-site .tc-skip-link:focus { top: 16px; }

/* ---------- Header ---------- */

.tc-site .tc-header { background: var(--tc-white); border-top: 4px solid var(--tc-lime); border-bottom: 1px solid var(--tc-line); }
.tc-site .tc-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; padding-block: 18px; }
.tc-site .tc-logo { display: inline-flex; line-height: 0; padding: 4px 0; text-decoration: none; }
.tc-site .tc-logo img { display: block; width: 246px; height: auto; aspect-ratio: 1230 / 250; }

.tc-site .tc-nav ul,
.tc-site .tc-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.tc-site .tc-nav a {
    display: inline-flex; align-items: center; min-height: 44px;
    color: var(--tc-ink); font: 600 1rem/1.2 var(--tc-font-head); text-decoration: none;
    border-bottom: 3px solid transparent;
}
.tc-site .tc-nav a:hover { color: var(--tc-green); border-bottom-color: var(--tc-lime); }
.tc-site .tc-nav a[aria-current="page"],
.tc-site .tc-nav .current-menu-item > a { border-bottom-color: var(--tc-green); }
/* Menu disclosure (phones only, see the 600px query). Hidden everywhere else. */
.tc-site .tc-nav__toggle { display: none; }

/* ---------- Shared pieces ---------- */

.tc-site .tc-main { display: block; }
.tc-site .tc-kicker { margin: 0 0 .6em; font: 700 .8125rem/1.3 var(--tc-font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--tc-green); }
.tc-site .tc-kicker a { display: inline-flex; align-items: center; min-height: 24px; color: inherit; text-decoration: none; }
.tc-site .tc-kicker a:hover { text-decoration: underline; }
.tc-site .tc-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font-size: .9375rem; color: var(--tc-muted); }
/* Byline link (shown once an About page is published): keep a 24 px target (lab audit 2026-11-14 measured 78x18). */
.tc-site .tc-meta a { display: inline-flex; align-items: center; min-height: 24px; }
.tc-site .tc-lead { font-size: 1.3125rem; line-height: 1.6; color: var(--tc-grey); max-width: 42rem; }
.tc-site .tc-section-title { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; margin-bottom: 24px; }
.tc-site .tc-section-title::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 12px; background: var(--tc-lime); border-radius: 2px; }

/* ---------- Homepage state A: existing page-247 intro content ---------- */

.tc-site .tc-home-intro .tc-hero { padding: 80px 0 64px; max-width: 860px; }
.tc-site .tc-home-intro .tc-eyebrow { margin: 0; font: 700 .8125rem/1.3 var(--tc-font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--tc-green); }
.tc-site .tc-home-intro h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.06; letter-spacing: -0.045em; margin: 18px 0 24px; max-width: 820px; }
.tc-site .tc-home-intro h1::after { content: ""; display: block; width: 72px; height: 6px; margin-top: 22px; background: var(--tc-lime); border-radius: 3px; }
.tc-site .tc-home-intro .tc-lead { font-size: 1.3125rem; color: var(--tc-grey); }
.tc-site .tc-button,
.tc-site .tc-home-intro .tc-button {
    display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; margin-top: 12px;
    border-radius: 6px; background: var(--tc-green); color: var(--tc-white);
    font: 600 1rem/1.2 var(--tc-font-head); text-decoration: none;
}
.tc-site .tc-button:hover,
.tc-site .tc-home-intro .tc-button:hover { background: var(--tc-green-hover); color: var(--tc-white); }
.tc-site .tc-home-intro section { scroll-margin-top: 24px; }
.tc-site .tc-home-intro h2 { font-size: clamp(1.625rem, 3.2vw, 2.125rem); line-height: 1.2; margin-bottom: 14px; }
.tc-site .tc-home-intro .tc-section-intro { max-width: 40rem; color: var(--tc-muted); margin-bottom: 32px; }
.tc-site .tc-home-intro .tc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tc-site .tc-home-intro .tc-card { background: var(--tc-paper); border: 1px solid var(--tc-line); border-top: 4px solid var(--tc-lime); border-radius: var(--tc-radius); padding: 28px; }
.tc-site .tc-home-intro .tc-card h3 { font-size: 1.375rem; line-height: 1.3; margin-bottom: 10px; }
.tc-site .tc-home-intro .tc-card p { margin: 0; font-size: 1.0625rem; color: var(--tc-grey); }
.tc-site .tc-home-intro .tc-next { margin: 64px 0 80px; padding: 36px 40px; background: var(--tc-lime-tint); border-radius: var(--tc-radius); }
.tc-site .tc-home-intro .tc-next p:last-child { margin-bottom: 0; max-width: 44rem; }

/* ---------- Homepage state B: real published guides ---------- */

.tc-site .tc-home-hero { background: var(--tc-paper); border-bottom: 1px solid var(--tc-line); padding: 56px 0 44px; }
.tc-site .tc-home-hero__title { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.04em; max-width: 820px; }
.tc-site .tc-home-hero .tc-lead { margin-bottom: 0; }
.tc-site .tc-latest, .tc-site .tc-topics, .tc-site .tc-related { padding: 56px 0; }
.tc-site .tc-topics { background: var(--tc-paper); border-top: 1px solid var(--tc-line); }

.tc-site .tc-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tc-site .tc-card-grid--latest .tc-card--lead { grid-column: 1 / -1; }
.tc-site .tc-card { display: flex; flex-direction: column; background: var(--tc-white); border: 1px solid var(--tc-line); border-radius: var(--tc-radius); overflow: hidden; }
.tc-site .tc-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.tc-site .tc-card__title { font-size: 1.25rem; line-height: 1.3; margin-bottom: 10px; }
/* inline-block: a one-line title's link box takes the 26 px line height instead of the 23 px glyph box. */
.tc-site .tc-card__title a { display: inline-block; color: var(--tc-ink); text-decoration: none; }
.tc-site .tc-card__title a:hover { color: var(--tc-green); text-decoration: underline; }
.tc-site .tc-card__excerpt { font-size: 1rem; color: var(--tc-grey); }
.tc-site .tc-card .tc-meta { margin-top: auto; font-size: .875rem; }
.tc-site .tc-card--lead { flex-direction: row; border-top: 4px solid var(--tc-lime); }
.tc-site .tc-card--lead .tc-card__media { flex: 0 0 44%; }
.tc-site .tc-card--lead .tc-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-site .tc-card--lead .tc-card__body { padding: 32px; }
.tc-site .tc-card--lead .tc-card__title { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.tc-site .tc-card--lead .tc-card__excerpt { font-size: 1.125rem; }

.tc-site .tc-topic-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.tc-site .tc-topic { padding: 20px 24px; background: var(--tc-white); border: 1px solid var(--tc-line); border-left: 4px solid var(--tc-lime); border-radius: 6px; }
.tc-site .tc-topic__link { display: inline-flex; align-items: center; min-height: 24px; font: 700 1.125rem/1.3 var(--tc-font-head); color: var(--tc-ink); }
.tc-site .tc-topic p { margin: 6px 0 0; font-size: 1rem; color: var(--tc-muted); }

/* ---------- Single article ---------- */

.tc-site .tc-article__wrap { max-width: var(--tc-measure); padding: 32px 0 56px; }
.tc-site .tc-breadcrumbs ol { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .9375rem; color: var(--tc-muted); }
.tc-site .tc-breadcrumbs li { display: inline-flex; align-items: baseline; min-width: 0; }
.tc-site .tc-breadcrumbs li + li::before { content: "›"; margin: 0 10px; color: var(--tc-line-strong); }
.tc-site .tc-breadcrumbs a { display: inline-flex; align-items: center; min-height: 24px; color: var(--tc-muted); }
.tc-site .tc-breadcrumbs [aria-current] { overflow-wrap: anywhere; }

.tc-site .tc-article__header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--tc-line); }
.tc-site .tc-article__title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -0.035em; margin-bottom: 18px; overflow-wrap: break-word; }

.tc-site .tc-answer { margin: 0 0 32px; padding: 22px 26px; background: var(--tc-lime-tint); border-left: 5px solid var(--tc-lime); border-radius: 0 var(--tc-radius) var(--tc-radius) 0; }
.tc-site .tc-answer__title,
.tc-site .tc-toc__title,
.tc-site .tc-editorial__title { font-size: .8125rem; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--tc-green); margin: 0 0 8px; }
.tc-site .tc-answer p { margin: 0; font-size: 1.1875rem; color: var(--tc-ink); }

.tc-site .tc-toc { margin: 0 0 40px; padding: 20px 24px; border: 1px solid var(--tc-line); border-radius: var(--tc-radius); background: var(--tc-paper); }
.tc-site .tc-toc ol { margin: 0; padding-left: 1.4em; }
.tc-site .tc-toc li { margin: 4px 0; }
.tc-site .tc-toc a { display: inline-block; padding: 2px 0; color: var(--tc-ink); }
.tc-site .tc-toc a:hover { color: var(--tc-green); }

/* Rendered post content (block editor output). */
.tc-site .tc-prose { overflow-wrap: break-word; }
.tc-site .tc-prose > * { margin-top: 0; margin-bottom: 1.15em; }
.tc-site .tc-prose h2 { font-size: clamp(1.5rem, 3.2vw, 1.875rem); line-height: 1.25; margin: 2em 0 .6em; scroll-margin-top: 24px; }
.tc-site .tc-prose h3 { font-size: 1.3125rem; line-height: 1.3; margin: 1.6em 0 .5em; }
.tc-site .tc-prose h4 { font-size: 1.125rem; margin: 1.4em 0 .4em; }
.tc-site .tc-prose ul, .tc-site .tc-prose ol { padding-left: 1.4em; }
.tc-site .tc-prose li { margin: .35em 0; }
.tc-site .tc-prose li::marker { color: var(--tc-green); }
.tc-site .tc-prose blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--tc-line-strong); color: var(--tc-ink); }
.tc-site .tc-prose code { font-family: var(--tc-font-mono); font-size: .875em; padding: .1em .35em; background: #f1f3ee; border: 1px solid var(--tc-line); border-radius: 4px; }
.tc-site .tc-prose pre {
    font-family: var(--tc-font-mono); font-size: .9375rem; line-height: 1.6;
    overflow-x: auto; padding: 18px 20px; background: var(--tc-night); color: #f3f3f3; border-radius: 8px;
}
.tc-site .tc-prose pre code { padding: 0; background: none; border: 0; color: inherit; font-size: inherit; }
.tc-site .tc-prose pre:focus-visible { outline: 3px solid var(--tc-green); outline-offset: 3px; }
.tc-site .tc-prose figure { margin-inline: 0; }
.tc-site .tc-prose figcaption { font-size: .9375rem; color: var(--tc-muted); margin-top: 8px; }
.tc-site .tc-prose .wp-block-table { overflow-x: auto; }
.tc-site .tc-prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tc-site .tc-prose th, .tc-site .tc-prose td { padding: 10px 12px; border: 1px solid var(--tc-line); text-align: left; vertical-align: top; }
.tc-site .tc-prose th { background: var(--tc-paper); color: var(--tc-ink); }
.tc-site .tc-prose hr { border: 0; border-top: 1px solid var(--tc-line); margin: 2.5em 0; }

/* Optional writer-applied classes (block "Additional CSS class"): testing context and sources. */
.tc-site .tc-prose .tc-testing { padding: 22px 26px; background: var(--tc-paper); border: 1px solid var(--tc-line); border-radius: var(--tc-radius); }
.tc-site .tc-prose .tc-testing > :last-child, .tc-site .tc-prose .tc-sources > :last-child { margin-bottom: 0; }
.tc-site .tc-prose .tc-sources { font-size: 1rem; padding-top: 8px; border-top: 1px solid var(--tc-line); }

.tc-site .tc-editorial { margin-top: 48px; padding: 24px 26px; border: 1px solid var(--tc-line); border-radius: var(--tc-radius); background: var(--tc-paper); }
.tc-site .tc-editorial p { margin: 0; font-size: 1rem; }
.tc-site .tc-related { background: var(--tc-paper); border-top: 1px solid var(--tc-line); }

/* ---------- Footer ---------- */

.tc-site .tc-footer { background: var(--tc-night); color: var(--tc-night-text); padding: 48px 0 36px; font-size: 1rem; }
.tc-site .tc-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.tc-site .tc-footer__focus { margin: 14px 0 0; max-width: 30rem; }
.tc-site .tc-footer a { color: var(--tc-white); }
.tc-site .tc-footer a:hover { color: var(--tc-lime); }
.tc-site .tc-footer a:focus-visible { outline-color: var(--tc-lime); }
.tc-site .tc-footer__list a { display: inline-flex; align-items: center; min-height: 44px; }
.tc-site .tc-footer__legal { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid #3a4237; font-size: .9375rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .tc-site .tc-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tc-site .tc-card--lead { flex-direction: column; }
    .tc-site .tc-card--lead .tc-card__media { flex-basis: auto; }
}

@media (max-width: 600px) {
    :root { --tc-gutter: 16px; }
    .tc-site { font-size: 1.0625rem; }
    .tc-site .tc-header__inner { padding-block: 12px; gap: 0 20px; }
    .tc-site .tc-logo img { width: 172px; }
    .tc-site .tc-nav ul { gap: 0 18px; }
    /* Populated menu (3+ links) with JavaScript: logo + Menu button on one row; the list
       opens as a panel over the content so nothing below shifts. Without JS (no html.tc-js)
       the full list stays inline as above. Lab measurement 2026-11-14: 5 links wrapped to
       3 rows and a 204px header at 360px; see docs/PERFORMANCE_REVIEW.md. */
    .tc-js .tc-site .tc-header { position: relative; }
    .tc-js .tc-site .tc-nav--collapsible .tc-nav__toggle {
        display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
        background: var(--tc-white); color: var(--tc-ink); font: 600 1rem/1 var(--tc-font-head);
        border: 2px solid var(--tc-line-strong); border-radius: 6px; cursor: pointer;
    }
    .tc-js .tc-site .tc-nav--collapsible .tc-nav__toggle::after {
        content: ""; width: 7px; height: 7px; margin-top: -4px;
        border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
    }
    .tc-js .tc-site .tc-nav--collapsible .tc-nav__toggle[aria-expanded="true"]::after { margin-top: 4px; transform: rotate(-135deg); }
    .tc-js .tc-site .tc-nav--collapsible .tc-nav__list { display: none; }
    .tc-js .tc-site .tc-nav--open .tc-nav__list {
        display: flex; flex-direction: column; gap: 0;
        position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
        padding: 4px var(--tc-gutter) 12px; background: var(--tc-white);
        border-bottom: 1px solid var(--tc-line); box-shadow: 0 10px 18px rgba(32, 37, 31, .12);
    }
    .tc-js .tc-site .tc-nav--open .tc-nav__list li + li { border-top: 1px solid var(--tc-line); }
    .tc-js .tc-site .tc-nav--open .tc-nav__list a { display: flex; width: 100%; min-height: 48px; border-bottom-width: 0; }
    .tc-js .tc-site .tc-nav--open .tc-nav__list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--tc-green); padding-left: 12px; }
    .tc-site .tc-home-intro .tc-hero { padding: 48px 0 40px; }
    .tc-site .tc-home-intro .tc-lead, .tc-site .tc-lead { font-size: 1.1875rem; }
    .tc-site .tc-home-intro .tc-grid,
    .tc-site .tc-card-grid,
    .tc-site .tc-topic-list { grid-template-columns: minmax(0, 1fr); }
    .tc-site .tc-home-intro .tc-card { padding: 22px; }
    .tc-site .tc-home-intro .tc-next { margin: 40px 0 56px; padding: 26px 22px; }
    .tc-site .tc-home-hero { padding: 40px 0 32px; }
    .tc-site .tc-latest, .tc-site .tc-topics, .tc-site .tc-related { padding: 40px 0; }
    .tc-site .tc-card--lead .tc-card__body { padding: 24px; }
    .tc-site .tc-article__wrap { padding-top: 20px; }
    .tc-site .tc-breadcrumbs ol { margin-bottom: 24px; }
    .tc-site .tc-answer { padding: 18px 20px; }
    .tc-site .tc-footer__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .tc-site *, .tc-site *::before, .tc-site *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
