/* Integritea Podcast: matches the Soledad theme on integritea.org
   Karla 600 headings, Nunito body, charcoal ink, sage links, deep-teal buttons, square corners. */

.itp {
	--itp-bg: #ffffff;
	--itp-surface: #f5f5f5;
	--itp-ink: #313131;
	--itp-muted: #6f6f6f;
	--itp-line: #dedede;
	--itp-accent: #6eb48c;
	--itp-deep: #097d7f;
	--itp-deep-dark: #075f61;
	--itp-lime: #8dc63f;
	--itp-head: "Karla", sans-serif;
	--itp-body: "Nunito", sans-serif;
	--itp-shadow: 0 10px 28px -16px rgba(49, 49, 49, .35);
	color: var(--itp-ink);
	font-family: var(--itp-body);
	font-size: 16px;
	line-height: 1.65;
	background: var(--itp-bg);
	padding-bottom: 56px;
}
.itp *, .itp *::before, .itp *::after { box-sizing: border-box; }
.itp a { color: var(--itp-deep); text-decoration: none; }
.itp a:hover { color: var(--itp-deep-dark); }
.itp :focus-visible { outline: 2px solid var(--itp-deep); outline-offset: 2px; }
.itp img { max-width: 100%; height: auto; display: block; }
.itp h1, .itp h2, .itp h3 { font-family: var(--itp-head); font-weight: 600; color: var(--itp-ink); letter-spacing: 0; text-transform: none; margin: 0; }
.itp p { margin: 0 0 1em; }
.itp .itp-icon { width: 1.1em; height: 1.1em; flex: none; }

.itp-wrap { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 20px; }
.itp-wrap--narrow { max-width: 860px; }

/* Breadcrumbs and meta */
.itp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--itp-muted); margin-bottom: 14px; }
.itp-crumbs a { color: var(--itp-muted); }
.itp-crumbs a:hover { color: var(--itp-deep); }
.itp-crumbs .itp-icon { width: 12px; height: 12px; opacity: .6; }
.itp-meta { font-size: 13px; color: var(--itp-muted); margin: 0; }
.itp-meta--lg { font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.itp-meta--lg span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--itp-accent); margin: 0 14px 3px -10px; vertical-align: middle; }

