/* Free tools: shared layout. Builds on /styles.css tokens (--ink, --paper, --hairline, ...). */

.ft-hero { padding-top: 48px; padding-bottom: 8px; max-width: 860px; }
.ft-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--graphite); text-decoration: none; }
.ft-crumb:hover { color: var(--ink); }
.ft-hero .eyebrow { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.ft-hero h1 { margin-top: 14px; font-size: clamp(36px, 5.6vw, 58px); font-weight: 800; line-height: 1.02; letter-spacing: -0.045em; }
.ft-hero .lede { margin: 16px 0 0; text-align: left; max-width: 640px; }

.ft-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.ft-badge-ai { background: #f1edff; color: #5b3fd6; }
.ft-badge-browser { background: #e9f8f0; color: #0f7a4a; }

/* Tool area */
.ft-tool { max-width: 860px; padding-top: 28px; padding-bottom: 24px; }
.ft-card { padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgba(11, 13, 18, .04), 0 24px 48px -36px rgba(11, 13, 18, .25); }
.ft-card + .ft-card { margin-top: 16px; }
.ft-label { display: block; margin: 18px 0 8px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.ft-label:first-child { margin-top: 0; }
.ft-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ft-input, .ft-select, .ft-textarea {
  width: 100%; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--surface); font: 400 16px/1.5 var(--body); color: var(--ink);
}
.ft-input, .ft-select { height: 48px; }
.ft-textarea { min-height: 150px; padding: 12px 14px; resize: vertical; }
.ft-input:focus, .ft-select:focus, .ft-textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ft-hint { margin-top: 8px; font-size: 13.5px; color: var(--graphite); }
.ft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.ft-actions .ft-hint { margin: 0; }
.ft-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-chip { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--hairline); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--graphite); background: var(--surface); }
.ft-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ft-chip img { width: 18px; height: 18px; object-fit: contain; }
.ft-chip:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--ink); }
.ft-chip:has(input:not(:checked)) img { filter: grayscale(1); opacity: .5; }
.ft-chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.ft-drop { display: grid; place-items: center; gap: 6px; min-height: 180px; padding: 24px; border: 1.5px dashed #c9cdd5; border-radius: 18px; background: var(--paper); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.ft-drop:hover, .ft-drop.over { border-color: var(--ink); background: #eef0f3; }
.ft-drop strong { font-size: 17px; }
.ft-drop span { font-size: 14px; color: var(--graphite); }
.ft-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ft-drop ~ [id$="-controls"] { margin-top: 22px; }

/* Results */
.ft-results { margin-top: 18px; display: grid; gap: 12px; }
.ft-results:empty { display: none; }
.ft-result { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--hairline); }
.ft-result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ft-result-head img { width: 22px; height: 22px; object-fit: contain; }
.ft-result-head strong { font-size: 15.5px; }
.ft-result-head .ft-count { margin-left: auto; }
.ft-result-text { white-space: pre-wrap; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.ft-result-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ft-count { font: 500 12.5px/1 var(--mono); color: var(--graphite); white-space: nowrap; }
.ft-count.over { color: #d92d20; }
.ft-copy { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; }
.ft-copy:hover { border-color: #b9bec8; }
.ft-error { padding: 14px 16px; border-radius: 14px; background: #fff4f2; border: 1px solid #ffd6cf; color: #b42318; font-size: 15px; }
.ft-loading { display: flex; align-items: center; gap: 10px; color: var(--graphite); font-size: 15px; }
.ft-spin { width: 16px; height: 16px; border: 2px solid #d3d7de; border-top-color: var(--ink); border-radius: 50%; animation: ft-spin .8s linear infinite; }
@keyframes ft-spin { to { transform: rotate(360deg); } }
.ft-note { margin-top: 14px; font-size: 13.5px; color: var(--graphite); }

/* Status pills used by checkers */
.ft-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ft-pill.ok { background: #e9f8f0; color: #0f7a4a; }
.ft-pill.warn { background: #fff6e5; color: #9a6400; }
.ft-pill.bad { background: #fff0ee; color: #b42318; }
.ft-pill.na { background: var(--paper); color: var(--graphite); }

/* Per-platform table (counter, video checker) */
.ft-table { display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.ft-trow { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--hairline); }
.ft-pname { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.ft-pname img { width: 22px; height: 22px; object-fit: contain; }
.ft-pname .name-mark { font-size: 13px; }
.ft-meter { position: relative; height: 8px; border-radius: 999px; background: #eceef2; overflow: hidden; }
.ft-meter i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--live); transition: width .2s ease; }
.ft-meter.over i { background: #d92d20; }
.ft-meter.near i { background: #f59e0b; }
.ft-detail { margin-top: 6px; font-size: 13px; color: var(--graphite); }
.ft-tright { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }

/* Upsell card, shown under results */
.ft-upsell { max-width: 860px; padding-bottom: 8px; }
.ft-up { position: relative; overflow: hidden; padding: 28px; border-radius: 24px; background: var(--ink); color: #fff; }
.ft-up::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,0) 70%); pointer-events: none; }
.ft-up-hook { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: #b9f3d3; }
.ft-up-hook::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgba(18, 183, 106, .18); }
.ft-up h2 { margin-top: 12px; font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; max-width: 560px; }
.ft-up-intro { margin-top: 12px; font-size: 15.5px; color: #d6d9e0; }
.ft-up-points { margin-top: 10px; display: grid; gap: 8px; max-width: 600px; }
.ft-up-points li { position: relative; padding-left: 24px; font-size: 15.5px; color: #d6d9e0; }
.ft-up-points li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 7px; border-left: 2px solid #b9f3d3; border-bottom: 2px solid #b9f3d3; transform: rotate(-45deg); }
.ft-up-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.ft-up-icons img { width: 20px; height: 20px; padding: 6px; box-sizing: content-box; object-fit: contain; border-radius: 9px; background: #fff; }
.ft-up-icons .name-mark { height: 32px; padding: 0 10px; border-radius: 9px; background: #fff; color: var(--ink); font-size: 13px; }
.ft-up-form { display: flex; gap: 10px; margin-top: 22px; max-width: 520px; }
.ft-up-form input[type="email"] { flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid #2b303b; background: #151922; color: #fff; font: 400 16px/1 var(--body); }
.ft-up-form input[type="email"]::placeholder { color: #8a909c; }
.ft-up-form input[type="email"]:focus { outline: none; border-color: #fff; }
.ft-up-form .btn { height: 50px; background: #fff; color: var(--ink); }
.ft-up-form .btn:hover { background: #e9ebef; }
.ft-up-fine { margin-top: 12px; font-size: 13px; color: #8a909c; }
.ft-up-fine a { color: #d6d9e0; }
.ft-up-msg { margin-top: 10px; min-height: 18px; font-size: 14px; color: #ffb4a8; }
.ft-up-done h2 { margin-top: 10px; }
.ft-up-done p { margin-top: 10px; color: #d6d9e0; font-size: 16px; }

/* Content sections */
.ft-content { max-width: 860px; }
.ft-steps { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.ft-step { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--hairline); }
.ft-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 14px/1 var(--body); }
.ft-step h3 { margin-top: 14px; font-size: 17px; font-weight: 700; }
.ft-step p { margin-top: 6px; font-size: 15px; color: var(--graphite); }
.ft-tips { margin-top: 28px; display: grid; gap: 10px; }
.ft-tips li { position: relative; padding-left: 26px; font-size: 16px; color: #2b303b; }
.ft-tips li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.ft-limits { margin-top: 24px; width: 100%; border-collapse: collapse; font-size: 15px; }
.ft-limits th, .ft-limits td { padding: 10px 8px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
.ft-limits th { font: 500 12px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--graphite); }
.ft-limits td small { color: var(--graphite); }
.ft-src { margin-top: 12px; font-size: 13px; color: var(--graphite); }
.ft-content .faq-list { margin-top: 24px; }

/* Related tools and hub */
.ft-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ft-tcard { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--hairline); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s, box-shadow .2s; }
.ft-tcard:hover { border-color: #b9bec8; transform: translateY(-2px); box-shadow: 0 18px 36px -28px rgba(11, 13, 18, .35); }
.ft-tcard h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.ft-tcard p { font-size: 15px; color: var(--graphite); flex: 1; }
.ft-tcard .ft-go { font-size: 14.5px; font-weight: 600; }
.ft-cat { margin-top: 56px; }
.ft-cat:first-of-type { margin-top: 32px; }
.ft-cat h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.ft-cat > p { margin-top: 6px; color: var(--graphite); }

@media (max-width: 860px) {
  .ft-steps, .ft-grid { grid-template-columns: minmax(0, 1fr); }
  .ft-row { grid-template-columns: minmax(0, 1fr); }
  .ft-trow { grid-template-columns: minmax(0, 1fr) auto; }
  .ft-trow .ft-mid { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  .ft-card { padding: 18px; border-radius: 18px; }
  .ft-up { padding: 22px; }
  .ft-up-form { flex-direction: column; }
  .ft-up-form input[type="email"] { flex: none; }
}

/* Page sections */
.ft-content .section-head h2, .ft-content > h2 { margin-top: 14px; }
.ft-h2 { margin-top: 48px; font-size: 26px !important; font-weight: 800; letter-spacing: -0.03em; }
.ft-lead { margin-top: 8px; color: var(--graphite); }
.section-pad-sm { padding: 72px 0; }
.ft-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ft-limits small a { color: var(--graphite); }
.ft-src a { color: var(--ink); }
.ft-hubwrap { padding-bottom: 96px; }
.ft-checks { display: flex; gap: 20px; margin-top: 16px; font-size: 15px; }
.ft-checks label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ft-checks input { width: 18px; height: 18px; accent-color: var(--ink); }
.ft-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ft-warn { color: #9a6400; }

/* Hashtag chips */
.ft-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-tag { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--paper); font: 500 15px/1 var(--body); cursor: pointer; }
.ft-tag:hover { border-color: var(--ink); }

/* Image resizer results */
.ft-resgrid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ft-resgrid:empty { display: none; }
.ft-rescard { display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; }
.ft-resprev { display: grid; place-items: center; height: 220px; padding: 14px; background: repeating-conic-gradient(#eef0f3 0% 25%, #f8f9fb 0% 50%) 50% / 18px 18px; }
.ft-resprev canvas { max-width: 100%; max-height: 192px; border-radius: 6px; box-shadow: 0 6px 18px -8px rgba(11, 13, 18, .35); }
.ft-resbody { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.ft-resbody .ft-copy { margin-top: 8px; align-self: flex-start; }

/* Video checker */
.ft-vgrid { margin-top: 18px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.ft-vprev { width: 100%; max-height: 320px; border-radius: 14px; background: #000; }
.ft-vfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.ft-vfacts dt { font: 500 12px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--graphite); }
.ft-vfacts dd { margin: 6px 0 0; font-size: 17px; font-weight: 600; }

/* Safe zones */
.ft-sz { margin-top: 18px; }
.ft-sz-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-tab { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface); font: 500 14px/1 var(--body); color: var(--graphite); cursor: pointer; }
.ft-tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ft-sz-layout { margin-top: 18px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.ft-sz-frame { --top: 12%; --bottom: 34%; --left: 6%; --right: 6%; position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #1b1f27; }
.ft-sz-media, .ft-sz-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ft-sz-sample { display: grid; place-items: center; background: linear-gradient(160deg, #2b3140, #12151c); color: #8a909c; font: 500 14px/1 var(--mono); }
.ft-sz-band { position: absolute; background: rgba(217, 45, 32, .32); transition: all .25s ease; display: grid; place-items: center; }
.ft-sz-band span { font: 600 11px/1.2 var(--body); color: #fff; text-align: center; padding: 4px 6px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ft-sz-band.top { top: 0; left: 0; right: 0; height: var(--top); }
.ft-sz-band.bottom { bottom: 0; left: 0; right: 0; height: var(--bottom); }
.ft-sz-band.left { top: var(--top); bottom: var(--bottom); left: 0; width: var(--left); }
.ft-sz-band.right { top: var(--top); bottom: var(--bottom); right: 0; width: var(--right); }
.ft-sz-band.right span { writing-mode: vertical-rl; }
.ft-sz-safe { position: absolute; top: var(--top); bottom: var(--bottom); left: var(--left); right: var(--right); border: 2px dashed #fff; border-radius: 6px; transition: all .25s ease; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.ft-sz-side .ft-hint { margin-top: 0; font-size: 15px; line-height: 1.6; color: #2b303b; }
.ft-sz-side .ft-hint + .ft-hint { margin-top: 10px; color: var(--graphite); }

@media (max-width: 720px) {
  .ft-vgrid, .ft-sz-layout { grid-template-columns: minmax(0, 1fr); }
  .ft-sz-frame { max-width: 300px; margin: 0 auto; }
  .ft-vprev { max-height: 260px; }
}
