/* Universal portal sections — works with consulting tokens or builder --ws-* */

.ws-portal-section,
.ws-portal-section *,
.ws-portal-section *::before,
.ws-portal-section *::after {
  box-sizing: border-box;
}

.ws-portal-section {
  --p-bg: var(--ws-bg, hsl(220 30% 8%));
  --p-fg: var(--ws-text, #fff);
  --p-muted: var(--ws-text-muted, hsl(220 10% 65%));
  --p-card: var(--ws-surface, hsl(220 25% 10%));
  --p-border: var(--ws-border, hsl(220 15% 22%));
  --p-accent: var(--ws-accent, hsl(25 95% 55%));
  --p-hero: var(--ws-hero-bg, hsl(220 20% 12%));
  padding: 4rem 0;
  background: var(--p-bg);
  color: var(--p-fg);
  font-family: Inter, system-ui, sans-serif;
}

.ws-portal-section-alt {
  background: var(--p-hero);
}

.ws-portal-section-final {
  background: var(--ws-section-final-bg, hsl(220 25% 6%));
}

.ws-portal-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ws-portal-narrow {
  max-width: 760px;
}

.ws-portal-hero,
.ws-portal-page-hero {
  padding-top: 4.5rem;
  background: var(--p-hero);
}

.ws-portal-eyebrow {
  color: var(--p-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.ws-portal-h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  max-width: 18ch;
  color: var(--p-fg);
}

.ws-portal-page-hero .ws-portal-h1 {
  max-width: none;
}

.ws-portal-h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--p-fg);
}

.ws-portal-h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--p-fg);
}

.ws-portal-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--p-muted);
  line-height: 1.65;
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.ws-portal-body {
  color: var(--p-muted);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 300;
  margin: 0 0 1rem;
}

.ws-portal-body-lg {
  font-size: 1.125rem;
}

.ws-portal-strong {
  color: var(--p-fg);
  font-weight: 500;
}

.ws-portal-micro {
  color: var(--p-muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  opacity: 0.85;
}

.ws-portal-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.ws-portal-cta-center {
  justify-content: center;
}

.ws-portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.ws-portal-btn-primary {
  background: var(--p-accent);
  color: #fff !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--p-accent) 35%, transparent);
}

.ws-portal-btn-ghost {
  background: transparent;
  color: var(--p-fg) !important;
  border: 1px solid var(--p-border);
}

.ws-portal-text-link {
  color: var(--p-accent);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  margin-top: auto;
}

.ws-portal-pullquote {
  margin: 2rem 0;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 4px solid var(--p-accent);
}

.ws-portal-pullquote p {
  margin: 0;
  color: var(--p-fg);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.55;
}

.ws-portal-hero-visual {
  margin-top: 3rem;
  height: 8rem;
  border-radius: 0.5rem;
  border: 1px solid var(--p-border);
  background:
    radial-gradient(circle at 20% 40%, color-mix(in srgb, var(--p-accent) 30%, transparent), transparent 40%),
    linear-gradient(135deg, var(--p-card), var(--p-hero));
}

.ws-portal-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.ws-portal-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.ws-portal-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ws-portal-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.ws-portal-icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0 0.75rem;
  background-color: var(--p-accent);
  -webkit-mask: var(--ws-icon) center / contain no-repeat;
  mask: var(--ws-icon) center / contain no-repeat;
}

.ws-portal-icon[data-icon="compass"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="messages"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="users"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="git-merge"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Cpath d='M6 21V9a9 9 0 0 0 9 9'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="sunrise"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v8'/%3E%3Cpath d='m4.93 10.93 1.41 1.41'/%3E%3Cpath d='M2 18h2'/%3E%3Cpath d='M20 18h2'/%3E%3Cpath d='m19.07 10.93-1.41 1.41'/%3E%3Cpath d='M22 22H2'/%3E%3Cpath d='m8 6 4-4 4 4'/%3E%3Cpath d='M16 18a4 4 0 0 0-8 0'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="cog"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="flag"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' x2='4' y1='22' y2='15'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="scale"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='M7 21h10'/%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="target"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}

.ws-portal-icon[data-icon="eye"] {
  --ws-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.ws-portal-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 0 0.9rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--p-accent) 16%, transparent);
  color: var(--p-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ws-portal-photo {
  display: block;
  width: calc(100% + 3rem);
  height: 12.5rem;
  margin: -1.5rem -1.5rem 1.15rem;
  border-radius: 0.5rem 0.5rem 0 0;
  object-fit: cover;
  object-position: center 18%;
}

.ws-portal-reveal {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .ws-portal-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .ws-portal-reveal.is-inview {
    opacity: 1;
    transform: none;
  }

  .ws-portal-card {
    transition: transform 0.35s ease, border-color 0.35s ease;
  }

  .ws-portal-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--p-accent) 35%, var(--p-border));
  }
}

