/* DHub's introductory block guide; scoped to the two guide pages. */
.dhub-guide [hidden] { display: none !important; }
.guide-main { padding-block: 52px 38px; max-width: 1100px; }
.guide-heading { max-width: 850px; }
.guide-heading .eyebrow { margin-top: 28px; }
.guide-heading h1 { font-size: clamp(30px, 4.4vw, 58px); line-height: 1.2; letter-spacing: -.04em; overflow-wrap: normal; hyphens: none; }
.guide-lead { color: var(--muted); max-width: 72ch; font-size: 16px; line-height: 1.85; margin-top: 22px; }
.guide-edition { color: var(--muted); font-size: 12px; margin: 18px 0 0; }
.guide-scope a { color: var(--accent); }
.guide-scope a:hover { text-decoration: underline; text-underline-offset: 4px; }
.guide-section { margin-top: 48px; scroll-margin-top: var(--header-offset, 120px); }
.guide-section > h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.4; margin-bottom: 22px; }
.guide-basics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 36px; }
.guide-basics h3 { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0 0 9px; }
.guide-basics p, .guide-legend, .guide-note, .guide-scope p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.guide-basics p { margin: 0; }
.guide-legend { max-width: 78ch; margin-bottom: 20px; }
.guide-tools { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(180px, 1fr) auto; gap: 14px; align-items: end; padding: 20px; border: 1px solid var(--line); background: #171d1c; }
.guide-tools label { display: block; font-size: 12px; color: var(--text); margin-bottom: 8px; }
.guide-tools input, .guide-tools select, .guide-tools button { font: 13px/1.5 var(--mono); color: var(--text); background: #101614; border: 1px solid #485450; border-radius: 0; min-height: 44px; }
.guide-tools input, .guide-tools select { width: 100%; min-width: 0; padding: 10px 12px; }
.guide-tools input::placeholder { color: #9baba6; opacity: 1; }
.guide-tools button { padding: 10px 15px; cursor: pointer; color: var(--accent); }
.guide-tools button:hover { border-color: var(--accent); }
.guide-tools :focus-visible, .guide-block summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.guide-count { color: var(--muted); font-size: 12px; margin: 15px 0; }
.guide-empty { padding: 24px; border-left: 2px solid var(--accent); color: var(--text); font-size: 14px; }
.guide-block { --tile-accent: #999; --tile-surface: #202022; --tile-hover: #29292b; border: 1px solid var(--line); border-left: 3px solid var(--tile-accent); background: #151516; margin-bottom: 12px; scroll-margin-top: var(--header-offset, 120px); }
/* Toolbox hues from DHub ToolboxPanel.groupColor; text accents lightened for contrast. */
.dhub-guide .guide-block[data-group="Flow"] { --tile-accent: #96ae7e; --tile-surface: #212f14; --tile-hover: #293b17; }
.dhub-guide .guide-block[data-group="Data"] { --tile-accent: #aea27e; --tile-surface: #2f2914; --tile-hover: #3b3217; }
.dhub-guide .guide-block[data-group="Misc"] { --tile-accent: #9d9a92; --tile-surface: #252420; --tile-hover: #2e2c26; }
.dhub-guide .guide-block[data-group="Text"] { --tile-accent: #9a7ea0; --tile-surface: #241428; --tile-hover: #2c1731; }
.dhub-guide .guide-block[data-group="Logic"] { --tile-accent: #a27e7e; --tile-surface: #291414; --tile-hover: #321717; }
.dhub-guide .guide-block[data-group="Conversion"] { --tile-accent: #8f89a5; --tile-surface: #1d1a2b; --tile-hover: #231f35; }
.dhub-guide .guide-block[data-group="Lists and Maps"] { --tile-accent: #949796; --tile-surface: #212222; --tile-hover: #282a2a; }
.dhub-guide .guide-block[data-group="File System"] { --tile-accent: #9da0a0; --tile-surface: #252728; --tile-hover: #2e3031; }
.dhub-guide .guide-block[data-group="PDF"] { --tile-accent: #949494; --tile-surface: #212121; --tile-hover: #282828; }
.guide-block summary { background: var(--tile-surface); display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; column-gap: 18px; row-gap: 8px; padding: 19px 22px; cursor: pointer; list-style: none; }
.guide-block summary::-webkit-details-marker { display: none; }
.guide-block summary::after { content: "+"; grid-column: 3; grid-row: 1; color: var(--tile-accent); font-size: 19px; line-height: 1.3; }
.guide-block[open] summary::after { content: "−"; }
.guide-block[open] { border-color: var(--tile-accent); }
.guide-block summary:hover { background: var(--tile-hover); }
.guide-block-title { font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.guide-toolbox { font-size: 11px; color: var(--tile-accent); align-self: center; text-align: right; }
.guide-block-description { grid-column: 1 / -1; font-size: 13px; color: #bfc8c2; line-height: 1.85; max-width: 90ch; }
.guide-block-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.guide-short-label { font-size: 12px; color: var(--muted); margin-top: 18px; }
.guide-port-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.guide-block-body h3 { font-size: 12px; color: var(--tile-accent); line-height: 1.6; margin-bottom: 9px; }
.guide-ports { margin: 0; font-size: 12px; }
.guide-ports > div { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid #303033; }
.guide-ports dt, .guide-ports dd { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.7; }
.guide-ports dt { color: var(--text); }
.guide-ports dd, .guide-no-ports, .guide-port-mode { color: var(--muted); }
.guide-port-mode { font-size: 11px; }
.guide-no-ports { font-size: 12px; line-height: 1.8; }
.guide-example { margin-top: 22px; padding: 14px 16px; background: #101112; border-left: 2px solid var(--tile-accent); }
.guide-example code { display: block; font: 12px/1.8 var(--mono); color: #d6e5dc; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-note { margin: 18px 0 12px; }
.guide-note strong { color: var(--text); }
.guide-comparisons { margin: 0; }
.guide-comparisons > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 30px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.guide-comparisons dt { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.8; }
.guide-comparisons dd { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.guide-scope { border-top: 1px solid var(--line); margin-top: 42px; padding-top: 22px; max-width: 80ch; }
@media (max-width: 760px) {
  .guide-main { padding-top: 30px; }
  .guide-lead { font-size: 14px; }
  .guide-basics, .guide-port-columns { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .guide-tools { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .guide-block summary { padding: 16px; column-gap: 12px; grid-template-columns: minmax(0, 1fr) 16px; }
  .guide-block summary::after { grid-column: 2; }
  .guide-toolbox { grid-column: 1; grid-row: 2; text-align: left; }
  .guide-block-description { grid-row: 3; }
  .guide-block-body { padding: 0 16px 18px; }
  .guide-block-title { font-size: 17px; }
  .guide-comparisons > div { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .guide-section { margin-top: 36px; }
}

/* Port data types: original editor colours as swatches; text remains readable. */
.guide-type-link { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.guide-type-link:hover { color: var(--accent); text-decoration-style: solid; }
.guide-type-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.guide-type-intro { color: var(--muted); font-size: 13px; line-height: 1.9; max-width: 85ch; }
.guide-type-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 22px; font-size: 12px; line-height: 1.85; }
.guide-type-table th, .guide-type-table td { text-align: left; vertical-align: top; padding: 15px 14px; border-bottom: 1px solid var(--line); }
.guide-type-table thead th { color: var(--muted); font-size: 11px; font-weight: 400; }
.guide-type-table thead th:first-child { width: 22%; }
.guide-type-table thead th:last-child { width: 26%; }
.guide-type-table tbody th { color: var(--text); font-weight: 500; }
.guide-type-table tbody td { color: #bfc8c2; }
.guide-type-table code { font: inherit; overflow-wrap: anywhere; }
.guide-type-table tbody th code { overflow-wrap: normal; }
.guide-type-table tbody tr { scroll-margin-top: var(--header-offset, 120px); }
.guide-type-table tbody tr:target { background: #80e1dd0d; }
.guide-port-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; border: 1px solid #ffffff4d; background: var(--text); vertical-align: baseline; }
.guide-port-swatch[data-port-type="Any"] { background: #fafcff; }
.guide-port-swatch[data-port-type="String"] { background: #2e75ff; }
.guide-port-swatch[data-port-type="Number"] { background: #1ab838; }
.guide-port-swatch[data-port-type="Decimal"] { background: #ffb824; }
.guide-port-swatch[data-port-type="Boolean"] { background: #eb295c; }
.guide-port-swatch[data-port-type="Date"] { background: #945cf5; }
.guide-port-swatch[data-port-type="DateTime"] { background: #db57e6; }
.guide-port-swatch[data-port-type="File"] { background: #2ed1c2; }
.guide-port-swatch[data-port-type="Dir"] { background: #1f9eeb; }
.guide-port-swatch[data-port-type="List"] { background: #c7d6eb; }
.guide-port-swatch[data-port-type="Map"] { background: #94a8c2; }
.guide-port-swatch[data-port-type="Color"] { background: #ff6124; }
.guide-port-swatch[data-port-type="SQL Connector"] { background: #14bda8; }

.guide-port-rules { margin-top: 28px; border-top: 1px solid var(--line); }
.guide-port-rule { border-bottom: 1px solid var(--line); }
.guide-port-rule > summary { position: relative; list-style: none; cursor: pointer; padding: 18px 28px 18px 0; font-size: 14px; line-height: 1.7; color: var(--text); }
.guide-port-rule > summary::-webkit-details-marker { display: none; }
.guide-port-rule > summary::after { content: "+"; position: absolute; right: 4px; color: var(--accent); }
.guide-port-rule[open] > summary::after { content: "−"; }
.guide-port-rule > p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.9; max-width: 88ch; }
@media (max-width: 760px) {
  .guide-type-table, .guide-type-table tbody { display: block; }
  .guide-type-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .guide-type-table tbody tr { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .guide-type-table tbody th, .guide-type-table tbody td { display: block; padding: 0; border: 0; }
  .guide-type-table tbody th { font-size: 14px; }
  .guide-type-table tbody td { font-size: 13px; margin-top: 10px; }
  .guide-type-table tbody td:last-child { font-size: 12px; }
}
