/* Khorus.ai Practice Frameworks stylesheet (external — zero unsafe-inline)
 * Extends Khorus.ai warm editorial identity with Opus v1.1 WCAG AA verified tokens.
 */

:root {
  --fw-ground: #f8eee9;
  --fw-paper: #fffaf7;
  --fw-tint: #f3e6e0;
  --fw-ink: #512e3a;
  --fw-muted: #795b63;
  --fw-line: #d7c2c2;
  --fw-accent: #ae594e;
  --fw-accent-ink: #9a4c42;
  --fw-gate: #8f5b1a;
  --fw-stop: #993636;
  --fw-focus: #512e3a;
  --fw-radius: 6px;
}

.fw-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 6%;
}

.fw-hero {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--fw-line);
}

.fw-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fw-accent-ink);
  margin: 0 0 12px;
}

.fw-hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 22ch;
  color: var(--fw-ink);
}

.fw-lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--fw-ink);
  max-width: 64ch;
  margin: 0 0 28px;
}

.fw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 28px;
}

.fw-link-secondary {
  color: var(--fw-accent-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fw-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--fw-line);
}

.fw-facts > div {
  background: var(--fw-paper);
  border: 1px solid var(--fw-line);
  border-radius: var(--fw-radius);
  padding: 14px 16px;
}

.fw-facts dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--fw-accent-ink);
  margin: 0 0 4px;
}

.fw-facts dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--fw-ink);
}

.fw-section {
  padding: 52px 0;
  border-bottom: 1px solid var(--fw-line);
}

.fw-section h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--fw-ink);
}

.fw-section-lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fw-ink);
  max-width: 66ch;
  margin: 0 0 28px;
}

.fw-subhead {
  font-size: 19px;
  margin: 28px 0 14px;
  color: var(--fw-ink);
}

.fw-section-head {
  margin-bottom: 24px;
}

.fw-card__num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fw-accent-ink);
  margin: 0 0 8px;
}

.fw-card--accent {
  border-top: 3px solid var(--fw-accent);
}

.fw-card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--fw-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
}

.fw-card__cta {
  color: var(--fw-accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fw-card__guide {
  color: var(--fw-muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fw-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.fw-card {
  background: var(--fw-paper);
  border: 1px solid var(--fw-line);
  border-radius: var(--fw-radius);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
}

.fw-card--featured {
  border-top: 3px solid var(--fw-accent);
}

.fw-card h3 {
  font-size: 21px;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--fw-ink);
}

.fw-card p {
  margin: 0 0 14px;
  line-height: 1.55;
  color: var(--fw-ink);
}

.fw-list {
  margin: 0 0 18px;
  padding-left: 18px;
  line-height: 1.5;
  color: var(--fw-ink);
}

.fw-list li {
  margin-bottom: 8px;
}

.fw-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--fw-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
}

.fw-subhead {
  font-size: 19px;
  margin: 28px 0 14px;
  color: var(--fw-ink);
}

.fw-flow {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.fw-flow__step {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--fw-paper);
  border: 1px solid var(--fw-line);
  border-top: 3px solid var(--fw-accent);
  border-radius: var(--fw-radius);
  padding: 16px 18px;
}

.fw-flow__step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -18px;
  top: 18px;
  color: var(--fw-accent-ink);
  font-weight: 700;
}

.fw-flow__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.fw-flow__num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--fw-accent-ink);
}

.fw-owner {
  font-size: 12px;
  font-weight: 600;
  background: var(--fw-tint);
  border: 1px solid var(--fw-line);
  color: var(--fw-ink);
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

.fw-flow__step h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--fw-ink);
}

.fw-flow__step p {
  font-size: 14.5px;
  line-height: 1.48;
  margin: 0 0 12px;
  color: var(--fw-ink);
}

.fw-flow__out {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--fw-line);
  font-size: 13px;
}

.fw-flow__out--gate strong {
  color: var(--fw-gate);
}

.fw-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--fw-paper);
  border: 1px solid var(--fw-line);
  font-size: 15px;
  margin: 0 0 18px;
}

.fw-table th,
.fw-table td {
  border: 1px solid var(--fw-line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  color: var(--fw-ink);
}

.fw-table thead th {
  background: var(--fw-tint);
  font-weight: 600;
}

.fw-table tbody th {
  background: var(--fw-tint);
  font-weight: 600;
  width: 16%;
}

.fw-exclusion {
  background: var(--fw-paper);
  border: 1px solid var(--fw-line);
  border-left: 4px solid var(--fw-stop);
  border-radius: var(--fw-radius);
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fw-ink);
}

.fw-exclusion p {
  margin: 0;
}

.fw-example {
  background: var(--fw-tint);
  border: 1px solid var(--fw-line);
  border-left: 4px solid var(--fw-accent);
  border-radius: var(--fw-radius);
  padding: 22px 24px;
  margin-top: 22px;
}

.fw-example h3 {
  font-size: 19px;
  margin: 6px 0 14px;
  color: var(--fw-ink);
}

.fw-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border: 1px solid var(--fw-line);
  border-radius: 3px;
  background: var(--fw-paper);
  color: var(--fw-ink);
}

.fw-example__grid {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}

.fw-example__grid dt {
  font-weight: 600;
  color: var(--fw-ink);
}

.fw-example__grid dd {
  margin: 0;
  color: var(--fw-ink);
}

.fw-cta-band {
  padding: 52px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px 32px;
}

.fw-cta-band h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 8px;
  color: var(--fw-ink);
}

.fw-cta-band p {
  margin: 0;
  max-width: 58ch;
  color: var(--fw-ink);
  line-height: 1.5;
}

.fw-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;
}

/* Compact promo cards for index.html / providers.html */
.fw-promo-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 6%;
}

.fw-promo-section h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--fw-ink);
}

.fw-promo-lead {
  max-width: 62ch;
  margin: 0 0 24px;
  line-height: 1.55;
  color: var(--fw-ink);
}

@media screen and (max-width: 820px) {
  .fw-subhead {
  font-size: 19px;
  margin: 28px 0 14px;
  color: var(--fw-ink);
}

.fw-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .fw-flow__step {
    margin-bottom: 22px;
  }
  .fw-flow__step:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 22px;
    top: auto;
    bottom: -21px;
  }
}

@media screen and (max-width: 720px) {
  .fw-facts,
  .fw-grid-2,
  .fw-example__grid {
    grid-template-columns: 1fr;
  }
  .fw-example__grid dt {
    margin-top: 8px;
  }
  .fw-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .fw-table,
  .fw-table tbody,
  .fw-table tr,
  .fw-table th,
  .fw-table td {
    display: block;
    width: 100%;
  }
  .fw-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--fw-line);
  }
  .fw-table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--fw-accent-ink);
  }
}
