/*
 * Industry pages v18: hand rules for the converted block markup, after the generated design rules (ind-v18-port.css).
 * Source: design/claude/industries/ (components/tc/page.jsx, ind-visual.jsx, styles/tc.css, ind-visual.css).
 * Scoped to .dgn-v18-ip, the page wrapper group.
 */

.dgn-v18-ip.wp-block-group { color: var(--fg-primary); background: var(--bg-canvas); }
.dgn-v18-ip :where(figure.wp-block-image, .wp-block-buttons, h1, h2, h3, h4) { margin: 0; }
.dgn-v18-ip :where(figure.wp-block-image) img { display: block; }

/* a card that was one link: the title link covers the whole card */
.dgn-v18-ip .a-card { position: relative; cursor: pointer; }
.dgn-v18-ip .a-main a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dgn-v18-ip .a-card:has(.a-main a:focus-visible) { outline: 2px solid var(--brand-blue); outline-offset: 3px; }
.dgn-v18-ip .a-main a:focus-visible { outline: none; }

/* services accordion: the head row is a button (home-v18.js); the body shows when the item is open */
.dgn-v18-ip .hl-it > .btn { cursor: pointer; }
.dgn-v18-ip .hl-it > .btn:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }

/* blog: the section reuses the home Insights classes, whose home-only rules (home-v18-port*.css "body.v18 ... .ins-h h2",
   home-v18.css eyebrow square, heading margin) would apply; the design's values: h2 clamp(28px, 2.6vw, 40px) / 1.05, no margin under the heading block, the eyebrow's own square (<i>) only */
.dgn-v18-ip.dgn-v18-ip .ins-h h2 { font-size: clamp(28px, 2.6vw, 40px) !important; line-height: 1.05 !important; }
.dgn-v18-ip.dgn-v18-ip .ins-h.wp-block-group { margin: 0 !important; }
.dgn-v18-ip .ins-h .ey::before { content: none !important; }

/* the floating "on this page" bar (shown by home-v18.js between the hero and the contact section) */
.dgn-v18-ip .tc2-dock .a.x > a { color: inherit; text-decoration: none; }
/* the pill padding (design: on the link itself) belongs to the paragraph here; the link inside keeps the same click
   area through negative margins but no longer adds a second 10px/16px padding, so the bar is the design's size.
   At 640px and below the link of the "Schedule a call" pill stays visible (only the other pills hide). */
.dgn-v18-ip .tc2-dock .a.x > a { display: inline-block; padding: 10px 16px; margin: -10px -16px; border-radius: 999px; font: inherit; line-height: 1; background: none; }
.dgn-v18-ip .tc2-dock .a.x.go > a { padding-right: 0; margin-right: 0; }
.dgn-v18-ip .tc2-dock.tc2-dock { border-width: 0; } /* the design's bar draws no border (its --hl is unset there): 44px tall */

/* client logo strip: a click on a logo no longer starts a native image drag (which stopped the strip and jittered it) */
.dgn-v18-ip .tc2-lg-r img { -webkit-user-drag: none; user-select: none; }

