.of-hub {
  display: grid;
  gap: 14px;
  padding-bottom: 34px;
}

.of-hub .of-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-radius: 18px;
  padding: 16px 18px;
}

.of-hub .of-hero__copy .lede {
  margin: 6px 0 0;
  max-width: 66ch;
  font-size: 1rem;
}

.of-hub .of-hero__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.of-hub .of-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.of-hub .of-stat-card {
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.of-hub .of-stat-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-2) 34%, var(--border) 66%);
}

.of-hub .of-stat-card__label {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.of-hub .of-stat-card__value {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.08;
}

.of-hub .of-stat-card__helper {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
}

.of-hub .of-stat-card--pending .of-stat-card__value {
  color: color-mix(in srgb, #f0b15f 74%, var(--ink) 26%);
}

.of-hub .of-stat-card--completed .of-stat-card__value,
.of-hub .of-stat-card--archive .of-stat-card__value {
  color: color-mix(in srgb, #35c17d 75%, var(--ink) 25%);
}

.of-hub .of-stat-card--points .of-stat-card__value {
  color: color-mix(in srgb, var(--accent-2) 76%, var(--ink) 24%);
}

.of-hub .of-toolbar {
  border-radius: 18px;
  padding: 14px;
}

.of-hub .of-toolbar__form {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.of-hub.of-hub--active .of-toolbar__form {
  grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.of-hub .of-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.of-hub .of-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
}

.of-hub .of-control {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(106, 74, 45, 0.14);
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(248, 239, 215, 0.92));
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 8px 18px rgba(145, 102, 49, 0.06);
}

[data-display-mode="dark"] .of-hub .of-control {
  background: linear-gradient(180deg, rgba(48, 34, 27, 0.98), rgba(60, 43, 33, 0.94));
  border-color: rgba(255, 232, 203, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 240, 219, 0.04), 0 12px 22px rgba(0, 0, 0, 0.14);
}

.of-hub .of-control:focus-visible {
  outline: none;
  border-color: rgba(217, 122, 43, 0.42);
  box-shadow: 0 0 0 3px rgba(233, 183, 79, 0.18), 0 12px 22px rgba(145, 102, 49, 0.08);
}

.of-hub .of-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.of-hub .of-panel {
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.of-hub .of-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.of-hub .of-panel__sub {
  margin: 2px 0 0;
  color: var(--muted);
}

.of-hub .of-list {
  display: grid;
  gap: 10px;
}

.of-order-card {
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent 18%);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(148px, 190px);
  grid-template-areas:
    "media main status"
    "media main actions";
  gap: 8px 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent 18%);
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
  min-width: 0;
}

.of-order-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-2) 36%, var(--border) 64%);
  box-shadow: 0 12px 24px rgba(8, 16, 32, 0.16);
}

.of-order-card__media {
  grid-area: media;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent 20%);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent 16%);
}

.of-order-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.of-order-card__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(130deg, rgba(31, 143, 106, 0.2), rgba(47, 127, 209, 0.2));
}

.of-order-card__fallback span {
  font-size: 1.5rem;
  font-weight: 700;
}

.of-order-card__main {
  grid-area: main;
  min-width: 0;
}

.of-order-card__child {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.of-order-card__title {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.of-order-card__title-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.of-order-card__summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.of-order-card__meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: var(--muted);
  font-size: 0.79rem;
}

.of-order-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent 24%);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent 16%);
}

.of-order-card__status {
  grid-area: status;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  align-items: start;
}

.of-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.of-status-pill--pending {
  border: 1px solid color-mix(in srgb, #d8a76a 56%, var(--border) 44%);
  background: color-mix(in srgb, #d8a76a 20%, var(--surface) 80%);
  color: color-mix(in srgb, #c07d2f 65%, var(--ink) 35%);
}

.of-status-pill--ready {
  border: 1px solid color-mix(in srgb, var(--accent-2) 44%, var(--border) 56%);
  background: color-mix(in srgb, var(--accent-2) 16%, var(--surface) 84%);
  color: color-mix(in srgb, var(--accent-2) 70%, var(--ink) 30%);
}

.of-status-pill--completed {
  border: 1px solid color-mix(in srgb, #34c985 52%, var(--border) 48%);
  background: color-mix(in srgb, #34c985 20%, var(--surface) 80%);
  color: color-mix(in srgb, #1f9f67 70%, var(--ink) 30%);
}

.of-status-pill--archived {
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent 20%);
  background: color-mix(in srgb, var(--surface-2) 88%, transparent 12%);
  color: var(--muted);
}

.of-points-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--accent-2) 42%, var(--border) 58%);
  background: color-mix(in srgb, var(--accent-2) 14%, var(--surface) 86%);
}

.of-order-card__actions {
  grid-area: actions;
  display: grid;
  gap: 8px;
  width: 100%;
}

.of-order-card__actions form {
  margin: 0;
}

.of-action {
  width: 100%;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent 22%);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent 16%);
  color: var(--ink);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.of-action:hover,
.of-action:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-2) 42%, var(--border) 58%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 18%, transparent 82%);
}

