.wf-portal {
  --wf-surface: #ffffff;
  --wf-surface-subtle: #f6f7f8;
  --wf-border: #dfe3e6;
  --wf-border-strong: #c7cdd1;
  --wf-text: #17191b;
  --wf-text-muted: #62686d;
  --wf-green: #176b45;
  --wf-green-soft: #eaf5ef;
  --wf-red: #b42318;
  --wf-red-soft: #fff1f0;
  --wf-amber: #855d00;
  --wf-amber-soft: #fff7df;

  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 104px 24px 64px;
  overflow-x: clip;
  color: var(--wf-text);
  font-family: var(--font-sans, sans-serif);
  font-size: 16px;
  line-height: 1.5;
}

.wf-portal,
.wf-portal *,
.wf-portal *::before,
.wf-portal *::after {
  box-sizing: border-box;
}

.wf-portal > *,
.wf-profile__authenticated,
[data-profile-root],
[data-profile-content],
.wf-profile__section,
.wf-profile__section dl > div,
.wf-profile__section li {
  max-width: 100%;
  min-width: 0;
}

.wf-profile__header {
  display: flex;
  min-height: 64px;
  align-items: flex-end;
  padding-block: 12px 18px;
  border-bottom: 1px solid var(--wf-border-strong);
}

.wf-profile__header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.wf-profile__authenticated,
[data-profile-root] {
  width: 100%;
}

[data-profile-root] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.wf-profile__section {
  width: 100%;
  padding: 24px 0;
  border-bottom: 1px solid var(--wf-border);
}

.wf-profile__section h2,
.wf-profile__section h3,
.wf-profile__section p {
  margin: 0;
}

