:root {
  --background-color: #f5f7f2;
  --primary-color: #6f9283;
  --secondary-color: #fac9b8;
  --accent-color: #8d9f87;
  --secondary-accent-color: #f0dcca;
  --text-color: #3a3c44;
  --green: #dce5da;
  --green2: #e8f0e7;
  --main-font: "Clarity City", sans-serif;
  --header-font: "Chango", sans-serif;
}

body {
  font-family: var(--main-font);
  background: var(--primary-color);
  text-align: center;
  padding: 20px;
  margin: 0;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh; 
  min-height: 100dvh; /* Modern dynamic viewport height fallback */
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
}

.site-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
  line-height: 0;
  transition: transform 0.3s ease;
}

.site-logo img {
  width: clamp(89px, 8vw, 88px);
  height: auto;
  object-fit: contain;
}

.site-logo:focus-visible,
.site-logo:hover {
  outline: 3px solid var(--secondary-border);
  outline-offset: 5px;
  transform: translateY(-1.5px);
}


.home-page {
  min-height: 100vh;
  padding: 0;
  background: var(--background-color);
  color: var(--text-color);
  text-align: left;
}

.home-page header,
.home-page main,
.home-page footer {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

.app-page header,
.app-page main,
.app-page footer {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}


.home-page header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.header-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  color: var(--text-color);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  font-family: var(--header-font);
}

.header-section #signed-in {
  font-family: var(--main-font);
  font-size: 15px;
}

.main-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.main-navigation a {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
  font-family: var(--main-font);
  font-size: 2vh;
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--secondary-color);
}

.nav-account-label {
  color: var(--text-color);
  font-size: 0.9rem;
  font-family: var(--main-font);
}

.nav-account-label[hidden] {
  display: none;
}

.home-page main {
  display: grid;
  gap: 12px;
  padding-block: 24px 40px;
}

.home-heading {
  padding: clamp(24px, 6vw, 56px);
  border: 1px solid var(--green);
  border-radius: 16px;
  background: #fff;
}

.about-heading {
  padding: clamp(16px, 4vw, 32px);
}

.home-heading {
  background: var(--green2);
}

.home-heading h1 {
  margin-top: 0;
  color: var(--text-color);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-family: var(--header-font);
}

.home-heading p,
.about-heading p {
  max-width: 65ch;
  line-height: 1.7;
}

.home-heading a {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--accent-color);
  color: var(--text-color);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.home-heading a:hover,
.home-heading a:focus-visible {
  background-color: var(--secondary-color);
}

.about-heading h2 {
  margin-top: 0;
  color: var(--text-color);
  font-family: var(--header-font);
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 10px;
}

/* About section */

.about-features {
  max-width: 65ch;
  margin: 16px 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.about-features li + li {
  margin-top: 6px;
}

.about-note {
  color: #66736a;
  font-size: 0.9rem;
}

/* How to use: text on the left, sensor placement drawing on the right */

.how-to-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(180px, 30%, 260px);
  /* intro row keeps its own height; the steps row takes any extra
     height from the taller picture, so no gap opens under the intro */
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "intro figure"
    "steps figure";
  align-items: start;
  column-gap: 32px;
}

.how-to-intro {
  grid-area: intro;
  margin-top: 0;
}

.how-to-layout .how-to-steps {
  grid-area: steps;
  margin: 0;
}

.sensor-placement {
  grid-area: figure;
  margin: 0;
}

.sensor-placement-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: #fff;
}

/* the intro says "to the side" beside the picture, "below" when stacked */
.placement-hint-narrow {
  display: none;
}

/* phones: stack as intro, picture, steps */
@media (max-width: 640px) {
  .how-to-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "intro"
      "figure"
      "steps";
  }

  .sensor-placement {
    width: min(100%, 220px);
    margin: 0 auto 20px;
  }

  .placement-hint-wide {
    display: none;
  }

  .placement-hint-narrow {
    display: inline;
  }
}

