/* Wordmark «NMT» + «Hub» on a plate (web/_wordmark.html, decision 0117). Sizes in em: set
   font-size on the parent to scale it. */
.wordmark {
  display: inline-flex; align-items: center; gap: .13em; white-space: nowrap; color: var(--fg);
  font-family: -apple-system, system-ui, sans-serif; font-style: normal; font-weight: 800; letter-spacing: -.035em; line-height: 1;
}
.wordmark-plate { padding: .08em .26em .15em; border-radius: .26em; corner-shape: var(--corner); background: var(--accent); color: var(--on-accent); }

.theme-toggle {
  display: inline-grid; place-items: center; vertical-align: middle;
  width: 44px; height: 44px; padding: 0; border: 1px solid var(--line);
  border-radius: 50%; background: var(--surface); color: var(--fg); cursor: pointer;
}
.theme-toggle:hover, .theme-toggle[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-toggle[aria-pressed="true"] svg { transform: rotate(180deg); }

/* Palette picker (ui/theme.js PalettePicker): a dot of each palette's accent before its name. */
.seg-palette button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-palette button::before {
  content: ""; inline-size: 10px; block-size: 10px; border-radius: 50%; flex: none;
  background: var(--swatch); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 20%, transparent);
}
.seg-palette [data-value="steel"] { --swatch: var(--swatch-steel); }
.seg-palette [data-value="blue"] { --swatch: var(--swatch-blue); }
.seg-palette [data-value="indigo"] { --swatch: var(--swatch-indigo); }
.seg-palette [data-value="mono"] { --swatch: var(--swatch-mono); }
.seg-palette [data-value="violet"] { --swatch: var(--swatch-violet); }
/* Five names do not fit next to the title on a phone: the default on its own line, the other
   four two by two below it. */
@media (max-width: 480px) {
  .seg-palette { display: grid; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); inline-size: 100%; }
  .seg-palette [data-value="steel"] { grid-column: 1 / -1; }
}

/* Monochrome: the accent is the text color, so a text-only action would look like a label.
   It keeps a shape cue instead: a thin underline (decision 0112). Buttons with a fill
   (primary, secondary) and links in running text already differ. */
:root[data-palette="mono"] :is(.btn.plain, .subject-next, .mistake-notes, .course-crumbs a,
  .plan-topic-editor summary, .word-export-part summary) {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}
:root[data-palette="mono"] button.row .t1 { font-weight: 600; }
