/* =========================
   Global design variables
   ========================= */

:root {
  --background: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #edf3f1;

  --text: #243238;
  --text-muted: #5f6d72;

  --accent: #3f716b;
  --accent-dark: #315c57;
  --accent-light: #dfecea;

  --border: #d8e0dd;

  --max-width: 1100px;
  --reading-width: 780px;

  --radius-small: 8px;
  --radius-medium: 14px;

  --shadow-soft: 0 3px 14px rgba(0, 0, 0, 0.06);
}

/* =========================
   Base
   ========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
}

a:hover {
  text-decoration-thickness: 2px;
}

img {
  max-width: 100%;
}

/* =========================
   Accessibility
   ========================= */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: white;
  padding: 0.75rem 1rem;
  z-index: 9999;
  border-radius: var(--radius-small);
}

/* =========================
   Header
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;

  background: var(--surface);
  border-bottom: 1px solid var(--border);

  transition:
    transform 0.28s ease,
    opacity 0.28s ease,
    box-shadow 0.28s ease;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.site-name {
  margin: 0;

  color: var(--text);
  text-decoration: none;

  font-size: 1.2rem;
  font-weight: 700;
}

.site-logo-link {
  display: flex;
  align-items: center;

  flex-shrink: 0;

  text-decoration: none;
}

.site-logo {
  display: block;

  width: auto;
  height: 3.2rem;

  max-width: 260px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--accent);
}

/* =========================
   Navigation toggle
   ========================= */

.nav-toggle {
  display: none;

  width: 2.75rem;
  height: 2.75rem;
  padding: 0.55rem;

  background: transparent;

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

.nav-toggle-line {
  display: block;

  width: 100%;
  height: 2px;

  margin: 4px 0;

  background: var(--text);

  border-radius: 999px;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* =========================
   General layout
   ========================= */

.container {
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 0 auto;
}

.reading-column {
  width: min(var(--reading-width), calc(100% - 3rem));
  margin: 0 auto;
}

main {
  min-height: 70vh;
}

/* =========================
   Typography
   ========================= */

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: 3rem;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
}

.eyebrow {
  margin-bottom: 0.5rem;

  color: var(--accent-dark);

  font-size: 0.82rem;
  font-weight: 700;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================
   Hero
   ========================= */

.hero {
  padding: 5rem 0 4rem;
}

.hero h1 {
  max-width: 800px;
}

/* =========================
   Buttons
   ========================= */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;

  padding: 0.75rem 1.1rem;

  background: var(--accent);
  color: white;

  border-radius: var(--radius-small);

  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-dark);
  color: white;
}

.button-secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

.button-secondary:hover {
  background: var(--accent-dark);
  color: var(--accent-light);
  border-color: var(--accent-light);
}
/* =========================
   Cards
   ========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 1rem;

  margin: 2rem 0;
}

.card {
  display: block;

  padding: 1.4rem;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  color: var(--text);
  text-decoration: none;

  box-shadow: var(--shadow-soft);
}

.card:hover {
  border-color: var(--accent);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================
   Skill pages
   ========================= */

.skill-page {
  padding: 3.5rem 0 5rem;
}

.breadcrumb {
  margin-bottom: 2rem;

  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.skill-header {
  margin-bottom: 3rem;
}

.skill-summary {
  padding: 1.25rem 1.4rem;

  background: var(--surface-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-small);

  font-size: 1.08rem;
}

/* =========================
   Quick exercise
   ========================= */

.try-now {
  margin: 2rem 0;
  padding: 1.5rem;

  background: var(--surface);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-medium);
}

.try-now h2,
.try-now h3 {
  margin-top: 0;
}

/* =========================
   Accordions
   ========================= */

.accordion {
  margin: 1rem 0;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  overflow: hidden;
}

.accordion summary {
  cursor: pointer;

  padding: 1rem 1.2rem;

  font-weight: 700;
  font-size: 1.05rem;

  list-style-position: inside;
}

.accordion summary:hover {
  background: var(--surface-soft);
}

