/**
 * list.css — Copper Tally archive (soft fintech cards)
 */

:root {
  --ct-bg: #EEF1F6;
  --ct-surface: #FFFFFF;
  --ct-ink: #0F172A;
  --ct-muted: #64748B;
  --ct-accent: #0D9488;
  --ct-accent-hover: #0F766E;
  --ct-accent-soft: #CCFBF1;
  --ct-border: #E2E8F0;
  --ct-max: 1200px;
  --ct-radius: 16px;
  --ct-radius-sm: 10px;
  --ct-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --ct-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
  --ct-font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

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

.ct-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body.ct-body {
  font-family: var(--ct-font);
  background: var(--ct-bg);
  color: var(--ct-ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

body.ct-body--archive {
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(13, 148, 136, 0.07) 0%, transparent 55%),
    var(--ct-bg);
}

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

.ct-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ct-card-link:focus-visible {
  outline: 3px solid var(--ct-accent);
  outline-offset: 2px;
  border-radius: var(--ct-radius-sm);
}

/* Header (shared) */
.ct-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ct-border);
}

.ct-header__row {
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ct-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  margin-right: auto;
}

.ct-brand__name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ct-nav {
  display: flex;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.ct-nav a {
  text-decoration: none;
  color: var(--ct-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.ct-nav a:hover { color: var(--ct-ink); background: var(--ct-bg); }
.ct-nav a[aria-current="page"] {
  color: var(--ct-accent);
  background: var(--ct-accent-soft);
}

.ct-header__actions { display: flex; gap: 0.35rem; }

.ct-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
  background: var(--ct-surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ct-icon-btn:hover {
  border-color: var(--ct-accent);
  box-shadow: var(--ct-shadow);
}

.ct-menu-btn { display: none; }
.ct-menu-btn__bar {
  display: block;
  width: 1rem;
  height: 2px;
  background: var(--ct-ink);
  box-shadow: 0 5px 0 var(--ct-ink), 0 -5px 0 var(--ct-ink);
}

.ct-search-drawer {
  display: none;
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 0 1.25rem 0.65rem;
}

.ct-search-drawer.is-open { display: block; }

.ct-search {
  display: flex;
  align-items: center;
  background: var(--ct-bg);
  border: 1px solid var(--ct-border);
  border-radius: 999px;
  padding: 0.2rem 0.25rem 0.2rem 1rem;
  max-width: 420px;
}

.ct-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  outline: none;
  min-width: 0;
}

.ct-search button {
  border: none;
  background: var(--ct-accent);
  color: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Page head */
.ct-page-head {
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
}

.ct-page-head h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.ct-page-head p {
  color: var(--ct-muted);
  font-size: 0.9rem;
}

.ct-page-head__count {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--ct-accent-soft);
  color: var(--ct-accent-hover);
}

/* Feature card */
.ct-archive-feature {
  max-width: var(--ct-max);
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
}

.ct-archive-feature__link {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--ct-surface);
  border-radius: var(--ct-radius);
  overflow: hidden;
  box-shadow: var(--ct-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.ct-archive-feature__link:hover {
  box-shadow: var(--ct-shadow-hover);
  transform: translateY(-2px);
}

.ct-archive-feature__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.ct-archive-feature__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ct-archive-feature__copy {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ct-archive-feature__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ct-accent);
  margin-bottom: 0.5rem;
}

.ct-archive-feature__copy h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.ct-archive-feature__copy p {
  font-size: 0.8rem;
  color: var(--ct-muted);
}

/* Card grid */
.ct-archive-grid {
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ct-archive-card {
  background: var(--ct-surface);
  border-radius: var(--ct-radius);
  overflow: hidden;
  box-shadow: var(--ct-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.ct-archive-card:hover {
  box-shadow: var(--ct-shadow-hover);
  transform: translateY(-3px);
}

.ct-archive-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.ct-archive-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ct-archive-card:hover .ct-archive-card__img img {
  transform: scale(1.03);
}

.ct-archive-card__body {
  padding: 0.85rem 1rem 1rem;
}

.ct-card__tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ct-accent);
}

.ct-archive-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.35rem 0 0.4rem;
}

.ct-archive-card time {
  font-size: 0.72rem;
  color: var(--ct-muted);
}

/* Search */
.ct-search-panel {
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ct-search-hit {
  background: var(--ct-surface);
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  margin-bottom: 0.65rem;
  box-shadow: var(--ct-shadow);
}

.ct-search-hit .ct-card-link {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  padding: 0.65rem;
}

.ct-search-hit img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.ct-empty {
  text-align: center;
  padding: 2rem;
  color: var(--ct-muted);
}

/* Footer */
.ct-footer {
  background: var(--ct-surface);
  border-top: 1px solid var(--ct-border);
  margin-top: auto;
  flex-shrink: 0;
}

.ct-footer__inner {
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
}

.ct-footer__brand p {
  font-size: 0.875rem;
  color: var(--ct-muted);
  margin-top: 0.5rem;
  max-width: 28rem;
}

.ct-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.ct-footer__nav a {
  text-decoration: none;
  color: var(--ct-ink);
}

.ct-footer__nav a:hover { color: var(--ct-accent); }

.ct-footer__legal {
  max-width: var(--ct-max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--ct-border);
  font-size: 0.68rem;
  color: var(--ct-muted);
  text-align: center;
}

.ct-footer__sep { opacity: 0.5; }

/* Legal page extras (agreement.html uses this file) */
body.ct-body--legal {
  font-family: var(--ct-font);
  line-height: 1.7;
}

.ct-legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  flex: 1 0 auto;
  width: 100%;
}

.ct-legal-panel { display: none; }
.ct-legal-panel.is-active { display: block; }

.ct-legal-panel h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.ct-legal-panel .ct-updated {
  color: var(--ct-muted);
  font-size: 0.78rem;
  margin-bottom: 1.5rem;
}

.ct-legal-panel h2 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ct-accent);
  margin: 1.75rem 0 0.65rem;
}

.ct-legal-panel p, .ct-legal-panel li { margin-bottom: 0.85rem; }
.ct-legal-panel ul { padding-left: 1.25rem; }
.ct-legal-panel a { color: var(--ct-accent-hover); }

.ct-legal-tabs {
  max-width: 720px;
  margin: 1.25rem auto 0;
  padding: 0 1.25rem;
  display: flex;
  gap: 0.35rem;
}

.ct-legal-tabs a {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ct-muted);
  border-radius: 999px;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  transition: background 0.15s, color 0.15s;
}

.ct-legal-tabs a.is-active {
  background: var(--ct-accent-soft);
  color: var(--ct-accent-hover);
  border-color: transparent;
}

/* Responsive */
@media (max-width: 1024px) {
  .ct-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-archive-feature__link { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ct-menu-btn { display: flex; }
  .ct-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 0.5rem 0;
  }
  .ct-nav.is-open { display: flex; }
  .ct-header__row { flex-wrap: wrap; }
  .ct-header,
  .ct-page-head,
  .ct-archive-feature,
  .ct-archive-grid,
  .ct-legal-wrap,
  .ct-legal-tabs {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  .ct-search {
    max-width: 100%;
    width: 100%;
  }
  .ct-archive-grid { grid-template-columns: 1fr; }
  .ct-footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-archive-card:hover, .ct-archive-feature__link:hover { transform: none; }
}
