/* Help center: the getcleanday.com marketing world ("The Day Ribbon").
   White ground, slate ink, one purple thread down the gutter.
   Signed-in caregivers get their portal theme (layout.html sets data-theme). */

@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/young-serif.woff2') format('woff2');
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/atkinson-hyperlegible-next.woff2') format('woff2');
}

:root {
  --ground: #ffffff;
  --ground-deep: #f1eff8;
  --paper: #f5f3fa;
  --ink: #18212b;
  --ink-2: #3f4b58;
  --ink-3: #596572;
  --thread: #6b4fa8;
  --thread-deep: #4f3a82;
  --thread-track: #d3cde3;
  --rule: rgba(24, 33, 43, 0.16);
  --rule-strong: rgba(24, 33, 43, 0.34);
  --error: #a8453f;
  --error-bg: rgba(168, 69, 63, 0.08);
  --bar: #ffffff;
  --thread-bg: rgba(107, 79, 168, 0.10);
  --on-thread: #ffffff;

  --serif: 'Young Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --pad: clamp(18px, 4vw, 40px);
  --gut: clamp(40px, 9vw, 128px);
  --wrap: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Portal "Obsidian" theme (templates/portal.html :root[data-theme="obsidian"]) */
:root[data-theme="obsidian"] {
  color-scheme: dark;
  --ground: #12141b;
  --ground-deep: #1c1f28;
  --paper: #232631;
  --ink: #f3f1ec;
  --ink-2: #b0aa9c;
  --ink-3: #a39e90;
  --thread: #d9a441;
  --thread-deep: #f0be5e;
  --thread-track: rgba(255, 255, 255, 0.14);
  --rule: rgba(255, 255, 255, 0.12);
  --rule-strong: rgba(255, 255, 255, 0.28);
  --error: #d08883;
  --error-bg: rgba(208, 136, 131, 0.12);
  --bar: #1c1f28;
  --thread-bg: rgba(217, 164, 65, 0.14);
  --on-thread: #241a05;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--thread) var(--ground-deep);
  accent-color: var(--thread);
}

body {
  font-family: var(--sans);
  background: var(--ground);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--thread);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--thread);
  color: var(--on-thread);
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--thread);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}

.hp-skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  background: var(--thread);
  color: var(--on-thread);
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
}

.hp-skip:focus {
  top: 16px;
}

/* Header: same bar as the portal nav (templates/portal.html .portal-nav) -- */
.hp-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bar);
  border-bottom: 1px solid var(--thread-track);
}

.hp-header-inner {
  padding: 12px 24px;
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.hp-brand img {
  width: auto;
  height: 44px;
}

.hp-brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.hp-brand-pill {
  background: var(--thread-bg);
  color: var(--thread);
  font-size: 16px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--thread-track);
}

.hp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-nav-link,
.hp-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.hp-nav-link {
  color: var(--ink-2);
}

.hp-nav-link:hover {
  color: var(--thread);
}

/* Cold arrival: a plain way into the portal */
.hp-portal {
  background: var(--bar);
  color: var(--ink);
  border: 2px solid var(--ink-3);
  transition: background-color 0.15s, border-color 0.15s;
}

.hp-portal:hover {
  border-color: var(--thread);
}

.hp-portal svg {
  display: none;
  width: 20px;
  height: 20px;
}

/* Arrived from the portal: the way back is the main action */
.hp-portal.is-back {
  background: var(--thread);
  border-color: var(--thread);
  color: var(--on-thread);
}

.hp-portal.is-back:hover {
  background: var(--thread-deep);
  border-color: var(--thread-deep);
}

.hp-portal.is-back svg {
  display: block;
}

/* Primary action: thread purple with a swallowtail notch */
.hp-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 38px 0 22px;
  border: 0;
  border-radius: 3px;
  background: var(--thread);
  color: var(--on-thread);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.hp-btn::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 15px;
  height: 100%;
  background: var(--ground);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.hp-btn:hover {
  background: var(--thread-deep);
  transform: translateY(-2px);
}

.hp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 640px) {
  .hp-header-inner {
    min-height: 64px;
    padding: 10px 14px;
    gap: 10px;
  }

  .hp-brand img {
    height: 40px;
  }

  .hp-nav-link {
    display: none;
  }

  .hp-portal {
    min-height: 44px;
    padding: 0 14px;
    font-size: 16px;
  }
}

/* Narrow phones: the mark carries the brand, the pill names the place */
@media (max-width: 480px) {
  .hp-brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* End of article: the same way back, once the reader is done */
.hp-return {
  max-width: 44em;
  margin-top: 48px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--thread-track);
  border-radius: 16px;
}

.hp-return[hidden] {
  display: none;
}

.hp-return-title {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.hp-return p {
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .hp-return {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Layout: the thread ---------------------------------------------------- */
.hp-day {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.hp-day::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pad) + var(--gut) / 2 - 1.5px);
  width: 3px;
  background: var(--thread);
}

.hp-stop {
  position: relative;
  padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 6vw, 72px) var(--gut);
}

.hp-stop + .hp-stop {
  padding-top: 0;
}

.hp-stop::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: calc(var(--gut) / 2 - 8px);
  top: calc(clamp(40px, 6vw, 72px) + 14px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ground);
  border: 3px solid var(--thread);
}

.hp-stop + .hp-stop::before {
  top: 14px;
}

/* Index ----------------------------------------------------------------- */
.hp-title,
.hp-stop > h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}

.hp-title .hl {
  color: var(--thread);
}

.hp-lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36em;
  text-wrap: pretty;
}

.hp-section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hp-topics {
  list-style: none;
  max-width: 820px;
  border-top: 3px solid var(--ink);
}

.hp-topics li {
  border-bottom: 1px solid var(--rule-strong);
}

