* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #1e293b;
  font-family: Arial, sans-serif;
}

.tool-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.back-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: #1e293b;
}

.tool-header {
  margin: 70px 0 35px;
  text-align: center;
}

.tool-header h1 {
  margin-bottom: 12px;
  font-size: 42px;
  letter-spacing: -1px;
}

.tool-header p {
  color: #64748b;
  font-size: 18px;
}

.converter {
  max-width: 700px;
  margin: 0 auto;
}

.drop-zone {
  padding: 70px 30px;
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  background: white;
  text-align: center;
}

.drop-zone h2 {
  margin: 12px 0 6px;
}

.drop-zone > p {
  color: #64748b;
}

.drop-icon {
  font-size: 44px;
}

.choose-file-button,
.convert-button {
  display: inline-block;
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  background: #1e293b;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.choose-file-button:hover,
.convert-button:hover {
  opacity: 0.9;
}

.drop-zone .privacy-note {
  margin: 24px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.conversion-result {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
  text-align: center;
}

.conversion-result img {
  display: block;
  max-width: 100%;
  max-height: 350px;
  margin: 0 auto 20px;
  border-radius: 10px;
}

.file-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.file-info strong {
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 550px) {
  .tool-header {
    margin-top: 45px;
  }

  .tool-header h1 {
    font-size: 32px;
  }

  .drop-zone {
    padding: 45px 20px;
  }
}
.drop-zone.dragging {
  border-color: #64748b;
  background: #f1f5f9;
}

.converter-options {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
}

.option + .option {
  margin-top: 25px;
}

.option-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.option-heading label {
  font-weight: 600;
  color: #1e293b;
}

.option p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
}

.option input[type="range"] {
  width: 100%;
}

.option input[type="color"] {
  width: 45px;
  height: 35px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: white;
  cursor: pointer;
}

.converter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.secondary-button,
.text-button,
.small-download-button,
.remove-button {
  padding: 11px 17px;
  border-radius: 9px;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button,
.small-download-button {
  border: 1px solid #1e293b;
  background: white;
  color: #1e293b;
}

.text-button,
.remove-button {
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
}

.image-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.image-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.image-item-preview {
  width: 100px;
  height: 80px;
  border-radius: 9px;
  object-fit: contain;
  background: #f8fafc;
}

.image-item-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: #64748b;
  font-size: 13px;
}

.image-item-name {
  overflow: hidden;
  color: #1e293b;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.converted-size {
  color: #334155;
  font-weight: 600;
}

.image-item-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tool-info {
  max-width: 700px;
  margin: 70px auto 0;
  color: #475569;
  line-height: 1.7;
}

.tool-info h2,
.tool-info h3 {
  color: #1e293b;
}

.tool-info h3 {
  margin-top: 30px;
}

@media (max-width: 650px) {
  .image-item {
    grid-template-columns: 75px minmax(0, 1fr);
  }

  .image-item-preview {
    width: 75px;
    height: 65px;
  }

  .image-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .converter-actions button {
    flex-grow: 1;
  }
}

.resize-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
}

.resize-mode-button {
  padding: 9px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
}

.resize-mode-button.active {
  border-color: #1e293b;
  background: #1e293b;
  color: white;
}

.resize-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.resize-inputs label {
  display: block;
  margin-bottom: 7px;
  color: #1e293b;
  font-weight: 600;
}

.dimension-input {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: white;
}

.dimension-input input {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  outline: none;
  font-size: 15px;
}

.dimension-input span {
  padding-right: 12px;
  color: #94a3b8;
}

.aspect-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 500px) {
  .resize-inputs {
    grid-template-columns: 1fr;
  }
}

.json-tool {
  max-width: 1100px;
  margin: 0 auto;
}

