:root {
    --primary: #e5322d;
    --primary-dark: #c62824;
    --brand-red: #e5322d;
    --brand-red-hover: #c62824;
    --brand-dark: #1f2933;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #dbe3ec;
    --text: #17212b;
    --text-muted: #5d6b7b;
    --success: #1ea97c;
    --error: #d63d3d;
    --shadow-sm: 0 2px 10px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 10px 24px rgba(16, 24, 40, 0.12);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Manrope, "Segoe UI", "Helvetica Neue", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    max-width: 100%;
}

.page {
    width: min(1180px, 100% - 2rem);
    margin-inline: auto;
}

.site-main {
    min-height: calc(100vh - 170px);
    padding: 2rem 0 3rem;
}

.page-fade {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.site-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
}

.site-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--brand-red);
    font-size: 0.82rem;
}

.site-logo-text {
    letter-spacing: -0.01em;
    font-size: 1.05rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link,
.nav-contact {
    min-height: 42px;
    padding: 0 0.8rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #3d4956;
}

.nav-link:hover,
.nav-link.is-active {
    background: #ffeceb;
    color: var(--brand-red);
}

.nav-contact {
    background: var(--brand-red);
    color: #fff;
}

.nav-contact:hover {
    background: var(--brand-red-hover);
    color: #fff;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    background: #2f3a47;
}

.hero-home {
    text-align: center;
    padding: 1.5rem 0 1.2rem;
}

.hero-home h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4.6vw, 3.2rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.primary-cta {
    margin-top: 1.2rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.95rem;
    background: var(--brand-red);
    color: #fff;
}

.primary-cta:hover {
    background: var(--brand-red-hover);
}

.benefit-bar {
    margin: 1.6rem 0 2.2rem;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #324152;
    box-shadow: var(--shadow-sm);
}

.section-block {
    margin: 2rem 0;
}

.section-head {
    margin-bottom: 0.95rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.8vw, 1.8rem);
    letter-spacing: -0.01em;
}

.section-link {
    color: var(--brand-red);
    font-weight: 800;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.cards-grid.tools-3-up {
    grid-template-columns: 1fr;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 100px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.tool-card.compact {
    min-height: 82px;
    padding: 0.85rem;
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffefee;
}

.tool-card-icon svg {
    width: 23px;
    height: 23px;
}

.tool-card-title {
    display: block;
    font-size: 0.97rem;
    font-weight: 800;
    line-height: 1.35;
}

.tool-card-text {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.89rem;
    line-height: 1.4;
}

.breadcrumbs {
    margin-bottom: 0.85rem;
    color: #6d7b89;
    font-size: 0.86rem;
}

.breadcrumbs ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.breadcrumbs li + li::before {
    content: ">";
    margin-right: 0.35rem;
    color: #9aa5b1;
}

.tool-hero {
    margin-bottom: 1.2rem;
}

.tool-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4.4vw, 2.55rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.tool-subtitle {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.benefits {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.46rem;
}

.how-to-section,
.use-cases-section,
.format-info-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}
.how-to-section h2,
.use-cases-section h2,
.format-info-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 20px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.step-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}
.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.step-text {
    font-size: 13px;
    color: #424242;
    line-height: 1.5;
    padding-top: 6px;
}
.use-cases-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
}
.use-cases-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 13px;
    color: #424242;
    line-height: 1.5;
}
.use-cases-list li::before {
    content: '✓';
    color: #43a047;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.format-info-section p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.blog-listing {
  padding: 24px 0 8px;
}

.blog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 24px;
}

.blog-filter {
  border: 1px solid #ececec;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #666;
}

.blog-filter.is-active,
.blog-filter:hover {
  border-color: #ffd3d3;
  color: var(--primary);
  background: #fff4f4;
}

.blog-post {
  max-width: 740px;
  margin: 0 auto;
  padding: 40px 24px;
}

.post-header {
  margin-bottom: 32px;
}

.post-category-badge {
  display: inline-block;
  background: #FFEBEE;
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.post-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: #212121;
  line-height: 1.25;
  margin: 0 0 12px;
}

.post-meta {
  font-size: 13px;
  color: #9E9E9E;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.post-tool-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FFF8F8;
  border: 2px solid #FFCDD2;
  border-radius: 14px;
  padding: 16px 20px;
  margin: 24px 0;
}

.post-tool-cta-icon .tool-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffdede;
}

.post-tool-cta-icon .tool-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.post-tool-cta-text {
  flex: 1;
  font-size: 14px;
  color: #424242;
}

.post-tool-cta-text strong {
  color: #212121;
}

.post-tool-cta-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.post-tool-cta-btn:hover {
  background: var(--primary-dark);
}

.post-content {
  font-size: 16px;
  color: #333333;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #212121;
  margin: 32px 0 14px;
}

.post-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #212121;
  margin: 24px 0 10px;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content strong {
  font-weight: 700;
  color: #212121;
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: white;
  border: 1px solid #EEEEEE;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: all 0.2s;
}

.blog-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.blog-card-body {
  padding: 20px;
}

.blog-card-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #212121;
  line-height: 1.4;
  margin: 0 0 10px;
}

.blog-card-excerpt {
  font-size: 13px;
  color: #757575;
  line-height: 1.5;
  margin-bottom: 14px;
}

.blog-card-meta {
  font-size: 12px;
  color: #BDBDBD;
  display: flex;
  gap: 8px;
}

