/* OAS Guides: large text, high contrast, simple layout (WCAG 2.1 AA). */
:root {
  --text: #1a1a1a;
  --muted: #3d3d3d;
  --bg: #ffffff;
  --panel: #f3f6fa;
  --brand: #0a3a6b;
  --brand-dark: #062a4f;
  --link: #0b4f9c;
  --link-visited: #5a2a8a;
  --border: #6b7785;
  --focus: #ffbf47;
  --notice-bg: #fff6d6;
  --accent: #c2410c; /* burnt orange: 5.2:1 on white */
  --radius: 6px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 112.5%; } /* 18px base; scales with the reader's browser setting */
body {
  margin: 0;
  font-family: Verdana, "Atkinson Hyperlegible", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.25; color: var(--brand-dark); margin: 0 0 0.5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 8px var(--text); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; padding-top: 1.5rem; padding-bottom: 2rem; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--focus); color: var(--text); padding: 0.75rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

/* Header */
.site-header { background: var(--brand); color: #fff; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { color: #fff; font-weight: bold; font-size: 1.4rem; text-decoration: none; }
.brand:visited { color: #fff; }
.main-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.main-nav a, .main-nav a:visited { color: #fff; display: inline-block; padding: 0.4rem 0; }

/* Hero and search */
.hero { background: var(--panel); border-bottom: 1px solid #d5dde6; padding: 1.5rem 0 1.25rem; }
.hero h1 { font-size: 2.1rem; margin-bottom: 0.25rem; }
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 1rem; }

.search label { display: block; font-weight: bold; font-size: 1.15rem; margin-bottom: 0.4rem; }
.search-row { display: flex; gap: 0.5rem; max-width: 820px; }
.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 1.15rem;
  padding: 0.65rem 0.8rem; border: 3px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text);
}
.search input:focus { border-color: var(--brand); }
.search button {
  font: inherit; font-size: 1.15rem; font-weight: bold; cursor: pointer;
  padding: 0.65rem 1.4rem; border: 3px solid var(--brand); border-radius: var(--radius);
  background: var(--brand); color: #fff; min-height: 48px;
}
.search button:hover { background: var(--brand-dark); }
.examples-label { display: inline; margin: 0 0.5rem 0 0; color: var(--muted); }
.examples { display: inline; list-style: none; padding: 0; margin: 0; }
.examples li { display: inline-block; margin: 0.6rem 0.75rem 0 0; }
.search .examples-label { display: inline-block; margin-top: 0.6rem; }

/* Topic menu */
.menu-heading { margin-top: 1.25rem; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem 2rem; padding-bottom: 2rem; }
.menu-col h2, .menu-col h3 { font-size: 1.15rem; border-bottom: 3px solid var(--brand); padding-bottom: 0.25rem; margin-bottom: 0.4rem; }
.menu-col ul { list-style: none; margin: 0; padding: 0; }
.menu-col li { margin: 0; }
.menu-col a { display: block; padding: 0.3rem 0; }

@media (max-width: 900px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  html { font-size: 106.25%; } /* 17px on phones */
  .menu-grid { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .hero h1 { font-size: 1.7rem; }
}

/* Inner pages */
.crumb { color: var(--muted); }
.notice { background: var(--notice-bg); border-left: 6px solid #b38600; padding: 1rem; }
.updated { color: var(--muted); }
#results { margin: 1.5rem 0; }
#results ol { padding-left: 1.4rem; }
#results li { margin-bottom: 0.8rem; }
#results .topic { display: block; color: var(--muted); font-size: 0.9rem; }

/* Footer */
.site-footer { background: #eef1f4; border-top: 1px solid #d5dde6; padding: 1.5rem 0; font-size: 0.9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Written guides */
.guide .lead { font-size: 1.15rem; color: var(--text); }
.guide h2 { margin-top: 1.75rem; }
.guide h3 { margin-top: 1.25rem; }
.guide li { margin-bottom: 0.4rem; }
.facts { margin: 0 0 1rem; border: 2px solid var(--brand); border-radius: var(--radius); }
.facts div { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0.6rem 1rem; border-top: 1px solid #c9d3de; }
.facts div:first-child { border-top: 0; }
.facts dt { flex: 1 1 18rem; font-weight: bold; }
.facts dd { flex: 1 1 12rem; margin: 0; font-variant-numeric: tabular-nums; }
.tip { background: var(--notice-bg); border-left: 6px solid #b38600; padding: 1rem; }
.contacts { list-style: none; padding: 0; }
.contacts li { margin-bottom: 1rem; }
.sources { font-size: 0.95rem; }

/* Language links in the header */
.lang-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.lang-nav a, .lang-nav a:visited { color: #fff; display: inline-block; padding: 0.4rem 0; }
.lang-nav a[aria-current="page"] { font-weight: bold; text-decoration: none; border-bottom: 3px solid #fff; }

/* Fonts for non-Latin scripts; Verdana has no Chinese or Gurmukhi letters */
:lang(zh-Hans) { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
:lang(zh-Hant) { font-family: "Microsoft JhengHei", "PingFang TC", "PingFang HK", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; }
:lang(pa) { font-family: "Nirmala UI", "Raavi", "Mukta Mahee", "Noto Sans Gurmukhi", sans-serif; line-height: 1.75; }

/* Heading icons: line drawings in the heading's own colour */
.icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 0.45em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

h2 .icon, h3 .icon { color: var(--accent); }

/* "Check if you qualify" links */
.button, .button:visited {
  display: inline-flex; align-items: center; gap: 0; min-height: 48px; padding: 0.6rem 1.2rem;
  background: var(--brand); color: #fff; border: 3px solid var(--brand); border-radius: var(--radius);
  font-weight: bold; text-decoration: none;
}
.button:hover { background: var(--brand-dark); text-decoration: underline; }
.check-cta { margin: 1rem 0 1.5rem; }
div.check-cta { border: 2px solid var(--brand); border-radius: var(--radius); padding: 0.75rem 1rem; }
div.check-cta h2 { margin-top: 0; font-size: 1.2rem; }
div.check-cta ul { margin: 0; padding-left: 1.4rem; }
.hero .check-cta { margin: 1rem 0 0; }
