/*
Theme Name: CardRabbit 2.0
Theme URI: https://cardrabbit.com/
Author: CardRabbit
Description: Business-card gallery and editorial theme built from the Stitch redesign: gallery index, single card article, bookmarks, and submission pages.
Version: 2.0.2
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: cardrabbit-2-0
Tags: portfolio, blog, grid-layout, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  --cr-ink: #0f172a;
  --cr-ink-strong: #020617;
  --cr-muted: #64748b;
  --cr-subtle: #94a3b8;
  --cr-line: #e2e8f0;
  --cr-line-soft: #f1f5f9;
  --cr-bg: #f8fafc;
  --cr-surface: #ffffff;
  --cr-hover: #f1f5f9;
  --cr-brand: #4f46e5;
  --cr-brand-strong: #4338ca;
  --cr-brand-soft: #eef2ff;
  --cr-brand-line: #c7d2fe;
  --cr-dark: #0f172a;
  --cr-dark-2: #1e1b4b;
  --cr-success: #047857;
  --cr-success-soft: #ecfdf5;
  --cr-danger: #b91c1c;
  --cr-danger-soft: #fef2f2;
  --cr-focus: #4f46e5;
  --cr-radius-sm: 6px;
  --cr-radius: 10px;
  --cr-radius-lg: 16px;
  --cr-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --cr-shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --cr-shadow-premium: 0 20px 40px -15px rgba(79, 70, 229, 0.15);
  --cr-container: 1440px;
  --cr-gutter: clamp(16px, 3vw, 24px);
  --cr-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cr-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background-color: var(--cr-bg);
  color: var(--cr-ink);
  font-family: var(--cr-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--cr-brand);
}

h1, h2, h3, h4 {
  font-family: var(--cr-sans);
  color: var(--cr-ink-strong);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--cr-focus);
  outline-offset: 2px;
}

::selection {
  background: var(--cr-brand);
  color: #fff;
}

.cr-main {
  flex: 1 0 auto;
  width: 100%;
}

.cr-container {
  width: 100%;
  max-width: var(--cr-container);
  margin: 0 auto;
  padding-left: var(--cr-gutter);
  padding-right: var(--cr-gutter);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--cr-ink);
  height: auto;
  left: 8px;
  top: 8px;
  padding: 10px 14px;
  width: auto;
  z-index: 100000;
  border-radius: var(--cr-radius-sm);
}

.cr-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cr-icon--fill {
  fill: currentColor;
  stroke: none;
}

/* ==========================================================================
   3. Site header
   ========================================================================== */

.cr-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cr-line);
}

.cr-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.cr-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--cr-ink-strong);
}

.cr-brand:hover {
  color: var(--cr-ink-strong);
}

.cr-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 55%, #818cf8 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
  transition: transform 0.2s var(--cr-ease);
}

.cr-brand:hover .cr-brand__mark {
  transform: scale(1.05);
}

.cr-brand__mark .cr-icon {
  width: 20px;
  height: 20px;
}

.cr-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.cr-brand__mark {
  flex-shrink: 0;
}

.cr-brand__name,
.cr-brand__tag {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-brand__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cr-brand__tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--cr-subtle);
  margin-top: 2px;
}

.cr-brand--custom .custom-logo-link img,
.cr-brand .custom-logo {
  max-height: 40px;
  width: auto;
}

.cr-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 560px;
  margin: 0 8px;
  display: none;
}

.cr-search .cr-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cr-subtle);
  pointer-events: none;
}

