/*
Theme Name: Digital Latest News
Theme URI: https://digitallatestnews.com/
Author: Digital Latest News
Description: A fast, modern news and tech magazine theme with a built-in AI tools directory, free browser-based calculators and a guest post (Write For Us) submission form. Light and dark mode, no jQuery, no external fonts.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digitallatestnews
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, dark-mode
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #0a0f1f;
	--ink-2: #1a2347;
	--text: #1c2540;
	--muted: #5b6585;
	--line: #e3e7f2;
	--bg: #ffffff;
	--soft: #f4f6fb;
	--card: #ffffff;
	--accent: #ff4d2e;
	--accent-ink: #d93515;
	--blue: #2f6bff;
	--ok: #0e8f5a;
	--err: #c0392b;
	--shadow: 0 1px 2px rgba(10, 15, 31, .05), 0 8px 24px rgba(10, 15, 31, .06);
	--radius: 14px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans Devanagari", "Noto Sans Telugu", Arial, sans-serif;
	--max: 1200px;
}
html[data-theme="dark"] {
	--ink: #f2f5ff;
	--ink-2: #cfd8ff;
	--text: #d6dcf2;
	--muted: #96a0c4;
	--line: #263055;
	--bg: #0a0f1f;
	--soft: #111936;
	--card: #0f1630;
	--accent: #ff6a4d;
	--accent-ink: #ff8a73;
	--blue: #7aa2ff;
	--ok: #3ddc97;
	--err: #ff8a7a;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .9rem; }
.section { padding-top: 36px; padding-bottom: 12px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .4em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 70ch; }
.center .lead { margin-inline: auto; }
.page-head { margin-bottom: 26px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 5px 0; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.brand { flex: none; display: flex; align-items: center; }
.dln-logo { display: inline-flex; line-height: 0; }
.dln-logo img { height: 40px; width: auto; }
.dln-logo .logo-dark { display: none; }
html[data-theme="dark"] .dln-logo .logo-light { display: none; }
html[data-theme="dark"] .dln-logo .logo-dark { display: block; }
.custom-logo { max-height: 44px; width: auto; }
.primary { margin-left: auto; }
.primary .menu, .foot-menu { list-style: none; margin: 0; padding: 0; }
.primary .menu { display: flex; flex-wrap: wrap; gap: 2px; }
.primary a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.primary a:hover, .primary .current-menu-item > a { background: var(--soft); color: var(--accent-ink); }
.primary .menu-item { position: relative; }
.primary .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; list-style: none; margin: 0; }
.primary .menu-item:hover > .sub-menu, .primary .menu-item:focus-within > .sub-menu { display: block; }
.tools { display: flex; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.menu-btn { display: none; }
.i-sun { display: none; }
html[data-theme="dark"] .i-sun { display: block; }
html[data-theme="dark"] .i-moon { display: none; }
.search-panel { border-top: 1px solid var(--line); padding: 14px 0; background: var(--bg); }
.ticker { border-top: 1px solid var(--line); background: var(--ink); color: #fff; font-size: .86rem; }
html[data-theme="dark"] .ticker { background: var(--soft); }
.ticker .wrap { display: flex; align-items: center; gap: 14px; min-height: 36px; overflow: hidden; }
.ticker-tag { flex: none; display: inline-flex; align-items: center; gap: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--accent); }
.ticker-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.ticker-list { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.ticker-list::-webkit-scrollbar { display: none; }
.ticker-list a { color: #e6ebff; text-decoration: none; }
.ticker-list a:hover { color: #fff; text-decoration: underline; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 46, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 77, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 46, 0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }

/* ---------- Buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; transition: transform .12s, background .12s; }
.btn:hover { background: var(--soft); color: var(--ink); transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-2); color: var(--bg); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }
.btn-block { display: flex; width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--soft); color: var(--accent-ink); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; }
a.chip:hover { border-color: var(--accent); }
.chips .chip { text-transform: none; font-size: .88rem; padding: 7px 14px; letter-spacing: 0; color: var(--text); background: var(--soft); }
.chips .chip.on { background: var(--ink); color: var(--bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .76rem; font-weight: 700; }
.badge-hot { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.more { font-weight: 700; font-size: .92rem; text-decoration: none; }

/* ---------- Section heads ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--soft); margin-bottom: 12px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; display: block; }
.card:hover .card-media img { transform: scale(1.04); }
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, hsl(var(--h) 70% 38%), hsl(calc(var(--h) + 50) 70% 22%)); color: rgba(255, 255, 255, .85); font-size: 3rem; font-weight: 800; }
.card-title { font-size: 1.12rem; margin: 8px 0 6px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent-ink); }
.card-excerpt { color: var(--muted); font-size: .94rem; margin-bottom: 8px; }
.meta { color: var(--muted); font-size: .85rem; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.meta a { color: inherit; }
.card-wide .card-title { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.card-wide .card-media { aspect-ratio: 16 / 9; }
.card-compact { flex-direction: row; gap: 14px; align-items: flex-start; }
.card-compact .card-media { flex: none; width: 128px; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; }
.card-compact .card-title { font-size: 1rem; margin-top: 4px; }
.card-compact .ph { font-size: 1.6rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 30px; padding-top: 28px; }
.hero-side { display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--line); padding-left: 28px; }
.pagination, .navigation.pagination { margin: 34px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination a, .pagination span.page-numbers, .page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
a.page-numbers:hover { background: var(--soft); }

/* ---------- AI tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.tool-card[hidden] { display: none; }
.tool-link { position: absolute; inset: 0; border-radius: var(--radius); z-index: 1; }
.tool-head { display: flex; gap: 12px; align-items: center; }
.tool-name { margin: 0; font-size: 1.05rem; }
.tool-cat { margin: 0; color: var(--muted); font-size: .8rem; }
.tool-head .badge { margin-left: auto; align-self: flex-start; font-size: .68rem; padding: 2px 8px; white-space: nowrap; }
.tool-tag { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.tool-foot { display: flex; justify-content: space-between; align-items: center; margin: 0; }
.lm { flex: none; display: inline-grid; place-items: center; border-radius: 12px; color: #fff; font-weight: 800; background: linear-gradient(135deg, hsl(var(--h, 220) 70% 48%), hsl(calc(var(--h, 220) + 40) 75% 34%)); overflow: hidden; }
.lm-md { width: 48px; height: 48px; font-size: 1.3rem; }
.lm-lg { width: 88px; height: 88px; font-size: 2.4rem; border-radius: 20px; }
.lm.img img { width: 100%; height: 100%; object-fit: cover; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.finder { display: flex; gap: 8px; }
.note { margin-top: 30px; padding: 16px 18px; border-radius: var(--radius); background: var(--soft); color: var(--muted); }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }

/* ---------- Single tool ---------- */
.tool-hero { display: flex; gap: 22px; align-items: center; margin: 12px 0 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.tool-hero h1 { margin-bottom: .2em; }
.tool-layout, .wfu-layout, .calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.facts, .calc-side, .wfu-side { background: var(--soft); border-radius: var(--radius); padding: 20px; position: sticky; top: 130px; }
.facts h2, .calc-side h2, .wfu-side h2 { font-size: 1.05rem; }
.facts dl { margin: 0 0 14px; }
.facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pros, .cons, .ticks { list-style: none; padding: 0; margin: 0; }
.pros li, .cons li, .ticks li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.pros li::before, .ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.cons li::before { content: "–"; position: absolute; left: 4px; color: var(--err); font-weight: 800; }
.disclaimer { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; margin-top: 28px; }

/* ---------- Articles ---------- */
.article { max-width: 860px; }
.article.tool-single { max-width: var(--max); }
.article-head { margin-bottom: 18px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.avatar { border-radius: 50%; vertical-align: middle; }
.article-img { margin: 0 0 26px; }
.article-img img { width: 100%; border-radius: var(--radius); display: block; }
.prose { font-size: 1.08rem; line-height: 1.8; min-width: 0; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: 10px; }
.prose blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.2em; border-left: 4px solid var(--accent); color: var(--ink); font-size: 1.15rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--soft); }
.prose pre { background: var(--ink); color: #e6ebff; padding: 16px; border-radius: 12px; overflow: auto; font-size: .9rem; }
html[data-theme="dark"] .prose pre { background: #060a18; }
.prose :not(pre) > code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .86rem; color: var(--muted); }
.article-foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 11px; border-radius: 999px; background: var(--soft); font-size: .85rem; text-decoration: none; color: var(--text); }
.share { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.share a { font-weight: 600; text-decoration: none; }
.author-box { display: flex; gap: 16px; padding: 18px; background: var(--soft); border-radius: var(--radius); margin-top: 20px; }
.author-name { font-weight: 700; margin: 0 0 4px; }
.comments { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond input[type=url], .comment-respond textarea { width: 100%; }

/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=url], input[type=search], input[type=number], input[type=date], select, textarea {
	width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: .98rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid color-mix(in srgb, var(--blue) 25%, transparent); outline-offset: 0; }
label { font-weight: 600; font-size: .92rem; color: var(--ink); display: block; margin-bottom: 5px; }
.search-form { display: flex; gap: 8px; max-width: 640px; }
.search-form input { flex: 1; }
.finder input { min-width: 200px; }
.dln-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.dln-form p { margin: 0 0 16px; }
.dln-form .check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.dln-form .check input { margin-top: 5px; width: auto; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card { margin-top: 40px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); max-width: 860px; }
.notice { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.notice-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.notice-err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }

/* ---------- Calculators ---------- */
.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.calc-group { margin-bottom: 34px; }
.calc-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--muted); font-size: .92rem; transition: transform .15s, box-shadow .15s; }
.calc-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--muted); }
.calc-tile strong { color: var(--ink); font-size: 1.04rem; }
.calc-ico { font-size: 1.7rem; line-height: 1; }
.dln-calc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.dln-calc:not(.ready) { min-height: 200px; }
.calc-form .field { margin: 0 0 16px; }
.calc-form small { display: block; color: var(--muted); margin-top: 4px; font-size: .82rem; }
.calc-actions { display: flex; gap: 10px; margin: 6px 0 0; }
.calc-out { margin-top: 22px; padding: 20px; border-radius: 14px; background: var(--soft); }
.calc-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.calc-head span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.calc-head strong { font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--ink); letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.calc-rows { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.calc-rows dt { color: var(--muted); }
.calc-rows dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.calc-note, .calc-empty { color: var(--muted); font-size: .86rem; margin: 14px 0 0; }

/* ---------- CTA ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: 30px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 90% 0%, rgba(255, 77, 46, .35), transparent 50%), linear-gradient(135deg, #16225a, #0a0f1f); }
.cta h2 { color: #fff; margin-bottom: .2em; }
.cta p { margin: 0; color: #cfd8ff; max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 60px; background: var(--ink); color: #c9d3f5; padding-top: 48px; }
html[data-theme="dark"] .site-footer { background: #060a18; }
.site-footer h2, .site-footer a { color: #fff; }
.site-footer a { text-decoration: none; opacity: .88; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; }
.foot-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #8f9bd0 !important; }
.foot-menu li { padding: 4px 0; list-style: none; }
.foot-menu, .foot-grid ul { padding: 0; margin: 0; }
.foot-grid li { list-style: none; padding: 4px 0; }
.brand-footer { background: #fff; display: inline-flex; padding: 8px 12px; border-radius: 12px; margin-bottom: 14px; }
.brand-footer .logo-light { display: block !important; }
.brand-footer .logo-dark { display: none !important; }
.social { display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 14px 0 0; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 34px; padding: 18px 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
.foot-bottom p { margin: 0; }
.site-footer .muted { color: #8f9bd0; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); z-index: 40; }
.to-top[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.hero { grid-template-columns: 1fr; }
	.hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
	.grid, .grid-3, .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tool-layout, .wfu-layout, .calc-layout { grid-template-columns: 1fr; }
	.facts, .calc-side, .wfu-side { position: static; }
	.foot-grid { grid-template-columns: 1fr 1fr; }
	.menu-btn { display: inline-grid; }
	.primary { position: fixed; inset: 66px 0 auto 0; margin: 0; max-height: calc(100vh - 66px); overflow-y: auto; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 20px; display: none; box-shadow: var(--shadow); }
	.primary.open { display: block; }
	.primary .menu { flex-direction: column; }
	.primary a { padding: 12px; font-size: 1.05rem; }
	.primary .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding-left: 14px; }
	.tools { margin-left: auto; }
}
@media (max-width: 600px) {
	.wrap { padding: 0 16px; }
	.grid, .grid-3, .calc-grid, .tool-grid, .proscons, .dln-form .grid-2 { grid-template-columns: 1fr; }
	.foot-grid { grid-template-columns: 1fr; }
	.card-compact .card-media { width: 104px; }
	.tool-hero { flex-direction: column; align-items: flex-start; }
	.finder { width: 100%; flex-wrap: wrap; }
	.finder input, .finder select { flex: 1 1 100%; min-width: 0; }
	.form-card, .dln-calc { padding: 18px; }
	.dln-logo img { height: 34px; }
	.search-form { flex-direction: column; }
}

/* ---------- v1.1: layout with sidebar, widgets, table of contents ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 44px; align-items: start; }
.layout .article { max-width: none; }
.main-col { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sidebar { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; min-width: 0; }
.widget-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--text); text-decoration: none; font-weight: 500; }
.widget a:hover { color: var(--accent-ink); }
.widget .search-form { flex-direction: column; }
.widget .post-date { display: block; color: var(--muted); font-size: .8rem; }
.widget .count, .widget li .count { color: var(--muted); }
.widget select { width: 100%; }
.widget-more { margin: 10px 0 0; font-size: .9rem; font-weight: 700; }
.widget-more a { color: var(--blue); }
.mini-list li { padding: 0; }
.mini-list a { display: flex; gap: 11px; align-items: center; padding: 9px 0; }
.mini-list strong { display: block; color: var(--ink); font-size: .95rem; line-height: 1.25; }
.mini-list small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 2px; }
.lm-sm { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 10px; }
.calc-ico-sm { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-size: 1.15rem; }
.widget_dln_cta { background: transparent; border: 0; padding: 0; }
.cta-box { padding: 22px; border-radius: var(--radius); color: #fff; background: radial-gradient(circle at 90% 0%, rgba(255, 77, 46, .35), transparent 55%), linear-gradient(135deg, #16225a, #0a0f1f); }
.cta-box .widget-title { color: #fff; border-bottom-color: rgba(255, 255, 255, .25); }
.cta-box p { color: #cfd8ff; font-size: .95rem; }
.cta-box .btn-accent { color: #fff; }

/* Table of contents */
.toc { margin: 0 0 2em; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--soft); font-size: .98rem; line-height: 1.5; }
.toc summary { cursor: pointer; padding: 14px 18px; font-weight: 800; color: var(--ink); font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.toc details:not([open]) summary::after { transform: rotate(-90deg); }
.toc ol { margin: 0; padding: 0 18px 14px 40px; }
.toc ol ol { padding: 4px 0 4px 20px; list-style: lower-alpha; }
.toc li { padding: 4px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--accent-ink); }
.toc a.active { font-weight: 700; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 140px; }

/* Footer widgets */
.site-footer .widget { background: transparent; border: 0; padding: 0; }
.site-footer .widget-title { color: #8f9bd0; border-bottom: 0; padding-bottom: 0; }
.site-footer .widget li { border-bottom: 0; padding: 4px 0; }
.site-footer .widget a { color: #fff; opacity: .88; }
.site-footer .widget, .site-footer .widget p { color: #c9d3f5; }
.site-footer .widget select, .site-footer .widget input[type=search], .site-footer .widget input[type=text], .site-footer .widget input[type=email] { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }

@media (max-width: 960px) {
	.layout { grid-template-columns: 1fr; gap: 30px; }
	.sidebar { position: static; }
}
@media (max-width: 600px) {
	.grid-2 { grid-template-columns: 1fr; }
}