.json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.json-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.json-indent {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

.json-indent select {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #1e293b;
}

.json-editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.json-editor {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.json-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.json-editor-heading > div {
  display: flex;
  gap: 5px;
}

.json-small-action {
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
}

.json-small-action:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.json-editor textarea {
  display: block;
  width: 100%;
  min-height: 450px;
  padding: 18px;
  border: 0;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  background: #ffffff;
  color: #1e293b;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  tab-size: 2;
}

.json-editor textarea::placeholder {
  color: #94a3b8;
}

.json-status {
  min-height: 22px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.json-status:empty {
  padding: 0;
}

.json-status-success {
  background: #f0fdf4;
  color: #166534;
}

.json-status-error {
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 800px) {
  .json-editors {
    grid-template-columns: 1fr;
  }

  .json-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .json-editor textarea {
    min-height: 300px;
  }
}

.text-counter {
  max-width: 900px;
  margin: 0 auto;
}

.counter-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.counter-stat {
  padding: 18px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  text-align: center;
}

.counter-stat strong {
  display: block;
  overflow: hidden;
  color: #1e293b;
  font-size: 23px;
  text-overflow: ellipsis;
}

.counter-stat span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.counter-editor {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.counter-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.counter-editor-heading > div {
  display: flex;
  gap: 5px;
}

.counter-editor textarea {
  display: block;
  width: 100%;
  min-height: 400px;
  padding: 20px;
  border: 0;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  color: #1e293b;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
}

@media (max-width: 800px) {
  .counter-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 450px) {
  .counter-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.percentage-tool {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.percentage-card {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.percentage-card h2 {
  margin: 0 0 18px;
  color: #1e293b;
  font-size: 18px;
}

.percentage-row,
.percentage-adjustment {
  display: flex;
  align-items: center;
  gap: 12px;
}

.percentage-row input,
.percentage-adjustment input {
  width: 130px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  font-size: 16px;
}

.percentage-row input:focus,
.percentage-adjustment input:focus {
  border-color: #64748b;
}

.percentage-row span,
.percentage-adjustment span {
  color: #64748b;
  white-space: nowrap;
}

.percentage-row strong,
.percentage-adjustment strong {
  color: #1e293b;
  font-size: 18px;
}

.percentage-adjustment select {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  font-size: 17px;
}

@media (max-width: 650px) {
  .percentage-row,
  .percentage-adjustment {
    align-items: stretch;
    flex-direction: column;
  }

  .percentage-row input,
  .percentage-adjustment input,
  .percentage-adjustment select {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ========================================
   HandyKitz design system / global shell
   ======================================== */

:root {
  --hk-bg: #f8fafc;
  --hk-surface: #ffffff;
  --hk-text: #0f172a;
  --hk-text-soft: #475569;
  --hk-muted: #64748b;
  --hk-faint: #94a3b8;
  --hk-border: #e2e8f0;
  --hk-border-strong: #cbd5e1;
  --hk-accent: #6366f1;
  --hk-accent-dark: #4f46e5;
  --hk-accent-soft: #eef2ff;
  --hk-container: 1180px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(99, 102, 241, 0.08),
      transparent 28%
    ),
    radial-gradient(
      circle at 82% 35%,
      rgba(59, 130, 246, 0.05),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      #f8fafc 0%,
      #f6f8fc 50%,
      #f8fafc 100%
    );
  background-attachment: fixed;
}

[hidden] {
  display: none !important;
}

/* ========================================
   Global sticky header
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header-inner {
  display: flex;
  width: min(var(--hk-container), calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  align-items: center;
  gap: 28px;
}

.site-logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 9px;
  color: var(--hk-text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.6px;
  text-decoration: none;
}

.site-logo-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(99, 102, 241, 0.2);
}

.site-nav {
  display: flex;
  min-width: 0;
  align-items: stretch;
  align-self: stretch;
  gap: 2px;
}

.site-nav-link,
.nav-menu-trigger {
  display: inline-flex;
  height: 100%;
  padding: 0 12px;
  align-items: center;
  gap: 5px;
  color: var(--hk-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav-link:hover,
.nav-menu-trigger:hover,
.nav-menu:hover > .nav-menu-trigger {
  background: #f8fafc;
  color: var(--hk-text);
}

.nav-menu {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-menu-trigger span {
  color: var(--hk-faint);
  font-size: 11px;
  transition: transform 0.15s ease;
}

.nav-menu:hover .nav-menu-trigger span,
.nav-menu:focus-within .nav-menu-trigger span {
  transform: rotate(180deg);
}

.nav-mega-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  display: grid;
  width: 560px;
  padding: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border: 1px solid var(--hk-border);
  border-radius: 0 0 14px 14px;
  background: white;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.nav-menu:nth-of-type(4) .nav-mega-menu {
  left: auto;
  right: 0;
}

.nav-mega-menu-small {
  width: 250px;
  grid-template-columns: 1fr;
}

.nav-menu:hover .nav-mega-menu,
.nav-menu:focus-within .nav-mega-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-mega-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.nav-mega-label {
  margin-bottom: 7px;
  color: var(--hk-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-mega-group a {
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--hk-text-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.nav-mega-group a:hover,
.nav-mega-group a:focus-visible {
  background: var(--hk-accent-soft);
  color: var(--hk-accent-dark);
  outline: none;
}

.site-header-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
}

.nav-search {
  display: flex;
  width: 220px;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--hk-border);
  border-radius: 10px;
  background: #f8fafc;
  transition: width 0.18s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nav-search:focus-within {
  width: 260px;
  border-color: #a5b4fc;
  background: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.nav-search-icon {
  color: var(--hk-faint);
  font-size: 18px;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--hk-text);
  font: inherit;
  font-size: 13px;
}

.nav-search input::placeholder {
  color: var(--hk-faint);
}

/* ========================================
   Homepage
   ======================================== */

.home-clean {
  width: min(var(--hk-container), calc(100% - 40px));
  min-height: 70vh;
  margin: 0 auto;
  padding-bottom: 32px;
}

.clean-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 38px 0 32px;
  text-align: center;
}

.clean-hero h1 {
  margin: 0;
  color: var(--hk-text);
  font-size: clamp(32px, 4.2vw, 44px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -1.8px;
}

.clean-hero > p {
  margin: 11px auto 0;
  color: var(--hk-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tool-filters {
  display: flex;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.tool-filter {
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--hk-border);
  border-radius: 999px;
  background: white;
  color: var(--hk-text-soft);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.tool-filter:hover {
  transform: translateY(-1px);
  border-color: #c7d2fe;
  color: var(--hk-accent-dark);
}

.tool-filter.active {
  border-color: var(--hk-accent);
  background: var(--hk-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.16);
}

.tool-filter:focus-visible,
.clean-tool-card:focus-visible,
.site-logo:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.22);
  outline-offset: 2px;
}

.clean-tools {
  padding-top: 2px;
}

.tool-category {
  margin-bottom: 34px;
  scroll-margin-top: 90px;
}

.tool-category:last-of-type {
  margin-bottom: 0;
}

.tool-category-heading {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
}

.tool-category-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tool-category-heading h2 {
  margin: 0;
  color: var(--hk-text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.category-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.category-image { background: #3b82f6; }
.category-pdf { background: #ef4444; }
.category-developer { background: #8b5cf6; }
.category-text { background: #06b6d4; }
.category-calculator { background: #f59e0b; }
.category-security { background: #10b981; }
.category-generator { background: #ec4899; }

.clean-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.clean-tool-card {
  display: flex;
  min-width: 0;
  min-height: 88px;
  padding: 15px 17px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--hk-border);
  border-radius: 12px;
  background: var(--hk-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.clean-tool-card:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.06);
}

.clean-tool-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
}

.clean-tool-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-image { background: #eff6ff; color: #2563eb; }
.icon-pdf { background: #fef2f2; color: #dc2626; }
.icon-developer { background: #f5f3ff; color: #7c3aed; }
.icon-text { background: #ecfeff; color: #0891b2; }
.icon-calculator { background: #fffbeb; color: #d97706; }
.icon-security { background: #ecfdf5; color: #059669; }
.icon-generator { background: #fdf2f8; color: #db2777; }

.clean-code-icon {
  font-family: monospace;
  font-size: 14px;
}

.clean-tool-card > div:last-child {
  min-width: 0;
}

.clean-tool-card h3 {
  margin: 0 0 5px;
  color: var(--hk-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.clean-tool-card p {
  margin: 0;
  color: var(--hk-muted);
  font-size: 12px;
  line-height: 1.45;
}

.home-clean .no-tools {
  padding: 55px 20px;
  text-align: center;
}

.home-clean .no-tools strong {
  color: var(--hk-text-soft);
  font-size: 17px;
}

.home-clean .no-tools p {
  margin: 7px 0 0;
}

/* ========================================
   Site footer
   ======================================== */

.site-footer {
  margin-top: 72px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.site-footer-main {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) 1fr 1fr;
  gap: 72px;

  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 46px;
}

.site-footer-brand {
  max-width: 330px;
}

.site-footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: #0f172a;

  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.35px;
  text-decoration: none;
}

.site-footer-logo-mark {
  display: inline-flex;
  width: 30px;
  height: 30px;

  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;
}

.site-footer-brand p {
  max-width: 290px;
  margin: 16px 0 0;

  color: #64748b;

  font-size: 13px;
  line-height: 1.7;
}

.site-footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-footer-column h2 {
  margin: 0 0 6px;

  color: #0f172a;

  font-size: 13px;
  font-weight: 700;
}

.site-footer-column a {
  color: #64748b;

  font-size: 13px;
  text-decoration: none;

  transition: color 0.15s ease;
}

.site-footer-column a:hover {
  color: #4f46e5;
}

.site-footer-bottom {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 62px;
  margin: 0 auto;

  align-items: center;
  justify-content: space-between;
  gap: 24px;

  border-top: 1px solid #e2e8f0;

  color: #94a3b8;

  font-size: 12px;
}

.site-footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-footer-privacy svg {
  color: #6366f1;
}


/* Footer responsive */

@media (max-width: 760px) {
  .site-footer {
    margin-top: 52px;
  }

  .site-footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 38px 28px;

    padding: 40px 0;
  }

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

  .site-footer-bottom {
    flex-direction: column;
    min-height: auto;
    padding: 20px 0;

    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-footer-main {
    grid-template-columns: 1fr;
  }

  .site-footer-brand {
    grid-column: auto;
  }
}

/* ========================================
   Responsive shell / homepage
   ======================================== */

@media (max-width: 1040px) {
  .site-header-inner {
    gap: 18px;
  }

  .site-nav-link,
  .nav-menu-trigger {
    padding: 0 8px;
  }

  .nav-search {
    width: 180px;
  }

  .nav-search:focus-within {
    width: 210px;
  }
}

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

  .nav-search {
    width: min(280px, 40vw);
  }

  .nav-search:focus-within {
    width: min(320px, 46vw);
  }

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

@media (max-width: 600px) {
  .site-header-inner,
  .home-clean,
  .site-footer {
    width: calc(100% - 28px);
  }

  .site-header-inner {
    min-height: 62px;
    gap: 12px;
  }

  .site-logo {
    font-size: 18px;
  }

  .site-logo-mark {
    width: 28px;
    height: 28px;
  }

  .nav-search {
    width: 42px;
    padding: 0 11px;
  }

  .nav-search input {
    width: 0;
    opacity: 0;
  }

  .nav-search:focus-within {
    position: absolute;
    right: 14px;
    left: 14px;
    z-index: 2;
    width: auto;
    background: white;
  }

  .nav-search:focus-within input {
    width: 100%;
    opacity: 1;
  }

  .clean-hero {
    padding: 34px 0 28px;
  }

  .clean-hero h1 {
    font-size: 34px;
    letter-spacing: -1.4px;
  }

  .clean-hero > p {
    font-size: 14px;
  }

  .tool-filters {
    margin-top: 18px;
    gap: 7px;
  }

  .tool-filter {
    min-height: 34px;
    padding: 6px 11px;
  }

  .tool-category-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .clean-tool-grid {
    grid-template-columns: 1fr;
  }

  .clean-tool-card {
    min-height: 84px;
    padding: 14px 15px;
  }

  .site-footer {
    margin-top: 65px;
  }

  .site-footer-inner,
  .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Image Cropper */

.cropper-workspace {
  margin-top: 24px;
}

.cropper-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 16px;
}

.cropper-toolbar strong {
  display: block;
  margin-bottom: 9px;

  color: #334155;
  font-size: 13px;
}

.cropper-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cropper-preset {
  padding: 8px 12px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
  color: #475569;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.cropper-preset:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
}

.cropper-preset.active {
  border-color: #0f172a;
  background: #0f172a;
  color: white;
}

.cropper-stage {
  position: relative;

  display: inline-block;
  max-width: 100%;

  overflow: hidden;

  border-radius: 10px;
  background: #0f172a;

  line-height: 0;

  user-select: none;
  touch-action: none;
}

.cropper-stage > img {
  display: block;

  width: auto;
  max-width: 100%;
  max-height: 650px;

  object-fit: contain;

  user-select: none;
  pointer-events: none;
}

.cropper-selection {
  position: absolute;

  box-sizing: border-box;

  border: 2px solid white;

  cursor: move;

  touch-action: none;

  box-shadow:
    0 0 0 9999px rgba(15, 23, 42, 0.62),
    0 0 0 1px rgba(15, 23, 42, 0.35);
}

.cropper-grid {
  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      to right,
      transparent 33.333%,
      rgba(255, 255, 255, 0.55) 33.333%,
      rgba(255, 255, 255, 0.55) calc(33.333% + 1px),
      transparent calc(33.333% + 1px),
      transparent 66.666%,
      rgba(255, 255, 255, 0.55) 66.666%,
      rgba(255, 255, 255, 0.55) calc(66.666% + 1px),
      transparent calc(66.666% + 1px)
    ),
    linear-gradient(
      to bottom,
      transparent 33.333%,
      rgba(255, 255, 255, 0.55) 33.333%,
      rgba(255, 255, 255, 0.55) calc(33.333% + 1px),
      transparent calc(33.333% + 1px),
      transparent 66.666%,
      rgba(255, 255, 255, 0.55) 66.666%,
      rgba(255, 255, 255, 0.55) calc(66.666% + 1px),
      transparent calc(66.666% + 1px)
    );
}

.cropper-handle {
  position: absolute;

  width: 16px;
  height: 16px;

  border: 2px solid #0f172a;
  border-radius: 50%;

  background: white;

  touch-action: none;
}

.cropper-handle-nw {
  top: -9px;
  left: -9px;
  cursor: nwse-resize;
}

.cropper-handle-ne {
  top: -9px;
  right: -9px;
  cursor: nesw-resize;
}

.cropper-handle-sw {
  bottom: -9px;
  left: -9px;
  cursor: nesw-resize;
}

.cropper-handle-se {
  right: -9px;
  bottom: -9px;
  cursor: nwse-resize;
}

.cropper-size-readout {
  margin-top: 10px;

  color: #64748b;
  font-size: 13px;
}

.cropper-size-readout strong {
  color: #334155;
}

.cropper-output-options {
  margin-top: 24px;
}

.cropper-dragging {
  cursor: grabbing;
  user-select: none;
}

@media (max-width: 600px) {
  .cropper-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .cropper-stage > img {
    max-height: 500px;
  }

  .cropper-handle {
    width: 20px;
    height: 20px;
  }

  .cropper-handle-nw {
    top: -11px;
    left: -11px;
  }

  .cropper-handle-ne {
    top: -11px;
    right: -11px;
  }

  .cropper-handle-sw {
    bottom: -11px;
    left: -11px;
  }

  .cropper-handle-se {
    right: -11px;
    bottom: -11px;
  }
}

/* Case Converter */

.text-converter {
  width: min(850px, 100%);
  margin: 0 auto;
}

.case-editor label {
  display: block;
  margin-bottom: 9px;

  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.case-textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 300px;
  padding: 18px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 10px;

  outline: none;

  background: white;
  color: #0f172a;

  font: inherit;
  font-size: 15px;
  line-height: 1.65;
}

.case-textarea:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.case-stats {
  display: flex;
  gap: 20px;

  margin-top: 9px;

  color: #94a3b8;
  font-size: 12px;
}

.case-stats strong {
  color: #64748b;
}

.case-actions {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 9px;

  margin-top: 22px;
}

.case-button {
  min-height: 44px;
  padding: 10px 12px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
  color: #334155;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.case-button:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
  color: #0f172a;
}

.case-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 22px;
}

@media (max-width: 700px) {
  .case-actions {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .case-textarea {
    min-height: 250px;
  }
}

/* Aspect Ratio Calculator */

.aspect-calculator {
  display: grid;
  width: min(850px, 100%);
  margin: 0 auto;
  gap: 18px;
}

.aspect-card {
  padding: 25px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.aspect-card h2 {
  margin: 0;

  color: #0f172a;
  font-size: 18px;
}

.aspect-description {
  margin: 7px 0 20px;

  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.aspect-dimensions,
.aspect-resize-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;

  align-items: end;
  gap: 14px;
}

.aspect-field label {
  display: block;
  margin-bottom: 7px;

  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.aspect-field input {
  box-sizing: border-box;

  width: 100%;
  height: 45px;
  padding: 0 13px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #0f172a;

  font: inherit;
}

.aspect-field input:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.aspect-dimension-symbol {
  padding-bottom: 11px;

  color: #94a3b8;
  font-size: 20px;
  font-weight: 700;
}

.aspect-result {
  display: flex;
  margin-top: 20px;
  padding: 17px 20px;

  align-items: center;
  gap: 14px;

  border-radius: 9px;

  background: #f8fafc;
}

.aspect-result span {
  color: #64748b;
  font-size: 13px;
}

.aspect-result strong {
  color: #0f172a;
  font-size: 24px;
}

.aspect-result small {
  margin-left: auto;

  color: #94a3b8;
  font-size: 12px;
}

.aspect-presets {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;

  margin-top: 18px;
}

.aspect-presets button {
  display: flex;
  padding: 14px;

  align-items: flex-start;
  flex-direction: column;
  gap: 4px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  background: white;

  cursor: pointer;
}

.aspect-presets button:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
}

.aspect-presets strong {
  color: #0f172a;
  font-size: 15px;
}

.aspect-presets span {
  color: #94a3b8;
  font-size: 11px;
}

.aspect-scale-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 18px;
}

.aspect-scale-buttons button {
  padding: 9px 14px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
  color: #334155;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.aspect-scale-buttons button:hover {
  border-color: #b8c5d4;
  background: #f8fafc;
}

.aspect-scale-result {
  margin-top: 15px;
  padding: 13px 15px;

  border-radius: 8px;

  background: #f8fafc;
  color: #475569;

  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .aspect-card {
    padding: 19px;
  }

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

  .aspect-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .aspect-result small {
    margin-left: 0;
  }
}

/* Password Generator */

.password-generator {
  width: min(720px, 100%);
  margin: 0 auto;
}

.password-card {
  padding: 26px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.password-output {
  display: flex;
  gap: 9px;
}

.password-output input {
  box-sizing: border-box;

  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 15px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: monospace;
  font-size: 16px;
}

.password-copy {
  min-width: 80px;
  padding: 0 16px;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  background: white;
  color: #334155;

  cursor: pointer;

  font-weight: 700;
}

.password-copy:hover {
  background: #f8fafc;
}

.password-strength {
  margin-top: 17px;
}

.password-strength-header {
  display: flex;
  justify-content: space-between;

  color: #64748b;
  font-size: 12px;
}

.password-strength-header strong {
  color: #334155;
}

.password-strength-track {
  height: 6px;
  margin-top: 8px;

  overflow: hidden;

  border-radius: 999px;

  background: #e2e8f0;
}

.password-strength-bar {
  width: 0;
  height: 100%;

  border-radius: inherit;

  background: currentColor;

  color: #64748b;

  transition: width 0.2s ease;
}

.password-strength-bar[data-strength="weak"] {
  color: #ef4444;
}

.password-strength-bar[data-strength="fair"] {
  color: #f59e0b;
}

.password-strength-bar[data-strength="strong"] {
  color: #3b82f6;
}

.password-strength-bar[data-strength="very-strong"] {
  color: #22c55e;
}

.password-setting {
  margin-top: 28px;
}

.password-setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 9px;
}

.password-setting-heading label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.password-setting-heading strong {
  color: #0f172a;
  font-size: 14px;
}

.password-setting input[type="range"] {
  width: 100%;
}

.password-range-labels {
  display: flex;
  justify-content: space-between;

  margin-top: 3px;

  color: #94a3b8;
  font-size: 11px;
}

.password-options {
  display: grid;
  margin-top: 24px;
  gap: 0;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  overflow: hidden;
}

.password-option {
  display: flex;
  min-height: 60px;
  padding: 11px 15px;

  box-sizing: border-box;

  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border-bottom: 1px solid #edf2f7;

  cursor: pointer;
}

.password-option:last-child {
  border-bottom: 0;
}

.password-option:hover {
  background: #f8fafc;
}

.password-option div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.password-option strong {
  color: #334155;
  font-size: 13px;
}

.password-option span {
  color: #94a3b8;
  font-size: 11px;
}

.password-option input {
  width: 17px;
  height: 17px;

  flex: 0 0 auto;

  cursor: pointer;
}

.password-generate-button {
  width: 100%;
  margin-top: 22px;
}

.password-error {
  margin: 12px 0 0;

  color: #b91c1c;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .password-card {
    padding: 18px;
  }

  .password-output {
    flex-direction: column;
  }

  .password-copy {
    min-height: 42px;
  }
}

/* QR Code Generator */

.qr-generator {
  width: min(950px, 100%);
  margin: 0 auto;
}

.qr-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(300px, 0.85fr);

  gap: 20px;
}

.qr-settings,
.qr-preview-panel {
  padding: 24px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.qr-field {
  margin-bottom: 20px;
}

.qr-field > label {
  display: block;
  margin-bottom: 8px;

  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.qr-field textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 150px;
  padding: 14px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  color: #0f172a;
  background: white;

  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.qr-field textarea:focus,
.qr-field select:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.qr-input-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;

  margin-top: 7px;

  color: #94a3b8;
  font-size: 11px;
}

.qr-options-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}

.qr-options-grid .qr-field {
  margin-bottom: 18px;
}

.qr-field select {
  box-sizing: border-box;

  width: 100%;
  height: 43px;
  padding: 0 11px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #334155;

  font: inherit;
  font-size: 13px;
}

.qr-color-control {
  display: flex;
  height: 43px;
  padding: 5px 10px;

  box-sizing: border-box;

  align-items: center;
  gap: 10px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  background: white;
}

.qr-color-control input {
  width: 32px;
  height: 28px;
  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;
}

.qr-color-control span {
  color: #64748b;

  font-family: monospace;
  font-size: 12px;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 4px;
}

.qr-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin-bottom: 17px;
}

.qr-preview-heading strong {
  color: #334155;
  font-size: 14px;
}

.qr-preview-heading span {
  color: #94a3b8;

  font-size: 11px;
  text-align: right;
}

.qr-preview {
  display: flex;

  aspect-ratio: 1 / 1;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  background: #f8fafc;
}

.qr-preview canvas {
  display: block;

  width: 100%;
  height: auto;

  max-width: 100%;
  max-height: 100%;
}

.qr-placeholder {
  display: flex;

  padding: 25px;

  align-items: center;
  flex-direction: column;
  gap: 12px;

  color: #94a3b8;

  font-size: 12px;
  text-align: center;
}

.qr-placeholder-icon {
  color: #64748b;
  font-size: 46px;
  line-height: 1;
}

.qr-download-actions {
  display: grid;
  grid-template-columns:
    1fr 1fr;

  gap: 9px;

  margin-top: 15px;
}

.qr-download-actions button {
  width: 100%;
}

.qr-error {
  margin: 13px 0 0;

  color: #b91c1c;

  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 750px) {
  .qr-layout {
    grid-template-columns: 1fr;
  }

  .qr-preview-panel {
    max-width: 500px;
  }
}

@media (max-width: 500px) {
  .qr-settings,
  .qr-preview-panel {
    padding: 18px;
  }

  .qr-options-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .qr-input-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .qr-download-actions {
    grid-template-columns: 1fr;
  }
}

/* Base64 Encoder & Decoder */

.base64-tool {
  width: min(1050px, 100%);
  margin: 0 auto;
}

.base64-mode-switch {
  display: flex;

  width: fit-content;
  margin: 0 auto 20px;
  padding: 4px;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  background: white;
}

.base64-mode-button {
  min-width: 110px;
  padding: 9px 18px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.base64-mode-button:hover {
  color: #0f172a;
}

.base64-mode-button.active {
  background: #0f172a;
  color: white;
}

.base64-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  align-items: center;
  gap: 14px;
}

.base64-panel {
  padding: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.base64-panel-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 9px;
}

.base64-panel-heading label {
  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.base64-panel-heading span {
  color: #94a3b8;

  font-size: 11px;
  text-align: right;
}

.base64-textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 300px;
  padding: 14px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
}

.base64-textarea:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px
    rgba(148, 163, 184, 0.12);
}

.base64-textarea[readonly] {
  color: #475569;
}

.base64-middle {
  display: flex;
  justify-content: center;
}

.base64-middle .convert-button {
  white-space: nowrap;
}

.base64-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 12px;
}

.base64-error {
  margin: 14px 0 0;

  color: #b91c1c;

  font-size: 12px;
  text-align: center;
}

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

  .base64-middle .convert-button {
    width: 100%;
  }

  .base64-textarea {
    min-height: 220px;
  }
}

@media (max-width: 500px) {
  .base64-panel {
    padding: 16px;
  }

  .base64-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .base64-mode-switch {
    width: 100%;
    box-sizing: border-box;
  }

  .base64-mode-button {
    flex: 1;
    min-width: 0;
  }
}

/* Unix Timestamp Converter */

.timestamp-tool {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.timestamp-current {
  display: flex;
  padding: 17px 20px;
  margin-bottom: 18px;

  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 11px;

  background: white;
}

.timestamp-current div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timestamp-current span {
  color: #64748b;
  font-size: 13px;
}

.timestamp-current strong {
  color: #0f172a;
  font-family: monospace;
  font-size: 18px;
}

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

  gap: 18px;
}

.timestamp-card {
  padding: 24px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.timestamp-card h2 {
  margin: 0;

  color: #0f172a;
  font-size: 18px;
}

.timestamp-description {
  margin: 7px 0 20px;

  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.timestamp-field label {
  display: block;
  margin-bottom: 7px;

  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.timestamp-field input {
  box-sizing: border-box;

  width: 100%;
  height: 45px;
  padding: 0 13px;

  border: 1px solid #d7e0ea;
  border-radius: 8px;

  outline: none;

  background: white;
  color: #0f172a;

  font: inherit;
}

.timestamp-field input:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.timestamp-unit-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;

  margin-top: 14px;
}

.timestamp-unit-switch label {
  display: flex;
  align-items: center;
  gap: 6px;

  color: #475569;

  cursor: pointer;

  font-size: 12px;
  font-weight: 600;
}

.timestamp-results,
.timestamp-date-results {
  display: grid;
  gap: 9px;

  margin-top: 20px;
}

.timestamp-results[hidden],
.timestamp-date-results[hidden] {
  display: none;
}

.timestamp-result {
  display: grid;
  grid-template-columns:
    75px minmax(0, 1fr) auto;

  align-items: center;
  gap: 10px;

  padding: 11px 12px;

  border-radius: 8px;

  background: #f8fafc;
}

.timestamp-result span,
.timestamp-big-result span {
  color: #94a3b8;
  font-size: 11px;
}

.timestamp-result strong {
  overflow-wrap: anywhere;

  color: #334155;

  font-family: monospace;
  font-size: 11px;
}

.timestamp-result button {
  padding: 5px 8px;

  border: 0;
  border-radius: 5px;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 11px;
  font-weight: 700;
}

.timestamp-result button:hover {
  background: #e2e8f0;
}

.timestamp-big-result {
  display: grid;
  grid-template-columns:
    1fr auto;

  align-items: center;
  gap: 5px 12px;

  padding: 14px;

  border-radius: 9px;

  background: #f8fafc;
}

.timestamp-big-result span {
  grid-column: 1;
}

.timestamp-big-result strong {
  grid-column: 1;

  overflow-wrap: anywhere;

  color: #0f172a;

  font-family: monospace;
  font-size: 16px;
}

.timestamp-big-result button {
  grid-column: 2;
  grid-row: 1 / 3;
}

.timestamp-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 20px;
}

.timestamp-timezone {
  margin: 17px 0 0;

  color: #94a3b8;
  font-size: 11px;
}

.timestamp-timezone strong {
  color: #64748b;
}

.timestamp-error {
  margin: 13px 0 0;

  color: #b91c1c;
  font-size: 12px;
}

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

@media (max-width: 500px) {
  .timestamp-current {
    align-items: flex-start;
    flex-direction: column;
  }

  .timestamp-current div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .timestamp-card {
    padding: 18px;
  }

  .timestamp-result {
    grid-template-columns: 1fr auto;
  }

  .timestamp-result span {
    grid-column: 1;
  }

  .timestamp-result strong {
    grid-column: 1;
  }

  .timestamp-result button {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

/* URL Encoder & Decoder */

.url-codec-tool {
  width: min(1050px, 100%);
  margin: 0 auto;
}

.url-codec-mode-switch {
  display: flex;
  width: fit-content;

  margin: 0 auto 20px;
  padding: 4px;

  border: 1px solid #e2e8f0;
  border-radius: 10px;

  background: white;
}

.url-codec-mode-button {
  min-width: 110px;
  padding: 9px 18px;

  border: 0;
  border-radius: 7px;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.url-codec-mode-button:hover {
  color: #0f172a;
}

.url-codec-mode-button.active {
  background: #0f172a;
  color: white;
}

.url-codec-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);

  align-items: center;
  gap: 14px;
}

.url-codec-panel {
  padding: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.url-codec-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 9px;
}

.url-codec-heading label {
  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.url-codec-heading span {
  color: #94a3b8;
  font-size: 11px;
}

.url-codec-textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 300px;
  padding: 14px;

  resize: vertical;

  border: 1px solid #d7e0ea;
  border-radius: 9px;

  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
}

.url-codec-textarea:focus {
  border-color: #94a3b8;

  box-shadow:
    0 0 0 3px rgba(148, 163, 184, 0.12);
}

.url-codec-textarea[readonly] {
  color: #475569;
}

.url-codec-middle {
  display: flex;

  flex-direction: column;
  align-items: center;

  gap: 10px;
}

.url-codec-middle .convert-button {
  white-space: nowrap;
}

.url-codec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 12px;
}

.url-codec-error {
  margin: 14px 0 0;

  color: #b91c1c;

  font-size: 12px;
  text-align: center;
}

@media (max-width: 800px) {
  .url-codec-grid {
    grid-template-columns: 1fr;
  }

  .url-codec-middle {
    width: 100%;
  }

  .url-codec-middle .convert-button {
    width: 100%;
  }

  .url-codec-textarea {
    min-height: 220px;
  }
}

@media (max-width: 500px) {
  .url-codec-panel {
    padding: 16px;
  }

  .url-codec-mode-switch {
    box-sizing: border-box;
    width: 100%;
  }

  .url-codec-mode-button {
    flex: 1;
    min-width: 0;
  }
}

/* Image Rotate & Flip */

.rotate-tool {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.rotate-upload {
  padding: 50px 24px;

  border: 2px dashed #cbd5e1;
  border-radius: 14px;

  background: white;

  text-align: center;

  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.rotate-upload.dragging {
  border-color: #64748b;
  background: #f8fafc;
}

.rotate-upload > div {
  display: flex;

  flex-direction: column;
  align-items: center;

  gap: 9px;
}

.rotate-upload-icon {
  margin-bottom: 4px;
  font-size: 35px;
}

.rotate-upload strong {
  color: #0f172a;
  font-size: 16px;
}

.rotate-upload span {
  margin-bottom: 7px;

  color: #94a3b8;
  font-size: 12px;
}

.rotate-editor {
  display: grid;
  gap: 18px;
}

.rotate-editor[hidden] {
  display: none;
}

.rotate-preview-card,
.rotate-controls-card {
  padding: 20px;

  border: 1px solid #e2e8f0;
  border-radius: 12px;

  background: white;
}

.rotate-preview-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  margin-bottom: 15px;
}

.rotate-preview-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rotate-preview-heading strong {
  color: #0f172a;
  font-size: 13px;
}

.rotate-preview-heading span {
  color: #94a3b8;
  font-size: 11px;
}

.rotate-preview {
  display: flex;

  min-height: 380px;
  padding: 20px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 9px;

  background:
    repeating-conic-gradient(
      #f1f5f9 0% 25%,
      white 0% 50%
    )
    50% / 20px 20px;
}

.rotate-preview canvas {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 500px;

  object-fit: contain;

  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.08);
}

.rotate-controls-card h2 {
  margin: 0 0 16px;

  color: #0f172a;
  font-size: 16px;
}

.rotate-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.rotate-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 16px;

  padding-top: 20px;
  margin-top: 20px;

  border-top: 1px solid #e2e8f0;
}

.rotate-options .option {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rotate-options label {
  color: #475569;

  font-size: 12px;
  font-weight: 700;
}

.rotate-options select {
  height: 40px;
  padding: 0 10px;

  border: 1px solid #d7e0ea;
  border-radius: 7px;

  background: white;
  color: #334155;
}

.rotate-bottom-actions {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding-top: 20px;
  margin-top: 20px;

  border-top: 1px solid #e2e8f0;
}

.rotate-error {
  margin: 13px 0 0;

  color: #b91c1c;
  font-size: 12px;
}

@media (max-width: 650px) {
  .rotate-preview {
    min-height: 260px;
    padding: 12px;
  }

  .rotate-options {
    grid-template-columns: 1fr;
  }

  .rotate-bottom-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rotate-bottom-actions .convert-button {
    width: 100%;
  }
}

/* PDF tools */

.pdf-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.pdf-page-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.pdf-page-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.pdf-page-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.pdf-page-info > div {
  min-width: 0;
}

.pdf-page-info strong,
.pdf-page-info span {
  display: block;
}

.pdf-page-info span {
  margin-top: 3px;
  font-size: 0.82rem;
  color: #64748b;
}

.pdf-page-info .secondary-button {
  flex-shrink: 0;
}

/* Keep PDF uploader content vertically aligned */
[data-controller="pdf-to-jpg"] .drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  text-align: center;
}

[data-controller="pdf-to-jpg"] .drop-zone-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 2px;
}

[data-controller="pdf-to-jpg"] .drop-zone > span {
  color: #94a3b8;
  font-size: 0.9rem;
}

[data-controller="pdf-to-jpg"] .drop-zone > small {
  color: #64748b;
}

@media (max-width: 600px) {
  .pdf-page-grid {
    grid-template-columns: 1fr;
  }
}

/* Merge PDF */

.merge-pdf-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  text-align: center;
}

.merge-pdf-drop-zone .drop-zone-icon {
  font-size: 2rem;
  line-height: 1;
}

.merge-pdf-drop-zone > span {
  color: #94a3b8;
  font-size: 0.9rem;
}

.merge-pdf-drop-zone > small {
  color: #64748b;
}

.merge-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.merge-pdf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.merge-pdf-order {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
}

.merge-pdf-icon {
  font-size: 1.4rem;
}

.merge-pdf-info {
  min-width: 0;
  flex: 1;
}

.merge-pdf-info strong,
.merge-pdf-info span {
  display: block;
}

.merge-pdf-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-pdf-info span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
}

.merge-pdf-controls {
  display: flex;
  gap: 6px;
}

.merge-pdf-control {
  padding: 8px 11px;
}

@media (max-width: 650px) {
  .merge-pdf-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .merge-pdf-info {
    width: calc(100% - 90px);
  }

  .merge-pdf-controls {
    width: 100%;
    padding-left: 42px;
  }
}

/* JPG to PNG */

.jpg-png-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  text-align: center;
}

.jpg-png-drop-zone .drop-zone-icon {
  font-size: 2rem;
  line-height: 1;
}

.jpg-png-drop-zone > span {
  color: #94a3b8;
  font-size: 0.9rem;
}

.jpg-png-drop-zone > small {
  color: #64748b;
}

.jpg-png-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.jpg-png-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.jpg-png-card > img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.jpg-png-info {
  padding: 14px;
}

.jpg-png-details strong,
.jpg-png-details span {
  display: block;
}

.jpg-png-details strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jpg-png-details span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
}

.jpg-png-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* ========================================
   Static / legal pages
   ======================================== */

.legal-page {
  min-height: 65vh;
  padding: 72px 20px 96px;
}

.legal-page-container {
  width: min(760px, 100%);
  margin: 0 auto;
}

.legal-page-header {
  padding-bottom: 34px;
  margin-bottom: 38px;
  border-bottom: 1px solid #e2e8f0;
}

.legal-page-label {
  display: inline-block;
  margin-bottom: 12px;

  color: #6366f1;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-page-header h1 {
  margin: 0;

  color: #0f172a;

  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.legal-page-header p {
  max-width: 620px;
  margin: 14px 0 0;

  color: #64748b;

  font-size: 16px;
  line-height: 1.7;
}

.legal-page-content section {
  margin-bottom: 34px;
}

.legal-page-content h2 {
  margin: 0 0 10px;

  color: #0f172a;

  font-size: 18px;
  line-height: 1.4;
}

.legal-page-content p {
  margin: 0 0 14px;

  color: #475569;

  font-size: 14px;
  line-height: 1.8;
}

.legal-email {
  display: inline-flex;
  margin-top: 2px;

  color: #4f46e5;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.legal-email:hover {
  text-decoration: underline;
}

.legal-updated {
  padding-top: 24px;
  margin-top: 44px !important;

  border-top: 1px solid #e2e8f0;

  color: #94a3b8 !important;

  font-size: 12px !important;
}

@media (max-width: 640px) {
  .legal-page {
    padding: 48px 20px 72px;
  }

  .legal-page-header {
    padding-bottom: 28px;
    margin-bottom: 30px;
  }
}

/* ========================================
   Contact page
   ======================================== */

.contact-page {
  min-height: 70vh;
  padding: 72px 20px 96px;
}

.contact-container {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.contact-header {
  max-width: 620px;
  margin-bottom: 46px;
}

.contact-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.contact-header p {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.7;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  gap: 72px;
  align-items: start;
}


/* Contact information */

.contact-info {
  padding-top: 8px;
}

.contact-info > h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.contact-info > p {
  margin: 0 0 32px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.contact-info-item {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  align-items: flex-start;
}

.contact-info-icon {
  display: flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: #eef2ff;
  color: #6366f1;
}

.contact-info-icon svg {
  width: 19px;
  height: 19px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-info-item strong {
  display: block;
  margin: 1px 0 4px;

  color: #0f172a;
  font-size: 14px;
}

.contact-info-item span {
  display: block;

  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}


/* Form */

.contact-form-card {
  padding: 32px;

  border: 1px solid #e2e8f0;
  border-radius: 16px;

  background: #ffffff;

  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 8px 30px rgba(15, 23, 42, 0.04);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-field label {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  box-sizing: border-box;

  border: 1px solid #cbd5e1;
  border-radius: 9px;

  background: #ffffff;
  color: #0f172a;

  font: inherit;
  font-size: 14px;

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.contact-field input,
.contact-field select {
  height: 44px;
  padding: 0 12px;
}

.contact-field textarea {
  min-height: 150px;
  padding: 12px;

  line-height: 1.6;
  resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #94a3b8;
}

.contact-field input:hover,
.contact-field select:hover,
.contact-field textarea:hover {
  border-color: #94a3b8;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.11);
}

.contact-field-hint {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
}

.contact-submit {
  display: inline-flex;
  min-height: 46px;
  padding: 0 22px;

  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 9px;

  background: #4f46e5;
  color: #ffffff;

  font: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.contact-submit:hover {
  background: #4338ca;

  box-shadow: 0 5px 16px rgba(79, 70, 229, 0.18);

  transform: translateY(-1px);
}

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

.contact-form-privacy {
  margin: -8px 0 0;

  color: #94a3b8;

  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}


/* Messages */

.contact-alert {
  display: flex;
  margin: -14px 0 30px;
  padding: 13px 16px;

  align-items: center;
  gap: 10px;

  border: 1px solid;
  border-radius: 10px;

  font-size: 13px;
  font-weight: 500;
}

.contact-alert-icon {
  display: flex;
  width: 20px;
  height: 20px;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  font-size: 11px;
  font-weight: 800;
}

.contact-alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.contact-alert-success .contact-alert-icon {
  background: #dcfce7;
}

.contact-alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.contact-alert-error .contact-alert-icon {
  background: #fee2e2;
}


/* Spam honeypot */

.contact-honeypot {
  position: absolute !important;
  left: -10000px !important;

  width: 1px !important;
  height: 1px !important;

  overflow: hidden !important;
}


/* Responsive */

@media (max-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .contact-info {
    max-width: 560px;
  }
}

@media (max-width: 560px) {
  .contact-page {
    padding: 48px 20px 72px;
  }

  .contact-header {
    margin-bottom: 34px;
  }

  .contact-form-card {
    padding: 22px;
  }

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