.accordion-content {
  padding: 0 1.3rem 1.4rem;
}

/* =========================
   Lists
   ========================= */

.steps li {
  margin-bottom: 0.6rem;
}

/* =========================
   Resources
   ========================= */

.resource {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.resource:last-child {
  border-bottom: 0;
}

.resource-title {
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.resource-description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================
   Footer
   ========================= */

.site-footer {
  margin-top: 4rem;

  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;

  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 650px) {

  body {
    font-size: 16px;
  }

    html {
    scroll-padding-top: 4.5rem;
  }



  /* Header */

  .header-inner {
    position: relative;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;
  }

  .nav-toggle {
    display: block;
    flex-shrink: 0;
  }

  .site-logo {
  height: 2.65rem;
  max-width: 210px;
  } 

  /* Mobile navigation menu */

  .site-nav {
    display: none;

    position: absolute;

    top: calc(100% + 0.5rem);
    left: 1.5rem;
    right: 1.5rem;

    z-index: 1000;

    padding: 0.5rem;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-soft);
  }

  .site-nav.nav-open {
    display: flex;
    flex-direction: column;

    gap: 0;
  }

  .site-nav a {
    display: block;

    padding: 0.8rem 1rem;

    border-radius: var(--radius-small);
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: var(--surface-soft);
  }


  /* Turn hamburger into an X */

  .nav-toggle[aria-expanded="true"]
  .nav-toggle-line:nth-child(1) {
    transform:
      translateY(6px)
      rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"]
  .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"]
  .nav-toggle-line:nth-child(3) {
    transform:
      translateY(-6px)
      rotate(-45deg);
  }


  /* Hero */

  .hero {
    padding: 3rem 0;
  }

  /*
    These destinations are available
    through the hamburger menu.
  */

  .hero .button-row {
    display: none;
  }


  /* Skill pages */

  .skill-page {
    padding-top: 2rem;
  }



    /*
    Hide navigation while idle in the middle
    of a long page.
  */

  .site-header.mobile-nav-hidden {
    opacity: 0;
    transform: translateY(-110%);

    pointer-events: none;
  }

  .site-header.mobile-nav-visible {
    opacity: 1;
    transform: translateY(0);

    pointer-events: auto;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }

}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .site-header,
  .back-to-top,
  .nav-toggle-line,
  .on-page-nav summary::after,
  .skill-filter-panel summary::after {
    transition: none;
  }

}

/* =========================
   On-page navigation
   ========================= */

.on-page-nav {
  margin: 0 0 2.5rem;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.on-page-nav summary {
  padding: 0.9rem 1.1rem;

  color: var(--text);

  font-size: 0.95rem;
  font-weight: 700;

  cursor: pointer;

  list-style: none;
}

.on-page-nav summary::-webkit-details-marker {
  display: none;
}

.on-page-nav summary::after {
  content: "⌄";

  float: right;

  margin-left: 1rem;

  color: var(--accent-dark);

  font-size: 1.1rem;

  transition:
    transform 0.2s ease;
}

.on-page-nav[open] summary::after {
  transform: rotate(180deg);
}

.on-page-nav summary:hover {
  background: var(--surface-soft);
}

.on-page-nav summary:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: -3px;
}

.on-page-links {
  display: flex;
  flex-direction: column;
  gap: 0;

  padding: 0 1.1rem 0.5rem;

  border-top: 1px solid var(--border);
}

.on-page-links a {
  display: block;

  padding: 0.7rem 0;

  color: var(--accent-dark);

  font-size: 0.92rem;
  font-weight: 600;

  text-decoration: none;

  border-bottom: 1px solid var(--border);
}

.on-page-links a:last-child {
  border-bottom: 0;
}

.on-page-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}


@media (max-width: 650px) {

  .on-page-nav {
    margin-bottom: 2rem;
  }

}

/* =========================
   Return to top
   ========================= */