.cr-search input[type="search"] {
  width: 100%;
  padding: 9px 16px 9px 40px;
  font-size: 14px;
  color: #1e293b;
  background: var(--cr-bg);
  border: 1px solid var(--cr-line);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.cr-search input[type="search"]::placeholder {
  color: var(--cr-subtle);
}

.cr-search input[type="search"]:hover {
  background: #f1f5f9;
}

.cr-search input[type="search"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--cr-brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.cr-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.cr-pill,
.cr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cr-btn--dark {
  background: var(--cr-dark);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.cr-btn--dark:hover {
  background: var(--cr-brand);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.45);
}

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

.cr-btn--light:hover {
  background: var(--cr-bg);
  color: var(--cr-ink-strong);
  border-color: #cbd5e1;
}

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

.cr-btn--white {
  background: #fff;
  color: var(--cr-ink-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cr-btn--white:hover {
  background: #f5f3ff;
  color: var(--cr-ink-strong);
}

.cr-btn--ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

.cr-btn--ghost-dark:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cr-pill--ghost {
  background: rgba(241, 245, 249, 0.7);
  color: #475569;
  padding: 9px 12px;
  border-radius: 10px;
}

.cr-pill--ghost:hover {
  background: #e2e8f0;
  color: var(--cr-ink-strong);
}

.cr-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #cbd5e1;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
}

.cr-count:empty {
  display: none;
}

.cr-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--cr-line);
  background: #fff;
  color: #475569;
  transition: background 0.2s, color 0.2s;
}

.cr-icon-btn:hover {
  background: var(--cr-bg);
  color: var(--cr-ink-strong);
}

.cr-menu-toggle .cr-icon {
  width: 18px;
  height: 18px;
}

.cr-menu-toggle[aria-expanded="true"] {
  background: var(--cr-brand-soft);
  color: var(--cr-brand);
  border-color: var(--cr-brand-line);
}

/* Browse bar */
.cr-browse {
  border-top: 1px solid var(--cr-line-soft);
}

.cr-browse__list {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
}

.cr-browse__list::-webkit-scrollbar {
  display: none;
}

.cr-browse__label {
  flex-shrink: 0;
  margin-right: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cr-subtle);
}

.cr-browse__list a {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.cr-browse__list a:hover {
  background: #f1f5f9;
  color: var(--cr-ink-strong);
}

.cr-browse__list a[aria-current="page"] {
  background: var(--cr-dark);
  color: #fff;
  font-weight: 600;
}

/* Mobile menu panel */
.cr-menu-panel {
  display: none;
  border-top: 1px solid var(--cr-line-soft);
  background: #fff;
}

.cr-menu-panel.is-open {
  display: block;
}

.cr-menu-panel__inner {
  padding: 16px 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.cr-menu-panel .cr-search {
  display: block;
  max-width: none;
  margin: 0;
}

.cr-menu-panel .cr-menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.cr-menu,
.cr-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cr-menu a,
.cr-footer-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: #334155;
}

.cr-menu a:hover,
.cr-footer-menu a:hover {
  background: var(--cr-bg);
  color: var(--cr-ink-strong);
}

.cr-menu .current-menu-item > a {
  color: var(--cr-brand);
}

body.menu-open {
  overflow: hidden;
}

/* Responsive header */
@media (min-width: 768px) {
  .cr-search {
    display: block;
  }

  .cr-menu-panel .cr-search {
    display: none;
  }

  .cr-brand__tag {
    display: block;
  }
}

@media (min-width: 1024px) {
  .cr-pill--bookmarks-label {
    display: inline;
  }
}

@media (max-width: 767px) {
  .cr-header__top {
    height: 60px;
  }

  .cr-brand__tag {
    display: none;
  }

  .cr-header__actions .cr-btn--dark {
    display: none;
  }

  .cr-browse__label {
    display: none;
  }
}

/* ==========================================================================
   4. Gallery index, cards, pagination
   ========================================================================== */

.cr-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 32px 0 48px;
}

@media (min-width: 1280px) {
  .cr-page-grid--with-sidebar {
    grid-template-columns: minmax(0, 9fr) minmax(280px, 3fr);
  }
}

/* Keep the gallery as one column until there is genuinely enough room for
   a useful sidebar. The previous 240-280px desktop rail became cramped and
   could expose horizontal overflow at narrow/zoomed viewport widths. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .cr-page-grid--with-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cr-page-grid > * {
  min-width: 0;
  max-width: 100%;
}

.cr-main-col {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.cr-gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cr-line);
}

.cr-gallery-head h1 {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cr-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cr-brand);
}

.cr-gallery-desc {
  margin-top: 6px;
  max-width: 62ch;
  color: var(--cr-muted);
  font-size: 14px;
}

.cr-gallery-head__count {
  font-size: 12px;
  color: var(--cr-muted);
  font-weight: 500;
}

.cr-card-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .cr-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .cr-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cr-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cr-page-grid--with-sidebar .cr-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .cr-page-grid--with-sidebar .cr-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card */
.cr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-lg);
  overflow: hidden;
  box-shadow: var(--cr-shadow-card);
  transition: transform 0.25s var(--cr-ease), box-shadow 0.25s var(--cr-ease), border-color 0.2s ease;
}

