.online-tool {
	--bynet-tool-muted: color-mix(in srgb, var(--theme-text-color, #27323d) 5%, transparent);
	display: grid;
	gap: 24px;
	padding: clamp(20px, 4vw, 36px);
	border: 1px solid var(--theme-border-color);
	border-radius: 12px;
	background: var(--theme-palette-color-6);
	color: var(--theme-text-color);
	margin-block: 28px;
}
.online-tool *, .online-tool *::before, .online-tool *::after { box-sizing: border-box; }
.online-tool [hidden], .tool-feedback:empty { display: none !important; }
.tool-feedback.is-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.online-tool p, .online-tool h2, .online-tool dl, .online-tool dd { margin: 0; }
.tool-intro { display: grid; gap: 10px; }
.tool-kicker { color: var(--theme-palette-color-1); font-size: .78em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.online-tool h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); line-height: 1.25; }
.tool-form { display: grid; gap: 10px; }
.tool-form > label { font-weight: 600; }
.tool-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: stretch; }
.tool-input-row input { width: 100%; min-width: 0; min-height: 48px; font-size: 16px; }
.tool-input-row .ct-button { min-height: 48px; white-space: nowrap; }
.tool-input-row button:disabled { opacity: .65; cursor: wait; }
.tool-help, .tool-footnote, .tool-previous-result { font-size: .87em; line-height: 1.65; opacity: .8; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 4px; }
.ip-retry { background: none; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; color: inherit; padding: 6px 0; font: inherit; font-size: .9em; cursor: pointer; }
.ip-retry:hover { color: var(--theme-palette-color-4); }
.online-tool .ct-button-ghost:is([type="reset"], [data-role="stop"], [data-role="copy"], .qr-download) {
	--theme-button-background-initial-color: var(--bynet-tool-button-color);
	--theme-button-background-hover-color: var(--bynet-tool-button-color);
}
.online-tool .ct-button-ghost:is([type="reset"], [data-role="stop"]) {
	--bynet-tool-button-color: var(--theme-palette-color-4);
	--theme-button-text-hover-color: var(--theme-palette-color-8);
}
.online-tool .ct-button-ghost:is([data-role="copy"], .qr-download) {
	--theme-button-text-hover-color: var(--theme-palette-color-6);
}
.online-tool .ct-button-ghost[data-role="copy"] { --bynet-tool-button-color: var(--theme-palette-color-1); }
.online-tool .ct-button-ghost.qr-download { --bynet-tool-button-color: var(--theme-palette-color-3); }
.online-tool :is(button, input, summary):focus-visible { outline: 2px solid var(--theme-palette-color-1); }
.tool-results { display: grid; gap: 20px; }
.tool-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-metric { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--bynet-tool-muted); border: 1px solid var(--theme-border-color); border-radius: 8px; min-width: 0; }
.tool-metric > span { font-size: .86em; }
.tool-metric strong { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; color: var(--theme-headings-color, inherit); font-variant-numeric: tabular-nums; }
.tool-metric strong.http-metric-date { font-size: 1.05em; line-height: 1.65; }
.tool-metric small { font-size: .73em; opacity: .75; line-height: 1.5; }
.tool-summary, .tool-message { padding: 14px 16px; border-radius: 6px; font-weight: 700; font-size: 0.9em; }
.online-tool .is-success { background-color: var(--theme-palette-color-1); color: var(--theme-palette-color-6); }
.online-tool .is-warning { background-color: var(--theme-palette-color-3); color: var(--theme-palette-color-6); }
.online-tool .is-error { background-color: var(--theme-palette-color-4); color: var(--theme-palette-color-8); }
.http-addresses { display: grid; gap: 10px; }
.http-addresses > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.http-addresses dt { font-size: .85em; opacity: .8; }
.http-addresses dd { font-size: .87em; overflow-wrap: anywhere; }
.http-log { border-top: 1px solid var(--theme-border-color); padding-top: 16px; }
.http-log summary { cursor: pointer; font-weight: 600; }
.http-log ol { display: grid; gap: 10px; margin: 18px 0 0; padding-inline-start: 24px; font-size: .85em; }
.http-log li { padding-inline-start: 4px; overflow-wrap: anywhere; }
.http-log code { white-space: normal; overflow-wrap: anywhere; font-size: 1em; color: inherit; }
.tool-footnote { padding-top: 16px; border-top: 1px solid var(--theme-border-color); }
.tool-metric strong.dns-metric-value { font-size: 1.1em; line-height: 1.6; overflow-wrap: anywhere; }
.dns-groups { display: grid; gap: 24px; }
.dns-group { min-width: 0; border-top: 1px solid var(--theme-border-color); padding-top: 20px; }
.dns-group-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dns-group-heading h3 { margin: 0; font-size: 1.05em; }
.dns-response-code { font-size: .75em; padding: 3px 8px; border: 1px solid var(--theme-border-color); border-radius: 4px; }
.dns-record-table { width: 100%; table-layout: fixed; margin: 0; border-collapse: collapse; font-size: .85em; }
.dns-record-table th, .dns-record-table td { text-align: start; padding: 12px; vertical-align: top; border: 0; border-bottom: 1px solid var(--theme-border-color); overflow-wrap: anywhere; }
.dns-record-table th { background: var(--bynet-tool-muted); font-weight: 600; }
.dns-record-table th:last-child { width: 20%; }
.dns-table-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Local generators and media tests share the same forms and result surfaces. */
.tool-field { display: grid; gap: 8px; min-width: 0; }
.tool-field > label, .tool-field > legend { font-weight: 600; }
.tool-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-field :is(input:not([type="checkbox"]), select, textarea) { width: 100%; min-width: 0; font: inherit; }
.tool-field textarea { resize: vertical; min-height: 110px; }
.tool-field :is(select, input[type="number"]) { min-height: 46px; }
.tool-choice-list { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.tool-choice-list label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.tool-choice-list input { margin: 0; }
.online-tool fieldset.tool-field { padding: 0; margin: 0; border: 0; }
.tool-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tool-controls button:disabled { opacity: .6; cursor: default; }
.online-tool .tool-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; line-height: 1.7; overflow-wrap: anywhere; }
.password-output { min-height: 52px; padding: 12px; }
.qr-preview { display: block; max-width: min(100%, 320px); width: 100%; height: auto; background: #fff; border: 1px solid var(--theme-border-color); }
.qr-result { width: 100%; justify-items: center; }
.qr-result[hidden] { display: grid !important; visibility: hidden; }
.qr-result .qr-preview { aspect-ratio: 1; }
.qr-result .tool-help { width: 100%; min-block-size: 4lh; }
.qr-settings .tool-actions[hidden] { display: flex !important; visibility: hidden; }
.camera-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 8px; }
.camera-video.is-mirrored { transform: scaleX(-1); }
.tool-meter { width: 100%; height: 32px; accent-color: var(--theme-palette-color-1); }
.tool-meter::-webkit-meter-bar { background: var(--bynet-tool-muted); border: 1px solid var(--theme-border-color); border-radius: 5px; }
.tool-meter::-webkit-meter-optimum-value { background: var(--theme-palette-color-1); }
.tool-meter::-moz-meter-bar { background: var(--theme-palette-color-1); }
.tool-field input.audio-volume {
	--bynet-volume-progress: .285714;
	--bynet-volume-direction: to right;
	appearance: none;
	width: 100%;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.audio-volume:dir(rtl) { --bynet-volume-direction: to left; }
.audio-volume::-webkit-slider-runnable-track {
	--bynet-volume-stop: calc(9px + (100% - 18px) * var(--bynet-volume-progress));
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(var(--bynet-volume-direction), var(--theme-palette-color-1) var(--bynet-volume-stop), var(--theme-palette-color-7) var(--bynet-volume-stop));
}
.audio-volume::-moz-range-track,
.audio-volume::-moz-range-progress {
	height: 6px;
	border-radius: 999px;
}
.audio-volume::-moz-range-track { background: var(--theme-palette-color-7); }
.audio-volume::-moz-range-progress { background: var(--theme-palette-color-1); }
.audio-volume::-webkit-slider-thumb {
	appearance: none;
	width: 18px;
	height: 18px;
	margin-top: -6px;
	border: 0;
	border-radius: 50%;
	background: var(--theme-palette-color-1);
}
.audio-volume::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border: 0;
	border-radius: 50%;
	background: var(--theme-palette-color-1);
}
.online-tool a.ip-retry { text-decoration: none; }
:where(.online-tool) .tool-card-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.85fr); gap: 16px; }
:where(.online-tool) .tool-card { min-width: 0; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--theme-border-color); border-radius: 10px; background: var(--bynet-tool-muted); }
.tool-card-overview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.tool-card-overview h3, .camera-preview h3 { margin: 0; font-size: clamp(1.15rem, 2.5vw, 1.45rem); }
.tool-card-icon { width: 64px; height: 64px; color: var(--theme-palette-color-1); }
.tool-card-body { display: grid; align-content: center; gap: 16px; }
.password-score { font-variant-numeric: tabular-nums; }
.password-score strong { display: inline-block; inline-size: 3ch; text-align: end; color: var(--theme-headings-color, inherit); font-size: clamp(1.5rem, 3vw, 2rem); }
.password-result { width: 100%; text-align: start; }
.password-result[hidden] { display: grid !important; visibility: hidden; }
.password-settings fieldset .tool-choice-list { align-items: flex-start; }
.password-settings fieldset .tool-choice-list label { margin: 0; line-height: 1.5; }
.password-settings fieldset .tool-choice-list input { flex: none; inset-block-start: auto; }
.password-settings .tool-actions[hidden] { display: flex !important; visibility: hidden; }
.camera-preview { text-align: center; }
.camera-frame { display: grid; min-width: 0; aspect-ratio: 16 / 9; }
.camera-frame > * { grid-area: 1 / 1; }
.camera-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; border: 1px solid var(--theme-border-color); border-radius: 8px; }
.ip-version { padding: 3px 10px; border: 1px solid var(--theme-border-color); border-radius: 7px; font-size: .85em; font-weight: 700; }
:where(.ip-tool > .tool-card-grid) > .tool-card > .tool-feedback:not(.is-announcement):not(:empty) { margin-block-end: 16px; }
.tool-detail-list { display: grid; gap: 12px; }
.tool-detail-list > div + div { padding-block-start: 12px; border-block-start: 1px solid var(--theme-border-color); }
.tool-detail-list dt { font-size: .87em; opacity: .85; }
.tool-detail-list dd { margin-block-start: 4px; overflow-wrap: anywhere; font-weight: 600; }
.ip-address-row { display: flex; align-items: center; gap: 8px; }
.ip-address { min-width: 0; color: var(--theme-headings-color, currentColor); background: transparent; padding: 0; font-size: clamp(1.1rem, 3vw, 1.65rem); white-space: normal; }
.ip-address-row .ip-copy { flex: none; min-height: 32px; padding: 5px 10px; font-size: .8rem; line-height: 1.2; white-space: nowrap; }
.tool-detail-list .ip-copy-feedback { margin-block-start: 0; }
.tool-detail-list .ip-copy-feedback:not(:empty) { margin-block-start: 8px; }
.ip-lookup { display: grid; gap: 8px; justify-items: start; }
.ip-lookup button { max-width: 100%; white-space: normal; }
@media (max-width: 680px) {
	:where(.online-tool) .tool-card-grid { grid-template-columns: minmax(0, 1fr); }
	.ip-address { font-size: clamp(.85rem, 3.5vw, 1.1rem); }
	.tool-field-grid { grid-template-columns: minmax(0, 1fr); }
	.tool-input-row, .tool-metrics { grid-template-columns: minmax(0, 1fr); }
	.tool-metric { padding: 16px; }
	.http-addresses > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.dns-record-table thead { display: none; }
	.dns-record-table, .dns-record-table tbody, .dns-record-table tr { display: block; }
	.dns-record-table tr { border-bottom: 1px solid var(--theme-border-color); padding-block: 10px; }
	.dns-record-table td { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; border: 0; padding: 5px 0; }
	.dns-record-table td::before { content: attr(data-label); font-weight: 600; }
}
