/*
Theme Name: IPON
Theme URI: https://ipon.com.ua/
Author: IPON
Description: Адаптивна тема для українського каталогу інструментів IP, DNS і доменів.
Version: 1.2.1
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: ipon
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--canvas: #f5f7f8;
	--ink: #101f2c;
	--muted: #4c5e6d;
	--line: #dce4e8;
	--surface: #fff;
	--dark: #0e232d;
	--bright: #80edca;
	--accent: #075e4e;
	--focus: #0a745a;
	--wp-admin-offset: 0px;
	--shell: 1176px;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--wp-admin-offset) + 14px); }
body {
	margin: 0;
	color: var(--ink);
	background: var(--canvas);
	font: 400 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	-webkit-text-size-adjust: 100%;
}
body.admin-bar { --wp-admin-offset: 32px; }
:where(h1,h2,h3,h4,p,figure) { margin: 0; }
:where(h1,h2,h3,h4) { line-height: 1.15; text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; width: 1.25rem; height: 1.25rem; flex: none; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
main:focus { outline: none; }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed;
	z-index: 1000;
	inset: calc(var(--wp-admin-offset) + 9px) auto auto 12px;
	padding: .7rem 1rem;
	border-radius: .45rem;
	background: var(--surface);
	font-weight: 750;
}

.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 64px; display: flex; align-items: center; gap: 1.5rem; }
.brand {
	display: inline-flex;
	align-items: center;
	gap: .62rem;
	color: var(--ink);
	font-size: 1.38rem;
	font-weight: 900;
	letter-spacing: -.055em;
	line-height: 1.1;
	text-decoration: none;
	overflow-wrap: anywhere;
}
.brand-icon { width: 38px; height: 38px; flex: 0 0 38px; }
.brand-name { letter-spacing: -.06em; font-weight: 900; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0 1.1rem; margin-inline-start: auto; }
.nav-list { display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.nav-list a, .header-topics a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-weight: 650; }
.nav-list a:hover, .nav-list .current-menu-item > a, .header-topics a:hover, .header-topics a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: .28em; }
.header-topics ul { display: flex; flex-wrap: wrap; gap: 0 1rem; margin: 0; padding: 0 0 0 1.1rem; border-inline-start: 1px solid var(--line); list-style: none; }
.header-topics a { font-size: .875rem; }
.header-topics-label { display: none; }
.header-cta, .menu-toggle, .button-secondary {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: .48rem;
	min-height: 44px;
	padding: .45rem .9rem;
	border: 1px solid var(--line);
	border-radius: .65rem;
	background: var(--surface);
	color: var(--ink);
	font-size: .88rem;
	font-weight: 760;
	text-decoration: none;
}
.header-cta { white-space: nowrap; }
.header-cta:hover, .menu-toggle:hover, .button-secondary:hover { border-color: #97b7ac; background: #edf9f3; }
.header-cta svg, .button-secondary svg { width: 1rem; height: 1rem; }

.home-shell { padding-block: 1.15rem 3.75rem; }
.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	align-items: center;
	gap: clamp(.85rem, 3vw, 2.4rem);
	padding: clamp(1rem, 2.15vw, 1.65rem);
	border-radius: 1.15rem;
	background: linear-gradient(115deg, #0e202a, #14313b);
	color: #f5fbfb;
}
.hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0 0 0 36%;
	pointer-events: none;
	background: radial-gradient(circle, #8dd7c45e 1px, transparent 1.25px) 0 0 / 19px 19px;
	mask-image: linear-gradient(100deg, transparent 5%, #0009 60%, #000);
}
.hero :focus-visible { outline-color: var(--bright); }
.hero h1 { max-width: 25ch; font-size: clamp(1.65rem, 3.5vw, 2.85rem); font-weight: 850; line-height: 1.06; letter-spacing: -.048em; }
.hero-description { max-width: 53ch; margin-top: .43rem; color: #c4d5db; font-size: .92rem; line-height: 1.45; }
.ip-panel {
	position: relative;
	min-width: 0;
	padding: .7rem .85rem;
	border: 1px solid #43616c;
	border-radius: 1.03rem;
	background: #192f3a;
}
.ip-panel-title { display: flex; align-items: center; gap: .4rem; margin-bottom: .25rem; color: #d2e7e8; font-size: .82rem; font-weight: 730; }
.ip-panel-title svg { width: 1rem; height: 1rem; color: var(--bright); }
.ip-data { min-width: 0; padding: .95rem 1rem; border: 1px solid #34505c; border-radius: .7rem; background: #10252f; }
.ip-label { color: #bdcfd5; font-size: .8rem; }
.ip-value {
	display: block;
	min-height: 1.3em;
	margin-block: .12rem .15rem;
	color: var(--bright);
	font: 650 clamp(1.65rem, 3.1vw, 2.65rem)/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
	overflow-wrap: anywhere;
}
.ip-note { color: #bdcfd5; font-size: .82rem; }
.hero .ip-data { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 0; gap: .15rem .55rem; border: 0; background: transparent; }
.hero .ip-data > .ip-label, .hero .ip-data > .ip-note, .hero .ip-data > noscript { grid-column: 1 / -1; }
.hero .ipon-ip-label { position: absolute; inset: .58rem .85rem auto auto; }
.hero .ipon-ip-label .ip-label, .hero .ip-data > .ip-note:not(.ipon-ip-status) { display: none; }
.hero .ip-data .ip-value { margin: 0; font-size: clamp(1.22rem, 2.45vw, 2.15rem); }
.hero .ipon-ip-actions { min-height: 0; justify-content: end; }
.hero .ipon-ip-actions button { padding: .28rem .55rem; min-height: 40px; font-size: .76rem; }
.hero .ipon-ip-status { min-height: 0; margin-block: 0; }
.hero .ipon-ip-status:empty { margin: 0; }

.catalog { margin-top: clamp(1.05rem, 2.4vw, 1.75rem); }
.guides, .home-editorial { margin-top: clamp(2.15rem, 4.4vw, 3.7rem); }
.section-heading { display: flex; justify-content: space-between; gap: 1.2rem; align-items: end; margin-bottom: 1.25rem; }
.section-heading h2 { color: var(--ink); font-size: clamp(1.82rem, 3.25vw, 2.7rem); font-weight: 850; letter-spacing: -.045em; }
.section-heading p { margin-top: .45rem; color: var(--muted); }
.catalog .section-heading { align-items: center; gap: .65rem; margin-bottom: .65rem; }
.catalog .section-heading h2 { font-size: clamp(1.46rem, 2.95vw, 2.25rem); }
.catalog-search { display: flex; align-items: center; gap: .58rem; min-width: 240px; min-height: 46px; padding-inline: .85rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); }
.catalog-search:focus-within { border-color: var(--focus); }
.catalog-search svg { color: var(--muted); }
.catalog-search input { width: 100%; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: .91rem; }
.catalog-search input:focus-visible { outline: none; }
.category-filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.15rem; }
.category-filters button {
	min-height: 44px;
	padding: .38rem .9rem;
	border: 1px solid var(--line);
	border-radius: .65rem;
	background: var(--surface);
	color: var(--muted);
	font-size: .86rem;
	font-weight: 720;
	text-align: start;
}
.category-filters button:hover { color: var(--ink); border-color: #98b7ac; }
.category-filters button[aria-pressed="true"] { color: #fff; background: var(--dark); border-color: var(--dark); }
.tool-grid, .article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.tool-grid { margin: 0; padding: 0; list-style: none; }
.tool-card, .article-card {
	position: relative;
	min-width: 0;
	padding: 1.13rem 1.2rem;
	border: 1px solid var(--line);
	border-radius: .88rem;
	background: var(--surface);
}
.tool-active:hover, .tool-active:focus-within { border-color: #7cb3a3; background: #fbfefd; }
.tool-card-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .8rem; }
.tool-icon { display: inline-grid; place-items: center; width: 41px; height: 41px; border-radius: .7rem; background: #e2f6ef; color: #126452; }
.tool-icon.theme-domain { background: #e9f0fe; color: #305796; }
.tool-icon.theme-useful { background: #f0ebfa; color: #614584; }
.tool-state { color: #536571; font-size: .73rem; font-weight: 650; line-height: 1.25; padding: .29rem .53rem; border-radius: .35rem; background: #eff3f5; }
.tool-arrow { color: var(--accent); }
.tool-card h3, .article-card-title { font-size: 1.12rem; letter-spacing: -.022em; overflow-wrap: anywhere; }
.tool-card h3 a, .article-card-title a { color: var(--ink); text-decoration: none; }
.tool-card h3 a:hover, .article-card-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.tool-active h3 a::after { position: absolute; inset: 0; content: ""; border-radius: .88rem; }
.tool-card p, .article-card p { margin-top: .48rem; color: var(--muted); font-size: .9rem; }
.empty-state { padding: 1.3rem; border: 1px dashed #b5c4c9; border-radius: .85rem; color: var(--muted); }
.empty-state button { margin-top: .7rem; }
.text-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 750; text-underline-offset: .24em; }
.article-card { padding: 0; overflow: hidden; }
.article-card:hover { border-color: #93b9ad; }
.article-card-body { display: grid; gap: .58rem; padding: 1.05rem; }
.article-card p { margin: 0; }
.article-cover { display: block; aspect-ratio: 16 / 9; background: #e5edee; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .28rem .65rem; color: var(--muted); font-size: .8rem; }
.article-meta a { color: var(--accent); font-weight: 750; text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }
.article-meta time { font-variant-numeric: tabular-nums; }
.article-card-title { font-size: 1.17rem; line-height: 1.24; }
.guide-topics ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .85rem 0 0; }
.guide-topics a { display: inline-flex; align-items: center; min-height: 38px; padding: .26rem .7rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); font-size: .85rem; font-weight: 700; text-decoration: none; }
.guide-topics a:hover, .guide-topics a[aria-current="page"] { border-color: #84bdae; background: #e9f7f0; }
.entry-image img { border-radius: .65rem; }

.interior-shell { min-height: 59vh; padding-block: 1.6rem 4.3rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin: 0 0 1rem; padding: 0; list-style: none; color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.crumbs li + li::before { content: "/"; margin-right: .6rem; color: #70808a; }
.crumbs a { color: var(--accent); text-underline-offset: .2em; }
.sub-hero { padding: clamp(1.25rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 1.22rem; background: var(--surface); }
.sub-hero h1 { margin-top: .15rem; font-size: clamp(2rem, 5vw, 3.65rem); font-weight: 850; letter-spacing: -.055em; overflow-wrap: anywhere; }
.sub-hero :is(time, p), .archive-description { color: var(--muted); }
.sub-hero h1 + p, .archive-description { max-width: 65ch; margin-top: .75rem; }
.sub-hero time, .sub-kicker { display: block; font-weight: 700; font-size: .85rem; }
.sub-hero .tool-icon { margin-bottom: .65rem; }
.missing-page .button-secondary { margin-top: 1rem; }
.listing-hero { margin-bottom: 1.1rem; }
.prose {
	--prose-width: 76ch;
	overflow-wrap: anywhere;
}
.prose > :where(p, ul, ol, blockquote, pre, figure, .wp-block-table) { margin-block: 0 1.05rem; }
.prose > :where(h2,h3,h4) { margin-block: 1.65rem .6rem; }
.prose > :first-child { margin-top: 0; }
.prose :where(a) { text-underline-offset: .2em; }
.prose :where(pre, .wp-block-table) { max-width: 100%; overflow: auto; }
.prose :where(pre, blockquote) { padding: .9rem 1rem; border-radius: .55rem; background: #edf2f4; }
.prose pre { overflow-wrap: normal; }
.prose table { border-collapse: collapse; }
.prose :where(td, th) { padding: .5rem .65rem; border: 1px solid var(--line); }
.prose :where(input:not([type="checkbox"],[type="radio"]), select, textarea), .site-search input {
	max-width: 100%;
	min-height: 44px;
	padding: .47rem .7rem;
	border: 1px solid #bfcdd1;
	border-radius: .55rem;
	color: var(--ink);
	background: var(--surface);
}
.prose iframe { max-width: 100%; }
.editorial-body { max-width: var(--prose-width); }
.tool-body, .editorial-body, .comments, .home-editorial {
	margin-top: 1.1rem;
	padding: clamp(1rem, 3.5vw, 2.45rem);
	border: 1px solid var(--line);
	border-radius: 1rem;
	background: var(--surface);
}
.home-editorial { margin-top: clamp(2.5rem, 5vw, 4.15rem); }
.related-tools { margin-top: 2rem; }
.related-tools ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .8rem; list-style: none; padding: 0; }
.related-tools a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); font-weight: 700; text-decoration: none; }
.related-tools a:hover { border-color: #7cb3a3; text-decoration: underline; }
.site-search { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.site-search label { min-width: min(100%, 200px); }
.site-search input { width: 100%; }
.pagination { margin-top: 1.3rem; }
.pagination .page-numbers { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; margin: .2rem; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: .52rem; color: var(--accent); background: var(--surface); }
.pagination .current { color: #fff; background: var(--dark); }
.comment-list { padding-inline-start: 1.4rem; }
.comment-list .children { padding-inline-start: 1rem; }
.comment-respond input[type="submit"] { font-weight: 700; cursor: pointer; }
.ipon-contact { display: grid; gap: .8rem; }
.contact-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .7rem; }
.ipon-contact label { display: grid; gap: .28rem; min-width: 0; font-weight: 720; }
.ipon-contact :is(input, select, textarea) { width: 100%; }
.ipon-contact textarea { resize: vertical; }
.ipon-contact p { color: var(--muted); font-size: .87rem; }
.ipon-contact button { justify-self: start; background: var(--accent); border-color: var(--accent); color: #fff; }
.ipon-contact button:hover { background: #064c40; color: #fff; }
.contact-feedback { padding: .7rem .85rem; border: 1px solid #b5d4c9; border-radius: .55rem; background: #edf8f4; }

.site-footer { color: #c9d9de; background: #10252f; border-top: 3px solid #6fd4b7; }
.site-footer :focus-visible { outline-color: var(--bright); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr .85fr; gap: 1.4rem; padding-block: 2rem 1.55rem; font-size: .9rem; }
.brand-footer { color: #f5fbfb; font-size: 1.45rem; }
.footer-brand p { max-width: 29ch; margin-top: .6rem; }
.footer-group h2 { margin-bottom: .55rem; font-size: .94rem; color: #f5fbfb; }
.footer-group ul { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.footer-group a, .footer-base a { color: #c9d9de; text-decoration: none; }
.footer-group a:hover, .footer-base a:hover { color: var(--bright); text-decoration: underline; text-underline-offset: .2em; }
.footer-base { display: flex; justify-content: space-between; gap: .6rem; padding-block: .85rem; border-top: 1px solid #35515b; font-size: .83rem; }

@media (min-width: 656px) and (max-width: 960px) {
	.header-inner { gap: .75rem; }
	.site-nav { padding-block: .3rem; }
	.header-topics ul { justify-content: flex-end; padding-inline-start: 0; border: 0; }
	.header-topics a { min-height: 38px; }
}
@media (max-width: 860px) {
	.tool-grid, .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	body.admin-bar { --wp-admin-offset: 46px; }
}
@media (max-width: 655px) {
	.shell { width: calc(100% - 30px); }
	.header-inner { min-height: 61px; gap: .5rem; flex-wrap: wrap; padding-block: .5rem; }
	.brand { margin-inline-end: auto; font-size: 1.27rem; max-width: 100%; }
	.brand-icon { width: 32px; height: 32px; flex-basis: 32px; }
	.site-nav { display: block; order: 4; width: 100%; margin: 0; border-top: 1px solid var(--line); }
	.site-nav .nav-list { gap: 0 .85rem; align-items: stretch; flex-direction: column; padding-block: .2rem; }
	.site-nav .nav-list a { width: 100%; }
	.header-topics { padding-block: .55rem .3rem; border-top: 1px solid var(--line); }
	.header-topics-label { display: block; margin: 0 0 .3rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
	.header-topics ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; padding: 0; border: 0; }
	.header-topics a { width: 100%; padding: .35rem .55rem; border-radius: .4rem; background: var(--canvas); }
	.menu-toggle { padding-inline: .58rem; }
	.menu-toggle svg { width: 1.05rem; height: 1.05rem; }
	.header-cta { padding-inline: .57rem; }
	.header-cta svg { display: none; }
	.home-shell { padding-block: .7rem 2.7rem; }
	.hero { grid-template-columns: minmax(0, 1fr); gap: .58rem; padding: .85rem; border-radius: .9rem; }
	.hero h1 { font-size: clamp(1.62rem, 6.7vw, 2.15rem); }
	.hero-description { margin-top: .35rem; font-size: .83rem; }
	.hero .ip-data .ip-value { font-size: clamp(1rem, 4.6vw, 1.55rem); }
	.hero::before { inset: 0; mask-image: linear-gradient(115deg, transparent 22%, #000); }
	.section-heading { align-items: stretch; flex-direction: column; gap: .8rem; }
	.catalog-search { min-width: 0; }
	.catalog .section-heading { align-items: stretch; }
	.category-filters { gap: .33rem; margin-bottom: .7rem; }
	.category-filters button { min-height: 40px; font-size: .75rem; padding-inline: .52rem; }
	.footer-inner { gap: 1rem; }
	.footer-brand { grid-column: 1 / -1; }
	.footer-group a { display: inline-flex; align-items: center; min-height: 32px; }
}
@media (max-width: 445px) {
	.category-filters { flex-wrap: nowrap; overflow-x: auto; padding-block: .18rem .25rem; }
	.category-filters button { flex: none; white-space: nowrap; }
	.category-filters button:focus-visible { outline-offset: -3px; }
	.tool-grid { gap: .55rem; }
	.article-grid { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
	.tool-card { padding: .66rem .62rem; }
	.tool-card h3 { font-size: .96rem; }
	.tool-card p { font-size: .78rem; line-height: 1.37; }
	.tool-card-top { margin-bottom: .36rem; }
	.tool-icon { width: 34px; height: 34px; }
}
@media (max-width: 375px) {
	.header-inner { gap: .35rem; }
	.brand { gap: .36rem; }
	.brand-icon { width: 30px; height: 30px; flex-basis: 30px; }
	.menu-toggle { width: 44px; padding: 0; }
	.menu-toggle span, .hero-description { display: none; }
	.hero { padding: .62rem; }
	.hero h1 { font-size: 1.56rem; }
	.ip-panel { padding: .5rem .62rem; }
	.catalog { margin-top: .8rem; }
	.catalog .section-heading { display: grid; grid-template-columns: 1fr minmax(88px, .85fr); align-items: center; }
	.catalog .section-heading h2 { font-size: 1.2rem; }
	.catalog-search { padding-inline: .45rem; gap: .28rem; }
	.catalog-search svg { width: 1rem; }
}