.cr-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--cr-shadow-hover);
}

.cr-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}

.cr-card__image {
  display: block;
  width: 100%;
  height: 100%;
}

.cr-card__image img,
.cr-card__image .cr-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--cr-ease);
}

.cr-card:hover .cr-card__image img {
  transform: scale(1.05);
}

.cr-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  color: var(--cr-subtle);
  font-size: 12px;
  font-weight: 600;
}

.cr-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
}

.cr-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

.cr-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--cr-brand-line);
  background: var(--cr-brand-soft);
  color: var(--cr-brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-badge--neutral {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #334155;
}

.cr-meta-small {
  font-size: 11px;
  font-weight: 500;
  color: var(--cr-subtle);
}

.cr-card__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cr-card__title a:hover {
  color: var(--cr-brand);
}

.cr-card__by {
  margin-top: 2px;
  font-size: 12px;
  color: var(--cr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--cr-line-soft);
  font-size: 11px;
  color: var(--cr-subtle);
}

.cr-card__foot-id {
  font-weight: 600;
  color: var(--cr-muted);
  font-variant-numeric: tabular-nums;
}

/* Bookmark toggle */
.cr-bookmark {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.cr-bookmark:hover {
  background: #fff;
  color: var(--cr-brand);
}

.cr-bookmark:active {
  transform: scale(0.94);
}

.cr-bookmark svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cr-bookmark[aria-pressed="true"] {
  color: var(--cr-brand);
}

.cr-bookmark[aria-pressed="true"] svg {
  fill: currentColor;
}

/* Pagination */
.cr-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--cr-line);
  font-size: 12px;
  color: var(--cr-muted);
}

.cr-pagination-bar strong {
  color: var(--cr-ink-strong);
}

.cr-pagination ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cr-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--cr-line);
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.cr-pagination a.page-numbers:hover {
  background: var(--cr-bg);
  color: var(--cr-ink-strong);
}

.cr-pagination .page-numbers.current {
  background: var(--cr-dark);
  border-color: var(--cr-dark);
  color: #fff;
}

.cr-pagination .page-numbers.dots {
  border: 0;
  background: transparent;
  color: var(--cr-subtle);
}

.cr-pagination .page-numbers.prev,
.cr-pagination .page-numbers.next {
  padding: 0 12px;
}

/* Empty states */
.cr-empty {
  padding: 48px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--cr-radius-lg);
  color: var(--cr-muted);
}

.cr-empty strong {
  display: block;
  font-size: 16px;
  color: var(--cr-ink-strong);
  margin-bottom: 6px;
}

/* ==========================================================================
   5. Sidebar
   ========================================================================== */

.cr-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.cr-sidebar > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cr-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-lg);
  padding: 20px;
  box-shadow: var(--cr-shadow-card);
}

.cr-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cr-panel__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cr-ink-strong);
}

.cr-panel__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--cr-brand);
}

.cr-panel__link:hover {
  text-decoration: underline;
}

.cr-trending {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cr-trending li {
  min-width: 0;
}

.cr-trending a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6px;
  margin: 0;
  border-radius: 12px;
  transition: background 0.2s;
}

.cr-trending a:hover {
  background: var(--cr-bg);
}

.cr-trending__thumb {
  width: 56px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cr-line);
  background: #e2e8f0;
}

.cr-trending__thumb img,
.cr-trending__thumb .cr-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cr-trending__title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cr-ink-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cr-trending__meta {
  display: block;
  font-size: 11px;
  color: var(--cr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-spotlight__name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cr-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--cr-dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.cr-avatar--square {
  border-radius: 12px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.cr-spotlight__text {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 14px;
}

.cr-note {
  display: block;
  font-size: 12px;
  color: var(--cr-muted);
}

.cr-substrates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cr-substrates a {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
}

.cr-substrates a:hover {
  background: #e2e8f0;
  color: var(--cr-ink-strong);
}

.cr-promo {
  position: relative;
  overflow: hidden;
  border-radius: var(--cr-radius-lg);
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--cr-dark) 0%, var(--cr-dark-2) 55%, var(--cr-dark) 100%);
  box-shadow: var(--cr-shadow-premium);
}

.cr-promo::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.3);
  filter: blur(28px);
  pointer-events: none;
}