/* dark mode: sections the design leaves white take the dark canvas */
html[data-theme="dark"] .dgn-v18-ip > section:not(#_d1):not(#_d2):not(#_d3):not(#_d4):not(#_d5):not(#_d6):not(#_d7):not(#_d8):not(#_d9):not(#_d10) { background: var(--bg-canvas) !important; }

/* editor: one-time load animations show at once */
.editor-styles-wrapper .dgn-v18-ip :is(.tc2-hero-l > *, .iv *, .tc2-rv, .hl-rv) { opacity: 1 !important; transform: none !important; animation: none !important; }

/* service hero plan card: the live design shows "Weeks 1-14" in the primary text colour, like the plan name */
.dgn-v18-ip .tcp-hd :is(span, .sp):last-child { color: var(--ink); }

/* service pages (live design, tc.css ".tc2 h2" -0.025em): the blog and contact headings' tracking; the contact heading
   is balanced, so "Let's turn it into something impactful." breaks over three lines at desktop as in the design */
main:has(.dgn-v18-ip) .dgn-v18-ip .ins-h h2:not(#_a):not(#_b) { letter-spacing: -0.025em !important; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-l2 h2:not(#_a):not(#_b) { letter-spacing: -0.025em !important; text-wrap: balance; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-l2 h2:not(#_a):not(#_b) em { letter-spacing: inherit !important; }

/* service pages, contact form: the design's field boxes (64px; message box 123px; brief 62px) and a regular-weight
   privacy link; on phones the privacy line sits under the Send button (design .gt-sb: button, 20px gap, line) */
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .ginput_container:is(.ginput_container_text, .ginput_container_email, .ginput_container_select) { height: 20px; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .ginput_container:is(.ginput_container_text, .ginput_container_email, .ginput_container_select) :is(input, select) { height: 20px !important; min-height: 0 !important; line-height: 20px !important; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .ginput_container_textarea { height: 78px; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .ginput_container_textarea textarea { height: 78px !important; min-height: 0 !important; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .dgn-form-privacy a { font-weight: 400; }
@media (max-width: 600px) {
	main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .dgn-form-privacy { position: absolute; left: 0; bottom: 0; }
	main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gform_footer { padding-bottom: 38px; }
}
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gfield--type-fileupload { height: 62px; box-sizing: border-box; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gfield--type-fileupload .ginput_container_fileupload,
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gfield--type-fileupload .ginput_container_fileupload input { height: 60px !important; }
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gform_footer { margin-top: 22px; } /* design: Send row 24px under the message box */
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gfield--type-fileupload :is(.gfield_label, .gfield_description) { margin-left: 8px; } /* design: text 50px from the field edge */

/* service pages on phones (live design at 375): the contact section keeps 64px above and below, and the email / phone
   cards keep their desktop size (48px icon, 14px 18px padding, 17px value); only screens under 360px compact them */
/* phones: "View all case studies" and "View All" move under their cards, left aligned. On tablets they stay on the
   right of their section heading (Solutions bug sheet BUG_014, Industries BUG_010) */
@media (max-width: 760px) {
	main:has(.dgn-v18-ip) .dgn-v18-ip #proof > .dg-wrap,
	main:has(.dgn-v18-ip) .dgn-v18-ip #insights .dg-wrap.ins { display: flex !important; flex-direction: column; }
	main:has(.dgn-v18-ip) .dgn-v18-ip #proof .tc2-sh--row,
	main:has(.dgn-v18-ip) .dgn-v18-ip #insights .ins-h { display: contents !important; }
	main:has(.dgn-v18-ip) .dgn-v18-ip :is(#proof, #insights) .wp-block-buttons.pc { order: 10; align-self: flex-start; justify-content: flex-start; margin: 32px 0 0 !important; }
}
@media (min-width: 761px) and (max-width: 900px) {
	main:has(.dgn-v18-ip) .dgn-v18-ip #insights .ins-h:not(#_a) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: end; }
	main:has(.dgn-v18-ip) .dgn-v18-ip #insights .ins-h > :not(.pc) { grid-column: 1; }
	main:has(.dgn-v18-ip) .dgn-v18-ip #insights .ins-h > .pc:not(#_a) { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0 !important; }
}
@media (max-width: 760px) {
	body.v18 main:has(.dgn-v18-ip) section#contact.dgn-v18:not(#_m1):not(#_m2):not(#_m3):not(#_m4):not(#_m5):not(#_m6):not(#_m7):not(#_m8):not(#_m9) { padding-top: 64px !important; padding-bottom: 64px !important; }
}
@media (min-width: 360px) and (max-width: 760px) {
	main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-ct .gt-c:not(#_a) { gap: 16px; padding: 14px 18px 14px 14px; }
	main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-ct .ic:not(#_a) { width: 48px; height: 48px; }
	main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-ct .tx2 .v:not(#_a) { font-size: 17px; }
}
main:has(.dgn-v18-ip) .dgn-v18-port.v16-cta .gt-card .gfield:not(.gfield--type-fileupload) > .gfield_label:not(#_a) { line-height: 1 !important; } /* design: 11px label line, also on phones */

/* section bar: the live design draws no background behind the tab of the section in view (only its text darkens) */
.dgn-v18-ip .tc2-dock .a.x.on:not(.go):not(#_a) { background: none; color: rgb(11, 13, 18); }
html[data-theme="dark"] .dgn-v18-ip .tc2-dock .a.x.on:not(.go):not(#_a) { color: var(--ink); }

/* ---- Services bug sheet (tester's expected results, agreed to differ from the design) ---- */

/* Why work with us: the title sits right on top of its text (the 2-row icon no longer stretches the title row) */
main:has(.dgn-v18-ip) .dgn-v18-ip .tc2-why-l :is(li, .li) { grid-template-rows: auto 1fr; align-items: start; }

/* phones: "Contact us" centred under the Schedule button */
@media (max-width: 600px) {
	main:has(.dgn-v18-ip) .dgn-v18-ip .tc2-ctas { display: inline-flex !important; flex-direction: column; align-items: center; }
	main:has(.dgn-v18-ip) .dgn-v18-ip .tc2-ctas .tc2-lnk { margin-left: 0 !important; }
}

/* tablets and phones: less space between sections and between a section's intro and its list */
@media (max-width: 1024px) {
	main:has(.dgn-v18-ip) .dgn-v18-ip > section:is(#intro, #engagements, #proof, #why, #insights):not(#_a):not(#_b):not(#_c):not(#_d):not(#_e):not(#_f):not(#_g):not(#_h):not(#_i):not(#_j) { padding-top: 56px !important; padding-bottom: 56px !important; }
}
@media (max-width: 900px) {
	main:has(.dgn-v18-ip) .dgn-v18-ip :is(.tc2-why-g, .tc3-eng) { row-gap: 32px !important; gap: 32px !important; }
	main:has(.dgn-v18-ip) .dgn-v18-ip :is(.tc2-why-g, .tc3-eng) > .tc2-sh { margin-bottom: 0 !important; }

}
@media (max-width: 760px) {
	main:has(.dgn-v18-ip) .dgn-v18-ip > section:is(#intro, #engagements, #proof, #why, #insights):not(#_a):not(#_b):not(#_c):not(#_d):not(#_e):not(#_f):not(#_g):not(#_h):not(#_i):not(#_j) { padding-top: 48px !important; padding-bottom: 48px !important; }
	main:has(.dgn-v18-ip) .dgn-v18-ip > section#intro:not(#_a):not(#_b):not(#_c):not(#_d):not(#_e):not(#_f):not(#_g):not(#_h):not(#_i):not(#_j) { padding-top: 24px !important; }
}

/* Solution pages, services list: "View service" lines up with the item's text on tablets and phones, as in the design
   (the 96px desktop indent no longer applies there; the port's :nth-child(n) margin outranked its own media rule) */
@media (max-width: 900px) {
	.dgn-v18-ip .hl-go:nth-child(n) { margin-left: 0; }
}

/* Solution pages on phones (bug sheet: cards of one size): the three hero status cards stack at full width instead
   of one full card and two half cards */
@media (max-width: 640px) {
	.dgn-v18-ip .bc-col:not(#_a) { flex-direction: column; flex-wrap: nowrap; width: 100%; justify-self: stretch; }
	.dgn-v18-ip .bc-col > .bc:not(#_a) { flex: 0 0 auto; width: 100%; }
}

/* Solution pages on phones (bug sheet: banner breaks at the left edge): the hero window sits inside the page margins
   (the desktop -40px pull-in made it start off-screen) */
@media (max-width: 640px) {
	.dgn-v18-ip .iv-b2b .bb-win:not(#_a) { width: 100%; max-width: none; margin-left: 0; justify-self: stretch; }
}

/* Industry pages on phones (bug sheet: hero cards cover the phone mockup's text): the three status chips stack under
   the mockup at full width instead of floating over it; they keep their highlight cycle */
@media (max-width: 640px) {
	.dgn-v18-ip .iv:not(#_a) { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-height: 0; }
	.dgn-v18-ip .iv > .iv-phone:not(#_a) { align-self: center; }
	.dgn-v18-ip .iv > .iv-chip:not(#_a) { position: relative; inset: auto; width: 100%; min-width: 0; box-sizing: border-box; }
	.dgn-v18-ip .iv > .iv-chip:first-of-type:not(#_a) { margin-top: 12px; }
}
