/* ==========================================================================
   Tools site in the Macro Viewpoint design system (layouts/tools_ds.blade.php, preview on /new).
   Built from tools-new/tools.css: colors come from igtags.css (light, dark, accent colors),
   header, footer, menus and toasts are the IGTags ones. Generated by scratchpad/tools-ds-css.py.
   ========================================================================== */

.mvt {
    --shadow-hover: 0 6px 16px rgba(16, 24, 40, .10), 0 2px 5px rgba(16, 24, 40, .06);
    background: var(--page);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}
:root[data-theme="dark"] .mvt { --shadow-hover: 0 6px 16px rgba(0, 0, 0, .5); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .mvt { --shadow-hover: 0 6px 16px rgba(0, 0, 0, .5); } }

:where(.mvt *, .mvt *::before, .mvt *::after) { box-sizing: border-box; }
:where(.mvt a) { color: inherit; }
:where(.mvt img) { display: block; max-width: 100%; }
:where(.mvt h1, .mvt h2, .mvt h3, .mvt p) { margin: 0; }
:where(.mvt button, .mvt input, .mvt textarea) { font: inherit; color: inherit; }
:where(.mvt button) { cursor: pointer; }
:where(.mvt) :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[x-cloak] { display: none !important; }

.mv-wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------------- buttons -------------------------------- */

.mv-btn {
    min-height: 48px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent) !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.mv-btn:disabled { background: color-mix(in srgb, var(--ink) 12%, transparent); color: color-mix(in srgb, var(--ink) 38%, transparent) !important; cursor: default; }