.sensor-placement figcaption {
  margin-top: 8px;
  color: #66736a;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.how-to-steps {
  max-width: 65ch;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.how-to-steps li + li {
  margin-top: 8px;
}

footer {
  padding-block: 16px 24px;
  border-top: 1px solid #dce5da;
  color: var(--text-color);
  font-size: 0.9rem;
  width: min(100% - 40px, 960px);
  margin-inline: auto;
  margin-top: 0;
}

footer p {
  margin: 0;
}

.home-page footer p {
  margin: 0;
}

@media (max-width: 600px) {
  .home-page header{
    display: flex;
  }
  .header-section nav {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}


.auth-card {
  width: min(100%, 520px);
  box-sizing: border-box;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--green);
  border-radius: 16px;
  background: #fff;
}

.auth-dialog {
  width: min(calc(100% - 32px), 560px);
  max-width: 560px;
  max-height: min(90vh, 760px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text-color);
}

.auth-dialog::backdrop {
  background: rgb(25 35 29 / 58%);
  backdrop-filter: blur(3px);
}

.auth-dialog .auth-card {
  width: 100%;
  box-shadow: 0 20px 60px rgb(0 0 0 / 20%);
}

.auth-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auth-dialog-heading h2 {
  margin: 0;
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: 1.35rem;
  font-weight: 400;
}

.auth-dialog .dialog-close {
  flex: 0 0 40px;
  width: 40px;
  min-height: 40px;
  margin-top: -8px;
  margin-right: -8px;
  padding: 0;
  border: 1px solid var(--green);
  border-radius: 50%;
  background: #fff;
  font-size: 1.5rem;
  line-height: 1;
}

.auth-dialog .dialog-close:hover {
  background: var(--secondary-color);
}

.nav-auth-button {
  border: 0;
  background: var(--accent-color);
  border-radius: 8px;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--main-font);
  font-weight: 700;
  padding: 10px;
  font-size: 14px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav-auth-button:hover,
.nav-auth-button:focus-visible {
  transform: translateY(-0.5px);
  background-color: var(--secondary-color);
}

.app-page {
  min-height: 100vh;
  padding: 0;
  background: var(--background-color);
  text-align: left;
}

.app-header,
.app-main {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.brand {
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: 1.25rem;
  text-decoration: none;
}

.app-navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-navigation a,
.back-link {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
}

.app-navigation a:hover,
.back-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--secondary-color);
}

.app-main {
  display: grid;
  gap: 24px;
  padding-block: 32px 64px;
}

.narrow-main {
  max-width: 680px;
}

.page-intro h1,
.panel h1 {
  margin: 0 0 12px;
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
}

.page-intro h1 {
  margin-bottom: 8px;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 10px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #526957;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted {
  color: #66736a;
  line-height: 1.6;
}

.panel {
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--green);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(58 60 68 / 6%);
}

.panel h2 {
  margin: 0 0 8px;
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: 1.3rem;
  font-weight: 400;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading p {
  margin-bottom: 0;
}

.form-stack {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-top: 20px;
}

.form-stack label {
  margin-top: 6px;
  font-weight: 700;
}

.form-stack input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #b9c8b9;
  border-radius: 8px;
  background: #fff;
  color: var(--text-color);
  font: inherit;
}

.form-stack input:focus-visible {
  outline: 3px solid rgb(111 146 131 / 35%);
  border-color: var(--primary-color);
}

.form-stack input[readonly] {
  background: #f2f5f0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.auth-card button,
.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-color);
  color: var(--text-color);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.auth-card button:hover:not(:disabled),
.button-link:hover,
button:hover {
  transform: translateY(-1px);
  background: var(--secondary-color);
}


.auth-card button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.app-page [hidden],
.auth-card [hidden] {
  display: none !important;
}

.live-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.live-values,
.log-panel {
  grid-column: 1 / -1;
}

.live-data-grid h2 {
  margin-top: 0;
}

.live-data-grid .data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.live-data-grid .data-box {
  padding: 14px;
  border: 1px solid var(--green);
  border-radius: 10px;
  background: var(--green2);
  line-height: 1.6;
}

.live-data-grid .label {
  font-weight: 700;
}

.live-data-grid .impact-card {
  background: var(--green2);
}

.live-data-grid .large-value {
  margin: 12px 0 4px;
  color: #526957;
  font-size: 2rem;
  font-weight: 700;
}

