/* Program specs and design guidelines (raven5.com/specs).
   Template: page-design-guidelines.php. Scoped under .dg so nothing leaks into the
   Bootstrap globals. Deliberately plain: white page, hairlines, one red accent.
   Brand tokens match style.css (--r5-red). */

.dg {
	--g-red: #D22630;
	--g-red-dark: #B51F29;
	--g-ink: #383332;
	--g-head: #212122;
	--g-muted: #6b6767;
	--g-line: #e3e4e8;
	--g-soft: #f5f6f8;
	--g-ok: #1f8a4c;
	--g-wrap: 1120px;
	color: var(--g-ink);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
.dg *, .dg *::before, .dg *::after { box-sizing: border-box; }
.dg :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; font-family: inherit; text-transform: none; letter-spacing: normal; }
.dg :where(ul, ol) { list-style: none; }
.dg a { text-decoration: none; }
.dg [hidden] { display: none !important; }
.dg-wrap { width: min(var(--g-wrap), 100% - 40px); margin-inline: auto; }
.dg a:focus-visible, .dg button:focus-visible, .dg input:focus-visible, .dg select:focus-visible { outline: 2px solid var(--g-red); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.dg-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; line-height: 1.2; padding: 11px 20px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.dg-btn--primary { background: var(--g-red); color: #fff; }
.dg-btn--primary:hover, .dg-btn--primary:focus-visible { background: var(--g-red-dark); color: #fff; }
.dg-btn--line { background: #fff; border-color: #c9cad1; color: var(--g-head); }
.dg-btn--line:hover { border-color: var(--g-head); color: var(--g-head); }
.dg-btn--sm { font-size: 14px; padding: 8px 14px; }

/* ---------- Header ---------- */
.dg-top { padding: 64px 0 0; }
.dg-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em !important; text-transform: uppercase !important; color: var(--g-red); margin-bottom: 14px; }
.dg-h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 700; line-height: 1.12; color: var(--g-head); margin-bottom: 16px; max-width: 22ch; }
.dg-lede { font-size: 18px; color: var(--g-muted); max-width: 64ch; }

/* The three artboards, to relative scale, flat and outlined. */
.dg-boards { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; margin: 48px 0 0; padding-bottom: 72px; border-bottom: 1px solid var(--g-line); }
.dg-bwrap { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.dg-board { background: #fff; border: 1px solid #c9cad1; border-radius: 8px; overflow: hidden; max-width: 100%; }
.dg-board--d { width: 640px; height: 400px; }
.dg-board--m, .dg-board--e { width: 200px; height: 400px; }
.dg-board .bn { background: var(--g-line); }
.dg-board--d .bn { height: 133px; }     /* banners at true proportion: 300/1440, 200/391, 160/390 */
.dg-board--m .bn { height: 102px; }
.dg-board--e .bn { height: 82px; }
.dg-bcap { font-weight: 600; font-size: 12px; line-height: 1.3; color: var(--g-muted); }
.dg-bpad { padding: 20px; display: grid; gap: 10px; align-content: start; }
.dg-bpad i { display: block; height: 9px; border-radius: 2px; background: var(--g-line); }
.dg-bpad i.h { height: 16px; width: 55%; background: var(--g-head); opacity: .8; }
.dg-bpad i.f { height: 28px; background: #fff; border: 1px solid #c9cad1; border-radius: 4px; }
.dg-bpad i.b { height: 28px; width: 40%; background: var(--g-red); border-radius: 4px; }
.dg-bpad .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dg-board--d .dg-bpad { grid-template-columns: 1fr 1fr; gap: 12px 28px; padding: 24px; }

/* ---------- Layout: side index + content ---------- */
.dg-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 64px; align-items: start; padding-bottom: 96px; }
.dg-nav { position: sticky; top: 96px; padding-top: 56px; }
.dg-nav ul { display: grid; gap: 2px; }
.dg-nav a { display: block; padding: 5px 0 5px 14px; border-left: 2px solid var(--g-line); color: var(--g-muted); font-size: 14px; font-weight: 600; }
.dg-nav a.sub { padding-left: 28px; font-weight: 400; }
.dg-nav a:hover { color: var(--g-head); }
.dg-nav a.on { border-left-color: var(--g-red); color: var(--g-head); }

.dg-sec { padding-top: 72px; scroll-margin-top: 80px; }
.dg-sec:first-child { padding-top: 56px; }
.dg-sec + .dg-sec { margin-top: 72px; border-top: 1px solid var(--g-line); }
.dg-h2 { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--g-head); margin-bottom: 10px; }
.dg-sub { font-size: 16px; color: var(--g-muted); max-width: 64ch; }
.dg-h3 { font-size: 18px; font-weight: 700; color: var(--g-head); margin: 40px 0 12px; scroll-margin-top: 80px; }
.dg-note { font-size: 14px; color: var(--g-muted); }
.dg-flag { color: var(--g-red); font-weight: 600; }

/* ---------- Program tabs ---------- */
.dg-tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 28px 0 32px; border-bottom: 1px solid var(--g-line); }
.dg-tab { font: 600 15px/1.2 inherit; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 0 12px; color: var(--g-muted); cursor: pointer; }
.dg-tab:hover { color: var(--g-head); }
.dg-tab[aria-selected="true"] { color: var(--g-head); border-bottom-color: var(--g-red); }

/* Panes stay in the layout at full size so their Figma frames are never resized or reloaded. */
.dg-panes { position: relative; }
.dg-pane { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; pointer-events: none; }
.dg-pane.is-on { position: relative; visibility: visible; pointer-events: auto; }
.dg-tier { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
/* Copy on top (description left, used-by and screens right), Figma frame full width below so it is big enough to read. */
.dg-tier > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
.dg-tier__title, .dg-tier__desc, .dg-change { grid-column: 1; }
.dg-facts { grid-column: 2; grid-row: 1 / span 3; }
.dg-tier .dg-note { grid-column: 2; }
.dg-tier__title { font-size: 22px; font-weight: 700; color: var(--g-head); margin-bottom: 8px; }
.dg-tier__desc { margin-bottom: 12px; }
.dg-change { border-left: 2px solid var(--g-red); padding-left: 14px; font-weight: 600; color: var(--g-head); margin-bottom: 24px; }
.dg-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .08em !important; text-transform: uppercase !important; color: var(--g-muted); margin-bottom: 6px; }
.dg-facts dd { margin-bottom: 16px; }
.dg-chip { display: inline-block; border: 1px solid #c9cad1; border-radius: 4px; padding: 1px 9px; font-size: 13px; margin: 0 6px 6px 0; color: var(--g-head); }
.dg-slot { position: relative; background: var(--g-soft); border: 1px solid var(--g-line); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; width: 100%; }
.dg-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.dg-slot__fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--g-muted); font-size: 14px; }
.dg-slotlink { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--g-red); display: inline-flex; gap: 6px; align-items: center; }
.dg-slotlink:hover { color: var(--g-red-dark); }
.dg-strip-title { font-size: 12px; font-weight: 700; letter-spacing: .08em !important; text-transform: uppercase !important; color: var(--g-muted); margin: 36px 0 12px; }
.dg-strip { display: flex; gap: 16px; overflow-x: auto; padding: 2px 2px 12px; }
.dg-screen { flex: 0 0 132px; }
.dg-screen__cap { font-size: 12px; font-weight: 600; margin-top: 8px; color: var(--g-head); }
.dg-wf { background: #fff; border: 1px solid #c9cad1; border-radius: 6px; padding: 0 0 10px; display: grid; gap: 6px; align-content: start; min-height: 260px; overflow: hidden; }
.dg-wf .ban { height: 44px; background: var(--g-line); }          /* every banner is the same height */
.dg-wf > *:not(.ban) { margin-inline: 9px; }
.dg-wf .l { height: 5px; background: var(--g-line); border-radius: 2px; }
.dg-wf .hd { height: 9px; width: 70%; background: var(--g-head); opacity: .75; border-radius: 2px; }
.dg-wf .fl { height: 14px; border: 1px solid #a9a9ad; border-radius: 3px; }
.dg-wf .two { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dg-wf .ck { display: flex; gap: 4px; align-items: center; }
.dg-wf .ck b { width: 8px; height: 8px; border: 1px solid #a9a9ad; border-radius: 2px; flex: 0 0 auto; }
.dg-wf .ck i { height: 4px; flex: 1; background: var(--g-line); }
.dg-wf .ts { height: 16px; border: 1px solid var(--g-line); background: var(--g-soft); border-radius: 3px; width: 70%; }
.dg-wf .bt { height: 14px; background: var(--g-red); border-radius: 3px; }
.dg-wf .op { height: 16px; border: 1px solid #a9a9ad; border-radius: 3px; }
.dg-wf .dr { height: 36px; border: 1px dashed #a9a9ad; border-radius: 4px; }
.dg-wf .gr, .dg-wf .st { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; }
.dg-wf .gr i, .dg-wf .st i { height: 22px; background: var(--g-line); border-radius: 2px; }
.dg-wf .ok { height: 22px; background: var(--g-ok); opacity: .75; border-radius: 3px; }
.dg-wf .lg { height: 3px; background: var(--g-line); border-radius: 1px; }

/* ---------- Opt-in anatomy ---------- */
.dg-anatomy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; margin-top: 28px; align-items: start; }
.dg-callouts { display: grid; gap: 18px; }
.dg-callouts li { position: relative; padding-left: 34px; }
.dg-callouts li > .bi { position: absolute; left: 0; top: 1px; font-size: 18px; line-height: 1; color: var(--g-red); }
.dg-callouts b { display: block; color: var(--g-head); }
.dg-callouts span { color: var(--g-muted); font-size: 15px; }
.dg-form { border: 1px solid #c9cad1; border-radius: 8px; padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: #fff; }
.dg-form .full { grid-column: 1 / -1; }
.dg-form label.lab { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--g-head); }
.dg-form .req { color: var(--g-red); }
.dg-form input[type="text"], .dg-form input[type="email"], .dg-form select { width: 100%; height: 48px; border: 1px solid #bfc0c7; border-radius: 4px; padding: 0 12px; font: inherit; color: var(--g-ink); background: #fff; }
.dg-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b6767 50%), linear-gradient(135deg, #6b6767 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.dg-form input:focus, .dg-form select:focus { border-color: var(--g-red); box-shadow: 0 0 0 3px rgba(210,38,48,.18); outline: 0; }
.dg-form .chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.dg-form .chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--g-red); flex: 0 0 auto; }
.dg-ts { display: flex; align-items: center; gap: 12px; width: 300px; max-width: 100%; height: 65px; padding: 0 14px; border: 1px solid #e0e0e0; border-radius: 4px; background: #fafafa; font-size: 14px; }
.dg-ts i { width: 24px; height: 24px; border: 2px solid #c9cad1; border-radius: 3px; background: #fff; flex: 0 0 auto; }
.dg-ts span { flex: 1; }
.dg-ts small { font-size: 8px; line-height: 1.2; color: var(--g-muted); text-align: right; }
.dg-ts small b { display: block; letter-spacing: .04em; }

/* ---------- Banner heights ---------- */
.dg-bars { display: grid; gap: 10px; margin-top: 28px; max-width: 760px; }
.dg-bars > div { display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: center; font-size: 14px; font-weight: 600; color: var(--g-head); }
.dg-bars .t { height: 32px; background: var(--g-soft); border: 1px solid var(--g-line); border-radius: 4px; display: flex; align-items: center; padding-left: 12px; font-weight: 600; font-size: 12px; line-height: 1; color: var(--g-muted); min-width: 170px; max-width: 100%; }

/* ---------- Emails ---------- */
.dg-emailwrap { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 40px; margin-top: 28px; align-items: start; }
.dg-mail { background: #fff; border: 1px solid #c9cad1; border-radius: 8px; overflow: hidden; max-width: 100%; }
.dg-mail .ban { height: 160px; background: var(--g-line); display: grid; place-items: center; font-weight: 600; font-size: 12px; line-height: 1; color: var(--g-muted); }
.dg-mail .bd { padding: 44px 28px; display: grid; gap: 22px; }
.dg-mail h4 { font-size: 24px; font-weight: 700; color: var(--g-head); margin: 0; }
.dg-mail .box { background: var(--g-soft); border: 1px solid var(--g-line); border-radius: 6px; padding: 20px 18px 24px; display: grid; gap: 10px; font-size: 14px; }
.dg-mail .box small { font-size: 12px; font-weight: 700; color: var(--g-muted); letter-spacing: .06em !important; }
.dg-mail .ft { background: var(--g-soft); padding: 28px; font-size: 11px; color: var(--g-muted); display: grid; gap: 14px; }
.dg-mail .btn-mock { display: inline-block; background: var(--g-red); color: #fff; font-weight: 600; font-size: 14px; padding: 12px 24px; border-radius: 6px; }
.dg-emails { display: grid; gap: 0; border-top: 1px solid var(--g-line); }
.dg-em { padding: 16px 0; border-bottom: 1px solid var(--g-line); display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; }
.dg-em .n { font-size: 13px; font-weight: 700; color: var(--g-red); grid-row: span 3; padding-top: 2px; }
.dg-em h3 { font-size: 16px; font-weight: 700; color: var(--g-head); }
.dg-em .t { font-size: 13px; color: var(--g-muted); }
.dg-em .s { font-size: 14px; }

/* ---------- Specs ---------- */
.dg-tbl { border: 1px solid var(--g-line); border-radius: 8px; overflow-x: auto; }
.dg-tbl table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dg-tbl th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g-muted); background: var(--g-soft); padding: 12px 16px; white-space: nowrap; }
.dg-tbl td { padding: 12px 16px; border-top: 1px solid var(--g-line); vertical-align: top; }
.dg-tbl td.n { font-weight: 600; font-size: 14px; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--g-head); }
.dg-scale { display: grid; gap: 10px; margin-top: 24px; }
.dg-scale > div { display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: center; font-size: 13px; font-weight: 600; color: var(--g-head); }
.dg-scale .b { background: var(--g-soft); border: 1px solid var(--g-line); border-radius: 4px; height: 28px; position: relative; min-width: 170px; max-width: 100%; }
.dg-scale .b span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 600; font-size: 11px; line-height: 1; color: var(--g-muted); white-space: nowrap; }
.dg-scale .b.hl { background: var(--g-red); border-color: var(--g-red); }
.dg-scale .b.hl span { color: #fff; }
.dg-needhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin: 40px 0 12px; }
.dg-needhead .dg-h3, .dg-needhead .dg-h2 { margin: 0; }
.dg-needhead--top { margin: 0 0 10px; }
.dg-sub + .dg-prog { margin-top: 20px; }
.dg-prog { height: 4px; border-radius: 2px; background: var(--g-line); overflow: hidden; margin-bottom: 16px; }
.dg-prog > div { height: 100%; width: 0; background: var(--g-red); transition: width .2s; }
.dg-need { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.dg-need label { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; font-size: 15px; }
.dg-need input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--g-red); flex: 0 0 auto; }

/* ---------- Closing line ---------- */
.dg-end { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--g-line); }
.dg-end p { font-size: 16px; color: var(--g-head); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
	.dg-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.dg-layout > *, .dg-panes, .dg-pane, .dg-tier, .dg-tier > * { min-width: 0; max-width: 100%; }
	.dg-nav { position: sticky; top: 0; z-index: 3; padding: 0; background: #fff; border-bottom: 1px solid var(--g-line); margin-inline: calc(50% - 50vw); padding-inline: max(20px, calc(50vw - 50%)); }
	.dg-nav ul { display: flex; overflow-x: auto; gap: 18px; }
	.dg-nav a, .dg-nav a.sub { padding: 14px 0; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
	.dg-nav a.on { border-bottom-color: var(--g-red); }
	.dg-tier, .dg-anatomy, .dg-emailwrap { grid-template-columns: minmax(0, 1fr); }
	.dg-tier > div:first-child { grid-template-columns: minmax(0, 1fr); }
	.dg-facts, .dg-tier .dg-note { grid-column: 1; grid-row: auto; }
	.dg-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; align-items: start; padding-bottom: 48px; }
	.dg-bwrap--d { grid-column: 1 / -1; }
	.dg-bwrap { min-width: 0; }
	.dg-board--d .bn { height: 33%; }
	.dg-board--m .bn { height: 25.6%; }
	.dg-board--e .bn { height: 20.5%; }
	.dg-board--d { width: 100%; height: auto; aspect-ratio: 16 / 10; }
	.dg-board--m, .dg-board--e { width: 100%; height: auto; aspect-ratio: 1 / 2; }
}
@media (max-width: 575.98px) {
	.dg-top { padding-top: 40px; }
	.dg-form, .dg-need { grid-template-columns: 1fr; }
	.dg-bpad { padding: 12px; gap: 8px; }
	.dg-board--d .dg-bpad { padding: 16px; gap: 8px 16px; }
	.dg-bcap { font-size: 11px; }
}
@media (max-width: 767.98px) {
	/* Figma fits the whole frame to the iframe width, so on a phone it turns to dots. Keep the iframe wide and let the slot scroll sideways. */
	.dg-slot { aspect-ratio: auto; height: 640px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
	.dg-slot iframe { position: relative; inset: auto; width: 1000px; min-width: 100%; height: 100%; }
	.dg-slotlink { display: flex; justify-content: center; padding: 12px; border: 1px solid var(--g-line); border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) { .dg *, .dg *::before, .dg *::after { transition: none !important; } }
