/*
Theme Name: Short Report
Theme URI: https://shortreport.fyi
Author: The Short Report
Description: Custom theme matching the shortreport.fyi design
Version: 1.0.0
*/

:root {
  color-scheme: light;
  --background: #f9f9f8;
  --foreground: #18181b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --border: #e4e4e7;
  --soft-border: #f4f4f5;
  --panel: #ffffff;
  --panel-soft: #fafafa;
  --inverse: #18181b;
  --inverse-muted: #a1a1aa;
  --accent: #059669;
  --danger: #e11d48;
  --serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }

.theme-container, .site-header-inner, .site-footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  height: 80px; display: flex;
  align-items: center; justify-content: space-between; gap: 24px;
}

.brand { font-family: var(--serif); font-size: 24px; letter-spacing: 0; }

.nav { display: flex; align-items: center; gap: 24px; color: #52525b; font-size: 14px; font-weight: 500; }

.nav a:last-child {
  background: var(--inverse); color: #ffffff;
  padding: 10px 20px; transition: background-color 150ms ease;
}
.nav a:last-child:hover { background: var(--accent); }

.page-wrap { flex: 1; display: flex; flex-direction: column; }

.theme-hero {
  position: relative; overflow: hidden;
  background: #18181b; color: #ffffff; padding: 80px 0;
}
.theme-hero-bg { position: absolute; inset: 0; background: #18181b; }
.theme-hero-bg::after {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(24,24,27,0.18), transparent 68%);
  content: '';
}
.theme-hero-bg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.theme-hero-inner { position: relative; z-index: 1; max-width: 1280px; }
.theme-hero h1 {
  max-width: 900px; margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 500; line-height: 1.1;
}
.theme-hero h1 span { color: #a1a1aa; }
.theme-hero p { max-width: 640px; margin: 0 0 40px; color: #a1a1aa; font-size: clamp(20px,2vw,24px); line-height: 1.45; font-weight: 300; }

.theme-subscribe { display: flex; flex-wrap: wrap; max-width: 576px; border: 1px solid rgba(255,255,255,0.2); }
.theme-subscribe input, .theme-subscribe button { min-height: 58px; border: 0; }
.theme-subscribe input { flex: 1; min-width: 0; padding: 0 24px; outline: 0; background: transparent; color: #ffffff; font-size: 18px; }
.theme-subscribe input::placeholder { color: #52525b; }
.theme-subscribe button { padding: 0 32px; background: #ffffff; color: var(--inverse); font-weight: 500; cursor: pointer; }
.theme-form-note { margin: 16px 0 0 !important; color: #71717a !important; font-family: var(--mono); font-size: 14px !important; }

.filter-bar {
  position: sticky; top: 80px; z-index: 20;
  background: #fafafa;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(24,24,27,0.04);
}
.filter-bar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.filter-left { display: flex; align-items: center; gap: 16px; }

.filter-pill-active {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--inverse); background: var(--inverse); color: #ffffff;
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(24,24,27,0.06); white-space: nowrap;
}
.filter-pill-muted {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); background: #ffffff; color: #52525b;
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(24,24,27,0.04); white-space: nowrap;
}
.filter-context { color: #a1a1aa; font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }

.filter-button {
  align-self: stretch; display: flex; align-items: center;
  border: 0; border-left: 1px solid var(--border);
  background: transparent; color: var(--foreground);
  padding: 0 16px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.filter-button:hover { background: #e4e4e7; }

.filter-drawer-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(24,24,27,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.filter-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.filter-drawer {
  position: fixed; top: 0; right: 0; z-index: 70;
  display: flex; flex-direction: column;
  width: min(100%, 384px); height: 100vh; overflow-y: auto;
  background: #ffffff; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transform: translateX(100%); transition: transform 0.3s ease;
}
.filter-drawer.is-open { transform: translateX(0); }

.filter-drawer-header {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px; border-bottom: 1px solid #f4f4f5;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
}
.filter-drawer-header h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 700; }
.filter-drawer-header button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: transparent; color: #71717a; font-size: 28px; cursor: pointer;
}
.filter-drawer-header button:hover { background: #f4f4f5; color: var(--foreground); }

.filter-drawer-body { display: grid; gap: 40px; padding: 24px; }

.filter-group h3 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1px solid #f4f4f5;
  color: #a1a1aa; font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.filter-list { display: grid; gap: 2px; }
.filter-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 0; color: #3f3f46; font-size: 14px; font-weight: 600;
  transition: color 150ms ease;
}
.filter-list a:hover { color: var(--accent); }
.filter-list a span:last-child { color: var(--accent); opacity: 0; transition: opacity 150ms ease; }
.filter-list a:hover span:last-child { opacity: 1; }

.ticker-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ticker-list a {
  display: inline-flex; align-items: center; border-radius: 2px;
  background: #f4f4f5; color: #3f3f46;
  padding: 6px 10px; font-size: 12px; font-weight: 600;
  transition: background-color 150ms ease, color 150ms ease;
}
.ticker-list a:hover { background: var(--inverse); color: #ffffff; }

.reports-section { padding: 64px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 48px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.2; }
.result-count { color: #a1a1aa; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

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

.report-card {
  display: flex; flex-direction: column; min-height: 430px;
  overflow: hidden; background: #ffffff; border: 1px solid var(--border);
  text-decoration: none;
}
.spring-card { transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.5s cubic-bezier(0.34,1.56,0.64,1), border-color 0.2s ease; }
.spring-card:hover { transform: translateY(-4px); border-color: #a1a1aa; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }

.market-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid var(--soft-border);
  background: rgba(250,250,250,0.72);
}
.market-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.market-ticker { font-family: var(--mono); color: var(--foreground); font-size: 14px; font-weight: 700; }
.market-price { font-family: var(--mono); color: #71717a; font-size: 14px; }
.market-change {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 2px; font-family: var(--mono);
  color: #a1a1aa; font-size: 14px; font-weight: 600;
}
.market-change.is-positive { color: var(--accent); background: rgba(5,150,105,0.08); }
.market-change.is-negative { color: var(--danger); background: rgba(225,29,72,0.08); }

.card-body { flex: 1; display: flex; flex-direction: column; padding: 24px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; min-height: 25px; }
.tag-pill {
  display: inline-flex; align-items: center; border-radius: 2px;
  background: #f4f4f5; color: #52525b;
  padding: 4px 8px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.report-card h2 {
  display: -webkit-box; min-height: 120px; margin: 0 0 12px;
  overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  color: var(--foreground); font-family: var(--serif);
  font-size: 24px; font-weight: 500; line-height: 1.2; transition: color 150ms ease;
}
.report-card:hover h2 { color: #52525b; }
.report-card p { display: block; flex: 0 0 auto; margin: 0 0 24px; color: #71717a; font-size: 16px; line-height: 1.55; }

.card-footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-top: auto; padding-top: 24px; border-top: 1px solid var(--soft-border);
}
.author-list { display: flex; flex-wrap: wrap; gap: 4px 8px; width: 50%; color: var(--foreground); font-size: 12px; font-weight: 600; line-height: 1.25; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; width: 50%; color: #a1a1aa; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-align: right; text-transform: uppercase; }

.pagination-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 48px;
  color: #71717a; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.pagination-nav a, .pagination-nav span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; border: 1px solid var(--border); background: #ffffff; padding: 0 14px;
}
.pagination-nav a { color: var(--foreground); font-weight: 700; }
.pagination-nav a:hover { border-color: var(--inverse); }
.pagination-nav span[aria-disabled='true'] { color: #d4d4d8; }

.bottom-newsletter { padding: 96px 24px; background: #f4f4f5; border-top: 1px solid var(--border); }
.newsletter-card { max-width: 672px; margin: 0 auto; padding: 32px; background: #ffffff; border: 1px solid var(--border); text-align: center; }
.newsletter-card h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.newsletter-card p { margin: 0 0 24px; color: #71717a; }
.newsletter-form { display: flex; flex-wrap: wrap; max-width: 448px; margin: 0 auto; gap: 8px; }
.newsletter-form input, .newsletter-form button { min-height: 48px; border: 1px solid var(--border); }
.newsletter-form input { flex: 1; min-width: 0; padding: 0 16px; outline: 0; background: #fafafa; }
.newsletter-form button { padding: 0 24px; border-color: var(--inverse); background: var(--inverse); color: #ffffff; font-weight: 500; cursor: pointer; }

.article-page { background: #ffffff; }
.article-hero { padding-top: 48px; background: #fafafa; border-bottom: 1px solid var(--border); }
.article-hero-grid { display: flex; gap: 64px; }
.article-hero-main { flex: 1; max-width: 768px; padding-bottom: 64px; }
.article-hero-spacer { width: 320px; flex-shrink: 0; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 48px;
  color: #71717a; font-family: var(--mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; transition: color 150ms ease;
}
.back-link:hover { color: var(--foreground); }

.article-tag-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.article-pill {
  display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 2px;
  background: #ffffff; color: #52525b; padding: 6px 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.article-hero h1 {
  margin: 0 0 32px; color: var(--foreground); font-family: var(--serif);
  font-size: clamp(40px, 5vw, 60px); font-weight: 500; line-height: 1.1;
}
.article-excerpt { max-width: 672px; margin: 0 0 48px; color: #71717a; font-size: 20px; line-height: 1.55; }
.article-meta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--border);
}
.article-layout { display: flex; gap: 64px; padding-top: 64px; padding-bottom: 64px; }
.article-main { flex: 1; min-width: 0; max-width: 768px; }
.article-sidebar { width: 320px; flex-shrink: 0; }
.sidebar-stack { position: sticky; top: 128px; display: grid; gap: 32px; }

.article-content { color: #3f3f46; font-size: 18px; line-height: 1.7777778; overflow-wrap: break-word; word-break: break-word; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3, .article-content h4 { margin: 0 0 16px; color: var(--foreground); font-family: var(--sans); font-weight: 700; }
.article-content h2 { margin-top: 56px; font-size: 30px; line-height: 1.3333333; }
.article-content h3 { margin-top: 40px; font-size: 24px; line-height: 1.5; }
.article-content h4 { margin-top: 32px; font-size: 18px; line-height: 1.5555556; }
.article-content p, .article-content ul, .article-content ol, .article-content blockquote { margin: 24px 0; }
.article-content ul, .article-content ol { padding-left: 28px; }
.article-content li { margin: 12px 0; padding-left: 8px; }
.article-content a { color: var(--foreground); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.article-content strong { color: var(--foreground); font-weight: 600; }
.article-content blockquote { border-left: 4px solid var(--border); color: var(--foreground); font-style: italic; font-weight: 500; padding-left: 18px; }
.article-content hr { height: 1px; margin: 56px 0; border: 0; background: var(--border); }
.article-content img { max-width: 100%; height: auto; }

.site-footer { margin-top: auto; background: var(--inverse); color: #a1a1aa; }
.site-footer-inner { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-family: var(--mono); font-size: 12px; }

@media (max-width: 1024px) {
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-hero-grid, .article-layout { flex-direction: column; gap: 40px; }
  .article-hero-spacer { display: none; }
  .article-main, .article-hero-main { max-width: none; }
  .article-sidebar { width: 100%; }
  .sidebar-stack { position: static; }
}
@media (max-width: 720px) {
  .theme-container, .site-header-inner, .site-footer-inner { width: min(100% - 32px, 1280px); }
  .site-header-inner { height: auto; min-height: 72px; align-items: flex-start; flex-direction: column; justify-content: center; padding: 16px 0; }
  .nav { flex-wrap: wrap; gap: 14px; }
  .filter-bar { top: 0; }
  .filter-context { display: none; }
  .theme-hero { padding: 64px 0; }
  .theme-subscribe, .newsletter-form { flex-direction: column; }
  .report-grid { grid-template-columns: 1fr; }
  .report-card h2 { min-height: auto; }
  .card-footer, .article-meta-bar { align-items: flex-start; flex-direction: column; }
  .author-list, .card-meta { width: 100%; justify-content: flex-start; text-align: left; }
  .article-hero { padding-top: 32px; }
  .article-hero-main { padding-bottom: 48px; }
  .back-link { margin-bottom: 32px; }
  .article-layout { padding-top: 48px; }
  .article-content { font-size: 17px; }
  .site-footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}
