/* Free tools pages (/tools/...). Uses the color tokens from site.css. */

/* Hub cards */
.tool-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.tool-card { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
             background: linear-gradient(180deg, var(--panel), var(--bg-2)); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.tool-card:hover { border-color: color-mix(in srgb, var(--blue-2) 55%, var(--line)); transform: translateY(-2px); }
.tool-card h2 { margin: 0; font-size: 1.2rem; max-width: none; }
.tool-card p { color: var(--muted); font-size: .97rem; }
.tool-go { margin-top: auto; padding-top: .5rem; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .93rem; }
.tool-go svg { width: 16px; height: 16px; color: var(--cyan); }
.tool-explain { margin-top: 3.5rem; }

/* Shared tool panel and form */
.tool-panel { position: relative; padding: 1.5rem; border: 1px solid var(--line-bright); border-radius: var(--radius); background: var(--panel);
              box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 10%, transparent), 0 30px 60px -40px color-mix(in srgb, var(--blue) 60%, transparent); }
.tool-panel::before { content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); }
.tool-form > label, .tool-form label[for$="-url"] { display: block; font-weight: 600; margin-bottom: .55rem; }
.tool-form label small { color: var(--muted); font-weight: 400; }
.tool-row { display: flex; flex-direction: column; gap: .75rem; }
.tool-row input { flex: 1; min-height: 52px; padding: .8rem 1rem; border: 1px solid var(--line-bright); border-radius: 10px; background: var(--bg-2); font-size: 1.02rem; }
.tool-row .btn { min-height: 52px; }
.tool-panel input:focus, .tool-panel textarea:focus, .tool-panel select:focus { outline: none; border-color: var(--blue);
             box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 22%, transparent); }