.back-to-top {
  position: fixed;

  right: 1.25rem;
  bottom: 1.25rem;

  z-index: 850;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 3rem;
  height: 3rem;

  padding: 0;

  background: var(--surface);
  color: var(--accent-dark);

  border: 1px solid var(--accent);
  border-radius: 50%;

  box-shadow: var(--shadow-soft);

  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;

  cursor: pointer;

  opacity: 0;
  transform: translateY(0.6rem);

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.2s ease,
    visibility 0s linear 0.25s;
 
  visibility: hidden;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);

  pointer-events: auto;

  visibility: visible;
  transition-delay: 0s;
}

.back-to-top:hover {
  background: var(--accent-light);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

/* =========================
   Category jump boxes
   ========================= */

.category-jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;

  margin: 2rem 0 4rem;
}

.category-jump {
  width: 100%;

  padding: 1.3rem;

  background: var(--surface);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);

  font: inherit;
  font-weight: 650;
  font-size: 1rem;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.category-jump:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.category-jump:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}


/* =========================
   Category accordions
   ========================= */

.category-accordion {
  margin: 1rem 0;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);

  overflow: hidden;

  scroll-margin-top: 2rem;
}

.category-accordion summary {
  cursor: pointer;

  padding: 1.25rem 1.4rem;

  font-weight: 700;
  font-size: 1.1rem;

  background: var(--surface);
}

.category-accordion summary:hover {
  background: var(--surface-soft);
}

.category-accordion[open] summary {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}

.category-content {
  padding: 1.25rem 1.4rem 1.5rem;
}

.category-content p {
  color: var(--text-muted);
}


/* =========================
   Category coping skill list
   ========================= */

.category-skill-list {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(210px, 1fr));

  gap: 0.65rem;

  padding: 0;
  margin: 1rem 0 0;

  list-style: none;
}

.category-skill-list li {
  margin: 0;
}

.category-skill-link,
.category-skill-unavailable {
  display: block;

  padding: 0.7rem 0.85rem;

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  font-size: 0.95rem;
}

.category-skill-link {
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}

.category-skill-link:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
}

.category-skill-unavailable {
  color: var(--text-muted);
  background: var(--background);
}

/* =========================
   All Skills filters
   ========================= */

.skill-filter-panel {
  margin: 1.5rem 0 2rem;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);

  overflow: hidden;
}

.skill-filter-panel summary {
  padding: 1rem 1.2rem;

  color: var(--text);

  font-weight: 700;

  cursor: pointer;

  list-style: none;
}

.skill-filter-panel summary::-webkit-details-marker {
  display: none;
}

.skill-filter-panel summary::after {
  content: "⌄";

  float: right;

  margin-left: 1rem;

  color: var(--accent-dark);

  font-size: 1.1rem;

  transition:
    transform 0.2s ease;
}

.skill-filter-panel[open] summary::after {
  transform: rotate(180deg);
}

.skill-filter-panel summary:hover {
  background: var(--surface-soft);
}

.skill-filter-panel summary:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: -3px;
}


.skill-filter-content {
  padding: 1.1rem 1.2rem 1.2rem;

  border-top: 1px solid var(--border);
}

.skill-filter-help {
  margin-bottom: 1rem;

  color: var(--text-muted);

  font-size: 0.92rem;
}


.skill-filter-options {
  display: flex;
  flex-wrap: wrap;

  gap: 0.65rem;
}


.skill-filter-option {
  display: flex;
  align-items: center;

  gap: 0.5rem;

  padding: 0.6rem 0.8rem;

  background: var(--surface-soft);

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  font-size: 0.92rem;
  font-weight: 600;

  cursor: pointer;
}

.skill-filter-option:hover {
  border-color: var(--accent);
}

.skill-filter-option:has(
  input:checked
) {
  background: var(--accent-light);
  border-color: var(--accent);
}

.skill-filter-option input {
  margin: 0;

  accent-color: var(--accent);
}


.skill-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 1rem;

  margin-top: 1.25rem;
  padding-top: 1rem;

  border-top: 1px solid var(--border);
}

