/* Hallmark · genre: modern-minimal · macrostructure: Workbench (desk pages) + Narrative Workflow (public intake) · design-system: design.md · designed-as-app */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 */
/* Tools, intake, clients, products, partners, outreach.
   Tokens and the shell come from /assets/css/sales-dash.css (html.sd). This file adds only the
   components these pages share. Page-only layout stays in each page's own <style>.
   Linked with ?v=filemtime from the pages that use it; nowhere else. */

/* ---------- Page surface ---------- */
.sd .ti-page {
  padding-bottom: var(--sd-space-xl);
}

.sd .ti-page.has-bar {
  padding-bottom: calc(var(--sd-space-xl) + 72px);
}

.sd .ti-page > * + * {
  margin-top: 0;
}

/* The top bar names the page on phones; the h1 stays for screen readers. */
@media (max-width: 767.98px) {
  .sd .ti-page .sd-head.ti-head--bar h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .sd .ti-page .sd-head.ti-head--bar {
    justify-content: flex-end;
  }

  .sd .ti-page .sd-head.ti-head--bar:not(:has(.sd-head__actions > *)) {
    display: none;
  }
}

.sd .ti-lede {
  max-width: 68ch;
  margin: 0 0 var(--sd-space-sm);
  color: var(--sd-ink-2);
  font-size: var(--sd-text-md);
  line-height: 1.55;
}

.sd .ti-h2 {
  margin: 0;
  font-family: var(--sd-font-display);
  font-stretch: 108%;
  font-size: var(--sd-text-lg);
  font-weight: 700;
  line-height: 1.25;
  color: var(--sd-ink);
  overflow-wrap: anywhere;
}

.sd .ti-h3 {
  margin: 0 0 var(--sd-space-2xs);
  font-family: var(--sd-font-display);
  font-size: var(--sd-text-md);
  font-weight: 700;
  color: var(--sd-ink);
}

.sd .ti-label {
  margin: 0 0 var(--sd-space-2xs);
  font-family: var(--sd-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sd-ink-3);
}

.sd .ti-muted {
  color: var(--sd-ink-2);
}

.sd .ti-mono {
  font-family: var(--sd-font-mono);
  font-size: 0.8125rem;
  color: var(--sd-ink-3);
  overflow-wrap: anywhere;
}

.sd .ti-num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Panel: one titled block on the work surface ---------- */
.sd .ti-panel {
  min-width: 0;
  margin: 0 0 var(--sd-space-sm);
  padding: var(--sd-space-sm);
  background: var(--sd-card);
  color: var(--sd-ink);
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius-card);
}

.sd .ti-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sd-space-2xs) var(--sd-space-xs);
  margin: 0 0 var(--sd-space-xs);
}

.sd .ti-panel__head p {
  flex-basis: 100%;
  margin: 0;
  color: var(--sd-ink-2);
  font-size: var(--sd-text-sm);
}

.sd .ti-panel--flush {
  padding: 0;
  overflow: hidden;
}

.sd .ti-panel--flush > .ti-panel__head {
  padding: var(--sd-space-sm) var(--sd-space-sm) 0;
}

@media (min-width: 768px) {
  .sd .ti-panel {
    padding: var(--sd-space-md);
  }

  .sd .ti-panel--flush {
    padding: 0;
  }

  .sd .ti-panel--flush > .ti-panel__head {
    padding: var(--sd-space-md) var(--sd-space-md) 0;
  }
}

/* Two-column work surface at desktop widths (form beside list, etc.) */
.sd .ti-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sd-space-sm);
  align-items: start;
}

@media (min-width: 1100px) {
  .sd .ti-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .sd .ti-split--even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Tiles: link cards (tool directory, intake choices) ---------- */
.sd .ti-tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sd-space-xs);
  margin: 0 0 var(--sd-space-sm);
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .sd .ti-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .sd .ti-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sd .ti-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--sd-space-3xs) var(--sd-space-xs);
  height: 100%;
  min-height: var(--sd-tap);
  padding: var(--sd-space-sm);
  background: var(--sd-card);
  color: var(--sd-ink);
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius-card);
  text-decoration: none;
  transition: border-color 120ms var(--sd-ease-out), background-color 120ms var(--sd-ease-out);
}