.step-count-panel {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.step-count-panel h2 {
  align-self: flex-start;
}

.step-count-value {
  margin: 8px 0 0;
  color: #526957;
  font-size: clamp(3rem, 8vw, 5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.step-count-panel .muted {
  margin-bottom: 0;
}

.live-data-grid .graph-panel canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.live-data-grid #serialOutput {
  min-height: 180px;
  max-height: 300px;
  padding: 14px;
  overflow: auto;
  border: 1px solid #26372d;
  border-radius: 8px;
  background: #111;
  color: #b8f2cf;
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.button-secondary {
  border: 1px solid var(--green) !important;
  background: #fff !important;
}

.button-secondary:hover:not(:disabled) {
  background: var(--green2) !important;
}

.text-button {
  min-height: auto !important;
  padding: 4px !important;
  background: transparent !important;
  color: var(--text-color) !important;
}

.notice {
  min-height: 1.4em;
  margin: 8px 0;
  color: #526957;
  line-height: 1.5;
}

.notice-error {
  color: #9a352c !important;
}



.connection-panel,
.timer-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green2);
}

.connection-panel h2 {
  margin-top: 0;
}

.timer-panel {
  text-align: center;
}

.timer-panel .eyebrow {
  margin-bottom: 4px;
}

.timer-value {
  margin: 4px 0;
  color: #355b43;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.5fr) 1fr;
  gap: 12px 20px;
  margin: 28px 0;
}

.detail-grid dt {
  color: #66736a;
  font-weight: 600;
}

.detail-grid dd {
  margin: 0;
  font-weight: 700;
}

@media (max-width: 600px) {
  .app-header,
  .app-main {
    width: min(100% - 32px, 960px);
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .app-main {
    padding-top: 20px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button,
  .form-actions .button-link {
    width: 100%;
  }

  .live-data-grid,
  .live-data-grid .data-grid {
    grid-template-columns: 1fr;
  }
}

.auth-card {
  border: 1px solid var(--green);
  border-radius: 16px;
  background: #fff;
}

.app-page {
  min-height: 100vh;
  padding: 0;
  background: var(--background-color);
  text-align: left;
}

.app-header,
.app-main {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.brand {
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: 1.25rem;
  text-decoration: none;
}

.app-navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-navigation a,
.back-link {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
}

.app-navigation a:hover,
.back-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--secondary-color);
}

.app-main {
  display: grid;
  gap: 24px;
  padding-block: 32px 64px;
}

.narrow-main {
  max-width: 680px;
}

.page-intro h1,
.panel h1 {
  margin: 0 0 12px;
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
}

.page-intro h1 {
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #526957;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted {
  color: #66736a;
  line-height: 1.6;
}

.panel {
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--green);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(58 60 68 / 6%);
}

.panel h2 {
  margin: 0 0 8px;
  color: var(--text-color);
  font-family: var(--header-font);
  font-size: 1.3rem;
  font-weight: 400;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading p {
  margin-bottom: 0;
}

.form-stack {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-top: 20px;
}

.form-stack label {
  margin-top: 6px;
  font-weight: 700;
}

.form-stack input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #b9c8b9;
  border-radius: 8px;
  background: #fff;
  color: var(--text-color);
  font: inherit;
}

.form-stack input:focus-visible {
  outline: 3px solid rgb(111 146 131 / 35%);
  border-color: var(--primary-color);
}

.form-stack input[readonly] {
  background: #f2f5f0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}


.app-page [hidden],
.auth-card [hidden] {
  display: none !important;
}

.button-secondary {
  border: 1px solid var(--green) !important;
  background: #fff !important;
}
app-page b
.button-secondary:hover:not(:disabled) {
  background: var(--green2) !important;
}

.text-button {
  min-height: auto !important;
  padding: 4px !important;
  background: transparent !important;
  color: var(--text-color) !important;
}

.notice {
  min-height: 1.4em;
  margin: 8px 0;
  color: #526957;
  line-height: 1.5;
}

.notice-error {
  color: #9a352c !important;
}

.hike-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.hike-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green2);
  color: var(--text-color);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hike-card:hover,
.hike-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgb(58 60 68 / 10%);
}

.hike-card h3 {
  margin: 0 0 10px;
  color: var(--primary-color);
  font-family: var(--header-font);
  font-size: 1rem;
  font-weight: 400;
}

.hike-card p {
  margin: 6px 0;
}

.connection-panel,
.timer-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green2);
}

.connection-panel h2 {
  margin-top: 0;
}

.timer-panel {
  text-align: center;
}

.timer-panel .eyebrow {
  margin-bottom: 4px;
}

.timer-value {
  margin: 4px 0;
  color: #355b43;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.5fr) 1fr;
  gap: 12px 20px;
  margin: 28px 0;
}

