/*
 * Akvapraktika typography system v1.0 — 2026-08-23.
 * Loaded after legacy layout layers and acts as the single typography contract.
 */

:root {
  --akva-font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --akva-type-xs: .8125rem;      /* 13px */
  --akva-type-sm: .875rem;       /* 14px */
  --akva-type-ui: 1rem;          /* 16px */
  --akva-type-body: 1.1875rem;   /* 19px */
  --akva-type-lead: 1.375rem;    /* 22px */
  --akva-type-h3: 1.5rem;        /* 24px */
  --akva-type-h2: 2rem;          /* 32px */
  --akva-type-h1: clamp(2.75rem, 4.4vw, 3.25rem);
  --akva-type-display: clamp(3rem, 5.2vw, 4rem);

  --akva-leading-body: 1.63;
  --akva-leading-lead: 1.42;
  --akva-leading-heading: 1.12;
  --akva-measure: 66ch;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.akvapraktika-site {
  font-family: var(--akva-font);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  font-synthesis: none;
  color: var(--akva-ink);
  text-rendering: optimizeLegibility;
}

body.akvapraktika-site :where(button, input, select, textarea) {
  font-family: inherit;
}

body.akvapraktika-site :where(h1, h2, h3, h4, h5, h6, strong) {
  font-family: var(--akva-font);
}

body.akvapraktika-site :where(h1, h2, h3) {
  text-wrap: balance;
}

body.akvapraktika-site :where(p, li, blockquote, figcaption) {
  font-family: var(--akva-font);
  overflow-wrap: break-word;
}

/* Brand and global UI. */
.akva-brand-text strong {
  font-family: var(--akva-font);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
}

.akva-brand-text small {
  margin-top: 6px;
  font-size: var(--akva-type-xs);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: .08em;
}

.akva-head-search input,
.akva-head-search button,
.akva-find-form input,
.akva-find-form button,
.akva-listing-search input,
.akva-listing-search button,
.akva-calc input,
.akva-calc button {
  font-size: var(--akva-type-ui);
  line-height: 1.25;
}

.akva-head-search button,
.akva-find-form button,
.akva-listing-search button,
.akva-calc button,
.akva-partner-button {
  font-weight: 600;
}

.akva-topic-nav a {
  font-size: var(--akva-type-ui);
  line-height: 1.25;
  font-weight: 600;
}

.akva-label,
.akva-section-name,
.akva-listing-card__label,
.akva-footer-title,
.akva-tool-soon > span {
  font-size: var(--akva-type-xs);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .08em;
}

/* Headings: one family, stable weights and scale. */
.akva-home-v3 h1,
.akva-home-v3 h2,
.akva-inner h1,
.akva-inner h2,
.akva-inner h3,
.akva-listing-hero h1,
.akva-not-found-hero h1,
.akva-empty-state h2,
.akva-not-found-directions__head h2 {
  font-family: var(--akva-font);
  font-weight: 700;
  letter-spacing: -.018em;
}

.akva-cover-copy h1 {
  font-size: var(--akva-type-display);
  line-height: 1.04;
  max-width: 15ch;
}

.akva-home-v3 h2,
.akva-find h2,
.akva-lab-intro h2,
.akva-pond-copy h2 {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.1;
}

.akva-article .akva-page-head h1,
.akva-listing-hero h1,
.akva-not-found-hero h1 {
  font-size: var(--akva-type-h1);
  line-height: 1.06;
  max-width: 18ch;
}

/* Editorial reading column. */
.akva-entry {
  font-family: var(--akva-font);
  font-size: var(--akva-type-body);
  line-height: var(--akva-leading-body);
  font-weight: 400;
  color: #29383d;
}

.akva-entry > p,
.akva-entry > ul,
.akva-entry > ol,
.akva-entry > blockquote,
.akva-entry > h2,
.akva-entry > h3,
.akva-entry > .akva-factbox,
.akva-entry > .akva-note,
.akva-entry > .akva-partner-box,
.akva-entry > .akva-sources {
  max-width: var(--akva-measure);
}

.akva-entry > .akva-lead:first-child,
.akva-entry > p:first-child,
.akva-article .akva-entry > .akva-lead:first-child,
.akva-article .akva-entry > p:first-child {
  max-width: 60ch;
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: var(--akva-type-lead);
  line-height: var(--akva-leading-lead);
  font-weight: 400;
  color: #314247;
}

.akva-entry h2,
.akva-article .akva-entry h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: var(--akva-type-h2);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.012em;
}