.cr-promo > * {
  position: relative;
  z-index: 1;
}

.cr-promo__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  margin-bottom: 16px;
}

.cr-promo__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(129, 140, 248, 0.25);
  color: #c7d2fe;
}

.cr-promo__title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.cr-promo__text {
  font-size: 12.5px;
  color: rgba(199, 210, 254, 0.8);
  line-height: 1.6;
  margin-bottom: 20px;
}

.cr-contact {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 16px;
  text-align: center;
  background: #f8fafc;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-lg);
}

.cr-contact strong {
  display: block;
  font-size: 13px;
  color: var(--cr-ink-strong);
  margin-bottom: 4px;
}

.cr-contact p {
  font-size: 12px;
  color: var(--cr-muted);
  margin-bottom: 8px;
}

.cr-contact a {
  display: block;
  max-width: 100%;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cr-ink-strong);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cr-contact a:hover {
  text-decoration: underline;
}

/* Sidebar placement */
@media (max-width: 1023px) {
  .cr-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .cr-sidebar .cr-panel--promo {
    display: block;
  }
}

/* ==========================================================================
   6. Single card article
   ========================================================================== */

.cr-single-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 32px 0 56px;
}

@media (min-width: 1024px) {
  .cr-single-grid {
    grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
    gap: 40px;
  }
}

.cr-article {
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (min-width: 640px) {
  .cr-article {
    padding: 40px;
  }
}

.cr-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cr-line-soft);
  font-size: 12px;
  color: var(--cr-subtle);
}

.cr-crumbs__trail {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-crumbs__trail a {
  font-weight: 600;
  color: #475569;
}

.cr-crumbs__trail a:hover {
  color: var(--cr-ink-strong);
}

.cr-crumbs__trail span[aria-hidden] {
  color: #cbd5e1;
}

.cr-crumbs__trail .cr-crumbs__current {
  color: var(--cr-ink-strong);
  font-weight: 600;
}

.cr-crumbs__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 500;
}

.cr-crumbs__meta strong {
  color: #334155;
  font-weight: 600;
}

.cr-title {
  margin-top: 24px;
  margin-bottom: 24px;
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cr-studio-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 32px;
  background: #f8fafc;
  border-radius: 16px;
}

.cr-studio-bar__who {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cr-studio-bar__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cr-ink-strong);
}

.cr-studio-bar__name .cr-icon {
  width: 16px;
  height: 16px;
  color: var(--cr-brand);
  fill: currentColor;
  stroke: none;
}

.cr-studio-bar__sub {
  font-size: 12px;
  color: var(--cr-subtle);
}

.cr-studio-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cr-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--cr-line);
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cr-chip-btn:hover {
  background: var(--cr-bg);
  color: var(--cr-ink-strong);
}

.cr-chip-btn .cr-icon {
  width: 14px;
  height: 14px;
  color: var(--cr-subtle);
}

.cr-chip-btn[aria-pressed="true"],
.cr-chip-btn.is-active {
  background: var(--cr-brand-soft);
  border-color: var(--cr-brand-line);
  color: var(--cr-brand-strong);
}

.cr-chip-btn[aria-pressed="true"] .cr-icon,
.cr-chip-btn.is-active .cr-icon {
  color: var(--cr-brand);
}

.cr-chip-btn[aria-pressed="true"] .cr-icon {
  fill: currentColor;
}

.cr-chip-btn .cr-bookmark-count {
  color: var(--cr-subtle);
  font-weight: 500;
}

.cr-body {
  font-size: 16px;
  line-height: 1.75;
  color: #334155;
}

.cr-body > * + * {
  margin-top: 1.1em;
}

.cr-body h2,
.cr-body h3 {
  margin-top: 1.8em;
  margin-bottom: 0.4em;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cr-body a {
  color: var(--cr-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cr-body blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--cr-brand-line);
  color: #475569;
}

.cr-body ul,
.cr-body ol {
  padding-left: 1.3em;
}

.cr-lead {
  font-size: 18px;
  line-height: 1.7;
  color: #1e293b;
}

.cr-figure {
  margin: 32px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.cr-figure__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cr-figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cr-figure__labels {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 1;
}

.cr-figure__label {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cr-figure__label--accent {
  background: rgba(99, 102, 241, 0.3);
  color: #e0e7ff;
}

.cr-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 20px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  color: #94a3b8;
}

.cr-figure figcaption span:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
}

.cr-section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 28px 0 8px;
  letter-spacing: -0.01em;
}

