/* Shared look for the free tools.
   These are working surfaces, not marketing pages: the tool is the hero, it
   sits above the fold, and there is nothing to scroll past before using it. */

.tool-wrap { max-width: 1080px; margin: 0 auto; padding: 96px 20px 80px; }
@media (max-width: 700px) { .tool-wrap { padding: 84px 16px 56px; } }

.tool-head { max-width: 60ch; margin: 0 0 26px; }
.tool-eyebrow {
  font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}
.tool-wrap h1 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; margin: 0 0 12px; text-wrap: balance;
}
.tool-wrap h1 em { color: var(--accent); font-style: italic; }
.tool-lede { color: var(--muted2); font-size: 16px; line-height: 1.65; margin: 0; }
.tool-privacy {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 13px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 13px;
}
.tool-privacy b { color: var(--text); font-weight: 600; }

/* The working area. Two columns on a wide screen, stacked on a phone, with the
   input first either way so the tool is usable without scrolling. */
.tool-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }

.panel { border: 1px solid var(--border); border-radius: 16px; background: var(--bg2); padding: 18px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 14px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.01em; }

textarea.tool-text {
  width: 100%; box-sizing: border-box; min-height: 190px; resize: vertical;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg);
  color: var(--text); font: inherit; font-size: 15px; line-height: 1.6; padding: 13px 14px;
}
textarea.tool-text:focus, .drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input.tool-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px; padding: 10px 12px;
}
.tool-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 13.5px; color: var(--muted2); }
.tool-row label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.tool-row input[type="checkbox"] { accent-color: var(--accent); }

/* Media drop zone. */
.drop {
  border: 1.5px dashed var(--border); border-radius: 12px; padding: 20px;
  text-align: center; color: var(--muted); font-size: 14px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--bg3); color: var(--text); }
.files { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.file {
  display: flex; align-items: center; gap: 11px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; background: var(--bg);
}
.file .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .dim { font-family: 'Geist Mono', monospace; color: var(--muted); font-size: 12px; white-space: nowrap; }
.file button { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 17px; line-height: 1; }
.file button:hover { color: var(--accent); }

/* Results: one card per network, sorted so failures surface first. */
.results { display: grid; gap: 10px; }
.net {
  border: 1px solid var(--border); border-radius: 13px; background: var(--bg2);
  padding: 13px 15px; border-left: 3px solid var(--ok, #3f9d5a);
}
.net.bad { border-left-color: #c0392b; }
.net.warn { border-left-color: var(--accent); }
.net-top { display: flex; align-items: baseline; gap: 10px; }
.net-name { font-weight: 600; font-size: 15px; }
.net-verdict { font-size: 12.5px; color: var(--muted); }
.net.bad .net-verdict { color: #c0392b; font-weight: 600; }
.net-count { margin-left: auto; font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.net-count.over { color: #c0392b; font-weight: 600; }
.net-issues { margin: 9px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.net-issues li { font-size: 13.5px; line-height: 1.55; }
.net-issues .what { font-weight: 600; }
.net-issues .fix { color: var(--muted2); }
.net-issues li.w .what { font-weight: 600; color: var(--accent); }

.summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.pill { font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 5px 12px; border: 1px solid var(--border); }
.pill.good { color: #2f7d46; border-color: rgba(63,157,90,.35); }
.pill.bad { color: #c0392b; border-color: rgba(192,57,43,.35); }

/* Character counter: the fill bar and the running totals. */
.bar { height: 4px; border-radius: 999px; background: var(--border); margin-top: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok, #3f9d5a); border-radius: 999px; transition: width .12s; }
.net.warn .bar i { background: var(--accent); }
.net.bad .bar i { background: #c0392b; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.stats b { font-family: 'Geist Mono', monospace; color: var(--text); font-weight: 600; }
.panel p.mini { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--muted2); }
.panel ul.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.panel ul.checks li { font-size: 13.5px; line-height: 1.6; color: var(--muted2); padding-left: 17px; position: relative; }
.panel ul.checks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.panel ul.checks b { color: var(--text); font-weight: 600; }

/* Image checker preview. */
.preview { display: flex; gap: 13px; align-items: center; margin-top: 13px; }
.preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--bg3); }
.preview .meta { min-width: 0; font-size: 13px; }
.preview .meta b { display: block; font-size: 14px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview .meta span { font-family: 'Geist Mono', monospace; color: var(--muted); font-size: 12px; }

/* Tables. These pages do not load docs.css, so the reference tables are styled
   here. Wide ones scroll inside their own box rather than widening the page. */
.docs-table-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 12px; }
table.docs-tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.docs-tbl th, table.docs-tbl td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.docs-tbl th { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; background: var(--bg2); }
table.docs-tbl tr:last-child td { border-bottom: 0; }
table.docs-tbl td:first-child { font-weight: 600; white-space: nowrap; }

/* Hub. */
.hub { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hub-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px;
  background: var(--bg2); padding: 20px; text-decoration: none; color: var(--text);
  transition: border-color .12s, transform .12s;
}
.hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hub-card h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 23px; margin: 0 0 8px; }
.hub-card p { color: var(--muted2); font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; }
.hub-card .go { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14px; }
.hub-card .go::after { content: " \2192"; }

/* The pitch, after they have used it rather than before. */
.after { margin-top: 44px; border-top: 1px solid var(--border); padding-top: 30px; }
.after h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 26px; margin: 0 0 10px; }
.after p { color: var(--muted2); font-size: 15.5px; line-height: 1.7; max-width: 66ch; margin: 0 0 14px; }
.after p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.after a.cta {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 15px; border-radius: 11px; padding: 11px 20px; margin-top: 4px;
}
.after a.cta:hover { filter: brightness(1.06); }
.tool-more { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 22px; }
.tool-more a {
  border: 1px solid var(--border); border-radius: 13px; padding: 13px 15px;
  text-decoration: none; color: var(--text); background: var(--bg2);
}
.tool-more a:hover { border-color: var(--accent); }
.tool-more b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.tool-more span { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* The post checker's reference panel is a grid child in its own right, not part
   of the input column. Auto-placement then lands it under the inputs on a wide
   screen and BELOW the verdicts on a phone, which is the order that matters:
   nobody wants to scroll past a reference list to reach their answer. */
.tool-grid > .panel { margin-top: 0; }

/* A clipped table with no affordance reads as broken rather than scrollable.
   Only shown where the clipping actually happens. */
.tbl-note { display: none; }
@media (max-width: 760px) {
  .tbl-note { display: block; margin: -10px 0 18px; font-size: 12.5px; color: var(--muted); }
}

/* Offer the corrected file, not just the diagnosis. */
.fixbtn {
  margin-top: 11px; font: inherit; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px;
  background: var(--bg); color: var(--accent); cursor: pointer;
}
.fixbtn:hover:not(:disabled) { border-color: var(--accent); }
.fixbtn:disabled { color: var(--muted); cursor: default; }
