/* ================================================================
   GotTrouble.org — inner article template
   Palette: rust #C4502B  orange #E8542B  maroon #6B2416
            ink #2E2A26   sand #E5E0D8    cream #FAF9F7
   ================================================================ */

:root {
  --rust:   #C4502B;
  --orange: #E8542B;
  --maroon: #6B2416;
  --ink:    #2E2A26;
  --mute:   #6B665F;
  --sand:   #E5E0D8;
  --cream:  #FAF9F7;
  --card:   #FFFFFF;
  --border: #ECE7DF;
  --shadow: 0 2px 10px rgba(46, 42, 38, 0.06);
  --radius: 14px;
  --font:   -apple-system, BlinkMacSystemFont, "Segoe UI",
            Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font: 16px/1.65 var(--font);
}

a {
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { color: var(--maroon); }


/* ----------------------------------------------------------------
   Layout wrapper
   ---------------------------------------------------------------- */

.gm-article {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}


/* ----------------------------------------------------------------
   1. Hero
   ---------------------------------------------------------------- */

.gm-hero {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
  aspect-ratio: 16 / 9;
}

.gm-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* ----------------------------------------------------------------
   2. Mama chat
   ---------------------------------------------------------------- */

.gm-mama {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 20px;
}

.gm-mama__avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rust);
}

.gm-mama__col { min-width: 0; }

.gm-mama__label {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--rust);
  font-size: 1.05em;
}

.gm-mama__bubble {
  position: relative;
  background: #F2EFEB;
  border: 1.5px solid var(--rust);
  border-radius: 16px;
  padding: 14px 18px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 10px;
}

.gm-mama__bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 22px;
  border: 10px solid transparent;
  border-right-color: var(--rust);
  border-left: 0;
}

.gm-mama__bubble::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 23px;
  border: 9px solid transparent;
  border-right-color: #F2EFEB;
  border-left: 0;
}

.gm-mama__input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid var(--rust);
  border-radius: 10px;
  padding: 4px 6px 4px 14px;
  transition: box-shadow .2s ease;
}

.gm-mama__input:focus-within {
  box-shadow: 0 0 0 3px rgba(196, 80, 43, 0.15);
}

.gm-mama__input input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  padding: 10px 2px;
  color: var(--ink);
  background: transparent;
}

.gm-mama__input button {
  border: 0;
  background: var(--rust);
  color: #FFFFFF;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .18s ease;
}

.gm-mama__input button:hover { background: var(--maroon); }


/* ----------------------------------------------------------------
   3. Audio player
   ---------------------------------------------------------------- */

.gm-audio {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  margin: 0 0 32px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.gm-audio__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05em;
}

.gm-audio__label svg { color: var(--rust); }

.gm-audio__controls {
  display: inline-flex;
  gap: 6px;
}

.gm-audio__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.gm-audio__btn:hover {
  background: var(--rust);
  color: #FFFFFF;
  border-color: var(--rust);
}

.gm-audio__btn--play {
  background: var(--rust);
  color: #FFFFFF;
  border-color: var(--rust);
}

.gm-audio__btn--play:hover { background: var(--maroon); border-color: var(--maroon); }

/* Range (seek) */
.gm-audio__seek {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 28px;
  width: 100%;
}

.gm-audio__seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--rust) var(--gm-progress, 0%),
    var(--sand) var(--gm-progress, 0%)
  );
}

.gm-audio__seek::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--sand);
}

.gm-audio__seek::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--rust);
}

.gm-audio__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--rust);
  border: 3px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.gm-audio__seek::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--rust);
  border: 3px solid #FFFFFF;
  cursor: pointer;
}

.gm-audio__time {
  font-variant-numeric: tabular-nums;
  color: var(--mute);
  font-size: 0.92em;
  white-space: nowrap;
}


/* ----------------------------------------------------------------
   4. Title / byline / body
   ---------------------------------------------------------------- */

.gm-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.gm-body { min-width: 0; }

.gm-title {
  margin: 0 0 10px;
  color: var(--rust);
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gm-byline {
  margin: 0 0 24px;
  color: var(--mute);
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.gm-byline a { font-weight: 700; color: var(--ink); }

.gm-body h2 {
  color: var(--ink);
  font-size: 1.55rem;
  margin: 36px 0 10px;
  line-height: 1.25;
  scroll-margin-top: 20px;
}

.gm-body h3 {
  color: var(--ink);
  font-size: 1.15rem;
  margin: 20px 0 8px;
  line-height: 1.3;
}

.gm-body p { margin: 0 0 14px; }

.gm-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.gm-body li {
  margin: 0 0 10px;
}

.gm-body strong { color: var(--ink); font-weight: 700; }


/* ----------------------------------------------------------------
   5. Table of Content
   ---------------------------------------------------------------- */

.gm-toc {
  position: sticky;
  top: 20px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gm-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--rust);
  color: #FFFFFF;
  border: 0;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 1.02em;
  cursor: pointer;
  text-align: left;
}

.gm-toc__header svg { transition: transform .2s ease; }

.gm-toc[data-collapsed="true"] .gm-toc__header svg {
  transform: rotate(-90deg);
}

.gm-toc[data-collapsed="true"] .gm-toc__list { display: none; }

.gm-toc__list {
  list-style: disc;
  margin: 0;
  padding: 14px 18px 18px 36px;
  max-height: 70vh;
  overflow-y: auto;
}

.gm-toc__list li {
  margin: 0 0 8px;
  color: var(--ink);
}

.gm-toc__list a {
  color: var(--ink);
  text-decoration: none;
  transition: color .15s ease;
}

.gm-toc__list a:hover,
.gm-toc__list a.is-active {
  color: var(--rust);
  font-weight: 600;
}


/* ----------------------------------------------------------------
   6. Mobile
   ---------------------------------------------------------------- */

@media (max-width: 860px) {
  .gm-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gm-toc {
    position: static;
    order: -1;
  }

  .gm-mama {
    grid-template-columns: 72px 1fr;
    gap: 14px;
  }

  .gm-mama__avatar { width: 72px; height: 72px; }

  .gm-audio {
    grid-template-columns: 1fr;
    border-radius: var(--radius);
    gap: 10px;
    padding: 14px 16px;
  }

  .gm-audio__controls { justify-content: center; }
  .gm-audio__time     { text-align: center; }
}

@media (max-width: 480px) {
  .gm-article { padding: 14px 14px 48px; }
  .gm-hero    { border-radius: 10px; }
  .gm-title   { font-size: 1.9rem; }
}


/* ----------------------------------------------------------------
   7. Full chat at the end of the article
   ---------------------------------------------------------------- */

.gm-fullchat {
  margin: 48px 0 0;
  padding: 24px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gm-fullchat h2 {
  margin: 0 0 8px;
  color: var(--rust);
  font-size: 1.45rem;
}

.gm-fullchat > p {
  margin: 0 0 16px;
  color: var(--mute);
}


/* Empty hero (no featured image) */
.gm-hero--empty {
  display: block;
  background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
}