.hp-topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 18px 0;
  text-decoration: none;
  color: var(--ink);
}

.hp-topic-name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.3;
  transition: color 0.2s var(--ease);
}

.hp-topic-sum {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
}

.hp-topic svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--thread);
  transition: transform 0.25s var(--ease);
}

.hp-topic:hover .hp-topic-name {
  color: var(--thread);
}

.hp-topic:hover svg {
  transform: translateX(4px);
}

/* Article --------------------------------------------------------------- */
.hp-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-3);
}

.hp-crumb a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--thread);
}

.hp-crumb a:hover {
  color: var(--thread);
}

.hp-article {
  max-width: 44em;
}

.hp-article > p:first-child {
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.hp-article h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  margin: 40px 0 14px;
  padding-top: 20px;
  border-top: 3px solid var(--ink);
}

.hp-article p,
.hp-article li {
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.hp-article p + p {
  margin-top: 12px;
}

.hp-article strong {
  color: var(--ink);
  font-weight: 700;
}

.hp-article a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--thread);
}

.hp-article a:hover {
  color: var(--thread);
  text-decoration-thickness: 2px;
}

.hp-article ul {
  list-style: none;
  margin: 8px 0 16px;
}

.hp-article ul > li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
}

.hp-article ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2.5px solid var(--thread);
}

/* Numbered steps wear the ring nodes */
.hp-article ol {
  list-style: none;
  counter-reset: step;
  margin: 8px 0 16px;
}

.hp-article ol > li {
  position: relative;
  counter-increment: step;
  padding-left: 46px;
  margin-bottom: 14px;
  min-height: 30px;
}

.hp-article ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--thread);
  background: var(--ground);
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1;
  color: var(--thread);
  font-variant-numeric: lining-nums;
}

.hp-article code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink);
  background: var(--paper);
  padding: 1px 6px;
  border-radius: 3px;
}

.hp-article pre {
  margin: 12px 0;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  overflow-x: auto;
}

.hp-article pre code {
  display: block;
  padding: 0;
  background: none;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre;
}

/* Step drawings: inline sprite (help/content/art.svg), one figure per section */
.hp-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.hp-art {
  max-width: 340px;
  margin: 6px 0 18px;
}

.hp-art svg {
  width: 100%;
  height: auto;
  aspect-ratio: 240 / 170;
}

/* Wide screens: drawing beside its steps; each section clears the last */
@media (min-width: 900px) {
  .hp-article:has(.hp-art) {
    max-width: 62em;
  }

  .hp-art {
    float: right;
    width: 300px;
    margin: 4px 0 24px 40px;
  }

  .hp-article h2 {
    clear: both;
  }

  .hp-article::after {
    content: "";
    display: block;
    clear: both;
  }
}

.art-dev { fill: var(--ground); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-dev-thin { stroke-width: 2; }
.art-scr { fill: var(--paper); }
.art-ground { fill: var(--ground); }
.art-panel { fill: var(--paper); stroke: var(--rule-strong); stroke-width: 1; }
.art-field { fill: var(--ground); stroke: var(--rule-strong); stroke-width: 1.5; }
.art-field-strong { stroke: var(--ink); }
.art-board { fill: var(--ground-deep); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-port { fill: var(--ground); stroke: var(--ink); stroke-width: 1.5; }
.art-ink { fill: var(--ink); }
.art-soft { fill: var(--thread-track); }
.art-soft-dark { fill: var(--rule-strong); }
.art-thread { fill: var(--thread); }
.art-white { fill: #ffffff; }
.art-ring { stroke: var(--ground); stroke-width: 3; }
.art-faint { opacity: 0.35; }
.art-dim { fill: var(--ink); opacity: 0.6; }
.art-thread-ln { fill: none; stroke: var(--thread); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-white-ln { fill: none; stroke: #ffffff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.art-ink-ln { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.art-rule-ln { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; }
.art-thin { stroke-width: 2.2; }
.art-hair { stroke-width: 1.6; }
.art-cursor { fill: var(--ink); stroke: #ffffff; stroke-width: 1.2; stroke-linejoin: round; }
.art-mono { font-family: var(--mono); font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.art-mono-quiet { fill: var(--ink-3); }
.art-mono-thread { fill: var(--thread); }

/* Feedback -------------------------------------------------------------- */
.help-feedback {
  max-width: 44em;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 3px solid var(--ink);
}

.help-feedback[hidden],
.help-feedback [hidden] {
  display: none;
}

.help-feedback h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  margin-bottom: 4px;
}

.help-feedback label,
.help-feedback .hf-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.help-feedback select,
.help-feedback textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.help-feedback textarea {
  resize: vertical;
  line-height: 1.5;
}

.help-feedback select:focus-visible,
.help-feedback textarea:focus-visible {
  outline: 3px solid var(--thread);
  outline-offset: 2px;
}

/* Rating: a segmented pill bar, like the demo controls on getcleanday.com */
.hf-rating {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--ground);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.hf-rating button {
  min-width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.hf-rating button:hover {
  background: var(--ground-deep);
}

.hf-rating button[aria-pressed="true"] {
  background: var(--thread);
  color: var(--on-thread);
}

.hf-counter {
  margin-top: 6px;
  text-align: right;
  font-size: 0.9rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.hf-submit {
  margin-top: 16px;
  height: 52px;
  padding: 0 42px 0 28px;
  font-size: 1.05rem;
}

.hf-msg {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 3px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
}

.hf-error {
  border-color: var(--error);
  background: var(--error-bg);
}

/* Footer ---------------------------------------------------------------- */
.hp-footer {
  background: var(--ground-deep);
  padding: 28px 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.hp-footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.hp-footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--thread);
}

.hp-footer a:hover {
  color: var(--thread);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