.wf-profile__section h2 {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

.wf-profile__section h3 {
  margin-block: 16px 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.wf-profile__section dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
}

.wf-profile__section[aria-labelledby="profile-currency-title"] dl {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.wf-profile__section dl > div {
  padding: 12px 0;
  border-top: 1px solid var(--wf-border);
}

.wf-profile__section dt {
  margin-bottom: 4px;
  color: var(--wf-text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.wf-profile__section dd {
  margin: 0;
  color: var(--wf-text);
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.45;
}

.wf-profile__section ul {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf-profile__section li {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px 0;
  border-top: 1px solid var(--wf-border);
}

.wf-profile__section li > h3 {
  margin: 0;
  font-size: 15px;
}

.wf-profile__section li > p,
.wf-profile__section li > span {
  color: var(--wf-text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.wf-profile__section li > strong {
  color: var(--wf-text);
  font-size: 15px;
}

[data-profile-loading],
[data-profile-error],
[data-profile-state] {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--wf-border-strong);
  border-left-width: 4px;
  background-color: var(--wf-surface-subtle);
}

[data-profile-loading] {
  border-left-color: #737a80;
  color: var(--wf-text-muted);
}

[data-profile-error] {
  border-color: #efb9b5;
  border-left-color: var(--wf-red);
  background-color: var(--wf-red-soft);
  color: var(--wf-red);
}

[data-profile-state] {
  border-color: #e9cf8a;
  border-left-color: var(--wf-amber);
  background-color: var(--wf-amber-soft);
  color: var(--wf-amber);
}

[data-profile-state] p + p {
  margin-top: 6px;
  font-size: 13px;
}

.wf-portal a[data-portal-login],
.wf-portal__button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid var(--wf-text);
  border-radius: 6px;
  background-color: var(--wf-text);
  color: var(--wf-surface);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.wf-portal a[data-portal-login]:hover,
.wf-portal__button:hover {
  border-color: var(--wf-green);
  background-color: var(--wf-green);
}

.wf-portal__status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #b8d9c8;
  border-radius: 4px;
  background-color: var(--wf-green-soft);
  color: var(--wf-green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.wf-portal :is(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--wf-green);
  outline-offset: 2px;
}

.wf-profile__mission-progress {
  width: 100%;
  height: 8px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #e1e5e7;
}

.wf-profile__mission-progress-bar {
  display: block;
  max-width: 100%;
  height: 100%;
  border-radius: 4px;
  background-color: var(--wf-green);
  transition: width 160ms ease;
}

.wf-portal dd,
.wf-portal li,
.wf-portal p,
.wf-portal span,
.wf-portal strong,
.wf-portal a {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .wf-profile__mission-progress-bar {
    transition: none;
  }
}

@media (max-width: 720px) {
  .wf-portal {
    padding: 84px 12px 40px;
  }

  .wf-profile__header {
    min-height: 52px;
    padding-block: 8px 14px;
  }

  .wf-profile__header h1 {
    font-size: 24px;
  }

  .wf-profile__section {
    padding: 20px 0;
  }

  .wf-profile__section dl {
    grid-template-columns: 1fr;
  }

  .wf-profile__section[aria-labelledby="profile-currency-title"] dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
  }

  [data-profile-loading],
  [data-profile-error],
  [data-profile-state] {
    margin-top: 12px;
    padding: 16px 14px;
  }
}

@media (max-width: 420px) {
  .wf-profile__section[aria-labelledby="profile-currency-title"] dl {
    grid-template-columns: 1fr;
  }
}

/* Tournament and service surfaces share the same full-width work area. */
.wf-tournament__header,
.wf-service__header {
  display: flex;
  min-height: 64px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 12px 18px;
  border-bottom: 1px solid var(--wf-border-strong);
}

.wf-tournament__header h1,
.wf-service__header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.wf-tournament__header p,
.wf-service__header p {
  margin: 0;
  color: var(--wf-text-muted);
  font-size: 14px;
}

.wf-tournament__authenticated,
.wf-tournament__section,
.wf-service__section,
.wf-service__authenticated,
.wf-service__anonymous,
.wf-service__panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.wf-tournament__section,
.wf-service__section,
.wf-service__anonymous {
  padding: 24px 0;
  border-bottom: 1px solid var(--wf-border);
}

[data-tournament-error],
[data-tournament-state],
[data-service-error],
[data-service-state] {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--wf-border-strong);
  border-left-width: 4px;
  background-color: var(--wf-surface-subtle);
}

.wf-tournament__section h2,
.wf-service__section h2,
.wf-service__panel h2,
.wf-tournament__section p,
.wf-service__section p,
.wf-service__panel p {
  margin: 0;
}

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

.wf-tournament__item {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--wf-border-strong);
  border-radius: 6px;
  background-color: var(--wf-surface);
}

.wf-tournament__item-header {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.wf-tournament__item-header h2 {
  min-width: 0;
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.wf-tournament__description,
.wf-tournament__item-message {
  color: var(--wf-text-muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.wf-tournament__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
  margin: 0;
}

.wf-tournament__meta > div {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--wf-border);
}

.wf-tournament__meta dt {
  margin-bottom: 4px;
  color: var(--wf-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.wf-tournament__meta dd {
  margin: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.wf-tournament__actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-tournament__actions .wf-portal__button {
  margin-top: 0;
}

.wf-tournament__live {
  background-color: var(--wf-green);
  border-color: var(--wf-green);
}

.wf-service__section-header {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.wf-service__section-header h2 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0;
}

.wf-service__section-header p {
  color: var(--wf-text-muted);
  font-size: 14px;
}

.wf-service__notices > ul {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf-service__notices > ul > li {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid var(--wf-border);
}

.wf-service__notices > ul > li h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.wf-service__notices > ul > li p {
  color: var(--wf-text-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.wf-service__notices > ul > li a {
  width: fit-content;
  color: var(--wf-green);
  font-size: 14px;
  font-weight: 700;
}

.wf-service__authenticated {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 24px;
}

.wf-service__panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--wf-border-strong);
  border-radius: 6px;
  background-color: var(--wf-surface);
}

.wf-service__panel > .wf-portal__button {
  margin-top: 4px;
}

.wf-service__form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.wf-service__form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--wf-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.wf-service__form :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--wf-border-strong);
  border-radius: 4px;
  background-color: var(--wf-surface);
  color: var(--wf-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}

.wf-service__form textarea {
  min-height: 112px;
  resize: vertical;
}

.wf-service__form :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--wf-green);
  outline-offset: 1px;
}

.wf-service__form button {
  width: fit-content;
  margin-top: 0;
}

.wf-service__attachments {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-top: 4px;
  border-top: 1px solid var(--wf-border);
}

.wf-service__attachment-hint,
.wf-service__form-status {
  color: var(--wf-text-muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.wf-service__form-status {
  min-height: 1.45em;
  margin-top: 12px;
}

[data-report-status],
[data-feedback-status] {
  min-height: 1.45em;
}

.wf-portal__notice--error {
  border-color: #efb9b5;
  border-left: 4px solid var(--wf-red);
  background-color: var(--wf-red-soft);
  color: var(--wf-red);
}

.wf-portal__notice--state {
  border-color: #e9cf8a;
  border-left: 4px solid var(--wf-amber);
  background-color: var(--wf-amber-soft);
  color: var(--wf-amber);
}

.wf-portal__button:disabled {
  border-color: var(--wf-border-strong);
  background-color: #e6e9eb;
  color: var(--wf-text-muted);
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .wf-tournament__list,
  .wf-service__authenticated {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wf-tournament__header,
  .wf-service__header {
    min-height: 52px;
    align-items: flex-start;
    padding-block: 8px 14px;
  }

  .wf-tournament__header h1,
  .wf-service__header h1 {
    font-size: 24px;
  }

  .wf-tournament__section,
  .wf-service__section,
  .wf-service__anonymous {
    padding: 20px 0;
  }

  .wf-tournament__item,
  .wf-service__panel {
    padding: 16px 14px;
  }

  .wf-tournament__meta {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .wf-tournament__meta > div {
    padding-block: 9px;
  }

  .wf-service__authenticated {
    gap: 16px;
    padding-top: 20px;
  }
}
