/* ==========================================================================
   Tools page (/tools/, page-tools.php; theme 0.17.0). Loaded only on that page, after main.css (tokens, .btn, .card,
   .card-grid, .breadcrumbs, .tint-*); adds only what the page needs, prefixed tp-. From the mock-up
   research/mockups/tools/tools-page.css.
   ========================================================================== */

/* ---------- hero: title and lede left, three real outputs fanned on the right ---------- */
.tp-hero {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
	padding-block: clamp(1rem, 3vw, 2rem) clamp(1.75rem, 4vw, 2.75rem);
}
.tp-hero h1 { max-width: 13em; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.02; text-wrap: balance; }
.tp-lede { max-width: 36rem; margin: 1rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; color: var(--muted); }
.tp-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.tp-facts li {
	display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; font-size: .9rem; font-weight: 700;
	background: var(--card); border: var(--border); border-radius: 999px;
}
.tp-facts li::before { content: ""; width: 8px; height: 8px; background: var(--accent); border: 1.5px solid var(--ink); border-radius: 2px; }

.tp-fan { position: relative; aspect-ratio: 5 / 4; margin: 0; }
.tp-fan img {
	display: block;
	position: absolute; width: 64%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
	background: var(--card); border: var(--border); border-radius: var(--radius); box-shadow: var(--stamp);
}
.tp-fan img:nth-child(1) { left: 0; top: 6%; transform: rotate(-5deg); }
.tp-fan img:nth-child(2) { right: 0; top: 0; transform: rotate(4deg); }
.tp-fan img:nth-child(3) { left: 18%; bottom: 0; transform: rotate(-1deg); z-index: 1; }
.tp-fan figcaption {
	position: absolute; right: -.25rem; bottom: -1.9rem; z-index: 2; font-family: var(--font-hand); font-weight: 700;
	font-size: 1.45rem; line-height: 1; color: var(--ink); transform: rotate(-3deg);
}

/* ---------- persona tabs: binder dividers on the top edge of the grid ---------- */
.tp-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .35rem; margin: 0; padding: 0 .75rem; border-bottom: var(--border); }
.tp-tabs__label { margin: 0 .5rem .55rem 0; font-family: var(--font-hand); font-weight: 700; font-size: 1.35rem; line-height: 1; }
/* Tab states (owner, 5 Oct): text is ink in every state, never white. Specificity .tp-tabs .tp-tab (0,2,0) beats
   GeneratePress's button:hover / button:focus (0,1,1), which painted the clicked or hovered tab dark with white text.
   Inactive = the persona tint; hover / focus = the tint darkened a little (never solid ink); active = card, ink
   border, stamp shadow, bottom edge merged into the panel. Counts: ink on a white chip in every state. */
.tp-tabs .tp-tab,
.tp-tabs .tp-tab:hover,
.tp-tabs .tp-tab:focus,
.tp-tabs .tp-tab:active {
	position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin-bottom: -1.5px;
	padding: .55rem .95rem .5rem; font: 700 .95rem/1.2 var(--font-body); color: var(--ink); cursor: pointer;
	background: var(--tint, var(--paper-2)); border: var(--border); border-radius: var(--radius) var(--radius) 0 0;
	box-shadow: none; transition: transform .12s ease, background-color .12s ease;
}
.tp-tabs .tp-tab:hover,
.tp-tabs .tp-tab:focus-visible { background: color-mix(in srgb, var(--tint, var(--paper-2)) 86%, var(--ink)); transform: translateY(-3px); }
.tp-tabs .tp-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tp-tabs .tp-tab[aria-pressed="true"],
.tp-tabs .tp-tab[aria-pressed="true"]:hover,
.tp-tabs .tp-tab[aria-pressed="true"]:focus {
	z-index: 1; padding-bottom: .75rem; color: var(--ink); background: #fcfbf6; border-bottom-color: #fcfbf6;
	box-shadow: 3px 0 0 var(--ink); transform: none; /* right-only stamp: no bar under the edge that merges into the panel (5 Oct) */
}
.tp-tab__n {
	display: inline-block; min-width: 1.5em; padding: .05rem .35rem; font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
	line-height: 1.4; text-align: center; color: var(--ink); background: #fff; border: 1px solid var(--ink); border-radius: var(--radius-sm);
}
.tp-shelf { padding: clamp(1rem, 3vw, 1.75rem); background: var(--card); border: var(--border); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.tp-status { margin: 0 0 1rem; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em; color: var(--muted); }

/* ---------- tool cards (theme .card) ---------- */
.tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.tp-grid > li { display: flex; }
.tp-grid > li[hidden] { display: none; }
.tp-card { flex: 1; }
.tp-card:hover, .tp-card:active { transform: none; box-shadow: var(--stamp); }
.tp-card .card-thumb { background: var(--paper); }
.tp-card .card-body { gap: .55rem; padding: .9rem 1rem 1rem; }
.tp-card .card-title { font-size: 1.12rem; }
.tp-card .card-title a { text-decoration: none; }
.tp-card .card-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tp-card .card-title a::after { content: none; }
.tp-card__line { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--muted); }
.tp-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .1rem 0 0; padding: 0; list-style: none; }
.tp-chips li { padding: .16rem .45rem; font-family: var(--font-mono); font-size: .7rem; font-weight: 600; letter-spacing: .02em; background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius-sm); }
.tp-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; margin-top: auto; padding-top: .6rem; }
.tp-who { display: inline-flex; align-items: center; min-height: 28px; padding: .15rem .6rem; font-size: .8rem; font-weight: 700; border: 1px solid var(--ink); border-radius: 999px; }
.tp-card .btn { flex: none; }
.tp-thumb-link { display: block; }
.tp-thumb-link:focus-visible { outline-offset: -3px; }