/* Buttons */
.itp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px; border: 1px solid var(--itp-deep);
	background: var(--itp-deep); color: #fff !important; border-radius: 0;
	font-family: var(--itp-head); font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer;
	transition: background-color .15s ease, transform .1s ease;
}
.itp-btn:hover { background: var(--itp-deep-dark); border-color: var(--itp-deep-dark); }
.itp-btn:active { transform: translateY(1px); }
.itp-btn--light { background: #fff; color: var(--itp-deep) !important; }
.itp-btn--light:hover { background: var(--itp-surface); }
.itp-btn--ghost { background: transparent; color: var(--itp-ink) !important; border-color: var(--itp-line); }
.itp-btn--ghost:hover { background: #fff; border-color: var(--itp-ink); }

/* Podcast page header */
.itp-hero { background: var(--itp-surface); border-bottom: 1px solid var(--itp-line); padding: 40px 0 44px; margin-bottom: 40px; }
.itp-hero__inner { display: grid; gap: 32px; align-items: center; }
.itp-hero__inner.has-cover { grid-template-columns: 200px 1fr; }
.itp-hero__cover { width: 200px; height: 200px; object-fit: cover; box-shadow: var(--itp-shadow); }
.itp-hero__title { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin-bottom: 14px; }
.itp-hero__intro, .itp .itp-hero__intro p { max-width: 62ch; font-size: 17px; line-height: 1.6; color: #4a4a4a; }
.itp-hero__intro p:last-child { margin-bottom: 0; }
.itp-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }
.itp-hero__count { font-family: var(--itp-head); font-weight: 600; font-size: 15px; padding-left: 12px; border-left: 3px solid var(--itp-lime); }

/* Latest episode */
.itp-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-bottom: 40px; margin-bottom: 36px; border-bottom: 1px solid var(--itp-line); }
.itp-feature__label { font-family: var(--itp-head); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--itp-deep); margin-bottom: 10px; }
.itp .itp-feature__title { font-size: clamp(21px, 2.2vw, 27px); line-height: 1.2; margin-bottom: 10px; }
.itp-feature__title a { color: var(--itp-ink); }
.itp-feature__title a:hover { color: var(--itp-deep); }
.itp .itp-feature__excerpt { margin: 14px 0 22px; color: #4a4a4a; font-size: 16px; line-height: 1.65; }
.itp .itp-prose p, .itp .itp-ep-head__guests { font-size: 16.5px; line-height: 1.75; }
.itp-feature__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Artwork */
.itp-art { position: relative; display: block; overflow: hidden; background: var(--itp-ink); }
.itp-art--wide { aspect-ratio: 16 / 9; }
.itp-art--square { aspect-ratio: 1 / 1; }
.itp-art .itp-art__img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.itp-art__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--itp-accent); background: var(--itp-ink); padding: 12px; text-align: center; }
.itp-art__ph .itp-icon { width: 34%; max-width: 64px; height: auto; }
.itp-art__ph span { font-family: var(--itp-head); font-weight: 600; font-size: 13px; color: #d9d9d9; letter-spacing: .04em; }
.itp-art--square .itp-art__ph span { display: none; }

/* Toolbar: filter tabs and search */
.itp-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; scroll-margin-top: 90px; }
.itp-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--itp-line); flex: 1 1 auto; }
.itp-tab { position: relative; padding: 10px 0 12px; font-family: var(--itp-head); font-weight: 600; font-size: 16px; color: var(--itp-muted) !important; }
.itp-tab:hover { color: var(--itp-ink) !important; }
.itp-tab.is-active { color: var(--itp-ink) !important; }
.itp-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--itp-accent); }
.itp-tab__n { font-weight: 400; font-size: 13px; color: var(--itp-muted); margin-left: 4px; }
.itp-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--itp-line); background: #fff; padding: 0 12px; min-height: 44px; min-width: 260px; }
.itp-search:focus-within { border-color: var(--itp-deep); }
.itp-search .itp-icon { color: var(--itp-muted); }
.itp-search input { border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; padding: 8px 0 !important; margin: 0 !important; font: 15px var(--itp-body); color: var(--itp-ink); width: 100%; min-width: 0; }
.itp-search--sm { min-width: 220px; min-height: 40px; }

.itp-series { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.itp-pill { padding: 6px 14px; border: 1px solid var(--itp-line); border-radius: 999px; font-size: 14px; color: var(--itp-ink) !important; background: #fff; }
.itp-pill:hover { border-color: var(--itp-accent); }
.itp-pill.is-active { background: var(--itp-ink); border-color: var(--itp-ink); color: #fff !important; }
.itp-results { font-size: 15px; color: var(--itp-muted); margin: 0 0 24px; }
.itp-results a { margin-left: 10px; }

/* Episode grid */
.itp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.itp-card { min-width: 0; }
.itp-card__link { display: flex; flex-direction: column; height: 100%; color: var(--itp-ink) !important; }
.itp-card__link:hover .itp-art__img { transform: scale(1.03); }
.itp-card__link:hover .itp-card__title { color: var(--itp-deep); }
.itp-card__body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; flex: 1; }
.itp .itp-card__title { font-size: 18px !important; line-height: 1.3 !important; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s ease; }
.itp-card__guests { font-size: 14px; color: var(--itp-muted); }
.itp-card__media { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.itp-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; line-height: 1; padding: 5px 9px; background: var(--itp-surface); color: var(--itp-ink); }
.itp-chip .itp-icon { width: 14px; height: 14px; color: var(--itp-deep); }

.itp-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 48px; }
.itp-pages .page-numbers { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--itp-line); color: var(--itp-ink) !important; font-family: var(--itp-head); font-weight: 600; }
.itp-pages .page-numbers.current { background: var(--itp-ink); border-color: var(--itp-ink); color: #fff !important; }
.itp-pages a.page-numbers:hover { border-color: var(--itp-deep); color: var(--itp-deep) !important; }
.itp-pages .dots { border: 0; }

.itp-empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--itp-line); }
.itp-empty .itp-icon { width: 48px; height: 48px; color: var(--itp-accent); margin: 0 auto 12px; }

