/* The free caption formatter. The page loads landing.css and free-tools/tool.css
   first; this adds the tool card (the editor beside a phone-sized Instagram
   post) and the limits row. The post preview copies Instagram's own feed
   layout at its real size: 14px system type, 18px lines, #737373 for "more". */

/* The tool: one card under the hero, as on the safe zone checker. */
.cf-card{display:grid;grid-template-columns:minmax(0,1fr) 400px;grid-template-rows:1fr auto auto auto;grid-template-areas:"input stage" "summary stage" "options stage" "actions stage";gap:0 44px;max-width:1080px;margin:44px auto 0;padding:34px;border:1px solid #e8e8e8;border-radius:30px;background:#fff;box-shadow:0 30px 60px -40px #0a0a0a2e;text-align:left}
.cf-trust{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;margin-top:18px;font-size:13px;color:#6b6b6b}
.cf-trust span{display:inline-flex;align-items:center;gap:7px}
.cf-trust .icon{width:16px;height:16px;color:#3e9b2c}
.cf-next{max-width:1080px;margin:28px auto 0;text-align:left}

/* The editor: on a wide screen it runs down the left of the post; on a phone
   the post comes between the counts and the copy button. */
.cf-input{grid-area:input;display:flex;flex-direction:column;min-width:0}
.cf-summary{grid-area:summary;min-width:0}
.cf-options{grid-area:options}
.cf-actions{grid-area:actions;min-width:0}
.cf-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.cf-label{font-size:15px;font-weight:600;letter-spacing:-.01em}
.cf-input-actions{display:flex;gap:16px}
.cf-link{padding:0;background:none;font-size:14px;font-weight:600;color:var(--blue)}
.cf-link:hover{color:#2465d6}
#cf-input{display:block;width:100%;min-height:330px;flex:1;padding:16px 18px;border:1px solid #dedede;border-radius:18px;background:#fbfbfb;font-size:16px;line-height:1.6;color:var(--ink);resize:vertical;transition:border-color .2s,box-shadow .2s}
#cf-input:focus{outline:none;border-color:var(--blue);background:#fff;box-shadow:0 0 0 4px #3478f51f}
#cf-input::placeholder{color:#8a8a8a}

.cf-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 0}
.cf-counts>div{min-width:0;padding:11px 14px;border:1px solid #e8e8e8;border-radius:14px;background:#fff}
.cf-counts dt{font-size:10px;font-weight:500;letter-spacing:.08em;color:#737373;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cf-counts dd{margin:3px 0 0;font-size:19px;font-weight:600;letter-spacing:-.03em;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-counts dd small{font-size:13px;font-weight:500;letter-spacing:0;color:#8a8a8a}
.cf-counts .over{border-color:#f1b3ad;background:#fff6f5}
.cf-counts .over dd,.cf-counts .over dd small{color:#b42318}
.cf-problems{margin-top:10px;font-size:14px;font-weight:500;color:#b42318}

.cf-options{display:grid;gap:9px;margin:18px 0 0;padding:16px 0 0;border:0;border-top:1px solid #ececec;min-width:0}
.cf-option-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:14px;font-weight:500}
.cf-check{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.5;color:#3a3a3a;cursor:pointer}
.cf-check input{flex:none;width:17px;height:17px;margin:2px 0 0;accent-color:var(--blue)}

.cf-seg{display:inline-flex;gap:3px;padding:3px;background:#eeeeee;border-radius:99px}
.cf-seg label{position:relative;cursor:pointer}
.cf-seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.cf-seg span{display:block;padding:7px 15px;border-radius:99px;font-size:14px;font-weight:600;color:#4d4d4d;white-space:nowrap}
.cf-seg input:checked+span{background:#fff;color:var(--ink);box-shadow:0 1px 3px #0000001f}
.cf-seg input:focus-visible+span{outline:2px solid var(--blue);outline-offset:1px}
.cf-seg-small span{padding:4px 12px;font-size:13px}

.cf-copy{width:100%;margin-top:20px;gap:10px}
.cf-copy .icon{width:20px;height:20px}
.cf-status{min-height:20px;margin-top:8px;font-size:14px;font-weight:500;text-align:center;color:#2f7a1f}
.cf-output{display:block;width:100%;margin-top:8px;padding:10px 12px;border:1px solid #dedede;border-radius:12px;background:#fbfbfb;font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}

/* The stage: a phone-width Instagram post. */
.cf-stage{grid-area:stage;min-width:0}
.cf-stage-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.ig-phone{padding:10px;border-radius:44px;background:#f1f1f0;box-shadow:inset 0 0 0 1px #e4e4e4}
.ig-post{overflow:hidden;border-radius:34px;background:#fff;box-shadow:0 1px 2px #0000000d;color:#000;font:14px/18px -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;letter-spacing:0;-webkit-font-smoothing:antialiased}
.ig-head{display:flex;align-items:center;gap:10px;height:58px;padding:0 12px 0 14px}
.ig-avatar{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:conic-gradient(from 210deg,#ffd600,#ff7a00,#ff0069,#d300c5,#7638fa,#ffd600)}
.ig-avatar span{width:30px;height:30px;border-radius:50%;border:2px solid #fff;background:radial-gradient(circle at 50% 38%,#c9ced6 0 5px,transparent 5.5px),radial-gradient(ellipse 10px 8px at 50% 100%,#c9ced6 0 9px,transparent 9.5px),#eef0f3}
.ig-user{flex:1;font-weight:600}
.ig-icon{width:24px;height:24px;fill:none;stroke:#000;stroke-width:1.9;stroke-linejoin:round;stroke-linecap:round}
.ig-more-icon{fill:#000;stroke:none}
.ig-media{position:relative;aspect-ratio:4/5;background:#f5b98f}
.ig-media svg{display:block;width:100%;height:100%}
.ig-count{position:absolute;top:12px;right:12px;padding:3px 9px;border-radius:99px;background:#121212b3;color:#fff;font-size:12px;line-height:18px;font-weight:500}
.ig-actions{position:relative;display:flex;align-items:center;gap:16px;height:46px;padding:0 14px}
.ig-actions .ig-save{margin-left:auto}
.ig-dots{position:absolute;left:50%;display:flex;gap:4px;transform:translateX(-50%)}
.ig-dots i{width:6px;height:6px;border-radius:50%;background:#c7c7c7}
.ig-dots i:first-child{background:#0095f6}
.ig-likes{padding:0 14px;font-weight:600}
.ig-caption{padding:4px 14px 0;overflow-wrap:anywhere}
.ig-text{white-space:pre-wrap}
.ig-name{font-weight:600}
.ig-tag{color:#00376b}
.ig-placeholder{color:#8e8e8e}
.ig-more{padding:0;border:0;background:none;font:inherit;color:#737373;cursor:pointer}
.ig-more:hover{color:#4d4d4d}
.ig-comments{padding:6px 14px 0;color:#737373}
.ig-date{padding:6px 14px 18px;font-size:12px;line-height:16px;color:#737373}
.cf-note{margin-top:12px;font-size:13px;line-height:1.55;color:#6b6b6b;text-align:center}
/* U+2800 is drawn as a fixed blank, never as itself: a few desktop fonts paint
   it as faint dots, and the preview must look like a phone. */
.sp{display:inline-block;width:.5em;height:1em;vertical-align:-.15em}
.sp-tag{display:none}
.reveal .sp{background:#e3edff;box-shadow:inset 0 0 0 1px var(--blue);border-radius:2px}
.reveal .sp-tag{display:inline-block;padding:0 6px;border-radius:6px;background:#e3edff;color:var(--blue);font-size:11px;line-height:16px;vertical-align:1px}

/* The limits: three numbers, one card each. */
.cf-limits{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:52px 0 0;padding:0}
.cf-limits li{background:#fff;border-radius:18px;padding:26px 24px;box-shadow:0 2px 4px #00000005}
.cf-limits strong{display:block;font-size:44px;line-height:1;letter-spacing:-.05em}
.cf-limits span{display:block;margin-top:10px;font-size:17px;font-weight:600;letter-spacing:-.02em}
.cf-limits p{margin-top:8px;font-size:15px;line-height:1.75;color:#515151}
.cf-callout .button{flex-shrink:0}
.cf-tips{grid-template-columns:repeat(3,minmax(0,1fr))}

@media(max-width:1000px){
 .cf-card{grid-template-columns:minmax(0,1fr) 360px;column-gap:30px;padding:28px}
}
@media(max-width:860px){
 .cf-card{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"input" "summary" "stage" "actions" "options";max-width:560px}
 .cf-stage{margin-top:24px}
 .cf-options{margin-top:4px}
 .ig-phone{max-width:400px;margin-inline:auto}
 #cf-input{min-height:240px}
 .cf-limits,.cf-tips{grid-template-columns:1fr;margin-top:32px}
}
@media(max-width:650px){
 .tool-hero .hero-description br{display:none}
 .cf-card{margin-top:30px;padding:18px 14px;border-radius:24px}
 .cf-stage-head{flex-wrap:wrap}
 .ig-phone{padding:6px;border-radius:36px}
 .ig-post{border-radius:30px}
 .cf-counts{gap:8px}
 .cf-counts>div{padding:10px 11px}
 .cf-counts dd{font-size:17px}
 .cf-next{margin-top:22px}
}