.sitemap-page h1 {
  margin-top: 0;
}

.sitemap-page h2 {
  margin-top: 26px;
}

.sitemap-page ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.sitemap-page li {
  margin-bottom: 6px;
}

.sitemap-page a {
  color: var(--primary);
}

.benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2f3d4c;
    font-size: 0.93rem;
    font-weight: 700;
}

.check-icon {
    width: 18px;
    height: 18px;
    color: var(--brand-red);
    flex: 0 0 18px;
}

.ad-slot {
    display: block;
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
    visibility: hidden;
}

.ad-slot::before {
    content: "";
}

.ad-slot-tool-top,
.ad-slot-tool-bottom {
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.upload-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1rem;
    text-align: center;
}

.tool-unavailable {
    background: #FFF3E0;
    border: 2px solid #FFB74D;
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    margin: 24px 0;
}

.tool-unavailable p {
    font-size: 16px;
    color: #E65100;
    margin-bottom: 8px;
}

.upload-area {
    border: 2px dashed #ccd7e2;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    padding: 1.45rem 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-area.dragover {
    border-color: var(--brand-red);
    background: #fff4f3;
}

.upload-icon {
    width: 54px;
    height: 54px;
    color: var(--brand-red);
}

.upload-title {
    margin: 0.5rem 0 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.upload-or {
    margin: 0.78rem 0;
    color: #8f9baa;
    font-size: 0.85rem;
    font-weight: 800;
}

.upload-btn,
.action-btn,
.download-btn,
.retry-btn,
.result-download-btn,
.result-secondary-btn {
    border: 0;
    border-radius: var(--radius-sm);
    min-height: 46px;
    padding: 0 1.15rem;
    font-size: 0.94rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upload-btn,
.action-btn,
.result-download-btn {
    background: var(--brand-red);
    color: #fff;
}

.upload-btn:hover,
.action-btn:hover,
.result-download-btn:hover {
    background: var(--brand-red-hover);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.download-btn {
    background: var(--success);
    color: #fff;
}

.retry-btn,
.result-secondary-btn {
    background: #e9eef5;
    color: #2f3d4c;
}

.upload-note {
    margin: 0.65rem 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.upload-file-name {
    margin-top: 0.62rem;
    font-weight: 700;
    color: #2e3c4a;
    font-size: 0.9rem;
}

.tool-options {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.tool-options h3 {
    font-size: 15px;
    font-weight: 600;
    color: #212121;
    margin: 0 0 16px;
}

.option-group {
    margin-bottom: 16px;
}

.required-asterisk {
    color: #c62828;
    font-weight: 700;
}

.option-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #424242;
    margin-bottom: 6px;
}

.option-group input[type="text"],
.option-group input[type="number"],
.option-group input[type="password"],
.option-group select,
.option-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #212121;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.option-group input:focus,
.option-group select:focus,
.option-group textarea:focus {
    border-color: var(--primary);
}

.option-helper {
    font-size: 12px;
    color: #757575;
    margin-top: 4px;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    font-size: 13px;
    color: #1565c0;
}

.segment-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.segment-btn {
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #212121;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.segment-btn.selected {
    border-color: var(--primary);
    background: #fff5f5;
    color: var(--primary);
}

.option-error {
    font-size: 12px;
    color: #c62828;
    margin-top: 4px;
    display: none;
}

.option-error.visible {
    display: block;
}

.option-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.rotation-buttons {
    display: flex;
    gap: 12px;
}

.rotation-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.rotation-btn.selected {
    border-color: var(--primary);
    background: #fff5f5;
    color: var(--primary);
    font-weight: 600;
}

.compress-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.compress-preset {
    padding: 14px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.compress-preset .preset-name {
    font-size: 14px;
    font-weight: 600;
    color: #212121;
}

.compress-preset .preset-desc {
    font-size: 11px;
    color: #757575;
    margin-top: 4px;
}

.compress-preset.selected {
    border-color: var(--primary);
    background: #fff5f5;
}

.compress-preset.selected .preset-name {
    color: var(--primary);
}

.quality-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quality-slider-wrap input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}

.quality-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

.preset-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #212121;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.preset-btn.selected {
    border-color: var(--primary);
    background: #fff5f5;
    color: var(--primary);
}

.password-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-toggle {
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #424242;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.merge-list-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #212121;
}

.merge-counter {
    margin: 8px 0 0;
    font-size: 12px;
    color: #616161;
    font-weight: 600;
}

.merge-file-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.merge-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.merge-file-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.merge-file-actions {
    display: inline-flex;
    gap: 6px;
}

.merge-file-actions button {
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #424242;
    border-radius: 7px;
    min-width: 30px;
    min-height: 30px;
    font-size: 12px;
    cursor: pointer;
}

.inline-result {
    background: #f0fff4;
    border: 1px solid #a5d6a7;
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.inline-panel {
    margin: 1rem auto 0;
    max-width: 720px;
    text-align: left;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.inline-panel label,
.input-row label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #324355;
}

.inline-panel input,
.inline-panel select,
.inline-panel textarea {
    width: 100%;
    margin-top: 0.25rem;
    min-height: 42px;
    border-radius: 9px;
    border: 1px solid #c8d2de;
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    font-size: 0.93rem;
    color: #213142;
    background: #fff;
}

.inline-panel textarea {
    min-height: 180px;
    resize: vertical;
}

.status-box,
.result-box,
.error-box {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 0.95rem;
}

.error-box {
    border-color: #f0c4c4;
    background: #fff8f8;
}

.status-line,
.error-line {
    margin: 0;
}

.status-line {
    color: #314052;
}

.error-line {
    color: var(--error);
    font-weight: 700;
}

.spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 0.55rem;
    border: 3px solid #edf2f7;
    border-top-color: var(--brand-red);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

.more-tools {
    margin-top: 2rem;
}

.more-tools h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.2rem, 2.6vw, 1.65rem);
}

    /* ── FAQ Section ─────────────────────────────────────────────────── */
    .section-title {
        margin: 0 0 0.85rem;
        font-size: clamp(1.2rem, 2.6vw, 1.5rem);
        font-weight: 700;
        color: var(--text-primary, #15212e);
    }

    .tool-faq {
        margin-top: 2rem;
    }

    .faq-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .faq-item {
        border: 1px solid var(--border, #dde3ec);
        border-radius: 8px;
        padding: 0;
        overflow: hidden;
    }

    .faq-item summary {
        cursor: pointer;
        padding: 0.85rem 1rem;
        font-weight: 600;
        font-size: 0.95rem;
        list-style: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

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

    .faq-item summary::after {
        content: '+';
        font-size: 1.2rem;
        font-weight: 400;
        flex-shrink: 0;
        transition: transform 0.2s ease;
    }

    .faq-item[open] summary::after {
        transform: rotate(45deg);
    }

    .faq-item p {
        margin: 0;
        padding: 0 1rem 0.85rem;
        font-size: 0.9rem;
        color: var(--text-secondary, #4a5568);
        line-height: 1.6;
    }

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21, 33, 46, 0.62);
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.loading-overlay.is-visible {
    display: flex;
}

.loading-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 1.2rem;
    text-align: center;
}

.loading-file-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #ffefee;
}

.loading-file-name {
    margin: 0.65rem 0 0;
    font-weight: 700;
    color: #2a3a4a;
}

.loading-title {
    margin: 0.6rem 0 0;
    font-size: 1.06rem;
    font-weight: 800;
}

.loading-subtitle {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0.9rem auto 0;
    border: 4px solid #edf1f6;
    border-top-color: var(--brand-red);
    border-radius: 50%;
    animation: spin 0.95s linear infinite;
}

.loading-progress {
    height: 9px;
    margin-top: 0.95rem;
    border-radius: 999px;
    background: #eef2f8;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 45%;
    background: linear-gradient(90deg, #ff988f, var(--brand-red));
    border-radius: inherit;
    animation: pulseProgress 1.4s ease-in-out infinite;
}

@keyframes pulseProgress {
    0% { margin-left: -20%; }
    50% { margin-left: 35%; }
    100% { margin-left: 100%; }
}

.result-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: start;
}

.result-main-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem;
    text-align: center;
}

.result-status-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
}

.result-status-icon.success {
    color: #fff;
    background: var(--success);
}

.result-status-icon.error {
    color: #fff;
    background: var(--error);
}

.result-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
    letter-spacing: -0.01em;
}

