
/* ── Inline notes ─────────────────────────────────────────────────────────── */

/*
 * Layout: [chip | line]  [pill content]
 * Chip is a fixed-width right-aligned margin label. A right border on the chip
 * forms the vertical separator line in the same color. All three types share
 * the same monospace pill font; only the color and style vary.
 */
.transcript-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
  font-weight: normal;
  font-style: normal;
  line-height: 1.5;
  cursor: pointer;
}

.transcript-note__chip {
  flex-shrink: 0;
  width: 2.75rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--fs-label-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
  user-select: none;
  padding-right: 0.55rem;
  border-right: 1px solid currentColor;
  line-height: 1.5;
}

/* Per-type chip (and separator line) colors */
.transcript-note--stage-direction .transcript-note__chip { color: var(--accent); }
.transcript-note--speech-label    .transcript-note__chip { color: var(--muted);  }
.transcript-note--editor-note     .transcript-note__chip { color: var(--accent2); }

/* Shared pill base — all three use the same monospace, small, spaced font */
.transcript-note__inner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-detail);
  letter-spacing: 0.14em;
  border-radius: 7px;
  padding: 2px 11px;
  border: 1px solid;
  max-width: 100ch;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

/* Stage direction: accent (yellow-green), italic, parens via CSS */
.transcript-note--stage-direction .transcript-note__inner {
  font-style: italic;
  color: var(--accent);
  background: var(--accent-faint);
  border-color: var(--accent-border);
}
.transcript-note--stage-direction .transcript-note__inner::before { content: '('; }
.transcript-note--stage-direction .transcript-note__inner::after  { content: ')'; }

/* Speech label: neutral/muted pill, uppercase via CSS */
.transcript-note--speech-label .transcript-note__inner {
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
  border-color: var(--border);
}

/* Editor note: accent2 (cyan), italic */
.transcript-note--editor-note .transcript-note__inner {
  font-style: italic;
  color: var(--accent2);
  background: var(--accent2-faint);
  border-color: var(--accent2-border);
}

.transcript-note__inner[contenteditable] { cursor: text; outline: none; }
.transcript-note__inner[contenteditable]:focus { opacity: 1; }
.transcript-note:hover .transcript-note__inner { opacity: 0.72; }

/* ── Note type picker popup ─────────────────────────────────────────────── */

.note-type-popup {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 0;
  min-width: 158px;
  box-shadow: 0 6px 20px var(--shadow-md);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  z-index: 9999;
}

.note-type-popup__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.8rem;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.1s, color 0.1s;
  user-select: none;
}

.note-type-popup__item:hover { background: var(--hover-overlay); color: var(--text); }
.note-type-popup__item.active { color: var(--text); }
.note-type-popup__item.disabled { opacity: 0.35; cursor: default; }
.note-type-popup__item.disabled:hover { background: none; color: var(--muted); }

.note-type-popup__item--delete { color: var(--danger-muted); }
.note-type-popup__item--delete:hover { color: var(--danger); background: var(--danger-subtle); }

