/* Foundations, loaded first on every page by templates/layout.html:
   design tokens, global defaults, editorial typography, and accessibility utilities.
   Colors live in skins/site.css. */

:root {
  --font-sans: "Plumera Sans", "Plumera Sans Fallback", Arial, sans-serif;

  /* Chrome and shared type. Desktop sizes; rem from a 16px root. */
  --chrome-type-size: 1rem;
  --type-footer-weight: 400;
  --type-footer-leading: 1.4;

  --type-wordmark-size: 1.75rem;
  --type-wordmark-weight: 400;
  --type-wordmark-strong: 700;
  --type-wordmark-leading: 1.1;
  --type-wordmark-tracking: -0.035em;

  --type-lang-card-title-size: 2.5rem;
  --type-lang-card-title-weight: 700;
  --type-lang-card-title-leading: 1.1;
  --type-lang-card-title-tracking: -0.035em;
  --type-lang-card-support-size: 1rem;
  --type-lang-card-support-weight: 400;

  --type-lang-heading-size: 1rem;
  --type-lang-heading-weight: 500;
  --type-lang-heading-leading: 1.4;
  --type-nav-card-title-size: 1.25rem;
  --type-nav-card-title-weight: 600;
  --type-nav-card-title-leading: 1.25;
  --type-nav-card-title-tracking: -0.02em;

  --type-hub-card-title-size: 1.125rem;
  --type-hub-card-title-weight: 500;
  --type-hub-card-title-leading: 1.3;
  --type-hub-card-desc-size: 0.95rem;
  --type-hub-card-desc-weight: 500;
  --type-hub-card-desc-leading: 1.35;

  --type-crumb-size: 1rem;
  --type-crumb-weight: 400;
  --type-crumb-current-weight: 600;
  --type-crumb-leading: 1.4;

  --type-level-size: 1rem;
  --type-level-weight: 400;
  --type-level-leading: 1.4;

  --type-h1-size: 1.875rem;
  --type-h1-weight: 700;
  --type-h1-leading: 1.2;
  --type-h1-tracking: -0.02em;

  --type-h2-size: 1.5rem;
  --type-h2-weight: 600;
  --type-h2-leading: 1.25;
  --type-h2-tracking: -0.02em;

  --type-h3-size: 1.25rem;
  --type-h3-weight: 600;
  --type-h3-leading: 1.3;
  --type-h3-tracking: -0.02em;

  --type-callout-heading-size: 1.125rem;
  --type-callout-heading-weight: 600;
  --type-callout-heading-leading: 1.3;

  --type-body-size: 1.0625rem;
  --type-body-weight: 400;
  --type-body-leading: 1.6;

  --type-support-size: 0.95rem;

  --type-table-size: 1.0625rem;
  --type-table-weight: 400;
  --type-table-heading-weight: 600;
  --type-table-leading: 1.5;

  /* Layout */
  --layout-column-width: 748px;
  --layout-page-padding: clamp(1.5rem, 6.35vw, 5.5rem);
  /* Header divider to the first content (breadcrumb or heading). */
  --layout-content-gap: clamp(3.45rem, 1.7rem + 4.5vh, 4.95rem);
  /* Between hub sections, and from the last content to the footer. */
  --layout-section-gap: clamp(3.5rem, 9vh, 6.5rem);
  --grid-gap: 20px;
  --nav-icon-size: 22px;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Motion */
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 120ms ease;
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-leading);
  color: var(--color-text);
  background: var(--color-surface);
}

h2 {
  margin: 2.5rem 0 0.75rem;
  padding: 0;
  font-size: var(--type-h2-size);
  font-weight: var(--type-h2-weight);
  line-height: var(--type-h2-leading);
  letter-spacing: var(--type-h2-tracking);
}

h3 {
  margin: 2rem 0 0.625rem;
  padding: 0;
  font-size: var(--type-h3-size);
  font-weight: var(--type-h3-weight);
  line-height: var(--type-h3-leading);
  letter-spacing: var(--type-h3-tracking);
}

p {
  margin: 0 0 1rem;
  padding: 0;
}

ul,
ol {
  margin: 1rem 0;
  padding: 0 0 0 1.25rem;
}

ul {
  display: grid;
  gap: 0.5rem;
}

table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
}

th,
td {
  padding: 0.55rem 1.25rem 0.55rem 0;
  border-bottom: 1px solid var(--color-hairline);
  vertical-align: top;
  text-align: left;
}

th {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Page titles, lead text, and editorial links */

.page-heading {
  margin: 0;
  font-size: var(--type-h1-size);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-leading);
  letter-spacing: var(--type-h1-tracking);
}

/* Lead text under a page title: one paragraph (.page-lead) or an authored intro (.page-intro) */
.page-lead,
.page-intro > p {
  margin: 0.55rem 0 0;
  font-weight: 400;
  line-height: 1.5;
}

.content-body a:not(.cluster-graph__node),
.hub-intro a,
.page-lead a,
.page-intro a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

/* Accessibility */

/* One focus ring for every control, footer dialogs included */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .crumb,
  .search-slot,
  .tutorial-next,
  .lesson-audio-play,
  .lang-switch,
  .page-related {
    display: none;
  }

  .page {
    min-height: 0;
    padding-inline: 0;
  }
}
