/* Design tokens for theming */

/* Global tokens (theme-independent) */
:root {
  --font-families-mono: "IBM Plex Mono", "Courier New", Courier, monospace;
  --font-families-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
}

/* Dark theme (default) */
:root {
  --border-tertiary: rgba(255, 255, 255, 0.3);
  --border-secondary: #555555;
  --border-primary: #404040;
  --border-active: #666666;
  --text-tertiary: rgba(255, 255, 255, 0.8);
  --text-primary: #e0e0e0;
  --text-faint: rgba(255, 255, 255, 0.4);
  --text-secondary: #b0b0b0;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-subtle: rgba(255, 255, 255, 0.5);
  --background-tertiary: #252525;
  --background-primary: #181818;
  --background-secondary: #2a2a2a;
  --background-active: #333333;
  --background-hover: #333333;
  --accent-magenta: #ff00ff;
  --accent-green: #00ff00;
  --accent-blue: #0052cc;
  --accent-lightblue: #00aeef;
  --accent-purple: #662d91;
  --accent-purple-hover: #7f5aa6;
}

/* Light theme */
:root[data-theme="light"] {
  --border-tertiary: rgba(0, 0, 0, 0.2);
  --border-secondary: #b0b0b0;
  --border-primary: #d0d0d0;
  --border-active: #a0a0a0;
  --text-tertiary: rgba(0, 0, 0, 0.85);
  --text-primary: #1a1a1a;
  --text-faint: rgba(0, 0, 0, 0.45);
  --text-secondary: #333333;
  --text-muted: rgba(0, 0, 0, 0.6);
  --text-subtle: rgba(0, 0, 0, 0.5);
  --background-tertiary: #f0f0f0;
  --background-primary: #ffffff;
  --background-secondary: rgb(234, 234, 234);
  --background-active: #d8d8d8;
  --background-hover: #d8d8d8;
  --accent-magenta: #b000b0;
  --accent-green: #009000;
  --accent-blue: #0052cc;
  --accent-lightblue: #00aeef;
  --accent-purple: #662d91;
  --accent-purple-hover: #7f5aa6;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px; /* Account for sticky header (48px) + extra spacing */
}

h1 {
  font-family: "EB Garamond", serif;
  font-size: 60px;
  line-height: 1.1;
  font-weight: 400;
}

h2 {
  font-family: "EB Garamond", serif;
  font-size: 48px;
  line-height: 1.2;
  font-weight: 400;
}

