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

body {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  background: #faf9f6;
  min-height: 100vh;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover {
  color: #555;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: #fff;
  border-bottom: 3px double #111;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.5px;
}

.nav-logo:hover {
  color: #111;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  color: #666;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #111;
}

.nav-logout {
  color: #999;
}

.nav-logout:hover {
  color: #c00;
}

.main-content {
  padding: 48px 20px 80px;
}

.page-container {
  max-width: 860px;
  margin: 0 auto;
}

.flash-container {
  max-width: 860px;
  margin: 16px auto 0;
  padding: 0 20px;
}

.flash {
  padding: 14px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 8px;
  border-left: 3px solid;
}

.flash-error {
  background: #fff5f5;
  border-color: #c00;
  color: #900;
}

.flash-success {
  background: #f5fff5;
  border-color: #2a7a2a;
  color: #1a5a1a;
}

.flash-info {
  background: #f5f8ff;
  border-color: #555;
  color: #444;
}

.hero-section {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #ddd;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  color: #111;
  margin-bottom: 12px;
  line-height: 1.15;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  color: #888;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 28px;
}

.selector-card {
  margin-bottom: 28px;
}

.selector-form .form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #222;
  font-family: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group select option {
  background: #fff;
  color: #222;
}

.form-group input::placeholder {
  color: #bbb;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #111;
}

.form-group-btn {
  flex: 0;
}

.btn {
  padding: 12px 28px;
  border: 1px solid #111;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.btn-primary:hover {
  background: #333;
  color: #fff;
}

.btn-full {
  width: 100%;
  padding: 14px;
}

.summary-section {
  margin-top: 36px;
}

.summary-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #999;
  margin-bottom: 12px;
}

.summary-card {
  margin-bottom: 36px;
  border-top: 3px solid #111;
  padding: 32px;
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding-bottom: 0;
}

.summary-ticker {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #111;
}

.summary-quarter {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border: 1px solid #ddd;
}

.summary-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 20px 0;
}

.summary-body p {
  line-height: 1.9;
  color: #444;
  font-size: 1.05rem;
  text-align: justify;
}

.features-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  background: #ddd;
  border: 1px solid #ddd;
}

.feature-card {
  background: #fff;
  padding: 32px 24px;
  text-align: center;
  transition: background 0.2s;
}

.feature-card:hover {
  background: #f5f5f0;
}

.feature-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  color: #555;
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #111;
  font-weight: 700;
}

.feature-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.6;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  border-top: 3px solid #111;
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #111;
  text-align: center;
  margin-bottom: 4px;
  font-weight: 900;
}

.auth-subtitle {
  text-align: center;
  font-family: 'Inter', sans-serif;
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .btn {
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #999;
}

.auth-footer a {
  color: #111;
  text-decoration: underline;
}

.section-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #111;
}

.section-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: #111;
  margin-bottom: 6px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.section-header p {
  font-family: 'Inter', sans-serif;
  color: #888;
  font-size: 0.9rem;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.ticker-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ticker-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-label {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: #999;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.ticker-chip:hover .chip-label {
  border-color: #111;
  color: #333;
}

.ticker-chip.selected .chip-label {
  background: #111;
  border-color: #111;
  color: #fff;
}

.sub-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.sub-count {
  font-family: 'Inter', sans-serif;
  color: #888;
  font-size: 0.85rem;
}

.filter-card {
  padding: 28px 32px;
  margin-bottom: 32px;
  border-top: 3px solid #111;
}

.filter-form .filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.filter-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.btn-secondary {
  padding: 10px 28px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #666;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: #999;
  color: #333;
}

.form-group select:disabled {
  background-color: #f5f5f3;
  color: #bbb;
  cursor: not-allowed;
}

.results-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
  margin-bottom: 16px;
}

.news-grid {
  display: grid;
  gap: 0;
}

.news-card {
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.2s;
}

.news-card:last-child {
  border-bottom: none;
}

.news-card:hover {
  background: #f9f9f5;
}

.news-header {
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-ticker {
  display: inline-block;
  padding: 3px 10px;
  background: #111;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.news-company-name {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.85rem;
  color: #888;
  font-weight: 400;
}

.news-body p {
  line-height: 1.85;
  color: #444;
  font-size: 0.95rem;
}

.empty-card {
  text-align: center;
  padding: 60px 24px;
  border: 1px solid #e0e0e0;
}

.empty-state .empty-icon {
  width: 40px;
  height: 40px;
  color: #ccc;
  margin-bottom: 16px;
}

.empty-state p {
  color: #999;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .navbar {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .selector-form .form-row {
    flex-direction: column;
  }

  .features-section {
    grid-template-columns: 1fr;
  }

  .ticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .sub-actions {
    flex-direction: column;
    gap: 12px;
  }

  .filter-form .filter-row {
    grid-template-columns: 1fr;
  }
}