a.ti-tile:hover,
.sd a.ti-tile:hover {
  border-color: var(--sd-rule-strong);
  background: var(--sd-paper-2);
}

.sd a.ti-tile:active {
  transform: translate(1px, 1px);
}

.sd .ti-tile__icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--sd-radius);
  background: var(--sd-tint);
  color: var(--sd-link);
  font-size: 1.05rem;
}

.sd .ti-tile__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sd .ti-tile__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sd-space-3xs) var(--sd-space-2xs);
  margin: 0;
  font-family: var(--sd-font-display);
  font-stretch: 108%;
  font-size: var(--sd-text-lg);
  font-weight: 700;
  line-height: 1.25;
}

.sd .ti-tile__desc {
  margin: 0;
  color: var(--sd-ink-2);
  font-size: var(--sd-text-sm);
  line-height: 1.5;
}

.sd .ti-tile__go {
  grid-column: 2;
  margin-top: var(--sd-space-2xs);
  color: var(--sd-link);
  font-size: var(--sd-text-sm);
  font-weight: 700;
}

/* ---------- Forms ---------- */
.sd .ti-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sd-space-xs);
}

@media (min-width: 640px) {
  .sd .ti-form--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sd .ti-form--2 > .ti-wide {
    grid-column: 1 / -1;
  }
}

.sd .ti-form .sd-field textarea,
.sd .ti-field textarea {
  min-height: 112px;
  padding: var(--sd-space-2xs) var(--sd-space-xs);
  resize: vertical;
  line-height: 1.5;
}

.sd .ti-field {
  display: flex;
  flex-direction: column;
  gap: var(--sd-space-3xs);
  min-width: 0;
}

.sd .ti-field > label,
.sd .ti-field > .ti-field__label {
  font-size: var(--sd-text-xs);
  font-weight: 700;
  color: var(--sd-ink-2);
}

.sd .ti-field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), select, textarea),
.sd .ti-page .form-control {
  width: 100%;
  min-height: var(--sd-tap);
  padding: 0 var(--sd-space-xs);
  background: var(--sd-card);
  color: var(--sd-ink);
  border: 1px solid var(--sd-rule-strong);
  border-radius: var(--sd-radius);
  font-size: 16px;
  line-height: 1.4;
}

.sd .ti-field textarea,
.sd .ti-page textarea.form-control {
  padding: var(--sd-space-2xs) var(--sd-space-xs);
}

.sd .ti-field :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--sd-focus);
  outline-offset: 1px;
  border-color: var(--sd-focus);
}

.sd .ti-hint,
.sd .ti-field small {
  color: var(--sd-ink-3);
  font-size: var(--sd-text-xs);
  line-height: 1.45;
}

.sd .ti-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sd-space-2xs);
  min-height: var(--sd-tap);
  padding: var(--sd-space-2xs) 0;
  font-size: var(--sd-text-sm);
  cursor: pointer;
}

.sd .ti-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--sd-navy);
}

.sd .ti-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sd-space-2xs);
  align-items: center;
}

@media (max-width: 479.98px) {
  .sd .ti-actions--stack > .sd-btn,
  .sd .ti-actions--stack > .btn {
    flex: 1 1 100%;
  }
}

/* ---------- Notes / callouts ---------- */
.sd .ti-note {
  display: flex;
  gap: var(--sd-space-2xs);
  margin: 0 0 var(--sd-space-sm);
  padding: var(--sd-space-xs) var(--sd-space-sm);
  background: var(--sd-info-bg);
  color: var(--sd-info-ink);
  border-radius: var(--sd-radius-card);
  font-size: var(--sd-text-sm);
  line-height: 1.5;
}