.result-file-name {
    margin: 0.45rem 0 0;
    font-weight: 700;
    color: #2c3d4f;
    word-break: break-word;
}

.result-file-size {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.result-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    justify-content: center;
    align-items: center;
}

.result-security-note {
    margin-top: 0.9rem;
    color: #4f6073;
    font-weight: 700;
    font-size: 0.9rem;
}

.ad-slot-result-top,
.ad-slot-result-bottom {
    min-height: 96px;
    margin-top: 0.95rem;
}

.result-sidebar {
    display: none;
}

.ad-slot-result-sidebar {
    height: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
    visibility: hidden;
}

.result-more-tools {
    margin-top: 1.6rem;
}

.result-tools-grid .tool-card {
    min-height: 84px;
}

.site-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.8);
    margin-top: 80px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.footer-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 280px;
}

.footer-trust {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.footer-col ul li a {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-col ul li:last-child a {
    color: var(--primary);
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal a {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-legal a:hover {
    color: white;
}

.tool-last-updated {
        margin: 0.35rem 0 0.9rem;
        font-size: 12px;
        color: #7f8b97;
        font-weight: 600;
}

@media (min-width: 560px) {
    .benefit-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .cards-grid.tools-3-up {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .input-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-actions {
        flex-direction: row;
    }
}

@media (min-width: 860px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cards-grid.tools-3-up {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1040px) {
    .cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .result-layout {
        grid-template-columns: minmax(0, 2.1fr) minmax(250px, 0.9fr);
    }

    .result-sidebar {
        display: block;
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 0.55rem;
        box-shadow: var(--shadow-sm);
        flex-direction: column;
        align-items: stretch;
    }

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

    .nav-link,
    .nav-contact {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .compress-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .rotation-buttons {
        flex-direction: column;
    }
}

.editor-page {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-rows: 60px 1fr;
    height: calc(100vh - 60px);
    gap: 0;
}

.editor-topbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    height: 60px;
}

.editor-topbar .file-name {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
}

.editor-topbar .file-meta {
    font-size: 12px;
    color: #757575;
}

.editor-topbar .back-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    margin-right: 8px;
}

.editor-canvas {
    background: #f0f0f0;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.pages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 800px;
}

.page-thumb {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s;
    width: 136px;
}

.page-thumb:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.page-thumb canvas {
    display: block;
    border-radius: 4px;
    width: 120px !important;
    height: auto !important;
}

.page-num {
    font-size: 11px;
    color: #757575;
    margin-top: 6px;
    display: block;
}

.editor-panel {
    background: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    width: 320px;
    min-width: 320px;
    flex-shrink: 0;
    overflow-y: auto;
}

.editor-panel-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    font-weight: 600;
    color: #212121;
}

.editor-panel-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.editor-panel-body .option-group {
    margin-bottom: 20px;
}

.editor-panel-body label {
    font-size: 13px;
    font-weight: 500;
    color: #424242;
    margin-bottom: 8px;
    display: block;
}

.editor-panel-body input,
.editor-panel-body select,
.editor-panel-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.editor-panel-body input:focus,
.editor-panel-body select:focus {
    border-color: var(--primary);
    outline: none;
}

.editor-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.editor-action-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.editor-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.editor-action-btn:active {
    transform: translateY(0);
}

.editor-action-btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .editor-page {
        grid-template-columns: 1fr 280px;
        grid-template-rows: 60px 1fr;
        height: calc(100vh - 60px);
    }

    .editor-canvas {
        min-width: 0;
        overflow-y: auto;
    }

    .editor-panel {
        width: 280px;
        min-width: 280px;
        flex-shrink: 0;
        overflow-y: auto;
    }
}

@media (max-width: 767px) {
    .editor-page {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .editor-canvas {
        height: 300px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 16px;
    }

    .pages-grid {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .page-thumb {
        flex-shrink: 0;
        width: 80px;
    }

    .page-thumb canvas {
        width: 64px !important;
    }

    .editor-panel {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        width: 100%;
        min-width: 0;
        padding-bottom: 80px;
    }

    .editor-panel-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e0e0e0;
        padding: 12px 16px;
        z-index: 100;
    }

    .editor-topbar {
        position: sticky;
        top: 0;
        z-index: 20;
    }
}

.tool-icon-img {
    width: 40px;
    height: 40px;
}

.tool-icon-img[src=""],
.tool-icon-img:not([src]) {
    background: #f0f0f0;
    border-radius: 8px;
    display: block;
}

/* Colorful per-tool SVG icons (iLovePDF style) */
.tool-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    flex-shrink: 0;
}

.tool-icon-wrap svg {
    width: 26px;
    height: 26px;
}

/* Compact list-style cards */
.tool-card-list .tool-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin: 0;
}

.tool-card-list .tool-icon-wrap svg {
    width: 20px;
    height: 20px;
}

/* Override: compact tool cards use smaller icon */
.tool-card.compact .tool-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

/* UI Fix Sprint: calculator forms and result cards */
.calc-wrapper {
    max-width: 560px;
    margin: 0 auto 2rem;
    padding: 32px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.calc-form .form-group,
.calc-form label {
    display: block;
    margin-bottom: 20px;
}

.calc-form label {
    font-size: 14px;
    font-weight: 600;
    color: #424242;
}

.calc-form input[type="date"],
.calc-form input[type="number"],
.calc-form select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    color: #212121;
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
}

.calc-form input:focus,
.calc-form select:focus {
    border-color: var(--primary);
}

.calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 40px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    width: 100%;
}

.calc-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.3);
}

