/* Shared styles for /tools/, /use-cases/, /guides/ subpages.
   Loaded after styles.css. */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1.6rem 0 0;
}

.breadcrumb a {
  color: var(--muted);
  border-bottom: 1px dotted rgba(159, 177, 220, 0.4);
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb span[aria-current] {
  color: var(--text);
}

.page-hero {
  padding: 1.4rem 0 1rem;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  max-width: 28ch;
  margin-top: 0.85rem;
}

.page-hero .lead {
  margin-top: 1rem;
  max-width: 65ch;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.4rem;
  align-items: start;
  padding: 1rem 0 4rem;
}

.content-main {
  min-width: 0;
}

.content-main h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin: 2.4rem 0 0.8rem;
  scroll-margin-top: 5rem;
}

.content-main h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.6rem;
}

.content-main p,
.content-main li {
  color: #d6dffa;
  font-size: 1rem;
  line-height: 1.65;
}

.content-main p {
  margin: 0.95rem 0;
}

.content-main ul,
.content-main ol {
  padding-left: 1.4rem;
  margin: 0.85rem 0;
}

.content-main li {
  margin: 0.45rem 0;
}

.content-main a:not(.button) {
  color: var(--primary);
  border-bottom: 1px solid rgba(124, 157, 255, 0.35);
}

.content-main a:not(.button):hover {
  color: #b3c7ff;
  border-bottom-color: rgba(179, 199, 255, 0.7);
}

.content-main a.button {
  border-bottom: 0;
  text-decoration: none;
}

.content-main a.button-primary {
  color: #09102a;
}

.content-main a.button-ghost {
  color: var(--text);
}

.content-main code {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(159, 177, 220, 0.16);
  border-radius: 6px;
  padding: 0.08rem 0.4rem;
  font-size: 0.9em;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.content-main pre {
  background: rgba(11, 16, 32, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.content-main pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.content-main th,
.content-main td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(159, 177, 220, 0.12);
}

.content-main th {
  background: rgba(23, 35, 64, 0.55);
  color: #c7d8ff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.content-main tbody tr:last-child td {
  border-bottom: 0;
}

.content-main blockquote {
  margin: 1.2rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--primary);
  background: rgba(124, 157, 255, 0.08);
  border-radius: 0 12px 12px 0;
  color: #d6dffa;
  font-style: italic;
}

.callout {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(124, 157, 255, 0.3);
  background: rgba(124, 157, 255, 0.08);
  border-radius: 12px;
}

.callout strong {
  color: var(--text);
}

.callout p:first-child {
  margin-top: 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.toc {
  position: sticky;
  top: 5.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.62);
  padding: 1rem 1.1rem;
}

.toc h2 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.toc a {
  color: var(--muted);
  border-bottom: 1px dotted transparent;
}

.toc a:hover {
  color: var(--text);
  border-bottom-color: rgba(159, 177, 220, 0.5);
}

.related {
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.62);
  padding: 1rem 1.1rem;
}

.related h2 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.related a {
  color: var(--text);
}

.related a:hover {
  color: var(--primary);
}

.cta-inline {
  margin: 2rem 0 0;
  padding: 1.4rem 1.4rem;
  border: 1px solid rgba(124, 157, 255, 0.4);
  border-radius: var(--radius-lg);
  background: rgba(20, 31, 55, 0.7);
}

.cta-inline h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.cta-inline p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.cta-inline .button {
  display: inline-block;
}

/* Hub index pages (tools/, use-cases/, guides/) */
.index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.index-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.62);
  transition: 0.2s ease;
}

.index-card:hover {
  border-color: rgba(124, 157, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.index-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.index-card h3 {
  font-size: 1.02rem;
  color: var(--text);
}

.index-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Tool widgets */
.tool-widget {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(17, 24, 39, 0.7);
  padding: 1.4rem;
  margin: 1.6rem 0;
  box-shadow: var(--shadow);
}

.tool-widget h2 {
  margin-top: 0;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
}

.field label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  background: rgba(11, 16, 32, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(124, 157, 255, 0.55);
  border-color: rgba(124, 157, 255, 0.6);
}

.field textarea {
  min-height: 7rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.counter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.65rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.counter span strong {
  color: var(--text);
  font-weight: 700;
}

.counter .ok { color: var(--success); }
.counter .warn { color: #ffd66c; }
.counter .err { color: #ff8b8b; }

.bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(159, 177, 220, 0.2);
  margin-top: 0.5rem;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.2s ease, background 0.2s ease;
}

.bar.warn > i { background: #ffd66c; }
.bar.err > i { background: #ff8b8b; }

.result-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.5rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 16, 32, 0.55);
  border: 1px solid rgba(159, 177, 220, 0.12);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
}

.result-row .lbl { color: var(--muted); }
.result-row .val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(159, 177, 220, 0.18);
  background: rgba(11, 16, 32, 0.5);
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
}

.checklist input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--success);
}

.checklist li.done {
  opacity: 0.55;
  text-decoration: line-through;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .index-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}
