/* components.css - ARC interactive elements and controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 44px;
  padding: var(--space-10) var(--space-20);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  font-size: var(--fs-ui-md);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--text-white);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.btn--secondary,
.btn--ghost {
  background: transparent;
  color: var(--text-grey);
  border-color: var(--border-glass);
}

.btn--secondary:hover,
.btn--ghost:hover {
  color: var(--text-white);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
}

.btn--lg {
  min-height: 48px;
  padding: var(--space-12) var(--space-24);
}

.btn--full-width {
  width: 100%;
  border-radius: 10px;
}

.site-header {
  position: fixed;
  top: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: calc(100% - var(--space-20));
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(24px) saturate(1.3);
  padding: var(--space-10) var(--space-6) var(--space-10) var(--space-18);
  min-height: var(--header-height);
}

.header__logo {
  text-decoration: none;
  font-weight: var(--fw-bold);
  font-size: var(--fs-heading-md);
  letter-spacing: -0.02em;
}

.header__logo-arc {
  color: #a8b7ff;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.nav-register-btn {
  min-height: 44px;
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  color: var(--text-grey);
  text-decoration: none;
  font-size: calc(var(--fs-body-sm) * 1.04);
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
  padding: var(--space-10) var(--space-16);
  border-radius: var(--radius-pill);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.header__nav a:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.hamburger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  cursor: pointer;
}

.hamburger span {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-grey);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 78px var(--space-16) auto;
  z-index: 110;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  display: grid;
  gap: var(--space-8);
  padding: var(--space-12);
  max-height: calc(100svh - 94px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav.is-open {
  transform: scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text-grey);
  padding: var(--space-12);
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: calc(var(--fs-ui-md) * 1.04);
  font-weight: var(--fw-semibold);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-nav a:hover {
  color: var(--text-white);
  border-color: var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
}

details.accordion,
details.collapsible,
.faq-item {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-glass);
}

details.accordion > summary,
details.collapsible > summary,
.faq-item > summary.faq-item__question {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  min-height: 44px;
  padding: var(--space-12) var(--space-24);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-ui);
  transition: background 0.2s ease;
  color: var(--text-white);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.collapsible__trigger {
  width: 100%;
}

details.accordion > summary:hover,
details.collapsible > summary:hover,
.faq-item > summary.faq-item__question:hover {
  background: rgba(255, 255, 255, 0.05);
}

details.accordion > summary:active,
details.collapsible > summary:active,
.faq-item > summary.faq-item__question:active {
  background: rgba(255, 255, 255, 0.08);
}

details.accordion > summary:focus-visible,
details.collapsible > summary:focus-visible,
.faq-item > summary.faq-item__question:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--border-focus);
}

details[open].accordion > summary,
details[open].collapsible > summary,
.faq-item[open] > summary.faq-item__question {
  background: rgba(34, 211, 238, 0.09);
  border-left: 3px solid rgba(34, 211, 238, 0.75);
  padding-left: calc(var(--space-24) - 3px);
}

details.accordion > summary::marker,
details.collapsible > summary::marker,
.faq-item > summary.faq-item__question::marker,
details.accordion > summary::-webkit-details-marker,
details.collapsible > summary::-webkit-details-marker,
.faq-item > summary.faq-item__question::-webkit-details-marker {
  display: none;
}

.collapsible__icon::after,
.faq-item__question-icon::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(-45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.collapsible__icon,
.faq-item__question-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

details[open] .collapsible__icon::after,
.faq-item[open] .faq-item__question-icon::after {
  transform: rotate(45deg);
  border-color: var(--accent-cyan);
}

.section--industry .participation-options {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.section--industry .participation-options__trigger {
  min-height: 52px;
  padding: var(--space-14) var(--space-20);
  font-size: var(--fs-body-sm);
}

.section--industry .participation-options__trigger .collapsible__icon {
  width: 20px;
  height: 20px;
}

.section--industry .participation-options__trigger .collapsible__icon::after {
  width: 10px;
  height: 10px;
  border-right-color: rgba(246, 248, 255, 0.86);
  border-bottom-color: rgba(246, 248, 255, 0.86);
}

.section--industry .participation-options > summary:hover {
  background: rgba(34, 211, 238, 0.08);
}

.section--industry .participation-options > summary:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(34, 211, 238, 0.45);
}

.section--industry details[open].participation-options > summary {
  background: rgba(34, 211, 238, 0.11);
  border-left-width: 2px;
  padding-left: calc(var(--space-20) - 2px);
}

.section--industry .participation-options > summary:hover .collapsible__icon::after {
  border-right-color: var(--text-white);
  border-bottom-color: var(--text-white);
}

.collapsible__body,
.faq-item__answer {
  border-top: 1px solid var(--border-glass);
  padding: var(--space-18) var(--space-24) var(--space-20);
  display: grid;
  gap: var(--space-12);
}

.task-example,
.eval-detail-item,
.participation-mode {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  padding: var(--space-14) 0;
}

.task-example:last-child,
.eval-detail-item:last-child,
.participation-mode:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.eval-detail-item--matrix {
  display: grid;
  gap: var(--space-12);
}

.eval-matrix__intro {
  margin: 0;
  color: var(--text-grey);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-ui);
}

.eval-matrix__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: var(--space-6);
  scrollbar-width: thin;
}

.eval-matrix {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(13, 18, 28, 0.78);
}

.eval-matrix th,
.eval-matrix td {
  padding: var(--space-10) var(--space-12);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.eval-matrix tr > *:last-child {
  border-right: 0;
}

.eval-matrix tbody tr:last-child > * {
  border-bottom: 0;
}

.eval-matrix__row--scores td {
  vertical-align: top;
}

.eval-matrix__axis {
  width: 25%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-grey);
  font-size: var(--fs-body-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.eval-matrix__scenario {
  width: 25%;
  font-size: var(--fs-body-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-ui);
}

.eval-matrix th.eval-matrix__scenario {
  text-align: center;
  vertical-align: middle;
}

.eval-matrix__scenario span {
  display: block;
  margin-top: var(--space-4);
  color: var(--text-grey);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
}

.eval-matrix__scenario--a {
  background: rgba(139, 92, 246, 0.14);
}

.eval-matrix__scenario--b {
  background: rgba(34, 211, 238, 0.12);
}

.eval-matrix__scenario--c {
  background: rgba(245, 158, 11, 0.14);
}

.eval-matrix tbody th {
  color: var(--text-grey);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  background: rgba(255, 255, 255, 0.02);
}

.eval-matrix__row--task td {
  font-weight: var(--fw-medium);
  color: var(--text-white);
  text-align: center;
  font-style: italic;
}

.eval-matrix__row--context th,
.eval-matrix__row--context td {
  background: rgba(255, 255, 255, 0.025);
}

.eval-matrix__row--role td,
.eval-matrix__row--context td {
  text-align: center;
}

.eval-matrix__row--correct td code {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.55);
  color: #e7ffe8;
}

.eval-matrix code {
  font-family: var(--font-mono);
  font-size: var(--fs-ui-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}

.eval-matrix__scores {
  display: grid;
  gap: var(--space-8);
}

.eval-matrix__scores li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.eval-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: var(--fs-meta);
  line-height: 1;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  padding: 5px 9px;
  white-space: nowrap;
}

.eval-score--hit {
  background: rgba(34, 211, 238, 0.2);
  border: 1px solid rgba(34, 211, 238, 0.5);
  color: #dcfbff;
}

.eval-score--miss {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #ffe7ee;
}

.eval-score--partial {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fff2d9;
}

.reg-form {
  display: grid;
  gap: var(--space-18);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-field label {
  font-size: var(--fs-ui-sm);
  font-weight: var(--fw-medium);
  color: var(--text-grey);
}

.field-hint,
.optional-label {
  color: var(--text-dim);
  font-size: var(--fs-meta);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field select {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--bg-base);
  color: var(--text-white);
  font-size: var(--fs-body-sm);
  font-family: var(--font-body);
  padding: var(--space-10) var(--space-14);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:hover,
.form-field select:hover {
  border-color: var(--border-hover);
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"] {
  border-color: var(--accent-rose);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.2);
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4L10 1' stroke='%236d7484' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.3rem;
}

.field-error {
  display: block;
  min-height: 1em;
  margin-top: var(--space-4);
  color: var(--accent-rose);
  font-size: var(--fs-meta);
}

.form-field--consent .consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-10);
  color: var(--text-grey);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  min-height: 44px;
  padding: var(--space-4) 0;
}

.form-field--consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 4px;
  border: 1px solid var(--border-hover);
  background: var(--bg-base);
  position: relative;
}

.form-field--consent input[type="checkbox"]:checked {
  border-color: var(--accent-violet);
  background: var(--accent-violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M1 4.5L4 7.5L10 1.5' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.privacy-toggle {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-cyan);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.form-error-banner {
  border: 1px solid var(--accent-rose);
  background: rgba(244, 63, 94, 0.08);
  border-radius: var(--radius-sm);
  color: var(--accent-rose);
  font-size: var(--fs-ui-md);
  padding: var(--space-10) var(--space-14);
}

.json-workflow {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  padding: var(--space-16);
}

.json-workflow__title {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-ui-md);
  margin-bottom: var(--space-8);
  color: var(--text-white);
}

.json-workflow__label {
  display: inline-block;
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  font-size: var(--fs-ui-md);
  font-weight: var(--fw-semibold);
}

.json-workflow input[type="file"] {
  width: 100%;
  min-height: 44px;
}

.json-workflow__status {
  margin-top: var(--space-8);
  min-height: 1.2em;
}

.json-workflow__status[data-tone="success"] {
  color: #7af0b6;
}

.json-workflow__status[data-tone="error"] {
  color: var(--accent-rose);
}

.privacy-dialog {
  width: min(860px, calc(100% - var(--space-32)));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text-white);
  padding: 0;
}

.privacy-dialog::backdrop {
  background: rgba(8, 17, 30, 0.55);
}

.privacy-dialog__inner {
  display: flex;
  flex-direction: column;
}

.privacy-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-16);
  border-bottom: 1px solid var(--border-glass);
}

.privacy-dialog__close {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.8rem;
  color: var(--text-dim);
  line-height: 1;
}

.privacy-dialog__body {
  max-height: min(68vh, 560px);
  overflow: auto;
  padding: var(--space-24);
  padding-right: var(--space-20);
}

.honeypot-wrapper {
  display: none !important;
}
