

:root {
  --max:         1200px;
  --pad-x:       40px;

  --page-bg:     #F0F2F5;
  --card-bg:     #FFFFFF;
  --nav-bg:      #FFFFFF;

  --ink-950:     #0B0F1A;
  --ink-800:     #1F2937;
  --ink-600:     #4B5563;
  --ink-400:     #000000;
  --ink-200:     #E5E7EB;
  --ink-100:     #F3F4F6;
  --ink-50:      #F9FAFB;

  --blue-600:    #2563EB;
  --blue-500:    #3B82F6;
  --blue-100:    #DBEAFE;
  --blue-50:     #EFF6FF;

  --red-500:     #EF4444;
  --red-50:      #FEF2F2;
  --red-100:     #FECACA;
  --green-600:   #16A34A;
  --green-50:    #F0FDF4;
  --green-100:   #BBF7D0;

  --border:      #E2E8F0;
  --border-hover:#CBD5E1;


  --shadow-xs:   0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:   0 1px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:   0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg:   0 12px 32px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-blue: 0 0 0 3px rgba(59, 130, 246, 0.15);



  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:      0.15s;
  --t-mid:       0.22s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--page-bg);
  color: var(--ink-600);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  width: 100%;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.header-content {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-950);
}

.brand-svg {
  width: 18px;
  height: 18px;
  color: var(--blue-600);
}

.brand-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ink-950);
}



.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-400);
  padding: 6px 14px;
  border-radius: 0;
  transition:
    color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.nav-link:hover {
  color: var(--ink-800);
  background: var(--ink-100);
}



.nav-link-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--blue-600);
  transition: background var(--t-fast) var(--ease);
}

.nav-btn:hover {
  background: var(--blue-50);
}

.nav-btn svg,
.icon-moon-btn,
.icon-sun-btn {
  width: 18px;
  height: 18px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-600);
  font-family: inherit;
}

.nav-dropdown-trigger:hover {
  color: var(--ink-950);
}

.nav-dd-arrow {
  transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dd-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: #fff;
  border: 1px solid #e2e4ea;
  border-radius: 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.06);
  padding: 6px;
  z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-dd-item {
  display: block;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-600);
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dd-item:hover {
  background: var(--ink-100);
  color: var(--ink-950);
}

.mobile-menu-btn {
  display: none;
}

.mobile-menu-btn svg {
  width: 18px;
  height: 18px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--pad-x) 14px;
  border-top: 1px solid var(--border);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-400);
  padding: 10px 12px;
  border-radius: 0;
  transition:
    color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--ink-950);
  background: var(--ink-100);
}

.page-wrapper {
  flex-grow: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.hero {
  text-align: center;
  padding: 48px 0 28px;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1.2px;
  color: var(--ink-950);
  line-height: 1.13;
  margin-bottom: 12px;
}

.hero h1 .accent {
  color: inherit;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--ink-400);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

#stickySentinel {
  height: 0;
}

.sticky-field {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px 0 8px;
  background: var(--page-bg);
  transition: all 0.2s ease;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue-600);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.input-wrapper input[type="text"] {
  width: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-950);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 15px 20px 15px 48px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  outline: none;
  caret-color: var(--blue-600);
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.input-wrapper input[type="text"]:focus {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-blue), var(--shadow-sm);
}

.input-wrapper input::placeholder {
  color: var(--ink-400);
  font-weight: 400;
}

/* Controls row */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 4px 0;
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-400);
}

.size-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 130px;
  height: 3px;
  background: var(--ink-200);
  border-radius: 0;
  outline: none;
  cursor: pointer;
}

.size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 0;
  background: var(--blue-600);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  transition: transform var(--t-fast) var(--spring);
}

.size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.size-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 0;
  background: var(--blue-600);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
  cursor: pointer;
}

.fc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.fc-section-header {
  margin-top: 28px;
  margin-bottom: 2px;
  padding-bottom: 6px;
}

.fc-section-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink-950);
}

/* Favorites section */
#favsList {
  display: none;
}

.fc-section-favs {
  margin-bottom: 4px;
}

.fc-section-header-favs {
  margin-top: 8px;
}

.fc-section-header-favs h2::before {
  background: var(--red-500);
}

.fc.fc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 16px 20px 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  transition:
    box-shadow var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    transform var(--t-mid) var(--ease);
  cursor: default;
  position: relative;
}

.fc.fc-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.fc-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-label {
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-text {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-800);
  word-break: break-word;
  overflow-wrap: break-word;
  min-height: 28px;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Noto Sans Canadian Aboriginal', 'Noto Sans Lisu', 'Noto Sans Georgian', 'Noto Sans Armenian', 'Noto Sans Ethiopic', 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
  transition: font-size var(--t-mid) var(--ease);
}

.fc-text:empty::before {
  content: 'Waiting for input…';
  color: var(--ink-200);
  font-size: 0.82rem;
  font-style: italic;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 0 8px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--blue-600);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.load-more-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.load-more-btn:active {
  transform: translateY(0);
}

.fc-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  order: 2;
  margin-left: auto;
  align-self: flex-start;
  margin-top: 2px;
}

