/* Prism Folio — help center only. No atlas-meter / prior Appily help patterns. */

:root {
  --fh-ink: #1B2A4A;
  --fh-mute: #5F6E86;
  --fh-paper: #F0F4F8;
  --fh-panel: #FFFFFF;
  --fh-flame: #FF6B35;
  --fh-navy: #1B2A4A;
  --fh-sage: #5B8A72;
  --fh-sky: #3D8BFD;
  --fh-line: rgba(27, 42, 74, 0.12);
  --fh-shadow: 0 22px 48px rgba(27, 42, 74, 0.1);
  --fh-font: 'Public Sans', system-ui, sans-serif;
  --fh-display: 'Epilogue', system-ui, sans-serif;
}

body.folio-help {
  background: var(--fh-paper);
  font-family: var(--fh-font);
  color: var(--fh-ink);
}

body.folio-help .page-main { padding: 0; }

.fh-shell {
  position: relative;
  isolation: isolate;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 1.75rem) 3.5rem;
  display: grid;
  gap: clamp(1.15rem, 2.5vw, 1.85rem);
}

.fh-wash {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(820px 420px at 0% 0%, rgba(255, 107, 53, 0.16), transparent 55%),
    radial-gradient(700px 380px at 100% 10%, rgba(61, 139, 253, 0.14), transparent 50%),
    radial-gradient(600px 360px at 50% 100%, rgba(91, 138, 114, 0.12), transparent 50%),
    linear-gradient(180deg, #F7FAFC 0%, #E7EEF5 100%);
  pointer-events: none;
}

.fh-ripple {
  position: fixed;
  right: -8%;
  top: 12%;
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  z-index: -1;
  border-radius: 50%;
  border: 1px solid rgba(27, 42, 74, 0.08);
  box-shadow:
    0 0 0 28px rgba(27, 42, 74, 0.03),
    0 0 0 56px rgba(27, 42, 74, 0.025);
  animation: fh-pulse 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fh-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Hero */
.fh-hero {
  display: grid;
  gap: 1.1rem;
}

.fh-kicker {
  margin: 0 0 0.4rem;
  font-family: var(--fh-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fh-flame);
}

.fh-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--fh-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.fh-lede {
  margin: 0;
  max-width: 48ch;
  color: var(--fh-mute);
  font-size: 1.05rem;
}

.fh-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.45rem 0.45rem 1rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--fh-line);
  box-shadow: var(--fh-shadow);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.2s;
}

.fh-search:focus-within {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 53, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12), var(--fh-shadow);
}

.fh-search-glyph {
  font-size: 1.1rem;
  color: var(--fh-mute);
}

.fh-search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  min-width: 0;
  color: var(--fh-ink);
}

.fh-search-clear {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: var(--fh-ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.fh-search-clear:hover {
  background: var(--fh-flame);
  transform: scale(1.03);
}

.fh-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  max-width: 28rem;
}

.fh-stats div {
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--fh-line);
}

.fh-stats dt {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fh-mute);
}

.fh-stats dd {
  margin: 0.15rem 0 0;
  font-family: var(--fh-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Topic folio cards */
.fh-topics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.fh-topic {
  text-align: left;
  border: 1px solid var(--fh-line);
  border-radius: 1.2rem;
  padding: 0.95rem 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.2, 0.85, 0.2, 1), box-shadow 0.28s, border-color 0.2s, background 0.2s;
  animation: fh-rise 0.5s ease backwards;
  animation-delay: calc(var(--fh-i, 0) * 0.05s);
}

@keyframes fh-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.fh-topic:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  box-shadow: var(--fh-shadow);
}

.fh-topic.is-active {
  background: var(--fh-ink);
  color: #fff;
  border-color: var(--fh-ink);
  box-shadow: 0 16px 34px rgba(27, 42, 74, 0.28);
}

