/* Free tools (/tools/, /ko/tools/) — extends style.css, no external requests. */

[hidden] { display: none !important; }

.tool-head { padding: 52px 0 6px; }
.tool-head h1 { margin: 0 0 12px; }
.tool-head .lede { max-width: 760px; margin: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.crumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--ink); }

.tool-section { padding: 26px 0 56px; border-bottom: 1px solid var(--line); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tool-grid > * { min-width: 0; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); min-width: 0;
}
.tool-card h2 { font-size: 1.1rem; margin: 0 0 14px; }
.tool-card h3 { font-size: 1rem; margin: 18px 0 8px; }
.tool-card + .tool-card { margin-top: 20px; }
.tool-grid .tool-card + .tool-card { margin-top: 0; }
.tool-stack { display: grid; gap: 20px; min-width: 0; }

.field { display: block; margin: 0 0 14px; min-width: 0; }
.field .lab { display: block; font-size: 13px; font-weight: 650; color: var(--ink-soft); margin-bottom: 6px; }
.field .hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.field input, .field textarea, .field select, .row input, .row select, .crawler select {
  width: 100%; min-width: 0; max-width: 100%;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 10px 12px; min-height: 42px;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .row input:focus, .crawler select:focus {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent;
}
.field-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* repeatable rows */
.rows { display: grid; gap: 12px; margin-bottom: 12px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2);
}
.row .wide { grid-column: 1 / -1; }
.row .rm { justify-self: end; }
.row textarea { width: 100%; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.mini { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* crawler toggles */
.crawlers { display: grid; gap: 8px; }
.crawler {
  display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2);
}
.crawler code { font-weight: 650; }
.crawler small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.crawler small a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* outputs */
.out-label { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; margin: 0 0 8px; }
.out-label b { font-size: 14px; }
.out-label span { font-size: 12.5px; color: var(--muted); }
.code {
  display: block; width: 100%; max-width: 100%; min-height: 220px;
  font-family: var(--mono); font-size: 13px; line-height: 1.55; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px;
  resize: vertical; white-space: pre; overflow: auto; tab-size: 2;
}
.code.tall { min-height: 300px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.next-step {
  margin: 12px 0 0; padding: 11px 14px; font-size: 14px; line-height: 1.55; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--brand-2); border-radius: 10px; background: var(--card-2);
}
.next-step a { color: var(--ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.notes { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.notes li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink-soft); }
.notes li.warn { border-color: color-mix(in srgb, var(--med) 55%, var(--line)); }
.notes li.ok { border-color: color-mix(in srgb, var(--pass) 55%, var(--line)); }
.notes li.bad { border-color: color-mix(in srgb, var(--high) 60%, var(--line)); }
.status { font-size: 13.5px; margin: 10px 0 0; color: var(--ink-soft); }
.status.ok { color: var(--pass); }
.status.bad { color: var(--high); }
.sr-copy { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* meters */
.meter { margin: 8px 0 0; }
.meter .bar-bg { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter .bar-fg { height: 100%; width: 0; background: var(--brand-2); border-radius: 99px; transition: width .15s ease; }
.meter.long .bar-fg { background: var(--med); }
.meter p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* segmented tabs (JSON-LD type) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.seg button {
  appearance: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; min-height: 38px;
}
.seg button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* adsense checklist */
.score-box { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.score-big { font-size: 46px; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.score-big small { font-size: 16px; color: var(--muted); font-weight: 600; }
.score-box p { margin: 0; flex: 1 1 220px; color: var(--ink-soft); }
.check-group { margin: 0 0 22px; }
.check-group h3 { margin: 0 0 10px; font-size: 1rem; }
.check-item {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); margin-bottom: 8px;
}
.check-item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); }
.check-item label { cursor: pointer; font-weight: 600; line-height: 1.5; display: block; }
.check-item .src { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.check-item .src a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.pri { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-right: 8px; border: 1px solid var(--line-strong); color: var(--ink-soft); vertical-align: 1px; }
.pri.p3 { color: var(--high); border-color: var(--high); }
.pri.p2 { color: var(--med); border-color: var(--med); }
.fixlist { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.fixlist li { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); font-size: 14.5px; }
.fixlist li small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.fixlist a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.callout { padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card-2); font-size: 14.5px; color: var(--ink-soft); margin: 0 0 20px; }
.callout b { color: var(--ink); }

/* explanatory text */
.prose-wrap { padding: 56px 0; border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin: 36px 0 10px; font-size: 1.35rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { line-height: 1.75; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose code { overflow-wrap: anywhere; }
.src-list { padding-left: 20px; }
.src-list li { overflow-wrap: anywhere; }

/* hub */
.hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.hub .card h2 { font-size: 1.15rem; margin: 0 0 8px; }
.hub .card p { color: var(--ink-soft); margin: 0 0 16px; flex: 1; }
.hub .card .btn { align-self: flex-start; }

.band .btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .hub { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tool-head { padding: 36px 0 4px; }
  .tool-card { padding: 18px 16px; }
  .field-2, .row { grid-template-columns: minmax(0, 1fr); }
  .crawler { grid-template-columns: minmax(0, 1fr); }
  .field input, .field textarea, .field select, .row input, .row select, .crawler select, .row textarea { font-size: 16px; }
  .code { font-size: 12px; }
  .actions .btn, .band .btn-row .btn { flex: 1 1 100%; }
  .prose-wrap { padding: 40px 0; }
}
