/* Faithful reproduction of the real NTranscript app UI, for the landing
   mockups. Tokens, structure, class names and rules are taken verbatim from
   the app's own stylesheet (dark theme), scoped under .ntwin so they never
   touch the landing's own styles. Keep in sync with src/App.css. */

.ntwin {
  /* Real app dark-theme tokens */
  --bg: #0d0d0f;
  --surface: #151518;
  --text: #f1f1f2;
  --text-muted: #8e8e95;
  --border: #26262b;
  --accent: #6f81d6;
  --accent-tint: #1e2233;
  --danger: #ef6a6a;
  --danger-tint: #3a2323;
  --warning: #d6a34a;
  --warning-tint: #332a1a;
  --speaker-1-bg: #232838; --speaker-1-fg: #9fadd3;
  --speaker-2-bg: #1c2d27; --speaker-2-fg: #83baa8;
  --speaker-3-bg: #292236; --speaker-3-fg: #b09dcf;
  --speaker-4-bg: #302a1d; --speaker-4-fg: #c9b184;
  --support: #c87c88;
  --control-h: 38px;

  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  text-align: left;
}
.ntwin * { box-sizing: border-box; }

/* The app's scrollbar (src/App.css), in its dark-theme colours. */
.ntwin ::-webkit-scrollbar { width: 10px; height: 10px; }
.ntwin ::-webkit-scrollbar-track { background: transparent; }
.ntwin ::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; background-color: var(--border); }
.ntwin ::-webkit-scrollbar-thumb:hover { background-color: var(--text-muted); }
.ntwin ::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  .ntwin * { scrollbar-color: var(--border) transparent; scrollbar-width: thin; }
}

/* Window chrome (the OS titlebar a real desktop window carries) */
.ntwin__bar {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  background: #0a0a0c;
  border-bottom: 1px solid var(--border);
}
.ntwin__dots { display: flex; gap: 7px; }
.ntwin__dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2a2f; }
.ntwin__title { margin-left: 6px; font-size: 12px; color: var(--text-muted); }

/* App shell: sidebar + main, exactly as the app lays out */
.ntapp { display: flex; height: 560px; }

