/* =============================================
   ConvToolbox — JSON To CSV Converter
   Single stylesheet with CSS custom properties
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-secondary: #0f172a;
  --color-accent: #10b981;
  --color-accent-hover: #059669;

  --color-text: #1e293b;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;

  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-card: #ffffff;

  --color-border: #e2e8f0;
  --color-border-focus: #2563eb;

  --color-error: #dc2626;
  --color-error-bg: #fef2f2;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --line-height: 1.6;
  --line-height-tight: 1.3;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --tool-max-width: 860px;
  --header-height: 64px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-lg));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

ul {
  list-style: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Focus visible styles */
:focus-visible {
  outline: 3px solid var(--color-border-focus);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-secondary);
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  font-size: var(--text-2xl);
}

.brand-name {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-list {
  display: flex;
  gap: var(--space-lg);
}

.nav-list a {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-list a:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #f0f9ff 50%, #f0fdf4 100%);
  text-align: center;
}

.hero-inner {
  max-width: 720px;
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: var(--line-height-tight);
  color: var(--color-secondary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border-color: var(--color-accent);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-text-inverse);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.btn-large {
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Ad Slots ---------- */
.ad-slot {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 90px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
  padding: 0 var(--space-lg);
}

.ad-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Tool Section ---------- */
.tool-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.tool-card {
  max-width: var(--tool-max-width);
  margin: 0 auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

/* Tool Tabs */
.tool-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
}

.tool-tab {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  margin-bottom: -2px;
}

.tool-tab:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.tool-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Tool Panels */
.tool-panel {
  padding: var(--space-xl);
}

.tool-panel[hidden] {
  display: none;
}

.field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.field-help {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* Textarea */
.textarea-wrapper {
  position: relative;
}

.json-textarea,
.csv-textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
  min-height: 180px;
  transition: border-color var(--transition-fast);
}

.json-textarea:focus,
.csv-textarea:focus {
  border-color: var(--color-border-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.json-textarea::placeholder {
  color: var(--color-text-muted);
}

.csv-textarea {
  background: var(--color-bg-alt);
  cursor: default;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--color-bg);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.drop-zone.drag-over {
  border-style: solid;
  transform: scale(1.01);
}

.drop-zone-content {
  pointer-events: none;
}

.drop-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.drop-text {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.drop-subtext {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.file-name {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  margin-top: var(--space-sm);
  min-height: 1.2em;
}

/* Tool Options */
.tool-options {
  padding: 0 var(--space-xl) var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  align-items: center;
}

.option-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.option-group .field-label {
  margin-bottom: 0;
}

.select-control {
  font-family: inherit;
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.select-control:focus {
  border-color: var(--color-border-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Error / Status boxes */
.error-box,
.status-box {
  margin: 0 var(--space-xl) var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}

.error-box[hidden],
.status-box[hidden] {
  display: none;
}

.error-box {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid #fecaca;
}

.status-box {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid #bbf7d0;
}

/* Validation result (JSON Validator) */
.validation-result {
  margin: 0 var(--space-xl) var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.validation-badge {
  font-size: var(--text-xl);
  line-height: 1;
  flex-shrink: 0;
}

.validation-badge.neutral {
  color: var(--color-text-muted);
}

.validation-badge.success {
  color: var(--color-success);
}

.validation-badge.error {
  color: var(--color-error);
}

/* Pretty JSON syntax highlighting output */
.pretty-output {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  color: var(--color-text);
  overflow: auto;
  max-height: 400px;
  white-space: pre;
}

.tok-key {
  color: #b45309;
}

.tok-string {
  color: #15803d;
}

.tok-number {
  color: #1d4ed8;
}

.tok-boolean {
  color: #db2777;
}

.tok-null {
  color: #9333ea;
}

.tok-punct {
  color: var(--color-text-muted);
}

/* Tool Actions */
.tool-actions {
  padding: var(--space-md) var(--space-xl) var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Output Section */
.output-section {
  padding: 0 var(--space-xl) var(--space-xl);
}

.output-section[hidden] {
  display: none;
}

.shortcuts-hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-md) var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--color-border);
}

kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8em;
  padding: 0.1em 0.4em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 var(--color-border);
}

/* ---------- Steps / How It Works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.step-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.step-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.step-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height);
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
}

.faq-question {
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition: color var(--transition-fast);
}

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

.faq-question::after {
  content: "+";
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-answer {
  padding: 0 var(--space-xl) var(--space-lg);
}

.faq-answer p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height);
}

/* ---------- Related Tools ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.related-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.related-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.related-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  flex: 1;
}

.related-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-secondary);
  color: #94a3b8;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.footer-brand .brand {
  color: #ffffff;
}

.footer-brand .brand-name {
  color: #ffffff;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: #94a3b8;
  margin-top: var(--space-sm);
  max-width: 320px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.footer-links h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links a {
  font-size: var(--text-sm);
  color: #94a3b8;
  text-decoration: none;
  display: block;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: var(--space-xl);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: #64748b;
}

/* =============================================
   Responsive Design
   ============================================= */

/* Tablet */
@media (max-width: 1023px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

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

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

  .footer-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --space-xl: 1.5rem;
    --space-3xl: 2.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  /* Header */
  .nav-list {
    gap: var(--space-sm);
  }

  .nav-list a {
    font-size: var(--text-xs);
    padding: var(--space-xs);
  }

  .brand-name {
    font-size: var(--text-lg);
  }

  /* Hero */
  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  /* Tool */
  .tool-tabs {
    flex-direction: row;
  }

  .tool-tab {
    padding: var(--space-md);
    font-size: var(--text-sm);
  }

  .tool-panel {
    padding: var(--space-lg) var(--space-md);
  }

  .tool-options {
    padding: 0 var(--space-md) var(--space-md);
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-actions {
    padding: var(--space-md);
    flex-direction: column;
  }

  .tool-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .error-box,
  .status-box {
    margin: 0 var(--space-md) var(--space-md);
  }

  .output-section {
    padding: 0 var(--space-md) var(--space-md);
  }

  .shortcuts-hint {
    display: none;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .step-card {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .step-number {
    margin-bottom: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .feature-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  /* FAQ */
  .faq-question {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
  }

  .faq-answer {
    padding: 0 var(--space-lg) var(--space-md);
  }

  .faq-answer p {
    font-size: var(--text-sm);
  }

  /* Related */
  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-nav {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .section h2 {
    font-size: var(--text-2xl);
  }

  .section-subtitle {
    font-size: var(--text-base);
  }
}

/* Tablet range refinements */
@media (min-width: 601px) and (max-width: 1023px) {
  .tool-actions {
    flex-wrap: wrap;
  }

  .tool-actions .btn {
    flex: 1;
    min-width: 140px;
  }
}

/* Print styles */
@media print {
  .site-header,
  .hero,
  .tool-section,
  .ad-slot,
  .site-footer,
  .shortcuts-hint {
    display: none;
  }

  .section {
    padding: var(--space-md) 0;
  }
}