.note-type-popup__swatch {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.note-type-popup__swatch--stage-direction { background: var(--accent); }
.note-type-popup__swatch--speech-label    { background: var(--muted); }
.note-type-popup__swatch--editor-note     { background: var(--accent2); }

.note-type-popup__check {
  display: inline-block;
  width: 0.7rem;
  font-size: 0.65rem;
  flex-shrink: 0;
  color: var(--accent2);
}

.note-type-popup__sep {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* ── Section breaks ──────────────────────────────────────────────────────── */

.section-break {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  background: var(--accent-faint);
  cursor: pointer;
  transition: background 0.15s;
}

.section-break:hover {
  background: var(--accent-subtle);
}

.section-break__left {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.section-break__num {
  font-family: var(--font-mono);
  font-size: var(--fs-heading-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-break__name {
  font-family: var(--font-transcript);
  font-size: var(--fs-title-sm);
  color: var(--text);
  min-width: 4rem;
  outline: none;
  border-radius: 2px;
  padding: 0 2px;
  cursor: text;
  transition: background 0.15s;
}

.section-break__name:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.section-break__name:hover {
  background: var(--hover-overlay);
}

.section-break__name[contenteditable='true']:focus {
  background: var(--accent-subtle);
  box-shadow: 0 0 0 1px var(--accent-border);
}

.section-break__grip {
  cursor: grab;
  color: var(--muted);
  opacity: 0.4;
  font-size: 0.85rem;
  flex-shrink: 0;
  padding-right: 0.25rem;
  transition: opacity 0.1s;
  user-select: none;
}

.section-break:hover .section-break__grip {
  opacity: 0.8;
}

.section-break.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.section-drop-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  pointer-events: none;
  display: none;
  z-index: 100;
}

.section-drop-indicator::before,
.section-drop-indicator::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.section-drop-indicator::before { left: 0; }
.section-drop-indicator::after  { right: 0; }

.section-break__time {
  font-family: var(--font-mono);
  font-size: var(--fs-hint);
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-break__remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}

.section-break__remove:hover {
  color: var(--danger);
  background: var(--danger-subtle);
}

/* Transcript panel — right column, full height */
.transcript-panel {
  flex: 1;
  min-width: 350px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.transcript-header h2 {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}


.transcript-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Sections sidebar ────────────────────────────────────────────────────── */

.sections-sidebar {
  display: none;
  flex-direction: column;
  width: 96px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface2);
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sections-sidebar.visible {
  display: flex;
}

.sections-sidebar__resizer {
  display: none;
  width: 4px;
  flex-shrink: 0;
  cursor: col-resize;
  background: transparent;
  transition: background 0.15s;
  position: relative;
  z-index: 1;
}

.sections-sidebar.visible ~ .sections-sidebar__resizer {
  display: block;
}

.sections-sidebar__resizer:hover,
.sections-sidebar__resizer.dragging {
  background: var(--accent-border);
}

.sections-sidebar__header {
  font-family: var(--font-mono);
  font-size: var(--fs-hint);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.section-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}

.section-nav-item:hover {
  background: var(--hover-overlay);
  border-left-color: var(--accent-border);
}

.section-nav-item.active {
  background: var(--accent-faint);
  border-left-color: var(--accent);
}

.section-nav-item__num {
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1;
}

.section-nav-item__name {
  font-family: var(--font-mono);
  font-size: var(--fs-hint);
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transcript-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  position: relative;
  isolation: isolate;
  min-width: 0;
}

.transcript-body::-webkit-scrollbar { width: 4px; }
.transcript-body::-webkit-scrollbar-track { background: transparent; }
.transcript-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.transcript-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0.5;
}

.transcript-empty .t-icon { font-size: var(--fs-display); opacity: 0.4; }


/* Paragraph row: handle bar + paragraph text */
.para-row {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.para-handle {
  position: relative;
  width: 5px;
  flex-shrink: 0;
  border-radius: 2px;
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.15s;
  /* Inset by half-leading so the bar aligns with the text glyph area.
     .t-seg uses font-size 0.875rem and line-height 1.7, so
     half-leading = 0.875rem * (1.7 - 1) / 2 = 0.875rem * 0.35 */
  margin-top: calc(0.875rem * 0.35);
  margin-bottom: calc(0.875rem * 0.35);
}

.para-handle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 0.85rem; /* covers the gap between handle and text */
}

.para-handle:hover {
  opacity: 1;
}

.para-handle:hover ~ .transcript-para .t-seg {
  color: var(--text);
}

/* Paragraphs within a speaker block */
.transcript-para {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  text-align: justify;
}

/* Off-the-record paragraph row */
.para-row--otr .para-handle {
  background: var(--muted) !important;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  ) !important;
}

.para-row--otr .transcript-para {
  opacity: 0.55;
  font-style: italic;
}

.para-otr-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg, #888);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 0.5em;
  vertical-align: middle;
  opacity: 0.8;
  user-select: none;
}


.export-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
  color: var(--accent2);
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  padding: 0.2rem 0.4rem;
  margin: -0.2rem -0.4rem;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
  background: transparent;
}

/* ── Paragraph speaker popup ─────────────────────────────────────────────── */

.para-speaker-popup {
  position: fixed;
  z-index: 2000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 0;
  min-width: 160px;
  box-shadow: 0 6px 24px var(--shadow-md);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
}


/* Individual word segments — each row is a clickable span */
.t-seg {
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.1s, color 0.1s;
  line-height: 1.7;
  font-family: var(--font-transcript);
  font-size: var(--fs-prose);
  color: var(--muted);
  padding: 0.35em 0;
}

.t-seg:hover {
  color: var(--text);
}

.t-seg.active  { color: var(--text); }
.t-seg.hovered { color: var(--text); }

.t-seg-hl {
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 -2px;
}

/* Word-level spans — rendered inside .t-seg-hl when word timestamps are available */
.t-word {
  border-radius: 2px;
}

.t-word.active-word {
  outline: 1px solid var(--accent);
  border-radius: 2px;
}

.t-word--muted {
  color: var(--text-muted, #666);
  text-decoration: line-through;
  text-decoration-color: var(--error, #e05c5c);
  opacity: 0.6;
  cursor: context-menu;
}

.t-seg-link .t-word--muted {
  color: var(--accent2);
}

.t-word--effected {
  text-decoration-line: underline;
  text-decoration-color: var(--effect-color, #6fa8dc);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: context-menu;
}

.t-seg.active .t-seg-hl {
  background: var(--accent-subtle);
}

.t-seg.hovered .t-seg-hl {
  background: var(--hover-overlay);
}

.t-seg.active.hovered .t-seg-hl {
  background: var(--accent-hover);
}

.t-seg.selected .t-seg-hl {
  outline: 1px solid var(--accent-select);
  background: var(--accent-subtle);
}

.t-seg.editing {
  outline: 1px solid var(--accent-glow);
  background: var(--accent-faint);
  border-radius: 2px;
  padding: 0.35em 2px;
  margin: 0 -2px;
  white-space: pre-wrap;
  min-width: 2px;
  color: var(--text);
  caret-color: var(--accent);
}

/* Stale word-timestamp tooltip */
.stale-tooltip-msg {
  font-weight: 600;
  margin-bottom: 2px;
}
.stale-tooltip-hint {
  opacity: 0.75;
  font-size: 0.85em;
}

/* Stale word-timestamp indicator */
@keyframes stale-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.t-seg-stale-badge {
  font-size: 0.6rem;
  vertical-align: super;
  line-height: 1;
  margin-left: 1px;
  color: var(--warning, #e8a000);
  opacity: 0.75;
  cursor: default;
  user-select: none;
}
.t-seg--words-stale .t-seg-hl {
  background: color-mix(in srgb, var(--warning, #e8a000) 8%, transparent);
  border-radius: 2px;
}
.stale-badge--loading {
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1.5px solid color-mix(in srgb, var(--warning, #e8a000) 30%, transparent);
  border-top-color: var(--warning, #e8a000);
  border-radius: 50%;
  vertical-align: middle;
  animation: stale-spin 0.75s linear infinite;
  opacity: 1;
  margin-left: 1px;
  font-size: 0;
}


.transcript-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
  color: var(--accent2);
  letter-spacing: 0.06em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.2rem 0.4rem;
  margin: -0.2rem -0.4rem;
  border-radius: 2px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.transcript-btn:hover {
  background: var(--accent2-faint);
  color: var(--accent2);
}

.transcript-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.transcript-btn:disabled:hover {
  background: none;
}

.transcript-delete-btn {
  color: var(--muted) !important;
}

.transcript-delete-btn:hover {
  background: var(--danger-subtle) !important;
  color: var(--danger) !important;
}

/* ── Transcription progress bar ──────────────────────────────────────────── */

.transcribe-progress {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.transcribe-progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.transcribe-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent2);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.transcribe-status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.transcribe-status {
  font-family: var(--font-mono);
  font-size: var(--fs-hint);
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.transcribe-elapsed {
  font-family: var(--font-mono);
  font-size: var(--fs-hint);
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.transcript-drop {
  font-family: var(--font-mono);
  font-size: var(--fs-secondary);
  color: var(--accent2);
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  padding: 0.2rem 0.4rem;
  margin: -0.2rem -0.4rem;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.transcript-drop:hover {
  background: var(--accent2-faint);
  color: var(--accent2);
}

.transcript-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}


#transcriptPanel.header-compact .transcript-header .btn-label { display: none; }

/* ── Search bar ──────────────────────────────────────────────────────────── */

.transcript-search {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
}

.replace-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem 0.45rem;
  border-top: 1px solid var(--border);
}

.search-replace-toggle.active {
  color: var(--accent2);
  border-color: var(--accent2);
}

.replace-btn:not(:disabled) {
  color: var(--text);
}

.replace-btn:not(:disabled):hover {
  color: var(--accent2);
  border-color: var(--accent2);
  background: var(--accent2-faint);
}

.search-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
}

.search-input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  padding: 0.22rem 1.4rem 0.22rem 0.5rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus { border-color: var(--accent-border); }
.search-input::placeholder { color: var(--muted); opacity: 0.55; }

.search-clear-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1.4rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--fs-secondary);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color 0.1s;
}

.search-clear-btn:hover { color: var(--text); }
.search-input-wrap.has-value .search-clear-btn { display: flex; }

.search-speaker-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-detail);
  padding: 0.22rem 0.3rem;
  outline: none;
  cursor: pointer;
  max-width: 120px;
}

.search-speaker-select:focus { border-color: var(--accent-border); color: var(--text); }

.search-count {
  font-family: var(--font-mono);
  font-size: var(--fs-detail);
  color: var(--muted);
  white-space: nowrap;
  min-width: 3.8rem;
  text-align: center;
}

.search-nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
  font-size: var(--fs-body);
  padding: 0.18rem 0.38rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.1s, border-color 0.1s;
}

.search-nav-btn:hover { color: var(--text); border-color: var(--accent-border); }
.search-nav-btn:disabled { opacity: 0.3; cursor: default; }


/* ── Search highlight styles ─────────────────────────────────────────────── */

.t-seg.search-match { color: var(--text); }

.t-seg.search-focused .t-seg-hl {
  background: var(--accent-subtle);
}


/* Suppress the native selection background so the custom overlay shows cleanly.
   Also covers the trailing space text node that sits directly inside .t-seg. */
.t-seg-hl::selection,
.t-seg-hl *::selection,
.t-seg::selection {
  background: transparent;
}

/* ── Custom selection overlay ────────────────────────────────────────────── */

.transcript-sel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
}

.transcript-sel-rect {
  position: absolute;
  border-radius: 2px;
  background: var(--accent2-select);
  outline: 1px solid var(--accent2-glow);
  pointer-events: none;
  transition: background 0.1s, outline-color 0.1s;
}

.transcript-sel-connector {
  border-radius: 0;
  outline: none;
}

/* Text inside a highlighted segment gets a brightness boost — between muted and full hover. */
.t-seg--in-selection .t-seg-hl {
  color: color-mix(in oklch, var(--text) 60%, var(--muted));
}

/* Hovering any part of a segment still brings that segment's text to full hover color. */
.t-seg--in-selection:hover .t-seg-hl,
.t-seg--in-selection.hovered .t-seg-hl {
  color: var(--text);
}

/* Whole highlight brightens only when the cursor is actually over a highlight rect. */
.transcript-sel-overlay.hovered .transcript-sel-rect {
  background: oklch(from var(--accent2) l c h / 0.68);
  outline-color: oklch(from var(--accent2) l c h / 0.85);
}

mark.search-hl {
  background: var(--accent-mark);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
  margin: 0 -1px;
}

.t-seg.search-focused mark.search-hl {
  background: var(--accent-select);
}

/* Links inside an editing segment keep their colour but use a text cursor */
.t-seg.editing .t-seg-link {
  cursor: text;
  pointer-events: none;
}

/* ── Hyperlinks ──────────────────────────────────────────────────────────── */

/* Base: always show the accent colour so links are identifiable, but no
   interactive styling until Ctrl is held. border-bottom is used instead of
   text-decoration so link underlines don't fight effect/stale decorations. */
.t-seg-link {
  color: var(--accent2);
  border-bottom: 1px solid var(--accent2-border);
  border-radius: 2px;
  cursor: default;
  transition: background 0.1s, border-bottom-color 0.1s;
}

/* Ctrl held: full interactive link behaviour. */
.ctrl-held .t-seg-link {
  cursor: pointer;
}

.ctrl-held .t-seg-link:hover {
  background: var(--accent2-hover);
  border-bottom-color: var(--accent2);
}

