/*
Theme Name: DDoS Runbook
Theme URI: https://www.ddosrunbook.com/
Author: DDoS Runbook Editorial Team
Description: Independent operational notes for DDoS, CC, WAF, origin protection, and incident review.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: ddosrunbook
*/

:root {
	--night: #111217;
	--night-2: #1b1c22;
	--night-3: #25262e;
	--cream: #f4eee3;
	--cream-2: #e7ddcd;
	--amber: #f4a340;
	--amber-2: #ffc56d;
	--red: #df5c47;
	--muted: #aaa294;
	--line: #3a3734;
	--shell: min(1160px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	color: var(--cream);
	background: var(--night);
	font-family: "IBM Plex Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
	font-size: 17px;
	line-height: 1.75;
}
a { color: var(--amber-2); text-underline-offset: .2em; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
.shell { width: var(--shell); margin-inline: auto; }
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 1000; width: auto; height: auto; padding: 10px 16px; clip: auto; background: #fff; color: #111; }

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	border-bottom: 1px solid #302e2b;
	background: rgba(17,18,23,.94);
	backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { color: var(--cream); font: 750 18px/1.1 ui-monospace, monospace; letter-spacing: -.02em; text-decoration: none; }
.brand span { color: var(--amber); }
.nav-list { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.nav-list a { color: #c6bcae; font: 600 13px/1.2 ui-monospace, monospace; text-decoration: none; }
.nav-list a:hover, .current-menu-item > a { color: var(--amber); }
.header-cta, .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--amber);
	border-radius: 3px;
	color: #17130e;
	background: var(--amber);
	font: 750 14px/1.2 inherit;
	text-decoration: none;
}
.header-cta:hover, .button:hover { color: #111; background: var(--amber-2); }
.button--ghost { color: var(--cream); background: transparent; border-color: #625b52; }
.button--ghost:hover { color: #111; background: var(--cream); border-color: var(--cream); }

.hero {
	position: relative;
	overflow: hidden;
	padding: clamp(76px,10vw,142px) 0 90px;
	background:
		linear-gradient(90deg,transparent 49.9%,rgba(244,163,64,.08) 50%,transparent 50.1%),
		linear-gradient(0deg,transparent 49.9%,rgba(244,163,64,.08) 50%,transparent 50.1%),
		var(--night);
	background-size: 72px 72px;
}
.hero::after {
	content: "RUNBOOK / 01";
	position: absolute;
	right: -20px;
	bottom: -36px;
	color: rgba(244,163,64,.06);
	font: 900 clamp(90px,18vw,240px)/1 ui-monospace, monospace;
	white-space: nowrap;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.4fr) 320px; gap: 70px; align-items: end; }
.eyebrow { margin: 0 0 18px; color: var(--amber); font: 750 12px/1.3 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(48px,7.6vw,96px); line-height: .96; letter-spacing: -.065em; }
.hero h1 em { color: var(--amber); font-style: normal; }
.hero-lead { max-width: 730px; margin: 30px 0; color: var(--muted); font-size: clamp(18px,2.2vw,22px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.status-panel { padding: 24px; border: 1px solid #514a41; background: rgba(27,28,34,.92); }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid #37332e; font: 600 13px/1.3 ui-monospace, monospace; }
.status-line:last-child { border-bottom: 0; }
.status-line b { color: var(--amber); font-size: 11px; letter-spacing: .08em; }

.section { padding: clamp(64px,8vw,112px) 0; }
.section--paper { color: #211f1c; background: var(--cream); }
.section--paper a { color: #9a5515; }
.section--dark { background: var(--night-2); }
.section-head { display: grid; grid-template-columns: 1fr 420px; gap: 50px; align-items: end; margin-bottom: 42px; }
.section-head h2 { margin: 0; font-size: clamp(34px,5vw,60px); line-height: 1.03; letter-spacing: -.05em; }
.section-head p { margin: 0; color: var(--muted); }
.section--paper .section-head p { color: #685f53; }

.runbook-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: #3b3730; border: 1px solid #3b3730; }
.runbook-card { min-height: 260px; padding: 28px; background: var(--night-2); }
.runbook-card .num { color: var(--amber); font: 750 12px/1 ui-monospace, monospace; }
.runbook-card h3 { margin: 54px 0 12px; font-size: 24px; line-height: 1.25; }
.runbook-card h3 a { color: var(--cream); text-decoration: none; }
.runbook-card p { margin: 0; color: var(--muted); font-size: 15px; }

.post-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 120px 1fr 120px; gap: 24px; align-items: center; padding: 24px 26px; background: var(--night); }
.post-row .meta { color: var(--muted); font: 600 12px/1.4 ui-monospace, monospace; }
.post-row h2, .post-row h3 { margin: 0; font-size: 22px; line-height: 1.3; }
.post-row h2 a, .post-row h3 a { color: var(--cream); text-decoration: none; }
.post-row .more { text-align: right; color: var(--amber); font: 650 12px/1.2 ui-monospace, monospace; text-decoration: none; }
.section--paper .post-list { background: #cabfae; border-color: #cabfae; }
.section--paper .post-row { background: #fffaf0; }
.section--paper .post-row h2 a, .section--paper .post-row h3 a { color: #211f1c; }
.section--paper .post-row .meta { color: #756b5e; }

.cta-band { padding: clamp(62px,8vw,104px) 0; color: #1d1913; background: var(--amber); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.cta-inner h2 { max-width: 760px; margin: 0; font-size: clamp(34px,5vw,60px); line-height: 1.04; letter-spacing: -.045em; }
.cta-inner p { max-width: 650px; margin-bottom: 0; }
.cta-band .button { color: #fff; background: #17130e; border-color: #17130e; }

.page-hero { padding: clamp(60px,8vw,108px) 0 64px; border-bottom: 1px solid #302e2b; background: var(--night); }
.page-hero h1 { max-width: 960px; margin: 0; font-size: clamp(42px,6vw,76px); line-height: 1.02; letter-spacing: -.06em; }
.page-hero__lead { max-width: 780px; color: var(--muted); font-size: 20px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; color: #8f877c; font: 600 12px/1.4 ui-monospace, monospace; }
.breadcrumbs a { color: var(--amber); text-decoration: none; }
.article-meta { margin-top: 24px; color: #8f877c; font: 600 12px/1.4 ui-monospace, monospace; }
.content-layout { display: grid; grid-template-columns: minmax(0,760px) 280px; gap: 72px; align-items: start; }
.prose { color: #d7cec1; }
.prose h2 { margin-top: 2.1em; color: var(--cream); font-size: 31px; line-height: 1.28; letter-spacing: -.025em; }
.prose h3 { margin-top: 1.8em; color: var(--cream); font-size: 22px; }
.prose table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 15px; }
.prose th, .prose td { padding: 12px; border: 1px solid #45413b; text-align: left; vertical-align: top; }
.prose th { color: var(--amber-2); background: #25252c; }
.prose blockquote { margin: 30px 0; padding: 20px 24px; border-left: 4px solid var(--amber); background: #222229; }
.aside-box { position: sticky; top: 100px; padding: 24px; border: 1px solid #48443e; background: #1b1c22; }
.aside-box h2 { margin-top: 0; color: var(--cream); font-size: 22px; }

.site-footer { padding: 60px 0 28px; color: #cfc4b4; background: #090a0d; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; }
.footer-brand { color: var(--amber); font: 800 24px/1.2 ui-monospace, monospace; text-decoration: none; }
.site-footer p, .site-footer a { color: #8d857a; }
.site-footer a { text-decoration: none; }
.site-footer nav { display: grid; gap: 9px; }
.site-footer h2 { margin: 0 0 14px; color: #eee6da; font: 700 12px/1.3 ui-monospace, monospace; letter-spacing: .1em; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid #25262c; font-size: 13px; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { padding: 8px 12px; border: 1px solid #48443e; text-decoration: none; }
.pagination .current { color: #111; background: var(--amber); }
.incident-tool {
	padding: clamp(24px,4vw,38px);
	border: 1px solid #48443e;
	background: #1b1c22;
}
.incident-tool__grid {
	display: grid;
	grid-template-columns: repeat(3,minmax(0,1fr));
	gap: 16px;
}
.incident-tool label { display: grid; gap: 7px; color: #d8cfc2; font: 650 14px/1.4 ui-monospace, monospace; }
.incident-tool label span { color: #938b80; font-size: 11px; }
.incident-tool__wide { grid-column: 1 / -1; }
.incident-tool input, .incident-tool textarea {
	width: 100%;
	padding: 12px 13px;
	border: 1px solid #59534a;
	border-radius: 3px;
	color: var(--cream);
	background: #111217;
	font: 500 16px/1.5 "IBM Plex Sans", "Noto Sans SC", sans-serif;
}
.incident-tool textarea { resize: vertical; }
.incident-tool__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.incident-tool__output {
	max-height: 520px;
	overflow: auto;
	padding: 20px;
	border: 1px solid #49443c;
	color: #e8dfd3;
	background: #0c0d11;
	font: 14px/1.65 ui-monospace, monospace;
	white-space: pre-wrap;
}
.calculator__note { margin-top: 16px; color: #91897e; font-size: 13px; }

@media (max-width: 900px) {
	.nav-list { display: none; }
	.hero-inner, .section-head, .runbook-grid, .content-layout, .footer-grid, .cta-inner { grid-template-columns: 1fr; }
	.incident-tool__grid { grid-template-columns: 1fr; }
	.section-head, .cta-inner { display: grid; }
	.post-row { grid-template-columns: 1fr; gap: 10px; }
	.post-row .more { text-align: left; }
	.aside-box { position: static; }
}
@media (max-width: 620px) {
	:root { --shell: min(100% - 28px, 1160px); }
	body { font-size: 16px; }
	.header-cta { display: none; }
	.hero { padding-top: 62px; }
	.hero h1 { font-size: 48px; }
	.runbook-grid { grid-template-columns: 1fr; }
	.footer-grid { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
