/* ==========================================================================
   ITLawyers — components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn--primary {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: #fff;
  text-decoration: none;
}

.btn--secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--paper-3);
  color: var(--ink);
  text-decoration: none;
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
  padding-inline: 4px;
}

.btn--quiet:hover {
  text-decoration-color: var(--ink);
}

.btn--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: #fff;
  color: var(--ink);
}

.btn--on-dark {
  border-color: #ded5c6;
  color: var(--paper);
}

.btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}

.mt-4 {
  margin-top: var(--sp-4);
}

.mt-5 {
  margin-top: var(--sp-5);
}

.mt-6 {
  margin-top: var(--sp-6);
}

.mb-6 {
  margin-bottom: var(--sp-6);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: var(--fs-xs);
}

.btn--lg {
  min-height: 54px;
  padding: 15px 28px;
  font-size: var(--fs-base);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn__note {
  font-size: var(--fs-xs);
  font-weight: 400;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field {
  margin-bottom: var(--sp-5);
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.field__label .req {
  color: var(--error);
  font-weight: 600;
}

.field__hint {
  margin: -2px 0 8px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.field__control {
  position: relative;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.4;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23241f1a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(36, 31, 26, 0.16);
}

.input::placeholder,
.textarea::placeholder {
  color: #8d8377;
}

.field--error .input,
.field--error .select,
.field--error .textarea {
  border-color: var(--error);
  background: #fff;
}

.field--error .input:focus,
.field--error .select:focus,
.field--error .textarea:focus {
  box-shadow: 0 0 0 3px rgba(140, 47, 36, 0.18);
}

.field__error {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--error);
}

.field__error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.field-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 620px) {
  .field-row,
  .field-row--3 {
    grid-template-columns: 1fr;
  }
}

.checkbox,
.radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.checkbox input,
.radio input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--brown);
  cursor: pointer;
}

.checkbox label,
.radio label {
  cursor: pointer;
}

.checkbox + .checkbox,
.radio + .radio {
  margin-top: var(--sp-3);
}

.checkbox__text {
  display: block;
  color: var(--ink-soft);
}

.checkbox__text a {
  color: var(--ink);
}

/* Choice cards (wizard radios) */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

.choice-grid--stack {
  grid-template-columns: 1fr;
}