.calc-result {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 28px 32px;
    margin-top: 24px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.calc-result-item {
    text-align: center;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.calc-result-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.calc-result-label {
    font-size: 12px;
    color: #757575;
    margin-top: 4px;
    font-weight: 500;
}

.age-result-main {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
}

.age-result-sub {
    font-size: 16px;
    color: #757575;
    text-align: center;
    margin-bottom: 24px;
}

/* Related tools cards */
.related-tools-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.related-tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.related-tool-icon .tool-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin: 0;
}

.related-tool-icon .tool-icon-wrap svg {
    width: 20px;
    height: 20px;
}

.related-tool-info {
    flex: 1;
    min-width: 0;
}

.related-tool-name {
    font-size: 13px;
    font-weight: 600;
    color: #212121;
}

.related-tool-desc {
    font-size: 11px;
    color: #9e9e9e;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-tool-arrow {
    color: #bdbdbd;
    flex-shrink: 0;
}

/* Footer mode controls */
body.editor-mode .site-footer {
    display: none;
}

body.editor-mode header,
body.editor-mode .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

body.result-mode .site-footer {
    margin-top: 24px;
}

body.result-mode .site-footer .footer-main {
    display: none;
}

body.result-mode .site-footer .footer-bottom {
    border-top: 0;
}

/* Remove pages panel */
.remove-pages-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 16px;
}

.remove-pages-main {
    min-width: 0;
}

.pages-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 12px 0;
    max-height: min(62vh, 560px);
    overflow-y: auto;
    padding-right: 4px;
}

.page-select-thumb {
    position: relative;
    background: #fff;
    border: 2px solid #d9d9d9;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
}

.page-select-thumb:hover {
    border-color: #e2231a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.page-select-thumb.selected {
    border: 2px dashed #e2231a;
}

.page-select-preview {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #f7f7f7;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-select-canvas {
    width: 100%;
    height: auto;
    display: block;
}

.remove-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.66);
    border-radius: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #e2231a;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.page-select-thumb.selected .remove-overlay {
    display: flex;
}