/* ---------- how these tools work ---------- */
.tp-section { margin-top: clamp(2.5rem, 6vw, 4rem); }
.tp-section > h2 { margin-bottom: 1.1rem; }
.tp-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.tp-how li { padding: 1.15rem 1.2rem 1.25rem; background: var(--card); border: var(--border); border-radius: var(--radius); }
.tp-how svg { display: block; width: 44px; height: 44px; margin-bottom: .75rem; padding: 7px; border: var(--border); border-radius: var(--radius-sm); box-shadow: 2px 2px 0 var(--ink); }
.tp-how h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 800; letter-spacing: 0; }
.tp-how p { margin: .45rem 0 0; font-size: .95rem; line-height: 1.55; color: var(--muted); }

/* ---------- about text: right under the grid, full width, the tp-section rhythm; the category page intro's type (.page-head .lede) ---------- */
.tp-body h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.15; text-wrap: balance; }
.tp-body p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--muted); }
.tp-body .tp-body__intro { margin-top: .55rem; }
.tp-body__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem clamp(1.5rem, 4vw, 3rem); margin-top: 1.25rem; }
.tp-body h3 { margin: 0 0 .35rem; font-family: var(--font-body); font-size: 1.05rem; font-weight: 800; letter-spacing: 0; }
.tp-body a { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .tp-tabs .tp-tab { transition: none; } .tp-tabs .tp-tab:hover, .tp-tabs .tp-tab:focus-visible { transform: none; } }

@media (max-width: 1100px) {
	.tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.tp-hero { grid-template-columns: minmax(0, 1fr); }
	.tp-fan { width: min(100%, 22rem); margin: .5rem auto 1.5rem; }
	.tp-how { grid-template-columns: minmax(0, 1fr); }
	.tp-body__cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.tp-grid { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
	.tp-tabs { padding: 0; border-bottom: 0; gap: .4rem; }
	.tp-tabs__label { flex-basis: 100%; margin: 0 0 .2rem; }
	.tp-tabs .tp-tab, .tp-tabs .tp-tab:hover, .tp-tabs .tp-tab:focus, .tp-tabs .tp-tab[aria-pressed="true"],
	.tp-tabs .tp-tab[aria-pressed="true"]:hover, .tp-tabs .tp-tab[aria-pressed="true"]:focus { margin: 0; padding: .45rem .8rem; border-radius: 999px; border-bottom-color: var(--ink); }
	.tp-tabs .tp-tab[aria-pressed="true"], .tp-tabs .tp-tab[aria-pressed="true"]:hover, .tp-tabs .tp-tab[aria-pressed="true"]:focus { box-shadow: 2px 2px 0 var(--ink); }
	.tp-shelf { margin-top: .9rem; padding: 0; background: none; border: 0; }
}


