:root {
  --ink: #171b23;
  --ink-soft: #545c69;
  --navy: #121a28;
  --navy-soft: #1a2638;
  --blue: #2187dc;
  --blue-dark: #1768a8;
  --blue-pale: #eaf5ff;
  --line: #dfe3e8;
  --line-soft: #edf0f3;
  --canvas: #f3f5f8;
  --white: #fff;
  --header-width: 1180px;
  --article-width: 1040px;
  --copy-width: 800px;
  --media-width: 700px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 0.15em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.help-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
}

.help-header__inner {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 600px) 1fr;
  gap: 2rem;
  align-items: center;
  width: min(100%, var(--header-width));
  min-height: 104px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.7rem;
  min-height: 44px;
  color: inherit;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand small {
  display: block;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.help-search {
  position: relative;
  min-width: 0;
  width: 100%;
}

.help-search svg {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 19px;
  height: 19px;
  color: #596273;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transform: translateY(-50%);
  pointer-events: none;
}

.help-search input {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1rem 0.7rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  color: var(--ink);
  font: inherit;
}

.help-search input::placeholder {
  color: #6c7480;
}

.header-balance {
  min-width: 1px;
}

.article-main,
.home-main {
  width: min(100%, var(--article-width));
  margin: 0 auto;
  padding: 3rem 1.5rem 7rem;
  scroll-margin-top: 7.5rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  margin: 0 0 2rem;
  padding: 0;
  color: #6c7480;
  font-size: 0.82rem;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.55rem;
  color: #a6adb6;
}

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

.breadcrumbs a:hover {
  color: var(--blue-dark);
}

.article-copy {
  width: min(100%, var(--copy-width));
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 1rem;
  font-size: clamp(2.45rem, 5vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.summary {
  max-width: 49rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.14rem;
  line-height: 1.68;
}

.article-intro {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.concept-body {
  width: min(100%, 70ch);
  margin-top: 1.75rem;
}

.concept-section + .concept-section {
  margin-top: 3.25rem;
}

.concept-section h2 {
  margin-bottom: 1rem;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.concept-section p {
  margin-bottom: 1rem;
}

.concept-section p:last-child {
  margin-bottom: 0;
}

.export-prerequisite-note {
  width: min(100%, var(--copy-width));
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid #d8ad4f;
  border-radius: 0 10px 10px 0;
  background: #fffaf0;
}

.export-prerequisite-note p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

.export-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.1rem 0 1rem;
}

.export-source-card {
  min-width: 0;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid #e4e7eb;
  border-radius: 16px;
  background: var(--canvas);
}

.export-source-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.export-source-card .steps {
  margin-top: 1rem;
  padding-left: 1.4rem;
}

.export-source-card .steps > li {
  padding-left: 0.15rem;
  font-size: 1rem;
  line-height: 1.55;
}

.export-source-card .steps > li + li {
  margin-top: 1rem;
}

.export-source-card .step-text {
  margin-bottom: 0;
}

.set-type-list {
  overflow: hidden;
  margin: 1.4rem 0 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.set-type-row {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
}

.set-type-row + .set-type-row {
  border-top: 1px solid var(--line-soft);
}

.set-type-row dt {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  font-weight: 700;
}

.set-type-row dd {
  margin: 0;
  color: var(--ink-soft);
}

.set-type-marker {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1;
}

.set-type-marker--warmup {
  background: #fff2d6;
  color: #855000;
}

.set-type-marker--normal {
  background: #edf0f3;
  color: var(--ink);
}

.set-type-marker--failure {
  background: #ffe9e9;
  color: #9c3838;
}

.set-type-marker--drop {
  background: #f4eafa;
  color: #714386;
}

.set-type-marker--cooldown {
  background: var(--blue-pale);
  color: var(--blue-dark);
}

.ui-detail-media {
  width: min(100%, 32rem);
  margin: 1.5rem auto 1.25rem;
}

.ui-detail-crop {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.18;
  border: 1px solid #2f3743;
  border-radius: 18px;
  background: #080c12;
  box-shadow: 0 14px 30px rgba(18, 24, 33, 0.16);
}

.ui-detail-crop img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-11%);
}

.steps {
  width: min(100%, var(--copy-width));
  margin: 1.75rem 0 0;
  padding-left: 1.6rem;
}

.steps > li {
  padding-left: 0.35rem;
  font-size: 1.2rem;
  line-height: 1.65;
}

.steps > li + li {
  margin-top: 3.25rem;
}

.steps--compact > li + li {
  margin-top: 1.5rem;
}

.steps--tight > li + li {
  margin-top: 0.75rem;
}

.steps--tight .step-text {
  margin-bottom: 0;
}

.steps--continued {
  margin-top: 2rem;
}

.step-details {
  margin: -0.35rem 0 0;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
}

.step-details > li + li {
  margin-top: 0.5rem;
}

.steps + .section-result {
  margin-top: 1.75rem;
}

.steps > li::marker {
  font-weight: 650;
}

.step-text {
  margin-bottom: 1.25rem;
}

.media-panel {
  display: grid;
  place-items: center;
  width: min(100%, var(--media-width));
  margin: 1.25rem 0 0;
  padding: 2rem 1.25rem;
  border: 1px solid #e4e7eb;
  border-radius: 18px;
  background: var(--canvas);
}

.phone-frame {
  position: relative;
  width: min(300px, 100%);
  padding: 7px;
  border: 1px solid #4b515b;
  border-radius: 51px;
  background: linear-gradient(145deg, #313741 0%, #080a0d 35%, #262c34 100%);
  box-shadow: 0 18px 34px rgba(18, 24, 33, 0.22), 0 2px 6px rgba(18, 24, 33, 0.28);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 44px;
  background: #080c12;
}

.phone-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.workflow-panel {
  display: block;
  padding: 2rem;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.workflow-shot {
  display: grid;
  justify-items: center;
  min-width: 0;
  margin: 0;
}

.workflow-shot .phone-frame {
  width: min(250px, 100%);
}

.workflow-panel + .concept-section {
  margin-top: 3.25rem;
}

.phone-frame.phone-frame--android {
  border-radius: 24px;
}

.phone-frame--android .phone-screen {
  border-radius: 16px;
}

.workflow-callout {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 0 10px rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.workflow-callout--manage-muscles {
  top: 40.61785%;
  left: 2.48756%;
  width: 95.02488%;
  height: 10.29748%;
  border-radius: 10px;
}

.workflow-callout--create-muscle-header {
  top: 6.63616%;
  left: 70.39801%;
  width: 28.60697%;
  height: 5.94966%;
  border-radius: 10px;
}

.workflow-callout--manage {
  top: 31.69336%;
  left: 2.48756%;
  width: 95.02488%;
  height: 10.29748%;
  border-radius: 10px;
}

.workflow-callout--create-exercise-header {
  top: 6.63616%;
  left: 70.39801%;
  width: 28.60697%;
  height: 5.94966%;
  border-radius: 10px;
}

.workflow-callout--add-routine-row {
  top: 42.79%;
  left: 3.98%;
  width: 92.04%;
  height: 5.49%;
  border-radius: 10px;
}

.workflow-callout--new-program {
  top: 20.37%;
  left: 85.07%;
  width: 11.94%;
  height: 5.49%;
  border-radius: 50%;
}

.workflow-callout--rpe-tracking {
  top: 46.9%;
  left: 3.98%;
  width: 92.04%;
  height: 9.1%;
  border-radius: 10px;
}

.workflow-callout--rpe-cell {
  top: 24.7%;
  left: 74%;
  width: 12%;
  height: 4.7%;
  border-radius: 10px;
}

.workflow-callout--saved-routine {
  top: 32.27%;
  left: 2.99%;
  width: 94.03%;
  height: 11.9%;
  border-radius: 10px;
}

.workflow-callout--completed-set {
  top: 24.6%;
  left: 84.6%;
  width: 10%;
  height: 4.58%;
  border-radius: 8px;
}

.workflow-callout--default-timer {
  top: 40.96%;
  left: 3.98%;
  width: 92.04%;
  height: 8.35%;
  border-radius: 10px;
}

.workflow-callout--exercise-timer {
  top: 14.95%;
  left: 65.5%;
  width: 18.5%;
  height: 4.2%;
  border-radius: 14px;
}

.workflow-callout--workout-note {
  top: 6.636%;
  left: 50.249%;
  width: 13.93%;
  height: 5.95%;
  border-radius: 16px;
}

.workflow-callout--workout-complete-add-note {
  top: 48.513%;
  left: 2.985%;
  width: 94.03%;
  height: 7.78%;
  border-radius: 12px;
}

.workflow-callout--history-note-preview {
  top: 26.43%;
  left: 6.965%;
  width: 54.726%;
  height: 2.746%;
  border-radius: 8px;
}

.workflow-callout--workout-detail-note {
  top: 32.037%;
  left: 2.985%;
  width: 94.03%;
  height: 6.407%;
  border-radius: 12px;
}

.workflow-callout--import-entry {
  top: 12.46%;
  left: 3.15%;
  width: 93.7%;
  height: 10.75%;
  border-radius: 12px;
}

.rpe-scale-list {
  overflow: hidden;
  margin: 1.4rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.rpe-scale-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 0.9rem 1.25rem;
}

.rpe-scale-row + .rpe-scale-row {
  border-top: 1px solid var(--line-soft);
}

.rpe-scale-row dt {
  font-weight: 700;
}

.rpe-scale-row dd {
  margin: 0;
  color: var(--ink-soft);
}

.rpe-scale-note {
  color: var(--ink-soft);
}

.tap-highlight {
  position: absolute;
  top: 30.55%;
  left: 3.3%;
  width: 11%;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18), 0 0 18px rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.article-end {
  width: min(100%, var(--copy-width));
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.related-help {
  width: min(100%, var(--copy-width));
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.related-help h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  line-height: 1.3;
}

.related-help__link {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.related-help__link:hover {
  border-color: #a8cdec;
  color: var(--blue-dark);
  background: #fbfdff;
}

.related-help__links {
  display: grid;
  gap: 0.75rem;
}

.related-help + .article-end {
  margin-top: 2rem;
}

.support-note {
  margin: 0;
  color: var(--ink-soft);
  text-align: center;
}

.help-header__inner--home {
  display: flex;
  justify-content: space-between;
  min-height: 76px;
}

.help-header__website {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #d4deeb;
  font-size: 0.9rem;
  white-space: nowrap;
}

.help-header__website:hover {
  color: #fff;
  text-decoration: underline;
}

.help-header__website:focus-visible {
  outline: 2px solid #8ed2ff;
  outline-offset: 4px;
}

.home-main {
  padding-top: 4.8rem;
}

.home-hero {
  max-width: 780px;
  margin: 0 auto 4.8rem;
  text-align: center;
}

.home-hero h1 {
  max-width: none;
  margin-bottom: 1.8rem;
  font-size: clamp(2.8rem, 5.5vw, 4.1rem);
}

.home-search {
  max-width: 760px;
  margin: 0 auto;
}

.home-search input {
  border-color: rgba(18, 26, 40, 0.12);
}

.home-topic-index h2 {
  margin-bottom: 1.8rem;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem 4.5rem;
}

.home-topic-group h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.home-topic-link {
  display: block;
  padding: 0.34rem 0;
  color: #353b46;
  font-size: 0.9rem;
  text-decoration: none;
}

.home-topic-link:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-support-callout {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 5rem;
  padding: 2.2rem 2.4rem;
  border-radius: 20px;
  background: var(--blue-pale);
}

.home-support-callout h2 {
  margin-bottom: 0.35rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.home-support-callout p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.home-support-callout a {
  flex: 0 0 auto;
  padding: 0.8rem 1.1rem;
  border-radius: 11px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 720;
  text-decoration: none;
}

.home-support-callout a:hover {
  background: var(--navy-soft);
  color: var(--white);
}

.search-results-status {
  margin-top: 1rem;
  color: var(--ink-soft);
}

@media (max-width: 960px) {
  .help-header__inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
  }

  .header-balance {
    display: none;
  }

  .home-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .help-header__inner {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
    padding: 1rem;
  }

  .help-search {
    grid-row: 2;
  }

  .header-balance {
    display: none;
  }

  .article-main,
  .home-main {
    padding: 2rem 1rem 5rem;
    scroll-margin-top: 10rem;
  }

  .home-main {
    padding-top: 3rem;
  }

  .home-hero {
    margin-bottom: 3.6rem;
    text-align: left;
  }

  .home-hero h1 {
    margin-bottom: 1.4rem;
  }

  .home-topic-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .home-support-callout {
    display: block;
    margin-top: 3.5rem;
    padding: 1.5rem;
  }

  .home-support-callout a {
    display: inline-block;
    margin-top: 1.2rem;
  }

  .breadcrumbs {
    margin-bottom: 1.65rem;
  }

  h1 {
    font-size: clamp(2.25rem, 10.5vw, 3rem);
  }

  .summary {
    font-size: 1.05rem;
  }

  .article-intro {
    padding-bottom: 1.5rem;
  }

  .concept-body {
    margin-top: 1.5rem;
  }

  .concept-section + .concept-section {
    margin-top: 2.6rem;
  }

  .concept-section h2 {
    font-size: 1.5rem;
  }

  .export-prerequisite-note {
    padding: 0.75rem 0.85rem;
  }

  .export-source-grid {
    grid-template-columns: 1fr;
  }

  .export-source-card {
    padding: 1.1rem 1rem 1.2rem;
  }

  .set-type-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1rem;
  }

  .ui-detail-media {
    margin-top: 1.25rem;
  }

  .ui-detail-crop {
    border-radius: 14px;
  }

  .steps {
    margin-top: 1.5rem;
    padding-left: 1.35rem;
  }

  .steps > li {
    padding-left: 0.15rem;
    font-size: 1.08rem;
  }

  .steps > li + li {
    margin-top: 2.5rem;
  }

  .steps--compact > li + li {
    margin-top: 1.25rem;
  }

  .steps--tight > li + li {
    margin-top: 0.65rem;
  }

  .steps + .section-result {
    margin-top: 1.5rem;
  }

  .media-panel {
    padding: 1.25rem 0.75rem;
    border-radius: 14px;
  }

  .workflow-panel {
    padding: 1.25rem 0.75rem;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .workflow-shot .phone-frame {
    width: min(260px, 100%);
  }

  .workflow-panel + .concept-section {
    margin-top: 2.6rem;
  }

  .phone-frame {
    width: min(286px, 100%);
    padding: 6px;
    border-radius: 46px;
  }

  .phone-screen {
    border-radius: 40px;
  }

  .article-end {
    margin-top: 3.5rem;
  }

  .related-help {
    margin-top: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