.of-action--primary {
  border-color: transparent;
  color: #f8fbff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 72%, #59d4bc 28%), color-mix(in srgb, var(--accent-2) 80%, #83c4ff 20%));
}

.of-action--quiet-danger {
  border-color: color-mix(in srgb, #d95f5f 45%, var(--border) 55%);
  background: color-mix(in srgb, #d95f5f 10%, var(--surface) 90%);
  color: color-mix(in srgb, #c84b4b 64%, var(--ink) 36%);
}

.of-hub .of-archive-group {
  display: grid;
  gap: 9px;
}

.of-hub .of-archive-group + .of-archive-group {
  margin-top: 6px;
}

.of-hub .of-archive-group__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
}

.of-hub .of-archive-group__head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.of-hub .of-archive-group__head span {
  color: var(--muted);
  font-size: 0.85rem;
}

.of-hub .of-empty-state {
  border: 1px dashed color-mix(in srgb, var(--border) 74%, transparent 26%);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.of-hub .of-empty-state h3 {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.35rem;
}

.of-hub .of-empty-state p {
  margin: 0;
  color: var(--muted);
}

.of-hub .of-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.of-detail-page {
  padding-bottom: 32px;
}

.of-detail {
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.of-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.of-detail__head .lede {
  margin: 6px 0 0;
  max-width: 64ch;
}

.of-detail__status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.of-detail__meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.of-detail__meta-card {
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent 20%);
  border-radius: 14px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent 18%);
}

.of-detail__meta-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.of-detail__meta-value {
  margin: 4px 0 0;
  font-weight: 700;
}

.of-detail__items {
  display: grid;
  gap: 10px;
}

.of-detail-item {
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent 20%);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.of-detail-item__media {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent 20%);
  background: color-mix(in srgb, var(--surface-2) 84%, transparent 16%);
}

.of-detail-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.of-detail-item__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.of-detail-item__main h3 {
  margin: 0;
  font-size: 1rem;
}

.of-detail-item__main p {
  margin: 4px 0 0;
  color: var(--muted);
}

.of-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.of-detail__actions form {
  margin: 0;
}

@media (max-width: 1220px) {
  .of-hub .of-toolbar__form {
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, 1fr));
  }

  .of-hub.of-hub--active .of-toolbar__form {
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(130px, 1fr));
  }

  .of-hub .of-toolbar__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .of-hub .of-hero {
    display: grid;
    padding: 14px;
  }

  .of-hub .of-hero__actions {
    justify-content: flex-start;
  }

  .of-hub .of-hero__actions .btn {
    width: 100%;
  }

  .of-hub .of-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .of-order-card {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas:
      "media main"
      "media status"
      "actions actions";
  }

  .of-order-card__media {
    width: 76px;
    height: 76px;
  }

  .of-order-card__status {
    justify-content: flex-start;
  }

  .of-order-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .of-detail__meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .of-hub .of-stats-grid {
    grid-template-columns: 1fr;
  }

  .of-hub .of-toolbar__form,
  .of-hub.of-hub--active .of-toolbar__form {
    grid-template-columns: 1fr;
  }

  .of-hub .of-panel__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .of-order-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "main"
      "status"
      "actions";
    gap: 8px;
  }

  .of-order-card__media {
    width: 100%;
    height: 150px;
  }

  .of-order-card__actions {
    grid-template-columns: 1fr;
  }

  .of-detail__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .of-detail__status {
    justify-content: flex-start;
  }

  .of-detail__meta-grid {
    grid-template-columns: 1fr;
  }

  .of-detail-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .of-detail-item__media {
    width: 100%;
    height: 170px;
  }

  .of-detail__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .of-hub .of-stat-card,
  .of-order-card,
  .of-action {
    transition: none !important;
    transform: none !important;
  }
}