.sd .ti-note > i {
  flex: none;
  margin-top: 3px;
}

.sd .ti-note a {
  color: inherit;
  font-weight: 700;
}

.sd .ti-note--ok { background: var(--sd-ok-bg); color: var(--sd-ok-ink); }
.sd .ti-note--warn { background: var(--sd-warn-bg); color: var(--sd-warn-ink); }
.sd .ti-note--err { background: var(--sd-err-bg); color: var(--sd-err-ink); }

/* ---------- Tables: scroll inside themselves, or become labelled blocks on phones ---------- */
.sd .ti-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius-card);
  background: var(--sd-card);
}

.sd .ti-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sd-text-sm);
  color: var(--sd-ink);
}

.sd .ti-table th {
  padding: var(--sd-space-2xs) var(--sd-space-xs);
  background: var(--sd-paper);
  color: var(--sd-ink-2);
  border-bottom: 1px solid var(--sd-rule);
  font-size: var(--sd-text-xs);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.sd .ti-table td {
  padding: var(--sd-space-2xs) var(--sd-space-xs);
  border-bottom: 1px solid var(--sd-rule);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.sd .ti-table tbody tr:last-child td {
  border-bottom: 0;
}

.sd .ti-table tbody tr:hover td {
  background: var(--sd-paper);
}

.sd .ti-table .ti-num,
.sd .ti-table td.num,
.sd .ti-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* .ti-table--blocks: each row turns into a labelled block under 768px. Cells need data-label="". */
@media (max-width: 767.98px) {
  .sd .ti-table-wrap:has(> .ti-table--blocks) {
    overflow: visible;
    border: 0;
    background: none;
  }

  .sd .ti-table--blocks,
  .sd .ti-table--blocks tbody,
  .sd .ti-table--blocks tr,
  .sd .ti-table--blocks td {
    display: block !important;
    width: 100%;
  }

  .sd .ti-table--blocks {
    overflow: visible !important;
  }

  .sd .ti-table--blocks thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .sd .ti-table--blocks tr {
    margin: 0 0 var(--sd-space-2xs);
    padding: var(--sd-space-2xs) var(--sd-space-sm);
    background: var(--sd-card);
    border: 1px solid var(--sd-rule);
    border-radius: var(--sd-radius-card);
  }

  .sd .ti-table--blocks td {
    display: grid !important;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    gap: var(--sd-space-xs);
    padding: var(--sd-space-2xs) 0;
    border-bottom: 1px solid var(--sd-rule);
    text-align: left !important;
  }

  .sd .ti-table--blocks td:last-child {
    border-bottom: 0;
  }

  .sd .ti-table--blocks td::before {
    content: attr(data-label);
    color: var(--sd-ink-2);
    font-size: var(--sd-text-xs);
    font-weight: 700;
  }

  .sd .ti-table--blocks td[data-label=""]::before,
  .sd .ti-table--blocks td:not([data-label])::before {
    content: none;
  }

  .sd .ti-table--blocks td:not([data-label]),
  .sd .ti-table--blocks td[data-label=""] {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd .ti-table--blocks td.ti-cell-title {
    grid-template-columns: minmax(0, 1fr);
    font-family: var(--sd-font-display);
    font-size: var(--sd-text-md);
    font-weight: 700;
  }

  .sd .ti-table--blocks td.ti-cell-title::before {
    content: none;
  }

  .sd .ti-table--blocks tbody tr:hover td {
    background: none;
  }
}

/* ---------- Record lists (definition rows) ---------- */
.sd .ti-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sd .ti-rows > li,
.sd .ti-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sd-space-2xs) var(--sd-space-sm);
  padding: var(--sd-space-xs) 0;
  border-bottom: 1px solid var(--sd-rule);
}

.sd .ti-rows > li:last-child {
  border-bottom: 0;
}

.sd .ti-dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.sd .ti-dl > div {
  display: grid;
  grid-template-columns: minmax(7rem, 36%) minmax(0, 1fr);
  gap: var(--sd-space-xs);
  padding: var(--sd-space-2xs) 0;
  border-bottom: 1px solid var(--sd-rule);
}

.sd .ti-dl dt {
  color: var(--sd-ink-2);
  font-size: var(--sd-text-sm);
  font-weight: 600;
}

.sd .ti-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- Empty state ---------- */
.sd .ti-empty {
  padding: var(--sd-space-lg) var(--sd-space-sm);
  text-align: center;
  color: var(--sd-ink-2);
  background: var(--sd-card);
  border: 1px dashed var(--sd-rule-strong);
  border-radius: var(--sd-radius-card);
}

.sd .ti-empty h2,
.sd .ti-empty h3 {
  margin: 0 0 var(--sd-space-2xs);
  color: var(--sd-ink);
  font-family: var(--sd-font-display);
  font-size: var(--sd-text-lg);
}

.sd .ti-empty p {
  margin: 0 auto var(--sd-space-sm);
  max-width: 52ch;
}

.sd .ti-empty p:last-child {
  margin-bottom: 0;
}

/* ---------- Toolbar (count + filters/search) ---------- */
.sd .ti-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sd-space-2xs) var(--sd-space-xs);
  margin: 0 0 var(--sd-space-xs);
}