.skill-filter-count {
  margin: 0;

  color: var(--text-muted);

  font-size: 0.9rem;
}


.skill-filter-clear {
  padding: 0.5rem 0.75rem;

  background: transparent;
  color: var(--accent-dark);

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;

  cursor: pointer;
}

.skill-filter-clear:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: var(--accent);
}

.skill-filter-clear:disabled {
  opacity: 0.45;
  cursor: default;
}

.skill-filter-clear:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

@media (max-width: 650px) {

  .skill-filter-options {
    flex-direction: column;
  }

  .skill-filter-option {
    width: 100%;
  }

  .skill-filter-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .skill-filter-clear {
    align-self: flex-start;
  }

}

/* =========================
   Mobile category layout
   ========================= */

@media (max-width: 650px) {

  .category-jump-grid {
    grid-template-columns: 1fr;
  }

  .category-skill-list {
    grid-template-columns: 1fr;
  }

}



/* =========================
   Topics & Resources
   ========================= */

.topic-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));

  gap: 1rem;
  margin: 2rem 0 4rem;

  align-items: start;
}

.topic-card {
  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);

  overflow: hidden;
}

.topic-card summary {
  cursor: pointer;

  padding: 1.3rem;

  list-style: none;
}

.topic-card summary::-webkit-details-marker {
  display: none;
}

.topic-card summary:hover {
  background: var(--surface-soft);
}

.topic-title {
  display: block;

  margin-bottom: 0.35rem;

  color: var(--text);

  font-size: 1.05rem;
  font-weight: 700;
}

.topic-description {
  display: block;

  color: var(--text-muted);

  font-size: 0.95rem;
  font-weight: 400;
}

.topic-content {
  padding: 0 1.3rem 1.3rem;
}

.topic-resource {
  display: block;

  padding: 0.75rem 0;

  border-top: 1px solid var(--border);

  font-weight: 600;
  text-decoration: none;
}

.topic-resource:hover {
  text-decoration: underline;
}

.topic-collapse-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 2.5rem;
  height: 2.5rem;

  margin: 1rem auto 0;
  padding: 0;

  background: var(--surface-soft);
  color: var(--accent-dark);

  border: 1px solid var(--border);
  border-radius: 50%;

  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;

  cursor: pointer;
}

.topic-collapse-button:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.topic-collapse-button:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

/* =========================
   Favorite coping skills
   ========================= */

.favorite-skills-panel {
  margin: 1rem 0 4rem;
  padding: 1.6rem;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);
}

.favorite-skills-panel h2 {
  margin-top: 0;
}

.favorite-skill-controls {
  display: flex;
  align-items: flex-end;

  gap: 0.75rem;

  margin: 1.5rem 0 1rem;
}

.favorite-input-wrapper {
  flex: 1;
}

.favorite-label {
  display: block;

  margin-bottom: 0.4rem;

  font-size: 0.9rem;
  font-weight: 700;
}

.favorite-skill-input {
  width: 100%;

  padding: 0.8rem 0.9rem;

  background: var(--surface);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  font: inherit;
}

.favorite-skill-input:focus {
  outline: 3px solid var(--accent-light);
  border-color: var(--accent);
}

.favorite-skill-message {
  min-height: 1.5em;

  margin: 0.5rem 0;

  color: var(--text-muted);

  font-size: 0.9rem;
}


/* Saved skills */

.favorite-skills-list {
  display: flex;
  flex-wrap: wrap;

  gap: 0.65rem;

  margin-top: 1rem;
}

.favorite-skill {
  display: flex;
  align-items: center;

  background: var(--surface-soft);

  border: 1px solid var(--border);
  border-radius: 999px;

  overflow: hidden;
}

.favorite-skill-link,
.favorite-skill-name {
  padding: 0.55rem 0.2rem 0.55rem 0.85rem;

  color: var(--text);

  font-size: 0.95rem;
  font-weight: 650;

  text-decoration: none;
}