.tool-panel input::placeholder, .tool-panel textarea::placeholder { color: #66729a; }
.tool-hint { margin-top: .7rem; color: var(--muted); font-size: .88rem; }
.tool-error { margin-top: .7rem; color: var(--error); font-weight: 500; }
.tool-error:empty { display: none; }
.tool-status { margin-top: 1.25rem; color: var(--muted); }
.tool-status:empty { display: none; }
.tool-status.busy::before { content: ""; display: inline-block; width: 1rem; height: 1rem; margin-right: .6rem; vertical-align: -.15rem;
                            border: 2px solid var(--line-bright); border-top-color: var(--cyan); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .tool-status.busy::before { animation: tool-spin .8s linear infinite; }
  @keyframes tool-spin { to { transform: rotate(360deg); } }
}

/* Search preview */
.pv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pv-inputs .field + .field { margin-top: 1rem; }
.pv-inputs input, .pv-inputs textarea, .sg input, .sg textarea, .sg select { width: 100%; padding: .75rem .9rem; border: 1px solid var(--line-bright);
             border-radius: 10px; background: var(--bg-2); font-size: 1rem; color: var(--text); }
.pv-inputs textarea { min-height: 6rem; resize: vertical; }
.pv-count { margin-top: .35rem; font-size: .85rem; color: var(--muted); }
.pv-count b { color: var(--text); font-weight: 600; }
.pv-warnings { list-style: none; margin-top: 1rem; display: grid; gap: .45rem; }
.pv-warnings li { padding: .55rem .8rem; border-radius: 8px; font-size: .92rem; border: 1px solid; }
.pv-warnings li.warn { color: #fcd34d; border-color: color-mix(in srgb, #fbbf24 40%, transparent); background: color-mix(in srgb, #fbbf24 8%, transparent); }
.pv-warnings li.ok { color: #86efac; border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.pv-label { margin: 0 0 .4rem; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.pv-label:not(:first-child) { margin-top: 1.25rem; }
.pv-fine { margin-top: .9rem; color: var(--muted); font-size: .82rem; }

/* A search result drawn to look like Google's (white card, Arial, Google's own colors). */
.serp { background: #fff; color: #202124; border-radius: 12px; padding: 1rem 1.1rem; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
.serp-desktop { max-width: 652px; }
.pv-previews { min-width: 0; }
.serp-mobile { max-width: 380px; }
.serp-site { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.serp-icon { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #f1f3f4; border: 1px solid #dadce0; display: grid; place-items: center;
             font-size: 13px; font-weight: 700; color: #4d5156; }
.serp-name { font-size: 14px; line-height: 20px; color: #202124; }
.serp-url { font-size: 12px; line-height: 18px; color: #4d5156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.serp-title { margin: 0; font-size: 20px; line-height: 26px; color: #1a0dab; font-weight: 400; white-space: nowrap; overflow: hidden; }
.serp-desc { margin: .25rem 0 0; font-size: 14px; line-height: 22px; color: #4d5156; }
.serp-mobile .serp-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 18px; line-height: 24px; }
.serp-mobile .serp-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.serp-empty { color: #70757a; font-style: italic; }

/* AI crawler check results */
.cr-results { margin-top: 2rem; }
.cr-summary { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
              background: linear-gradient(135deg, color-mix(in srgb, var(--blue-2) 14%, var(--panel)), var(--panel)); }
.cr-summary h2 { margin: 0; font-size: clamp(1.3rem, 3.6vw, 1.7rem); max-width: none; }
.cr-summary h2:focus { outline: none; }
.cr-summary p { margin-top: .5rem; color: #d3daf0; }
.cr-meta { margin-top: .75rem; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.cr-meta a { color: var(--text); }
.cr-group { margin-top: 1.75rem; }
.cr-group h3 { font-size: 1.05rem; font-weight: 600; }
.cr-group > p { margin-top: .25rem; color: var(--muted); font-size: .93rem; }
.cr-list { list-style: none; margin-top: .75rem; display: grid; gap: .6rem; }
.cr-bot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.cr-bot.blocked { border-color: color-mix(in srgb, var(--error) 35%, var(--line)); }
.cr-pill { grid-row: span 2; align-self: start; min-width: 5.6rem; padding: .3rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700; text-align: center; }
.cr-pill.allowed { color: #86efac; background: color-mix(in srgb, var(--ok) 14%, transparent); }
.cr-pill.blocked { color: #fca5a5; background: color-mix(in srgb, var(--error) 14%, transparent); }
.cr-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.cr-name code { font-size: .98rem; font-weight: 600; color: var(--text); }
.cr-name span { color: var(--muted); font-size: .88rem; }
.cr-what { color: #c9d1e6; font-size: .93rem; }
.cr-rule { grid-column: 2; color: var(--muted); font-size: .82rem; }
.cr-rule code { color: var(--text); }
.cr-rule a { color: var(--muted); }
.code-block { margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line-bright); border-left: 2px solid var(--cyan); border-radius: 10px; background: var(--bg-2);
              overflow-x: auto; font-size: .9rem; line-height: 1.55; }
.code-block code { font-family: ui-monospace, Menlo, Consolas, monospace; color: #c9d1e6; }

/* Schema generator */
.sg { display: grid; gap: 1.75rem; }
.sg fieldset { border: 0; padding: 0; margin: 0; }
.sg fieldset + fieldset { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.sg legend { font-weight: 700; font-size: 1.05rem; margin-bottom: .75rem; }
.sg legend small { color: var(--muted); font-weight: 400; }
.sg .field + .field, .sg .grid2 + .field, .sg .field + .grid2 { margin-top: .9rem; }
.sg textarea { min-height: 4.5rem; resize: vertical; }
.sg select { appearance: auto; }
.sg-check { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .9rem; color: #d3daf0; cursor: pointer; }
.sg-check input, .sg-open input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--blue); }
.sg-hours { display: grid; gap: .5rem; }
.sg-day { display: grid; grid-template-columns: 7.5rem 1fr auto 1fr; align-items: center; gap: .5rem; }
.sg-day input[type="time"] { padding: .5rem .6rem; color-scheme: dark; }
.sg-day span { color: var(--muted); font-size: .9rem; }
.sg-open { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.sg-output { position: relative; }
.sg-output-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.sg-output h2 { margin: 0; font-size: 1.15rem; max-width: none; }
.sg .sg-code { width: 100%; min-height: 22rem; padding: 1rem; border: 1px solid var(--line-bright); border-radius: 10px; background: var(--bg-2);
           font: .85rem/1.5 ui-monospace, Menlo, Consolas, monospace; color: #c9d1e6; resize: vertical; white-space: pre; }
.sg-copied { min-height: 1.4em; margin-top: .4rem; color: #86efac; font-size: .88rem; }
.sg-checks { list-style: none; display: grid; gap: .4rem; margin-top: .5rem; }
.sg-checks li { padding: .5rem .75rem; border-radius: 8px; font-size: .9rem; border: 1px solid; }
.sg-checks li.warn { color: #fcd34d; border-color: color-mix(in srgb, #fbbf24 40%, transparent); }
.sg-checks li.ok { color: #86efac; border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.sg-test { margin-top: .9rem; color: var(--muted); font-size: .92rem; }
.sg-test a { color: var(--text); text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 3px; }

/* Newsletter box inside a tool page */
.nl-box { margin-top: 3rem; }

@media (min-width: 40rem) {
  .tool-panel { padding: 2rem; }
  .tool-row { flex-direction: row; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .pv-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
  .sg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .sg-output { position: sticky; top: 6rem; }
}
@media (max-width: 30rem) {
  .sg-day { grid-template-columns: 1fr 1fr; }
  .sg-day .sg-open { grid-column: 1 / -1; }
  .sg-day span { display: none; }
}

/* Website quiz (top of /tools/): one question at a time */
.quiz { margin-bottom: 3rem; overflow: hidden; }
.quiz h2 { margin-top: .4rem; font-size: clamp(1.4rem, 3.5vw, 1.8rem); max-width: none; }
.quiz-sub { margin-top: .5rem; color: var(--muted); }
.quiz-progress { margin-top: 1.5rem; }
.quiz-count { color: var(--muted); font-size: .88rem; font-weight: 600; }
.quiz-bar { margin-top: .5rem; height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.quiz-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--grad); transition: width .3s ease; }
.quiz-step { margin-top: 1.5rem; }
.quiz-step h3 { font-size: 1.2rem; outline: none; }
.quiz-answers { margin-top: 1rem; display: grid; gap: .6rem; }
.quiz-answer { width: 100%; min-height: 52px; padding: .8rem 1.1rem; border: 1px solid var(--line-bright); border-radius: 12px; background: var(--bg-2);
               text-align: left; font-size: 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-answer:hover { border-color: var(--blue); }
.quiz-answer:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 35%, transparent); }
.quiz-answer[aria-pressed="true"] { border-color: var(--cyan); background: color-mix(in srgb, var(--blue) 22%, var(--bg-2)); }
.quiz-send .grid2 { margin-top: 1rem; }
.quiz-turnstile:not(:empty) { margin-top: 1rem; }
.quiz-send > .btn { margin-top: 1.5rem; width: 100%; }
.quiz-back { margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0; border: 0; background: none;
             color: var(--muted); font-size: .92rem; cursor: pointer; }
.quiz-back:hover { color: var(--text); }
.quiz-back svg { width: 16px; height: 16px; }
.quiz-back[hidden] { display: none; }
.quiz-result { outline: none; }
.quiz-result h3 { margin: .4rem 0 1.25rem; font-size: 1.4rem; }
.quiz-result .btn { width: 100%; }
.quiz-note { margin-top: 1rem; color: var(--muted); }
.quiz-note:empty { display: none; }
.quiz-offer-line { margin-top: 1.25rem; }
@media (min-width: 40rem) {
  .quiz-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-send > .btn, .quiz-result .btn { width: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .quiz-step.from-right { animation: quiz-in-right .25s ease-out; }
  .quiz-step.from-left { animation: quiz-in-left .25s ease-out; }
}
@keyframes quiz-in-right { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes quiz-in-left { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