.cr-specs {
  margin: 40px 0 0;
  padding: 24px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--cr-line);
}

.cr-specs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--cr-line);
}

.cr-specs__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #334155;
}

.cr-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cr-success-soft);
  color: var(--cr-success);
  font-size: 10px;
  font-weight: 700;
}

.cr-verified::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
}

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

@media (min-width: 640px) {
  .cr-specs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cr-specs__grid dt {
  font-size: 12px;
  color: var(--cr-subtle);
  font-weight: 500;
  margin-bottom: 4px;
}

.cr-specs__grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.cr-specs__grid a {
  color: var(--cr-brand);
}

.cr-specs__grid a:hover {
  text-decoration: underline;
}

.cr-filed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--cr-line-soft);
}

.cr-filed__label {
  margin-right: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cr-subtle);
}

.cr-filed a {
  padding: 5px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.cr-filed a:hover {
  background: #e2e8f0;
  color: var(--cr-ink-strong);
}

.cr-post-nav {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

@media (min-width: 640px) {
  .cr-post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cr-post-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--cr-line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cr-post-nav a:hover {
  border-color: #cbd5e1;
  box-shadow: var(--cr-shadow-card);
}

.cr-post-nav a[rel="next"] {
  text-align: right;
}

.cr-post-nav__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cr-subtle);
  margin-bottom: 4px;
}

.cr-post-nav__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cr-ink-strong);
}

.cr-related {
  margin-top: 40px;
}

.cr-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cr-related__head h2 {
  font-size: 20px;
  font-weight: 800;
}

.cr-comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--cr-line);
}

/* ==========================================================================
   7. Generic pages, bookmarks, submit, 404
   ========================================================================== */

.cr-page-wrap {
  padding: 40px 0 56px;
}

.cr-page-narrow {
  max-width: 760px;
  margin: 0 auto;
}

.cr-page-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cr-prose {
  color: #334155;
  font-size: 16px;
  line-height: 1.75;
}

.cr-prose > * + * {
  margin-top: 1em;
}

.cr-prose a {
  color: var(--cr-brand);
  text-decoration: underline;
}

.cr-crumb-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cr-subtle);
  margin-bottom: 10px;
}

.cr-crumb-line a {
  color: #475569;
  font-weight: 500;
}

.cr-crumb-line a:hover {
  color: var(--cr-ink-strong);
}

.cr-bookmarks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cr-line);
}

.cr-bookmarks-head p {
  margin-top: 6px;
  color: var(--cr-muted);
  max-width: 60ch;
}

.cr-bookmarks-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cr-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M19 9l-7 7-7-7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.cr-select:focus {
  outline: none;
  border-color: var(--cr-brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.cr-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.cr-tabs::-webkit-scrollbar {
  display: none;
}

.cr-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--cr-line);
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cr-tab:hover {
  border-color: #cbd5e1;
  color: var(--cr-ink-strong);
}

.cr-tab[aria-selected="true"] {
  background: var(--cr-dark);
  border-color: var(--cr-dark);
  color: #fff;
}

.cr-bookmarks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px 0 56px;
}

@media (min-width: 1024px) {
  .cr-bookmarks-layout {
    grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
  }
}

.cr-saved-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .cr-saved-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cr-saved-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--cr-shadow-card);
  transition: transform 0.25s var(--cr-ease), box-shadow 0.25s var(--cr-ease);
}

.cr-saved-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cr-shadow-hover);
}

.cr-saved-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
}

.cr-saved-card__media img,
.cr-saved-card__media .cr-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cr-saved-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.cr-saved-card__title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.cr-saved-card__title a:hover {
  color: var(--cr-brand);
}

.cr-saved-card__by {
  margin-top: 4px;
  font-size: 12px;
  color: var(--cr-muted);
}

.cr-saved-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--cr-line-soft);
}

.cr-saved-card__foot .cr-badge {
  font-size: 10px;
}

