/* Site look for all public pages. The accent colour comes from the site's theme (set in the page head). */
:root {
  --accent: #2a5d84;
  --ink: #1f2328;
  --muted: #5b6470;
  --line: #e3e0d9;
  --paper: #fbfaf7;
  --card: #ffffff;
  --tint: color-mix(in srgb, var(--accent) 9%, #ffffff);
  --deep: color-mix(in srgb, var(--accent) 70%, #000000);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.7; }
a { color: var(--accent); }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.kh-skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.kh-skip:focus { left: 8px; }
.kh-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* header */
.kh-top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.kh-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.kh-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 10px 0; }
.kh-mark { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 22px; }
.kh-name { display: block; font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.2; }
.kh-slogan { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.kh-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.kh-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.kh-nav a:hover { background: var(--tint); color: var(--ink); }
.kh-nav a[aria-current="page"] { background: var(--accent); color: #fff; }

/* home hero */
.kh-hero { background: linear-gradient(135deg, var(--deep), var(--accent)); color: #fff; padding: 56px 0 60px; }
.kh-hero h1 { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; margin: 0 0 12px; max-width: 760px; }
.kh-hero p { margin: 0 0 24px; font-size: 19px; opacity: .9; max-width: 680px; }
.kh-hero .kh-btn { background: #fff; color: var(--deep); }

/* layout */
.kh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 36px; padding-bottom: 56px; align-items: start; }
.kh-main { min-width: 0; }
.kh-side { display: flex; flex-direction: column; gap: 24px; }
.kh-sticky { position: sticky; top: 96px; }

/* article */
.kh-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.kh-crumbs a { color: var(--muted); text-decoration: none; }
.kh-crumbs a:hover { color: var(--accent); }
.kh-title { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; margin: 0 0 8px; }
.kh-meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.kh-prose { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px 36px; overflow: hidden; }
.kh-prose::after { content: ''; display: block; clear: both; }
/* older articles carry inline Tahoma 10pt styling: let the site font take over */
.kh-prose span[style], .kh-prose p[style], .kh-prose font { font-family: inherit !important; font-size: inherit !important; }
.kh-prose font { color: inherit; }
.kh-prose p { margin: 0 0 1.1em; }
.kh-prose strong { color: var(--ink); }
.kh-prose h2, .kh-prose h3 { font-family: var(--serif); line-height: 1.25; margin: 1.4em 0 .5em; }
.kh-prose ul, .kh-prose ol { padding-left: 1.3em; }
.kh-prose li { margin: .25em 0; }
.kh-lead-img, .kh-lead-ad { float: right; margin: 4px 0 18px 26px; width: 300px; }
.kh-lead-img img { display: block; width: 300px; height: 250px; object-fit: cover; border-radius: 10px; }
.kh-welcome { margin-top: 0; }

/* ads */
.kh-ad { margin: 26px auto; text-align: center; }
.kh-ad-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a9099; margin-bottom: 6px; }
.kh-ad-lead { margin: 0; }
.kh-ad-side { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px 10px; }
.kh-ad-inline { clear: both; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* sidebar boxes */
.kh-box { background: var(--card); border: 2px solid var(--accent); border-radius: 14px; padding: 0 22px 18px; overflow: hidden; }
.kh-box-title { font-family: var(--serif); font-size: 19px; margin: 0 -22px 8px; padding: 12px 22px; background: var(--accent); color: #fff; }
.kh-toc { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.45; }
.kh-toc li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kh-toc li:last-child { border-bottom: 0; padding-bottom: 0; }
.kh-toc a { color: var(--ink); text-decoration: none; }
.kh-toc a:hover, .kh-toc a[aria-current="page"] { color: var(--accent); }
.kh-toc a[aria-current="page"] { font-weight: 600; }

/* home cards */
.kh-section-title { font-family: var(--serif); font-size: 26px; margin: 40px 0 16px; }
.kh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.kh-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.kh-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.07); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink); }
.kh-card img { border-radius: 8px; aspect-ratio: 6 / 5; object-fit: cover; width: 100%; }
.kh-card-title { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.3; }
.kh-card-text { font-size: 14.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.kh-card-more { font-size: 14px; font-weight: 600; color: var(--accent); }

/* buttons, share, next */
.kh-btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font: 600 16px var(--sans);
  text-decoration: none; cursor: pointer; }
.kh-btn:hover { background: var(--deep); color: #fff; }
.kh-share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.kh-share a { text-decoration: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 14px; color: var(--ink); }
.kh-share a:hover { border-color: var(--accent); color: var(--accent); }
.kh-next { display: block; margin-top: 28px; padding: 18px 22px; background: var(--tint); border-radius: 14px; text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-weight: 700; font-size: 19px; }
.kh-next span { display: block; font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* site map list */
.kh-list { list-style: none; margin: 0; padding: 0; }
.kh-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.kh-list li:last-child { border-bottom: 0; }
.kh-list a { font-family: var(--serif); font-weight: 700; font-size: 19px; text-decoration: none; }
.kh-list span { display: block; color: var(--muted); font-size: 15px; }

/* forms */
.kh-form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 30px; margin-top: 22px; max-width: 560px; }
.kh-form label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
.kh-form label:first-child { margin-top: 0; }
.kh-form input, .kh-form textarea, .kh-optin input[type=text], .kh-optin input[type=email] {
  width: 100%; padding: 11px 13px; border: 1px solid #cfd3d8; border-radius: 8px; font: 16px var(--sans); background: #fff; }
.kh-form .kh-btn { margin-top: 18px; }
.kh-msg { background: #e7f5ea; color: #1d5b2c; border-radius: 10px; padding: 4px 16px; margin-top: 16px; }

/* newsletter (optin.php keeps its own table markup) */
.kh-optin { margin-top: 30px; background: var(--tint); border-radius: 14px; padding: 22px; }
.kh-optin br:first-child, .kh-optin > br { display: none; }
.kh-optin table { width: 100% !important; max-width: 460px; margin: 0 auto; }
.kh-optin td { text-align: left !important; padding: 4px; font-size: 15px; }
.kh-optin strong { font-family: var(--serif); font-size: 19px; display: block; text-align: center; line-height: 1.35; }
.kh-optin input[type=submit] { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 11px 26px; font: 600 15px var(--sans); cursor: pointer; }

/* footer */
.kh-foot { background: #1d2126; color: #c9ced4; padding: 36px 0; font-size: 14px; }
.kh-foot-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.kh-foot-name { font-family: var(--serif); font-weight: 700; font-size: 19px; color: #fff; margin-bottom: 6px; }
.kh-foot-small { margin: 4px 0; max-width: 560px; line-height: 1.55; }
.kh-foot a { color: #e6e9ec; }
.kh-foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; }
.kh-foot-nav a { text-decoration: none; }
.kh-foot-nav a:hover { text-decoration: underline; color: #fff; }

/* phones and small tablets */
@media (max-width: 900px) {
  .kh-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .kh-sticky { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .kh-wrap { padding: 0 16px; }
  .kh-top { position: static; }
  .kh-top-in { min-height: 0; padding-bottom: 8px; }
  .kh-nav a { padding: 6px 12px; font-size: 14px; }
  .kh-hero { padding: 36px 0 40px; }
  .kh-prose { padding: 22px 18px; }
  .kh-lead-img, .kh-lead-ad { float: none; margin: 0 auto 18px; }
  .kh-lead-img img { width: 100%; height: auto; aspect-ratio: 6 / 5; }
  .kh-form { padding: 20px; }
}
