/* DF-IP tools: a quiet workbench, clear inputs and evidence-led results. */
.tools-page { --tool-line: #c5d0d6; --tool-success: #21664b; }
.tools-page .tools-hero { padding: 140px 0 40px; }
.tools-page .breadcrumbs { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--studio-muted); margin-bottom: 28px; }
.tools-page .breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.tools-hero h1 { font-size: clamp(34px, 4.5vw, 62px); letter-spacing: -.035em; line-height: 1.18; max-width: 980px; margin: 18px 0; }
.tools-hero .tools-lead { max-width: 760px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.85; color: var(--studio-muted); }
.tool-badge { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 650; color: var(--studio-muted); }
.tool-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tool-success); }
.tool-badge[data-network]::before { background: var(--studio-red); }
.tools-index-intro { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.tools-index-note { padding: 24px 0 24px 24px; border-left: 2px solid var(--studio-red); color: var(--studio-muted); }
.tools-index-note strong { display: block; color: var(--studio-ink); margin-bottom: 10px; }
.tools-catalog { padding: 12px 0 70px; }
.tools-catalog-group { padding: 0; }
.tools-catalog-group + .tools-catalog-group { margin-top: 44px; }
.tools-catalog-group > h2 { font-size: 24px; margin-bottom: 22px; }
.tools-catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tools-catalog-grid.is-local { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-card { display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--studio-line); border-radius: 12px; background: #fff; transition: border-color 180ms, background-color 180ms; }
.tool-card:hover { background: #f8fafb; border-color: #8c9ba5; }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tool-card-icon { width: 28px; height: 28px; color: var(--studio-red); }
.tool-card h3 { font-size: 22px; line-height: 1.35; margin: 30px 0 14px; }
.tool-card p { font-size: 15px; line-height: 1.8; color: var(--studio-muted); flex-grow: 1; margin-bottom: 24px; }
.tool-card .tool-card-action { font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; padding-bottom: 64px; }
.tool-workbench { min-width: 0; border: 1px solid var(--studio-line); border-radius: 14px; overflow: hidden; }
.tool-form { padding: clamp(22px, 3vw, 38px); background: #f2f5f6; }
.tool-form h2, .tool-result h2 { font-size: 20px; margin-bottom: 22px; }
.tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tool-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 20px; }
.tool-fields .tool-field { margin-bottom: 0; }
.tool-field label { font-size: 14px; font-weight: 700; }
.tools-page input:not([type=checkbox]), .tools-page select, .tools-page textarea {
    width: 100%; border: 1px solid #758995; border-radius: 6px; padding: 12px 14px;
    min-height: 48px; background: #fff; color: var(--studio-ink); font: inherit; font-size: 16px;
}
.tools-page textarea { resize: vertical; min-height: 200px; line-height: 1.7; font-family: Consolas, 'SFMono-Regular', monospace; font-size: 14px; }
.tools-page input::placeholder, .tools-page textarea::placeholder { color: #697b86; opacity: 1; }
.tools-page :is(input, select, textarea):focus-visible { outline: 3px solid var(--studio-red); outline-offset: 3px; }
.tool-help { font-size: 13px; color: var(--studio-muted); line-height: 1.75; }
.tool-note { color: var(--studio-muted); font-size: 14px; line-height: 1.85; margin: 20px 0; }
.tool-note a, .tool-aside a, .tool-guide a { text-decoration: underline; text-underline-offset: 4px; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.tools-page button:disabled { opacity: .55; cursor: not-allowed; }
.tool-status { font-size: 14px; line-height: 1.8; margin-top: 16px; overflow-wrap: anywhere; min-height: 26px; }
.tool-status[data-state=error] { color: #a22228; }
.tool-status[data-state=success] { color: var(--tool-success); }
.tool-result { border-top: 1px solid var(--studio-line); padding: clamp(22px, 3vw, 38px); background: #fff; }
.tool-result[hidden] { display: none; }
.tool-result dl { margin: 0; }
.tool-result-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--studio-line); }
.tool-result-row:last-child { border-bottom: 0; }
.tool-result dt { color: var(--studio-muted); font-size: 14px; }
.tool-result dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tool-result .tool-output { min-height: 150px; font-size: 14px; }
.tool-check { display: flex; align-items: start; gap: 12px; margin-top: 22px; font-size: 14px; cursor: pointer; padding-block: 6px; min-height: 44px; }
.tool-check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--studio-red); }
.tool-aside { padding: 26px 0 0; }
.tool-aside h2 { font-size: 17px; margin-bottom: 16px; }
.tool-aside p { color: var(--studio-muted); font-size: 14px; line-height: 1.85; margin-bottom: 22px; }
.tool-aside a { display: block; font-size: 14px; margin: 16px 0; padding-block: 6px; }
.tool-aside .tool-aside-section { border-top: 1px solid var(--studio-line); padding-top: 26px; margin-top: 28px; }
.tool-guide { border-top: 1px solid var(--studio-line); padding: 54px 0 72px; }
.tool-guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 70px; }
.tool-guide h2 { font-size: 26px; margin-bottom: 24px; }
.tool-guide h3 { font-size: 18px; margin: 24px 0 12px; }
.tool-guide p, .tool-guide li { font-size: 15px; color: var(--studio-muted); line-height: 1.9; }
.tool-guide ol { padding-left: 22px; }
.tool-guide li { margin-bottom: 12px; }
.tool-guide details { border-bottom: 1px solid var(--studio-line); padding: 18px 0; }
.tool-guide summary { cursor: pointer; font-size: 16px; font-weight: 650; padding-right: 16px; }
.tool-guide details p { padding-top: 14px; }
.tool-nojs { margin-block: 16px; border-left: 3px solid var(--studio-red); padding: 16px; background: #fff4f3; }
.tool-clear { padding: 12px; text-decoration: underline; text-underline-offset: 4px; min-height: 46px; }
.my-ip-summary { padding-top: 8px; min-height: 150px; }
.my-ip-summary .my-ip-label { color: var(--studio-muted); font-size: 14px; margin-bottom: 10px; }
.my-ip-summary strong { display: block; font-size: clamp(26px, 3vw, 42px); line-height: 1.35; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#current-ip-location { color: var(--studio-muted); margin-top: 12px; min-height: 27px; overflow-wrap: anywhere; }
.tool-data-license { padding-bottom: 38px; }
.tool-data-license p { max-width: 900px; font-size: 13px; line-height: 1.8; color: var(--studio-muted); }
.tool-data-license a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1100px) { .tool-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 24px; } }
@media (max-width: 900px) {
    .tools-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-layout { grid-template-columns: minmax(0, 1fr); }
    .tool-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding-top: 0; }
    .tool-aside .tool-aside-section { margin: 0; padding: 0; border: 0; }
    .tools-index-intro { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 600px) {
    .tools-page .tools-hero { padding: 112px 0 28px; }
    .tools-hero h1 { font-size: 34px; }
    .tools-catalog-grid, .tools-catalog-grid.is-local, .tool-guide-layout, .tool-fields, .tool-aside { grid-template-columns: minmax(0, 1fr); }
    .tool-card { padding: 24px; }
    .tool-card h3 { margin-top: 22px; }
    .tool-guide-layout { gap: 36px; }
    .tool-result-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
    .tool-actions .btn { flex-grow: 1; }
    .tool-aside { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tool-card { transition: none; } }