/* Episode page */
.itp-ep-head { padding: 36px 0 26px; }
.itp-ep-head__title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.14; margin-bottom: 14px; }
.itp-ep-head__guests { font-size: 16px; margin: 10px 0 0; color: #4a4a4a; }

.itp-media { margin-bottom: 40px; }
.itp-switch { display: inline-flex; border: 1px solid var(--itp-line); margin-bottom: 14px; }
.itp-switch__btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; min-height: 44px; border: 0; background: #fff; color: var(--itp-muted); font-family: var(--itp-head); font-weight: 600; font-size: 15px; cursor: pointer; }
.itp-switch__btn + .itp-switch__btn { border-left: 1px solid var(--itp-line); }
.itp-switch__btn.is-active { background: var(--itp-ink); color: #fff; }
.itp-switch__btn.is-active .itp-icon { color: var(--itp-accent); }
.itp-panel[hidden] { display: none !important; }

.itp-player { display: grid; grid-template-columns: 132px 1fr; gap: 24px; align-items: center; background: var(--itp-ink); color: #fff; padding: 20px; }
.itp-player__art { width: 132px; }
.itp-player__audio { width: 100%; }
.itp-player.is-ready .itp-player__audio { display: none; }
.itp-player__ui { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.itp-player__ui[hidden] { display: none; }
.itp-player__controls { display: flex; align-items: center; gap: 8px; }
.itp-pbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #fff !important; cursor: pointer; padding: 0; }
.itp-pbtn .itp-icon { width: 24px; height: 24px; }
.itp-pbtn:hover { background: rgba(255, 255, 255, .1); }
.itp-pbtn--play { width: 60px; height: 60px; background: var(--itp-accent); color: var(--itp-ink) !important; }
.itp-pbtn--play:hover { background: #82c29d; }
.itp-pbtn--play .itp-icon { width: 28px; height: 28px; }
.itp-pbtn--play .itp-icon--pause, .itp-player.is-playing .itp-pbtn--play .itp-icon--play { display: none; }
.itp-player.is-playing .itp-pbtn--play .itp-icon--pause { display: block; }
.itp-pbtn--sm { width: 40px; height: 40px; }
.itp-pbtn--sm .itp-icon { width: 20px; height: 20px; }
.itp-player__track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.itp-player__time { font-variant-numeric: tabular-nums; font-size: 13px; color: #cfcfcf; min-width: 40px; text-align: center; }
.itp-player__seek { -webkit-appearance: none; appearance: none; flex: 1; min-width: 60px; height: 6px; background: linear-gradient(to right, var(--itp-accent) var(--itp-pct, 0%), #5a5a5a var(--itp-pct, 0%)); border: 0; margin: 0; cursor: pointer; }
.itp-player__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.itp-player__seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.itp-player__extra { display: flex; align-items: center; gap: 6px; }
.itp-speed { min-width: 52px; height: 34px; border: 1px solid #5a5a5a; background: transparent; color: #fff; font-family: var(--itp-head); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 0; }
.itp-speed:hover { border-color: var(--itp-accent); }

.itp-video { position: relative; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.itp-video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.itp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.itp-video__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80px; height: 80px; border-radius: 50%; border: 0; background: var(--itp-accent); color: var(--itp-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .15s ease; }
.itp-video__play:hover { transform: translate(-50%, -50%) scale(1.06); }
.itp-video__play .itp-icon { width: 34px; height: 34px; margin-left: 4px; }
.itp-soundcloud iframe { width: 100%; height: 166px; border: 0; display: block; }
.itp-notice { background: var(--itp-surface); border-left: 3px solid var(--itp-lime); padding: 14px 18px; margin-bottom: 36px; }

.itp-body { display: grid; gap: 40px; }
.itp-h2 { font-size: 22px !important; line-height: 1.2 !important; margin-bottom: 14px !important; }
.itp-prose { font-size: 16.5px; line-height: 1.75; color: #3a3a3a; max-width: 70ch; }
.itp-prose p { margin: 0 0 1.1em; }
.itp-prose a { color: var(--itp-deep); text-decoration: underline; text-underline-offset: 2px; }

.itp-transcript { border-top: 1px solid var(--itp-line); padding-top: 32px; }
.itp-transcript__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.itp-transcript__head .itp-h2 { margin-bottom: 0 !important; }
.itp-transcript__tools { display: flex; align-items: center; gap: 12px; }
.itp-transcript__tools[hidden] { display: none; }
.itp-transcript__count { font-size: 13px; color: var(--itp-muted); min-width: 70px; }
.itp-transcript__body { position: relative; }
.itp-transcript__body.is-collapsed { max-height: 420px; overflow: hidden; }
.itp-transcript__body.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.itp-transcript__toggle { margin-top: 16px; }
.itp-transcript mark { background: #dcefe3; color: inherit; padding: 0 1px; }
.itp-transcript mark.is-current { background: var(--itp-accent); color: #fff; }

.itp-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 18px 0; border-top: 1px solid var(--itp-line); border-bottom: 1px solid var(--itp-line); font-size: 15px; }
.itp-share__label { font-family: var(--itp-head); font-weight: 600; margin-right: 4px; }
.itp-share a { color: var(--itp-ink) !important; }
.itp-share a:hover { color: var(--itp-deep) !important; }
.itp-share__copy { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: inherit; color: var(--itp-ink); cursor: pointer; }
.itp-share__copy:hover { color: var(--itp-deep); }

.itp-more { background: var(--itp-surface); padding: 44px 0 52px; margin-top: 56px; margin-bottom: -56px; }
.itp-more__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.itp-more__head a { display: inline-flex; align-items: center; gap: 4px; font-family: var(--itp-head); font-weight: 600; }
.itp-more__head .itp-icon { width: 14px; height: 14px; }

/* Theme spacing around our main element */
body.itp-page .penci-single-wrapper, body.itp-page .container.penci-breadcrumb { display: none; }

/* Tablet */
@media (max-width: 960px) {
	.itp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.itp-feature { grid-template-columns: 1fr; gap: 22px; }
}

/* Phone */
@media (max-width: 640px) {
	.itp { font-size: 15px; }
	.itp-wrap { padding: 0 16px; }
	.itp-hero { padding: 28px 0 30px; margin-bottom: 28px; }
	.itp-hero__inner.has-cover { grid-template-columns: 1fr; }
	.itp-hero__cover { width: 120px; height: 120px; }
	.itp-grid { grid-template-columns: 1fr; gap: 32px; }
	.itp-toolbar { flex-direction: column; align-items: stretch; }
	.itp-tabs { gap: 20px; overflow-x: auto; }
	.itp-search { min-width: 0; }
	.itp-player { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
	.itp-player__art { display: none; }
	.itp-player__ui { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
	.itp-player__track { width: 100%; }
	.itp-player__extra { justify-self: end; }
	.itp-video__play { width: 64px; height: 64px; }
	.itp-transcript__tools, .itp-search--sm { width: 100%; }
	.itp-switch { display: flex; }
	.itp-switch__btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.itp *, .itp *::before, .itp *::after { transition: none !important; }
}