.cr-saved-empty {
  display: none;
  padding: 48px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: var(--cr-muted);
  grid-column: 1 / -1;
}

.cr-saved-empty.is-visible {
  display: block;
}

.cr-saved-empty strong {
  display: block;
  color: var(--cr-ink-strong);
  font-size: 16px;
  margin-bottom: 6px;
}

.cr-saved-grid li[hidden] {
  display: none;
}

.cr-notes {
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-lg);
  padding: 20px;
  box-shadow: var(--cr-shadow-card);
}

.cr-notes__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cr-notes__head h3 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cr-ink-strong);
}

.cr-notes p.cr-note {
  margin-bottom: 10px;
}

.cr-textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #1e293b;
  background: var(--cr-bg);
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  resize: vertical;
}

.cr-textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--cr-brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.cr-notes__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--cr-subtle);
}

.cr-link-btn {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.cr-link-btn:hover {
  color: var(--cr-ink-strong);
  text-decoration: underline;
}

/* Submit form */
.cr-submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 32px 0 56px;
}

@media (min-width: 1024px) {
  .cr-submit-layout {
    grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
    gap: 40px;
  }
}

.cr-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.cr-form-section {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.cr-form-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cr-line-soft);
}

.cr-form-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--cr-ink-strong);
  padding: 0;
  margin: 0;
}

.cr-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--cr-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cr-form-section__note {
  font-size: 12px;
  color: var(--cr-subtle);
  white-space: nowrap;
}

.cr-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 640px) {
  .cr-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cr-form-grid .cr-field--full {
    grid-column: 1 / -1;
  }
}

.cr-field label,
.cr-field .cr-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}

.cr-field label .cr-optional {
  font-weight: 400;
  color: var(--cr-subtle);
}

.cr-field__hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--cr-subtle);
}

.cr-input,
.cr-field select,
.cr-field input[type="text"],
.cr-field input[type="url"],
.cr-field input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cr-input::placeholder,
.cr-field input::placeholder,
.cr-field textarea::placeholder {
  color: #94a3b8;
}

.cr-input:focus,
.cr-field select:focus,
.cr-field input:focus,
.cr-field textarea:focus {
  outline: none;
  border-color: var(--cr-brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.cr-field select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M19 9l-7 7-7-7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  padding-right: 36px;
  cursor: pointer;
}

.cr-field textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cr-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .cr-checks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cr-check {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cr-check:hover {
  border-color: #cbd5e1;
}

.cr-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cr-check span {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}

.cr-check:has(input:checked) {
  border-color: var(--cr-dark);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--cr-dark);
}

.cr-check:has(input:focus-visible) {
  outline: 2px solid var(--cr-focus);
  outline-offset: 2px;
}

.cr-dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(248, 250, 252, 0.6);
  transition: border-color 0.2s, background 0.2s;
}

.cr-dropzone:hover,
.cr-dropzone:focus-within {
  border-color: #94a3b8;
  background: #f8fafc;
}

.cr-dropzone__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cr-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.cr-dropzone h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cr-dropzone p {
  font-size: 12px;
  color: var(--cr-muted);
  max-width: 48ch;
  margin: 0 auto 14px;
}

.cr-file-input {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  font-size: 12px;
  color: #475569;
}

.cr-file-input::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.cr-file-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: #475569;
}

.cr-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
}

.cr-file-list li span:last-child {
  color: var(--cr-subtle);
  white-space: nowrap;
}

.cr-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--cr-line);
  border-radius: 12px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
}

.cr-tip .cr-icon {
  color: #475569;
  margin-top: 2px;
}

.cr-tip strong {
  color: var(--cr-ink-strong);
}

.cr-submit-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--cr-line);
}

.cr-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
  cursor: pointer;
}

.cr-consent input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--cr-dark);
}

.cr-submit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .cr-submit-actions {
    flex-direction: row;
    align-items: center;
  }
}

.cr-submit-actions .cr-btn {
  padding: 13px 22px;
  font-size: 14px;
  border-radius: 999px;
}

.cr-submit-foot__note {
  font-size: 11.5px;
  color: var(--cr-subtle);
}

.cr-alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid;
}

