/* ---------------------------------------------------------------
   Guide posts (.ps-guide)

   The long-form "types of X" layout borrowed from the LaBonne's apple
   guide: hero card, tier chart with chips, quick picks, alternating
   entity cards, CTA bands, tips, FAQ and a closing action panel.

   Loaded only on singular posts whose content contains class="ps-guide"
   (see stringer_assets() in functions.php). Colours lean on the theme
   tokens so a palette change in style.css carries through.
   --------------------------------------------------------------- */

/* 1. Tokens and wrapper ----------------------------------------- */

.ps-guide {
	--g-ink: var(--ink, #17181a);
	--g-muted: var(--ink-soft, #5f636a);
	--g-line: var(--rule, #dfded8);
	--g-sunk: var(--paper-sunk, #f1f0eb);
	--g-wash: var(--signal-wash, #f6ecd6);
	--g-night: var(--ink-deep, #1b1a17);
	--g-gold: var(--signal-lift, #e0a72c);
	--g-gold-ink: #8a5e12;
	--g-cream: #f6f3ea;
	--g-green: var(--positive, #1b6b4a);
	--g-green-lt: #e9f1ea;
	--g-shadow: 0 12px 26px rgba(20, 18, 12, .18);

	/* Tier scale: training (red) to live answers (green), search engines (ink). */
	--t0: var(--paper-dim, #b5b1a6);
	--t1: var(--negative, #a8402c);
	--t2: var(--signal, #c08a1e);
	--t3: #6a8f2c;
	--t4: var(--g-green);
	--t5: var(--g-ink);

	/* Wider than the 34rem text measure: the two-column cards need the room. */
	width: min(57rem, calc(100vw - 3rem));
	max-width: none;
	color: var(--g-ink);
	font-size: 1.0625rem;
	line-height: 1.7;
}

.ps-guide * { box-sizing: border-box; }
.ps-guide p { margin: 0 0 1em; font-size: inherit; line-height: inherit; }
.ps-guide ul,
.ps-guide li { margin: 0; padding: 0; list-style: none; }
.ps-guide figure { margin: 0; }
.ps-guide [id] { scroll-margin-top: 6rem; }

.ps-guide h2,
.ps-guide h3 { font-family: var(--display); font-weight: 700; color: var(--g-ink); }
.ps-guide h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.15; margin: 2.4em 0 .6em; letter-spacing: -.02em; }
.ps-guide h3 { font-size: 1.6rem; line-height: 1.15; margin: 0 0 .35em; letter-spacing: -.015em; }

.ps-guide code {
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	font-size: .88em;
	background: var(--g-sunk);
	padding: .1em .35em;
	border-radius: 4px;
}

/* 2. Shared patterns -------------------------------------------- */

/* Sans UI text. */
.ps-guide .ps-note, .ps-guide .ps-tally-cell, .ps-guide .ps-evolving,
.ps-guide .ps-term-bar, .ps-guide .ps-btn, .ps-guide .ps-tier-name,
.ps-guide .ps-tier-desc, .ps-guide .ps-chip, .ps-guide .ps-never,
.ps-guide .ps-pick, .ps-guide .ps-tag, .ps-guide .ps-cta-head,
.ps-guide .ps-cta-sub, .ps-guide .ps-support, .ps-guide .ps-config-head,
.ps-guide .ps-config-sub, .ps-guide .ps-tip strong, .ps-guide .ps-tip::before,
.ps-guide .ps-stat, .ps-guide .ps-action-title, .ps-guide .ps-action-sub,
.ps-guide .ps-pill { font-family: var(--display); }

/* Small uppercase labels. */
.ps-guide .ps-eyebrow, .ps-guide .ps-scale-labels, .ps-guide .ps-picks-title,
.ps-guide .ps-meta, .ps-guide .ps-tags-label, .ps-guide .ps-cta-kicker,
.ps-guide .ps-row-label, .ps-guide .ps-tally-head, .ps-guide .ps-support th,
.ps-guide .ps-evolving b, .ps-guide .ps-never b {
	font-family: var(--display);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--g-muted);
}

/* Cream cards with a hairline border. */
.ps-guide .ps-hero, .ps-guide .ps-tally, .ps-guide .ps-aside,
.ps-guide .ps-tip { background: var(--g-cream); border: 1px solid var(--g-line); }

/* White cards with a hairline border. */
.ps-guide .ps-chart, .ps-guide .ps-chip, .ps-guide .ps-tally-cell,
.ps-guide .ps-tag, .ps-guide .ps-faq-item { background: #fff; border: 1px solid var(--g-line); }

/* Dark panels. */
.ps-guide .ps-term, .ps-guide .ps-never, .ps-guide .ps-cta,
.ps-guide .ps-final { background-color: var(--g-night); color: #fff; }

/* Pills. */
.ps-guide .ps-eyebrow, .ps-guide .ps-btn, .ps-guide .ps-tag, .ps-guide .ps-pill,
.ps-guide .ps-never a, .ps-guide .ps-evolving b, .ps-guide .ps-scale { border-radius: 999px; }

/* Hover lift on clickable cards and buttons. */
.ps-guide .ps-btn, .ps-guide .ps-action { transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.ps-guide .ps-btn:hover { transform: translateY(-1px); }

/* Two-column split used by the cards, verify and llms.txt blocks. */
.ps-guide .ps-bot, .ps-guide .ps-keep {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 28px;
}

/* Tier colour carrier: .ps-tN sets --tc for chips, tags and tier tops. */
.ps-guide .ps-t0 { --tc: var(--t0); }
.ps-guide .ps-t1 { --tc: var(--t1); }
.ps-guide .ps-t2 { --tc: var(--t2); }
.ps-guide .ps-t3 { --tc: var(--t3); }
.ps-guide .ps-t4 { --tc: var(--t4); }
.ps-guide .ps-t5 { --tc: var(--t5); }

/* 3. Small parts ------------------------------------------------ */

.ps-guide .ps-note { font-size: 14px; line-height: 1.5; color: var(--g-muted); }

.ps-guide .ps-evolving {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: var(--g-wash);
	border: 1px solid #ecd9b0;
	border-radius: 14px;
	padding: 14px 18px;
	margin: 18px 0 0;
	font-size: 14.5px;
	line-height: 1.55;
}
.ps-guide .ps-evolving p { margin: 0; }
.ps-guide .ps-evolving b {
	flex: 0 0 auto;
	font-size: 11px;
	letter-spacing: .12em;
	color: var(--g-gold-ink);
	background: #fff;
	border: 1px solid #ecd9b0;
	padding: 4px 10px;
	margin-top: 1px;
}

/* 4. Hero ------------------------------------------------------- */

.ps-guide .ps-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	border-radius: 20px;
	padding: 30px;
}
.ps-guide .ps-eyebrow {
	display: inline-block;
	letter-spacing: .12em;
	color: var(--g-gold-ink);
	background: #fff;
	border: 1px solid var(--g-line);
	padding: 6px 13px;
	margin-bottom: 14px;
	line-height: 1.2;
}
.ps-guide .ps-lead { font-size: 1.1em; }

/* 5. Terminal panels (stand in for the apple photos) ------------ */

.ps-guide .ps-term { border-radius: 16px; box-shadow: var(--g-shadow); overflow: hidden; }
.ps-guide .ps-term-inline { margin: 4px 0 18px; }
.ps-guide .ps-term-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-bottom: 1px solid #3a3833;
	font-size: 12px;
	color: #b5b1a6;
	letter-spacing: .04em;
}
.ps-guide .ps-term-bar i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #3a3833; }
.ps-guide .ps-term-bar span { margin-left: 8px; }
.ps-guide .ps-term pre {
	margin: 0;
	background: transparent;
	color: #ece9e1;
	padding: 18px 18px 20px;
	font-size: 13.5px;
	line-height: 1.75;
	overflow-x: auto;
	white-space: pre;
}
.ps-guide .ps-term .c { color: #8d897f; }
.ps-guide .ps-term .k1 { color: #e98a72; }
.ps-guide .ps-term .k2 { color: var(--g-gold); }
.ps-guide .ps-term .k3 { color: #b3d36b; }
.ps-guide .ps-term .k4 { color: #6fd1a2; }
.ps-guide .ps-term .k5 { color: #fff; }

/* 6. Buttons ---------------------------------------------------- */

.ps-guide .ps-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ps-guide .ps-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 22px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	border: 2px solid transparent;
}
.ps-guide .ps-btn-dark { background: var(--g-ink); color: #fff; box-shadow: 0 5px 14px rgba(23, 24, 26, .22); }
.ps-guide .ps-btn-dark:hover { background: #000; color: #fff; }
.ps-guide .ps-btn-ghost { background: #fff; color: var(--g-ink); border-color: var(--g-ink); }
.ps-guide .ps-btn-ghost:hover { background: var(--g-sunk); color: var(--g-ink); }
.ps-guide .ps-btn-white { background: #fff; color: var(--g-ink); }
.ps-guide .ps-btn-white:hover { background: var(--g-wash); color: var(--g-ink); }
.ps-guide .ps-btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.ps-guide .ps-btn-line:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* 7. Tier chart and quick picks --------------------------------- */

.ps-guide .ps-chart { border-radius: 20px; padding: 30px; margin-top: 2.4em; box-shadow: 0 6px 22px rgba(30, 25, 10, .06); }
.ps-guide .ps-chart h2 { margin-top: 0; }
.ps-guide .ps-scale {
	height: 12px;
	background: linear-gradient(90deg, var(--t1), var(--t2) 36%, var(--t3) 66%, var(--t4));
	margin: 20px 0 8px;
}
.ps-guide .ps-scale-labels { display: flex; justify-content: space-between; letter-spacing: .12em; margin-bottom: 16px; }

.ps-guide .ps-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ps-guide .ps-tier { border-radius: 12px; padding: 14px 12px 12px; background: var(--g-cream); border-top: 5px solid var(--tc); }
.ps-guide .ps-tier-name { font-size: 14px; line-height: 1.3; margin: 0 0 4px; }
.ps-guide .ps-tier-desc { font-size: 12.5px; line-height: 1.4; color: var(--g-muted); margin: 0 0 10px; }
.ps-guide .ps-tier ul { display: flex; flex-direction: column; gap: 6px; }
.ps-guide .ps-chip {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px;
	border-radius: 8px;
	padding: 7px 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--g-ink);
	text-decoration: none;
	transition: border-color .15s ease;
}
.ps-guide a.ps-chip::after { content: "\2193"; color: var(--g-muted); font-weight: 400; }
.ps-guide a.ps-chip:hover { border-color: var(--tc); }

.ps-guide .ps-never {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 20px;
	font-size: 14px;
}
.ps-guide .ps-never b { letter-spacing: .12em; color: var(--g-gold); margin-right: 6px; }
.ps-guide .ps-never a { color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .35); padding: 5px 12px; font-weight: 600; }
.ps-guide .ps-never a:hover { background: rgba(255, 255, 255, .12); }

.ps-guide .ps-picks { background: var(--g-green-lt); border-radius: 14px; padding: 18px 20px; margin-top: 6px; }
.ps-guide .ps-picks-title { font-size: 13px; color: var(--g-green); margin: 0 0 12px; }
.ps-guide .ps-picks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.ps-guide .ps-pick { font-size: 14.5px; line-height: 1.45; margin: 0; }
.ps-guide .ps-pick-label { display: block; font-weight: 700; color: var(--g-ink); margin-bottom: 2px; }

/* 8. One-day tally ---------------------------------------------- */

.ps-guide .ps-tally { border-radius: 16px; padding: 18px 20px; margin: 4px 0 0; }
.ps-guide .ps-tally-head { margin: 0 0 10px; }
.ps-guide .ps-tally-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ps-guide .ps-tally-cell { border-radius: 12px; padding: 12px; text-align: center; line-height: 1.25; }
.ps-guide .ps-tally-cell b { display: block; font-size: 26px; }
.ps-guide .ps-tally-cell span { font-size: 13px; color: var(--g-muted); }
.ps-guide .ps-tally-ai { border-top: 4px solid var(--t3); }
.ps-guide .ps-tally-ai b { color: var(--g-green); }

/* 9. Operator cards --------------------------------------------- */

.ps-guide .ps-bot { align-items: start; padding: 28px 0; border-top: 1px solid var(--g-line); }
.ps-guide .ps-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ps-guide .ps-flip .ps-bot-img { order: 2; }

.ps-guide .ps-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12.5px; letter-spacing: .08em; line-height: 1.2; }
.ps-guide .ps-meter { display: inline-flex; gap: 3px; }
.ps-guide .ps-meter i { display: block; width: 16px; height: 8px; border-radius: 4px; background: #e6e3da; }
.ps-guide .ps-meter .on1 { background: var(--t1); }
.ps-guide .ps-meter .on2 { background: var(--t2); }
.ps-guide .ps-meter .on3 { background: var(--t3); }
.ps-guide .ps-meter .on4 { background: var(--t4); }
.ps-guide .ps-meter .on5 { background: var(--t5); }

.ps-guide .ps-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.ps-guide .ps-tags-label { margin-right: 4px; }
.ps-guide .ps-tag { font-size: 13px; font-weight: 600; line-height: 1.2; padding: 6px 12px; border-left: 4px solid var(--tc); color: var(--g-ink); }

/* Asides and illustrations. */
.ps-guide .ps-aside { border-left: 5px solid var(--t3); border-radius: 14px; padding: 20px 22px; margin: 28px 0 0; }
.ps-guide .ps-aside h3 { font-size: 1.25rem; }
.ps-guide .ps-illo { margin: 6px 0 22px; }
.ps-guide .ps-aside .ps-illo { margin: 0 0 18px; }
.ps-guide .ps-illo img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 12px 26px rgba(20, 18, 12, .14); }

/* 10. CTA bands ------------------------------------------------- */

.ps-guide .ps-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px 28px;
	background-image: radial-gradient(circle at 100% 0, rgba(224, 167, 44, .22), transparent 50%);
	border-radius: 20px;
	padding: 28px 30px;
	margin: 10px 0 18px;
}
.ps-guide .ps-cta-green {
	background-color: var(--g-green);
	background-image: radial-gradient(circle at 100% 0, rgba(255, 255, 255, .16), transparent 48%);
}
.ps-guide .ps-cta-copy { flex: 1 1 320px; }
.ps-guide .ps-cta-kicker { letter-spacing: .14em; color: var(--g-gold); margin: 0 0 4px; }
.ps-guide .ps-cta-green .ps-cta-kicker { color: #cfe8d6; }
.ps-guide .ps-cta-head { font-size: 23px; font-weight: 700; line-height: 1.25; margin: 0 0 6px; color: #fff; }
.ps-guide .ps-cta-sub { font-size: 15.5px; line-height: 1.55; margin: 0; color: #e4e1d8; }
.ps-guide .ps-cta .ps-btns { margin-top: 0; flex: 0 1 auto; }

/* 11. Shared-signal support table ------------------------------- */

.ps-guide .ps-support { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; margin: 4px 0 14px; }
.ps-guide .ps-support th,
.ps-guide .ps-support td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--g-line); vertical-align: top; }

/* 12. robots.txt templates and tips ----------------------------- */

.ps-guide .ps-configs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ps-guide .ps-config-head { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.ps-guide .ps-config-sub { font-size: 13.5px; line-height: 1.45; color: var(--g-muted); margin: 0 0 10px; }
.ps-guide .ps-configs .ps-term pre { font-size: 12px; line-height: 1.65; padding: 14px; }

.ps-guide .ps-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; counter-reset: tip; margin-top: 1.4em; }
.ps-guide .ps-tip { position: relative; margin: 0; border-radius: 14px; padding: 18px 18px 16px 64px; font-size: 16px; line-height: 1.6; }
.ps-guide .ps-tip::before {
	counter-increment: tip;
	content: counter(tip);
	position: absolute;
	left: 16px;
	top: 17px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--g-ink);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 34px;
	text-align: center;
}

/* 13. Verify and llms.txt splits -------------------------------- */

.ps-guide .ps-keep { align-items: center; }
.ps-guide .ps-keep .ps-term pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }

.ps-guide .ps-stats { display: flex; gap: 12px; }
.ps-guide .ps-stat { flex: 1; border-radius: 12px; padding: 12px 14px; text-align: center; line-height: 1.3; }
.ps-guide .ps-stat b { display: block; font-size: 22px; }
.ps-guide .ps-stat span { font-size: 13px; color: var(--g-muted); }
.ps-guide .ps-stat-good { background: var(--g-green-lt); }
.ps-guide .ps-stat-good b { color: var(--g-green); }
.ps-guide .ps-stat-bad { background: #f7e4df; }
.ps-guide .ps-stat-bad b { color: var(--t1); }

/* 14. FAQ ------------------------------------------------------- */

.ps-guide .ps-faq { display: grid; gap: 12px; }
.ps-guide .ps-faq-item { border-radius: 14px; padding: 18px 20px; }
.ps-guide .ps-faq-item h3 { font-size: 1.15rem; margin: 0 0 6px; }
.ps-guide .ps-faq-item p { margin: 0; font-size: 16px; line-height: 1.6; }

/* 15. Closing panel --------------------------------------------- */

.ps-guide .ps-final {
	background-image: radial-gradient(circle at 0 0, rgba(224, 167, 44, .14), transparent 42%);
	color: #f4f1ea;
	border-radius: 24px;
	padding: 36px 34px;
	margin-top: 2.6em;
}
.ps-guide .ps-final h2 { color: #fff; margin-top: 0; }
.ps-guide .ps-final p { color: #d8d4c9; }
.ps-guide .ps-final p a { color: #f0c46a; }

.ps-guide .ps-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 20px; }
.ps-guide .ps-action { display: block; background: #fff; border-radius: 14px; padding: 16px 18px; text-decoration: none; }
.ps-guide .ps-action:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .25); }
.ps-guide .ps-action-title { display: block; font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--g-ink); }
.ps-guide .ps-action-sub { display: block; font-size: 14px; line-height: 1.4; color: var(--g-muted); margin-top: 3px; }
.ps-guide .ps-action-main { background: var(--g-gold); }
.ps-guide .ps-action-main .ps-action-sub { color: #3a2b0a; }

.ps-guide .ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ps-guide .ps-row-label { color: #b5b1a6; margin-right: 4px; }
.ps-guide .ps-pill {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 8px 15px;
	border: 1px solid rgba(255, 255, 255, .4);
	color: #fff;
	text-decoration: none;
	transition: background-color .15s ease;
}
.ps-guide .ps-pill:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* 16. Narrow screens -------------------------------------------- */

@media (max-width: 767px) {
	.ps-guide { font-size: 1rem; }
	.ps-guide .ps-hero { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
	.ps-guide .ps-hero-img { order: -1; }
	.ps-guide .ps-chart { padding: 22px 18px; }
	.ps-guide .ps-tiers,
	.ps-guide .ps-tally-grid { grid-template-columns: 1fr 1fr; }
	.ps-guide .ps-picks-grid,
	.ps-guide .ps-configs,
	.ps-guide .ps-tips { grid-template-columns: 1fr; }
	.ps-guide .ps-bot,
	.ps-guide .ps-flip,
	.ps-guide .ps-keep { grid-template-columns: 1fr; gap: 16px; }
	.ps-guide .ps-flip .ps-bot-img { order: 0; }
	.ps-guide .ps-cta { padding: 24px 22px; }
	.ps-guide .ps-final { padding: 28px 20px; }
}

@media (max-width: 440px) {
	.ps-guide .ps-actions,
	.ps-guide .ps-tiers { grid-template-columns: 1fr; }
	.ps-guide .ps-cta .ps-btns,
	.ps-guide .ps-cta .ps-btn { width: 100%; }
}