.fc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 0;
  cursor: pointer;
  color: var(--blue-600);
  transition:
    color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--spring);
  -webkit-user-select: none;
  user-select: none;
}

.fc-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.fc-btn:hover {
  background: var(--blue-50);
  transform: scale(1.1);
}

.fc-btn:active {
  transform: scale(0.93);
}

/* Liked heart state */
.fc-btn-fav.liked {
  color: var(--red-500);
  background: var(--red-50);
}

.fc-btn-fav.liked svg {
  fill: var(--red-500);
  stroke: var(--red-500);
}

/* Copied state */
.fc-btn-copy.copied {
  color: var(--green-600);
  background: var(--green-50);
}

.seo-wrapper {
  margin: 32px 0 40px;
}

.seo-article {
  background: var(--card-bg);
  border: 1px solid var(--border);

  border-radius: 0;
  padding: 32px 40px;
  box-shadow: var(--shadow-xs);
}

.seo-content-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seo-block h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink-950);
  letter-spacing: -0.3px;
  margin-top: 20px;
  margin-bottom: 4px;
}

.seo-block:first-child h2 {
  margin-top: 0;
}

.seo-block p {
  font-size: 0.875rem;
  color: var(--ink-400);
  line-height: 1.8;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.step-card {
  padding: 20px;
  background: var(--page-bg);
  border: 1px solid var(--border);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--blue-600);
  margin-bottom: 10px;
}

.step-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-950);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.82rem;
  color: var(--ink-400);
  line-height: 1.65;
  margin: 0;
}

.uses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.use-item {
  padding: 16px 20px;
  background: var(--page-bg);
  border: 1px solid var(--border);
}

.use-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-950);
  margin-bottom: 4px;
}

.use-item p {
  font-size: 0.82rem;
  color: var(--ink-400);
  line-height: 1.65;
  margin: 0;
}

.faq-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--page-bg);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-950);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--t-fast) var(--ease);
}

.faq-item summary:hover {
  background: var(--ink-100);
}

.faq-item summary::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue-600);
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding: 0 20px 16px;
  font-size: 0.84rem;
  color: var(--ink-400);
  line-height: 1.75;
  margin: 0;
}

.faq-item a {
  color: var(--blue-600);
  text-decoration: none;
}

.faq-item a:hover {
  text-decoration: underline;
}

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

  .uses-grid {
    grid-template-columns: 1fr;
  }
}

.features-grid-section {
  margin: 32px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.feature-card {
  display: flex;
  gap: 16px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
}

.feature-card:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.feature-card:nth-last-child(-n+2) {
  border-bottom: none;
}

.feature-icon {
  flex-shrink: 0;
  color: var(--blue-600);
  margin-top: 2px;
}

.feature-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-950);
  margin-bottom: 6px;
}

.feature-body p {
  font-size: 0.82rem;
  color: var(--ink-400);
  line-height: 1.7;
  margin: 0;
}

.feature-body a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
}

.feature-body a:hover {
  text-decoration: underline;
}

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

  .feature-card:nth-child(odd) {
    border-right: none;
  }

  .feature-card:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

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

  .feature-card {
    padding: 20px 22px;
  }
}

.static-page {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 40px 48px;
  margin: 32px 0 40px;
  box-shadow: var(--shadow-xs);
}

.static-page h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink-950);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.static-updated {
  font-size: 0.78rem;
  color: var(--ink-400);
  margin-bottom: 24px;
}

.static-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-950);
  margin-top: 28px;
  margin-bottom: 8px;
}

.static-page p {
  font-size: 0.88rem;
  color: var(--ink-600);
  line-height: 1.85;
  margin-bottom: 14px;
}

.static-page ul {
  margin: 0 0 14px 20px;
  padding: 0;
}

.static-page li {
  font-size: 0.88rem;
  color: var(--ink-600);
  line-height: 1.85;
  margin-bottom: 4px;
}

.static-page a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
}

.static-page a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .static-page {
    padding: 24px 20px;
  }

  .static-page h1 {
    font-size: 1.3rem;
  }
}

.contact-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-400);
}

.form-group input,
.form-group textarea {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-950);
  background: var(--page-bg);
  border: 1.5px solid var(--border);
  padding: 12px 16px;
  outline: none;
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-blue);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-400);
  font-weight: 400;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--blue-600);
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.contact-submit:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
}

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

.contact-success {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  color: var(--green-600);
  font-size: 0.88rem;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--ink-400);
  font-weight: 500;
  white-space: nowrap;
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.footer-nav a {
  color: var(--ink-400);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 2px 0;
  transition: color var(--t-fast) var(--ease);
}

.footer-nav a:hover {
  color: var(--ink-800);
}

.footer-dot {
  color: var(--ink-300);
  font-size: 0.78rem;
  padding: 0 8px;
  user-select: none;
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink-950);
  color: #fff;
  padding: 10px 20px;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    opacity var(--t-mid) var(--ease),
    transform var(--t-mid) var(--ease);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  flex-shrink: 0;
}

.scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: var(--blue-600);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--t-mid) var(--ease),
    transform var(--t-mid) var(--ease),
    background var(--t-fast) var(--ease);
  z-index: 999;
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: #1D4ED8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-400);
}


/* Section header */
.td-section {
  margin-bottom: 8px;
}

.td-section-header {
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.td-section-header h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink-950);
  letter-spacing: -0.2px;
}

/* 3-column grid */
.td-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Individual card */
.td-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition:
    box-shadow var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease);
  cursor: default;
  min-height: 52px;
}

.td-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.td-card-text {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-800);
  word-break: break-word;
  overflow-wrap: break-word;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Noto Sans Canadian Aboriginal', 'Noto Sans Lisu', 'Noto Sans Georgian', 'Noto Sans Armenian', 'Noto Sans Ethiopic', 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
  transition: font-size var(--t-mid) var(--ease);
}

[data-theme="dark"] .td-card-text {
  color: #E2E4EA;
}

.td-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Font dropdown */
.td-controls-row {
  justify-content: space-between;
}

.td-font-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-font-select {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Noto Sans Canadian Aboriginal', 'Noto Sans Lisu', 'Noto Sans Georgian', 'Noto Sans Armenian', 'Noto Sans Ethiopic', 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-800);
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 6px 28px 6px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition:
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.td-font-select:focus {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-blue);
}

[data-theme="dark"] .td-font-select {
  color: var(--ink-800);
  background-color: var(--card-bg);
  border-color: var(--border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236B7084' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
}

@media (max-width: 960px) {
  :root {
    --pad-x: 24px;
  }

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

  .td-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-right .nav-link,
  .nav-right .nav-dropdown {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  :root {
    --pad-x: 16px;
  }

  .hero {
    padding: 32px 0 16px;
  }

  .hero h1 {
    font-size: 1.6rem;
    letter-spacing: -0.8px;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .fc.fc-card {
    padding: 14px 16px;
  }

  .fc-text {
    font-size: 0.98rem;
  }

  .seo-article {
    padding: 22px 18px;
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 18px;
    width: 38px;
    height: 38px;
  }

  .td-grid {
    grid-template-columns: 1fr;
  }

  .td-controls-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px var(--pad-x);
    gap: 10px;
  }

  .footer-nav {
    justify-content: center;
  }
}

[data-theme="dark"] .icon-moon-btn { display: none !important; }
[data-theme="dark"] .icon-sun-btn  { display: inline !important; }

[data-theme="dark"] {
  --page-bg:     #13141F;
  --card-bg:     #1C1D2E;
  --nav-bg:      #181928;

  --ink-950:     #F1F2F6;
  --ink-800:     #D1D5DB;
  --ink-600:     #A0A4B0;
  --ink-400:     #E5E7EB;
  --ink-200:     #2E3045;
  --ink-100:     #252738;
  --ink-50:      #1E2030;

  --blue-600:    #6B8AFF;
  --blue-500:    #7B96FF;
  --blue-100:    #2A3158;
  --blue-50:     #1E2340;

  --red-500:     #F87171;
  --red-50:      #2D1B1B;
  --red-100:     #3D2424;
  --green-600:   #34D399;
  --green-50:    #1A2D24;
  --green-100:   #1E3A2B;

  --border:      #2A2C40;
  --border-hover:#3A3D58;


  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm:   0 1px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-blue: 0 0 0 3px rgba(107, 138, 255, 0.15);
}

[data-theme="dark"] .fc-text {
  color: #E2E4EA;
}

[data-theme="dark"] .seo-article {
  border-top-color: var(--blue-600);
}

[data-theme="dark"] .toast {
  background: #E2E4EA;
  color: #13141F;
}

[data-theme="dark"] .scroll-top-btn {
  background: var(--blue-600);
  box-shadow: 0 4px 14px rgba(107, 138, 255, 0.3);
}

[data-theme="dark"] .site-footer {
  border-top-color: var(--border);
  background: var(--nav-bg);
}

[data-theme="dark"] .mobile-nav {
  border-top-color: var(--border);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2E3045;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3A3D58;
}

/* Smooth theme transition */
body,
.site-header,
.fc.fc-card,
.td-card,
.input-wrapper input,
.seo-article,
.site-footer,
.nav-btn,
.nav-link,
.fc-btn,
.toast,
.scroll-top-btn,
.sticky-field,
.td-font-select {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}




.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 120px;
  min-height: 50vh;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  letter-spacing: -6px;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue-600), #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  animation: error-pulse 3s ease-in-out infinite;
}

@keyframes error-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.98); }
}

.error-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink-950);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.error-message {
  font-size: 0.92rem;
  color: var(--ink-400);
  max-width: 360px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #fff;
  background: var(--blue-600);
  border: none;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition:
    background var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    transform var(--t-fast) var(--spring);
}

.error-btn:hover {
  background: #1D4ED8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.error-btn:active {
  transform: translateY(0) scale(0.97);
}

@media (max-width: 640px) {
  .error-code {
    font-size: 5rem;
    letter-spacing: -4px;
  }
  .error-heading {
    font-size: 1.15rem;
  }
  .error-page {
    padding: 60px 16px 80px;
  }
}