.page-select-label {
    margin-top: 10px;
    font-size: 13px;
    color: #444;
    font-weight: 600;
}

.remove-pages-sidebar {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.remove-pages-total {
    margin: 0 0 14px;
    font-size: 18px;
    color: #2d2d2d;
}

.remove-pages-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 8px;
}

.remove-pages-input {
    width: 100%;
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid #cfcfcf;
    padding: 0 10px;
    font-size: 14px;
    margin-bottom: 10px;
}

.remove-pages-input:focus {
    border-color: #e2231a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.14);
}

.remove-pages-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.remove-pages-link {
    border: none;
    background: transparent;
    color: #e2231a;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    min-height: 0;
    cursor: pointer;
}

.remove-pages-link:hover {
    text-decoration: underline;
}

.selected-count {
    font-size: 13px;
    font-weight: 600;
    color: #757575;
    margin: 4px 0 12px;
}

.remove-warning {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #e65100;
    margin-top: 8px;
}

.remove-pages-submit {
    margin-top: auto;
    width: 100%;
    border: none;
    border-radius: 10px;
    background: #e2231a;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    min-height: 54px;
}

.remove-pages-submit:hover {
    background: #c51f17;
}

@media (max-width: 1024px) {
    .remove-pages-layout {
        grid-template-columns: 1fr;
    }

    .pages-select-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

/* Converter tool page layout */
.tool-page-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Shared individual tool workspace styling */
.text-tool-shell {
    max-width: 1040px;
    margin: 0 auto;
}

.text-tool-hero-card {
    margin-bottom: 1.1rem;
    border: 1px solid #e4e9f0;
    border-radius: 18px;
    padding: 1.2rem 1.3rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(229, 50, 45, 0.1), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.text-tool-kicker {
    display: inline-block;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    background: #ffe9e7;
    color: #8f1b16;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.text-tool-title {
    margin: 0.7rem 0 0;
    font-size: clamp(1.5rem, 3.8vw, 2.25rem);
    letter-spacing: -0.01em;
    line-height: 1.18;
}

.text-tool-intro {
    margin: 0.55rem 0 0;
    max-width: 72ch;
    color: #516173;
    font-size: 0.98rem;
    line-height: 1.58;
}

.text-tool-meta {
    margin-top: 0.72rem;
    color: #6f7d8b;
    font-size: 0.84rem;
    font-weight: 700;
}

.text-tool-shell .card {
    border: 1px solid #e3e9ef;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
    background: #fff;
    padding: 1.12rem;
}

.text-tool-message-card {
    margin-bottom: 1rem;
}

.text-tool-message-error {
    border-left: 4px solid #dc3545;
}

.text-tool-message-success {
    border-left: 4px solid #2d6a4f;
}

.text-tool-shell label {
    font-weight: 700 !important;
    font-size: 0.92rem;
    color: #243343;
}

.text-tool-shell input[type="text"],
.text-tool-shell input[type="number"],
.text-tool-shell input[type="url"],
.text-tool-shell select,
.text-tool-shell textarea {
    width: 100%;
    border: 1px solid #ccd8e4 !important;
    border-radius: 10px !important;
    background: #fbfdff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.text-tool-shell input[type="text"]:focus,
.text-tool-shell input[type="number"]:focus,
.text-tool-shell input[type="url"]:focus,
.text-tool-shell select:focus,
.text-tool-shell textarea:focus {
    border-color: #e5322d !important;
    box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.14);
    outline: none;
}

.text-tool-shell pre {
    background: #f7fafc !important;
    border: 1px solid #dce5ee;
    border-radius: 12px !important;
    padding: 0.95rem 1rem !important;
}

.text-tool-shell .btn {
    border: 0;
    border-radius: 10px;
    background: #e2231a;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.text-tool-shell .btn:hover {
    background: #c51f17;
}

.text-tool-shell .btn + .btn {
    margin-left: 0.45rem;
}

.text-tool-shell #word-counter-stats > div {
    border: 1px solid #e4eaf1;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.85rem;
    font-size: 0.92rem;
}

.text-tool-shell .how-to-section,
.text-tool-shell .use-cases-section,
.text-tool-shell .tool-faq,
.text-tool-shell .related-tools-section {
    margin-top: 2rem;
}

.tool-page-main {
    min-width: 0;
}

.tool-page-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-tools-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 20px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sidebar-tools-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.sidebar-tool-link:hover {
    background: #f5f5f5;
}

.sidebar-tool-link .tool-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin: 0;
    flex-shrink: 0;
}

.sidebar-tool-link .tool-icon-wrap svg {
    width: 16px;
    height: 16px;
}

.sidebar-tool-name {
    font-size: 12px;
    font-weight: 500;
    color: #424242;
}

/* FAQ accordion styling */
.tool-faq {
    margin-top: 40px;
}

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

.faq-item {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: #e0e0e0;
}

.faq-item summary {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #212121;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

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

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    color: var(--primary);
    font-weight: 400;
    flex-shrink: 0;
    transition: transform 0.2s;
}

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

.faq-item[open] {
    border-color: var(--primary);
}

.faq-answer {
    padding: 0 20px 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    border-top: 1px solid #f5f5f5;
}

/* Homepage sections */
.home-section {
    padding: 48px 0 0;
}

.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.home-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #212121;
    margin: 0;
}

.home-section-sub {
    font-size: 14px;
    color: #757575;
    margin-top: 4px;
}