.fh-topic-mark {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(27, 42, 74, 0.08);
  font-family: var(--fh-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
}

.fh-topic.is-active .fh-topic-mark {
  background: rgba(255, 255, 255, 0.16);
}

.fh-topic--flame.is-active { background: var(--fh-flame); border-color: var(--fh-flame); }
.fh-topic--navy.is-active { background: var(--fh-navy); border-color: var(--fh-navy); }
.fh-topic--sage.is-active { background: var(--fh-sage); border-color: var(--fh-sage); }
.fh-topic--sky.is-active { background: var(--fh-sky); border-color: var(--fh-sky); }

.fh-topic strong {
  display: block;
  font-family: var(--fh-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.fh-topic small {
  display: block;
  color: var(--fh-mute);
  font-size: 0.78rem;
  line-height: 1.35;
}

.fh-topic.is-active small { color: rgba(255, 255, 255, 0.78); }

/* Layout */
.fh-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: 1.1rem;
  align-items: start;
}

.fh-main {
  display: grid;
  gap: 1.25rem;
}

.fh-empty {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.25);
  color: #9a3412;
  font-weight: 600;
}

.fh-chapter {
  display: none;
  animation: fh-fade 0.35s ease;
}

.fh-chapter.is-active {
  display: block;
}

@keyframes fh-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.fh-chapter-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.fh-chapter-tone {
  width: 0.55rem;
  height: 2.6rem;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.fh-chapter-tone--flame { background: var(--fh-flame); }
.fh-chapter-tone--navy { background: var(--fh-navy); }
.fh-chapter-tone--sage { background: var(--fh-sage); }
.fh-chapter-tone--sky { background: var(--fh-sky); }

.fh-chapter-head h2 {
  margin: 0 0 0.2rem;
  font-family: var(--fh-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fh-chapter-head p {
  margin: 0;
  color: var(--fh-mute);
}

/* FAQ accordion */
.fh-faq-list {
  display: grid;
  gap: 0.55rem;
}

.fh-faq {
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--fh-line);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.2s;
  animation: fh-rise 0.45s ease backwards;
  animation-delay: calc(var(--fh-i, 0) * 0.04s);
}

.fh-faq:hover {
  border-color: rgba(255, 107, 53, 0.35);
  box-shadow: 0 14px 30px rgba(27, 42, 74, 0.08);
}

.fh-faq[open] {
  border-color: rgba(61, 139, 253, 0.4);
  box-shadow: var(--fh-shadow);
  transform: translateY(-2px);
}

.fh-faq summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.05rem;
  cursor: pointer;
  font-weight: 600;
}

.fh-faq summary::-webkit-details-marker { display: none; }

.fh-faq-index {
  font-family: var(--fh-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--fh-mute);
  width: 1.6rem;
}

.fh-faq-q {
  font-family: var(--fh-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.fh-faq-plus {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: rgba(27, 42, 74, 0.08);
  transition: background 0.2s, transform 0.3s;
}

.fh-faq-plus::before,
.fh-faq-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--fh-ink);
  transform: translate(-50%, -50%);
}

.fh-faq-plus::before {
  width: 0.7rem;
  height: 2px;
}

.fh-faq-plus::after {
  width: 2px;
  height: 0.7rem;
  transition: transform 0.3s, opacity 0.2s;
}

.fh-faq[open] .fh-faq-plus {
  background: var(--fh-flame);
  transform: rotate(90deg);
}

.fh-faq[open] .fh-faq-plus::before,
.fh-faq[open] .fh-faq-plus::after {
  background: #fff;
}

.fh-faq[open] .fh-faq-plus::after {
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
}

.fh-faq-a {
  padding: 0 1.05rem 1.1rem 3.4rem;
  color: var(--fh-mute);
  line-height: 1.7;
  animation: fh-fade 0.3s ease;
}

.fh-faq-a a {
  color: var(--fh-sky);
  font-weight: 700;
  text-underline-offset: 2px;
}

/* Support raft */
.fh-raft {
  display: grid;
  gap: 0.75rem;
  position: sticky;
  top: 5.5rem;
}

.fh-raft-card {
  padding: 1.15rem 1.2rem;
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--fh-line);
  box-shadow: 0 12px 28px rgba(27, 42, 74, 0.06);
  transition: transform 0.25s;
}

.fh-raft-card:hover {
  transform: translateY(-3px);
}

.fh-raft-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--fh-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.fh-raft-card > p {
  margin: 0 0 0.85rem;
  color: var(--fh-mute);
  font-size: 0.92rem;
}

.fh-raft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--fh-flame);
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--fh-display);
  font-weight: 700;
  margin-bottom: 0.65rem;
  box-shadow: 0 12px 26px rgba(255, 107, 53, 0.3);
  transition: transform 0.22s, box-shadow 0.22s;
}

.fh-raft-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(255, 107, 53, 0.4);
}

.fh-raft-mail {
  display: block;
  font-weight: 700;
  color: var(--fh-sky);
  text-decoration: none !important;
  word-break: break-word;
  margin-bottom: 0.35rem;
}

.fh-raft-mail:hover { text-decoration: underline !important; }

.fh-raft-meta {
  margin: 0.2rem 0 0;
  color: var(--fh-mute);
  font-size: 0.86rem;
}

.fh-raft-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--fh-mute);
  display: grid;
  gap: 0.4rem;
}

.fh-raft-list strong { color: var(--fh-ink); }

.fh-raft-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fh-raft-links a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(27, 42, 74, 0.06);
  color: var(--fh-ink);
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 0.2s, transform 0.2s;
}

.fh-raft-links a:hover {
  background: var(--fh-ink);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .fh-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-layout { grid-template-columns: 1fr; }
  .fh-raft { position: static; }
}

@media (max-width: 560px) {
  .fh-topics { grid-template-columns: 1fr; }
  .fh-faq summary { grid-template-columns: auto 1fr auto; }
  .fh-faq-a { padding-left: 1.05rem; }
  .fh-stats { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