.mv-btn.is-light { background: var(--card); color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--field); }
.mv-btn.is-full { width: 100%; }
.mv-btn.is-done { background: var(--green); color: var(--on-ink) !important; }
.mv-btn.is-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.mv-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.mv-textlink {
    border: none;
    background: none;
    padding: 0;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mv-badge.is-free { background: var(--green-bg); color: var(--green); }
.mv-badge.is-patreon { background: var(--pink-bg); color: var(--pink); }
.mv-badge.is-dark { background: rgba(22, 24, 26, .78); color: #fff; }
.mv-badge.is-admin { background: var(--violet-bg); color: var(--violet); }

.mv-icon {
    width: 38px;
    height: 38px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--on-accent-soft);
}

.mv-go {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    background: var(--soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mv-note { font-size: 13px; color: var(--muted); }
.mv-note a { color: var(--ink); font-weight: 600; }

/* --------------------------------- hero --------------------------------- */

.hc-hero { background: var(--card); border-bottom: 1px solid var(--line); }
.hc-band { height: 120px; background: var(--band); }

/* the avatar sits half on the band, half on the white, like the rewards profile */
.mv-avatar {
    width: 96px;
    height: 96px;
    padding: 4px;
    margin-top: -48px;
    border-radius: 50%;
    background: var(--card);
    box-shadow: 0 2px 10px rgba(16, 24, 40, .10);
}

.mv-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.hc-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 14px 0 42px; }
.hc-id { min-width: 0; }
.mv-h1 { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.hc-id .mv-h1 { white-space: nowrap; }
.mv-meta { margin-top: 6px !important; font-size: 15px; color: var(--muted); }
.mv-meta a { color: var(--ink); font-weight: 600; }

.hc-stats { display: flex; gap: 40px; flex-shrink: 0; padding-bottom: 2px; }
.hc-stat { text-align: right; }
.hc-stat span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hc-stat strong { display: block; margin-top: 2px; font-size: 20px; font-weight: 700; line-height: 1.15; }

/* ------------------------------- sections ------------------------------- */

.mv-main { padding-bottom: 8px; }
.hb-section { padding-top: 48px; }
.hb-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 18px; }
.mv-h2 { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.mv-sec-head { margin-bottom: 18px; }

/* ------------------------------ tool cards ------------------------------ */

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

.hb-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease;
}

.hb-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* a card whose title link covers it, so a second link can sit inside */
.hb-card.is-stretch { position: relative; }
.hb-stretch { color: inherit; text-decoration: none; }
.hb-stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 20px; }
.hb-stretch:focus-visible { outline: none; }
.hb-stretch:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.hb-inner-link { position: relative; z-index: 2; color: var(--ink) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.hb-visual { position: relative; height: 250px; overflow: hidden; }
.hb-visual > img { width: 100%; height: 100%; object-fit: cover; }

.hb-caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .95);
    color: #16181a;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.mv-ig-user { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 600; }
.mv-ig-user img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.hb-visual-dup {
    padding: 26px;
    background: var(--band);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.mv-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.mv-tag {
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .95);
    color: #16181a;
    font-size: 13px;
    font-weight: 500;
}

.mv-tag.is-dup { background: #fde2e1; color: #a1271c; text-decoration: line-through; }

.hc-visual-tags {
    padding: 24px;
    background: var(--band);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: center;
}

.mv-set { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: #16181a; font-size: 12px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.mv-set strong { display: block; margin-bottom: 4px; }
.mv-set span { color: #4d4d55; }
.hc-visual-tags .mv-set:first-child { grid-column: 1 / -1; }

.hc-card-text { padding: 18px 20px 20px; display: flex; align-items: flex-start; gap: 14px; flex: 1; }
.hb-foot-text { flex: 1; min-width: 0; }
.hb-foot-text h3 { font-size: 18px; font-weight: 700; }
.hb-foot-text p { margin-top: 6px !important; font-size: 14px; line-height: 1.55; color: var(--muted); }
.hb-foot-text .mv-note { display: block; margin-top: 8px; }

.hb-go {
    width: 44px;
    height: 44px;
    flex: none;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--on-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mv-admin {
    margin-top: 22px;
    padding: 14px 18px;
    border: 1.5px dashed var(--violet-line);
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    font-size: 14px;
}

.mv-admin a { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.mv-admin .mv-icon { width: 30px; height: 30px; border-radius: 10px; }

/* -------------------------------- presets -------------------------------- */

.hb-presets {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hb-presets-media { position: relative; min-height: 300px; }
.hb-presets-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the badge sits on the photo: top right on a computer, top left on a phone */
.hb-presets-media .mv-badge { position: absolute; top: 16px; right: 16px; box-shadow: 0 2px 8px rgba(16, 24, 40, .18); }
.hb-presets-body { padding: 44px 48px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.hb-presets-body .mv-btns { margin-top: 10px; } /* a bit more room above the buttons */
.hb-presets-body h3 { font-size: 22px; font-weight: 700; }
.hb-presets-body p { color: var(--soft-ink); }

/* the paid packs, in one row */
.hc-packs {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.hc-pack {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: box-shadow .18s ease;
}

.hc-pack:hover { box-shadow: var(--shadow-hover); }
.hc-pack img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hc-pack div { padding: 10px 12px 12px; }
.hc-pack h3 { font-size: 14px; font-weight: 700; line-height: 1.3; }
.hc-pack p { margin-top: 2px !important; font-size: 12px; color: var(--muted); }
.hc-pack .mv-badge { height: 20px; padding: 0 8px; font-size: 11px; margin-top: 6px; }

.hb-about {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.hb-about > img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.hb-about h2 { font-size: 18px; font-weight: 700; }
.hb-about p { font-size: 14px; color: var(--soft-ink); margin-top: 4px !important; }

/* ------------------------- text sections (SEO) -------------------------- */

.mv-aboutool { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.mv-aboutool .mv-card p { color: var(--soft-ink); }
.mv-aboutool h3 { font-size: 16px; font-weight: 700; }
.mv-aboutool a { font-weight: 600; }

.mv-feats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--soft-ink); }
.mv-feats li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.mv-feats svg { margin-top: 2px; color: var(--green); }
/* on the tool pages the about text is 15px, so the lists next to it are too */
.mv-aboutool .mv-feats { font-size: 15px; }
.mv-aboutool .mv-feats svg { margin-top: 3px; }

/* ------------------------------- tool pages ------------------------------ */

.mv-crumbs { padding-top: 26px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.mv-crumbs a { text-decoration: none; color: var(--muted); }

.mv-tool-head { padding: 18px 0 30px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 20px; align-items: start; }
.mv-tool-head .mv-icon { width: 64px; height: 64px; border-radius: 20px; }
.mv-lead { margin-top: 10px !important; max-width: 720px; font-size: 17px; line-height: 1.6; color: var(--soft-ink); }

.mv-checks { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 500; }
.mv-checks span { display: inline-flex; align-items: center; gap: 7px; }
.mv-checks svg { color: var(--green); }

.mv-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.mv-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.mv-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.mv-step { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }

.mv-step-num {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--on-accent-soft);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mv-drop {
    min-height: 300px;
    padding: 28px;
    border: 2px dashed var(--dash);
    border-radius: 12px;
    background: var(--soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.mv-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.mv-drop p { color: var(--muted); font-size: 14px; }

.mv-drop-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--soft-ink);
}

.mv-file { position: relative; cursor: pointer; }
.mv-file input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.mv-or { font-size: 13px; color: var(--muted); }

.mv-sample {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border: none;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
    text-align: left;
}

/* inside a white card: full width on a light grey tile */
.mv-sample.is-wide { width: 100%; background: var(--soft); box-shadow: none; border: none; border-radius: 12px; }
.mv-sample.is-wide:hover { background: color-mix(in srgb, var(--ink) 7%, var(--soft)); }

.mv-sample img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.mv-sample strong { display: block; font-size: 14px; }
.mv-sample span span { font-size: 12px; color: var(--muted); }

.mv-preview { position: relative; border-radius: 12px; overflow: hidden; background: var(--soft); }
.mv-preview img { width: 100%; height: 460px; object-fit: cover; }
.mv-preview .mv-badge { position: absolute; left: 12px; top: 12px; gap: 0; }
.mv-preview .mv-badge a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.mv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.mv-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mv-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mv-fact { padding: 10px 12px; border-radius: 12px; background: var(--soft); min-width: 0; }
.mv-fact small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mv-fact strong { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.mv-fact.is-wide { grid-column: span 2; }

.mv-seg { display: flex; padding: var(--seg-pad); border-radius: 999px; background: var(--seg-track); }

.mv-seg button {
    flex: 1;
    height: var(--seg-h);
    border: none;
    border-radius: 999px;
    background: none;
    color: var(--seg-text);
    font-size: 13px;
    font-weight: 500;
}

.mv-seg button.is-on { background: var(--accent-soft); color: var(--on-accent-soft); font-weight: 600; }
@media (hover: hover) { .mv-seg button:not(.is-on):hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); } }

.mv-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.mv-label.is-quiet { font-size: 13px; font-weight: 600; color: var(--soft-ink); } /* a quiet label (a read-only preview, a tip) */

.mv-box {
    display: block;
    width: 100%;
    min-height: 132px;
    padding: 14px 16px;
    border: 1px solid var(--field);
    border-radius: 12px;
    background: var(--card);
    font-size: 16px; /* 16px keeps phones from zooming in */
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    resize: vertical;
}

.mv-box:focus { outline: none; border-color: var(--field-open); box-shadow: 0 0 0 3px rgba(22, 24, 26, .06); }
.mv-box.is-mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 14px; }
.mv-box.is-result { border-color: transparent; background: var(--result); }
.mv-box.is-tall { min-height: 236px; }

.mv-ph { display: flex; flex-wrap: wrap; gap: 6px; }

.mv-ph button {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--field);
    border-radius: 999px;
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
}

.mv-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.mv-check input { width: 18px; height: 18px; accent-color: var(--accent); }

.mv-switch { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; cursor: pointer; }
.mv-switch small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.mv-switch-text { flex: 1; min-width: 0; } /* the text first, the switch at the end of the row */

.mv-switch-btn {
    width: 46px;
    height: 28px;
    flex: none;
    padding: 3px;
    border: none;
    border-radius: 999px;
    background: var(--switch-off);
    display: flex;
}

.mv-switch-btn span { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.mv-switch-btn.is-on { background: var(--accent); justify-content: flex-end; }
.mv-switch-btn.is-on span { background: var(--on-accent); }

/* duplicate highlights over the input */
.mv-input-wrap { position: relative; }
.mv-highlight { cursor: text; }
.mv-highlight .duplicate-word { background: var(--coral-bg); color: var(--coral); text-decoration: line-through; border-radius: 4px; }

.mv-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.mv-stat { flex: 1; min-width: 110px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.mv-stat strong { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.mv-stat span { font-size: 12px; color: var(--muted); }
.mv-stat.is-over { background: var(--coral-bg); }
.mv-stat.is-over strong { color: var(--coral); }

.mv-warn { padding: 12px 14px; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone-warn, #b86a00) 50%, transparent); font-size: 14px; } /* a notice: the IGTags / Rewards look */

.mv-placeholder {
    min-height: 220px;
    border-radius: 12px;
    background: var(--soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 20px;
}

/* the next step, shown after copying */
/* picture + title on top, text full width, the button across the bottom (same on every screen size) */
.mv-next {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: var(--soft);
}

.mv-next.is-patreon { background: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); } /* a tint of their accent: it goes with the button in every theme */
.mv-next.is-presets { background: var(--soft); }
.mv-next-head { display: flex; align-items: center; gap: 12px; }
.mv-next-head img, .mv-next-icon { width: 52px; height: 52px; flex: none; border-radius: 12px; object-fit: cover; object-position: 50% 50%; }
.mv-next-icon { background: var(--band); color: var(--band-ink); display: flex; align-items: center; justify-content: center; }
/* the Hashtag Manager card's steps: a number, one short line each */
.mv-next-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mv-next-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.mv-next-steps .mv-step-num { margin-top: -3px; background: var(--accent); color: var(--on-accent); font-weight: 700; } /* centered on the first line; filled like the button */
.mv-next h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.mv-next p { font-size: 14px; line-height: 1.55; color: var(--soft-ink); }
.mv-next p a { color: var(--ink); font-weight: 600; text-underline-offset: 2px; }
.mv-next .mv-btn { min-height: 46px; font-size: 15px; }

/* compact preset panel under each tool */
.mv-preset-panel {
    margin-top: 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
}

.mv-ba { position: relative; height: 300px; overflow: hidden; touch-action: pan-y; user-select: none; cursor: ew-resize; }
/* 1px larger than the box on every side, so no background line shows at fractional zoom levels */
.mv-ba img { position: absolute; top: -1px; left: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: var(--ba-pos, 50% 50%); pointer-events: none; }
.mv-ba-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }

.mv-ba-handle {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16181a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    pointer-events: none;
}

.mv-ba-label {
    position: absolute;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(22, 24, 26, .72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    pointer-events: none;
}

.mv-ba-label.is-l { left: 12px; }
.mv-ba-label.is-r { right: 12px; }

.mv-preset-body { padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.mv-preset-body h2 { font-size: 22px; font-weight: 700; }
.mv-preset-body p { color: var(--soft-ink); }

.mv-howto { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mv-howto li { padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); font-size: 14px; color: var(--soft-ink); }
.mv-howto b { display: flex; width: 28px; height: 28px; margin-bottom: 10px; border-radius: 50%; align-items: center; justify-content: center; background: var(--soft); color: var(--ink); font-size: 13px; }

.mv-faq { display: flex; flex-direction: column; gap: 10px; }
.mv-faq details { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 0 20px; }
.mv-faq summary { min-height: 56px; padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.mv-faq summary::-webkit-details-marker { display: none; }
.mv-faq summary svg { flex: none; transition: transform .18s ease; }
.mv-faq details[open] summary svg { transform: rotate(180deg); }
.mv-faq details p { padding-bottom: 18px; color: var(--soft-ink); }
.mv-faq details p + p { margin-top: -6px !important; }

.mv-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.mv-more {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.mv-more .mv-icon { width: 52px; height: 52px; border-radius: 12px; }
.mv-more h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 17px; font-weight: 700; }
.mv-more p { font-size: 14px; color: var(--muted); }
.mv-more .mv-badge { height: 22px; }
.mv-more p { margin-top: 2px !important; }

/* ================================ medium ================================ */

@media (max-width: 1100px) {
    .hc-id .mv-h1 { white-space: normal; }
    .hc-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ================================= phone ================================ */

@media (max-width: 760px) {
    .mv-wrap { padding: 0 16px; }
    .hc-band { height: 56px; }
    .mv-avatar { width: 64px; height: 64px; padding: 3px; margin-top: -32px; }
    .hc-hero-row { flex-direction: column; align-items: flex-start; gap: 16px; padding: 12px 0 32px; }
    .mv-h1, .hc-id .mv-h1 { font-size: 23px; white-space: normal; }
    .mv-meta { font-size: 13px; }
    .hc-stats { gap: 12px 36px; flex-wrap: wrap; flex-shrink: 1; max-width: 100%; } /* never wider than the screen */
    .hc-stat { text-align: left; }
    .hc-stat strong { font-size: 16px; }

    .hb-section { padding-top: 32px; }
    .mv-h2 { font-size: 21px; }
    .hb-grid, .hb-presets, .mv-app, .mv-more-grid, .mv-aboutool { grid-template-columns: minmax(0, 1fr); }
    .hb-grid { gap: 16px; }
    .hb-visual { height: 180px; }
    .hb-caption { left: 12px; right: 12px; bottom: 12px; font-size: 13px; padding: 10px 12px; }
    .hb-visual-dup { height: auto; min-height: 0; padding: 16px; gap: 10px; }
    .hb-visual-dup .mv-tag { height: 26px; padding: 0 8px; font-size: 12px; }
    .hb-visual-dup .mv-tag.is-xtra { display: none; }
    .hb-visual-dup .mv-badge { height: 26px; font-size: 12px; }

    /* card text: icon, name and arrow on one row, the description full width below */
    .hc-card-text { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; }
    .hc-card-text .hb-foot-text { display: contents; }
    .hc-card-text .hb-foot-text h3 { grid-column: 2; grid-row: 1; font-size: 17px; line-height: 1.25; }
    .hc-card-text .hb-go { grid-column: 3; grid-row: 1; width: 40px; height: 40px; margin: 0; }
    .hc-card-text .hb-foot-text p, .hc-card-text .hb-foot-text .mv-note { grid-column: 1 / -1; margin: 0 !important; }
    .hc-card-text .mv-icon { width: 34px; height: 34px; border-radius: 10px; }

    .hc-visual-tags { padding: 14px; gap: 8px; }
    .hc-visual-tags .mv-set { padding: 8px 10px; font-size: 11px; }
    .hc-card-text { padding: 14px 16px 16px; }

    .hb-presets-media { min-height: 0; height: 200px; }
    .hb-presets-media .mv-badge { right: auto; left: 12px; top: 12px; }
    .hb-presets-body { padding: 18px; }
    .hb-presets-body .mv-btn { width: 100%; }

    /* packs: one swipeable row */
    .hc-packs {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 16px;
        margin: 12px -16px 0;
        padding: 2px 16px 8px;
        scrollbar-width: none;
    }

    .hc-packs::-webkit-scrollbar { display: none; }
    .hc-pack { flex: 0 0 44%; scroll-snap-align: start; }

    /* about: photo beside the heading, text and buttons full width */
    .hb-about { grid-template-columns: 64px minmax(0, 1fr); gap: 12px 14px; padding: 18px; }
    .hb-about > img { width: 64px; height: 64px; }
    .hb-about-text { display: contents; }
    .hb-about h2 { grid-column: 2; grid-row: 1; font-size: 18px; line-height: 1.3; }
    .hb-about p { grid-column: 1 / -1; margin: 0 !important; font-size: 15px; }
    .hb-about .mv-btns { grid-column: 1 / -1; }
    .hb-about .mv-btn { flex: 1 1 140px; }

    /* keep the tool close to the top on a phone */
    .mv-tool-head { grid-template-columns: minmax(0, 1fr); padding: 12px 0 20px; }
    .mv-tool-head .mv-icon { display: none; }
    .mv-lead { font-size: 15px; margin-top: 8px !important; }
    .mv-checks { gap: 4px 14px; font-size: 13px; }
    .mv-checks svg { width: 15px; height: 15px; }
    .mv-card { padding: 16px; border-radius: 16px; }
    .mv-drop { min-height: 240px; padding: 20px; }
    .mv-preview img { height: 340px; }
    .mv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mv-seg button { font-size: 13px; }


    .mv-preset-panel { grid-template-columns: minmax(0, 1fr); }
    .mv-ba { height: 280px; }
    .mv-preset-body { padding: 20px; }
    .mv-preset-body .mv-btn { width: 100%; }

    .mv-howto { grid-template-columns: minmax(0, 1fr); }
}

/* ================================ design system extras ================================ */
/* tool icons wear the accent tint (the colors written into the pages are older brand colors) */
.mvt .mv-icon { background: var(--accent-soft) !important; }
.mvt .mv-admin .mv-icon { background: var(--violet-bg) !important; color: var(--violet); }
.mvt .mv-stat strong[style] { color: var(--coral) !important; }
/* hover: the same state layers as everywhere else (mouse only) */
@media (hover: hover) {
    .mvt .mv-btn:not(:disabled):not(.is-light):hover { box-shadow: inset 0 0 0 999px color-mix(in srgb, currentColor 10%, transparent); }
    .mvt .mv-btn.is-light:hover { box-shadow: inset 0 0 0 1px var(--field), inset 0 0 0 999px color-mix(in srgb, currentColor 7%, transparent); }
    .mvt .mv-ph button:hover { background: color-mix(in srgb, var(--ink) 7%, var(--card)); }
}
/* how-to steps: the number sits beside the text in the accent tint; the first line (21px) is centered on the 30px number */
.mvt .mv-howto li { padding: 20.5px 16px 16px; display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.mvt .mv-howto b { width: 30px; height: 30px; margin: -4.5px 0 0; flex: none; display: inline-flex; background: var(--accent-soft); color: var(--on-accent-soft); font-size: 14px; font-weight: 700; }
/* main content and the footer: the footer keeps its own spacing */
.mvt .mv-main { flex: 1; padding-bottom: 64px; }
/* tool pages: the hero (band, the tool icon in the photo spot, breadcrumbs above the title) */
.mvt .hc-hero .mv-crumbs { padding-top: 14px; font-size: 13px; }
.mvt .hc-hero .mv-crumbs + .hc-hero-row { padding-top: 10px; }
.mvt .hc-hero .hc-id .mv-meta { max-width: 760px; line-height: 1.55; }
.mvt .hc-hero + .mv-main { padding-top: 32px; }
@media (max-width: 760px) {
    .mvt .hc-hero .mv-crumbs { padding-top: 12px; }
    .mvt .hc-hero + .mv-main { padding-top: 20px; }
    .mvt .hc-hero .hc-h1-more { display: none; } /* a shorter title on phones, so it fits on one line */
    /* "More tools" cards: the icon lines up with the title, more room between title, badge and text */
    .mvt .mv-more { grid-template-columns: 44px minmax(0, 1fr) 34px; align-items: start; gap: 14px; padding: 20px 18px; }
    .mvt .mv-more .mv-icon { width: 44px; height: 44px; }
    .mvt .mv-more h3 { font-size: 16px; line-height: 1.3; gap: 8px; }
    .mvt .mv-more p { margin-top: 8px !important; line-height: 1.5; }
    .mvt .mv-more .mv-go { width: 34px; height: 34px; align-self: center; }
}

/* small phones: tighter gaps, so the three hero stats stay on one row */
@media (max-width: 420px) {
    .hc-stats { column-gap: 24px; }
}