.home-section-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.home-section-link:hover {
    text-decoration: underline;
}

.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Category page layout */
.category-page {
    padding: 32px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.category-hero {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.category-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.category-hero p {
    font-size: 16px;
    color: #757575;
    margin-top: 8px;
}

.category-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.seo-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.seo-tool-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.seo-tool-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seo-tool-icon-wrap svg {
    width: 22px;
    height: 22px;
    color: #e2231a;
}

.seo-tool-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.seo-tool-name {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: #1f2937;
}

.seo-tool-desc {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.seo-tool-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    background: #e2231a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.seo-tool-cta:hover {
    background: #c51f17;
    color: #fff;
}

@media (max-width: 1024px) {
    .seo-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

/* Global responsive utilities */
.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

h1 {
    font-size: clamp(24px, 5vw, 36px);
}

h2 {
    font-size: clamp(20px, 4vw, 28px);
}

* {
    max-width: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
}

button,
.btn,
a.btn,
input[type="submit"] {
    min-height: 44px;
}

@media (max-width: 900px) {
    .tool-page-layout {
        grid-template-columns: 1fr;
    }

    .tool-page-sidebar {
        position: static;
        order: 2;
    }

    .home-tools-grid,
    .category-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 600px) {
    .page-content {
        padding: 20px 16px;
    }

    .calc-wrapper {
        padding: 20px;
    }

    .calc-form input,
    .calc-form select,
    .option-group input,
    .option-group select {
        max-width: 100%;
    }

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

    .home-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (min-width: 1024px) {
    .editor-page {
        grid-template-columns: 1fr 320px;
        grid-template-rows: 60px 1fr;
        height: calc(100vh - 60px);
    }

    .editor-canvas {
        min-width: 0;
        overflow-y: auto;
    }

    .editor-panel {
        width: 320px;
        min-width: 320px;
        flex-shrink: 0;
        overflow-y: auto;
    }
}

/* UI Excellence Sprint overrides */
.site-main {
        padding-top: 1.25rem;
}

.site-header.scrolled {
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
}

.nav-count {
        background: #ffebee;
        color: var(--primary);
        font-size: 10px;
        font-weight: 700;
        padding: 1px 5px;
        border-radius: 8px;
        margin-left: 4px;
}

.nav-item {
        position: relative;
}

.nav-search {
    display: flex;
    align-items: center;
    margin-right: 0.45rem;
}

.nav-search input {
    padding: 6px 14px;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    font-size: 13px;
    width: 180px;
    outline: none;
    transition: width 0.2s, border-color 0.2s;
}

.nav-search input:focus {
    width: 240px;
    border-color: var(--primary);
}

.nav-item-has-mega .nav-link {
        padding-right: 0.9rem;
}

.mega-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #EEEEEE;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 20px 24px;
    min-width: 360px;
    z-index: 1000;
}

.nav-item:hover .mega-dropdown,
.nav-item:focus-within .mega-dropdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mega-col {
        min-width: 150px;
        display: grid;
        gap: 8px;
}

.mega-heading {
        margin: 0 0 4px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #8d8d8d;
        font-weight: 700;
}

.mega-col a {
        font-size: 13px;
        color: #2d3748;
        font-weight: 600;
        padding: 6px 8px;
        border-radius: 8px;
}

.mega-col a:hover {
        background: #fff5f5;
        color: var(--primary);
}

.mobile-nav-search-wrap {
        display: none;
}


.trust-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: #F8F9FA;
    border-top: 1px solid #EEEEEE;
    border-bottom: 1px solid #EEEEEE;
    margin-top: 12px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555555;
    font-weight: 500;
}

.trust-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #43A047;
}

.cards-grid {
        gap: 1rem;
}

.tool-card {
    background: white;
    border: 1px solid #EEEEEE;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-color, #E53935);
    transform: scaleX(0);
    transition: transform 0.25s;
}

.tool-card:hover::before { transform: scaleX(1); }

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-color: transparent;
}

.tool-card.compact {
        min-height: 0;
        padding: 16px;
}

.tool-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
}

