.page-header h1,
.tool-bar__name,
.tool-subhead {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 2.5rem;
}

.tool-bar {
  margin: 0;
  border: 0.0625rem solid rgba(192, 192, 196, 0.28);
  border-radius: 0.75rem;
  background: #151518;
  color: #f2f2f4;
}

.tool-bar > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  list-style: none;
}

.tool-bar > summary::-webkit-details-marker,
.tool-bar > summary::marker {
  display: none;
  content: "";
}

.tool-bar > summary:focus-visible {
  outline: 0.1875rem solid #e2e2e6;
  outline-offset: -0.1875rem;
  border-radius: 0.75rem;
}

.tool-bar__name {
  font-size: 0.95rem;
}

.tool-badge {
  margin-left: auto;
  flex: none;
  padding: 0.15rem 0.55rem;
  border: 0.0625rem solid rgba(139, 30, 45, 0.75);
  border-radius: 999px;
  background: rgba(139, 30, 45, 0.22);
  color: #c0c0c4;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tool-bar__body {
  padding: 0 1rem 1rem;
  border-top: 0.0625rem solid rgba(192, 192, 196, 0.18);
}

.tool-locked {
  padding-top: 0.9rem;
}

.tool-locked p {
  margin: 0 0 0.75rem;
  color: #c0c0c4;
  font-size: 0.9375rem;
}

.tool-ready { padding-top: 0.85rem; }
.tool-note, .tool-meta {
  margin: 0 0 0.7rem;
  color: #c0c0c4;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.tool-meta a { color: #f2f2f4; }
.tool-subhead {
  margin: 1.1rem 0 0.5rem;
  font-size: 0.95rem;
}

.tool-bar .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
}

.seo-report { margin-top: 1rem; }
.seo-finding {
  padding: 0.85rem 0;
  border-bottom: 0.0625rem solid rgba(192, 192, 196, 0.22);
}
.seo-finding h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: #f2f2f4;
}
.seo-finding p {
  margin: 0.25rem 0;
  color: #c0c0c4;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.seo-priority {
  color: #e0283f;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 0.55rem;
}
.seo-evidence { margin-top: 1rem; }
.seo-evidence summary {
  cursor: pointer;
  font-weight: 600;
  color: #f2f2f4;
}
.seo-details {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  gap: 0.55rem 0.9rem;
  margin: 0.75rem 0 0;
}
.seo-details dt { color: #f2f2f4; font-weight: 600; }
.seo-details dd {
  margin: 0;
  color: #c0c0c4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tool-cta {
  margin: 1.15rem 0 0;
  color: #f2f2f4;
  font-size: 0.9875rem;
}

@media (max-width: 40rem) {
  .seo-details { grid-template-columns: 1fr; gap: 0.2rem; }
  .seo-details dd { margin-bottom: 0.6rem; }
  .tool-bar > summary { align-items: flex-start; }
  .tool-badge { margin-top: 0.15rem; }
}

.tool-bar { scroll-margin-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) {
  .tool-bar { scroll-margin-top: 5.5rem; }
}

.tool-bar .callout {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.9rem 0.65rem 1rem;
  border-left: 0.1875rem solid rgba(139, 30, 45, 0.85);
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgba(139, 30, 45, 0.16);
  color: #f2f2f4;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.picdrop-preview {
  display: block;
  width: 100%;
  max-height: 14rem;
  object-fit: contain;
  margin: 0 0 0.75rem;
  border-radius: 0.6rem;
  background: #0b0b0d;
}
.picdrop-result { margin-top: 1rem; }
.picdrop-result input[type="url"] {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  border: 0.0625rem solid rgba(192, 192, 196, 0.35);
  background: #151518;
  color: #f2f2f4;
  font: inherit;
}

.qr-preview-wrap { margin-top: 0.85rem; }
.qr-art {
  display: grid;
  place-items: center;
  width: min(100%, 16rem);
  aspect-ratio: 1;
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  border-radius: 0.6rem;
  background: #fff;
  color: #2b2b2f;
  text-align: center;
  overflow-wrap: anywhere;
}
.qr-art svg {
  width: 100%;
  height: auto;
  display: block;
}

.a11y-report { margin-top: 1rem; }
.a11y-report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.a11y-score {
  margin: 0;
  color: #f2f2f4;
  font-family: var(--font-brand);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.a11y-finding {
  padding: 0.85rem 0;
  border-bottom: 0.0625rem solid rgba(192, 192, 196, 0.22);
  overflow-wrap: anywhere;
}
.a11y-finding p {
  margin: 0.25rem 0;
  color: #c0c0c4;
  font-size: 0.9375rem;
}
.a11y-finding a { color: #f2f2f4; }
.a11y-finding code,
.a11y-manual {
  color: #c0c0c4;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.a11y-manual { margin: 0.75rem 0 0; padding-left: 1.2rem; }

@media (max-width: 40rem) {
  .a11y-report-head { display: block; }
}

.tool-group { margin: 0 0 1.75rem; }
.tool-group__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: #c0c0c4;
}
.tool-group .tool-list { margin-bottom: 0; }

/* Image tools: watermark & text overlay */
.img-tool-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.85rem;
  align-items: start;
}
.img-tool-stage {
  display: grid;
  place-items: center;
  min-height: 12rem;
  padding: 0.6rem;
  border: 0.0625rem dashed rgba(192, 192, 196, 0.35);
  border-radius: 0.6rem;
  background: repeating-conic-gradient(#151518 0% 25%, #2b2b2f 0% 50%) 50% / 1.25rem 1.25rem;
}
.img-tool-stage canvas {
  max-width: 100%;
  max-height: 20rem;
  width: auto;
  height: auto;
  display: block;
}
.img-tool-stage span {
  background: #151518;
  color: #c0c0c4;
  padding: 0.45rem 0.65rem;
  border-radius: 0.4rem;
  text-align: center;
}
.img-tool-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 43.75rem) {
  .img-tool-layout, .img-tool-pair { grid-template-columns: 1fr; }
}

/* Quote builder */
.quote-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0.85rem;
  align-items: start;
}
.quote-fields, .exp-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.7rem;
}
.quote-preset {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
  margin: 0.4rem 0 0.75rem;
}
.quote-item {
  display: grid;
  grid-template-columns: minmax(6.5rem, 2fr) minmax(4rem, 0.6fr) minmax(5rem, 1fr) auto;
  gap: 0.4rem;
  align-items: end;
  margin-bottom: 0.5rem;
}
.quote-document {
  background: #f4f4f6;
  color: #1a1a1c;
  border-radius: 0.6rem;
  padding: 1rem;
}
.quote-document h2 { color: #0b0b0d; margin: 0 0 0.75rem; font-size: 1.6rem; }
.quote-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0 0 0.75rem; }
.quote-parties p, #quote-notes-view { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.2rem 0 0; color: #1a1a1c; }
.quote-document table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.quote-document th, .quote-document td { border-bottom: 0.0625rem solid rgba(11,11,13,0.18); text-align: left; padding: 0.45rem 0.3rem; overflow-wrap: anywhere; color: #1a1a1c; }
.quote-totals { margin-left: auto; max-width: 14rem; }
.quote-totals div { display: flex; justify-content: space-between; gap: 0.5rem; }
.quote-totals dd { margin: 0; }
.quote-totals .is-final { font-weight: 700; border-top: 0.0625rem solid rgba(11,11,13,0.18); margin-top: 0.35rem; padding-top: 0.35rem; }
@media (max-width: 51.25rem) { .quote-layout { grid-template-columns: 1fr; } }
@media (max-width: 25rem) {
  .quote-item { grid-template-columns: 1fr 1fr; }
  .quote-item label:first-child { grid-column: 1 / -1; }
  .quote-fields, .exp-fields { grid-template-columns: 1fr; }
}

@media print {
  body * { visibility: hidden; }
  #tool-quote, #tool-quote * { visibility: visible; }
  #tool-quote {
    position: absolute;
    inset: 0;
    background: #fff;
    color: #111;
    border: 0;
  }
  #tool-quote > summary,
  #tool-quote .tool-locked,
  #tool-quote .quote-editor,
  #tool-quote .tool-note { display: none !important; }
  #tool-quote .tool-bar__body { padding: 0; border: 0; }
  #tool-quote .quote-layout { display: block; }
  #tool-quote .quote-document { margin: 0; border: 0; border-radius: 0; background: #fff; padding: 0; }
  #tool-quote .quote-document tr { break-inside: avoid; }
}