.sd .ti-toolbar__count {
  margin: 0;
  color: var(--sd-ink-2);
  font-size: var(--sd-text-sm);
  font-weight: 600;
}

.sd .ti-search {
  position: relative;
  flex: 1 1 16rem;
  max-width: 28rem;
}

.sd .ti-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sd-ink-3);
  pointer-events: none;
}

.sd .ti-search input {
  width: 100%;
  min-height: var(--sd-tap);
  padding: 0 var(--sd-space-xs) 0 36px;
  background: var(--sd-card);
  color: var(--sd-ink);
  border: 1px solid var(--sd-rule-strong);
  border-radius: var(--sd-radius);
  font-size: 16px;
}

/* Segmented tabs (filters that are links or buttons) */
.sd .ti-tabs {
  display: flex;
  gap: var(--sd-space-3xs);
  margin: 0 0 var(--sd-space-sm);
  padding: 3px;
  overflow-x: auto;
  background: var(--sd-paper-2);
  border-radius: var(--sd-radius);
  scrollbar-width: none;
}

.sd .ti-tabs::-webkit-scrollbar {
  display: none;
}

.sd .ti-tabs > :is(a, button) {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sd-space-2xs);
  min-height: 40px;
  padding: 0 var(--sd-space-xs);
  background: transparent;
  color: var(--sd-ink-2);
  border: 0;
  border-radius: 3px;
  font-size: var(--sd-text-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.sd .ti-tabs > :is(a, button):hover {
  color: var(--sd-ink);
}

.sd .ti-tabs > :is(a, button)[aria-current="page"],
.sd .ti-tabs > :is(a, button)[aria-selected="true"],
.sd .ti-tabs > :is(a, button).is-active {
  background: var(--sd-card);
  color: var(--sd-ink);
  box-shadow: 0 1px 2px oklch(22% 0.045 240 / 0.12);
}

/* ---------- Sticky phone action bar (one primary action) ---------- */
.sd .ti-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 880;
  display: flex;
  gap: var(--sd-space-2xs);
  padding: var(--sd-space-2xs) var(--sd-space-sm) calc(var(--sd-space-2xs) + env(safe-area-inset-bottom, 0px));
  background: var(--sd-card);
  border-top: 1px solid var(--sd-rule);
}

.sd .ti-bar > * {
  flex: 1;
}

.sd .ti-desk-only {
  display: none !important;
}

@media (min-width: 768px) {
  .sd .ti-bar {
    display: none;
  }

  .sd .ti-desk-only {
    display: inline-flex !important;
  }

  .sd .ti-page.has-bar {
    padding-bottom: var(--sd-space-xl);
  }
}

