/* Policy pages written in Markdown on /admin/policies (PolicyMarkdown wraps them in .policy-content).
   Made to look like the old hand-written pages (.policy-section, .policy-list... in home.css). Loaded by
   Views/Policies/Page.cshtml and by the admin preview, which has no home.css: hence the fallbacks. */

.policy-content {
  counter-reset: policy-section;
  color: var(--hs-text, #2f2b22);
}

.policy-content .policy-intro {
  color: var(--hs-text-muted, #8a8272);
}

.policy-content .policy-intro > :last-child {
  margin-bottom: 0;
}

.policy-content .policy-section {
  margin-top: 2rem;
}

/* "## Heading": a numbered green circle, like .policy-title / .policy-number. */
.policy-content h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.policy-content h2::before {
  counter-increment: policy-section;
  content: counter(policy-section);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--hs-green, #3e5a3a);
  color: #fff;
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
}

.policy-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.6rem;
}

.policy-content p {
  line-height: 1.6;
}

/* Bulleted lists: amber dots, like .policy-list. */
.policy-content ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.policy-content ul > li {
  position: relative;
  padding-left: 1.4rem;
  line-height: 1.6;
}

.policy-content ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hs-amber, #c17f3a);
}

.policy-content ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
  line-height: 1.6;
}

.policy-content ol li + li {
  margin-top: 0.4rem;
}

.policy-content li p {
  margin: 0.35rem 0 0;
}

.policy-content li > p:first-child {
  margin-top: 0;
}

.policy-content ul ul,
.policy-content ol ul {
  margin: 0.5rem 0 0;
}

/* Tables scroll sideways on a phone instead of widening the page. */
.policy-content .policy-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.policy-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.policy-content th,
.policy-content td {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--hs-border, #e7e0d0);
  vertical-align: top;
}

.policy-content th {
  background: var(--hs-cream-alt, #f4efe3);
  font-weight: 600;
}

/* "> ..." is the dashed note at the end of the old pages (.policy-note). */
.policy-content blockquote {
  position: relative;
  margin: 2.5rem 0 0;
  padding: 1.1rem 1.25rem 1.1rem 2.6rem;
  border: 1px dashed var(--hs-border, #e7e0d0);
  border-radius: 0.85rem;
  background: var(--hs-cream-alt, #f4efe3);
  font-size: 0.92rem;
  color: var(--hs-text-muted, #8a8272);
}

.policy-content blockquote::before {
  content: "\f431"; /* bi-info-circle */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 1.1rem;
  top: 1.1rem;
  line-height: 1.6;
}

.policy-content blockquote p:last-child {
  margin-bottom: 0;
}

.policy-content hr {
  margin: 2rem 0;
  border-color: var(--hs-border, #e7e0d0);
  opacity: 1;
}

.policy-content code {
  color: inherit;
}

.policy-updated {
  margin: 2rem 0 0;
  font-size: 0.8rem;
  color: var(--hs-text-muted, #8a8272);
}

/* Admin preview only: a tag that doesn't exist or a table tag inside a sentence. */
.policy-token-warning {
  background: #fff3a8;
  padding: 0 0.15rem;
  border-radius: 0.2rem;
}