/* Expense tracker */
.exp-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.55rem 0.7rem;
  margin: 0 0 0.85rem;
}
.exp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 0.85rem;
}
.exp-stat {
  background: #151518;
  border: 0.0625rem solid rgba(192, 192, 196, 0.22);
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
}
.exp-stat span { display: block; color: #c0c0c4; font-size: 0.8rem; }
.exp-stat strong { display: block; font-size: 1.15rem; overflow-wrap: anywhere; color: #f2f2f4; }
.exp-table-wrap { overflow: auto; }
.exp-table-wrap table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 0.9rem; }
.exp-table-wrap th, .exp-table-wrap td { border-bottom: 0.0625rem solid rgba(192, 192, 196, 0.22); text-align: left; padding: 0.45rem 0.35rem; overflow-wrap: anywhere; }
.exp-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
@media (max-width: 40rem) { .exp-stats { grid-template-columns: 1fr; } }

/* Design tools */
.design-tool-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.85fr) minmax(0, 1.15fr);
  gap: 0.85rem;
  align-items: start;
}
.design-preview {
  min-height: 11rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1rem;
  background: #0b0b0d;
}
.design-code { margin-top: 0.9rem; }
.design-code header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.design-code textarea {
  width: 100%;
  min-height: 6rem;
  resize: vertical;
  font: 0.86rem/1.5 ui-monospace, monospace;
  color: #f2f2f4;
  background: #0b0b0d;
  border: 0.0625rem solid rgba(192, 192, 196, 0.28);
  border-radius: 0.5rem;
  padding: 0.55rem 0.7rem;
}
.tool-bar .control output {
  float: right;
  font-family: ui-monospace, monospace;
  color: #c0c0c4;
}
.pal-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}
.pal-swatch {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.15rem;
  min-height: 6.5rem;
  display: grid;
  align-items: end;
  cursor: pointer;
  font: 700 0.7rem/1.2 ui-monospace, monospace;
}
#pal-sample {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
}
#shad-card {
  display: grid;
  place-items: center;
  width: clamp(7.5rem, 40%, 12.5rem);
  height: 6.5rem;
  border-radius: 0.85rem;
  background: #f2f2f4;
  color: #0b0b0d;
  font-weight: 700;
}
#shad-text {
  margin: 0;
  color: #f2f2f4;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}
#tool-button .custom-button { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 43.75rem) {
  .design-tool-layout { grid-template-columns: 1fr; }
  .pal-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pal-swatch { min-height: 4.5rem; }
}

/* Photo Studio tools (embedded members-only pages) */
.tool-group__note { margin: -0.25rem 0 0.75rem; color: var(--dk-muted, #c0c0c4); font-size: 0.9rem; }
.photo-tool__frame { margin: 0.5rem 0 0; }
.photo-tool__iframe { display: block; width: 100%; min-height: 320px; border: 0; border-radius: 0.75rem; background: transparent; }
.photo-tool__links { margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--dk-muted, #c0c0c4); }