.ws-portal-card-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ws-portal-sequence,
.ws-portal-list,
.ws-portal-steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.ws-portal-sequence li {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--p-border) 70%, transparent);
  color: var(--p-fg);
}

.ws-portal-seq-num {
  color: var(--p-accent);
  font-weight: 700;
  min-width: 1.5rem;
}

.ws-portal-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  color: var(--p-muted);
}

.ws-portal-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--p-accent);
  font-weight: 700;
}

.ws-portal-steps {
  display: grid;
  gap: 1.5rem;
}

.ws-portal-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--p-border);
}

.ws-portal-step-num {
  color: var(--p-accent);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.ws-portal-closing {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--p-border);
}

.ws-portal-note {
  color: var(--p-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--p-border);
}

.ws-portal-form-wrap {
  max-width: none;
}

.ws-portal-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  max-width: 42rem;
}

.ws-portal-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.ws-portal-field {
  min-width: 0;
  width: 100%;
}

.ws-portal-field label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--p-fg);
}

.ws-portal-field input:not([type="checkbox"]):not([type="radio"]),
.ws-portal-field select,
.ws-portal-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 0.375rem;
  border: 1px solid var(--p-border);
  background: var(--p-bg);
  color: var(--p-fg);
  padding: 0.45rem 0.7rem;
  font-family: inherit;
  font-size: 0.8125rem;
}

.ws-portal-field input[type="checkbox"],
.ws-portal-field input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  max-width: 1rem;
  margin: 0.15rem 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--p-accent);
}

.ws-portal-field textarea {
  min-height: 4.25rem;
  resize: vertical;
}

.ws-portal-check label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0;
  font-weight: 400;
  color: var(--p-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.ws-portal-check a {
  display: inline;
  margin-top: 0;
  font-size: inherit;
  font-weight: 600;
}

.ws-portal-checkgroup {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  border: 1px solid var(--p-border);
  border-radius: 0.375rem;
  padding: 0.55rem 0.75rem 0.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.4rem 1rem;
}

.ws-portal-checkgroup legend {
  padding: 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--p-fg);
}

.ws-portal-check-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--p-muted);
}

.ws-portal-check-inline input {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  max-width: 1rem;
  margin: 0.15rem 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--p-accent);
}

.ws-portal-error {
  color: var(--ws-error, #f87171);
  font-size: 0.875rem;
  margin-top: 0.35rem;
}

.ws-portal-faq {
  display: flex;
  flex-direction: column;
  margin-top: 1.15rem;
  border-top: 1px solid var(--p-border);
}

.ws-portal-faq-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--p-border);
  background: transparent;
  border-radius: 0;
}

.ws-portal-faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.35;
  color: var(--p-fg);
}

.ws-portal-faq-item summary::-webkit-details-marker {
  display: none;
}

.ws-portal-faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--p-accent);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1;
}

.ws-portal-faq-item[open] summary::after {
  content: "–";
}

.ws-portal-faq-answer,
.ws-portal-faq-item .ws-portal-body {
  margin: 0;
  padding: 0 0 0.75rem;
  font-size: 0.875rem;
}

.ws-portal-faq-answer p,
.ws-portal-faq-item .ws-portal-body p {
  margin: 0;
}

.ws-portal-form .ws-portal-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
}

.ws-portal-success {
  padding: 1.5rem;
  border: 1px solid var(--p-accent);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--p-accent) 10%, transparent);
}

@media (max-width: 1023px) {
  .ws-portal-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .ws-portal-cta-row {
    flex-wrap: wrap;
  }
}

.ws-portal-step-plain {
  grid-template-columns: 1fr;
}

@media (max-width: 767px) {
  .ws-portal-grid-2,
  .ws-portal-grid-3,
  .ws-portal-form-row,
  .ws-portal-checkgroup {
    grid-template-columns: 1fr;
  }

  .ws-portal-step {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .ws-portal-h1,
  .ws-portal-h2 {
    max-width: none;
    white-space: pre-line;
  }

  .ws-portal-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ws-portal-btn {
    width: 100%;
    min-height: 44px;
  }
}

@media print {
  .ws-portal-section {
    break-inside: avoid;
    padding: 1.25rem 0;
    background: #fff !important;
    color: #111 !important;
  }

  .ws-portal-section-alt,
  .ws-portal-section-final,
  .ws-portal-hero,
  .ws-portal-page-hero {
    background: #fff !important;
  }

  .ws-portal-h1,
  .ws-portal-h2,
  .ws-portal-h3,
  .ws-portal-eyebrow,
  .ws-portal-body,
  .ws-portal-lead,
  .ws-portal-list li,
  .ws-portal-pullquote,
  .ws-portal-card,
  .ws-portal-micro {
    color: #111 !important;
  }

  .ws-portal-card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .ws-portal-btn,
  .ws-portal-hero-visual,
  .ws-portal-form,
  nav,
  footer,
  .cookie-consent {
    display: none !important;
  }

  a[href]::after {
    content: none !important;
  }
}