.choice {
  position: relative;
  display: block;
  min-width: 0;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.choice__body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  padding: var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.choice__body:hover {
  border-color: var(--ink-soft);
}

.choice input:checked + .choice__body {
  border-color: var(--ink);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.choice__mark {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.choice input:checked + .choice__body .choice__mark {
  background: var(--brown);
  border-color: var(--brown);
}

.choice__title {
  display: block;
  font-weight: 600;
  font-size: var(--fs-base);
  margin-bottom: 2px;
}

.choice__desc {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
}

.choice__price {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Cards, facts, process
   -------------------------------------------------------------------------- */

.card {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.card--paper {
  background: var(--paper);
}

.card--tint {
  background: var(--paper-2);
}

.card--accent {
  border-top: 2px solid var(--brown);
}

.card--flat {
  border: 0;
  padding: 0;
}

.card h2 {
  font-size: var(--fs-xl);
}

.card h3 {
  font-size: var(--fs-lg);
  font-family: var(--font-sans);
  font-weight: 600;
}

.card p:last-child {
  margin-bottom: 0;
}

.card__label {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: var(--sp-3) 0;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.card__price small {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  position: relative;
  padding: 0 0 0 22px;
  margin-bottom: var(--sp-3);
  color: var(--ink-soft);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--brass);
  transform: rotate(45deg);
}

.facts--checks li::before {
  content: "✓";
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  transform: none;
  color: var(--brass);
  font-weight: 700;
}

.process {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
  counter-reset: process;
}

.process__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line);
}

.process__num {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--brown);
  font-variant-numeric: tabular-nums;
}

.process__body h3 {
  margin-bottom: 6px;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 600;
}

.process__body p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

@media (max-width: 560px) {
  .process__item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: var(--sp-3);
  }

  .process__num {
    font-size: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.table caption {
  padding: var(--sp-4);
  text-align: left;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.table th {
  padding: 12px 16px;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table .strong {
  font-weight: 600;
}

.table--price td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.table--price .price {
  font-size: var(--fs-lg);
  font-weight: 600;
}

.table--price .package-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.table--price .package-meta {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.table--compact td,
.table--compact th {
  padding: 10px 12px;
}

.table--admin {
  font-size: var(--fs-xs);
  min-width: 760px;
}

.table--admin td {
  padding: 10px 12px;
}

.table--admin tr:hover td {
  background: var(--paper);
}

@media (max-width: 760px) {
  .table--stack thead {
    display: none;
  }

  .table--stack tbody,
  .table--stack tr,
  .table--stack td {
    display: block;
    width: 100%;
  }

  .table--stack tr {
    border-bottom: 1px solid var(--line-strong);
    padding: 12px 16px;
  }

  .table--stack td {
    border: 0;
    padding: 6px 0;
  }

  .table--stack td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
  }

  .table--stack td.num {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   Tags, statuses, notices
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.tag--brass {
  border-color: var(--brass);
  background: transparent;
  color: var(--ink-soft);
}

.tag--new {
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.tag--awaiting_payment {
  border-color: #b7a282;
  background: #f6efe2;
}

.tag--paid {
  border-color: #8ba58f;
  background: var(--success-bg);
  color: #244733;
}

.tag--in_progress {
  border-color: #a5a18a;
  background: #f1efe5;
}

.tag--filed {
  border-color: #8f9fae;
  background: #eef2f5;
}

.tag--completed {
  border-color: #557a5f;
  background: var(--success-bg);
  color: #1f4230;
}

.tag--cancelled {
  border-color: #c2a5a0;
  background: #f7eae7;
  color: #6f2a21;
}

.notice {
  padding: var(--sp-4);
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice--error {
  border-color: var(--error);
  background: var(--error-bg);
  color: #5f1d16;
}

.notice--success {
  border-color: #8ba58f;
  background: var(--success-bg);
  color: #1f4230;
}

.notice--info {
  border-left: 2px solid var(--brass);
}

.notice__title {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Accordions
   -------------------------------------------------------------------------- */

.accordion {
  border-top: 1px solid var(--line-strong);
}

.accordion details {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  position: relative;
  padding: 18px 44px 18px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: 1.5;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 400;
  color: var(--brass);
  line-height: 1;
}

.accordion details[open] summary::after {
  content: "−";
}

.accordion summary:hover {
  color: var(--brown);
}

.accordion__body {
  max-width: 68ch;
  padding: 0 0 var(--sp-5);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.accordion__body p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 var(--sp-5) 40px;
  margin: 0;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 13px;
  height: 13px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  background: var(--paper);
}

.timeline li.is-current::before {
  background: var(--brass);
}

.timeline__time {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: 2px;
}

.timeline__title {
  display: block;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Summary / order review
   -------------------------------------------------------------------------- */

.summary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: var(--sp-5);
}

.summary__title {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
}

.summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.summary__row:last-of-type {
  border-bottom: 0;
}

.summary__row dt,
.summary__row .label {
  color: var(--muted);
}

.summary__row dd,
.summary__row .value {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 2px solid var(--brown);
  font-size: var(--fs-lg);
  font-weight: 600;
}

.summary__total .value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  line-height: 1;
}

.summary__note {
  margin: var(--sp-3) 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.summary__empty {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.summary__badge {
  margin-bottom: var(--sp-3);
}

/* --------------------------------------------------------------------------
   Stepper / wizard steps
   -------------------------------------------------------------------------- */

.stepper {
  display: flex;
  gap: 6px;
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.stepper li {
  flex: 1 1 0;
  margin: 0;
  padding-top: 8px;
  border-top: 3px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.stepper li.is-current {
  border-top-color: var(--brown);
  color: var(--ink);
  font-weight: 600;
}

.stepper li.is-done {
  border-top-color: var(--brass);
  color: var(--ink-soft);
}

.step {
  min-width: 0;
}

.step[hidden] {
  display: none;
}

.step__legend {
  margin: 0 0 var(--sp-2);
  padding: 0;
  border: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
}

.step__intro {
  max-width: 60ch;
  margin: 0 0 var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.step__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.step__counter {
  display: none;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.wizard--enhanced .stepper {
  display: none;
}

.wizard--enhanced .step__counter {
  display: block;
  margin-bottom: var(--sp-2);
}

@media (min-width: 981px) {
  .wizard--enhanced .stepper {
    display: flex;
  }

  .wizard--enhanced .step__counter {
    display: none;
  }
}

/* Wizard-specific shell */
.wizard {
  min-width: 0;
}

[hidden] {
  display: none !important;
}

.wizard:not(.wizard--enhanced) [data-js-only] {
  display: none !important;
}

.wizard:not(.wizard--enhanced) .step__actions {
  display: none;
}

.wizard--enhanced .wizard__submit-fallback {
  display: none;
}

.wizard__errors {
  margin: 0 0 var(--sp-5);
}

.wizard__errors ul {
  margin: var(--sp-2) 0 0;
  padding-left: 20px;
}

.wizard__errors li {
  margin: 3px 0;
}

.wizard__errors a {
  color: var(--ink);
}

.wizard__loading {
  padding: var(--sp-5) 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.step {
  scroll-margin-top: 90px;
}

.step:focus {
  outline: none;
}

.step__group {
  margin: 0;
  padding: 0;
  border: 0;
}

.step__group legend {
  padding: 0;
}

.field--other {
  max-width: 42rem;
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.input-file {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--fs-sm);
}

.input-file::file-selector-button {
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}

.file-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.file-preview img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.file-preview__meta {
  min-width: 0;
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}

.file-preview__meta strong {
  display: block;
  margin-bottom: 2px;
}

.class-picker__all {
  margin-top: var(--sp-4);
  border: 1px solid var(--line);
  background: var(--surface);
}

.class-picker__all summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.class-picker__all summary:hover {
  background: var(--paper-2);
}

.class-picker__list {
  max-height: 420px;
  overflow-y: auto;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.class-picker__list h3 {
  margin: var(--sp-4) 0 var(--sp-2);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.class-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  cursor: pointer;
}

.class-check input {
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: var(--brown);
}

.class-check__num {
  display: inline-block;
  min-width: 25px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.class-picker__selected {
  margin-top: var(--sp-4);
}

.class-picker__selected .chips {
  margin-top: var(--sp-2);
}

.class-picker__hint {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.review-card {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-4);
}

.review-card h3 {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.review-list {
  margin: 0;
}

.review-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: var(--sp-3);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.review-list div:last-child {
  border-bottom: 0;
}

.review-list dt {
  color: var(--muted);
}

.review-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.review-card .summary {
  border: 0;
  padding: 0;
  background: transparent;
}

.mobile-bar__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-bar__total {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.mobile-bar .btn {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .review-list div {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .class-checks {
    grid-template-columns: 1fr;
  }

  .class-results {
    grid-template-columns: 1fr;
  }
}

/* Class picker */
.class-search {
  display: flex;
  gap: var(--sp-2);
}

.class-search .input {
  flex: 1;
}

.class-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  max-height: 460px;
  margin-top: var(--sp-3);
  overflow-y: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.class-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition);
}

.class-result:hover {
  background: var(--paper-2);
}

.class-result.is-selected {
  background: var(--paper-3);
}

.class-result__num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.class-result.is-selected .class-result__num {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
}

.class-result__title {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.35;
}

.class-result__desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.class-result mark {
  background: #efe1c4;
  color: inherit;
}

.class-empty {
  grid-column: 1 / -1;
  padding: var(--sp-4);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--sp-3) 0;
  padding: 0;
  list-style: none;
}

.chips:empty {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 8px 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: var(--fs-xs);
  line-height: 1.4;
}

.chip button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.chip button:hover {
  background: var(--paper-3);
  color: var(--ink);
}

.class-counter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.class-counter strong {
  color: var(--ink);
  font-size: var(--fs-sm);
}

.class-list {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line-strong);
}

.class-list details {
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.class-list summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 24px;
  gap: var(--sp-3);
  align-items: baseline;
  padding: var(--sp-4);
  cursor: pointer;
  list-style: none;
}

.class-list summary::-webkit-details-marker {
  display: none;
}

.class-list summary::after {
  content: "+";
  justify-self: end;
  color: var(--brass);
  font-size: 20px;
  line-height: 1;
}

.class-list details[open] summary::after {
  content: "−";
}

.class-list__num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--brown);
  font-variant-numeric: tabular-nums;
}

.class-list__title {
  font-weight: 600;
  font-size: var(--fs-base);
}

.class-list__desc {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.class-list__body {
  padding: 0 var(--sp-4) var(--sp-4) calc(56px + var(--sp-3) + var(--sp-4));
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

@media (max-width: 620px) {
  .class-results {
    grid-template-columns: 1fr;
  }

  .class-list summary {
    grid-template-columns: 44px minmax(0, 1fr) 20px;
    padding: var(--sp-3);
  }

  .class-list__body {
    padding: 0 var(--sp-3) var(--sp-4) calc(44px + var(--sp-3));
  }
}

/* --------------------------------------------------------------------------
   Price matrix (pricing page)
   -------------------------------------------------------------------------- */

.price-table .check-col {
  width: 30%;
}

.price-note {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.price-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.price-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.price-legend i {
  width: 7px;
  height: 7px;
  background: var(--brass);
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Timeline illustration / process page
   -------------------------------------------------------------------------- */

.timeline-figure {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--sp-5);
}

.timeline-figure img {
  width: 100%;
}

.timeline-figure figcaption {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.address {
  font-style: normal;
  line-height: 1.7;
}

.error-code {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-serif);
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.9;
  color: var(--brown);
  font-variant-numeric: lining-nums tabular-nums;
}

/* --------------------------------------------------------------------------
   Legal / prose
   -------------------------------------------------------------------------- */

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.toc {
  position: sticky;
  top: 100px;
  border-top: 2px solid var(--brown);
  padding-top: var(--sp-3);
}

.toc__title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.toc a {
  display: block;
  padding: 8px 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.prose {
  max-width: 72ch;
}

.prose > h2 {
  margin-top: var(--sp-7);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xl);
}

.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose > h3 {
  margin-top: var(--sp-5);
  font-size: var(--fs-lg);
  font-family: var(--font-sans);
  font-weight: 600;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-4) 0;
  font-size: var(--fs-sm);
}

.prose th,
.prose td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--paper-2);
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    margin-bottom: var(--sp-5);
  }
}

/* --------------------------------------------------------------------------
   Confirmation and status pages
   -------------------------------------------------------------------------- */

.confirmation {
  max-width: 820px;
  margin: 0 auto;
}

.confirmation__head {
  padding: var(--sp-5) 0 var(--sp-6);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-6);
}

.confirmation__ref {
  display: inline-block;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.confirmation__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.status-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(20px, 3vw, 32px);
}

.status-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-5);
}

.status-panel__head h2 {
  margin: 0;
  font-size: var(--fs-xl);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
}

.status-badge--paid::before,
.status-badge--completed::before {
  background: var(--brown);
}

.status-badge--cancelled {
  color: var(--muted);
}

.status-badge--cancelled::before {
  background: var(--muted);
}

.confirmation__section {
  margin-top: var(--sp-6);
}

.confirmation__section > h2 {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-xl);
}

.next-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: nextstep;
}

.next-steps li {
  position: relative;
  counter-increment: nextstep;
  margin: 0 0 var(--sp-4);
  padding-left: 42px;
  color: var(--ink-soft);
}

.next-steps li:last-child {
  margin-bottom: 0;
}

.next-steps li::before {
  content: counter(nextstep);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brown);
  font-family: var(--font-serif);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--paper);
}

.status-lookup {
  max-width: 560px;
}

.status-lookup .field {
  margin-bottom: var(--sp-3);
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.status-meta strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */

.login-wrap {
  max-width: 440px;
  margin: clamp(32px, 8vw, 96px) auto 0;
}

.login-card {
  border: 1px solid var(--line);
  border-top: 2px solid var(--brown);
  background: var(--surface);
  padding: clamp(24px, 4vw, 40px);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: var(--sp-4);
}

.admin-filters .field {
  margin-bottom: 0;
  min-width: 160px;
}

.admin-filters .input,
.admin-filters .select {
  min-height: 42px;
  padding: 8px 12px;
  font-size: var(--fs-sm);
}

.admin-filters .select {
  padding-right: 34px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.inline-form {
  display: inline;
  margin: 0;
}

.admin-uploads {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-uploads li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.admin-uploads li:last-child {
  border-bottom: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.pagination__status {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.break-all {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.check-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.check-status--ok {
  color: var(--ink);
  background: var(--paper-2);
}

.check-status--warn {
  color: var(--brown);
  background: var(--paper-3);
}

.check-status--fail {
  color: #7A2E22;
  border-color: #C9A39A;
  background: #F7EAE6;
}

.self-check-detail {
  color: var(--muted);
  font-size: var(--fs-xs);
  overflow-wrap: anywhere;
}

.self-check-hash {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow-wrap: anywhere;
  font-size: 12px;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--sp-5);
  align-items: start;
}

@media (max-width: 960px) {
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-list {
  margin: 0;
  padding: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: var(--sp-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.detail-list div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .detail-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.upload-row:last-child {
  border-bottom: 0;
}

.upload-row__meta {
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   Honeycomb motif
   -------------------------------------------------------------------------- */

.hex-motif {
  pointer-events: none;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-topbar,
  .site-header,
  .site-footer,
  .breadcrumbs,
  .confirmation__actions,
  .mobile-bar,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .confirmation,
  .status-panel {
    max-width: none;
    border: 0;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .summary {
    break-inside: avoid;
  }
}

/* Cookie consent banner and footer settings link */
.cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  max-width: 980px;
  margin-inline: auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(36, 31, 26, 0.16);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent__inner {
  display: grid;
  gap: 14px;
}

.cookie-consent__title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.cookie-consent__text {
  margin: 0;
  max-width: 70ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cookie-consent__links {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-consent__actions .btn {
  min-height: 44px;
}

.link-button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.link-button:hover {
  text-decoration-thickness: 2px;
}

.link-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (min-width: 760px) {
  .cookie-consent__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .cookie-consent__actions {
    flex-wrap: nowrap;
  }
}

@media (max-width: 980px) {
  /* Keep the wizard's sticky action bar tappable while the banner is open. */
  .cookie-consent {
    left: 10px;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    max-height: 62vh;
    overflow-y: auto;
    padding: 14px;
  }

  .cookie-consent__inner {
    gap: 10px;
  }
}

@media print {
  .cookie-consent {
    display: none !important;
  }
}
.btn.is-submitting,
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: progress;
}

.payment-logo {
  display: block;
  width: 132px;
  height: auto;
  margin-top: var(--sp-3);
}

.payment-logo--inline {
  display: inline-block;
  width: 116px;
  margin: 0 0 0 var(--sp-3);
  vertical-align: middle;
}

.payment-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}

.payment-logos .payment-logo {
  margin: 0;
}

.payment-logo--card {
  width: auto;
  height: 24px;
}