/* ---------- Sidebar (verbatim, scoped) ---------- */
.ntwin .sidebar { display: flex; flex-direction: column; gap: 1.25rem; flex: 0 0 auto; width: 236px; padding: 0.85rem 0.7rem; background: var(--surface); border-right: 1px solid var(--border); }
.ntwin .sidebar-switcher { position: relative; display: flex; gap: 0.15rem; padding: 0.2rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.ntwin .sidebar-switcher-indicator { position: absolute; top: 0.2rem; left: 0; bottom: 0.2rem; border-radius: 7px; background: var(--accent); transition: transform .22s cubic-bezier(.4,0,.2,1), width .22s cubic-bezier(.4,0,.2,1); }
.ntwin .sidebar-tab { position: relative; z-index: 1; flex: 1 1 0%; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.45rem 0.5rem; border: none; border-radius: 7px; background: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; cursor: pointer; }
.ntwin .sidebar-tab.active { color: #fff; }
.ntwin .sidebar-tab-body { display: inline-flex; align-items: center; gap: 0.4rem; }
.ntwin .sidebar-tab-dot { flex: 0 0 auto; position: relative; top: 1px; animation: sidebarDotPulse 1.6s ease-in-out infinite; }
.ntwin .sidebar-tab.active .sidebar-tab-dot { box-shadow: 0 0 0 1.5px #fff; }
.ntwin .sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.ntwin .sidebar-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.5rem 0.55rem; border: none; border-radius: 8px; background: none; color: var(--text-muted); font-size: 0.85rem; text-align: left; cursor: pointer; }
.ntwin .sidebar-item svg { flex: 0 0 auto; }
.ntwin .sidebar-item-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ntwin .sidebar-item.active { background: var(--bg); color: var(--text); }
.ntwin .sidebar-help { margin-top: 0.55rem; }
.ntwin .sidebar-recent { display: flex; flex-direction: column; gap: 0.1rem; min-height: 0; padding-top: 0.9rem; border-top: 1px solid var(--border); overflow-y: auto; }
.ntwin .sidebar-heading { margin: 0 0.55rem 0.35rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.ntwin .sidebar-recent-row { display: flex; align-items: center; gap: 0.15rem; padding: 0.3rem 0.2rem 0.3rem 0.55rem; border-radius: 8px; }
.ntwin .sidebar-recent-open { flex: 1 1 auto; min-width: 0; padding: 0 0 0 1px; margin-left: -1px; border: none; background: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.78rem; text-align: left; color: var(--text-muted); cursor: pointer; }
.ntwin .sidebar-recent-action { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: 6px; background: none; color: var(--text-muted); opacity: 0; cursor: pointer; }
.ntwin .sidebar-recent-dot { flex: 0 0 auto; margin: 0 8px; }
.ntwin .sidebar-foot { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem; align-items: center; margin-top: auto; }
.ntwin .sidebar-foot > .sidebar-support { grid-area: 1 / 1 / auto / -1; border: 1px solid transparent; }
.ntwin .sidebar-foot > .sidebar-item:first-child { grid-column: 1; grid-row: 2; min-width: 0; }
.ntwin .sidebar-foot > .sidebar-collapse { grid-area: 2 / 2; flex: 0 0 auto; width: 34px; padding: 0; justify-content: center; }

/* ---------- Main area ---------- */
.ntwin .app-main { flex: 1 1 auto; min-width: 0; overflow-y: auto; }
.ntwin .container { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 2rem 1.5rem 2.5rem; gap: 0.4rem; }
.ntwin .container.fills-window { height: 100%; padding-bottom: 0; }
.ntwin .page-about { display: flex; align-items: flex-start; gap: 0.6rem; width: min(640px, 100%); margin: 0 0 1.1rem; font-size: 0.85rem; line-height: 1.55; color: var(--text-muted); }
.ntwin .page-about-mark { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.72rem; font-weight: 600; }

/* ---------- Buttons (scoped base) ---------- */
.ntwin button { font: inherit; height: var(--control-h); padding: 0 1rem; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: #fff; cursor: pointer; white-space: nowrap; }
.ntwin button.with-icon { display: inline-flex; align-items: center; gap: 0.45rem; }
.ntwin button.secondary { background: transparent; border-color: var(--border); color: var(--text); }

/* ---------- File result ---------- */
.ntwin .result-panel { width: min(640px, 100%); display: flex; flex-direction: column; flex: 1 1 auto; gap: 1rem; }
.ntwin .result-header { display: flex; flex-direction: column; gap: 0.85rem; }
.ntwin .result-header h1 { margin: 0; font-size: 1.45rem; font-weight: 600; color: var(--text); }
.ntwin .subtitle { margin: 0.2rem 0 0; color: var(--text-muted); font-size: 0.95rem; }
.ntwin .result-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ntwin .result-actions .result-another { margin-left: auto; }
.ntwin .kept-mark { }
.ntwin .player { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.ntwin .player-play { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.ntwin .player-time { flex: 0 0 auto; font-size: 0.76rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.ntwin .player-track { flex: 1 1 auto; min-width: 7rem; height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--accent) 0 38%, var(--border) 38% 100%); }
.ntwin .view-switch { flex: 0 0 auto; display: inline-flex; gap: 0.15rem; margin-left: auto; }
.ntwin .view-tab { height: auto; padding: 0.25rem 0.7rem; border: none; border-radius: 7px; background: none; color: var(--text-muted); font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.ntwin .view-tab.active { background: var(--accent); color: #fff; }
.ntwin .transcript-box { flex: 1 1 auto; min-height: 6.5rem; overflow-y: auto; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.ntwin .segment-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.ntwin .segment-list.timed { padding: 0.6rem; gap: 0.15rem; }
.ntwin .segment-list li { display: flex; gap: 0.75rem; padding: 0.4rem 0.6rem; border-radius: 8px; }
.ntwin .segment-list.timed li { padding: 0; }
/* Wraps, as in the app: the base button rule keeps labels on one line, and
   left alone a long phrase ran off the box and gave it a sideways scrollbar. */
.ntwin .segment-seek { display: flex; gap: 0.75rem; width: 100%; height: auto; padding: 0.4rem 0.6rem; border: none; border-radius: 8px; background: transparent; color: inherit; text-align: left; line-height: 1.5; white-space: normal; cursor: pointer; }
.ntwin .segment-list.timed li.active .segment-seek { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ntwin .segment-list.timed li.active .segment-time { color: var(--accent); }
.ntwin .segment-time { flex-shrink: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--text-muted); padding-top: 0.15rem; }
.ntwin .segment-text { color: var(--text); font-size: 0.95rem; }

/* ---------- Live ---------- */
.ntwin .live-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 0.75rem; width: min(640px, 100%); margin-bottom: 1rem; }
.ntwin .live-bar button { display: inline-flex; align-items: center; gap: 0.5rem; }
.ntwin .live-copy { margin-left: auto; }
.ntwin .live-model-picker { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.ntwin .select { position: relative; min-width: 0; }
.ntwin .select-button { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: min(15rem, 42vw); height: var(--control-h); padding: 0 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 0.85rem; text-align: left; cursor: pointer; }
.ntwin .select-button svg { flex: 0 0 auto; color: var(--text-muted); }
.ntwin .select-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ntwin .live-options { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1.1rem; width: min(640px, 100%); margin: -0.4rem 0 0.9rem; }
.ntwin .check { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; user-select: none; }
.ntwin .check-box { position: relative; flex: 0 0 auto; width: 17px; height: 17px; border: 1.5px solid var(--border); border-radius: 5px; background: var(--surface); }
.ntwin .check.checked .check-box { background: var(--accent); border-color: var(--accent); }
.ntwin .check.checked .check-box::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ntwin .experimental-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.45rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text-muted); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.ntwin .live-transcript { width: min(640px, 100%); flex: 1 1 auto; min-height: 220px; overflow-y: auto; padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.ntwin .live-lines { display: flex; flex-direction: column; gap: 0.55rem; }
.ntwin .live-line { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--text); text-align: left; animation: liveLineIn 160ms ease-out both; }
.ntwin .live-source { display: inline-block; margin-right: 0.5rem; padding: 0.05rem 0.4rem; border-radius: 999px; font-size: 0.7rem; letter-spacing: 0.02em; vertical-align: 0.08em; background: var(--accent-tint); color: var(--accent); }
.ntwin .live-speaker-1 { background: var(--speaker-1-bg); color: var(--speaker-1-fg); }
.ntwin .live-speaker-2 { background: var(--speaker-2-bg); color: var(--speaker-2-fg); }
.ntwin .live-speaker-3 { background: var(--speaker-3-bg); color: var(--speaker-3-fg); }
.ntwin .live-caret { display: inline-block; width: 2px; height: 1em; vertical-align: -0.15em; background: var(--accent); animation: liveCaret 1.3s ease-in-out infinite; }
.ntwin .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: liveDotPulse 1.6s ease-in-out infinite; }

@keyframes sidebarDotPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .65; transform: scale(.82); } }
@keyframes liveDotPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes liveLineIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes liveCaret { 0%,60% { opacity: 1; } 80% { opacity: .3; } 100% { opacity: 1; } }

/* The window interior doesn't fit a phone; show it scaled/scrollable */
@media (max-width: 825px) {
  .ntapp { height: 460px; }
  .ntwin .sidebar { display: none; }
}
