/* Fitness Moves tools: the calculators, the interval timer and the starter-plan quiz.
   Same look as the rest of the site: black, iron, signal red and chalk. Anton for big things, Barlow for words.
   Square corners and clipped-corner buttons. The colours and fonts come from the shared site files
   (site-layout.css); the values after the commas are only a safety net.
   Every rule starts with the same long beginning on purpose, so the page's general text styles never win over it. */

.fm-tools {
  --t-black: var(--fm-black, #0a0a0a);
  --t-iron: var(--fm-iron, #2b2d2f);
  --t-red: var(--fm-red, #dc0600);
  --t-chalk: var(--fm-chalk, #f2f2ee);
  --t-steel: var(--fm-steel, #a3a6a9);
  --t-muted: var(--fm-muted, #55585b);
  --t-rule: var(--fm-rule, rgba(10, 10, 10, .28));
  --t-display: var(--fm-display, "Anton", "Arial Narrow", Impact, sans-serif);
  --t-body: var(--fm-body, "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif);
  --t-ease: var(--fm-ease, cubic-bezier(.2, .8, .2, 1));
  color: var(--t-iron);
  font: 400 1.0625rem/1.6 var(--t-body);
}
.fm-tools [hidden] { display: none !important; }
body.fm-site .entry-content .fm-tools :focus-visible { outline: 3px solid var(--t-black); outline-offset: 3px; }

/* The theme's own page title is replaced by the title strip below, so the page never shows two titles. */
body.fm-site .entry-content-wrap:has(.fm-tool-head) > .entry-header,
body.fm-site:has(.fm-tool-head) .entry-hero { display: none; }
body.fm-site .entry-content-wrap:has(.fm-tool-head) > .entry-content { margin-top: 0; }

/* ---------- Title strip: a black band with the way back, the title and one line about the tool ---------- */
body.fm-site .entry-content .fm-tools .fm-tool-head {
  position: relative;
  margin: 0 0 clamp(32px, 5vw, 64px);
  padding: clamp(36px, 5.5vw, 80px) 0 clamp(28px, 4vw, 56px);
  color: var(--t-chalk);
  isolation: isolate;
}
/* The black stretches from one edge of the screen to the other, behind the text. */
body.fm-site .entry-content .fm-tools .fm-tool-head::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--t-black); }
body.fm-site .entry-content .fm-tools .fm-tool-head::before { content: ""; display: block; width: 72px; height: 8px; margin-bottom: clamp(18px, 2.4vw, 30px); background: var(--t-red); }
body.fm-site .entry-content .fm-tools .fm-tool-head :focus-visible { outline-color: var(--t-chalk); }
body.fm-site .entry-content .fm-tools .fm-tools-path { margin: 0 0 18px; color: var(--t-steel); font: 700 .85rem/1.2 var(--t-body); letter-spacing: .16em; text-transform: uppercase; }
body.fm-site .entry-content .fm-tools .fm-tools-path a {
  padding-bottom: 4px;
  color: var(--t-chalk);
  text-decoration: none;
  background: linear-gradient(var(--t-red), var(--t-red)) 0 100% / 0 3px no-repeat;
  transition: background-size .3s var(--t-ease);
}
body.fm-site .entry-content .fm-tools .fm-tools-path a:is(:hover, :focus-visible) { background-size: 100% 3px; }
body.fm-site .entry-content .fm-tools .fm-tools-path span { margin-inline: .6em; color: var(--t-red); }
body.fm-site .entry-content .fm-tools .fm-tool-title {
  max-width: 22ch;
  margin: 0;
  color: var(--t-chalk);
  font: 400 clamp(2.4rem, 5.2vw, 4.75rem)/1 var(--t-display);
  letter-spacing: .005em;
  text-transform: uppercase;
  text-wrap: balance;
}
body.fm-site .entry-content .fm-tools .fm-tools-intro { max-width: 56ch; margin: clamp(16px, 2vw, 24px) 0 0; color: var(--t-steel); font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; }

/* ---------- The workspace: a black panel with the fields, the buttons and the result ---------- */
body.fm-site .entry-content .fm-tools .fm-tool-workspace {
  max-width: 980px;
  padding: clamp(20px, 3.6vw, 48px);
  border-top: 8px solid var(--t-red);
  background: var(--t-black);
  color: var(--t-chalk);
}
body.fm-site .entry-content .fm-tools .fm-tool-workspace :focus-visible { outline-color: var(--t-chalk); }
body.fm-site .entry-content .fm-tools .fm-tool-safety { max-width: 66ch; margin: 0 0 24px; padding-left: 16px; border-left: 4px solid var(--t-red); color: var(--t-chalk); font-size: .98rem; line-height: 1.5; }
body.fm-site .entry-content .fm-tools .fm-tool-quiz-progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 0 0 24px;
  border: 0;
  background: var(--t-iron);
  color: var(--t-red);
  accent-color: var(--t-red);
  -webkit-appearance: none;
  appearance: none;
}
body.fm-site .entry-content .fm-tools .fm-tool-quiz-progress::-webkit-progress-bar { background: var(--t-iron); }
body.fm-site .entry-content .fm-tools .fm-tool-quiz-progress::-webkit-progress-value { background: var(--t-red); }
body.fm-site .entry-content .fm-tools .fm-tool-quiz-progress::-moz-progress-bar { background: var(--t-red); }

body.fm-site .entry-content .fm-tools .fm-tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px clamp(16px, 2.4vw, 32px); }
body.fm-site .entry-content .fm-tools[data-fm-tool="starter-plan-quiz"] .fm-tool-fields { grid-template-columns: minmax(0, 1fr); }
body.fm-site .entry-content .fm-tools .fm-tool-field {
  --f-label: var(--t-chalk);
  --f-line: var(--t-chalk);
  --f-bg: var(--t-chalk);
  --f-fg: var(--t-black);
  display: grid;
  min-width: 0;
  gap: 8px;
  align-content: start;
}
body.fm-site .entry-content .fm-tools .fm-tool-follow-up .fm-tool-field { --f-label: var(--t-black); --f-line: var(--t-black); }
body.fm-site .entry-content .fm-tools .fm-tool-field label { color: var(--f-label); font: 700 .85rem/1.25 var(--t-body); letter-spacing: .12em; text-transform: uppercase; }
body.fm-site .entry-content .fm-tools .fm-tool-field :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 10px 14px;
  border: 2px solid var(--f-line);
  border-radius: 0;
  background-color: var(--f-bg);
  color: var(--f-fg);
  font: 500 1.1rem/1.3 var(--t-body);
  box-shadow: none;
}
body.fm-site .entry-content .fm-tools .fm-tool-field select {
  padding-right: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%230a0a0a' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 10px;
  -webkit-appearance: none;
  appearance: none;
}
body.fm-site .entry-content .fm-tools .fm-tool-field input::placeholder { color: var(--t-muted); opacity: 1; }
body.fm-site .entry-content .fm-tools .fm-tool-field :is(input, select):disabled { opacity: .55; }

/* Buttons. The main one is red with clipped corners and fills from the bottom; the others are plain words with a red line. */
body.fm-site .entry-content .fm-tools .fm-tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
body.fm-site .entry-content .fm-tools .fm-tool-actions :is(a, button) {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  margin: 0;
  padding: 12px 2px 10px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--t-chalk);
  font: 700 1rem/1.1 var(--t-body);
  letter-spacing: .1em;
  justify-content: flex-start;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 0 var(--t-red);
  cursor: pointer;
  transition: box-shadow .25s var(--t-ease), color .2s;
}
body.fm-site .entry-content .fm-tools .fm-tool-actions :is(a, button):is(:hover, :focus-visible) { box-shadow: inset 0 -6px 0 var(--t-red); }
body.fm-site .entry-content .fm-tools .fm-tool-actions button[type="submit"] {
  padding: 12px 30px;
  justify-content: center;
  text-align: center;
  background-color: var(--t-red);
  background-image: linear-gradient(var(--t-chalk), var(--t-chalk));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0;
  font-size: 1.1rem;
  box-shadow: none;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background-size .38s var(--t-ease), color .25s;
}
body.fm-site .entry-content .fm-tools .fm-tool-actions button[type="submit"]:is(:hover, :focus-visible) { background-size: 100% 100%; box-shadow: none; color: var(--t-black); }
body.fm-site .entry-content .fm-tools .fm-tool-actions button[type="submit"]:focus-visible { outline: 0; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
body.fm-site .entry-content .fm-tools .fm-tool-actions button:disabled { opacity: .5; cursor: default; box-shadow: none; }
body.fm-site .entry-content .fm-tools .fm-tool-actions button[type="submit"]:disabled { background-size: 100% 0; color: var(--t-chalk); }
body.fm-site .entry-content .fm-tools .fm-tool-save-status { margin: 12px 0 0; color: var(--t-steel); }
body.fm-site .entry-content .fm-tools .fm-tool-save-status:empty { margin: 0; }
body.fm-site .entry-content .fm-tools .fm-tool-error { margin-top: 22px; padding: 14px 16px; border-left: 6px solid var(--t-red); background: var(--t-iron); color: var(--t-chalk); font-weight: 700; }

/* The answer: a chalk card with a red bar and a big number. */
body.fm-site .entry-content .fm-tools .fm-tool-result { margin-top: 30px; padding: clamp(18px, 3vw, 34px); border-top: 8px solid var(--t-red); background: var(--t-chalk); color: var(--t-black); }
body.fm-site .entry-content .fm-tools .fm-tool-result h2 { margin: 0; color: inherit; font: 400 clamp(2.2rem, 5.2vw, 4rem)/1 var(--t-display); letter-spacing: .005em; text-transform: uppercase; overflow-wrap: anywhere; }
body.fm-site .entry-content .fm-tools .fm-tool-result p { max-width: 62ch; margin: 12px 0 0; color: var(--t-iron); }
body.fm-site .entry-content .fm-tools .fm-tool-result table { width: 100%; margin: 22px 0 0; border-collapse: collapse; table-layout: fixed; font-size: 1rem; line-height: 1.4; }
body.fm-site .entry-content .fm-tools .fm-tool-result :is(th, td) {
  padding: 10px 12px 10px 0;
  border: 0;
  border-bottom: 1px solid var(--t-rule);
  background: none;
  color: var(--t-black);
  font: 500 1rem/1.4 var(--t-body);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  vertical-align: top;
  overflow-wrap: anywhere;
}
body.fm-site .entry-content .fm-tools .fm-tool-result thead th { border-bottom: 3px solid var(--t-black); font: 700 .8rem/1.2 var(--t-body); letter-spacing: .12em; text-transform: uppercase; }
body.fm-site .entry-content .fm-tools .fm-tool-result tbody th { font-weight: 700; }

/* Interval timer: red while you work, dark while you rest. */
body.fm-site .entry-content .fm-tools .fm-timer-clock { display: block; margin-top: 6px; color: inherit; font: 400 clamp(4rem, 14vw, 8rem)/1 var(--t-display); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
body.fm-site .entry-content .fm-tools .fm-tool-result[data-phase="work"] { border-top-color: var(--t-chalk); background: var(--t-red); color: var(--t-chalk); }
body.fm-site .entry-content .fm-tools .fm-tool-result[data-phase="rest"] { border-top-color: var(--t-steel); background: var(--t-iron); color: var(--t-chalk); }
body.fm-site .entry-content .fm-tools .fm-tool-result:is([data-phase="work"], [data-phase="rest"]) p { color: inherit; }
body.fm-site .entry-content .fm-tools .fm-tool-workspace:fullscreen { display: grid; justify-content: center; align-content: center; max-width: none; padding: clamp(16px, 4vw, 48px); overflow: auto; background: var(--t-black); }
body.fm-site .entry-content .fm-tools .fm-tool-workspace:fullscreen .fm-tool-form { display: none; }
body.fm-site .entry-content .fm-tools .fm-tool-workspace:fullscreen .fm-tool-result { min-width: min(92vw, 900px); text-align: center; }
body.fm-site .entry-content .fm-tools .fm-tool-workspace:fullscreen .fm-timer-clock { font-size: clamp(6rem, 22vw, 16rem); }

/* "Make it yours" and the tips that appear under it. */
body.fm-site .entry-content .fm-tools .fm-tool-follow-up { max-width: 980px; margin-top: 28px; padding: 0 0 20px; border-top: 4px solid var(--t-black); border-bottom: 1px solid var(--t-rule); }
body.fm-site .entry-content .fm-tools .fm-tool-follow-up summary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  color: var(--t-black);
  font: 700 1rem/1.2 var(--t-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
body.fm-site .entry-content .fm-tools .fm-tool-follow-up summary::-webkit-details-marker { display: none; }
body.fm-site .entry-content .fm-tools .fm-tool-follow-up summary::after { content: "+"; color: var(--t-red); font: 700 1.9rem/1 var(--t-body); }
body.fm-site .entry-content .fm-tools .fm-tool-follow-up[open] summary::after { content: "\2212"; }
body.fm-site .entry-content .fm-tools .fm-tool-follow-up > p { margin: 18px 0 0; }
body.fm-site .entry-content .fm-tools .fm-tool-tips { margin: 20px 0 0; padding: 0; list-style: none; }
body.fm-site .entry-content .fm-tools .fm-tool-tips li { position: relative; margin: 0 0 10px; padding-left: 26px; }
body.fm-site .entry-content .fm-tools .fm-tool-tips li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--t-red); }

/* ---------- Reading part under the tool: how it works, questions, sources ---------- */
body.fm-site .entry-content .fm-tools .fm-tool-guide { max-width: 75ch; margin-top: clamp(40px, 6vw, 80px); }
body.fm-site .entry-content .fm-tools .fm-tool-guide section { margin: 0; padding: 28px 0 clamp(28px, 4vw, 44px); border: 0; border-top: 4px solid var(--t-black); }
body.fm-site .entry-content .fm-tools .fm-tool-guide h2 { margin: 0 0 18px; color: var(--t-black); font: 400 clamp(2rem, 3.6vw, 3rem)/1.04 var(--t-display); letter-spacing: .005em; text-transform: uppercase; }
body.fm-site .entry-content .fm-tools .fm-tool-guide h3 { margin: 28px 0 8px; color: var(--t-black); font: 400 clamp(1.4rem, 2.2vw, 1.8rem)/1.1 var(--t-display); letter-spacing: .005em; text-transform: uppercase; }
body.fm-site .entry-content .fm-tools .fm-tool-guide p { margin: 0 0 1em; }
body.fm-site .entry-content .fm-tools .fm-tool-guide a:not(.fm-tools-widget) { color: inherit; text-decoration: underline; text-decoration-color: var(--t-red); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-thickness .2s; }
body.fm-site .entry-content .fm-tools .fm-tool-guide a:not(.fm-tools-widget):hover { text-decoration-color: currentColor; text-decoration-thickness: 4px; }
body.fm-site .entry-content .fm-tools .fm-tool-guide ul { margin: 0 0 1em; padding-left: 1.3em; list-style: square; }
body.fm-site .entry-content .fm-tools .fm-tool-guide li { margin: .35em 0; padding-left: .2em; }
body.fm-site .entry-content .fm-tools .fm-tool-guide li::marker { color: var(--t-red); }
body.fm-site .entry-content .fm-tools .fm-tool-guide details { margin: 0; border-bottom: 1px solid var(--t-rule); }
body.fm-site .entry-content .fm-tools .fm-tool-guide details:first-of-type { border-top: 1px solid var(--t-rule); }
body.fm-site .entry-content .fm-tools .fm-tool-guide summary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 0;
  color: var(--t-black);
  font: 700 1.1rem/1.3 var(--t-body);
  cursor: pointer;
  list-style: none;
}
body.fm-site .entry-content .fm-tools .fm-tool-guide summary::-webkit-details-marker { display: none; }
body.fm-site .entry-content .fm-tools .fm-tool-guide summary::after { content: "+"; flex: none; color: var(--t-red); font: 700 1.9rem/1 var(--t-body); }
body.fm-site .entry-content .fm-tools .fm-tool-guide details[open] summary::after { content: "\2212"; }
body.fm-site .entry-content .fm-tools .fm-tool-guide details p { margin: 0 0 16px; }
body.fm-site .entry-content .fm-tools .fm-tool-guide .fm-tools-grid { grid-template-columns: minmax(0, 1fr); }

/* ---------- The Tools page: a list of every tool, grouped ---------- */
body.fm-site .entry-content .fm-tools .fm-tools-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(18px, 3vw, 36px);
  margin: 0 0 clamp(8px, 2vw, 24px);
  padding: 6px 0;
  border-top: 4px solid var(--t-black);
  border-bottom: 1px solid var(--t-rule);
}
body.fm-site .entry-content .fm-tools .fm-tools-index a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--t-black);
  font: 700 .95rem/1 var(--t-body);
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
body.fm-site .entry-content .fm-tools .fm-tools-index a::before { content: ""; width: 10px; height: 10px; background: var(--t-red); }
body.fm-site .entry-content .fm-tools .fm-tools-index a:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-color: var(--t-red); text-decoration-thickness: 3px; text-underline-offset: 6px; }
body.fm-site .entry-content .fm-tools .fm-tools-group {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
  gap: 16px clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--t-rule);
  scroll-margin-top: 96px;
}
body.fm-site .entry-content .fm-tools .fm-tools-group:last-child { border-bottom: 0; }
body.fm-site .entry-content .fm-tools .fm-tools-group > h2 { margin: 0; color: var(--t-black); font: 400 clamp(1.8rem, 3vw, 2.6rem)/1.04 var(--t-display); letter-spacing: .005em; text-transform: uppercase; }
body.fm-site .entry-content .fm-tools .fm-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); align-content: start; }
body.fm-site .entry-content .fm-tools a.fm-tools-widget {
  position: relative;
  display: block;
  min-width: 0;
  padding: 18px 44px 22px 0;
  border-top: 1px solid var(--t-rule);
  color: var(--t-black);
  text-decoration: none;
  scroll-margin-top: 96px;
}
body.fm-site .entry-content .fm-tools a.fm-tools-widget::after { content: "\2192"; position: absolute; top: 16px; right: 4px; color: var(--t-black); font: 700 1.5rem/1 var(--t-body); transition: transform .3s var(--t-ease), color .2s; }
body.fm-site .entry-content .fm-tools a.fm-tools-widget:is(:hover, :focus-visible)::after { color: var(--t-red); transform: translateX(6px); }
body.fm-site .entry-content .fm-tools .fm-tools-widget h3 {
  display: inline;
  margin: 0;
  padding-bottom: 2px;
  color: var(--t-black);
  font: 400 clamp(1.4rem, 2vw, 1.75rem)/1.2 var(--t-display);
  letter-spacing: .005em;
  text-transform: uppercase;
  background: linear-gradient(var(--t-red), var(--t-red)) 0 100% / 0 3px no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size .35s var(--t-ease);
}
body.fm-site .entry-content .fm-tools a.fm-tools-widget:is(:hover, :focus-visible) h3 { background-size: 100% 3px; }
body.fm-site .entry-content .fm-tools .fm-tools-widget p { margin: 10px 0 0; color: var(--t-muted); font-size: 1rem; line-height: 1.45; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
  body.fm-site .entry-content .fm-tools .fm-tools-group { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 24px; }
}
@media (max-width: 600px) {
  body.fm-site .entry-content .fm-tools :is(.fm-tools-grid, .fm-tool-fields) { grid-template-columns: minmax(0, 1fr); }
  body.fm-site .entry-content .fm-tools .fm-tool-workspace { padding: 20px 16px 24px; }
  body.fm-site .entry-content .fm-tools .fm-tool-actions button[type="submit"] { flex: 1 1 100%; }
  body.fm-site .entry-content .fm-tools .fm-tool-result :is(th, td) { padding-block: 8px; font-size: .95rem; }
  body.fm-site .entry-content .fm-tools .fm-tools-index { gap: 0 20px; }
}

