/* ============================================================
   Document Studio - shared design for the document creator tools
   (invoice, quotation, contract, biodata, CV). Prefix .dst-.

   Each tool page sets --dst-accent / --dst-accent-2 on .dst and adds
   its own stylesheet for the paper templates (.dst-paper .tpl-*).
   The site template gives bare <section> 60px padding and clips
   overflow, so the studio uses divs throughout.
   ============================================================ */

.dst {
    --dst-ink: #121a33;
    --dst-ink-2: #4a5470;
    --dst-ink-3: #7c86a2;
    --dst-line: #e3e7f1;
    --dst-soft: #f4f6fb;
    --dst-bg: #f6f7fb;
    --dst-accent: #4f46e5;
    --dst-accent-2: #06b6d4;
    --dst-accent-soft: #eef0ff;
    --dst-hero-1: #111536;
    --dst-hero-2: #1b1f5c;
    --dst-hero-3: #0d2e44;
    --dst-radius: 18px;
    color: var(--dst-ink);
    background: var(--dst-bg);
    overflow-x: clip;
}
.dst *, .dst *::before, .dst *::after { box-sizing: border-box; }
.dst-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dst [hidden] { display: none !important; }

/* ---------------- hero ---------------- */
.dst-hero {
    position: relative; padding: 50px 20px 92px; color: #fff; overflow: hidden; isolation: isolate;
    background: radial-gradient(900px 480px at 8% -10%, color-mix(in srgb, var(--dst-accent) 70%, #000) 0%, transparent 60%),
                radial-gradient(800px 420px at 100% 110%, color-mix(in srgb, var(--dst-accent-2) 55%, #000) 0%, transparent 60%),
                linear-gradient(135deg, var(--dst-hero-1) 0%, var(--dst-hero-2) 55%, var(--dst-hero-3) 100%);
}
.dst-hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dst-blob { position: absolute; border-radius: 50%; filter: blur(44px); opacity: .45; animation: dst-drift 16s ease-in-out infinite; }
.dst-blob.b1 { width: 320px; height: 320px; left: -70px; top: 20px; background: var(--dst-accent); }
.dst-blob.b2 { width: 280px; height: 280px; right: -50px; top: -80px; background: var(--dst-accent-2); animation-delay: -6s; }
/* floating paper sheets */
.dst-sheet {
    position: absolute; width: 74px; height: 96px; border-radius: 8px; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    animation: dst-bob 8s ease-in-out infinite;
}
.dst-sheet::before, .dst-sheet::after { content: ""; position: absolute; left: 12px; right: 12px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }
.dst-sheet::before { top: 16px; right: 26px; }
.dst-sheet::after { top: 30px; box-shadow: 0 12px 0 rgba(255,255,255,.2), 0 24px 0 rgba(255,255,255,.2), 0 36px 0 rgba(255,255,255,.2); }
.dst-sheet.s1 { left: 7%; top: 26%; transform: rotate(-9deg); }
.dst-sheet.s2 { right: 8%; top: 18%; transform: rotate(8deg); animation-delay: -3s; }

.dst-hero-in { position: relative; max-width: 880px; margin: 0 auto; text-align: center; }
.dst-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: 13.5px; font-weight: 600; color: #e0e4ff;
}
.dst-eyebrow-icon { font-size: 15px; line-height: 1; }
.dst-title { margin: 0 0 14px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.dst-lede { max-width: 660px; margin: 0 auto 22px; font-size: clamp(15.5px, 1.6vw, 18px); line-height: 1.6; color: #cfd4f3; }
.dst-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 22px; }
.dst-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: #cfd4f3; }
.dst-trust li { display: inline-flex; align-items: center; gap: 7px; }

/* ---------------- buttons ---------------- */
.dst-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
    border: 1px solid var(--dst-line); border-radius: 12px; background: #fff; color: var(--dst-ink-2);
    font-size: 14.5px; font-weight: 700; cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dst-btn svg { width: 17px; height: 17px; flex: none; }
.dst-btn:hover, .dst-btn:focus-visible { border-color: var(--dst-accent); color: var(--dst-accent); }
.dst-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--dst-accent) 35%, transparent); outline-offset: 2px; }
.dst-btn[disabled] { opacity: .6; cursor: progress; }
.dst-btn-primary {
    border: 0; color: #fff !important;
    background: linear-gradient(120deg, var(--dst-accent) 0%, color-mix(in srgb, var(--dst-accent) 60%, var(--dst-accent-2)) 100%);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--dst-accent) 35%, transparent);
}
.dst-btn-primary:hover, .dst-btn-primary:focus-visible { color: #fff !important; transform: translateY(-1px); box-shadow: 0 14px 28px color-mix(in srgb, var(--dst-accent) 45%, transparent); }
.dst-btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.dst-btn-ghost:hover, .dst-btn-ghost:focus-visible { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.5); }
.dst-btn-sm { height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.dst-btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.dst-btn-danger:hover, .dst-btn-danger:focus-visible { border-color: #e11d48; color: #e11d48; }
.dst-btn.is-busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: dst-spin .7s linear infinite; }
.dst-link { border: 0; background: none; padding: 0; color: var(--dst-accent); font-weight: 700; cursor: pointer; }

/* ---------------- workspace ---------------- */
.dst-workspace {
    position: relative; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 22px; align-items: start;
    max-width: 1380px; margin: -58px auto 0; padding: 0 20px;
}

/* editor */
.dst-editor { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dst-status {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px;
    background: #fff; border: 1px solid var(--dst-line); box-shadow: 0 10px 30px rgba(18, 26, 51, .06); font-size: 13px; color: var(--dst-ink-3);
}
.dst-saved { display: inline-flex; align-items: center; gap: 7px; }
.dst-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22a55b; }
.dst-saved.is-saving::before { background: #f59e0b; }
.dst-saved.is-error::before { background: #e11d48; }
.dst-status-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 520px) {
    .dst-status { flex-wrap: wrap; }
    .dst-status-actions { width: 100%; }
}

.dst-sec { border-radius: var(--dst-radius); background: #fff; border: 1px solid var(--dst-line); box-shadow: 0 10px 30px rgba(18, 26, 51, .05); }
.dst-sec > summary {
    display: flex; align-items: center; gap: 12px; padding: 15px 16px; list-style: none; cursor: pointer; user-select: none; border-radius: var(--dst-radius);
}
.dst-sec > summary::-webkit-details-marker { display: none; }
.dst-sec > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--dst-accent) 35%, transparent); outline-offset: -3px; }
.dst-sec-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--dst-accent-soft); color: var(--dst-accent); font-size: 17px; }
.dst-sec-title { flex: 1; min-width: 0; }
.dst-sec-title strong { display: block; font-size: 15.5px; font-weight: 800; color: var(--dst-ink); }
.dst-sec-title small { display: block; font-size: 12.5px; color: var(--dst-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dst-sec-badge { flex: none; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--dst-soft); color: var(--dst-ink-2); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.dst-sec > summary::after {
    content: ""; flex: none; width: 9px; height: 9px; margin: 0 4px 0 2px; border-right: 2px solid var(--dst-ink-3); border-bottom: 2px solid var(--dst-ink-3);
    transform: rotate(45deg) translateY(-2px); transition: transform .2s ease;
}
.dst-sec[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.dst-sec-body { padding: 2px 16px 16px; animation: dst-rise .25s ease both; }

.dst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dst-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dst-col-2 { grid-column: 1 / -1; }
.dst-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.dst-field > label, .dst-label { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--dst-ink-2); }
.dst-field .dst-opt { font-weight: 500; color: var(--dst-ink-3); }
.dst-input, .dst-select, .dst-textarea {
    width: 100%; min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--dst-line); border-radius: 10px;
    background: #fff; color: var(--dst-ink); font-size: 14.5px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.dst-textarea { height: auto; min-height: 84px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
.dst-input:focus, .dst-select:focus, .dst-textarea:focus { border-color: var(--dst-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dst-accent) 16%, transparent); }
.dst-input[aria-invalid="true"], .dst-textarea[aria-invalid="true"] { border-color: #e11d48; }
.dst-hint { margin: 0; font-size: 12px; color: var(--dst-ink-3); }
.dst-error { margin: 0; font-size: 12.5px; font-weight: 600; color: #be123c; }
.dst-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--dst-ink-2); cursor: pointer; }
.dst-check input { width: 16px; height: 16px; accent-color: var(--dst-accent); }
.dst-inline { display: flex; gap: 8px; align-items: center; }
.dst-inline > .dst-input, .dst-inline > .dst-select { flex: 1; }
.dst-divider { height: 1px; margin: 4px 0; background: var(--dst-line); }

/* repeater */
.dst-rep { display: flex; flex-direction: column; gap: 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.dst-rep-item { position: relative; padding: 12px; border-radius: 14px; background: var(--dst-soft); border: 1px solid var(--dst-line); animation: dst-rise .25s ease both; }
.dst-rep-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.dst-rep-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 800; color: var(--dst-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dst-rep-tools { display: flex; gap: 4px; }
.dst-mini {
    display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--dst-line); border-radius: 9px; background: #fff;
    color: var(--dst-ink-3); cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.dst-mini svg { width: 14px; height: 14px; }
.dst-mini:hover, .dst-mini:focus-visible { border-color: var(--dst-accent); color: var(--dst-accent); }
.dst-mini.is-danger:hover, .dst-mini.is-danger:focus-visible { border-color: #e11d48; color: #e11d48; }
.dst-mini[disabled] { opacity: .35; cursor: default; }
.dst-add {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border: 1.5px dashed color-mix(in srgb, var(--dst-accent) 45%, #cfd6ea);
    border-radius: 12px; background: #fff; color: var(--dst-accent); font-size: 14px; font-weight: 700; cursor: pointer;
}
.dst-add:hover, .dst-add:focus-visible { background: var(--dst-accent-soft); }
.dst-add[disabled] { opacity: .5; cursor: not-allowed; }

/* image input */
.dst-image { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1.5px dashed #cfd6ea; border-radius: 14px; background: #fff; }
.dst-image.is-drag { border-color: var(--dst-accent); background: var(--dst-accent-soft); }
.dst-image-thumb { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--dst-soft); color: var(--dst-ink-3); font-size: 22px; }
.dst-image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dst-image-thumb.is-round { border-radius: 50%; }
.dst-image-thumb.is-round img { object-fit: cover; }
.dst-image-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dst-image-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* signature pad */
.dst-sign { display: flex; flex-direction: column; gap: 8px; }
.dst-sign-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--dst-soft); align-self: flex-start; }
.dst-sign-tab { padding: 5px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--dst-ink-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.dst-sign-tab[aria-selected="true"] { background: #fff; color: var(--dst-ink); box-shadow: 0 1px 4px rgba(18,26,51,.08); }
.dst-sign-pad { position: relative; height: 150px; border: 1px solid var(--dst-line); border-radius: 12px; background: #fff linear-gradient(transparent 108px, #d9deea 108px, #d9deea 109px, transparent 109px); touch-action: none; }
.dst-sign-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.dst-sign-pad-hint { position: absolute; left: 12px; bottom: 8px; font-size: 12px; color: var(--dst-ink-3); pointer-events: none; }
.dst-sign-preview { display: flex; align-items: center; justify-content: center; height: 90px; border: 1px solid var(--dst-line); border-radius: 12px; background: #fff; }
.dst-sign-preview img { max-width: 90%; max-height: 80px; }

/* chips / segmented */
.dst-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 11px; background: var(--dst-soft); }
.dst-seg button { padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--dst-ink-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.dst-seg button[aria-pressed="true"] { background: #fff; color: var(--dst-ink); box-shadow: 0 1px 4px rgba(18,26,51,.08); }

/* totals summary inside the editor */
.dst-sum { display: grid; gap: 6px; margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--dst-accent-soft); }
.dst-sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--dst-ink-2); }
.dst-sum-row strong { color: var(--dst-ink); }
.dst-sum-row.is-total { padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--dst-accent) 25%, transparent); font-size: 16px; font-weight: 800; color: var(--dst-ink); }

/* ---------------- preview pane ---------------- */
.dst-preview { position: sticky; top: 76px; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: #fff; border: 1px solid var(--dst-line); box-shadow: 0 24px 60px rgba(18, 26, 51, .12); overflow: hidden; }
.dst-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--dst-line); background: #fff; }
.dst-toolbar-group { display: flex; align-items: center; gap: 6px; }
.dst-toolbar-spacer { flex: 1; }
.dst-templates { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; border-bottom: 1px solid var(--dst-line); background: #fbfcfe; scrollbar-width: thin; }
.dst-tpl {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 86px; padding: 6px; border: 1.5px solid transparent;
    border-radius: 12px; background: transparent; color: var(--dst-ink-2); font-size: 12px; font-weight: 700; cursor: pointer;
}
.dst-tpl-thumb { position: relative; width: 58px; height: 76px; border-radius: 6px; background: #fff; border: 1px solid var(--dst-line); overflow: hidden; box-shadow: 0 4px 10px rgba(18,26,51,.06); }
.dst-tpl-thumb::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; background: var(--dst-accent); }
.dst-tpl-thumb::after { content: ""; position: absolute; left: 8px; right: 8px; top: 26px; height: 4px; border-radius: 2px; background: #dfe3ee; box-shadow: 0 9px 0 #eef1f6, 0 18px 0 #eef1f6, 0 27px 0 #eef1f6, 0 36px 0 #dfe3ee; }
.dst-tpl[data-thumb="side"] .dst-tpl-thumb::before { right: auto; bottom: 0; width: 18px; height: auto; }
.dst-tpl[data-thumb="side"] .dst-tpl-thumb::after { left: 24px; }
.dst-tpl[data-thumb="minimal"] .dst-tpl-thumb::before { height: 3px; }
.dst-tpl[data-thumb="band"] .dst-tpl-thumb::before { top: 10px; height: 10px; left: 8px; right: 8px; border-radius: 2px; }
.dst-tpl[data-thumb="frame"] .dst-tpl-thumb::before { inset: 4px; height: auto; background: transparent; border: 2px solid var(--dst-accent); border-radius: 3px; }
.dst-tpl[data-thumb="center"] .dst-tpl-thumb::before { left: 20px; right: 20px; top: 6px; height: 16px; border-radius: 50%; }
.dst-tpl:hover { background: var(--dst-soft); }
.dst-tpl[aria-pressed="true"] { border-color: var(--dst-accent); background: var(--dst-accent-soft); color: var(--dst-ink); }
.dst-swatches { display: flex; gap: 6px; align-items: center; }
.dst-swatch { width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px var(--dst-line); cursor: pointer; }
.dst-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--sw); }
.dst-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: var(--dst-soft); }
.dst-zoom button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--dst-ink-2); font-weight: 800; cursor: pointer; }
.dst-zoom button:hover { background: #fff; }
.dst-zoom output { min-width: 44px; font-size: 12px; font-weight: 700; text-align: center; color: var(--dst-ink-2); }

.dst-stage { position: relative; height: calc(100vh - 230px); min-height: 480px; overflow: auto; padding: 22px; background: #e9ecf3 radial-gradient(#dfe3ec 1px, transparent 1px) 0 0 / 18px 18px; }
.dst-paper-wrap { position: relative; margin: 0 auto; }
.dst-paper {
    position: absolute; left: 0; top: 0; width: 794px; min-height: 1123px; transform-origin: 0 0; background: #fff; color: #1f2433;
    box-shadow: 0 18px 50px rgba(18, 26, 51, .18); font-family: "Noto Sans", "Segoe UI", Arial, sans-serif; font-size: 13px; line-height: 1.45; overflow: hidden;
}
/* dashed guides where the PDF pages break (approximate for the preview) */
.dst-paper::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 1122px, rgba(79, 70, 229, .35) 1122px, rgba(79, 70, 229, .35) 1123px);
}
.dst-paper.is-print::after { display: none; }
.dst-paper-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dst-ink-3); font-size: 15px; }
.dst-stage-note { margin: 0; padding: 8px 14px; border-top: 1px solid var(--dst-line); background: #fff; font-size: 12px; color: var(--dst-ink-3); }

/* ---------------- mobile bar ---------------- */
.dst-mobilebar { display: none; }

/* ---------------- content blocks under the tool ---------------- */
.dst-shell { max-width: 1180px; margin: 0 auto; padding: 0 20px 24px; }
.dst-ad { margin: 34px auto 10px; max-width: 980px; text-align: center; }
.dst-ad-label { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #a3aac2; }
.dst-ad:not(:has(.a2z-ad)) { display: none; }
.dst-block { margin: 54px 0 0; }
.dst-h2 { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; color: var(--dst-ink); }
.dst-muted { margin: 0; color: var(--dst-ink-3); font-size: 14px; }
.dst-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0 0; padding: 0; list-style: none; }
.dst-step { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid var(--dst-line); }
.dst-step h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 800; }
.dst-step p { margin: 0; color: var(--dst-ink-2); font-size: 14.5px; line-height: 1.55; }
.dst-step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--dst-accent), var(--dst-accent-2)); }
.dst-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.dst-feature { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--dst-line); transition: transform .18s ease, box-shadow .18s ease; }
.dst-feature:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(18,26,51,.08); }
.dst-feature h3 { margin: 12px 0 6px; font-size: 16px; font-weight: 800; }
.dst-feature p { margin: 0; color: var(--dst-ink-2); font-size: 14px; line-height: 1.55; }
.dst-feature-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-size: 21px; background: var(--dst-accent-soft); }
.dst-faq { display: grid; gap: 10px; margin: 18px 0 0; }
.dst-faq details { border-radius: 16px; background: #fff; border: 1px solid var(--dst-line); }
.dst-faq summary { padding: 15px 18px; font-weight: 700; cursor: pointer; list-style: none; }
.dst-faq summary::-webkit-details-marker { display: none; }
.dst-faq details p { margin: 0; padding: 0 18px 16px; color: var(--dst-ink-2); line-height: 1.6; }
.dst-notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff7e6; border: 1px solid #fde2a8; color: #7a4d00; font-size: 13.5px; line-height: 1.5; }

/* ---------------- toast + modal ---------------- */
.dst-toast {
    position: fixed; left: 50%; bottom: 26px; z-index: 2000; max-width: min(92vw, 520px); padding: 11px 18px; border-radius: 12px;
    background: #121a33; color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 14px 30px rgba(0,0,0,.25);
    transform: translate(-50%, 20px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.dst-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.dst-toast.is-error { background: #9f1239; }
.dst-modal { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 16px; background: rgba(10, 12, 32, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dst-modal-card { width: min(100%, 460px); padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 30px 70px rgba(10, 12, 40, .35); animation: dst-rise .2s ease both; }
.dst-modal-card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: var(--dst-ink); }
.dst-modal-card p { margin: 0 0 18px; color: var(--dst-ink-2); line-height: 1.55; }
.dst-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* ---------------- reveal ---------------- */
.dst-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.dst-reveal.is-in { opacity: 1; transform: none; }

@keyframes dst-spin { to { transform: rotate(360deg); } }
@keyframes dst-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dst-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -20px) scale(1.08); } }
@keyframes dst-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
    .dst-workspace { grid-template-columns: minmax(0, 1fr); margin-top: -58px; }
    .dst-preview { position: relative; top: 0; display: none; }
    .dst.is-preview .dst-preview { display: flex; }
    .dst.is-preview .dst-editor { display: none; }
    .dst-stage { height: auto; min-height: 60vh; max-height: none; padding: 14px; }
    .dst-mobilebar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.96); border-top: 1px solid var(--dst-line); box-shadow: 0 -8px 24px rgba(18,26,51,.08);
    }
    .dst-mobilebar .dst-seg { flex: 1; }
    .dst-mobilebar .dst-seg button { flex: 1; }
    .dst { padding-bottom: 70px; }
    .dst-steps, .dst-features { grid-template-columns: 1fr 1fr; }
    .dst-sheet { display: none; }
}
@media (max-width: 640px) {
    .dst-hero { padding: 32px 16px 80px; }
    .dst-workspace { padding: 0 12px; }
    .dst-grid, .dst-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .dst-steps, .dst-features { grid-template-columns: 1fr; }
    .dst-shell { padding: 0 14px 20px; }
    .dst-toolbar .dst-btn-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .dst-blob, .dst-sheet, .dst-sec-body, .dst-rep-item, .dst-modal-card { animation: none !important; }
    .dst-reveal { opacity: 1; transform: none; transition: none; }
    .dst-btn, .dst-feature { transition: none; }
}
