/* LetitEdit Image & Photo Editor
 * Tool page, desktop workspace, mobile workspace and editor controls.
 */

/* ---------- Tool page ---------- */
.tool-page { background: var(--surface-alt); }
body.editor-sheet-open { overflow: hidden; }
.tool-hero {
  padding: 30px 0 24px;
  background:
    radial-gradient(700px 260px at 88% -20%, #dbeafe 0%, rgba(233, 224, 255, 0) 70%),
    linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 1px solid var(--border);
}
.tool-hero h1 { margin: 4px 0 8px; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
.tool-hero p { max-width: 860px; margin: 0; color: var(--muted); font-size: 1.02rem; }
.tool-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--body);
  font-size: .84rem;
  font-weight: 600;
}
.tool-hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.tool-hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

.editor-section { padding: 18px 0 12px; }
.editor-container { width: min(1680px, calc(100% - 32px)); }
.editor-shell {
  --editor-panel-width: 348px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: clamp(560px, calc(100dvh - 300px), 980px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #252a40;
  border-radius: 16px;
  background: #0b0d18;
  color: #e5e7f2;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  font-size: 14px;
}
.editor-shell button { color: inherit; }
.editor-shell [hidden] { display: none !important; }
.editor-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.editor-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---------- Editor top bar ---------- */
.editor-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 7px 10px;
  border-bottom: 1px solid #252a40;
  background: #141728;
}
.editor-topbar-group { display: flex; align-items: center; gap: 3px; min-width: 0; }
.editor-topbar-file { flex: 1 1 auto; min-width: 0; }
.editor-file-name {
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #b9bfd6;
  font-size: .78rem;
}
.editor-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #b9bfd6;
}
.editor-icon-button:hover:not(:disabled) { background: #252a40; color: #fff; }
.editor-icon-button:disabled { opacity: .35; cursor: not-allowed; }
.editor-icon-button[aria-pressed="true"] { background: #1e3a8a; color: #fff; }
.editor-zoom-group { gap: 1px; }
.editor-zoom-fit {
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #2c3350;
  border-radius: 7px;
  background: #1b1f33;
  color: #cfd4e7;
  font-size: .72rem;
  font-weight: 600;
}
.editor-zoom-fit:hover { background: #252a40; color: #fff; }
.editor-zoom-label { min-width: 44px; text-align: center; color: #aeb4cc; font-size: .7rem; font-variant-numeric: tabular-nums; }
.editor-compare-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #2c3350;
  border-radius: 8px;
  background: #1b1f33;
  color: #cfd4e7;
  font-size: .76rem;
  font-weight: 600;
}
.editor-compare-button:hover { background: #252a40; color: #fff; }
.editor-compare-button[aria-pressed="true"] { background: #1e3a8a; border-color: #2563eb; color: #fff; }
.editor-primary-button {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
}
.editor-primary-button:hover { background: var(--primary-hover); }
.editor-primary-button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Workspace ---------- */
.editor-workspace {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) var(--editor-panel-width);
  flex: 1;
  min-height: 0;
}
.editor-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid #252a40;
  background: #121524;
}
.editor-tool-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9aa1bb;
  font-size: .61rem;
  line-height: 1.1;
  letter-spacing: .01em;
}
.editor-tool-button .editor-icon { width: 20px; height: 20px; }
.editor-tool-button:hover { background: #222741; color: #fff; }
.editor-tool-button[aria-pressed="true"] { background: #1e3a8a; color: #fff; }
.editor-shell.rail-collapsed .editor-workspace { grid-template-columns: 0 minmax(0, 1fr) var(--editor-panel-width); }
.editor-shell.rail-collapsed .editor-rail { display: none; }
.editor-shell.panel-collapsed .editor-workspace { grid-template-columns: 78px minmax(0, 1fr) 0; }
.editor-shell.panel-collapsed .editor-panel,
.editor-shell.panel-collapsed .editor-panel-resizer { display: none; }
.editor-shell.rail-collapsed.panel-collapsed .editor-workspace { grid-template-columns: 0 minmax(0, 1fr) 0; }

.editor-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0b0d18; }
.editor-canvas-scroll {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
  background:
    radial-gradient(circle at 50% 40%, rgba(92, 45, 221, .08), transparent 55%),
    #0b0d18;
}
.editor-canvas { display: block; max-width: 100%; max-height: 100%; outline: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.editor-canvas:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }
.editor-canvas.is-panning { cursor: grabbing; }
.editor-canvas.is-crop { cursor: crosshair; }
.editor-canvas.is-draw { cursor: crosshair; }
.editor-canvas.is-move { cursor: move; }
.editor-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  padding: 4px 10px;
  overflow: hidden;
  border-top: 1px solid #252a40;
  background: #141728;
  color: #8f96b2;
  font-size: .68rem;
  white-space: nowrap;
}
.editor-statusbar span { overflow: hidden; text-overflow: ellipsis; }
.editor-statusbar span:last-child { text-align: right; }

.editor-drop-overlay {
  position: absolute;
  inset: 10px;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 2px dashed #2563eb;
  border-radius: 14px;
  background: rgba(18, 21, 36, .86);
  color: #e5e7f2;
  pointer-events: none;
  text-align: center;
}
.editor-drop-overlay strong { display: block; font-size: 1rem; }
.editor-drop-overlay span { display: block; margin-top: 4px; color: #aeb4cc; font-size: .78rem; }

/* ---------- Right panel ---------- */
.editor-panel-resizer { position: absolute; z-index: 4; top: 0; bottom: 0; right: calc(var(--editor-panel-width) - 2px); width: 5px; cursor: col-resize; }
.editor-panel-resizer::after { content: ""; position: absolute; inset: 0 2px; background: transparent; }
.editor-panel-resizer:hover::after { background: #2563eb; }
.editor-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid #252a40;
  background: #141728;
}
.editor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid #252a40;
}
.editor-panel-head h2 { margin: 0; color: #fff; font-family: var(--font-head); font-size: .88rem; font-weight: 700; letter-spacing: 0; }
.editor-panel-body { flex: 1; min-height: 0; padding: 12px; overflow-y: auto; overscroll-behavior: contain; }
.editor-panel-body::-webkit-scrollbar, .editor-rail::-webkit-scrollbar, .editor-mobilebar::-webkit-scrollbar { width: 8px; height: 6px; }
.editor-panel-body::-webkit-scrollbar-thumb, .editor-rail::-webkit-scrollbar-thumb, .editor-mobilebar::-webkit-scrollbar-thumb { border-radius: 999px; background: #343a58; }

/* ---------- Controls ---------- */
.editor-panel-body h3, .editor-section-title { margin: 18px 0 8px; color: #dfe3f2; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.editor-panel-body h3:first-child { margin-top: 0; }
.editor-field { display: grid; gap: 5px; margin-bottom: 10px; min-width: 0; }
.editor-field > span, .editor-field > label, .editor-label { color: #b9bfd6; font-size: .74rem; font-weight: 600; }
.editor-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.editor-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.editor-input, .editor-select, .editor-textarea, .editor-number {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #303752;
  border-radius: 7px;
  background: #0f1220;
  color: #e5e7f2;
  font-size: .8rem;
  line-height: 1.35;
}
.editor-input:focus, .editor-select:focus, .editor-textarea:focus, .editor-number:focus { outline: 2px solid #2563eb; outline-offset: 0; border-color: transparent; }
.editor-textarea { min-height: 74px; resize: vertical; }
.editor-select { appearance: auto; }
.editor-color { width: 38px; height: 30px; padding: 2px; border: 1px solid #303752; border-radius: 7px; background: #0f1220; }
.editor-check { display: flex; align-items: center; gap: 7px; color: #cfd4e7; font-size: .78rem; }
.editor-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.editor-range-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 42px; align-items: center; gap: 8px; margin-bottom: 7px; }
.editor-range-row label { color: #b9bfd6; font-size: .72rem; }
.editor-range-row output { color: #9aa1bb; font-size: .68rem; text-align: right; font-variant-numeric: tabular-nums; }
.editor-range { width: 100%; height: 18px; accent-color: var(--primary); }
.editor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #303752;
  border-radius: 7px;
  background: #1b1f33;
  color: #dfe3f2;
  font-size: .76rem;
  font-weight: 600;
}
.editor-button:hover { background: #252a40; color: #fff; }
.editor-button-primary { border-color: transparent; background: var(--primary); color: #fff; }
.editor-button-primary:hover { background: var(--primary-hover); }
.editor-button-danger { border-color: #5c2434; background: #351822; color: #ffb4c2; }
.editor-button-danger:hover { background: #4a2030; color: #fff; }
.editor-button-block { width: 100%; }
.editor-button:disabled { opacity: .4; cursor: not-allowed; }
.editor-button-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.editor-hint, .editor-note { margin: 8px 0 0; color: #8f96b2; font-size: .7rem; line-height: 1.45; }
.editor-note strong { color: #cfd4e7; }
.editor-chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.editor-chip {
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid #303752;
  border-radius: 7px;
  background: #1b1f33;
  color: #cfd4e7;
  font-size: .71rem;
  font-weight: 600;
}
.editor-chip:hover { background: #252a40; color: #fff; }
.editor-chip[aria-pressed="true"] { border-color: #2563eb; background: #1e3a8a; color: #fff; }
.editor-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.editor-filter-button {
  min-height: 44px;
  padding: 4px;
  border: 1px solid #303752;
  border-radius: 7px;
  background: #1b1f33;
  color: #cfd4e7;
  font-size: .67rem;
  font-weight: 600;
  line-height: 1.2;
}
.editor-filter-button:hover { background: #252a40; color: #fff; }
.editor-filter-button[aria-pressed="true"] { border-color: #2563eb; background: #1e3a8a; color: #fff; }
.editor-empty { display: grid; gap: 12px; }
.editor-dropzone {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 22px 14px;
  border: 1.5px dashed #3b4262;
  border-radius: 10px;
  background: #101322;
  text-align: center;
}
.editor-dropzone .editor-icon { width: 34px; height: 34px; color: #2563eb; }
.editor-dropzone strong { color: #e5e7f2; font-size: .86rem; }
.editor-dropzone span { color: #8f96b2; font-size: .7rem; line-height: 1.4; }
.editor-fileinfo { display: grid; gap: 6px; padding: 10px; border: 1px solid #2a3048; border-radius: 9px; background: #101322; }
.editor-fileinfo-row { display: flex; justify-content: space-between; gap: 10px; font-size: .72rem; }
.editor-fileinfo-row span:first-child { color: #8f96b2; }
.editor-fileinfo-row span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dfe3f2; text-align: right; }
.editor-format-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.editor-format-list li { padding: 2px 6px; border: 1px solid #2a3048; border-radius: 999px; color: #9aa1bb; font-size: .62rem; }

/* ---------- Layers ---------- */
.editor-layer-list { display: grid; gap: 5px; margin: 0 0 10px; padding: 0; list-style: none; }
.editor-layer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid #2a3048;
  border-radius: 8px;
  background: #101322;
}
.editor-layer.is-active { border-color: #2563eb; background: #1d1938; }
.editor-layer-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.editor-layer-name { min-width: 0; width: 100%; padding: 4px 5px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #dfe3f2; font-size: .73rem; }
.editor-layer-name:focus { border-color: #303752; background: #0b0d18; outline: 0; }
.editor-layer-kind { color: #7f87a5; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; }
.editor-layer-button {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8f96b2;
}
.editor-layer-button:hover { background: #252a40; color: #fff; }
.editor-layer-button .editor-icon { width: 14px; height: 14px; }
.editor-layer-actions { display: flex; gap: 2px; }

/* ---------- Progress and toast ---------- */
.editor-toast {
  position: absolute;
  inset-inline: 50%;
  bottom: 18px;
  z-index: 120;
  max-width: min(440px, calc(100% - 24px));
  padding: 9px 14px;
  border: 1px solid #3b4262;
  border-radius: 9px;
  background: #1b1f33;
  color: #e5e7f2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  font-size: .76rem;
  text-align: center;
  transform: translateX(-50%);
}
.editor-toast.is-error { border-color: #7a2b3e; background: #351822; color: #ffd3db; }
.editor-progress {
  position: absolute;
  inset-inline: 50%;
  bottom: 16px;
  z-index: 115;
  width: min(380px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid #3b4262;
  border-radius: 9px;
  background: #141728;
  color: #dfe3f2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  transform: translateX(-50%);
}
.editor-progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #2a3048; }
.editor-progress-bar { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); transition: width .18s ease; }
.editor-progress span { display: block; margin-top: 6px; color: #9aa1bb; font-size: .68rem; text-align: center; }

/* ---------- Mobile workspace ---------- */
.editor-mobilebar { display: none; }
.editor-sheet-backdrop { display: none; }
@media (max-width: 900px) {
  .editor-container { width: 100%; }
  .editor-section { padding: 0; }
  .editor-shell {
    height: calc(100dvh - 150px);
    min-height: 420px;
    scroll-margin-top: 84px;
    border-radius: 0;
    border-inline: 0;
    box-shadow: none;
  }
  .editor-workspace { grid-template-columns: minmax(0, 1fr); }
  .editor-rail, .editor-panel-resizer, .editor-rail-toggle { display: none; }
  .editor-stage { min-height: 0; }
  .editor-topbar { gap: 3px; padding: 5px 6px; }
  .editor-topbar-file { flex: 1 1 90px; }
  .editor-file-name { max-width: 120px; }
  .editor-topbar-group { gap: 1px; }
  .editor-zoom-group .editor-icon-button { display: none; }
  .editor-zoom-label { min-width: 36px; }
  .editor-compare-button { width: 34px; padding: 0; justify-content: center; }
  .editor-compare-button span { display: none; }
  .editor-primary-button { padding: 0 12px; }
  .editor-mobilebar {
    display: flex;
    gap: 2px;
    padding: 4px 5px calc(4px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-top: 1px solid #252a40;
    background: #141728;
    scrollbar-width: none;
  }
  .editor-mobilebar::-webkit-scrollbar { display: none; }
  .editor-mobile-tool {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 54px;
    min-height: 46px;
    padding: 4px 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa1bb;
    font-size: .58rem;
    line-height: 1.1;
  }
  .editor-mobile-tool .editor-icon { width: 19px; height: 19px; }
  .editor-mobile-tool:hover, .editor-mobile-tool[aria-pressed="true"] { background: #1e3a8a; color: #fff; }
  .editor-mobile-export { color: #fff; background: var(--primary); }
  .editor-mobile-export:hover { background: var(--primary-hover); }
  .editor-panel {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 90;
    max-height: 62dvh;
    border-top: 1px solid #303752;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .45);
    transform: translateY(105%);
    transition: transform .2s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .editor-panel.is-open { transform: translateY(0); }
  .editor-panel-head { position: sticky; top: 0; z-index: 2; background: #141728; border-radius: 16px 16px 0 0; }
  .editor-panel-head::before { content: ""; position: absolute; inset-inline: 50%; top: 4px; width: 38px; height: 3px; border-radius: 999px; background: #3b4262; transform: translateX(-50%); }
  .editor-sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(4, 6, 14, .55); }
  .editor-statusbar { font-size: .62rem; }
  .editor-toast { top: 62px; bottom: auto; }
  .editor-progress { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .tool-hero { padding: 22px 0 18px; }
  .tool-hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .tool-hero p { font-size: .94rem; }
  .tool-content-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-side { position: static; }
}

@media (max-width: 480px) {
  .editor-shell { height: calc(100dvh - 140px); min-height: 400px; }
  .editor-topbar-file { flex-basis: 62px; }
  .editor-file-name { max-width: 76px; }
  .editor-zoom-fit { min-width: 34px; padding: 0 6px; }
  .editor-compare-button { display: none; }
  .editor-statusbar span:last-child { display: none; }
  .editor-mobile-tool { min-width: 51px; }
  .editor-panel { max-height: 66dvh; }
  .tool-hero-points { gap: 6px 12px; font-size: .78rem; }
}

@media (max-height: 620px) and (max-width: 900px) {
  .tool-hero { padding: 10px 0 8px; }
  .tool-hero h1 { font-size: 1.45rem; }
  .tool-hero p { display: none; }
  .tool-hero-points { display: none; }
  .editor-shell { height: calc(100dvh - 88px); min-height: 280px; scroll-margin-top: 76px; }
  .editor-panel { max-height: 72dvh; }
}

@media (max-width: 340px) {
  .editor-file-name { display: none; }
  .editor-topbar-file { flex-basis: auto; }
  .editor-mobile-tool { min-width: 48px; font-size: .54rem; }
}

/* ---------- Tool cards, SEO content and tables ---------- */
.tool-card-list { display: grid; gap: 9px; }
.tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--body);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tool-card:hover { border-color: #93c5fd; box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.tool-card-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); font-size: 1.3rem; }
.tool-card-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.tool-card-body strong { color: var(--ink); font-family: var(--font-head); font-size: 1rem; }
.tool-card-body span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.tool-card-kicker { color: var(--primary) !important; font-size: .64rem !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tool-card-arrow { color: var(--primary); font-size: 1.2rem; }
.tool-card-feature { background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%); border-color: #bfdbfe; }
.badge-live { background: #e8f7ee; color: #166534; }
.tool-content { padding-top: 34px; }
.tool-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; }
.tool-article { padding: 34px; min-width: 0; }
.tool-article h2 { margin: 34px 0 10px; font-size: 1.35rem; }
.tool-article h2:first-of-type { margin-top: 6px; }
.tool-article h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.tool-article p, .tool-article li { color: var(--body); }
.tool-article ol, .tool-article ul { padding-inline-start: 22px; }
.tool-article li { margin-bottom: 6px; }
.tool-table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: .86rem; }
.tool-table th, .tool-table td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.tool-table th { background: var(--surface-alt); color: var(--ink); font-size: .78rem; letter-spacing: .03em; }
.tool-table tr:nth-child(even) td { background: #fcfcfd; }
.tool-side { display: grid; gap: 16px; position: sticky; top: 92px; }
.tool-facts { display: grid; gap: 7px; margin: 0 0 10px; padding: 0; list-style: none; }
.tool-facts li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: .8rem; }
.tool-facts li span { color: var(--muted); text-align: right; }
.tool-side-note { margin: 0; color: var(--muted); font-size: .72rem; }
@media (max-width: 980px) {
  .tool-content-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tool-article { padding: 22px; }
  .tool-side { grid-template-columns: 1fr; }
  .tool-table { display: block; overflow-x: auto; white-space: nowrap; }
  .tool-card { align-items: flex-start; }
}
