/* Fastica Software (soft-space.online) — tool pages: Web to HTML, HTML to PDF. 29.10.2026.
   Uses the tokens of /styles.css (--panel, --line, --ink, --muted, --amber, --violet, --grad, --font-head). */

[hidden] { display: none !important; }

.tool-page { --field: rgba(10, 12, 28, .38); --soft: #8f95b8; }

/* ---------- hero ---------- */
.tool-hero { padding: 40px 0 28px; }
.tool-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px;
  color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; transition: color .2s;
}
.tool-back:hover { color: var(--ink); }
.tool-back svg { width: 16px; height: 16px; }
.tool-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 500; letter-spacing: -0.02em; margin-bottom: 14px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tool-hero .lead { max-width: 660px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips .chip { font-size: 13px; padding: 6px 14px; }
.chip--price { background: var(--amber); color: var(--on-glow); border-color: transparent; font-weight: 600; }

/* ---------- workspace ---------- */
.workspace { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 22px; padding-bottom: 80px; align-items: start; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; backdrop-filter: blur(6px);
}
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 18px; font-weight: 500; margin-bottom: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field-label, .field > label:not(.check):not(.dropzone) {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--soft);
}
.input, .select, .textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 180px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(178, 172, 245, .2); }
.input::placeholder, .textarea::placeholder { color: var(--soft); opacity: .8; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.select option { background: var(--bg-2); color: var(--ink); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink); cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--amber); flex: none; }
.check small { display: block; color: var(--soft); font-size: 13px; margin-top: 2px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.segmented button {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); background: transparent; border: 0;
  border-radius: 999px; padding: 9px 6px; cursor: pointer; transition: background .2s, color .2s;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.hint { font-size: 13px; color: var(--soft); line-height: 1.6; margin: 12px 0 0; }

.dropzone {
  display: grid; place-items: center; text-align: center; gap: 6px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 28px 16px;
  color: var(--muted); font-size: 15px; cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--violet); background: rgba(178, 172, 245, .07); }
.dropzone strong { color: var(--ink); font-weight: 600; }
.dropzone svg { width: 28px; height: 28px; stroke: var(--violet); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- stage ---------- */
.stage {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  min-height: 600px; display: flex; flex-direction: column; overflow: hidden; backdrop-filter: blur(6px);
}
.stage-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.stage-head { min-width: 0; flex: 1 1 260px; }
.stage-title { font-family: var(--font-head); font-weight: 500; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-sub { font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-body { flex: 1; position: relative; display: flex; }

.empty { margin: auto; text-align: center; padding: 48px 24px; max-width: 440px; color: var(--muted); font-size: 15px; }
.empty-icon {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
}
.empty-icon svg { width: 30px; height: 30px; stroke: var(--amber); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty h3 { color: var(--ink); font-size: 19px; margin-bottom: 8px; }
.empty p { margin: 0; }

.busy { margin: auto; width: min(440px, 90%); text-align: center; padding: 48px 0; }
.busy-title { font-family: var(--font-head); font-size: 19px; font-weight: 500; margin-bottom: 6px; }
.busy-text { font-size: 14px; color: var(--muted); min-height: 22px; }
.bar { height: 8px; border-radius: 8px; background: var(--field); overflow: hidden; margin: 18px 0 10px; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 8px; transition: width .3s; }
.bar.is-indeterminate span { width: 35%; animation: ss-slide 1.3s ease-in-out infinite; }
@keyframes ss-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }
.busy-time { font-size: 13px; color: var(--soft); }
.busy.busy--overlay {
  position: absolute; inset: 0; z-index: 3; width: auto; margin: 0; padding: 24px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: rgba(30, 34, 56, .92); backdrop-filter: blur(4px);
}
.busy.busy--overlay .bar { width: min(420px, 90%); }

.alert {
  display: flex; gap: 10px; align-items: flex-start; margin: 16px 20px 0;
  padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.6;
  background: rgba(242, 120, 120, .1); border: 1px solid rgba(242, 120, 120, .35); color: #ffd4d4;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; stroke: #f59a9a; fill: none; stroke-width: 2; stroke-linecap: round; }

.stats { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.stat { font-size: 13px; color: var(--muted); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; }
.stat b { color: var(--ink); font-weight: 600; }

.frame-wrap { flex: 1; position: relative; background: #e9ebf3; overflow: auto; min-height: 540px; }
.frame-wrap iframe { display: block; border: 0; background: #fff; transform-origin: 0 0; }
#w-frame { width: 100%; height: 100%; min-height: 540px; }
.frame-scaler { position: relative; margin: 16px auto; box-shadow: 0 10px 30px -12px rgba(8, 10, 24, .45); }
.frame-note { position: absolute; right: 12px; bottom: 12px; font-size: 12px; color: #2b2f45; background: rgba(255, 255, 255, .9); border-radius: 8px; padding: 3px 9px; pointer-events: none; }

/* ---------- info ---------- */
.tool-info { padding: 0 0 96px; }
.tool-info h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 26px; }
.tool-info .steps { margin-bottom: 72px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.faq-item { border-top: 1px solid var(--line-strong); padding-top: 18px; }
.faq-item h3 { font-size: 18px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tool-hero { padding-top: 24px; }
  .panel { padding: 18px; }
  .stage { min-height: 440px; }
  .frame-wrap, #w-frame { min-height: 440px; }
}