.cr-alert--success {
  background: var(--cr-success-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.cr-alert--error {
  background: var(--cr-danger-soft);
  border-color: #fecaca;
  color: var(--cr-danger);
}

.cr-login-box {
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-lg);
  box-shadow: var(--cr-shadow-card);
}

.cr-login-box p {
  color: var(--cr-muted);
  margin-bottom: 18px;
}

/* Dark promo block (sidebar-style), reused on submit & bookmarks */
.cr-dark-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--cr-radius-lg);
  background: linear-gradient(135deg, var(--cr-dark) 0%, var(--cr-dark-2) 55%, var(--cr-dark) 100%);
  color: #fff;
  box-shadow: var(--cr-shadow-premium);
}

.cr-dark-card h3 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 8px;
}

.cr-dark-card p {
  font-size: 12.5px;
  color: rgba(199, 210, 254, 0.8);
  line-height: 1.6;
  margin-bottom: 18px;
}

.cr-dark-card .cr-btn + .cr-btn {
  margin-top: 8px;
}

.cr-dark-card .cr-btn {
  width: 100%;
}

.cr-404 {
  padding: 56px 0;
  text-align: center;
}

.cr-404 .cr-page-title {
  margin-bottom: 14px;
}

.cr-404 p {
  color: var(--cr-muted);
  max-width: 52ch;
  margin: 0 auto 20px;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

.cr-site-footer {
  background: #fff;
  border-top: 1px solid var(--cr-line);
  padding: 32px 0;
  margin-top: 48px;
  font-size: 12px;
  color: var(--cr-muted);
}

.cr-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

@media (min-width: 768px) {
  .cr-footer-inner {
    flex-direction: row;
  }
}

.cr-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cr-footer-brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cr-dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.cr-footer-brand strong {
  display: block;
  font-size: 12px;
  color: var(--cr-ink-strong);
}

.cr-footer-brand span {
  font-size: 11px;
  color: var(--cr-subtle);
}

.cr-footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
}

.cr-footer-menu a {
  padding: 0;
  background: none !important;
  font-weight: 500;
  color: #475569;
}

.cr-footer-menu a:hover {
  color: var(--cr-ink-strong);
}

.cr-footer-tag {
  font-size: 11px;
  color: var(--cr-subtle);
  text-align: center;
}

@media (min-width: 768px) {
  .cr-footer-tag {
    text-align: right;
  }
}

/* ==========================================================================
   9. Comments
   ========================================================================== */

.comments-area .cr-section-title {
  margin-top: 0;
}

.comment-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.comment-list .children {
  list-style: none;
  margin: 12px 0 0 20px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--cr-line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.comment-body {
  padding: 16px;
  border: 1px solid var(--cr-line);
  border-radius: 14px;
  background: #fff;
}

.comment-meta {
  font-size: 12px;
  color: var(--cr-subtle);
  margin-bottom: 6px;
}

.comment-author .fn {
  font-weight: 700;
  color: var(--cr-ink-strong);
  font-style: normal;
}

.comment-content {
  font-size: 14px;
  color: #334155;
}

.comment-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--cr-line);
  border-radius: 10px;
  margin-bottom: 12px;
}

.comment-form input[type="submit"] {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--cr-dark);
  color: #fff;
  font-weight: 600;
}

.comment-form input[type="submit"]:hover {
  background: var(--cr-brand);
}

/* ==========================================================================
   10. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .cr-card:hover,
  .cr-saved-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   11. Supporting rules (grid items, honeypot, spec bars, sidebar text)
   ========================================================================== */

/* Honeypot field for the submit form: off-screen for people, present for bots. */
.cr-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cr-card-grid > li {
  display: flex;
  min-width: 0;
}

.cr-card-grid > li > .cr-card {
  flex: 1 1 auto;
}

.cr-trending__text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.cr-spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.cr-spec-row__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #334155;
  font-weight: 500;
}

.cr-spec-row__head strong {
  color: var(--cr-ink-strong);
  font-weight: 700;
  white-space: nowrap;
}

.cr-spec-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.cr-spec-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--cr-dark);
}

.cr-spec-row:nth-child(2) .cr-spec-bar span {
  background: #475569;
}

.cr-spec-row:nth-child(3) .cr-spec-bar span {
  background: #94a3b8;
}

.cr-bookmarks-head .cr-badge {
  align-self: center;
}

.cr-bookmark-count {
  font-variant-numeric: tabular-nums;
}