/* ---------- Legacy buttons used by JS-built markup ---------- */
.sd .ti-page .btn,
.sd .ti-dialog .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sd-space-2xs);
  min-height: var(--sd-tap);
  padding: 0 var(--sd-space-sm);
  background: var(--sd-card);
  color: var(--sd-ink);
  border: 1px solid var(--sd-rule-strong);
  border-radius: var(--sd-radius);
  font-size: var(--sd-text-sm);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.sd .ti-page .btn:hover,
.sd .ti-dialog .btn:hover { background: var(--sd-paper-2); }
.sd .ti-page .btn:disabled,
.sd .ti-dialog .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.sd .ti-page .btn-primary,
.sd .ti-dialog .btn-primary { background: var(--sd-navy) !important; border-color: var(--sd-navy) !important; color: var(--sd-on-dark) !important; }
.sd .ti-page .btn-primary:hover,
.sd .ti-dialog .btn-primary:hover { background: var(--sd-navy-deep) !important; }
.sd .ti-page .btn-danger,
.sd .ti-dialog .btn-danger { background: var(--sd-card); border-color: var(--sd-err-ink); color: var(--sd-err-ink); }
.sd .ti-page .btn-danger:hover,
.sd .ti-dialog .btn-danger:hover { background: var(--sd-err-bg); }

/* ---------- Dialogs: centred card on desktop, bottom sheet on phones ---------- */
.sd .ti-dialog {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh var(--sd-space-sm) var(--sd-space-sm);
  overflow-y: auto;
  background: var(--sd-scrim);
}

.sd .ti-dialog[hidden] {
  display: none;
}

.sd .ti-dialog__card {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: var(--sd-space-md);
  background: var(--sd-card);
  color: var(--sd-ink);
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius-card);
  box-shadow: var(--sd-shadow);
}

.sd .ti-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sd-space-xs);
  margin: 0 0 var(--sd-space-sm);
  padding-bottom: var(--sd-space-xs);
  border-bottom: 1px solid var(--sd-rule);
}

.sd .ti-dialog__head h2 {
  margin: 0;
  min-width: 0;
  font-family: var(--sd-font-display);
  font-size: var(--sd-text-xl);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sd .ti-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sd-tap);
  height: var(--sd-tap);
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--sd-ink-2);
  border: 1px solid transparent;
  border-radius: var(--sd-radius);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.sd .ti-close:hover {
  background: var(--sd-paper-2);
  color: var(--sd-ink);
}

.sd .ti-dialog__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sd-space-2xs);
  margin-top: var(--sd-space-sm);
}

@media (max-width: 767.98px) {
  .sd .ti-dialog {
    align-items: flex-end;
    padding: 0;
  }

  .sd .ti-dialog__card {
    max-width: none;
    max-height: 92dvh;
    overflow-y: auto;
    padding: var(--sd-space-sm) var(--sd-space-sm) calc(var(--sd-space-md) + env(safe-area-inset-bottom, 0px));
    border-radius: var(--sd-radius-card) var(--sd-radius-card) 0 0;
  }

  .sd .ti-dialog__foot > * {
    flex: 1 1 auto;
  }
}

/* ---------- Status line for async results ---------- */
.sd .ti-status {
  margin: var(--sd-space-2xs) 0 0;
  font-size: var(--sd-text-sm);
  color: var(--sd-ink-2);
}

.sd .ti-status.is-ok { color: var(--sd-ok-ink); }
.sd .ti-status.is-err { color: var(--sd-err-ink); }

.sd .ti-spin {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.15em;
  animation: ti-spin 700ms linear infinite;
}

@keyframes ti-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Public pages (intake): same system, no rail ---------- */
html.sd.ti-public body {
  padding-left: 0 !important;
}

.sd .ti-pub-top {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: var(--sd-space-xs);
  min-height: var(--sd-bar-h);
  padding: env(safe-area-inset-top, 0) var(--sd-space-sm) 0;
  background: var(--sd-card);
  border-bottom: 1px solid var(--sd-rule);
}

