:root {
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: #20262d;
  background: #f4f6f8;
  --paper: #fff;
  --ink: #20262d;
  --muted: #66717d;
  --line: #d9e0e7;
  --brand: #116b67;
  --brand2: #245b8f;
  --warm: #b85f32;
  --soft: #eef7f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: var(--ink);
}

.portalHeader {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 28px 42px;
}

.portalHeader.compact {
  padding-top: 22px;
  padding-bottom: 18px;
}

.portalHeader.compact p {
  max-width: 980px;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.55;
}

.portalHeader.compact p + p {
  margin-top: 10px;
}

.portalHeader.compact strong {
  color: var(--ink);
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
  font-weight: 800;
}

.portalHeader h1 {
  font-size: 34px;
  margin: 6px 0 8px;
}

.portalHeader p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.portalNav,
.authorNav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portalNav {
  margin-top: 18px;
}

.authorNav {
  margin-top: 12px;
}

.portalNav a,
.authorNav a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--brand);
  background: #fff;
  text-decoration: none;
}

.authorNav a {
  font-weight: 700;
}

.portalNav a:hover,
.authorNav a:hover,
.portalNav a.primary,
.authorNav a.active {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand);
}

.portalNav a.primary {
  background: var(--brand);
  color: #fff;
}

.authorNav a.active {
  background: var(--brand);
  color: #fff;
}

main {
  padding: 24px 42px 46px;
}

.toolGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1180px;
}

.toolCard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.toolCard h2 {
  font-size: 16px !important;
  line-height: 1.2 !important;
  margin: 0 0 12px !important;
}

.toolCard h2 a {
  display: block;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--brand);
  line-height: 1.2;
}

.toolCard h2 a:hover {
  border-color: #0d5a57;
  background: #0d5a57;
  color: #fff;
}

.toolCard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.toolCard p + p {
  margin-top: 2px;
}

.toolCard .toolMeta,
.toolCard .actions {
  display: none;
}

.toolMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  background: var(--soft);
  color: #0e5754;
  padding: 5px 9px;
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.actions a {
  display: inline-block;
  border-radius: 7px;
  padding: 10px 13px;
  text-decoration: none;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
}

.actions a.secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--line);
}

.note {
  max-width: 1180px;
  margin-top: 18px;
  background: #fff7f3;
  border-left: 4px solid var(--warm);
  border-radius: 7px;
  padding: 14px 16px;
  color: #66341f;
  line-height: 1.45;
}

.aboutSection {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
  gap: 16px;
  max-width: 1180px;
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.aboutSection h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.aboutSection p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.aboutSection a {
  color: var(--brand);
  font-weight: 700;
}

.aboutSection aside {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.aboutSection aside strong {
  display: block;
  margin-bottom: 8px;
}

.authorLinkSection,
.authorButtonSection {
  max-width: 1180px;
  margin-top: 18px;
}

.authorLinkSection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}

.authorLinkSection h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.authorLinkSection p {
  margin: 0;
  color: var(--muted);
}

.authorLinkSection a,
.authorButtonSection a {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 13px;
  text-decoration: none;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.authorButtonSection {
  display: flex;
  justify-content: flex-start;
}

.authorPageHeader {
  border-bottom: 1px solid var(--line);
}

.authorPageHeader p {
  margin: 0;
}

.authorPageHeader + main {
  padding-top: 22px;
}

.portalAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--brand);
  color: #fff !important;
  text-decoration: none;
  font-family: Inter, Segoe UI, Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.portalAction:hover {
  background: #0d5a57;
  border-color: #0d5a57;
  color: #fff !important;
}

.toolCard h2 .portalAction {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.authorButtonSection .portalAction {
  min-width: 180px;
}

.portalFooter {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 16px 42px;
  color: var(--muted);
  font-size: 13px;
}

.portalFooter p {
  margin: 0;
}

.portalFooter p + p {
  margin-top: 5px;
}

@media (max-width: 760px) {
  .portalHeader,
  main,
  .portalFooter {
    padding-left: 16px;
    padding-right: 16px;
  }

  .portalHeader h1 {
    font-size: 27px;
  }

  .toolGrid,
  .aboutSection {
    grid-template-columns: 1fr;
  }

  .aboutSection,
  .authorLinkSection {
    padding: 16px;
  }

  .authorLinkSection {
    align-items: stretch;
    flex-direction: column;
  }

  .authorLinkSection a,
  .authorButtonSection a,
  .authorNav a,
  .portalAction {
    width: 100%;
    text-align: center;
  }

  .toolCard h2 .portalAction {
    justify-content: center;
    text-align: center;
  }
}