.akva-entry h3,
.akva-article .akva-entry h3 {
  margin: 2.5rem 0 .875rem;
  font-size: var(--akva-type-h3);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.008em;
}

.akva-entry p {
  margin: 0 0 1em;
}

.akva-entry ul,
.akva-entry ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.35em;
}

.akva-entry li {
  margin: .45em 0;
  padding-left: .15em;
}

.akva-entry a:not(.akva-partner-button):not(.akva-inline-cta) {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}

.akva-entry blockquote,
.akva-entry .akva-factbox,
.akva-entry .akva-note,
.akva-article .akva-entry blockquote,
.akva-article .akva-entry .akva-factbox,
.akva-article .akva-entry .akva-note {
  font-size: 1.0625rem;
  line-height: 1.52;
}

/* Metadata and captions. */
.akva-breadcrumbs,
.akva-page-head .akva-breadcrumbs {
  font-size: var(--akva-type-sm);
  line-height: 1.4;
}

.akva-page-meta,
.akva-page-head__status,
.akva-article .akva-page-meta {
  font-size: var(--akva-type-sm);
  line-height: 1.4;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.akva-content-figure figcaption,
.akva-article .wp-block-image figcaption,
.wp-block-image figcaption {
  margin-top: .625rem;
  font-size: var(--akva-type-sm);
  line-height: 1.45;
  color: #5f6e6a;
}

.akva-photo-credit {
  font-size: .75rem;
  line-height: 1.35;
}

/* Tables and structured data. */
.akva-choice-table {
  font-size: var(--akva-type-ui);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.akva-choice-table th,
.akva-choice-table td {
  padding: .8125rem 1rem;
}

.akva-choice-table th {
  font-size: var(--akva-type-ui);
  line-height: 1.35;
  font-weight: 600;
}

.akva-spec-grid,
.akva-calc__result {
  font-variant-numeric: tabular-nums;
}

.akva-spec-grid span {
  font-size: var(--akva-type-xs);
  line-height: 1.35;
  letter-spacing: .05em;
}

.akva-spec-grid strong {
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
}

.akva-sources {
  font-size: var(--akva-type-ui);
  line-height: 1.5;
}

/* Cards and navigation: same family, fewer artificial heavy weights. */
.akva-now-head strong,
.akva-editorial-card strong,
.akva-fish-grid strong,
.akva-tool-card strong,
.akva-latest-list strong,
.akva-hub-item strong,
.akva-related-card strong,
.akva-listing-card strong,
.akva-direction-copy strong,
.akva-footer-brand strong {
  font-family: var(--akva-font);
  font-weight: 600;
  letter-spacing: -.012em;
}

.akva-now-head strong {
  font-size: 1.625rem;
  line-height: 1.15;
}

.akva-editorial-card strong,
.akva-fish-grid strong,
.akva-tool-card strong,
.akva-hub-item strong,
.akva-listing-card strong {
  line-height: 1.14;
}

.akva-editorial-card strong {
  font-size: 1.5rem;
}

.akva-editorial-card--main strong {
  font-size: clamp(2rem, 3.2vw, 2.5rem);
}

.akva-fish-grid strong,
.akva-fish-grid .akva-fish-copy strong {
  font-size: 1.625rem;
}

.akva-fish-grid em {
  font-size: var(--akva-type-sm);
  line-height: 1.35;
}

.akva-tool-card strong,
.akva-hub-item strong,
.akva-listing-card strong {
  font-size: 1.625rem;
}

.akva-related-card strong,
.akva-latest-list strong {
  font-size: 1.25rem;
  line-height: 1.2;
}

.akva-direction-copy strong {
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.08;
}

.akva-hub-item .akva-hub-item__desc,
.akva-listing-card__desc,
.akva-editorial-card p,
.akva-direction-copy p,
.akva-tool-card p,
.akva-pond-copy p {
  font-size: var(--akva-type-ui);
  line-height: 1.5;
}

.akva-read,
.akva-inline-cta,
.akva-hub-item em,
.akva-related-card em,
.akva-listing-card em,
.akva-direction-copy em,
.akva-tool-card em,
.akva-home-section__head > a,
.akva-pond-links a {
  font-size: var(--akva-type-sm);
  line-height: 1.35;
  font-weight: 600;
}

.akva-side-nav > span {
  font-size: var(--akva-type-xs);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .07em;
}

.akva-side-nav a {
  font-size: var(--akva-type-sm);
  line-height: 1.4;
}

/* Footer. */
.akva-footer-brand strong {
  font-size: 1.625rem;
  line-height: 1.1;
}

.akva-footer-brand p,
.akva-footer-grid > div:not(.akva-footer-brand) a {
  font-size: var(--akva-type-sm);
  line-height: 1.5;
}

.akva-footer-bottom {
  font-size: var(--akva-type-xs);
  line-height: 1.4;
}

@media (max-width: 700px) {
  :root {
    --akva-type-body: 1.125rem;  /* 18px */
    --akva-type-lead: 1.25rem;   /* 20px */
    --akva-type-h3: 1.375rem;    /* 22px */
    --akva-type-h2: 1.75rem;     /* 28px */
    --akva-type-h1: 2.25rem;     /* 36px */
    --akva-type-display: 2.5rem;  /* 40px */
  }

  body.akvapraktika-site {
    font-size: 18px;
    line-height: 1.6;
  }

  .akva-shell {
    width: min(100% - 40px, 1180px);
  }

  .akva-brand-text strong {
    font-size: 1.5rem;
  }

  .akva-topic-nav a {
    font-size: .9375rem;
  }

  .akva-cover-copy h1 {
    font-size: var(--akva-type-display);
    line-height: 1.06;
  }

  .akva-article .akva-page-head h1,
  .akva-listing-hero h1,
  .akva-not-found-hero h1,
  .akva-page-head h1 {
    font-size: var(--akva-type-h1);
    line-height: 1.08;
  }

  .akva-entry,
  .akva-article .akva-entry {
    font-size: var(--akva-type-body);
    line-height: 1.61;
  }

  .akva-entry > .akva-lead:first-child,
  .akva-entry > p:first-child,
  .akva-article .akva-entry > .akva-lead:first-child,
  .akva-article .akva-entry > p:first-child {
    font-size: var(--akva-type-lead);
    line-height: 1.45;
  }

  .akva-entry h2,
  .akva-article .akva-entry h2 {
    margin-top: 3rem;
    font-size: var(--akva-type-h2);
    line-height: 1.2;
  }

  .akva-entry h3,
  .akva-article .akva-entry h3 {
    margin-top: 2.25rem;
    font-size: var(--akva-type-h3);
    line-height: 1.24;
  }

  .akva-choice-table {
    font-size: var(--akva-type-ui);
  }

  .akva-content-figure figcaption,
  .wp-block-image figcaption {
    font-size: var(--akva-type-sm);
  }

  .akva-direction-copy strong,
  .akva-editorial-card--main strong {
    font-size: 2rem;
  }

  .akva-fish-grid strong,
  .akva-fish-grid .akva-fish-copy strong,
  .akva-tool-card strong,
  .akva-hub-item strong,
  .akva-listing-card strong {
    font-size: 1.5rem;
  }
}

/*
 * Kadence calculates alignfull blocks with 100vw. On platforms where the
 * vertical scrollbar consumes layout width, that is wider than clientWidth
 * and creates a horizontal scrollbar. Container units use the real content
 * viewport without hiding unrelated overflow.
 */
@supports (width: 100cqw) {
  body.akvapraktika-site .content-area {
    container-type: inline-size;
  }

  body.akvapraktika-site .entry-related.alignfull {
    width: 100cqw;
    max-width: 100cqw;
    margin-left: calc(50% - 50cqw);
    margin-right: calc(50% - 50cqw);
  }
}
