:root {
  --bg: #ffffff;
  --primary: #102a43;
  --accent: #ff7a18;
  --text: #1f2d3d;
  --muted: #48607a;
  --border: #d5d9e2;
  --card-bg: #ffffff;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
}

header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

nav .brand {
  font-weight: 700;
  color: var(--primary);
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

nav .brand:hover {
  text-decoration: none;
}

nav .brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

nav .links a {
  margin-left: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero {
  padding: 4.5rem 1.5rem 3.5rem;
  background: linear-gradient(140deg, #0a1b30 0%, #12345c 100%);
  color: #ffffff;
  text-align: center;
}

.hero .content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero-text {
  max-width: 620px;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.05rem;
  color: #d8e4f2;
}

.hero a {
  color: #ffb066;
  font-weight: 600;
}

.hero a:hover,
.hero a:focus {
  color: #ffd9b3;
}

.hero-photo {
  flex-shrink: 0;
  text-align: center;
}

.hero-photo img {
  width: 220px;
  max-width: 60vw;
  border-radius: 999px;
  border: 4px solid var(--accent);
  box-shadow: 0 18px 32px rgba(8, 19, 33, 0.35);
}

.hero-photo figcaption {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  color: #f4f8fb;
}

.hero-photo figcaption a {
  color: #f4f8fb;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 248, 251, 0.3);
  transition: border-color 0.2s ease;
}

.hero-photo figcaption a:hover,
.hero-photo figcaption a:focus {
  border-bottom-color: rgba(244, 248, 251, 0.7);
}

section {
  padding: 3rem 1.5rem;
}

section:nth-of-type(even) {
  background: #f2f6fb;
}

section .section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

section h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

p.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.08);
}

.card h3 {
  margin-top: 0;
}

.highlight {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  background: rgba(255, 122, 24, 0.08);
}

.emphasis {
  font-weight: 600;
  color: var(--primary);
}

footer .emphasis {
  color: var(--accent);
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.portfolio-table th,
.portfolio-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.portfolio-table thead {
  background: #102a43;
  color: #ffffff;
  font-weight: 600;
}

.portfolio-table thead th {
  border-bottom: none;
  padding: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
}

.table-scroll table {
  min-width: 100%;
}

.portfolio-table tbody tr:hover {
  background: rgba(16, 42, 67, 0.08);
}

.portfolio-table td.org {
  width: 40%;
}

.portfolio-table td.scope,
.portfolio-table td.category,
.portfolio-table td.ratings {
  width: 80px;
  text-align: center;
  color: var(--primary);
}

.portfolio-table td.scope,
.portfolio-table td.category {
  text-align: center;
}

.portfolio-table td.notes {
  color: var(--muted);
}

.org-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.org-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.org-name {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.org-name:hover,
.org-name:focus {
  color: var(--accent);
}

.org-card .summary {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 0.1rem;
}

.emoji {
  font-size: 1.35rem;
}

.favicon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  object-fit: contain;
  flex-shrink: 0;
  background: white;
}

.favicon-fallback {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.favicon-fallback {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 42, 67, 0.08);
}

td.ratings {
  white-space: nowrap;
}

.ratings-wrapper {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.badge-empty {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(31, 45, 61, 0.12);
  display: inline-block;
}

.category .emoji,
.scope .emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notes .why {
  display: block;
  color: var(--primary);
  font-size: 0.94rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .portfolio-table th,
  .portfolio-table td {
    padding: 0.75rem;
  }
  .org-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .portfolio-table td.scope,
  .portfolio-table td.category,
  .portfolio-table td.ratings {
    width: auto;
  }
  .ratings-wrapper {
    gap: 0.25rem;
  }
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

ol {
  padding-left: 1.2rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(16, 42, 67, 0.08);
  border-left: 4px solid var(--accent);
  font-style: italic;
}

.resource-links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.75rem;
}

.resource-links li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  box-shadow: 0 6px 16px rgba(16, 42, 67, 0.06);
}

.resource-links a {
  font-weight: 600;
  color: var(--primary);
}

.resource-links a span {
  color: var(--accent);
  font-weight: 700;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--card-bg);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
}

footer {
  background: #1a2332;
  color: #b8c5d6;
  padding: 2rem 1.5rem;
}

footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

footer nav a {
  color: #b8c5d6;
  margin-right: 1rem;
  font-size: 0.95rem;
}

footer nav a:hover,
footer nav a:focus {
  color: var(--accent);
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-body {
    text-align: center;
  }
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  nav .links a {
    margin-left: 0;
    margin-right: 1rem;
  }
}

@media (min-width: 900px) {
  .hero-body {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  .hero-text {
    max-width: 520px;
    text-align: left;
  }
  .hero {
    text-align: left;
  }
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