.favorite-skill-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.favorite-remove {
  padding: 0.5rem 0.75rem;

  background: transparent;
  color: var(--text-muted);

  border: 0;

  font-size: 1rem;

  cursor: pointer;
}

.favorite-remove:hover {
  color: var(--text);
}

.favorite-storage-note {
  margin-top: 1rem;
  margin-bottom: 0;

  color: var(--text-muted);

  font-size: 0.82rem;
}

/* =========================
   Skill favorites
   ========================= */

.skill-favorite-action {
  margin-top: 1.25rem;
}

.skill-favorite-button {
  border: 1px solid var(--accent);

  font: inherit;

  cursor: pointer;
}

.skill-favorite-button:disabled,
.skill-favorite-button:disabled:hover {
  background: var(--surface-soft);
  color: var(--text-muted);

  border-color: var(--border);

  opacity: 1;

  cursor: default;
}


/* =========================
   Desktop skill preview
   ========================= */

.skill-preview-popover {
  position: fixed;

  z-index: 2000;

  width: min(
    340px,
    calc(100vw - 2rem)
  );

  padding: 1rem 1.1rem;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  box-shadow:
    0 8px 28px
    rgba(0, 0, 0, 0.14);
}

.skill-preview-popover[hidden] {
  display: none;
}

.skill-preview-title {
  margin: 0 0 0.55rem;

  font-size: 1.05rem;
}

.skill-preview-definition {
  margin-bottom: 1rem;

  color: var(--text-muted);

  font-size: 0.92rem;
  line-height: 1.5;
}

.skill-preview-popover
.skill-favorite-button {
  width: 100%;

  text-align: center;
}


/*
  Hover previews are only an enhancement
  for devices with a precise pointer.
*/

@media (hover: none),
       (pointer: coarse) {

  .skill-preview-popover {
    display: none !important;
  }

}


/* Mobile */

@media (max-width: 650px) {

  .favorite-skill-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .favorite-skill-controls .button {
    text-align: center;
  }

}

/* =========================
   Custom coping-skill autocomplete
   ========================= */

.favorite-input-wrapper {
  position: relative;
}

.favorite-skill-suggestions {
  position: absolute;
  z-index: 100;

  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;

  max-height: 280px;
  overflow-y: auto;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.favorite-skill-suggestions[hidden] {
  display: none;
}

.favorite-suggestion {
  display: block;
  width: 100%;

  padding: 0.7rem 0.9rem;

  background: var(--surface);
  color: var(--text);

  border: 0;
  border-bottom: 1px solid var(--border);

  font: inherit;
  font-size: 0.95rem;
  text-align: left;

  cursor: pointer;
}

.favorite-suggestion:last-child {
  border-bottom: 0;
}

.favorite-suggestion:hover,
.favorite-suggestion:focus,
.favorite-suggestion.active {
  background: var(--surface-soft);
  outline: none;
}

.favorite-suggestion-match {
  font-weight: 700;
}

/* =========================
   Crisis support banner
   ========================= */

.crisis-banner {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.crisis-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.crisis-banner strong {
  margin-right: 0.3rem;
}

.crisis-banner a {
  font-weight: 700;
}


/* =========================
   Footer crisis information
   ========================= */

.footer-crisis {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-crisis > strong {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1rem;
}

.footer-crisis p {
  margin-bottom: 0.5rem;
}

.footer-crisis a {
  font-weight: 700;
}

.footer-disclaimer {
  margin-bottom: 0;
}


@media (max-width: 650px) {

  .crisis-banner-inner {
    padding: 0.65rem 1.5rem;
    font-size: 0.82rem;
  }

}

.resource-login-form {
  display: grid;
  gap: 1rem;
  max-width: 460px;
}

.resource-login-form label {
  font-weight: 600;
}

.resource-login-form input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.resource-login-form input[type="password"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.resource-login-form .button {
  justify-self: start;
}

.login-error {
  margin: 0;
  font-weight: 600;
}

.topic-resource-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.protected-resource-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =========================
   Keyboard focus
   ========================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-dark) !important;
  outline-offset: 3px;
}