/* ---------- Printing a result: just the title and the answer, black on white ---------- */
body > .fm-print-result { display: none; }
@media print {
  body:has(> .fm-print-result) > :not(.fm-print-result) { display: none !important; }
  body > .fm-print-result { display: block; background: #fff; color: #000; font: 400 12pt/1.5 var(--fm-body, "Barlow", Arial, sans-serif); }
  body > .fm-print-result h1 { margin: 0 0 14pt; color: #000; font: 400 28pt/1 var(--fm-display, "Anton", Impact, sans-serif); letter-spacing: 0; text-transform: uppercase; }
  body > .fm-print-result .fm-tool-result { margin: 0; padding: 12pt 0 0; border: 0; border-top: 4pt solid #000; background: #fff; color: #000; }
  body > .fm-print-result .fm-tool-result h2 { color: #000; font: 400 30pt/1 var(--fm-display, "Anton", Impact, sans-serif); text-transform: uppercase; }
  body > .fm-print-result .fm-tool-result p { color: #000; }
  body > .fm-print-result table { width: 100%; margin-top: 12pt; border-collapse: collapse; }
  body > .fm-print-result :is(th, td) { padding: 5pt 8pt 5pt 0; border-bottom: .75pt solid #000; color: #000; text-align: left; }
  body > .fm-print-result thead th { border-bottom: 2pt solid #000; }
}

@media (prefers-reduced-motion: reduce) {
  body.fm-site .entry-content .fm-tools :is(.fm-tool-actions button, a.fm-tools-widget, a.fm-tools-widget::after, .fm-tools-widget h3, .fm-tools-path a) { transition: none; }
}
