/* Shared by every page: fonts, colours, header and footer. Selectors are scoped so page stylesheets cannot change them. */
@font-face { font-family: "Inter Variable"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
    --brand: #0a5c33;
    --brand-hover: #063f23;
    --brand-soft: #e3f3e8;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --line: #d2d2d7;
    --surface-2: #f5f5f7;
    --radius: 980px;
    --radius-lg: 20px;
}

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 60; padding: 8px 14px; border-radius: 8px; background: #fff; color: var(--ink); }
.skip-link:focus { left: 8px; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(0, 0, 0, .05); background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); font-family: "Inter Variable", "Helvetica Neue", Arial, sans-serif; font-feature-settings: "cv11", "ss01", "tnum" 0; }
.site-header a { color: inherit; text-decoration: none; }
.site-header .header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 72px; }
.site-header .logo { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--ink); }
.site-header .logo-mark { width: 29px; height: 26px; flex-shrink: 0; }
.site-header .logo-text { font-size: 15px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.site-header .logo-accent { color: #2eaa62; font-weight: 600; }
.site-header .main-nav { display: none; align-items: center; gap: 36px; white-space: nowrap; font-size: 14px; font-weight: 500; color: rgba(29, 29, 31, .8); }
.site-header .main-nav a:hover, .site-header .header-link:hover { color: var(--ink); }
.site-header .header-actions { display: flex; align-items: center; gap: 12px; }
.site-header .header-link { display: none; font-size: 14px; font-weight: 500; color: rgba(29, 29, 31, .8); white-space: nowrap; }
.site-header .header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding-inline: 16px; border-radius: var(--radius); background: var(--brand); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.5; transition: background-color .15s; }
.site-header .header-cta:hover { background: var(--brand-hover); color: #fff; }
.site-header .header-user { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.site-header .header-user span:not(.test-tag) { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.site-header .header-user button, .site-header .mobile-user button { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 500; cursor: pointer; }
.site-header .header-user button:hover, .site-header .mobile-user button:hover { text-decoration: underline; }
.site-header .test-tag { padding: 1px 6px; border-radius: 6px; background: #fff5d6; color: #7a5a00; font-size: 11px; font-weight: 600; }
.site-header .menu-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.site-header .menu-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 -8px 0 0; padding: 0; color: var(--ink); cursor: pointer; }
.site-header .menu-button .icon-close { display: none; }
.site-header .menu-toggle:checked ~ .header-row .icon-open { display: none; }
.site-header .menu-toggle:checked ~ .header-row .icon-close { display: block; }
.site-header .menu-toggle:focus-visible ~ .header-row .menu-button { outline: 3px solid rgba(10, 92, 51, .35); border-radius: 8px; }
.site-header .mobile-nav { display: none; padding: 0 20px 16px; background: #fff; color: var(--ink); }
.site-header .menu-toggle:checked ~ .mobile-nav { display: block; }
.site-header .mobile-nav a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .05); font-size: 17px; font-weight: 500; }
.site-header .mobile-nav a:last-child { border-bottom: 0; }
.site-header .mobile-user { display: flex; align-items: center; gap: 8px; padding-top: 12px; font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--surface-2); color: var(--muted); font-family: "Inter Variable", "Helvetica Neue", Arial, sans-serif; font-size: 12px; line-height: 1.5; font-feature-settings: "cv11", "ss01", "tnum" 0; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer p { margin: 0; }
.site-footer .footer-note { padding-block: 20px; line-height: 1.625; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.site-footer .footer-columns { display: grid; gap: 32px; padding-block: 32px; }
.site-footer .footer-columns div { display: flex; flex-direction: column; gap: 8px; }
.site-footer .footer-columns strong { margin-bottom: 4px; color: var(--ink); }
.site-footer .footer-columns a:hover { text-decoration: underline; }
.site-footer .footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px; border-top: 1px solid rgba(0, 0, 0, .1); }

/* Very small phones: the page's own button stays, the header button gives way. */
@media (max-width: 369px) {
    .site-header .header-cta { display: none; }
}

/* 640 px */
@media (min-width: 40rem) {
    .site-header .header-row { gap: 24px; height: 88px; }
    .site-header .logo { gap: 9px; }
    .site-header .logo-mark { width: 53px; height: 48px; }
    .site-header .logo-text { font-size: 26px; }
    .site-header .header-actions { gap: 20px; }
    .site-footer .footer-columns { grid-template-columns: repeat(3, 1fr); }
}

/* 768 px */
@media (min-width: 48rem) {
    .wrap { padding-inline: 40px; }
}

/* 1024 px */
@media (min-width: 64rem) {
    .site-header .main-nav { display: flex; }
    .site-header .header-link { display: inline; }
    .site-header .header-user { display: flex; }
    .site-header .menu-button, .site-header .mobile-nav, .site-header .menu-toggle:checked ~ .mobile-nav { display: none; }
    .site-footer .footer-columns { grid-template-columns: repeat(5, 1fr); }
}

/* Signed in: the same menu as for everyone. Account items (my certificates, name, sign-out) are in the menu button, so nothing is cut off. */
@media (min-width: 64rem) {
    .site-header.is-signed-in .header-user, .site-header.is-signed-in .header-link { display: none; }
    .site-header.is-signed-in .menu-button { display: inline-flex; }
    .site-header.is-signed-in .menu-toggle:checked ~ .mobile-nav { display: block; }
}

/* Narrow desktop: keep logo, menu and actions on one line. */
@media (min-width: 64rem) and (max-width: 1199px) {
    .site-header .logo-mark { width: 44px; height: 40px; }
    .site-header .logo-text { font-size: 22px; }
    .site-header .main-nav { gap: 20px; }
}

@media print {
    .site-header, .site-footer { display: none; }
}