.cat-pdf { --card-color: #e53935; }
.cat-image { --card-color: #1e88e5; }
.cat-dev { --card-color: #8e24aa; }
.cat-seo { --card-color: #fb8c00; }
.cat-calc { --card-color: #43a047; }
.cat-convert { --card-color: #00acc1; }

.cat-pdf .tool-card-icon { background: #FFEBEE; }
.cat-image .tool-card-icon { background: #E3F2FD; }
.cat-dev .tool-card-icon { background: #F3E5F5; }
.cat-seo .tool-card-icon { background: #FFF3E0; }
.cat-calc .tool-card-icon { background: #E8F5E9; }
.cat-convert .tool-card-icon { background: #E0F7FA; }

.tool-card-title,
.tool-card-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 4px;
    line-height: 1.3;
}

.tool-card-text,
.tool-card-desc {
    display: block;
    font-size: 11px;
    color: #9E9E9E;
    line-height: 1.4;
}

.tool-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #FFF3E0;
    color: #E65100;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.upload-zone {
    border: 2.5px dashed #E0E0E0;
    border-radius: 20px;
    padding: 56px 32px;
    text-align: center;
    background: #FAFAFA;
    cursor: pointer;
    transition: all 0.25s;
    max-width: 580px;
    margin: 0 auto;
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over,
.upload-zone.dragover {
    border-color: var(--primary);
    background: #FFF5F5;
    transform: scale(1.01);
}

.upload-zone-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--primary);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.upload-zone-title {
    font-size: 20px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 8px;
}

.upload-zone-sub {
    font-size: 14px;
    color: #9E9E9E;
    margin-bottom: 24px;
}

.upload-btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.upload-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(229,57,53,0.35);
}

.upload-limit {
    font-size: 12px;
    color: #BDBDBD;
    margin-top: 12px;
}

.upload-zone.file-selected {
    border-color: #43A047;
    background: #F1F8E9;
}

.file-input-hidden {
    display: none;
}

.selected-file-info {
    display: none;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 16px;
    border: 1px solid #E8F5E9;
}

.selected-file-info.visible { display: flex; }

.file-type-badge {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.file-name-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #212121;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size-text {
    font-size: 12px;
    color: #9E9E9E;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay.is-visible {
        display: flex;
}

.loading-card {
    background: white;
    border-radius: 20px;
    padding: 48px 56px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 360px;
    width: 90%;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid #F5F5F5;
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 0.7s linear infinite;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 8px;
}

.loading-sub {
    font-size: 13px;
    color: #9E9E9E;
    margin-bottom: 24px;
}

.loading-progress {
    height: 4px;
    background: #F5F5F5;
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), #FF6F00);
    border-radius: 2px;
    animation: loadProgress 12s ease-out forwards;
}

@keyframes loadProgress {
    0% { width: 0%; }
    30% { width: 45%; }
    60% { width: 72%; }
    85% { width: 88%; }
    100% { width: 94%; }
}

.result-page-hero {
    text-align: center;
    padding: 60px 24px 40px;
    max-width: 560px;
    margin: 0 auto;
}

.success-circle {
    width: 80px;
    height: 80px;
    background: #E8F5E9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-circle svg {
    width: 40px;
    height: 40px;
    color: #43A047;
    stroke-dasharray: 100;
    animation: drawCheck 0.4s ease 0.2s both;
}

@keyframes drawCheck {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

.result-title {
    font-size: 28px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 8px;
}

.result-filename {
    font-size: 15px;
    color: #757575;
    margin-bottom: 12px;
    word-break: break-all;
}

.result-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #43A047;
    color: white;
    padding: 18px 48px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(67,160,71,0.4);
}

.result-download-btn:hover {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67,160,71,0.5);
}

.result-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--primary);
    cursor: pointer;
    margin-top: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.result-security-note {
    font-size: 12px;
    color: #9E9E9E;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
    .mega-dropdown {
        display: none !important;
    }

    .nav-search {
        display: none;
    }

    .mobile-nav-search-wrap {
        display: block;
        padding: 6px 4px 8px;
    }

    .mobile-nav-search {
        width: 100%;
        min-height: 40px;
        border-radius: 9px;
        border: 1px solid #e3e3e3;
        padding: 0 12px;
        font-size: 13px;
    }

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

@media (max-width: 900px) {
    .nav-search {
        display: none;
    }
}

@media (max-width: 600px) {
    .footer-main {
      grid-template-columns: 1fr 1fr;
      padding: 40px 16px 24px;
      gap: 24px;
    }

    .footer-brand {
      grid-column: 1 / -1;
    }

    .footer-bottom-inner {
      padding: 16px;
      gap: 10px;
    }

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

    .blog-post {
      padding: 24px 0;
    }

    .post-tool-cta {
      flex-wrap: wrap;
    }
}

@media (max-width: 390px) {
        .upload-zone {
                padding: 36px 16px;
        }

        .loading-card {
                padding: 34px 24px;
        }
}

/* ═══════════════════════════════════════════════════════════════
   DEVELOPER TOOLS HUB
═══════════════════════════════════════════════════════════════ */

.dev-hub-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Hero */
.dev-hub-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1a56db 100%);
    border-radius: 20px;
    margin: 32px 0 48px;
    padding: 64px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.dev-hub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(99,179,237,.15) 0%, transparent 60%);
    pointer-events: none;
}
.dev-hub-hero-inner {
    position: relative;
    z-index: 1;
}
.dev-hub-badge {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #93c5fd;
}
.dev-hub-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 16px;
    line-height: 1.2;
    color: #fff;
}
.dev-hub-intro {
    font-size: 1.05rem;
    color: #bfdbfe;
    max-width: 620px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Stats row */
.dev-hub-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.dev-hub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.dev-hub-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.dev-hub-stat-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #93c5fd;
    font-weight: 600;
}

/* Tag cloud */
.dev-hub-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.dev-hub-tags span {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 500;
    color: #e0f2fe;
}

/* Group sections */
.dev-hub-group {
    margin-bottom: 48px;
}
.dev-hub-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text, #1a202c);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dev-hub-group-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: linear-gradient(180deg, #1a56db, #2563eb);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Tool cards grid */
.dev-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.dev-tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease;
    position: relative;
}
.dev-tool-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Icon */
.dev-tool-icon-wrap {
    width: 44px;
    height: 44px;
    background: #fff5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dev-tool-icon-wrap svg {
    width: 22px;
    height: 22px;
    color: #e2231a;
}

/* Body */
.dev-tool-body {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dev-tool-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}
.dev-tool-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dev-tool-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    background: #e2231a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.dev-tool-cta:hover {
    background: #c51f17;
    color: #fff;
}

/* SEO text block */
.dev-hub-seo-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 40px;
    margin-top: 16px;
}
.dev-hub-seo-block h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e293b;
}
.dev-hub-seo-block h3 {
    font-size: .95rem;
    font-weight: 700;
    margin: 20px 0 10px;
    color: #334155;
}
.dev-hub-seo-block p {
    color: #475569;
    font-size: .88rem;
    line-height: 1.65;
    margin: 0;
}
.dev-hub-seo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dev-hub-seo-list li {
    font-size: .88rem;
    color: #475569;
    padding-left: 18px;
    position: relative;
    line-height: 1.55;
}
.dev-hub-seo-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-size: .75rem;
    top: 2px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .dev-tool-card {
        background: #1e293b;
        border-color: #334155;
    }
    .dev-tool-card:hover { box-shadow: 0 4px 18px rgba(59,130,246,.18); }
    .dev-tool-icon-wrap { background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%); }
    .dev-tool-name { color: #f1f5f9; }
    .dev-tool-desc { color: #94a3b8; }
    .dev-hub-group-title { color: #f1f5f9; border-color: #334155; }
    .dev-hub-seo-block { background: #1e293b; border-color: #334155; }
    .dev-hub-seo-block h2 { color: #f1f5f9; }
    .dev-hub-seo-block h3 { color: #cbd5e1; }
    .dev-hub-seo-block p, .dev-hub-seo-list li { color: #94a3b8; }
    .dev-tool-cta { background: #e2231a; color: #fff; }
}

/* Responsive */
@media (max-width: 1024px) {
    .dev-hub-hero {
        padding: 40px 20px;
        border-radius: 14px;
        margin: 16px 0 32px;
    }
    .dev-hub-stats { gap: 24px; }
    .dev-hub-stat-num { font-size: 1.4rem; }
    .dev-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dev-hub-seo-block { padding: 24px 20px; }
}

@media (max-width: 768px) {
    .dev-tools-grid { grid-template-columns: 1fr; }
    .dev-hub-page { padding: 0 12px 60px; }
}

/* ═══════════════════════════════════════════════════════════════
   BLOG LISTING — Enhanced Layout & SEO
═══════════════════════════════════════════════════════════════ */

/* Header block */
.blog-listing-header {
    text-align: center;
    padding: 56px 24px 40px;
    max-width: 780px;
    margin: 0 auto;
}
.blog-listing-h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.2;
    color: var(--color-text, #1a202c);
}
.blog-listing-sub {
    font-size: 1rem;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 24px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
.blog-listing-kw {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.blog-listing-kw span {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: .75rem;
    font-weight: 600;
    color: #1d4ed8;
    letter-spacing: .02em;
}

/* Featured post card */
.blog-featured-card {
    display: block;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
    border-radius: 18px;
    padding: 44px 48px;
    margin: 0 auto 44px;
    max-width: 860px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.blog-featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(147,197,253,.1) 0%, transparent 60%);
    pointer-events: none;
}
.blog-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(26,86,219,.25);
    text-decoration: none;
    color: #fff;
}
.blog-featured-label {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #93c5fd;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.blog-featured-cat {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #7dd3fc;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.blog-featured-title {
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 14px;
    color: #fff;
    position: relative;
    z-index: 1;
    max-width: 620px;
}
.blog-featured-excerpt {
    font-size: .92rem;
    color: #bfdbfe;
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 580px;
    position: relative;
    z-index: 1;
}
.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: #93c5fd;
    position: relative;
    z-index: 1;
}
.blog-featured-cta {
    margin-left: auto;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 6px 16px;
    font-weight: 700;
    font-size: .8rem;
    color: #fff;
    transition: background .15s ease;
}
.blog-featured-card:hover .blog-featured-cta {
    background: rgba(255,255,255,.25);
}

/* SEO footer block */
.blog-seo-footer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 40px;
    margin-top: 48px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
.blog-seo-footer h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e293b;
}
.blog-seo-footer p {
    font-size: .88rem;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 16px;
}
.blog-seo-topics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
}
.blog-seo-topics strong {
    color: #334155;
}
.blog-seo-topics a {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 14px;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
    transition: background .12s ease;
}
.blog-seo-topics a:hover {
    background: #dbeafe;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .blog-listing-h1 { color: #f1f5f9; }
    .blog-listing-sub { color: #94a3b8; }
    .blog-listing-kw span { background: #1e3a5f; border-color: #1d4ed8; color: #93c5fd; }
    .blog-seo-footer { background: #1e293b; border-color: #334155; }
    .blog-seo-footer h2 { color: #f1f5f9; }
    .blog-seo-footer p { color: #94a3b8; }
    .blog-seo-topics a { background: #1e3a5f; border-color: #1d4ed8; color: #93c5fd; }
    .blog-seo-topics a:hover { background: #1d4ed8; color: #fff; }
}

/* Responsive */
@media (max-width: 768px) {
    .blog-listing-header { padding: 40px 16px 28px; }
    .blog-featured-card { padding: 28px 24px; border-radius: 14px; }
    .blog-seo-footer { padding: 24px 20px; margin-top: 32px; }
    .blog-featured-meta { flex-wrap: wrap; }
    .blog-featured-cta { margin-left: 0; }
}
@media (max-width: 480px) {
    .blog-listing-kw { gap: 6px; }
}