.sd .ti-pub-top__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sd-space-xs);
  min-height: var(--sd-tap);
  min-width: 0;
  color: var(--sd-ink);
  text-decoration: none;
}

.sd .ti-pub-top__logo {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 3px;
  overflow: hidden;
  background: var(--sd-logo-tile);
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius);
}

.sd .ti-pub-top__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sd .ti-pub-top__word {
  font-family: var(--sd-font-display);
  font-stretch: 112%;
  font-size: var(--sd-text-md);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd .ti-pub-top__word span {
  display: block;
  color: var(--sd-ink-2);
  font-size: var(--sd-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.sd .ti-pub-top__nav {
  display: flex;
  gap: var(--sd-space-2xs);
  margin-left: auto;
}

.sd .ti-pub-main {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: var(--sd-space-md) var(--sd-space-sm) var(--sd-space-xl);
}

.sd .ti-pub-main--wide {
  max-width: 1140px;
}

.sd .ti-pub-main h1,
.sd .ti-pub-h1 {
  margin: 0 0 var(--sd-space-2xs);
  font-family: var(--sd-font-display);
  font-stretch: 108%;
  font-size: var(--sd-text-2xl);
  font-weight: 800;
  line-height: 1.15;
  color: var(--sd-ink);
  overflow-wrap: anywhere;
}

.sd .ti-pub-foot {
  padding: var(--sd-space-md) var(--sd-space-sm) calc(var(--sd-space-md) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sd-rule);
  color: var(--sd-ink-2);
  font-size: var(--sd-text-xs);
  text-align: center;
}

.sd .ti-pub-foot a {
  color: var(--sd-link);
}

@media (min-width: 768px) {
  .sd .ti-pub-top {
    padding: 0 var(--sd-space-lg);
  }

  .sd .ti-pub-main {
    padding: var(--sd-space-lg) var(--sd-space-lg) var(--sd-space-xl);
  }
}

/* Numbered steps for multi-part public forms */
.sd .ti-steps {
  display: flex;
  gap: var(--sd-space-2xs);
  margin: 0 0 var(--sd-space-sm);
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  counter-reset: ti-step;
}

.sd .ti-steps li {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sd-space-2xs);
  padding: 4px var(--sd-space-xs) 4px 4px;
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius-pill);
  color: var(--sd-ink-2);
  font-size: var(--sd-text-xs);
  font-weight: 700;
  counter-increment: ti-step;
}

.sd .ti-steps li::before {
  content: counter(ti-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sd-paper-2);
  color: var(--sd-ink);
  font-family: var(--sd-font-mono);
}

.sd .ti-steps li[aria-current="step"] {
  border-color: var(--sd-navy);
  color: var(--sd-ink);
}

.sd .ti-steps li[aria-current="step"]::before {
  background: var(--sd-navy);
  color: var(--sd-on-dark);
}

/* Fieldset blocks in long public forms */
.sd .ti-fieldset {
  min-width: 0;
  margin: 0 0 var(--sd-space-sm);
  padding: var(--sd-space-sm);
  background: var(--sd-card);
  border: 1px solid var(--sd-rule);
  border-radius: var(--sd-radius-card);
}

.sd .ti-fieldset > legend {
  float: left;
  width: 100%;
  margin: 0 0 var(--sd-space-xs);
  padding: 0;
  font-family: var(--sd-font-display);
  font-stretch: 108%;
  font-size: var(--sd-text-lg);
  font-weight: 700;
  color: var(--sd-ink);
}

.sd .ti-fieldset > legend + * {
  clear: both;
}

@media (min-width: 768px) {
  .sd .ti-fieldset {
    padding: var(--sd-space-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd .ti-spin {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.6;
  }
}

@media print {
  .sd .ti-bar,
  .sd .ti-pub-top {
    display: none !important;
  }
}
