/* ==========================================================================
   Letomix — shared "free tool" page design system
   Extracted from the background-remover tool page (RU) 2026-07-21 build.
   Used by every /free-tools/<tool>/ page: hero, workspace panel, dropzone,
   preview cards, controls, sidebar, steps, tips, info-grid, related cards.
   Scope root class: .tool-page (put this on <main>).
   ========================================================================== */


    .tool-page {
      background:
        linear-gradient(180deg, #f7f9ff 0%, #fff 32%, #fbfcff 72%, #fff 100%);
    }

    .tool-hero {
      position: relative;
      overflow: hidden;
      padding: 52px 0 108px;
      color: #fff;
      background:
        radial-gradient(circle at 12% 0%, rgba(47,107,255,.48), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(139,92,246,.44), transparent 34%),
        linear-gradient(135deg, #070a18, #111a4b 52%, #180d3b);
    }

    .tool-hero::after {
      position: absolute;
      right: -130px;
      bottom: -175px;
      width: 430px;
      height: 430px;
      content: "";
      border-radius: 50%;
      background: rgba(40,217,255,.08);
      pointer-events: none;
    }

    .tool-hero-grid {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
      align-items: center;
      gap: 48px;
    }

    .tool-hero h1 {
      max-width: 860px;
      margin: 14px 0 20px;
      font-size: clamp(2.75rem, 5.4vw, 5.4rem);
      line-height: .97;
      letter-spacing: -.068em;
    }

    .tool-hero-copy > p {
      max-width: 780px;
      margin: 0;
      color: rgba(255,255,255,.79);
      font-size: 1.12rem;
      line-height: 1.72;
    }

    .tool-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 24px;
    }

    .tool-pills span {
      display: inline-flex;
      padding: 7px 11px;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 999px;
      background: rgba(255,255,255,.07);
      color: rgba(255,255,255,.79);
      font-size: .82rem;
      font-weight: 800;
    }

    .tool-hero-card {
      position: relative;
      overflow: hidden;
      padding: 28px;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 28px;
      background: rgba(255,255,255,.08);
      box-shadow: 0 30px 90px rgba(0,0,0,.28);
      backdrop-filter: blur(16px);
    }

    .tool-hero-card::before {
      position: absolute;
      inset: -2px;
      content: "";
      border-radius: inherit;
      background:
        linear-gradient(
          110deg,
          transparent 20%,
          rgba(88,98,255,.05) 38%,
          rgba(92,212,255,.18) 50%,
          rgba(123,92,255,.08) 62%,
          transparent 80%
        );
      transform: translateX(-120%);
      animation: tool-shimmer 6s ease-in-out infinite;
      pointer-events: none;
    }

    .tool-hero-card > * {
      position: relative;
      z-index: 1;
    }

    .tool-card-label {
      display: inline-flex;
      color: #8be8ff;
      font-size: .76rem;
      font-weight: 900;
      letter-spacing: .11em;
      text-transform: uppercase;
    }

    .tool-hero-card h2 {
      margin: 12px 0 18px;
      color: #fff;
      font-size: 1.7rem;
      line-height: 1.15;
      letter-spacing: -.035em;
    }

    .tool-hero-benefits {
      display: grid;
      gap: 12px;
    }

    .tool-hero-benefit {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      padding: 14px;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 16px;
      background: rgba(255,255,255,.055);
    }

    .tool-hero-benefit span {
      display: grid;
      width: 38px;
      height: 38px;
      place-items: center;
      border-radius: 12px;
      color: #fff;
      background: linear-gradient(135deg, rgba(47,107,255,.96), rgba(139,92,246,.96));
      font-size: .72rem;
      font-weight: 900;
    }

    .tool-hero-benefit strong {
      display: block;
      color: #fff;
      line-height: 1.25;
    }

    .tool-hero-benefit small {
      display: block;
      margin-top: 4px;
      color: rgba(255,255,255,.66);
      line-height: 1.45;
    }

    .tool-shell {
      position: relative;
      z-index: 2;
      margin-top: -62px;
      padding-bottom: 72px;
    }

    .tool-workspace {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 300px;
      gap: 22px;
      align-items: start;
    }

    .tool-panel {
      overflow: hidden;
      padding: 28px;
      border: 1px solid rgba(47,107,255,.16);
      border-radius: 28px;
      background: #fff;
      box-shadow: 0 28px 78px rgba(15,23,42,.14);
    }

    .tool-panel-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(240px, 390px);
      gap: 26px;
      align-items: end;
      margin-bottom: 22px;
    }

    .tool-panel-head h2 {
      margin: 8px 0 0;
      color: #101828;
      font-size: clamp(1.85rem, 3vw, 2.7rem);
      line-height: 1.04;
      letter-spacing: -.05em;
    }

    .tool-panel-head p {
      margin: 0;
      color: #667085;
      line-height: 1.58;
    }

    .tool-page .tool-dropzone {
      position: relative;
      overflow: hidden;
      display: grid;
      min-height: 280px;
      place-items: center;
      padding: 30px;
      border: 2px dashed rgba(47,107,255,.28);
      border-radius: 22px;
      background:
        radial-gradient(circle at 85% 15%, rgba(139,92,246,.08), transparent 28%),
        linear-gradient(135deg, #f8fbff, #faf8ff);
      transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
    }

    .tool-page .tool-dropzone:hover,
    .tool-page .tool-dropzone.is-dragover {
      transform: translateY(-2px);
      border-color: rgba(47,107,255,.62);
      box-shadow: 0 18px 45px rgba(47,107,255,.11);
    }

    .tool-page .tool-file-input {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      opacity: 0;
      pointer-events: none;
    }

    .tool-page .dropzone-copy {
      max-width: 620px;
      text-align: center;
    }

    .tool-page .dropzone-icon {
      display: grid;
      width: 62px;
      height: 62px;
      place-items: center;
      margin: 0 auto 17px;
      border-radius: 19px;
      color: #fff;
      background: linear-gradient(135deg, var(--blue, #2f6bff), var(--purple, #7c3aed));
      box-shadow: 0 16px 38px rgba(47,107,255,.22);
      font-size: 1.7rem;
      font-weight: 500;
    }

    .tool-page .dropzone-copy h3 {
      margin: 0;
      color: #101828;
      font-size: clamp(1.35rem, 2.6vw, 1.85rem);
      line-height: 1.18;
      letter-spacing: -.035em;
    }

    .tool-page .dropzone-copy p {
      margin: 11px 0 18px;
      color: #667085;
      line-height: 1.55;
    }

    .tool-page .tool-status {
      margin-top: 16px;
      padding: 12px 14px;
      color: #344054;
      border: 1px solid #e4e7ec;
      border-radius: 14px;
      background: #f9fafb;
      font-size: .92rem;
      line-height: 1.45;
    }

    .tool-page .tool-progress {
      overflow: hidden;
      height: 6px;
      margin-top: 10px;
      border-radius: 999px;
      background: #edf0f6;
    }

    .tool-page .tool-progress span {
      display: block;
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--blue, #2f6bff), var(--purple, #7c3aed), #28d9ff);
      transition: width .25s ease;
    }

    .tool-page .tool-preview-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
      margin-top: 20px;
    }

    .tool-page .preview-card {
      overflow: hidden;
      border: 1px solid #e4e7ec;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 12px 34px rgba(15,23,42,.06);
    }

    .tool-page .preview-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 68px;
      padding: 15px 17px;
      border-bottom: 1px solid #eaecf0;
      background: #fcfcfd;
    }

    .tool-page .preview-card-head h3 {
      margin: 0;
      color: #101828;
      font-size: 1rem;
    }

    .tool-page .preview-card-head span {
      color: #667085;
      font-size: .78rem;
    }

    .tool-page .result-card-head > div {
      min-width: 0;
    }

    .tool-page .preview-download-btn {
      flex: 0 0 auto;
      padding: 9px 12px;
      font-size: .82rem;
    }

    .tool-page .preview-frame {
      position: relative;
      display: grid;
      min-height: 330px;
      place-items: center;
      overflow: hidden;
      background: #f4f6fa;
    }

    .tool-page .preview-frame.checkerboard {
      background-color: #fff;
      background-image:
        linear-gradient(45deg, #e8ebf2 25%, transparent 25%),
        linear-gradient(-45deg, #e8ebf2 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e8ebf2 75%),
        linear-gradient(-45deg, transparent 75%, #e8ebf2 75%);
      background-position: 0 0, 0 10px, 10px -10px, -10px 0;
      background-size: 20px 20px;
    }

    .tool-page .preview-frame img {
      display: none;
      max-width: 100%;
      max-height: 420px;
      width: auto;
      height: auto;
      object-fit: contain;
    }

    .tool-page .preview-frame img[src]:not([src=""]) {
      display: block;
    }

    .tool-page .tool-controls {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px 24px;
      align-items: end;
      margin-top: 20px;
      padding: 20px;
      border: 1px solid #e4e7ec;
      border-radius: 20px;
      background: #f9fafb;
    }

    .tool-page .tool-controls fieldset {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      margin: 0;
      padding: 0;
      border: 0;
    }

    .tool-page .tool-controls legend {
      width: 100%;
      margin-bottom: 7px;
      color: #101828;
      font-weight: 900;
    }

    .tool-page .tool-controls label {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #475467;
      font-size: .9rem;
      font-weight: 700;
    }

    .tool-page .color-control input[type="color"] {
      width: 30px;
      height: 25px;
      padding: 0;
      border: 0;
      border-radius: 7px;
      background: transparent;
    }

    .tool-page .tool-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
    }

    .tool-page .tool-help {
      grid-column: 1 / -1;
      margin: 0;
      color: #667085;
      font-size: .84rem;
      line-height: 1.48;
    }

    .tool-sidebar {
      display: grid;
      gap: 16px;
    }

    .tool-side-card {
      padding: 21px;
      border: 1px solid #e4e7ec;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 15px 42px rgba(15,23,42,.075);
    }

    .tool-side-card.is-accent {
      color: #fff;
      border-color: transparent;
      background:
        radial-gradient(circle at 90% 10%, rgba(40,217,255,.18), transparent 32%),
        linear-gradient(135deg, #101942, #281053);
    }

    .tool-side-card .eyebrow {
      margin-bottom: 11px;
    }

    .tool-side-card h3 {
      margin: 0 0 10px;
      color: #101828;
      font-size: 1.12rem;
      line-height: 1.25;
    }

    .tool-side-card.is-accent h3 {
      color: #fff;
    }

    .tool-side-card p,
    .tool-side-card li {
      color: #667085;
      line-height: 1.56;
    }

    .tool-side-card.is-accent p {
      color: rgba(255,255,255,.72);
    }

    .tool-side-card ul {
      display: grid;
      gap: 8px;
      margin: 0;
      padding-left: 19px;
    }

    .tool-section {
      padding: 66px 0;
    }

    .tool-section + .tool-section {
      padding-top: 4px;
    }

    .tool-section-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
      align-items: end;
      gap: 28px;
      margin-bottom: 26px;
    }

    .tool-section-title .eyebrow {
      display: inline-flex;
      width: fit-content;
      margin: 0 0 12px;
      padding: 7px 12px;
      color: #fff;
      border-radius: 999px;
      background: linear-gradient(135deg, #2f6bff, #7c3aed);
      box-shadow: 0 8px 22px rgba(47,107,255,.19);
      font-size: .73rem;
      line-height: 1;
      letter-spacing: .1em;
    }

    .tool-section-title .eyebrow::before {
      width: 6px;
      height: 6px;
      content: "";
      border-radius: 50%;
      background: #a8f3ff;
      box-shadow: 0 0 10px rgba(168,243,255,.9);
    }

    .tool-section-title h2 {
      max-width: 780px;
      margin: 0;
      color: #101828;
      font-size: clamp(2rem, 3.5vw, 3.1rem);
      line-height: 1.03;
      letter-spacing: -.055em;
    }

    .tool-section-head > p {
      max-width: 420px;
      margin: 0;
      padding-left: 17px;
      color: #475467;
      border-left: 3px solid rgba(47,107,255,.26);
      line-height: 1.62;
    }

    .tool-steps {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      counter-reset: bg-step;
    }

    .tool-step {
      padding: 23px;
      border: 1px solid #e4e7ec;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 14px 40px rgba(15,23,42,.07);
      counter-increment: bg-step;
    }

    .tool-step::before {
      display: grid;
      width: 38px;
      height: 38px;
      place-items: center;
      margin-bottom: 16px;
      content: counter(bg-step, decimal-leading-zero);
      border-radius: 12px;
      color: #fff;
      background: linear-gradient(135deg, var(--blue, #2f6bff), var(--purple, #7c3aed));
      font-size: .78rem;
      font-weight: 900;
    }

    .tool-step h3 {
      margin: 0 0 9px;
      color: #101828;
      font-size: 1.08rem;
    }

    .tool-step p {
      margin: 0;
      color: #667085;
      line-height: 1.56;
    }

    .tool-info-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 20px;
    }

    .tool-info-card {
      padding: 27px;
      border: 1px solid #e4e7ec;
      border-radius: 22px;
      background: #fff;
      box-shadow: 0 16px 44px rgba(15,23,42,.075);
    }

    .tool-info-card h3 {
      margin: 0 0 11px;
      color: #101828;
      font-size: 1.25rem;
    }

    .tool-info-card p {
      margin: 0;
      color: #667085;
      line-height: 1.65;
    }

    .tool-info-card p + p {
      margin-top: 12px;
    }

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

    .tool-tip {
      padding: 23px;
      border: 1px solid #e4e7ec;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 14px 40px rgba(15,23,42,.07);
    }

    .tool-tip span {
      display: grid;
      width: 43px;
      height: 43px;
      place-items: center;
      border-radius: 14px;
      color: var(--blue, #2f6bff);
      background: linear-gradient(135deg, #edf5ff, #f2edff);
      font-weight: 900;
    }

    .tool-tip h3 {
      margin: 16px 0 8px;
      color: #101828;
      font-size: 1.08rem;
    }

    .tool-tip p {
      margin: 0;
      color: #667085;
      line-height: 1.55;
    }

    .tool-page .faq-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    .tool-page .faq-item {
      padding: 22px;
      border: 1px solid #e4e7ec;
      border-radius: 19px;
      background: #fff;
      box-shadow: 0 13px 38px rgba(15,23,42,.065);
    }

    .tool-page .faq-question {
      margin: 0 0 9px;
      color: #101828;
      font-size: 1.05rem;
      line-height: 1.28;
    }

    .tool-page .faq-answer {
      margin: 0;
      color: #667085;
      line-height: 1.58;
    }

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

    .tool-related-card {
      display: block;
      padding: 23px;
      color: inherit;
      border: 1px solid #e4e7ec;
      border-radius: 20px;
      background: #fff;
      box-shadow: 0 14px 40px rgba(15,23,42,.075);
      text-decoration: none;
      transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    }

    .tool-related-card:hover {
      transform: translateY(-2px);
      border-color: #cbd8ff;
      box-shadow: 0 22px 55px rgba(47,107,255,.13);
    }

    .tool-related-card span {
      display: grid;
      width: 43px;
      height: 43px;
      place-items: center;
      border-radius: 14px;
      color: #fff;
      background: linear-gradient(135deg, var(--blue, #2f6bff), var(--purple, #7c3aed));
      font-size: .75rem;
      font-weight: 900;
    }

    .tool-related-card h3 {
      margin: 16px 0 8px;
      color: #101828;
      font-size: 1.1rem;
    }

    .tool-related-card p {
      margin: 0;
      color: #667085;
      line-height: 1.55;
    }

    @keyframes tool-shimmer {
      0%, 70%, 100% { transform: translateX(-120%); }
      82% { transform: translateX(120%); }
    }

    @media (prefers-reduced-motion: reduce) {
      .tool-hero-card::before {
        animation: none;
      }

      .tool-page .tool-dropzone,
      .tool-related-card {
        transition: none;
      }
    }

    @media (max-width: 1050px) {
      .tool-workspace {
        grid-template-columns: 1fr;
      }

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

    @media (max-width: 980px) {
      .tool-hero-grid,
      .tool-panel-head,
      .tool-section-head {
        grid-template-columns: 1fr;
      }

      .tool-hero-card {
        max-width: 720px;
      }

      .tool-section-head {
        align-items: start;
        gap: 12px;
      }

      .tool-section-head > p {
        max-width: 720px;
      }

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

    @media (max-width: 760px) {
      .tool-page .tool-preview-grid,
      .tool-info-grid,
      .tool-tips,
      .tool-page .faq-grid,
      .tool-related {
        grid-template-columns: 1fr;
      }

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

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

      .tool-page .tool-actions {
        justify-content: flex-start;
      }
    }

    @media (max-width: 640px) {
      .tool-hero {
        padding: 44px 0 92px;
      }

      .tool-hero h1 {
        font-size: 2.5rem;
        line-height: 1.01;
      }

      .tool-hero-copy > p {
        font-size: 1rem;
      }

      .tool-hero-card,
      .tool-panel {
        padding: 22px;
        border-radius: 22px;
      }

      .tool-shell {
        margin-top: -52px;
        padding-bottom: 48px;
      }

      .tool-page .tool-dropzone {
        min-height: 245px;
        padding: 22px;
      }

      .tool-page .preview-frame {
        min-height: 260px;
      }

      .tool-page .result-card-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .tool-page .preview-download-btn {
        width: 100%;
        justify-content: center;
      }

      .tool-section {
        padding: 48px 0;
      }

      .tool-section + .tool-section {
        padding-top: 0;
      }

      .tool-section-title h2 {
        font-size: 2rem;
      }

      .tool-section-head > p {
        padding-left: 14px;
      }

      .tool-steps {
        grid-template-columns: 1fr;
      }
    }
  
/* Extra form controls used by tools that need select/number inputs
   (compress-image, and future tools) — kept visually consistent with
   the existing .tool-controls label style. */
.tool-page .tool-controls select,
.tool-page .tool-controls input[type="number"] {
  padding: 7px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #101828;
  font: inherit;
  font-size: .88rem;
}

.tool-page .tool-controls input[type="number"] {
  width: 120px;
}

.tool-page .tool-controls label {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}


/* 2026-07-30 functional fixes */
.tool-page .field-note{display:block;max-width:260px;margin-top:6px;color:#667085;font-size:.76rem;font-weight:500;line-height:1.4}
.tool-page .tool-controls label.is-stacked{display:grid;align-items:start;gap:5px}
.tool-page .tool-controls select:disabled{opacity:.62;cursor:not-allowed}
.tool-page .btn:disabled{cursor:not-allowed;opacity:.52;transform:none;box-shadow:none}
.tool-page .tool-dropzone:focus-within{outline:3px solid rgba(47,107,255,.22);outline-offset:4px}