body {
  font-family: var(--font-families-sans);
  background-color: var(--background-primary);
  color: var(--text-primary);
  min-height: 100vh;
  letter-spacing: 0.02em;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Title bar */
.title-bar {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-primary);
  background-color: var(--background-secondary);
  flex-shrink: 0;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.title-bar-left {
  display: flex;
  align-items: center;
}

.title-bar-logo {
  font-family: var(--font-families-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.title-bar-logo:hover {
  color: var(--accent-magenta);
}

.title-bar-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.title-bar-nav a {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.title-bar-nav a:hover {
  color: var(--text-primary);
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.content-container {
  text-align: center;
  max-width: 1200px;
}

/* Home hero section */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}

.home-hero-image {
  width: 100%;
}

.home-hero-image img {
  width: 100%;
  height: auto;
}

.home-hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.home-hero-content h1 {
  text-align: left;
  margin-bottom: 0;
}

.home-hero-content p {
  text-align: left;
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .home-hero-content {
    text-align: center;
    align-items: center;
  }

  .home-hero-content h1,
  .home-hero-content p {
    text-align: center;
  }
}

.content-container h1 {
  margin-bottom: 25px;
  color: var(--text-primary);
}

.content-container p {
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: left;
}

/* Base button styles */
.button-base {
  padding: 10px 12px;
  font-family: var(--font-families-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

/* Call-to-action button */
.cta-button {
  padding: 12px 24px;
  margin-top: 32px;
  color: white;
  background-color: var(--accent-lightblue);
  border-radius: 8px;
  width: auto;
  display: inline-block;
}

.cta-button:hover {
  background-color: var(--accent-blue);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(0);
}

/* Footer bar */
.footer-bar {
  height: 100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-top: 1px solid var(--border-primary);
  background-color: var(--background-secondary);
  flex-shrink: 0;
  box-sizing: border-box;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  font-family: var(--font-families-sans);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-magenta);
}

/* Loading and error states */
.main-content {
  transition: opacity 0.2s ease;
}

.error-message {
  color: var(--text-primary);
}

.error-message h1 {
  color: var(--accent-magenta);
}

.error-message a {
  color: var(--accent-blue);
  text-decoration: none;
}

.error-message a:hover {
  text-decoration: underline;
}

/* Legal pages (Privacy, Terms) */
.legal-last-updated {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.legal-content {
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 24px;
  margin: 32px 0 16px 0;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 18px;
  margin: 24px 0 12px 0;
  color: var(--text-primary);
}

.legal-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-content ul {
  margin-bottom: 16px;
  margin-left: 24px;
  line-height: 1.8;
}

.legal-content a {
  color: var(--accent-blue);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-back-link {
  text-align: center;
  margin-top: 48px;
}

.legal-notice-box {
  margin: 48px 0;
  padding: 24px;
  background: var(--background-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-primary);
}

.legal-notice-box p {
  margin: 0;
  line-height: 1.8;
  font-size: 14px;
}

/* Authentication UI */
.auth-button {
  color: var(--background-primary);
  background-color: var(--accent-magenta);
}

.auth-button:hover {
  background-color: var(--accent-purple);
  transform: translateY(-1px);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-account-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.user-account-link:hover {
  background-color: var(--background-hover);
  color: var(--text-primary);
}

.user-account-link .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
}

.logout-button {
  background-color: var(--background-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
}

.logout-button:hover {
  background-color: var(--background-active);
  border-color: var(--border-active);
  color: var(--text-primary);
}

/* Login form */
.login-container {
  max-width: 400px;
  width: 100%;
}

.login-container h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.login-container > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
}

.form-group input[type="email"] {
  width: 100%;
  padding: 8px 12px;
  background-color: var(--background-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: var(--font-families-sans);
  transition: border-color 0.2s ease;
}

.form-group input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-magenta);
}

.form-group input[type="email"]::placeholder {
  color: var(--text-muted);
}

.submit-button {
  width: 100%;
  background-color: var(--accent-magenta);
  color: var(--background-primary);
}

.submit-button:hover {
  background-color: var(--accent-purple);
  transform: translateY(-1px);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  background-color: var(--border-secondary);
  cursor: not-allowed;
  transform: none;
}

.message {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: left;
}

.message.success {
  background-color: rgba(0, 255, 0, 0.1);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.message.error {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff4444;
  border: 1px solid #ff4444;
}

.message.info {
  background-color: rgba(0, 102, 255, 0.1);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}

/* Account page layout */
.account-layout {
  max-width: 900px;
  margin: 48px 0;
}

.account-section.hidden {
  display: none;
}

.account-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-primary);
}

.account-section:last-of-type {
  border-bottom: none;
}

.account-section-label {
  font-size: 15px;
  color: var(--text-secondary);
  padding-top: 2px;
  font-weight: normal;
}

.account-section-content {
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.account-section-content p {
  font-size: 15px;
  text-align: left;
}

.account-section-content .form-group {
  max-width: 400px;
}

/* Subscription and Credits UI */
.subscription-plan-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.subscription-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-primary);
}

.subscription-plan-row:last-child {
  border-bottom: none;
}

.subscription-plan-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.subscription-plan-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

.subscription-trial-badge {
  display: inline-block;
  background: var(--accent-lightblue);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.subscription-no-sub {
  text-align: center;
  padding: 32px 16px;
  max-width: 800px;
  margin: 0 auto;
}

.subscription-no-sub .pricing-grid {
  grid-template-columns: 1fr;
  max-width: 500px;
}

.subscription-no-sub h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.subscription-no-sub p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.subscription-billing-toggle {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  justify-content: center;
  align-items: center;
}

.subscription-country-selector {
  margin: 16px 0;
}

.subscription-country-selector label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.subscription-country-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-primary);
  background: var(--background-secondary);
  color: var(--text-primary);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.subscription-country-select:hover {
  border-color: var(--border-active);
}

.subscription-country-select:focus {
  outline: none;
  border-color: var(--accent-lightblue);
}

.subscription-billing-option {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border-primary);
  background: var(--background-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.billing-option-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.billing-option-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.billing-option-save {
  font-size: 12px;
  color: var(--accent-green);
  margin-top: 4px;
}

.subscription-billing-option.active {
  border-color: var(--accent-lightblue);
  background: var(--background-active);
  color: var(--accent-lightblue);
}

.subscription-start-button {
  background: var(--accent-lightblue);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.subscription-start-button:hover {
  opacity: 0.9;
}

.subscription-start-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.subscription-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.subscription-button {
  background: var(--accent-purple);
  color: white;
  white-space: nowrap;
}

.subscription-button:hover {
  background: var(--accent-purple-hover);
  transform: translateY(-1px);
}

.subscription-button:active {
  transform: translateY(0);
}

.subscription-button.danger {
  background: transparent;
  color: #ff4444;
  border: 1.5px solid #ff4444;
}

.subscription-button.danger:hover {
  background: #ff4444;
  color: white;
}

.credits-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.credits-amount {
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-lightblue);
}

.credits-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.credits-overage-setting {
  margin-top: 20px;
}

.credits-overage-setting label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-primary);
}

.credits-overage-setting input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.credits-overage-help {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 30px;
}

.price-change-notification {
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.price-change-notification-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.price-change-notification-details {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.price-change-notification-dismiss {
  margin-top: 12px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Usage History Section */
.usage-refresh-button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.usage-refresh-button:hover {
  background: var(--background-hover);
  color: var(--text-primary);
}

.usage-refresh-button .material-symbols-outlined {
  font-size: 20px;
}

.usage-refresh-button.refreshing .material-symbols-outlined {
  animation: spin 0.5s linear;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.usage-history-table {
  font-size: 14px;
}

.usage-history-header {
  display: grid;
  grid-template-columns: auto 2fr 1.5fr auto;
  gap: 12px;
  padding: 12px 16px;
  background: var(--background-secondary);
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--border-primary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.usage-history-row {
  display: grid;
  grid-template-columns: auto 2fr 1.5fr auto;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-primary);
  border-top: none;
  transition: background 0.15s ease;
}

.usage-history-row:last-child {
  border-radius: 0 0 6px 6px;
}

.usage-history-row:hover {
  background: var(--background-secondary);
}

.usage-col-date {
  color: var(--text-secondary);
  font-size: 13px;
}

.usage-col-description {
  color: var(--text-primary);
}

.usage-col-metadata {
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metadata-item {
  display: inline-block;
}

.metadata-item strong {
  color: var(--text-muted);
  font-weight: 500;
}

.metadata-empty {
  color: var(--text-faint);
}

.usage-col-amount {
  text-align: right;
  color: var(--text-primary);
  font-family: var(--font-families-mono);
  font-weight: 500;
}

/* Pricing page */
.country-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.country-selector label {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.country-selector select {
  padding: 8px 32px 8px 12px;
  font-family: var(--font-families-sans);
  font-size: 15px;
  color: var(--text-primary);
  background-color: var(--background-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  appearance: none;
  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 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 200px;
}

.country-selector select:hover {
  border-color: var(--border-active);
}

.country-selector select:focus {
  outline: none;
  border-color: var(--accent-magenta);
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.billing-option {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.billing-option.active {
  color: var(--text-primary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-primary);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: var(--background-primary);
}

.billing-save-badge {
  background: var(--accent-green);
  color: var(--background-primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--background-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card-paid {
  border: 2px solid var(--accent-lightblue);
}

.pricing-card-free:hover {
  border-color: var(--border-active);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-lightblue);
  color: var(--background-primary);
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.pricing-card-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 24px;
}

.pricing-card-header h2 {
  font: var(--font-families-sans);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.pricing-amount {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-primary);
}

.pricing-period {
  font-size: 16px;
  color: var(--text-secondary);
}

.pricing-annual {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-card-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.pricing-features li span:last-child {
  flex: 1;
  color: var(--text-primary);
  text-align: left;
}

.pricing-check {
  color: var(--accent-green);
  font-size: 20px;
  flex-shrink: 0;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20;
}

.pricing-x {
  color: var(--text-muted);
  font-size: 20px;
  flex-shrink: 0;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20;
}

.pricing-button {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-family: var(--font-families-sans);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.pricing-button-primary {
  background-color: var(--accent-lightblue);
  color: var(--background-primary);
}

.pricing-button-primary:hover {
  background-color: var(--accent-blue);
  transform: translateY(-2px);
}

.pricing-button-secondary {
  background-color: var(--background-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
}

.pricing-button-secondary:hover {
  background-color: var(--background-active);
  border-color: var(--border-active);
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card-paid {
    order: -1;
  }
}

/* Articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.article-card {
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin-bottom: 48px;
}

.article-card:hover h2 {
  color: var(--accent-lightblue);
}

.article-card h2 {
  font-size: 36px;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.1;
  text-align: left;
}

.article-card .article-summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  text-align: left;
}

.article-card .article-date {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: auto;
  text-align: left;
}

/* Article detail */
.article-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: left;
}

/* Article layout with TOC */
.article-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  gap: 48px;
  align-items: flex-start;
}

/* Table of Contents */
.article-toc {
  position: sticky;
  top: 72px;
  width: 240px;
  flex-shrink: 0;
}

.article-toc h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc li {
  margin: 0;
  padding: 0;
}

.article-toc a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -12px;
}

.article-toc a:hover {
  color: var(--text-primary);
  text-decoration: none;
  border-left-color: var(--accent-lightblue);
}

.article-toc .toc-level-1 a {
  font-weight: 500;
  margin-top: 8px;
}

.article-toc .toc-level-2 a {
  font-weight: 400;
  padding-left: 24px;
  margin-left: 0;
}

/* Article detail */
.article-detail {
  max-width: 800px;
  flex: 1;
  padding: 0;
  text-align: left;
}

.article-detail h1 {
  margin-bottom: 24px;
  text-align: left;
  position: relative;
}

.article-detail h2 {
  margin-top: 68px;
  margin-bottom: 26px;
  color: var(--text-primary);
  position: relative;
}

.article-detail h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
  position: relative;
}

.heading-anchor {
  color: var(--text-muted);
  text-decoration: none !important;
  margin-left: 8px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  transition: color 0.2s ease;
}

.heading-anchor:hover {
  color: var(--accent-lightblue);
  text-decoration: none !important;
}

.article-detail p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.article-detail ul,
.article-detail ol {
  margin-left: 24px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-detail li {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.article-detail code {
  font-family: var(--font-families-mono);
  background-color: var(--background-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
}

.article-detail pre {
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.article-detail pre code {
  background: none;
  padding: 0;
}

.article-detail blockquote {
  border-left: 4px solid var(--accent-lightblue);
  padding-left: 16px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-detail a {
  color: var(--accent-lightblue);
  text-decoration: none;
}

.article-detail a:hover {
  text-decoration: underline;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.article-back-link:hover {
  color: var(--text-primary);
  text-decoration: none !important;
}

.article-back-link .material-symbols-outlined {
  font-size: 18px;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .article-layout {
    flex-direction: column;
    padding: 32px 16px;
    gap: 24px;
  }

  .article-toc {
    position: static;
    width: 100%;
    order: -1;
    background-color: var(--background-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
  }

  .article-detail {
    padding: 0;
  }

  .article-detail h1 {
    font-size: 28px;
  }

  .article-detail h2 {
    font-size: 24px;
  }

  .article-detail h3 {
    font-size: 20px;
  }
}