.detail-grid dt {
  color: #66736a;
  font-weight: 600;
}

.detail-grid dd {
  margin: 0;
  font-weight: 700;
}

@media (max-width: 600px) {
  .app-header,
  .app-main {
    width: min(100% - 32px, 960px);
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .app-main {
    padding-top: 20px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button,
  .form-actions .button-link {
    width: 100%;
  }
}

/* ========================================
   CHAT-SPECIFIC STYLES
   ======================================== */

.chat-container {
  padding: clamp(24px, 6vw, 40px);
  border: 1px solid var(--green);
  border-radius: 16px;
  background: #fff;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
  max-height: 500px;
  overflow-y: auto;
  padding-bottom: 20px;
}

.message {
  width: fit-content;
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 16px;
  line-height: 1.7;
}

.assistant-message {
  align-self: flex-start;
  background: var(--green2);
  border: 1px solid var(--green);
}

.user-message {
  align-self: flex-end;
  background: var(--secondary-accent-color);
}

.message-label {
  margin-bottom: 5px;
  font-weight: 700;
}

.message-content {
  white-space: pre-wrap;
}

.suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.suggestion {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-color);
  color: var(--text-color);
  font-family: var(--main-font);
  font-weight: 700;
  cursor: pointer;
}

.suggestion:hover,
.suggestion:focus-visible {
  background: var(--secondary-color);
}

.chat-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--green);
}

.chat-form textarea {
  flex: 1;
  min-height: 60px;
  padding: 14px 16px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--text-color);
  font-family: var(--main-font);
  font-size: 1rem;
  resize: vertical;
}

.chat-form button {
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-color);
  color: var(--text-color);
  font-family: var(--main-font);
  font-weight: 700;
  cursor: pointer;
}

.chat-form button:hover,
.chat-form button:focus-visible {
  background: var(--secondary-color);
}

.chat-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 600px) {
  .message {
    max-width: 88%;
  }

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

  .chat-form button {
    width: 100%;
  }
}



/* ========================================
   FAQ SECTION
   ======================================== */

#faq {
  padding: clamp(16px, 4vw, 32px);
}

/* Individual FAQ dropdown cards */
#faq details {
  margin-bottom: 12px;
  padding: 0;

  border: 1px solid var(--green);
  border-radius: 12px;

  background: var(--green2);
  overflow: hidden;

  transition: background-color 0.2s ease;
}

/* Clickable question */
#faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 18px 22px;

  color: var(--text-color);
  font-family: var(--main-font);
  font-size: 1.05rem;
  font-weight: 700;

  cursor: pointer;
  list-style: none;
}

/* Remove default dropdown arrow */
#faq summary::-webkit-details-marker {
  display: none;
}

/* Custom dropdown indicator */
#faq summary::after {
  content: "+";
  flex-shrink: 0;

  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 400;

  transition: transform 0.2s ease;
}

/* Change + into - when expanded */
#faq details[open] summary::after {
  content: "−";
}

/* Hover effect */
#faq details:hover {
  background: var(--green);
}

/* Expanded question */
#faq details[open] {
  background: #fff;
  border-color: var(--primary-color);
}

#faq details[open] summary {
  border-bottom: 2px solid var(--secondary-color);
}

/* Answer text */
#faq details p {
  max-width: 65ch;
  margin: 0;
  padding: 18px 22px;

  color: var(--text-color);
  font-family: var(--main-font);
  font-size: 1rem;
  line-height: 1.7;
}

/* Keyboard accessibility */
#faq summary:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: -3px;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  #faq summary {
    padding: 16px;
    font-size: 0.95rem;
  }

  #faq details p {
    padding: 16px;
    font-size: 0.95rem;
  }
}

/* ========================================
   HIKE STEP CHARTS (hike-charts.js)
   ======================================== */

.chart {
  margin: 24px 0 0;
}

.chart figcaption {
  margin-bottom: 8px;
  font-weight: 700;
}

.chart-plot {
  position: relative;
  overflow: hidden;
}

.chart-plot svg {
  display: block;
}

.chart-tooltip {
  position: absolute;
  z-index: 1;
  padding: 8px 10px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(58 60 68 / 12%);
  color: var(--text-color);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}

.chart-tooltip-head {
  font-weight: 700;
}

.chart-tooltip-flag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-swatch {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-summary {
  margin: 8px 0 0;
  font-weight: 700;
}
